const fN = "modulepreload"
  , dN = function(t) {
    return "/" + t
}
  , $C = {}
  , X0 = function(e, r, n) {
    if (!r || r.length === 0)
        return e();
    const i = document.getElementsByTagName("link");
    return Promise.all(r.map(o => {
        if (o = dN(o),
        o in $C)
            return;
        $C[o] = !0;
        const s = o.endsWith(".css")
          , a = s ? '[rel="stylesheet"]' : "";
        if (!!n)
            for (let u = i.length - 1; u >= 0; u--) {
                const f = i[u];
                if (f.href === o && (!s || f.rel === "stylesheet"))
                    return
            }
        else if (document.querySelector(`link[href="${o}"]${a}`))
            return;
        const c = document.createElement("link");
        if (c.rel = s ? "stylesheet" : fN,
        s || (c.as = "script",
        c.crossOrigin = ""),
        c.href = o,
        document.head.appendChild(c),
        s)
            return new Promise( (u, f) => {
                c.addEventListener("load", u),
                c.addEventListener("error", () => f(new Error(`Unable to preload CSS for ${o}`)))
            }
            )
    }
    )).then( () => e()).catch(o => {
        const s = new Event("vite:preloadError",{
            cancelable: !0
        });
        if (s.payload = o,
        window.dispatchEvent(s),
        !s.defaultPrevented)
            throw o
    }
    )
};
function hN(t, e) {
    const r = Object.create(null)
      , n = t.split(",");
    for (let i = 0; i < n.length; i++)
        r[n[i]] = !0;
    return e ? i => !!r[i.toLowerCase()] : i => !!r[i]
}
const kf = Object.assign
  , xN = Object.prototype.hasOwnProperty
  , fp = (t, e) => xN.call(t, e)
  , qo = Array.isArray
  , m0 = t => f5(t) === "[object Map]"
  , r_ = t => typeof t == "function"
  , pN = t => typeof t == "string"
  , n_ = t => typeof t == "symbol"
  , Rf = t => t !== null && typeof t == "object"
  , gN = Object.prototype.toString
  , f5 = t => gN.call(t)
  , d5 = t => f5(t).slice(8, -1)
  , i_ = t => pN(t) && t !== "NaN" && t[0] !== "-" && "" + parseInt(t, 10) === t
  , mN = t => {
    const e = Object.create(null);
    return r => e[r] || (e[r] = t(r))
}
  , vN = mN(t => t.charAt(0).toUpperCase() + t.slice(1))
  , o_ = (t, e) => !Object.is(t, e)
  , yN = (t, e, r) => {
    Object.defineProperty(t, e, {
        configurable: !0,
        enumerable: !1,
        value: r
    })
}
;
function lx(t, ...e) {
    console.warn(`[Vue warn] ${t}`, ...e)
}
let Un;
class s_ {
    constructor(e=!1) {
        this.detached = e,
        this._active = !0,
        this.effects = [],
        this.cleanups = [],
        this.parent = Un,
        !e && Un && (this.index = (Un.scopes || (Un.scopes = [])).push(this) - 1)
    }
    get active() {
        return this._active
    }
    run(e) {
        if (this._active) {
            const r = Un;
            try {
                return Un = this,
                e()
            } finally {
                Un = r
            }
        } else
            lx("cannot run an inactive effect scope.")
    }
    on() {
        Un = this
    }
    off() {
        Un = this.parent
    }
    stop(e) {
        if (this._active) {
            let r, n;
            for (r = 0,
            n = this.effects.length; r < n; r++)
                this.effects[r].stop();
            for (r = 0,
            n = this.cleanups.length; r < n; r++)
                this.cleanups[r]();
            if (this.scopes)
                for (r = 0,
                n = this.scopes.length; r < n; r++)
                    this.scopes[r].stop(!0);
            if (!this.detached && this.parent && !e) {
                const i = this.parent.scopes.pop();
                i && i !== this && (this.parent.scopes[this.index] = i,
                i.index = this.index)
            }
            this.parent = void 0,
            this._active = !1
        }
    }
}
function Mf(t) {
    return new s_(t)
}
function h5(t, e=Un) {
    e && e.active && e.effects.push(t)
}
function Nf() {
    return Un
}
function a_(t) {
    Un ? Un.cleanups.push(t) : lx("onScopeDispose() is called when there is no active effect scope to be associated with.")
}
const l_ = t => {
    const e = new Set(t);
    return e.w = 0,
    e.n = 0,
    e
}
  , x5 = t => (t.w & ia) > 0
  , p5 = t => (t.n & ia) > 0
  , EN = ({deps: t}) => {
    if (t.length)
        for (let e = 0; e < t.length; e++)
            t[e].w |= ia
}
  , _N = t => {
    const {deps: e} = t;
    if (e.length) {
        let r = 0;
        for (let n = 0; n < e.length; n++) {
            const i = e[n];
            x5(i) && !p5(i) ? i.delete(t) : e[r++] = i,
            i.w &= ~ia,
            i.n &= ~ia
        }
        e.length = r
    }
}
  , cx = new WeakMap;
let s0 = 0
  , ia = 1;
const bv = 30;
let un;
const tl = Symbol("iterate")
  , Cv = Symbol("Map key iterate");
class Lf {
    constructor(e, r=null, n) {
        this.fn = e,
        this.scheduler = r,
        this.active = !0,
        this.deps = [],
        this.parent = void 0,
        h5(this, n)
    }
    run() {
        if (!this.active)
            return this.fn();
        let e = un
          , r = Xs;
        for (; e; ) {
            if (e === this)
                return;
            e = e.parent
        }
        try {
            return this.parent = un,
            un = this,
            Xs = !0,
            ia = 1 << ++s0,
            s0 <= bv ? EN(this) : UC(this),
            this.fn()
        } finally {
            s0 <= bv && _N(this),
            ia = 1 << --s0,
            un = this.parent,
            Xs = r,
            this.parent = void 0,
            this.deferStop && this.stop()
        }
    }
    stop() {
        un === this ? this.deferStop = !0 : this.active && (UC(this),
        this.onStop && this.onStop(),
        this.active = !1)
    }
}
function UC(t) {
    const {deps: e} = t;
    if (e.length) {
        for (let r = 0; r < e.length; r++)
            e[r].delete(t);
        e.length = 0
    }
}
function bN(t, e) {
    t.effect && (t = t.effect.fn);
    const r = new Lf(t);
    e && (kf(r, e),
    e.scope && h5(r, e.scope)),
    (!e || !e.lazy) && r.run();
    const n = r.run.bind(r);
    return n.effect = r,
    n
}
function CN(t) {
    t.effect.stop()
}
let Xs = !0;
const g5 = [];
function Il() {
    g5.push(Xs),
    Xs = !1
}
function Ol() {
    const t = g5.pop();
    Xs = t === void 0 ? !0 : t
}
function tn(t, e, r) {
    if (Xs && un) {
        let n = cx.get(t);
        n || cx.set(t, n = new Map);
        let i = n.get(r);
        i || n.set(r, i = l_()),
        m5(i, {
            effect: un,
            target: t,
            type: e,
            key: r
        })
    }
}
function m5(t, e) {
    let r = !1;
    s0 <= bv ? p5(t) || (t.n |= ia,
    r = !x5(t)) : r = !t.has(un),
    r && (t.add(un),
    un.deps.push(t),
    un.onTrack && un.onTrack(kf({
        effect: un
    }, e)))
}
function po(t, e, r, n, i, o) {
    const s = cx.get(t);
    if (!s)
        return;
    let a = [];
    if (e === "clear")
        a = [...s.values()];
    else if (r === "length" && qo(t)) {
        const c = Number(n);
        s.forEach( (u, f) => {
            (f === "length" || f >= c) && a.push(u)
        }
        )
    } else
        switch (r !== void 0 && a.push(s.get(r)),
        e) {
        case "add":
            qo(t) ? i_(r) && a.push(s.get("length")) : (a.push(s.get(tl)),
            m0(t) && a.push(s.get(Cv)));
            break;
        case "delete":
            qo(t) || (a.push(s.get(tl)),
            m0(t) && a.push(s.get(Cv)));
            break;
        case "set":
            m0(t) && a.push(s.get(tl));
            break
        }
    const l = {
        target: t,
        type: e,
        key: r,
        newValue: n,
        oldValue: i,
        oldTarget: o
    };
    if (a.length === 1)
        a[0] && Av(a[0], l);
    else {
        const c = [];
        for (const u of a)
            u && c.push(...u);
        Av(l_(c), l)
    }
}
function Av(t, e) {
    const r = qo(t) ? t : [...t];
    for (const n of r)
        n.computed && GC(n, e);
    for (const n of r)
        n.computed || GC(n, e)
}
function GC(t, e) {
    (t !== un || t.allowRecurse) && (t.onTrigger && t.onTrigger(kf({
        effect: t
    }, e)),
    t.scheduler ? t.scheduler() : t.run())
}
function AN(t, e) {
    var r;
    return (r = cx.get(t)) == null ? void 0 : r.get(e)
}
const wN = hN("__proto__,__v_isRef,__isVue")
  , v5 = new Set(Object.getOwnPropertyNames(Symbol).filter(t => t !== "arguments" && t !== "caller").map(t => Symbol[t]).filter(n_))
  , BN = dp()
  , SN = dp(!1, !0)
  , TN = dp(!0)
  , DN = dp(!0, !0)
  , HC = FN();
function FN() {
    const t = {};
    return ["includes", "indexOf", "lastIndexOf"].forEach(e => {
        t[e] = function(...r) {
            const n = Le(this);
            for (let o = 0, s = this.length; o < s; o++)
                tn(n, "get", o + "");
            const i = n[e](...r);
            return i === -1 || i === !1 ? n[e](...r.map(Le)) : i
        }
    }
    ),
    ["push", "pop", "shift", "unshift", "splice"].forEach(e => {
        t[e] = function(...r) {
            Il();
            const n = Le(this)[e].apply(this, r);
            return Ol(),
            n
        }
    }
    ),
    t
}
function PN(t) {
    const e = Le(this);
    return tn(e, "has", t),
    e.hasOwnProperty(t)
}
function dp(t=!1, e=!1) {
    return function(n, i, o) {
        if (i === "__v_isReactive")
            return !t;
        if (i === "__v_isReadonly")
            return t;
        if (i === "__v_isShallow")
            return e;
        if (i === "__v_raw" && o === (t ? e ? B5 : w5 : e ? A5 : C5).get(n))
            return n;
        const s = qo(n);
        if (!t) {
            if (s && fp(HC, i))
                return Reflect.get(HC, i, o);
            if (i === "hasOwnProperty")
                return PN
        }
        const a = Reflect.get(n, i, o);
        return (n_(i) ? v5.has(i) : wN(i)) || (t || tn(n, "get", i),
        e) ? a : xt(a) ? s && i_(i) ? a : a.value : Rf(a) ? t ? kl(a) : Pt(a) : a
    }
}
const IN = y5()
  , ON = y5(!0);
function y5(t=!1) {
    return function(r, n, i, o) {
        let s = r[n];
        if (as(s) && xt(s) && !xt(i))
            return !1;
        if (!t && (!K0(i) && !as(i) && (s = Le(s),
        i = Le(i)),
        !qo(r) && xt(s) && !xt(i)))
            return s.value = i,
            !0;
        const a = qo(r) && i_(n) ? Number(n) < r.length : fp(r, n)
          , l = Reflect.set(r, n, i, o);
        return r === Le(o) && (a ? o_(i, s) && po(r, "set", n, i, s) : po(r, "add", n, i)),
        l
    }
}
function kN(t, e) {
    const r = fp(t, e)
      , n = t[e]
      , i = Reflect.deleteProperty(t, e);
    return i && r && po(t, "delete", e, void 0, n),
    i
}
function RN(t, e) {
    const r = Reflect.has(t, e);
    return (!n_(e) || !v5.has(e)) && tn(t, "has", e),
    r
}
function MN(t) {
    return tn(t, "iterate", qo(t) ? "length" : tl),
    Reflect.ownKeys(t)
}
const E5 = {
    get: BN,
    set: IN,
    deleteProperty: kN,
    has: RN,
    ownKeys: MN
}
  , _5 = {
    get: TN,
    set(t, e) {
        return lx(`Set operation on key "${String(e)}" failed: target is readonly.`, t),
        !0
    },
    deleteProperty(t, e) {
        return lx(`Delete operation on key "${String(e)}" failed: target is readonly.`, t),
        !0
    }
}
  , NN = kf({}, E5, {
    get: SN,
    set: ON
})
  , LN = kf({}, _5, {
    get: DN
})
  , c_ = t => t
  , hp = t => Reflect.getPrototypeOf(t);
function Bd(t, e, r=!1, n=!1) {
    t = t.__v_raw;
    const i = Le(t)
      , o = Le(e);
    r || (e !== o && tn(i, "get", e),
    tn(i, "get", o));
    const {has: s} = hp(i)
      , a = n ? c_ : r ? u_ : Z0;
    if (s.call(i, e))
        return a(t.get(e));
    if (s.call(i, o))
        return a(t.get(o));
    t !== i && t.get(e)
}
function Sd(t, e=!1) {
    const r = this.__v_raw
      , n = Le(r)
      , i = Le(t);
    return e || (t !== i && tn(n, "has", t),
    tn(n, "has", i)),
    t === i ? r.has(t) : r.has(t) || r.has(i)
}
function Td(t, e=!1) {
    return t = t.__v_raw,
    !e && tn(Le(t), "iterate", tl),
    Reflect.get(t, "size", t)
}
function VC(t) {
    t = Le(t);
    const e = Le(this);
    return hp(e).has.call(e, t) || (e.add(t),
    po(e, "add", t, t)),
    this
}
function zC(t, e) {
    e = Le(e);
    const r = Le(this)
      , {has: n, get: i} = hp(r);
    let o = n.call(r, t);
    o ? b5(r, n, t) : (t = Le(t),
    o = n.call(r, t));
    const s = i.call(r, t);
    return r.set(t, e),
    o ? o_(e, s) && po(r, "set", t, e, s) : po(r, "add", t, e),
    this
}
function jC(t) {
    const e = Le(this)
      , {has: r, get: n} = hp(e);
    let i = r.call(e, t);
    i ? b5(e, r, t) : (t = Le(t),
    i = r.call(e, t));
    const o = n ? n.call(e, t) : void 0
      , s = e.delete(t);
    return i && po(e, "delete", t, void 0, o),
    s
}
function WC() {
    const t = Le(this)
      , e = t.size !== 0
      , r = m0(t) ? new Map(t) : new Set(t)
      , n = t.clear();
    return e && po(t, "clear", void 0, void 0, r),
    n
}
function Dd(t, e) {
    return function(n, i) {
        const o = this
          , s = o.__v_raw
          , a = Le(s)
          , l = e ? c_ : t ? u_ : Z0;
        return !t && tn(a, "iterate", tl),
        s.forEach( (c, u) => n.call(i, l(c), l(u), o))
    }
}
function Fd(t, e, r) {
    return function(...n) {
        const i = this.__v_raw
          , o = Le(i)
          , s = m0(o)
          , a = t === "entries" || t === Symbol.iterator && s
          , l = t === "keys" && s
          , c = i[t](...n)
          , u = r ? c_ : e ? u_ : Z0;
        return !e && tn(o, "iterate", l ? Cv : tl),
        {
            next() {
                const {value: f, done: d} = c.next();
                return d ? {
                    value: f,
                    done: d
                } : {
                    value: a ? [u(f[0]), u(f[1])] : u(f),
                    done: d
                }
            },
            [Symbol.iterator]() {
                return this
            }
        }
    }
}
function bs(t) {
    return function(...e) {
        {
            const r = e[0] ? `on key "${e[0]}" ` : "";
            console.warn(`${vN(t)} operation ${r}failed: target is readonly.`, Le(this))
        }
        return t === "delete" ? !1 : this
    }
}
function $N() {
    const t = {
        get(o) {
            return Bd(this, o)
        },
        get size() {
            return Td(this)
        },
        has: Sd,
        add: VC,
        set: zC,
        delete: jC,
        clear: WC,
        forEach: Dd(!1, !1)
    }
      , e = {
        get(o) {
            return Bd(this, o, !1, !0)
        },
        get size() {
            return Td(this)
        },
        has: Sd,
        add: VC,
        set: zC,
        delete: jC,
        clear: WC,
        forEach: Dd(!1, !0)
    }
      , r = {
        get(o) {
            return Bd(this, o, !0)
        },
        get size() {
            return Td(this, !0)
        },
        has(o) {
            return Sd.call(this, o, !0)
        },
        add: bs("add"),
        set: bs("set"),
        delete: bs("delete"),
        clear: bs("clear"),
        forEach: Dd(!0, !1)
    }
      , n = {
        get(o) {
            return Bd(this, o, !0, !0)
        },
        get size() {
            return Td(this, !0)
        },
        has(o) {
            return Sd.call(this, o, !0)
        },
        add: bs("add"),
        set: bs("set"),
        delete: bs("delete"),
        clear: bs("clear"),
        forEach: Dd(!0, !0)
    };
    return ["keys", "values", "entries", Symbol.iterator].forEach(o => {
        t[o] = Fd(o, !1, !1),
        r[o] = Fd(o, !0, !1),
        e[o] = Fd(o, !1, !0),
        n[o] = Fd(o, !0, !0)
    }
    ),
    [t, r, e, n]
}
const [UN,GN,HN,VN] = $N();
function xp(t, e) {
    const r = e ? t ? VN : HN : t ? GN : UN;
    return (n, i, o) => i === "__v_isReactive" ? !t : i === "__v_isReadonly" ? t : i === "__v_raw" ? n : Reflect.get(fp(r, i) && i in n ? r : n, i, o)
}
const zN = {
    get: xp(!1, !1)
}
  , jN = {
    get: xp(!1, !0)
}
  , WN = {
    get: xp(!0, !1)
}
  , YN = {
    get: xp(!0, !0)
};
function b5(t, e, r) {
    const n = Le(r);
    if (n !== r && e.call(t, n)) {
        const i = d5(t);
        console.warn(`Reactive ${i} contains both the raw and reactive versions of the same object${i === "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 C5 = new WeakMap
  , A5 = new WeakMap
  , w5 = new WeakMap
  , B5 = new WeakMap;
function XN(t) {
    switch (t) {
    case "Object":
    case "Array":
        return 1;
    case "Map":
    case "Set":
    case "WeakMap":
    case "WeakSet":
        return 2;
    default:
        return 0
    }
}
function KN(t) {
    return t.__v_skip || !Object.isExtensible(t) ? 0 : XN(d5(t))
}
function Pt(t) {
    return as(t) ? t : pp(t, !1, E5, zN, C5)
}
function S5(t) {
    return pp(t, !1, NN, jN, A5)
}
function kl(t) {
    return pp(t, !0, _5, WN, w5)
}
function Ec(t) {
    return pp(t, !0, LN, YN, B5)
}
function pp(t, e, r, n, i) {
    if (!Rf(t))
        return console.warn(`value cannot be made reactive: ${String(t)}`),
        t;
    if (t.__v_raw && !(e && t.__v_isReactive))
        return t;
    const o = i.get(t);
    if (o)
        return o;
    const s = KN(t);
    if (s === 0)
        return t;
    const a = new Proxy(t,s === 2 ? n : r);
    return i.set(t, a),
    a
}
function Ri(t) {
    return as(t) ? Ri(t.__v_raw) : !!(t && t.__v_isReactive)
}
function as(t) {
    return !!(t && t.__v_isReadonly)
}
function K0(t) {
    return !!(t && t.__v_isShallow)
}
function q0(t) {
    return Ri(t) || as(t)
}
function Le(t) {
    const e = t && t.__v_raw;
    return e ? Le(e) : t
}
function ao(t) {
    return yN(t, "__v_skip", !0),
    t
}
const Z0 = t => Rf(t) ? Pt(t) : t
  , u_ = t => Rf(t) ? kl(t) : t;
function f_(t) {
    Xs && un && (t = Le(t),
    m5(t.dep || (t.dep = l_()), {
        target: t,
        type: "get",
        key: "value"
    }))
}
function gp(t, e) {
    t = Le(t);
    const r = t.dep;
    r && Av(r, {
        target: t,
        type: "set",
        key: "value",
        newValue: e
    })
}
function xt(t) {
    return !!(t && t.__v_isRef === !0)
}
function ie(t) {
    return T5(t, !1)
}
function mp(t) {
    return T5(t, !0)
}
function T5(t, e) {
    return xt(t) ? t : new qN(t,e)
}
class qN {
    constructor(e, r) {
        this.__v_isShallow = r,
        this.dep = void 0,
        this.__v_isRef = !0,
        this._rawValue = r ? e : Le(e),
        this._value = r ? e : Z0(e)
    }
    get value() {
        return f_(this),
        this._value
    }
    set value(e) {
        const r = this.__v_isShallow || K0(e) || as(e);
        e = r ? e : Le(e),
        o_(e, this._rawValue) && (this._rawValue = e,
        this._value = r ? e : Z0(e),
        gp(this, e))
    }
}
function ZN(t) {
    gp(t, t.value)
}
function hn(t) {
    return xt(t) ? t.value : t
}
function JN(t) {
    return r_(t) ? t() : hn(t)
}
const QN = {
    get: (t, e, r) => hn(Reflect.get(t, e, r)),
    set: (t, e, r, n) => {
        const i = t[e];
        return xt(i) && !xt(r) ? (i.value = r,
        !0) : Reflect.set(t, e, r, n)
    }
};
function d_(t) {
    return Ri(t) ? t : new Proxy(t,QN)
}
class eL {
    constructor(e) {
        this.dep = void 0,
        this.__v_isRef = !0;
        const {get: r, set: n} = e( () => f_(this), () => gp(this));
        this._get = r,
        this._set = n
    }
    get value() {
        return this._get()
    }
    set value(e) {
        this._set(e)
    }
}
function D5(t) {
    return new eL(t)
}
function wv(t) {
    q0(t) || console.warn("toRefs() expects a reactive object but received a plain one.");
    const e = qo(t) ? new Array(t.length) : {};
    for (const r in t)
        e[r] = F5(t, r);
    return e
}
class tL {
    constructor(e, r, n) {
        this._object = e,
        this._key = r,
        this._defaultValue = n,
        this.__v_isRef = !0
    }
    get value() {
        const e = this._object[this._key];
        return e === void 0 ? this._defaultValue : e
    }
    set value(e) {
        this._object[this._key] = e
    }
    get dep() {
        return AN(Le(this._object), this._key)
    }
}
class rL {
    constructor(e) {
        this._getter = e,
        this.__v_isRef = !0,
        this.__v_isReadonly = !0
    }
    get value() {
        return this._getter()
    }
}
function v0(t, e, r) {
    return xt(t) ? t : r_(t) ? new rL(t) : Rf(t) && arguments.length > 1 ? F5(t, e, r) : ie(t)
}
function F5(t, e, r) {
    const n = t[e];
    return xt(n) ? n : new tL(t,e,r)
}
class nL {
    constructor(e, r, n, i) {
        this._setter = r,
        this.dep = void 0,
        this.__v_isRef = !0,
        this.__v_isReadonly = !1,
        this._dirty = !0,
        this.effect = new Lf(e, () => {
            this._dirty || (this._dirty = !0,
            gp(this))
        }
        ),
        this.effect.computed = this,
        this.effect.active = this._cacheable = !i,
        this.__v_isReadonly = n
    }
    get value() {
        const e = Le(this);
        return f_(e),
        (e._dirty || !e._cacheable) && (e._dirty = !1,
        e._value = e.effect.run()),
        e._value
    }
    set value(e) {
        this._setter(e)
    }
}
function iL(t, e, r=!1) {
    let n, i;
    const o = r_(t);
    o ? (n = t,
    i = () => {
        console.warn("Write operation failed: computed value is readonly")
    }
    ) : (n = t.get,
    i = t.set);
    const s = new nL(n,i,o || !i,r);
    return e && !r && (s.effect.onTrack = e.onTrack,
    s.effect.onTrigger = e.onTrigger),
    s
}
function $f(t, e) {
    const r = Object.create(null)
      , n = t.split(",");
    for (let i = 0; i < n.length; i++)
        r[n[i]] = !0;
    return e ? i => !!r[i.toLowerCase()] : i => !!r[i]
}
const Ct = Object.freeze({})
  , Fc = Object.freeze([])
  , Bn = () => {}
  , P5 = () => !1
  , oL = /^on[^a-z]/
  , Uf = t => oL.test(t)
  , Bv = t => t.startsWith("onUpdate:")
  , Xt = Object.assign
  , h_ = (t, e) => {
    const r = t.indexOf(e);
    r > -1 && t.splice(r, 1)
}
  , sL = Object.prototype.hasOwnProperty
  , lt = (t, e) => sL.call(t, e)
  , Ve = Array.isArray
  , I5 = t => Gf(t) === "[object Map]"
  , O5 = t => Gf(t) === "[object Set]"
  , aL = t => Gf(t) === "[object RegExp]"
  , He = t => typeof t == "function"
  , nr = t => typeof t == "string"
  , Bt = t => t !== null && typeof t == "object"
  , vp = t => Bt(t) && He(t.then) && He(t.catch)
  , k5 = Object.prototype.toString
  , Gf = t => k5.call(t)
  , lL = t => Gf(t).slice(8, -1)
  , R5 = t => Gf(t) === "[object Object]"
  , y0 = $f(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted")
  , cL = $f("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo")
  , yp = t => {
    const e = Object.create(null);
    return r => e[r] || (e[r] = t(r))
}
  , uL = /-(\w)/g
  , Li = yp(t => t.replace(uL, (e, r) => r ? r.toUpperCase() : ""))
  , fL = /\B([A-Z])/g
  , Gc = yp(t => t.replace(fL, "-$1").toLowerCase())
  , Hc = yp(t => t.charAt(0).toUpperCase() + t.slice(1))
  , Ho = yp(t => t ? `on${Hc(t)}` : "")
  , Sv = (t, e) => !Object.is(t, e)
  , Ua = (t, e) => {
    for (let r = 0; r < t.length; r++)
        t[r](e)
}
  , Tv = (t, e, r) => {
    Object.defineProperty(t, e, {
        configurable: !0,
        enumerable: !1,
        value: r
    })
}
  , dL = t => {
    const e = parseFloat(t);
    return isNaN(e) ? t : e
}
  , hL = t => {
    const e = nr(t) ? Number(t) : NaN;
    return isNaN(e) ? t : e
}
;
let YC;
const ux = () => YC || (YC = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {})
  , xL = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console"
  , pL = $f(xL);
function Hf(t) {
    if (Ve(t)) {
        const e = {};
        for (let r = 0; r < t.length; r++) {
            const n = t[r]
              , i = nr(n) ? yL(n) : Hf(n);
            if (i)
                for (const o in i)
                    e[o] = i[o]
        }
        return e
    } else {
        if (nr(t))
            return t;
        if (Bt(t))
            return t
    }
}
const gL = /;(?![^(]*\))/g
  , mL = /:([^]+)/
  , vL = /\/\*[^]*?\*\//g;
function yL(t) {
    const e = {};
    return t.replace(vL, "").split(gL).forEach(r => {
        if (r) {
            const n = r.split(mL);
            n.length > 1 && (e[n[0].trim()] = n[1].trim())
        }
    }
    ),
    e
}
function Vf(t) {
    let e = "";
    if (nr(t))
        e = t;
    else if (Ve(t))
        for (let r = 0; r < t.length; r++) {
            const n = Vf(t[r]);
            n && (e += n + " ")
        }
    else if (Bt(t))
        for (const r in t)
            t[r] && (e += r + " ");
    return e.trim()
}
function EL(t) {
    if (!t)
        return null;
    let {class: e, style: r} = t;
    return e && !nr(e) && (t.class = Vf(e)),
    r && (t.style = Hf(r)),
    t
}
const _L = t => nr(t) ? t : t == null ? "" : Ve(t) || Bt(t) && (t.toString === k5 || !He(t.toString)) ? JSON.stringify(t, M5, 2) : String(t)
  , M5 = (t, e) => e && e.__v_isRef ? M5(t, e.value) : I5(e) ? {
    [`Map(${e.size})`]: [...e.entries()].reduce( (r, [n,i]) => (r[`${n} =>`] = i,
    r), {})
} : O5(e) ? {
    [`Set(${e.size})`]: [...e.values()]
} : Bt(e) && !Ve(e) && !R5(e) ? String(e) : e
  , rl = [];
function E0(t) {
    rl.push(t)
}
function _0() {
    rl.pop()
}
function ue(t, ...e) {
    Il();
    const r = rl.length ? rl[rl.length - 1].component : null
      , n = r && r.appContext.config.warnHandler
      , i = bL();
    if (n)
        uo(n, r, 11, [t + e.join(""), r && r.proxy, i.map( ({vnode: o}) => `at <${Pp(r, o.type)}>`).join(`
`), i]);
    else {
        const o = [`[Vue warn]: ${t}`, ...e];
        i.length && o.push(`
`, ...CL(i)),
        console.warn(...o)
    }
    Ol()
}
function bL() {
    let t = rl[rl.length - 1];
    if (!t)
        return [];
    const e = [];
    for (; t; ) {
        const r = e[0];
        r && r.vnode === t ? r.recurseCount++ : e.push({
            vnode: t,
            recurseCount: 0
        });
        const n = t.component && t.component.parent;
        t = n && n.vnode
    }
    return e
}
function CL(t) {
    const e = [];
    return t.forEach( (r, n) => {
        e.push(...n === 0 ? [] : [`
`], ...AL(r))
    }
    ),
    e
}
function AL({vnode: t, recurseCount: e}) {
    const r = e > 0 ? `... (${e} recursive calls)` : ""
      , n = t.component ? t.component.parent == null : !1
      , i = ` at <${Pp(t.component, t.type, n)}`
      , o = ">" + r;
    return t.props ? [i, ...wL(t.props), o] : [i + o]
}
function wL(t) {
    const e = []
      , r = Object.keys(t);
    return r.slice(0, 3).forEach(n => {
        e.push(...N5(n, t[n]))
    }
    ),
    r.length > 3 && e.push(" ..."),
    e
}
function N5(t, e, r) {
    return nr(e) ? (e = JSON.stringify(e),
    r ? e : [`${t}=${e}`]) : typeof e == "number" || typeof e == "boolean" || e == null ? r ? e : [`${t}=${e}`] : xt(e) ? (e = N5(t, Le(e.value), !0),
    r ? e : [`${t}=Ref<`, e, ">"]) : He(e) ? [`${t}=fn${e.name ? `<${e.name}>` : ""}`] : (e = Le(e),
    r ? e : [`${t}=`, e])
}
function x_(t, e) {
    t !== void 0 && (typeof t != "number" ? ue(`${e} is not a valid number - got ${JSON.stringify(t)}.`) : isNaN(t) && ue(`${e} is NaN - the duration expression might be incorrect.`))
}
const p_ = {
    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. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
};
function uo(t, e, r, n) {
    let i;
    try {
        i = n ? t(...n) : t()
    } catch (o) {
        Rl(o, e, r)
    }
    return i
}
function zn(t, e, r, n) {
    if (He(t)) {
        const o = uo(t, e, r, n);
        return o && vp(o) && o.catch(s => {
            Rl(s, e, r)
        }
        ),
        o
    }
    const i = [];
    for (let o = 0; o < t.length; o++)
        i.push(zn(t[o], e, r, n));
    return i
}
function Rl(t, e, r, n=!0) {
    const i = e ? e.vnode : null;
    if (e) {
        let o = e.parent;
        const s = e.proxy
          , a = p_[r];
        for (; o; ) {
            const c = o.ec;
            if (c) {
                for (let u = 0; u < c.length; u++)
                    if (c[u](t, s, a) === !1)
                        return
            }
            o = o.parent
        }
        const l = e.appContext.config.errorHandler;
        if (l) {
            uo(l, null, 10, [t, s, a]);
            return
        }
    }
    BL(t, r, i, n)
}
function BL(t, e, r, n=!0) {
    {
        const i = p_[e];
        if (r && E0(r),
        ue(`Unhandled error${i ? ` during execution of ${i}` : ""}`),
        r && _0(),
        n)
            throw t;
        console.error(t)
    }
}
let J0 = !1
  , Dv = !1;
const qr = [];
let oo = 0;
const Pc = [];
let eo = null
  , Os = 0;
const L5 = Promise.resolve();
let g_ = null;
const SL = 100;
function Xe(t) {
    const e = g_ || L5;
    return t ? e.then(this ? t.bind(this) : t) : e
}
function TL(t) {
    let e = oo + 1
      , r = qr.length;
    for (; e < r; ) {
        const n = e + r >>> 1;
        Q0(qr[n]) < t ? e = n + 1 : r = n
    }
    return e
}
function zf(t) {
    (!qr.length || !qr.includes(t, J0 && t.allowRecurse ? oo + 1 : oo)) && (t.id == null ? qr.push(t) : qr.splice(TL(t.id), 0, t),
    $5())
}
function $5() {
    !J0 && !Dv && (Dv = !0,
    g_ = L5.then(U5))
}
function DL(t) {
    const e = qr.indexOf(t);
    e > oo && qr.splice(e, 1)
}
function Ep(t) {
    Ve(t) ? Pc.push(...t) : (!eo || !eo.includes(t, t.allowRecurse ? Os + 1 : Os)) && Pc.push(t),
    $5()
}
function XC(t, e=J0 ? oo + 1 : 0) {
    for (t = t || new Map; e < qr.length; e++) {
        const r = qr[e];
        if (r && r.pre) {
            if (m_(t, r))
                continue;
            qr.splice(e, 1),
            e--,
            r()
        }
    }
}
function fx(t) {
    if (Pc.length) {
        const e = [...new Set(Pc)];
        if (Pc.length = 0,
        eo) {
            eo.push(...e);
            return
        }
        for (eo = e,
        t = t || new Map,
        eo.sort( (r, n) => Q0(r) - Q0(n)),
        Os = 0; Os < eo.length; Os++)
            m_(t, eo[Os]) || eo[Os]();
        eo = null,
        Os = 0
    }
}
const Q0 = t => t.id == null ? 1 / 0 : t.id
  , FL = (t, e) => {
    const r = Q0(t) - Q0(e);
    if (r === 0) {
        if (t.pre && !e.pre)
            return -1;
        if (e.pre && !t.pre)
            return 1
    }
    return r
}
;
function U5(t) {
    Dv = !1,
    J0 = !0,
    t = t || new Map,
    qr.sort(FL);
    const e = r => m_(t, r);
    try {
        for (oo = 0; oo < qr.length; oo++) {
            const r = qr[oo];
            if (r && r.active !== !1) {
                if (e(r))
                    continue;
                uo(r, null, 14)
            }
        }
    } finally {
        oo = 0,
        qr.length = 0,
        fx(t),
        J0 = !1,
        g_ = null,
        (qr.length || Pc.length) && U5(t)
    }
}
function m_(t, e) {
    if (!t.has(e))
        t.set(e, 1);
    else {
        const r = t.get(e);
        if (r > SL) {
            const n = e.ownerInstance
              , i = n && of(n.type);
            return ue(`Maximum recursive updates exceeded${i ? ` in component <${i}>` : ""}. 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.`),
            !0
        } else
            t.set(e, r + 1)
    }
}
let Ks = !1;
const xc = new Set;
ux().__VUE_HMR_RUNTIME__ = {
    createRecord: U1(G5),
    rerender: U1(OL),
    reload: U1(kL)
};
const dl = new Map;
function PL(t) {
    const e = t.type.__hmrId;
    let r = dl.get(e);
    r || (G5(e, t.type),
    r = dl.get(e)),
    r.instances.add(t)
}
function IL(t) {
    dl.get(t.type.__hmrId).instances.delete(t)
}
function G5(t, e) {
    return dl.has(t) ? !1 : (dl.set(t, {
        initialDef: b0(e),
        instances: new Set
    }),
    !0)
}
function b0(t) {
    return PB(t) ? t.__vccOpts : t
}
function OL(t, e) {
    const r = dl.get(t);
    r && (r.initialDef.render = e,
    [...r.instances].forEach(n => {
        e && (n.render = e,
        b0(n.type).render = e),
        n.renderCache = [],
        Ks = !0,
        n.update(),
        Ks = !1
    }
    ))
}
function kL(t, e) {
    const r = dl.get(t);
    if (!r)
        return;
    e = b0(e),
    KC(r.initialDef, e);
    const n = [...r.instances];
    for (const i of n) {
        const o = b0(i.type);
        xc.has(o) || (o !== r.initialDef && KC(o, e),
        xc.add(o)),
        i.appContext.propsCache.delete(i.type),
        i.appContext.emitsCache.delete(i.type),
        i.appContext.optionsCache.delete(i.type),
        i.ceReload ? (xc.add(o),
        i.ceReload(e.styles),
        xc.delete(o)) : i.parent ? zf(i.parent.update) : i.appContext.reload ? i.appContext.reload() : typeof window < "u" ? window.location.reload() : console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")
    }
    Ep( () => {
        for (const i of n)
            xc.delete(b0(i.type))
    }
    )
}
function KC(t, e) {
    Xt(t, e);
    for (const r in t)
        r !== "__file" && !(r in e) && delete t[r]
}
function U1(t) {
    return (e, r) => {
        try {
            return t(e, r)
        } catch (n) {
            console.error(n),
            console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")
        }
    }
}
let Bi, a0 = [], Fv = !1;
function jf(t, ...e) {
    Bi ? Bi.emit(t, ...e) : Fv || a0.push({
        event: t,
        args: e
    })
}
function v_(t, e) {
    var r, n;
    Bi = t,
    Bi ? (Bi.enabled = !0,
    a0.forEach( ({event: i, args: o}) => Bi.emit(i, ...o)),
    a0 = []) : typeof window < "u" && window.HTMLElement && !((n = (r = window.navigator) == null ? void 0 : r.userAgent) != null && n.includes("jsdom")) ? ((e.__VUE_DEVTOOLS_HOOK_REPLAY__ = e.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push(o => {
        v_(o, e)
    }
    ),
    setTimeout( () => {
        Bi || (e.__VUE_DEVTOOLS_HOOK_REPLAY__ = null,
        Fv = !0,
        a0 = [])
    }
    , 3e3)) : (Fv = !0,
    a0 = [])
}
function RL(t, e) {
    jf("app:init", t, e, {
        Fragment: Nt,
        Text: go,
        Comment: tr,
        Static: qs
    })
}
function ML(t) {
    jf("app:unmount", t)
}
const Pv = y_("component:added")
  , H5 = y_("component:updated")
  , NL = y_("component:removed")
  , LL = t => {
    Bi && typeof Bi.cleanupBuffer == "function" && !Bi.cleanupBuffer(t) && NL(t)
}
;
function y_(t) {
    return e => {
        jf(t, e.appContext.app, e.uid, e.parent ? e.parent.uid : void 0, e)
    }
}
const $L = V5("perf:start")
  , UL = V5("perf:end");
function V5(t) {
    return (e, r, n) => {
        jf(t, e.appContext.app, e.uid, e, r, n)
    }
}
function GL(t, e, r) {
    jf("component:emit", t.appContext.app, t, e, r)
}
function HL(t, e, ...r) {
    if (t.isUnmounted)
        return;
    const n = t.vnode.props || Ct;
    {
        const {emitsOptions: u, propsOptions: [f]} = t;
        if (u)
            if (!(e in u))
                (!f || !(Ho(e)in f)) && ue(`Component emitted event "${e}" but it is neither declared in the emits option nor as an "${Ho(e)}" prop.`);
            else {
                const d = u[e];
                He(d) && (d(...r) || ue(`Invalid event arguments: event validation failed for event "${e}".`))
            }
    }
    let i = r;
    const o = e.startsWith("update:")
      , s = o && e.slice(7);
    if (s && s in n) {
        const u = `${s === "modelValue" ? "model" : s}Modifiers`
          , {number: f, trim: d} = n[u] || Ct;
        d && (i = r.map(h => nr(h) ? h.trim() : h)),
        f && (i = r.map(dL))
    }
    GL(t, e, i);
    {
        const u = e.toLowerCase();
        u !== e && n[Ho(u)] && ue(`Event "${u}" is emitted in component ${Pp(t, t.type)} but the handler is registered for "${e}". 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 "${Gc(e)}" instead of "${e}".`)
    }
    let a, l = n[a = Ho(e)] || n[a = Ho(Li(e))];
    !l && o && (l = n[a = Ho(Gc(e))]),
    l && zn(l, t, 6, i);
    const c = n[a + "Once"];
    if (c) {
        if (!t.emitted)
            t.emitted = {};
        else if (t.emitted[a])
            return;
        t.emitted[a] = !0,
        zn(c, t, 6, i)
    }
}
function z5(t, e, r=!1) {
    const n = e.emitsCache
      , i = n.get(t);
    if (i !== void 0)
        return i;
    const o = t.emits;
    let s = {}
      , a = !1;
    if (!He(t)) {
        const l = c => {
            const u = z5(c, e, !0);
            u && (a = !0,
            Xt(s, u))
        }
        ;
        !r && e.mixins.length && e.mixins.forEach(l),
        t.extends && l(t.extends),
        t.mixins && t.mixins.forEach(l)
    }
    return !o && !a ? (Bt(t) && n.set(t, null),
    null) : (Ve(o) ? o.forEach(l => s[l] = null) : Xt(s, o),
    Bt(t) && n.set(t, s),
    s)
}
function _p(t, e) {
    return !t || !Uf(e) ? !1 : (e = e.slice(2).replace(/Once$/, ""),
    lt(t, e[0].toLowerCase() + e.slice(1)) || lt(t, Gc(e)) || lt(t, e))
}
let cr = null
  , bp = null;
function ef(t) {
    const e = cr;
    return cr = t,
    bp = t && t.type.__scopeId || null,
    e
}
function VL(t) {
    bp = t
}
function zL() {
    bp = null
}
const jL = t => E_;
function E_(t, e=cr, r) {
    if (!e || t._n)
        return t;
    const n = (...i) => {
        n._d && $v(-1);
        const o = ef(e);
        let s;
        try {
            s = t(...i)
        } finally {
            ef(o),
            n._d && $v(1)
        }
        return H5(e),
        s
    }
    ;
    return n._n = !0,
    n._c = !0,
    n._d = !0,
    n
}
let Iv = !1;
function dx() {
    Iv = !0
}
function Oh(t) {
    const {type: e, vnode: r, proxy: n, withProxy: i, props: o, propsOptions: [s], slots: a, attrs: l, emit: c, render: u, renderCache: f, data: d, setupState: h, ctx: x, inheritAttrs: y} = t;
    let m, E;
    const g = ef(t);
    Iv = !1;
    try {
        if (r.shapeFlag & 4) {
            const _ = i || n;
            m = Cn(u.call(_, _, f, o, h, d, x)),
            E = l
        } else {
            const _ = e;
            l === o && dx(),
            m = Cn(_.length > 1 ? _(o, {
                get attrs() {
                    return dx(),
                    l
                },
                slots: a,
                emit: c
            }) : _(o, null)),
            E = e.props ? l : YL(l)
        }
    } catch (_) {
        A0.length = 0,
        Rl(_, t, 1),
        m = O(tr)
    }
    let p = m, v;
    if (m.patchFlag > 0 && m.patchFlag & 2048 && ([p,v] = WL(m)),
    E && y !== !1) {
        const _ = Object.keys(E)
          , {shapeFlag: b} = p;
        if (_.length) {
            if (b & 7)
                s && _.some(Bv) && (E = XL(E, s)),
                p = vi(p, E);
            else if (!Iv && p.type !== tr) {
                const C = Object.keys(l)
                  , B = []
                  , T = [];
                for (let A = 0, w = C.length; A < w; A++) {
                    const S = C[A];
                    Uf(S) ? Bv(S) || B.push(S[2].toLowerCase() + S.slice(3)) : T.push(S)
                }
                T.length && ue(`Extraneous non-props attributes (${T.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`),
                B.length && ue(`Extraneous non-emits event listeners (${B.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 && (qC(p) || ue("Runtime directive used on component with non-element root node. The directives will not function as intended."),
    p = vi(p),
    p.dirs = p.dirs ? p.dirs.concat(r.dirs) : r.dirs),
    r.transition && (qC(p) || ue("Component inside <Transition> renders non-element root node that cannot be animated."),
    p.transition = r.transition),
    v ? v(p) : m = p,
    ef(g),
    m
}
const WL = t => {
    const e = t.children
      , r = t.dynamicChildren
      , n = __(e);
    if (!n)
        return [t, void 0];
    const i = e.indexOf(n)
      , o = r ? r.indexOf(n) : -1
      , s = a => {
        e[i] = a,
        r && (o > -1 ? r[o] = a : a.patchFlag > 0 && (t.dynamicChildren = [...r, a]))
    }
    ;
    return [Cn(n), s]
}
;
function __(t) {
    let e;
    for (let r = 0; r < t.length; r++) {
        const n = t[r];
        if (mo(n)) {
            if (n.type !== tr || n.children === "v-if") {
                if (e)
                    return;
                e = n
            }
        } else
            return
    }
    return e
}
const YL = t => {
    let e;
    for (const r in t)
        (r === "class" || r === "style" || Uf(r)) && ((e || (e = {}))[r] = t[r]);
    return e
}
  , XL = (t, e) => {
    const r = {};
    for (const n in t)
        (!Bv(n) || !(n.slice(9)in e)) && (r[n] = t[n]);
    return r
}
  , qC = t => t.shapeFlag & 7 || t.type === tr;
function KL(t, e, r) {
    const {props: n, children: i, component: o} = t
      , {props: s, children: a, patchFlag: l} = e
      , c = o.emitsOptions;
    if ((i || a) && Ks || e.dirs || e.transition)
        return !0;
    if (r && l >= 0) {
        if (l & 1024)
            return !0;
        if (l & 16)
            return n ? ZC(n, s, c) : !!s;
        if (l & 8) {
            const u = e.dynamicProps;
            for (let f = 0; f < u.length; f++) {
                const d = u[f];
                if (s[d] !== n[d] && !_p(c, d))
                    return !0
            }
        }
    } else
        return (i || a) && (!a || !a.$stable) ? !0 : n === s ? !1 : n ? s ? ZC(n, s, c) : !0 : !!s;
    return !1
}
function ZC(t, e, r) {
    const n = Object.keys(e);
    if (n.length !== Object.keys(t).length)
        return !0;
    for (let i = 0; i < n.length; i++) {
        const o = n[i];
        if (e[o] !== t[o] && !_p(r, o))
            return !0
    }
    return !1
}
function b_({vnode: t, parent: e}, r) {
    for (; e && e.subTree === t; )
        (t = e.vnode).el = r,
        e = e.parent
}
const j5 = t => t.__isSuspense
  , qL = {
    name: "Suspense",
    __isSuspense: !0,
    process(t, e, r, n, i, o, s, a, l, c) {
        t == null ? JL(e, r, n, i, o, s, a, l, c) : QL(t, e, r, n, i, s, a, l, c)
    },
    hydrate: e$,
    create: C_,
    normalize: t$
}
  , ZL = qL;
function tf(t, e) {
    const r = t.props && t.props[e];
    He(r) && r()
}
function JL(t, e, r, n, i, o, s, a, l) {
    const {p: c, o: {createElement: u}} = l
      , f = u("div")
      , d = t.suspense = C_(t, i, n, e, f, r, o, s, a, l);
    c(null, d.pendingBranch = t.ssContent, f, null, n, d, o, s),
    d.deps > 0 ? (tf(t, "onPending"),
    tf(t, "onFallback"),
    c(null, t.ssFallback, e, r, n, null, o, s),
    Ic(d, t.ssFallback)) : d.resolve(!1, !0)
}
function QL(t, e, r, n, i, o, s, a, {p: l, um: c, o: {createElement: u}}) {
    const f = e.suspense = t.suspense;
    f.vnode = e,
    e.el = t.el;
    const d = e.ssContent
      , h = e.ssFallback
      , {activeBranch: x, pendingBranch: y, isInFallback: m, isHydrating: E} = f;
    if (y)
        f.pendingBranch = d,
        Si(d, y) ? (l(y, d, f.hiddenContainer, null, i, f, o, s, a),
        f.deps <= 0 ? f.resolve() : m && (l(x, h, r, n, i, null, o, s, a),
        Ic(f, h))) : (f.pendingId++,
        E ? (f.isHydrating = !1,
        f.activeBranch = y) : c(y, i, f),
        f.deps = 0,
        f.effects.length = 0,
        f.hiddenContainer = u("div"),
        m ? (l(null, d, f.hiddenContainer, null, i, f, o, s, a),
        f.deps <= 0 ? f.resolve() : (l(x, h, r, n, i, null, o, s, a),
        Ic(f, h))) : x && Si(d, x) ? (l(x, d, r, n, i, f, o, s, a),
        f.resolve(!0)) : (l(null, d, f.hiddenContainer, null, i, f, o, s, a),
        f.deps <= 0 && f.resolve()));
    else if (x && Si(d, x))
        l(x, d, r, n, i, f, o, s, a),
        Ic(f, d);
    else if (tf(e, "onPending"),
    f.pendingBranch = d,
    f.pendingId++,
    l(null, d, f.hiddenContainer, null, i, f, o, s, a),
    f.deps <= 0)
        f.resolve();
    else {
        const {timeout: g, pendingId: p} = f;
        g > 0 ? setTimeout( () => {
            f.pendingId === p && f.fallback(h)
        }
        , g) : g === 0 && f.fallback(h)
    }
}
let JC = !1;
function C_(t, e, r, n, i, o, s, a, l, c, u=!1) {
    JC || (JC = !0,
    console[console.info ? "info" : "log"]("<Suspense> is an experimental feature and its API will likely change."));
    const {p: f, m: d, um: h, n: x, o: {parentNode: y, remove: m}} = c;
    let E;
    const g = r$(t);
    g && e != null && e.pendingBranch && (E = e.pendingId,
    e.deps++);
    const p = t.props ? hL(t.props.timeout) : void 0;
    x_(p, "Suspense timeout");
    const v = {
        vnode: t,
        parent: e,
        parentComponent: r,
        isSVG: s,
        container: n,
        hiddenContainer: i,
        anchor: o,
        deps: 0,
        pendingId: 0,
        timeout: typeof p == "number" ? p : -1,
        activeBranch: null,
        pendingBranch: null,
        isInFallback: !0,
        isHydrating: u,
        isUnmounted: !1,
        effects: [],
        resolve(_=!1, b=!1) {
            {
                if (!_ && !v.pendingBranch)
                    throw new Error("suspense.resolve() is called without a pending branch.");
                if (v.isUnmounted)
                    throw new Error("suspense.resolve() is called on an already unmounted suspense boundary.")
            }
            const {vnode: C, activeBranch: B, pendingBranch: T, pendingId: A, effects: w, parentComponent: S, container: D} = v;
            if (v.isHydrating)
                v.isHydrating = !1;
            else if (!_) {
                const P = B && T.transition && T.transition.mode === "out-in";
                P && (B.transition.afterLeave = () => {
                    A === v.pendingId && d(T, D, N, 0)
                }
                );
                let {anchor: N} = v;
                B && (N = x(B),
                h(B, S, v, !0)),
                P || d(T, D, N, 0)
            }
            Ic(v, T),
            v.pendingBranch = null,
            v.isInFallback = !1;
            let F = v.parent
              , R = !1;
            for (; F; ) {
                if (F.pendingBranch) {
                    F.effects.push(...w),
                    R = !0;
                    break
                }
                F = F.parent
            }
            R || Ep(w),
            v.effects = [],
            g && e && e.pendingBranch && E === e.pendingId && (e.deps--,
            e.deps === 0 && !b && e.resolve()),
            tf(C, "onResolve")
        },
        fallback(_) {
            if (!v.pendingBranch)
                return;
            const {vnode: b, activeBranch: C, parentComponent: B, container: T, isSVG: A} = v;
            tf(b, "onFallback");
            const w = x(C)
              , S = () => {
                v.isInFallback && (f(null, _, T, w, B, null, A, a, l),
                Ic(v, _))
            }
              , D = _.transition && _.transition.mode === "out-in";
            D && (C.transition.afterLeave = S),
            v.isInFallback = !0,
            h(C, B, null, !0),
            D || S()
        },
        move(_, b, C) {
            v.activeBranch && d(v.activeBranch, _, b, C),
            v.container = _
        },
        next() {
            return v.activeBranch && x(v.activeBranch)
        },
        registerDep(_, b) {
            const C = !!v.pendingBranch;
            C && v.deps++;
            const B = _.vnode.el;
            _.asyncDep.catch(T => {
                Rl(T, _, 0)
            }
            ).then(T => {
                if (_.isUnmounted || v.isUnmounted || v.pendingId !== _.suspenseId)
                    return;
                _.asyncResolved = !0;
                const {vnode: A} = _;
                E0(A),
                Hv(_, T, !1),
                B && (A.el = B);
                const w = !B && _.subTree.el;
                b(_, A, y(B || _.subTree.el), B ? null : x(_.subTree), v, s, l),
                w && m(w),
                b_(_, A.el),
                _0(),
                C && --v.deps === 0 && v.resolve()
            }
            )
        },
        unmount(_, b) {
            v.isUnmounted = !0,
            v.activeBranch && h(v.activeBranch, r, _, b),
            v.pendingBranch && h(v.pendingBranch, r, _, b)
        }
    };
    return v
}
function e$(t, e, r, n, i, o, s, a, l) {
    const c = e.suspense = C_(e, n, r, t.parentNode, document.createElement("div"), null, i, o, s, a, !0)
      , u = l(t, c.pendingBranch = e.ssContent, r, c, o, s);
    return c.deps === 0 && c.resolve(!1, !0),
    u
}
function t$(t) {
    const {shapeFlag: e, children: r} = t
      , n = e & 32;
    t.ssContent = QC(n ? r.default : r),
    t.ssFallback = n ? QC(r.fallback) : O(tr)
}
function QC(t) {
    let e;
    if (He(t)) {
        const r = xl && t._c;
        r && (t._d = !1,
        Sp()),
        t = t(),
        r && (t._d = !0,
        e = Sn,
        _B())
    }
    if (Ve(t)) {
        const r = __(t);
        r || ue("<Suspense> slots expect a single root node."),
        t = r
    }
    return t = Cn(t),
    e && !t.dynamicChildren && (t.dynamicChildren = e.filter(r => r !== t)),
    t
}
function W5(t, e) {
    e && e.pendingBranch ? Ve(t) ? e.effects.push(...t) : e.effects.push(t) : Ep(t)
}
function Ic(t, e) {
    t.activeBranch = e;
    const {vnode: r, parentComponent: n} = t
      , i = r.el = e.el;
    n && n.subTree === r && (n.vnode.el = i,
    b_(n, i))
}
function r$(t) {
    var e;
    return ((e = t.props) == null ? void 0 : e.suspensible) != null && t.props.suspensible !== !1
}
function mu(t, e) {
    return Wf(t, null, e)
}
function Y5(t, e) {
    return Wf(t, null, Xt({}, e, {
        flush: "post"
    }))
}
function n$(t, e) {
    return Wf(t, null, Xt({}, e, {
        flush: "sync"
    }))
}
const Pd = {};
function me(t, e, r) {
    return He(e) || ue("`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."),
    Wf(t, e, r)
}
function Wf(t, e, {immediate: r, deep: n, flush: i, onTrack: o, onTrigger: s}=Ct) {
    var a;
    e || (r !== void 0 && ue('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),
    n !== void 0 && ue('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'));
    const l = _ => {
        ue("Invalid watch source: ", _, "A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")
    }
      , c = Nf() === ((a = lr) == null ? void 0 : a.scope) ? lr : null;
    let u, f = !1, d = !1;
    if (xt(t) ? (u = () => t.value,
    f = K0(t)) : Ri(t) ? (u = () => t,
    n = !0) : Ve(t) ? (d = !0,
    f = t.some(_ => Ri(_) || K0(_)),
    u = () => t.map(_ => {
        if (xt(_))
            return _.value;
        if (Ri(_))
            return za(_);
        if (He(_))
            return uo(_, c, 2);
        l(_)
    }
    )) : He(t) ? e ? u = () => uo(t, c, 2) : u = () => {
        if (!(c && c.isUnmounted))
            return h && h(),
            zn(t, c, 3, [x])
    }
    : (u = Bn,
    l(t)),
    e && n) {
        const _ = u;
        u = () => za(_())
    }
    let h, x = _ => {
        h = p.onStop = () => {
            uo(_, c, 4)
        }
    }
    , y;
    if (zc)
        if (x = Bn,
        e ? r && zn(e, c, 3, [u(), d ? [] : void 0, x]) : u(),
        i === "sync") {
            const _ = OB();
            y = _.__watcherHandles || (_.__watcherHandles = [])
        } else
            return Bn;
    let m = d ? new Array(t.length).fill(Pd) : Pd;
    const E = () => {
        if (p.active)
            if (e) {
                const _ = p.run();
                (n || f || (d ? _.some( (b, C) => Sv(b, m[C])) : Sv(_, m))) && (h && h(),
                zn(e, c, 3, [_, m === Pd ? void 0 : d && m[0] === Pd ? [] : m, x]),
                m = _)
            } else
                p.run()
    }
    ;
    E.allowRecurse = !!e;
    let g;
    i === "sync" ? g = E : i === "post" ? g = () => $r(E, c && c.suspense) : (E.pre = !0,
    c && (E.id = c.uid),
    g = () => zf(E));
    const p = new Lf(u,g);
    p.onTrack = o,
    p.onTrigger = s,
    e ? r ? E() : m = p.run() : i === "post" ? $r(p.run.bind(p), c && c.suspense) : p.run();
    const v = () => {
        p.stop(),
        c && c.scope && h_(c.scope.effects, p)
    }
    ;
    return y && y.push(v),
    v
}
function i$(t, e, r) {
    const n = this.proxy
      , i = nr(t) ? t.includes(".") ? X5(n, t) : () => n[t] : t.bind(n, n);
    let o;
    He(e) ? o = e : (o = e.handler,
    r = e);
    const s = lr;
    oa(this);
    const a = Wf(i, o.bind(n), r);
    return s ? oa(s) : Zs(),
    a
}
function X5(t, e) {
    const r = e.split(".");
    return () => {
        let n = t;
        for (let i = 0; i < r.length && n; i++)
            n = n[r[i]];
        return n
    }
}
function za(t, e) {
    if (!Bt(t) || t.__v_skip || (e = e || new Set,
    e.has(t)))
        return t;
    if (e.add(t),
    xt(t))
        za(t.value, e);
    else if (Ve(t))
        for (let r = 0; r < t.length; r++)
            za(t[r], e);
    else if (O5(t) || I5(t))
        t.forEach(r => {
            za(r, e)
        }
        );
    else if (R5(t))
        for (const r in t)
            za(t[r], e);
    return t
}
function K5(t) {
    cL(t) && ue("Do not use built-in directive ids as custom directive id: " + t)
}
function hi(t, e) {
    const r = cr;
    if (r === null)
        return ue("withDirectives can only be used inside render functions."),
        t;
    const n = Fp(r) || r.proxy
      , i = t.dirs || (t.dirs = []);
    for (let o = 0; o < e.length; o++) {
        let[s,a,l,c=Ct] = e[o];
        s && (He(s) && (s = {
            mounted: s,
            updated: s
        }),
        s.deep && za(a),
        i.push({
            dir: s,
            instance: n,
            value: a,
            oldValue: void 0,
            arg: l,
            modifiers: c
        }))
    }
    return t
}
function ro(t, e, r, n) {
    const i = t.dirs
      , o = e && e.dirs;
    for (let s = 0; s < i.length; s++) {
        const a = i[s];
        o && (a.oldValue = o[s].value);
        let l = a.dir[n];
        l && (Il(),
        zn(l, r, 8, [t.el, a, t, e]),
        Ol())
    }
}
function A_() {
    const t = {
        isMounted: !1,
        isLeaving: !1,
        isUnmounting: !1,
        leavingVNodes: new Map
    };
    return Ht( () => {
        t.isMounted = !0
    }
    ),
    Zn( () => {
        t.isUnmounting = !0
    }
    ),
    t
}
const ti = [Function, Array]
  , w_ = {
    mode: String,
    appear: Boolean,
    persisted: Boolean,
    onBeforeEnter: ti,
    onEnter: ti,
    onAfterEnter: ti,
    onEnterCancelled: ti,
    onBeforeLeave: ti,
    onLeave: ti,
    onAfterLeave: ti,
    onLeaveCancelled: ti,
    onBeforeAppear: ti,
    onAppear: ti,
    onAfterAppear: ti,
    onAppearCancelled: ti
}
  , o$ = {
    name: "BaseTransition",
    props: w_,
    setup(t, {slots: e}) {
        const r = It()
          , n = A_();
        let i;
        return () => {
            const o = e.default && Cp(e.default(), !0);
            if (!o || !o.length)
                return;
            let s = o[0];
            if (o.length > 1) {
                let y = !1;
                for (const m of o)
                    if (m.type !== tr) {
                        if (y) {
                            ue("<transition> can only be used on a single element or component. Use <transition-group> for lists.");
                            break
                        }
                        s = m,
                        y = !0
                    }
            }
            const a = Le(t)
              , {mode: l} = a;
            if (l && l !== "in-out" && l !== "out-in" && l !== "default" && ue(`invalid <transition> mode: ${l}`),
            n.isLeaving)
                return G1(s);
            const c = e8(s);
            if (!c)
                return G1(s);
            const u = Vc(c, a, n, r);
            hl(c, u);
            const f = r.subTree
              , d = f && e8(f);
            let h = !1;
            const {getTransitionKey: x} = c.type;
            if (x) {
                const y = x();
                i === void 0 ? i = y : y !== i && (i = y,
                h = !0)
            }
            if (d && d.type !== tr && (!Si(c, d) || h)) {
                const y = Vc(d, a, n, r);
                if (hl(d, y),
                l === "out-in")
                    return n.isLeaving = !0,
                    y.afterLeave = () => {
                        n.isLeaving = !1,
                        r.update.active !== !1 && r.update()
                    }
                    ,
                    G1(s);
                l === "in-out" && c.type !== tr && (y.delayLeave = (m, E, g) => {
                    const p = Z5(n, d);
                    p[String(d.key)] = d,
                    m._leaveCb = () => {
                        E(),
                        m._leaveCb = void 0,
                        delete u.delayedLeave
                    }
                    ,
                    u.delayedLeave = g
                }
                )
            }
            return s
        }
    }
}
  , q5 = o$;
function Z5(t, e) {
    const {leavingVNodes: r} = t;
    let n = r.get(e.type);
    return n || (n = Object.create(null),
    r.set(e.type, n)),
    n
}
function Vc(t, e, r, n) {
    const {appear: i, mode: o, persisted: s=!1, onBeforeEnter: a, onEnter: l, onAfterEnter: c, onEnterCancelled: u, onBeforeLeave: f, onLeave: d, onAfterLeave: h, onLeaveCancelled: x, onBeforeAppear: y, onAppear: m, onAfterAppear: E, onAppearCancelled: g} = e
      , p = String(t.key)
      , v = Z5(r, t)
      , _ = (B, T) => {
        B && zn(B, n, 9, T)
    }
      , b = (B, T) => {
        const A = T[1];
        _(B, T),
        Ve(B) ? B.every(w => w.length <= 1) && A() : B.length <= 1 && A()
    }
      , C = {
        mode: o,
        persisted: s,
        beforeEnter(B) {
            let T = a;
            if (!r.isMounted)
                if (i)
                    T = y || a;
                else
                    return;
            B._leaveCb && B._leaveCb(!0);
            const A = v[p];
            A && Si(t, A) && A.el._leaveCb && A.el._leaveCb(),
            _(T, [B])
        },
        enter(B) {
            let T = l
              , A = c
              , w = u;
            if (!r.isMounted)
                if (i)
                    T = m || l,
                    A = E || c,
                    w = g || u;
                else
                    return;
            let S = !1;
            const D = B._enterCb = F => {
                S || (S = !0,
                F ? _(w, [B]) : _(A, [B]),
                C.delayedLeave && C.delayedLeave(),
                B._enterCb = void 0)
            }
            ;
            T ? b(T, [B, D]) : D()
        },
        leave(B, T) {
            const A = String(t.key);
            if (B._enterCb && B._enterCb(!0),
            r.isUnmounting)
                return T();
            _(f, [B]);
            let w = !1;
            const S = B._leaveCb = D => {
                w || (w = !0,
                T(),
                D ? _(x, [B]) : _(h, [B]),
                B._leaveCb = void 0,
                v[A] === t && delete v[A])
            }
            ;
            v[A] = t,
            d ? b(d, [B, S]) : S()
        },
        clone(B) {
            return Vc(B, e, r, n)
        }
    };
    return C
}
function G1(t) {
    if (vu(t))
        return t = vi(t),
        t.children = null,
        t
}
function e8(t) {
    return vu(t) ? t.children ? t.children[0] : void 0 : t
}
function hl(t, e) {
    t.shapeFlag & 6 && t.component ? hl(t.component.subTree, e) : t.shapeFlag & 128 ? (t.ssContent.transition = e.clone(t.ssContent),
    t.ssFallback.transition = e.clone(t.ssFallback)) : t.transition = e
}
function Cp(t, e=!1, r) {
    let n = []
      , i = 0;
    for (let o = 0; o < t.length; o++) {
        let s = t[o];
        const a = r == null ? s.key : String(r) + String(s.key != null ? s.key : o);
        s.type === Nt ? (s.patchFlag & 128 && i++,
        n = n.concat(Cp(s.children, e, a))) : (e || s.type !== tr) && n.push(a != null ? vi(s, {
            key: a
        }) : s)
    }
    if (i > 1)
        for (let o = 0; o < n.length; o++)
            n[o].patchFlag = -2;
    return n
}
function be(t, e) {
    return He(t) ? ( () => Xt({
        name: t.name
    }, e, {
        setup: t
    }))() : t
}
const nl = t => !!t.type.__asyncLoader;
function s$(t) {
    He(t) && (t = {
        loader: t
    });
    const {loader: e, loadingComponent: r, errorComponent: n, delay: i=200, timeout: o, suspensible: s=!0, onError: a} = t;
    let l = null, c, u = 0;
    const f = () => (u++,
    l = null,
    d())
      , d = () => {
        let h;
        return l || (h = l = e().catch(x => {
            if (x = x instanceof Error ? x : new Error(String(x)),
            a)
                return new Promise( (y, m) => {
                    a(x, () => y(f()), () => m(x), u + 1)
                }
                );
            throw x
        }
        ).then(x => {
            if (h !== l && l)
                return l;
            if (x || ue("Async component loader resolved to undefined. If you are using retry(), make sure to return its return value."),
            x && (x.__esModule || x[Symbol.toStringTag] === "Module") && (x = x.default),
            x && !Bt(x) && !He(x))
                throw new Error(`Invalid async component load result: ${x}`);
            return c = x,
            x
        }
        ))
    }
    ;
    return be({
        name: "AsyncComponentWrapper",
        __asyncLoader: d,
        get __asyncResolved() {
            return c
        },
        setup() {
            const h = lr;
            if (c)
                return () => H1(c, h);
            const x = g => {
                l = null,
                Rl(g, h, 13, !n)
            }
            ;
            if (s && h.suspense || zc)
                return d().then(g => () => H1(g, h)).catch(g => (x(g),
                () => n ? O(n, {
                    error: g
                }) : null));
            const y = ie(!1)
              , m = ie()
              , E = ie(!!i);
            return i && setTimeout( () => {
                E.value = !1
            }
            , i),
            o != null && setTimeout( () => {
                if (!y.value && !m.value) {
                    const g = new Error(`Async component timed out after ${o}ms.`);
                    x(g),
                    m.value = g
                }
            }
            , o),
            d().then( () => {
                y.value = !0,
                h.parent && vu(h.parent.vnode) && zf(h.parent.update)
            }
            ).catch(g => {
                x(g),
                m.value = g
            }
            ),
            () => {
                if (y.value && c)
                    return H1(c, h);
                if (m.value && n)
                    return O(n, {
                        error: m.value
                    });
                if (r && !E.value)
                    return O(r)
            }
        }
    })
}
function H1(t, e) {
    const {ref: r, props: n, children: i, ce: o} = e.vnode
      , s = O(t, n, i);
    return s.ref = r,
    s.ce = o,
    delete e.vnode.ce,
    s
}
const vu = t => t.type.__isKeepAlive
  , a$ = {
    name: "KeepAlive",
    __isKeepAlive: !0,
    props: {
        include: [String, RegExp, Array],
        exclude: [String, RegExp, Array],
        max: [String, Number]
    },
    setup(t, {slots: e}) {
        const r = It()
          , n = r.ctx;
        if (!n.renderer)
            return () => {
                const g = e.default && e.default();
                return g && g.length === 1 ? g[0] : g
            }
            ;
        const i = new Map
          , o = new Set;
        let s = null;
        r.__v_cache = i;
        const a = r.suspense
          , {renderer: {p: l, m: c, um: u, o: {createElement: f}}} = n
          , d = f("div");
        n.activate = (g, p, v, _, b) => {
            const C = g.component;
            c(g, p, v, 0, a),
            l(C.vnode, g, p, v, C, a, _, g.slotScopeIds, b),
            $r( () => {
                C.isDeactivated = !1,
                C.a && Ua(C.a);
                const B = g.props && g.props.onVnodeMounted;
                B && En(B, C.parent, g)
            }
            , a),
            Pv(C)
        }
        ,
        n.deactivate = g => {
            const p = g.component;
            c(g, d, null, 1, a),
            $r( () => {
                p.da && Ua(p.da);
                const v = g.props && g.props.onVnodeUnmounted;
                v && En(v, p.parent, g),
                p.isDeactivated = !0
            }
            , a),
            Pv(p)
        }
        ;
        function h(g) {
            V1(g),
            u(g, r, a, !0)
        }
        function x(g) {
            i.forEach( (p, v) => {
                const _ = of(p.type);
                _ && (!g || !g(_)) && y(v)
            }
            )
        }
        function y(g) {
            const p = i.get(g);
            !s || !Si(p, s) ? h(p) : s && V1(s),
            i.delete(g),
            o.delete(g)
        }
        me( () => [t.include, t.exclude], ([g,p]) => {
            g && x(v => l0(g, v)),
            p && x(v => !l0(p, v))
        }
        , {
            flush: "post",
            deep: !0
        });
        let m = null;
        const E = () => {
            m != null && i.set(m, z1(r.subTree))
        }
        ;
        return Ht(E),
        Ml(E),
        Zn( () => {
            i.forEach(g => {
                const {subTree: p, suspense: v} = r
                  , _ = z1(p);
                if (g.type === _.type && g.key === _.key) {
                    V1(_);
                    const b = _.component.da;
                    b && $r(b, v);
                    return
                }
                h(g)
            }
            )
        }
        ),
        () => {
            if (m = null,
            !e.default)
                return null;
            const g = e.default()
              , p = g[0];
            if (g.length > 1)
                return ue("KeepAlive should contain exactly one component child."),
                s = null,
                g;
            if (!mo(p) || !(p.shapeFlag & 4) && !(p.shapeFlag & 128))
                return s = null,
                p;
            let v = z1(p);
            const _ = v.type
              , b = of(nl(v) ? v.type.__asyncResolved || {} : _)
              , {include: C, exclude: B, max: T} = t;
            if (C && (!b || !l0(C, b)) || B && b && l0(B, b))
                return s = v,
                p;
            const A = v.key == null ? _ : v.key
              , w = i.get(A);
            return v.el && (v = vi(v),
            p.shapeFlag & 128 && (p.ssContent = v)),
            m = A,
            w ? (v.el = w.el,
            v.component = w.component,
            v.transition && hl(v, v.transition),
            v.shapeFlag |= 512,
            o.delete(A),
            o.add(A)) : (o.add(A),
            T && o.size > parseInt(T, 10) && y(o.values().next().value)),
            v.shapeFlag |= 256,
            s = v,
            j5(p.type) ? p : v
        }
    }
}
  , l$ = a$;
function l0(t, e) {
    return Ve(t) ? t.some(r => l0(r, e)) : nr(t) ? t.split(",").includes(e) : aL(t) ? t.test(e) : !1
}
function gs(t, e) {
    J5(t, "a", e)
}
function wo(t, e) {
    J5(t, "da", e)
}
function J5(t, e, r=lr) {
    const n = t.__wdc || (t.__wdc = () => {
        let i = r;
        for (; i; ) {
            if (i.isDeactivated)
                return;
            i = i.parent
        }
        return t()
    }
    );
    if (Ap(e, n, r),
    r) {
        let i = r.parent;
        for (; i && i.parent; )
            vu(i.parent.vnode) && c$(n, e, r, i),
            i = i.parent
    }
}
function c$(t, e, r, n) {
    const i = Ap(e, t, n, !0);
    vs( () => {
        h_(n[e], i)
    }
    , r)
}
function V1(t) {
    t.shapeFlag &= -257,
    t.shapeFlag &= -513
}
function z1(t) {
    return t.shapeFlag & 128 ? t.ssContent : t
}
function Ap(t, e, r=lr, n=!1) {
    if (r) {
        const i = r[t] || (r[t] = [])
          , o = e.__weh || (e.__weh = (...s) => {
            if (r.isUnmounted)
                return;
            Il(),
            oa(r);
            const a = zn(e, r, t, s);
            return Zs(),
            Ol(),
            a
        }
        );
        return n ? i.unshift(o) : i.push(o),
        o
    } else {
        const i = Ho(p_[t].replace(/ hook$/, ""));
        ue(`${i} 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 ms = t => (e, r=lr) => (!zc || t === "sp") && Ap(t, (...n) => e(...n), r)
  , Q5 = ms("bm")
  , Ht = ms("m")
  , wp = ms("bu")
  , Ml = ms("u")
  , Zn = ms("bum")
  , vs = ms("um")
  , eB = ms("sp")
  , tB = ms("rtg")
  , rB = ms("rtc");
function nB(t, e=lr) {
    Ap("ec", t, e)
}
const hx = "components"
  , u$ = "directives";
function f$(t, e) {
    return B_(hx, t, !0, e) || t
}
const iB = Symbol.for("v-ndc");
function d$(t) {
    return nr(t) ? B_(hx, t, !1) || t : t || iB
}
function oB(t) {
    return B_(u$, t)
}
function B_(t, e, r=!0, n=!1) {
    const i = cr || lr;
    if (i) {
        const o = i.type;
        if (t === hx) {
            const a = of(o, !1);
            if (a && (a === e || a === Li(e) || a === Hc(Li(e))))
                return o
        }
        const s = t8(i[t] || o[t], e) || t8(i.appContext[t], e);
        if (!s && n)
            return o;
        if (r && !s) {
            const a = t === hx ? `
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : "";
            ue(`Failed to resolve ${t.slice(0, -1)}: ${e}${a}`)
        }
        return s
    } else
        ue(`resolve${Hc(t.slice(0, -1))} can only be used in render() or setup().`)
}
function t8(t, e) {
    return t && (t[e] || t[Li(e)] || t[Hc(Li(e))])
}
function h$(t, e, r, n) {
    let i;
    const o = r && r[n];
    if (Ve(t) || nr(t)) {
        i = new Array(t.length);
        for (let s = 0, a = t.length; s < a; s++)
            i[s] = e(t[s], s, void 0, o && o[s])
    } else if (typeof t == "number") {
        Number.isInteger(t) || ue(`The v-for range expect an integer value but got ${t}.`),
        i = new Array(t);
        for (let s = 0; s < t; s++)
            i[s] = e(s + 1, s, void 0, o && o[s])
    } else if (Bt(t))
        if (t[Symbol.iterator])
            i = Array.from(t, (s, a) => e(s, a, void 0, o && o[a]));
        else {
            const s = Object.keys(t);
            i = new Array(s.length);
            for (let a = 0, l = s.length; a < l; a++) {
                const c = s[a];
                i[a] = e(t[c], c, a, o && o[a])
            }
        }
    else
        i = [];
    return r && (r[n] = i),
    i
}
function x$(t, e) {
    for (let r = 0; r < e.length; r++) {
        const n = e[r];
        if (Ve(n))
            for (let i = 0; i < n.length; i++)
                t[n[i].name] = n[i].fn;
        else
            n && (t[n.name] = n.key ? (...i) => {
                const o = n.fn(...i);
                return o && (o.key = n.key),
                o
            }
            : n.fn)
    }
    return t
}
function p$(t, e, r={}, n, i) {
    if (cr.isCE || cr.parent && nl(cr.parent) && cr.parent.isCE)
        return e !== "default" && (r.name = e),
        O("slot", r, n && n());
    let o = t[e];
    o && o.length > 1 && (ue("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),
    Sp();
    const s = o && sB(o(r))
      , a = F_(Nt, {
        key: r.key || s && s.key || `_${e}`
    }, s || (n ? n() : []), s && t._ === 1 ? 64 : -2);
    return !i && a.scopeId && (a.slotScopeIds = [a.scopeId + "-s"]),
    o && o._c && (o._d = !0),
    a
}
function sB(t) {
    return t.some(e => mo(e) ? !(e.type === tr || e.type === Nt && !sB(e.children)) : !0) ? t : null
}
function g$(t, e) {
    const r = {};
    if (!Bt(t))
        return ue("v-on with no argument expects an object value."),
        r;
    for (const n in t)
        r[e && /[A-Z]/.test(n) ? `on:${n}` : Ho(n)] = t[n];
    return r
}
const Ov = t => t ? SB(t) ? Fp(t) || t.proxy : Ov(t.parent) : null
  , il = Xt(Object.create(null), {
    $: t => t,
    $el: t => t.vnode.el,
    $data: t => t.data,
    $props: t => Ec(t.props),
    $attrs: t => Ec(t.attrs),
    $slots: t => Ec(t.slots),
    $refs: t => Ec(t.refs),
    $parent: t => Ov(t.parent),
    $root: t => Ov(t.root),
    $emit: t => t.emit,
    $options: t => T_(t),
    $forceUpdate: t => t.f || (t.f = () => zf(t.update)),
    $nextTick: t => t.n || (t.n = Xe.bind(t.proxy)),
    $watch: t => i$.bind(t)
})
  , S_ = t => t === "_" || t === "$"
  , j1 = (t, e) => t !== Ct && !t.__isScriptSetup && lt(t, e)
  , C0 = {
    get({_: t}, e) {
        const {ctx: r, setupState: n, data: i, props: o, accessCache: s, type: a, appContext: l} = t;
        if (e === "__isVue")
            return !0;
        let c;
        if (e[0] !== "$") {
            const h = s[e];
            if (h !== void 0)
                switch (h) {
                case 1:
                    return n[e];
                case 2:
                    return i[e];
                case 4:
                    return r[e];
                case 3:
                    return o[e]
                }
            else {
                if (j1(n, e))
                    return s[e] = 1,
                    n[e];
                if (i !== Ct && lt(i, e))
                    return s[e] = 2,
                    i[e];
                if ((c = t.propsOptions[0]) && lt(c, e))
                    return s[e] = 3,
                    o[e];
                if (r !== Ct && lt(r, e))
                    return s[e] = 4,
                    r[e];
                kv && (s[e] = 0)
            }
        }
        const u = il[e];
        let f, d;
        if (u)
            return e === "$attrs" ? (tn(t, "get", e),
            dx()) : e === "$slots" && tn(t, "get", e),
            u(t);
        if ((f = a.__cssModules) && (f = f[e]))
            return f;
        if (r !== Ct && lt(r, e))
            return s[e] = 4,
            r[e];
        if (d = l.config.globalProperties,
        lt(d, e))
            return d[e];
        cr && (!nr(e) || e.indexOf("__v") !== 0) && (i !== Ct && S_(e[0]) && lt(i, e) ? ue(`Property ${JSON.stringify(e)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`) : t === cr && ue(`Property ${JSON.stringify(e)} was accessed during render but is not defined on instance.`))
    },
    set({_: t}, e, r) {
        const {data: n, setupState: i, ctx: o} = t;
        return j1(i, e) ? (i[e] = r,
        !0) : i.__isScriptSetup && lt(i, e) ? (ue(`Cannot mutate <script setup> binding "${e}" from Options API.`),
        !1) : n !== Ct && lt(n, e) ? (n[e] = r,
        !0) : lt(t.props, e) ? (ue(`Attempting to mutate prop "${e}". Props are readonly.`),
        !1) : e[0] === "$" && e.slice(1)in t ? (ue(`Attempting to mutate public property "${e}". Properties starting with $ are reserved and readonly.`),
        !1) : (e in t.appContext.config.globalProperties ? Object.defineProperty(o, e, {
            enumerable: !0,
            configurable: !0,
            value: r
        }) : o[e] = r,
        !0)
    },
    has({_: {data: t, setupState: e, accessCache: r, ctx: n, appContext: i, propsOptions: o}}, s) {
        let a;
        return !!r[s] || t !== Ct && lt(t, s) || j1(e, s) || (a = o[0]) && lt(a, s) || lt(n, s) || lt(il, s) || lt(i.config.globalProperties, s)
    },
    defineProperty(t, e, r) {
        return r.get != null ? t._.accessCache[e] = 0 : lt(r, "value") && this.set(t, e, r.value, null),
        Reflect.defineProperty(t, e, r)
    }
};
C0.ownKeys = t => (ue("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(t));
const m$ = Xt({}, C0, {
    get(t, e) {
        if (e !== Symbol.unscopables)
            return C0.get(t, e, t)
    },
    has(t, e) {
        const r = e[0] !== "_" && !pL(e);
        return !r && C0.has(t, e) && ue(`Property ${JSON.stringify(e)} should not start with _ which is a reserved prefix for Vue internals.`),
        r
    }
});
function v$(t) {
    const e = {};
    return Object.defineProperty(e, "_", {
        configurable: !0,
        enumerable: !1,
        get: () => t
    }),
    Object.keys(il).forEach(r => {
        Object.defineProperty(e, r, {
            configurable: !0,
            enumerable: !1,
            get: () => il[r](t),
            set: Bn
        })
    }
    ),
    e
}
function y$(t) {
    const {ctx: e, propsOptions: [r]} = t;
    r && Object.keys(r).forEach(n => {
        Object.defineProperty(e, n, {
            enumerable: !0,
            configurable: !0,
            get: () => t.props[n],
            set: Bn
        })
    }
    )
}
function E$(t) {
    const {ctx: e, setupState: r} = t;
    Object.keys(Le(r)).forEach(n => {
        if (!r.__isScriptSetup) {
            if (S_(n[0])) {
                ue(`setup() return property ${JSON.stringify(n)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);
                return
            }
            Object.defineProperty(e, n, {
                enumerable: !0,
                configurable: !0,
                get: () => r[n],
                set: Bn
            })
        }
    }
    )
}
const Nl = t => ue(`${t}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`);
function _$() {
    return Nl("defineProps"),
    null
}
function b$() {
    return Nl("defineEmits"),
    null
}
function C$(t) {
    Nl("defineExpose")
}
function A$(t) {
    Nl("defineOptions")
}
function w$() {
    return Nl("defineSlots"),
    null
}
function B$() {
    Nl("defineModel")
}
function S$(t, e) {
    return Nl("withDefaults"),
    null
}
function T$() {
    return aB().slots
}
function D$() {
    return aB().attrs
}
function F$(t, e, r) {
    const n = It();
    if (!n)
        return ue("useModel() called without active instance."),
        ie();
    if (!n.propsOptions[0][e])
        return ue(`useModel() called with prop "${e}" which is not declared.`),
        ie();
    if (r && r.local) {
        const i = ie(t[e]);
        return me( () => t[e], o => i.value = o),
        me(i, o => {
            o !== t[e] && n.emit(`update:${e}`, o)
        }
        ),
        i
    } else
        return {
            __v_isRef: !0,
            get value() {
                return t[e]
            },
            set value(i) {
                n.emit(`update:${e}`, i)
            }
        }
}
function aB() {
    const t = It();
    return t || ue("useContext() called without active instance."),
    t.setupContext || (t.setupContext = FB(t))
}
function rf(t) {
    return Ve(t) ? t.reduce( (e, r) => (e[r] = null,
    e), {}) : t
}
function P$(t, e) {
    const r = rf(t);
    for (const n in e) {
        if (n.startsWith("__skip"))
            continue;
        let i = r[n];
        i ? Ve(i) || He(i) ? i = r[n] = {
            type: i,
            default: e[n]
        } : i.default = e[n] : i === null ? i = r[n] = {
            default: e[n]
        } : ue(`props default key "${n}" has no corresponding declaration.`),
        i && e[`__skip_${n}`] && (i.skipFactory = !0)
    }
    return r
}
function I$(t, e) {
    return !t || !e ? t || e : Ve(t) && Ve(e) ? t.concat(e) : Xt({}, rf(t), rf(e))
}
function O$(t, e) {
    const r = {};
    for (const n in t)
        e.includes(n) || Object.defineProperty(r, n, {
            enumerable: !0,
            get: () => t[n]
        });
    return r
}
function k$(t) {
    const e = It();
    e || ue("withAsyncContext called without active current instance. This is likely a bug.");
    let r = t();
    return Zs(),
    vp(r) && (r = r.catch(n => {
        throw oa(e),
        n
    }
    )),
    [r, () => oa(e)]
}
function R$() {
    const t = Object.create(null);
    return (e, r) => {
        t[r] ? ue(`${e} property "${r}" is already defined in ${t[r]}.`) : t[r] = e
    }
}
let kv = !0;
function M$(t) {
    const e = T_(t)
      , r = t.proxy
      , n = t.ctx;
    kv = !1,
    e.beforeCreate && r8(e.beforeCreate, t, "bc");
    const {data: i, computed: o, methods: s, watch: a, provide: l, inject: c, created: u, beforeMount: f, mounted: d, beforeUpdate: h, updated: x, activated: y, deactivated: m, beforeDestroy: E, beforeUnmount: g, destroyed: p, unmounted: v, render: _, renderTracked: b, renderTriggered: C, errorCaptured: B, serverPrefetch: T, expose: A, inheritAttrs: w, components: S, directives: D, filters: F} = e
      , R = R$();
    {
        const [N] = t.propsOptions;
        if (N)
            for (const j in N)
                R("Props", j)
    }
    if (c && N$(c, n, R),
    s)
        for (const N in s) {
            const j = s[N];
            He(j) ? (Object.defineProperty(n, N, {
                value: j.bind(r),
                configurable: !0,
                enumerable: !0,
                writable: !0
            }),
            R("Methods", N)) : ue(`Method "${N}" has type "${typeof j}" in the component definition. Did you reference the function correctly?`)
        }
    if (i) {
        He(i) || ue("The data option must be a function. Plain object usage is no longer supported.");
        const N = i.call(r, r);
        if (vp(N) && ue("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),
        !Bt(N))
            ue("data() should return an object.");
        else {
            t.data = Pt(N);
            for (const j in N)
                R("Data", j),
                S_(j[0]) || Object.defineProperty(n, j, {
                    configurable: !0,
                    enumerable: !0,
                    get: () => N[j],
                    set: Bn
                })
        }
    }
    if (kv = !0,
    o)
        for (const N in o) {
            const j = o[N]
              , K = He(j) ? j.bind(r, r) : He(j.get) ? j.get.bind(r, r) : Bn;
            K === Bn && ue(`Computed property "${N}" has no getter.`);
            const oe = !He(j) && He(j.set) ? j.set.bind(r) : () => {
                ue(`Write operation failed: computed property "${N}" is readonly.`)
            }
              , U = ae({
                get: K,
                set: oe
            });
            Object.defineProperty(n, N, {
                enumerable: !0,
                configurable: !0,
                get: () => U.value,
                set: $ => U.value = $
            }),
            R("Computed", N)
        }
    if (a)
        for (const N in a)
            lB(a[N], n, r, N);
    if (l) {
        const N = He(l) ? l.call(r) : l;
        Reflect.ownKeys(N).forEach(j => {
            xi(j, N[j])
        }
        )
    }
    u && r8(u, t, "c");
    function P(N, j) {
        Ve(j) ? j.forEach(K => N(K.bind(r))) : j && N(j.bind(r))
    }
    if (P(Q5, f),
    P(Ht, d),
    P(wp, h),
    P(Ml, x),
    P(gs, y),
    P(wo, m),
    P(nB, B),
    P(rB, b),
    P(tB, C),
    P(Zn, g),
    P(vs, v),
    P(eB, T),
    Ve(A))
        if (A.length) {
            const N = t.exposed || (t.exposed = {});
            A.forEach(j => {
                Object.defineProperty(N, j, {
                    get: () => r[j],
                    set: K => r[j] = K
                })
            }
            )
        } else
            t.exposed || (t.exposed = {});
    _ && t.render === Bn && (t.render = _),
    w != null && (t.inheritAttrs = w),
    S && (t.components = S),
    D && (t.directives = D)
}
function N$(t, e, r=Bn) {
    Ve(t) && (t = Rv(t));
    for (const n in t) {
        const i = t[n];
        let o;
        Bt(i) ? "default"in i ? o = dr(i.from || n, i.default, !0) : o = dr(i.from || n) : o = dr(i),
        xt(o) ? Object.defineProperty(e, n, {
            enumerable: !0,
            configurable: !0,
            get: () => o.value,
            set: s => o.value = s
        }) : e[n] = o,
        r("Inject", n)
    }
}
function r8(t, e, r) {
    zn(Ve(t) ? t.map(n => n.bind(e.proxy)) : t.bind(e.proxy), e, r)
}
function lB(t, e, r, n) {
    const i = n.includes(".") ? X5(r, n) : () => r[n];
    if (nr(t)) {
        const o = e[t];
        He(o) ? me(i, o) : ue(`Invalid watch handler specified by key "${t}"`, o)
    } else if (He(t))
        me(i, t.bind(r));
    else if (Bt(t))
        if (Ve(t))
            t.forEach(o => lB(o, e, r, n));
        else {
            const o = He(t.handler) ? t.handler.bind(r) : e[t.handler];
            He(o) ? me(i, o, t) : ue(`Invalid watch handler specified by key "${t.handler}"`, o)
        }
    else
        ue(`Invalid watch option: "${n}"`, t)
}
function T_(t) {
    const e = t.type
      , {mixins: r, extends: n} = e
      , {mixins: i, optionsCache: o, config: {optionMergeStrategies: s}} = t.appContext
      , a = o.get(e);
    let l;
    return a ? l = a : !i.length && !r && !n ? l = e : (l = {},
    i.length && i.forEach(c => xx(l, c, s, !0)),
    xx(l, e, s)),
    Bt(e) && o.set(e, l),
    l
}
function xx(t, e, r, n=!1) {
    const {mixins: i, extends: o} = e;
    o && xx(t, o, r, !0),
    i && i.forEach(s => xx(t, s, r, !0));
    for (const s in e)
        if (n && s === "expose")
            ue('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');
        else {
            const a = L$[s] || r && r[s];
            t[s] = a ? a(t[s], e[s]) : e[s]
        }
    return t
}
const L$ = {
    data: n8,
    props: i8,
    emits: i8,
    methods: c0,
    computed: c0,
    beforeCreate: an,
    created: an,
    beforeMount: an,
    mounted: an,
    beforeUpdate: an,
    updated: an,
    beforeDestroy: an,
    beforeUnmount: an,
    destroyed: an,
    unmounted: an,
    activated: an,
    deactivated: an,
    errorCaptured: an,
    serverPrefetch: an,
    components: c0,
    directives: c0,
    watch: U$,
    provide: n8,
    inject: $$
};
function n8(t, e) {
    return e ? t ? function() {
        return Xt(He(t) ? t.call(this, this) : t, He(e) ? e.call(this, this) : e)
    }
    : e : t
}
function $$(t, e) {
    return c0(Rv(t), Rv(e))
}
function Rv(t) {
    if (Ve(t)) {
        const e = {};
        for (let r = 0; r < t.length; r++)
            e[t[r]] = t[r];
        return e
    }
    return t
}
function an(t, e) {
    return t ? [...new Set([].concat(t, e))] : e
}
function c0(t, e) {
    return t ? Xt(Object.create(null), t, e) : e
}
function i8(t, e) {
    return t ? Ve(t) && Ve(e) ? [...new Set([...t, ...e])] : Xt(Object.create(null), rf(t), rf(e ?? {})) : e
}
function U$(t, e) {
    if (!t)
        return e;
    if (!e)
        return t;
    const r = Xt(Object.create(null), t);
    for (const n in e)
        r[n] = an(t[n], e[n]);
    return r
}
function cB() {
    return {
        app: null,
        config: {
            isNativeTag: P5,
            performance: !1,
            globalProperties: {},
            optionMergeStrategies: {},
            errorHandler: void 0,
            warnHandler: void 0,
            compilerOptions: {}
        },
        mixins: [],
        components: {},
        directives: {},
        provides: Object.create(null),
        optionsCache: new WeakMap,
        propsCache: new WeakMap,
        emitsCache: new WeakMap
    }
}
let G$ = 0;
function H$(t, e) {
    return function(n, i=null) {
        He(n) || (n = Xt({}, n)),
        i != null && !Bt(i) && (ue("root props passed to app.mount() must be an object."),
        i = null);
        const o = cB();
        Object.defineProperty(o.config, "unwrapInjectedRef", {
            get() {
                return !0
            },
            set() {
                ue("app.config.unwrapInjectedRef has been deprecated. 3.3 now alawys unwraps injected refs in Options API.")
            }
        });
        const s = new Set;
        let a = !1;
        const l = o.app = {
            _uid: G$++,
            _component: n,
            _props: i,
            _container: null,
            _context: o,
            _instance: null,
            version: zv,
            get config() {
                return o.config
            },
            set config(c) {
                ue("app.config cannot be replaced. Modify individual options instead.")
            },
            use(c, ...u) {
                return s.has(c) ? ue("Plugin has already been applied to target app.") : c && He(c.install) ? (s.add(c),
                c.install(l, ...u)) : He(c) ? (s.add(c),
                c(l, ...u)) : ue('A plugin must either be a function or an object with an "install" function.'),
                l
            },
            mixin(c) {
                return o.mixins.includes(c) ? ue("Mixin has already been applied to target app" + (c.name ? `: ${c.name}` : "")) : o.mixins.push(c),
                l
            },
            component(c, u) {
                return Gv(c, o.config),
                u ? (o.components[c] && ue(`Component "${c}" has already been registered in target app.`),
                o.components[c] = u,
                l) : o.components[c]
            },
            directive(c, u) {
                return K5(c),
                u ? (o.directives[c] && ue(`Directive "${c}" has already been registered in target app.`),
                o.directives[c] = u,
                l) : o.directives[c]
            },
            mount(c, u, f) {
                if (a)
                    ue("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 {
                    c.__vue_app__ && ue("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 d = O(n, i);
                    return d.appContext = o,
                    o.reload = () => {
                        t(vi(d), c, f)
                    }
                    ,
                    u && e ? e(d, c) : t(d, c, f),
                    a = !0,
                    l._container = c,
                    c.__vue_app__ = l,
                    l._instance = d.component,
                    RL(l, zv),
                    Fp(d.component) || d.component.proxy
                }
            },
            unmount() {
                a ? (t(null, l._container),
                l._instance = null,
                ML(l),
                delete l._container.__vue_app__) : ue("Cannot unmount an app that is not mounted.")
            },
            provide(c, u) {
                return c in o.provides && ue(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`),
                o.provides[c] = u,
                l
            },
            runWithContext(c) {
                nf = l;
                try {
                    return c()
                } finally {
                    nf = null
                }
            }
        };
        return l
    }
}
let nf = null;
function xi(t, e) {
    if (!lr)
        ue("provide() can only be used inside setup().");
    else {
        let r = lr.provides;
        const n = lr.parent && lr.parent.provides;
        n === r && (r = lr.provides = Object.create(n)),
        r[t] = e
    }
}
function dr(t, e, r=!1) {
    const n = lr || cr;
    if (n || nf) {
        const i = n ? n.parent == null ? n.vnode.appContext && n.vnode.appContext.provides : n.parent.provides : nf._context.provides;
        if (i && t in i)
            return i[t];
        if (arguments.length > 1)
            return r && He(e) ? e.call(n && n.proxy) : e;
        ue(`injection "${String(t)}" not found.`)
    } else
        ue("inject() can only be used inside setup() or functional components.")
}
function uB() {
    return !!(lr || cr || nf)
}
function V$(t, e, r, n=!1) {
    const i = {}
      , o = {};
    Tv(o, Tp, 1),
    t.propsDefaults = Object.create(null),
    fB(t, e, i, o);
    for (const s in t.propsOptions[0])
        s in i || (i[s] = void 0);
    hB(e || {}, i, t),
    r ? t.props = n ? i : S5(i) : t.type.props ? t.props = i : t.props = o,
    t.attrs = o
}
function z$(t) {
    for (; t; ) {
        if (t.type.__hmrId)
            return !0;
        t = t.parent
    }
}
function j$(t, e, r, n) {
    const {props: i, attrs: o, vnode: {patchFlag: s}} = t
      , a = Le(i)
      , [l] = t.propsOptions;
    let c = !1;
    if (!z$(t) && (n || s > 0) && !(s & 16)) {
        if (s & 8) {
            const u = t.vnode.dynamicProps;
            for (let f = 0; f < u.length; f++) {
                let d = u[f];
                if (_p(t.emitsOptions, d))
                    continue;
                const h = e[d];
                if (l)
                    if (lt(o, d))
                        h !== o[d] && (o[d] = h,
                        c = !0);
                    else {
                        const x = Li(d);
                        i[x] = Mv(l, a, x, h, t, !1)
                    }
                else
                    h !== o[d] && (o[d] = h,
                    c = !0)
            }
        }
    } else {
        fB(t, e, i, o) && (c = !0);
        let u;
        for (const f in a)
            (!e || !lt(e, f) && ((u = Gc(f)) === f || !lt(e, u))) && (l ? r && (r[f] !== void 0 || r[u] !== void 0) && (i[f] = Mv(l, a, f, void 0, t, !0)) : delete i[f]);
        if (o !== a)
            for (const f in o)
                (!e || !lt(e, f)) && (delete o[f],
                c = !0)
    }
    c && po(t, "set", "$attrs"),
    hB(e || {}, i, t)
}
function fB(t, e, r, n) {
    const [i,o] = t.propsOptions;
    let s = !1, a;
    if (e)
        for (let l in e) {
            if (y0(l))
                continue;
            const c = e[l];
            let u;
            i && lt(i, u = Li(l)) ? !o || !o.includes(u) ? r[u] = c : (a || (a = {}))[u] = c : _p(t.emitsOptions, l) || (!(l in n) || c !== n[l]) && (n[l] = c,
            s = !0)
        }
    if (o) {
        const l = Le(r)
          , c = a || Ct;
        for (let u = 0; u < o.length; u++) {
            const f = o[u];
            r[f] = Mv(i, l, f, c[f], t, !lt(c, f))
        }
    }
    return s
}
function Mv(t, e, r, n, i, o) {
    const s = t[r];
    if (s != null) {
        const a = lt(s, "default");
        if (a && n === void 0) {
            const l = s.default;
            if (s.type !== Function && !s.skipFactory && He(l)) {
                const {propsDefaults: c} = i;
                r in c ? n = c[r] : (oa(i),
                n = c[r] = l.call(null, e),
                Zs())
            } else
                n = l
        }
        s[0] && (o && !a ? n = !1 : s[1] && (n === "" || n === Gc(r)) && (n = !0))
    }
    return n
}
function dB(t, e, r=!1) {
    const n = e.propsCache
      , i = n.get(t);
    if (i)
        return i;
    const o = t.props
      , s = {}
      , a = [];
    let l = !1;
    if (!He(t)) {
        const u = f => {
            l = !0;
            const [d,h] = dB(f, e, !0);
            Xt(s, d),
            h && a.push(...h)
        }
        ;
        !r && e.mixins.length && e.mixins.forEach(u),
        t.extends && u(t.extends),
        t.mixins && t.mixins.forEach(u)
    }
    if (!o && !l)
        return Bt(t) && n.set(t, Fc),
        Fc;
    if (Ve(o))
        for (let u = 0; u < o.length; u++) {
            nr(o[u]) || ue("props must be strings when using array syntax.", o[u]);
            const f = Li(o[u]);
            o8(f) && (s[f] = Ct)
        }
    else if (o) {
        Bt(o) || ue("invalid props options", o);
        for (const u in o) {
            const f = Li(u);
            if (o8(f)) {
                const d = o[u]
                  , h = s[f] = Ve(d) || He(d) ? {
                    type: d
                } : Xt({}, d);
                if (h) {
                    const x = a8(Boolean, h.type)
                      , y = a8(String, h.type);
                    h[0] = x > -1,
                    h[1] = y < 0 || x < y,
                    (x > -1 || lt(h, "default")) && a.push(f)
                }
            }
        }
    }
    const c = [s, a];
    return Bt(t) && n.set(t, c),
    c
}
function o8(t) {
    return t[0] !== "$" ? !0 : (ue(`Invalid prop name: "${t}" is a reserved property.`),
    !1)
}
function Nv(t) {
    const e = t && t.toString().match(/^\s*(function|class) (\w+)/);
    return e ? e[2] : t === null ? "null" : ""
}
function s8(t, e) {
    return Nv(t) === Nv(e)
}
function a8(t, e) {
    return Ve(e) ? e.findIndex(r => s8(r, t)) : He(e) && s8(e, t) ? 0 : -1
}
function hB(t, e, r) {
    const n = Le(e)
      , i = r.propsOptions[0];
    for (const o in i) {
        let s = i[o];
        s != null && W$(o, n[o], s, !lt(t, o) && !lt(t, Gc(o)))
    }
}
function W$(t, e, r, n) {
    const {type: i, required: o, validator: s, skipCheck: a} = r;
    if (o && n) {
        ue('Missing required prop: "' + t + '"');
        return
    }
    if (!(e == null && !o)) {
        if (i != null && i !== !0 && !a) {
            let l = !1;
            const c = Ve(i) ? i : [i]
              , u = [];
            for (let f = 0; f < c.length && !l; f++) {
                const {valid: d, expectedType: h} = X$(e, c[f]);
                u.push(h || ""),
                l = d
            }
            if (!l) {
                ue(K$(t, e, u));
                return
            }
        }
        s && !s(e) && ue('Invalid prop: custom validator check failed for prop "' + t + '".')
    }
}
const Y$ = $f("String,Number,Boolean,Function,Symbol,BigInt");
function X$(t, e) {
    let r;
    const n = Nv(e);
    if (Y$(n)) {
        const i = typeof t;
        r = i === n.toLowerCase(),
        !r && i === "object" && (r = t instanceof e)
    } else
        n === "Object" ? r = Bt(t) : n === "Array" ? r = Ve(t) : n === "null" ? r = t === null : r = t instanceof e;
    return {
        valid: r,
        expectedType: n
    }
}
function K$(t, e, r) {
    let n = `Invalid prop: type check failed for prop "${t}". Expected ${r.map(Hc).join(" | ")}`;
    const i = r[0]
      , o = lL(e)
      , s = l8(e, i)
      , a = l8(e, o);
    return r.length === 1 && c8(i) && !q$(i, o) && (n += ` with value ${s}`),
    n += `, got ${o} `,
    c8(o) && (n += `with value ${a}.`),
    n
}
function l8(t, e) {
    return e === "String" ? `"${t}"` : e === "Number" ? `${Number(t)}` : `${t}`
}
function c8(t) {
    return ["string", "number", "boolean"].some(r => t.toLowerCase() === r)
}
function q$(...t) {
    return t.some(e => e.toLowerCase() === "boolean")
}
const xB = t => t[0] === "_" || t === "$stable"
  , D_ = t => Ve(t) ? t.map(Cn) : [Cn(t)]
  , Z$ = (t, e, r) => {
    if (e._n)
        return e;
    const n = E_( (...i) => (lr && ue(`Slot "${t}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),
    D_(e(...i))), r);
    return n._c = !1,
    n
}
  , pB = (t, e, r) => {
    const n = t._ctx;
    for (const i in t) {
        if (xB(i))
            continue;
        const o = t[i];
        if (He(o))
            e[i] = Z$(i, o, n);
        else if (o != null) {
            ue(`Non-function value encountered for slot "${i}". Prefer function slots for better performance.`);
            const s = D_(o);
            e[i] = () => s
        }
    }
}
  , gB = (t, e) => {
    vu(t.vnode) || ue("Non-function value encountered for default slot. Prefer function slots for better performance.");
    const r = D_(e);
    t.slots.default = () => r
}
  , J$ = (t, e) => {
    if (t.vnode.shapeFlag & 32) {
        const r = e._;
        r ? (t.slots = Le(e),
        Tv(e, "_", r)) : pB(e, t.slots = {})
    } else
        t.slots = {},
        e && gB(t, e);
    Tv(t.slots, Tp, 1)
}
  , Q$ = (t, e, r) => {
    const {vnode: n, slots: i} = t;
    let o = !0
      , s = Ct;
    if (n.shapeFlag & 32) {
        const a = e._;
        a ? Ks ? (Xt(i, e),
        po(t, "set", "$slots")) : r && a === 1 ? o = !1 : (Xt(i, e),
        !r && a === 1 && delete i._) : (o = !e.$stable,
        pB(e, i)),
        s = e
    } else
        e && (gB(t, e),
        s = {
            default: 1
        });
    if (o)
        for (const a in i)
            !xB(a) && !(a in s) && delete i[a]
}
;
function px(t, e, r, n, i=!1) {
    if (Ve(t)) {
        t.forEach( (d, h) => px(d, e && (Ve(e) ? e[h] : e), r, n, i));
        return
    }
    if (nl(n) && !i)
        return;
    const o = n.shapeFlag & 4 ? Fp(n.component) || n.component.proxy : n.el
      , s = i ? null : o
      , {i: a, r: l} = t;
    if (!a) {
        ue("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");
        return
    }
    const c = e && e.r
      , u = a.refs === Ct ? a.refs = {} : a.refs
      , f = a.setupState;
    if (c != null && c !== l && (nr(c) ? (u[c] = null,
    lt(f, c) && (f[c] = null)) : xt(c) && (c.value = null)),
    He(l))
        uo(l, a, 12, [s, u]);
    else {
        const d = nr(l)
          , h = xt(l);
        if (d || h) {
            const x = () => {
                if (t.f) {
                    const y = d ? lt(f, l) ? f[l] : u[l] : l.value;
                    i ? Ve(y) && h_(y, o) : Ve(y) ? y.includes(o) || y.push(o) : d ? (u[l] = [o],
                    lt(f, l) && (f[l] = u[l])) : (l.value = [o],
                    t.k && (u[t.k] = l.value))
                } else
                    d ? (u[l] = s,
                    lt(f, l) && (f[l] = s)) : h ? (l.value = s,
                    t.k && (u[t.k] = s)) : ue("Invalid template ref type:", l, `(${typeof l})`)
            }
            ;
            s ? (x.id = -1,
            $r(x, r)) : x()
        } else
            ue("Invalid template ref type:", l, `(${typeof l})`)
    }
}
let Cs = !1;
const Id = t => /svg/.test(t.namespaceURI) && t.tagName !== "foreignObject"
  , Iu = t => t.nodeType === 8;
function eU(t) {
    const {mt: e, p: r, o: {patchProp: n, createText: i, nextSibling: o, parentNode: s, remove: a, insert: l, createComment: c}} = t
      , u = (E, g) => {
        if (!g.hasChildNodes()) {
            ue("Attempting to hydrate existing markup but container is empty. Performing full mount instead."),
            r(null, E, g),
            fx(),
            g._vnode = E;
            return
        }
        Cs = !1,
        f(g.firstChild, E, null, null, null),
        fx(),
        g._vnode = E,
        Cs && console.error("Hydration completed but contains mismatches.")
    }
      , f = (E, g, p, v, _, b=!1) => {
        const C = Iu(E) && E.data === "["
          , B = () => y(E, g, p, v, _, C)
          , {type: T, ref: A, shapeFlag: w, patchFlag: S} = g;
        let D = E.nodeType;
        g.el = E,
        S === -2 && (b = !1,
        g.dynamicChildren = null);
        let F = null;
        switch (T) {
        case go:
            D !== 3 ? g.children === "" ? (l(g.el = i(""), s(E), E),
            F = E) : F = B() : (E.data !== g.children && (Cs = !0,
            ue(`Hydration text mismatch:
- Client: ${JSON.stringify(E.data)}
- Server: ${JSON.stringify(g.children)}`),
            E.data = g.children),
            F = o(E));
            break;
        case tr:
            D !== 8 || C ? F = B() : F = o(E);
            break;
        case qs:
            if (C && (E = o(E),
            D = E.nodeType),
            D === 1 || D === 3) {
                F = E;
                const R = !g.children.length;
                for (let P = 0; P < g.staticCount; P++)
                    R && (g.children += F.nodeType === 1 ? F.outerHTML : F.data),
                    P === g.staticCount - 1 && (g.anchor = F),
                    F = o(F);
                return C ? o(F) : F
            } else
                B();
            break;
        case Nt:
            C ? F = x(E, g, p, v, _, b) : F = B();
            break;
        default:
            if (w & 1)
                D !== 1 || g.type.toLowerCase() !== E.tagName.toLowerCase() ? F = B() : F = d(E, g, p, v, _, b);
            else if (w & 6) {
                g.slotScopeIds = _;
                const R = s(E);
                if (e(g, R, null, p, v, Id(R), b),
                F = C ? m(E) : o(E),
                F && Iu(F) && F.data === "teleport end" && (F = o(F)),
                nl(g)) {
                    let P;
                    C ? (P = O(Nt),
                    P.anchor = F ? F.previousSibling : R.lastChild) : P = E.nodeType === 3 ? Dp("") : O("div"),
                    P.el = E,
                    g.component.subTree = P
                }
            } else
                w & 64 ? D !== 8 ? F = B() : F = g.type.hydrate(E, g, p, v, _, b, t, h) : w & 128 ? F = g.type.hydrate(E, g, p, v, Id(s(E)), _, b, t, f) : ue("Invalid HostVNode type:", T, `(${typeof T})`)
        }
        return A != null && px(A, null, v, g),
        F
    }
      , d = (E, g, p, v, _, b) => {
        b = b || !!g.dynamicChildren;
        const {type: C, props: B, patchFlag: T, shapeFlag: A, dirs: w} = g
          , S = C === "input" && w || C === "option";
        {
            if (w && ro(g, null, p, "created"),
            B)
                if (S || !b || T & 48)
                    for (const F in B)
                        (S && F.endsWith("value") || Uf(F) && !y0(F)) && n(E, F, null, B[F], !1, void 0, p);
                else
                    B.onClick && n(E, "onClick", null, B.onClick, !1, void 0, p);
            let D;
            if ((D = B && B.onVnodeBeforeMount) && En(D, p, g),
            w && ro(g, null, p, "beforeMount"),
            ((D = B && B.onVnodeMounted) || w) && W5( () => {
                D && En(D, p, g),
                w && ro(g, null, p, "mounted")
            }
            , v),
            A & 16 && !(B && (B.innerHTML || B.textContent))) {
                let F = h(E.firstChild, g, E, p, v, _, b)
                  , R = !1;
                for (; F; ) {
                    Cs = !0,
                    R || (ue(`Hydration children mismatch in <${g.type}>: server rendered element contains more child nodes than client vdom.`),
                    R = !0);
                    const P = F;
                    F = F.nextSibling,
                    a(P)
                }
            } else
                A & 8 && E.textContent !== g.children && (Cs = !0,
                ue(`Hydration text content mismatch in <${g.type}>:
- Client: ${E.textContent}
- Server: ${g.children}`),
                E.textContent = g.children)
        }
        return E.nextSibling
    }
      , h = (E, g, p, v, _, b, C) => {
        C = C || !!g.dynamicChildren;
        const B = g.children
          , T = B.length;
        let A = !1;
        for (let w = 0; w < T; w++) {
            const S = C ? B[w] : B[w] = Cn(B[w]);
            if (E)
                E = f(E, S, v, _, b, C);
            else {
                if (S.type === go && !S.children)
                    continue;
                Cs = !0,
                A || (ue(`Hydration children mismatch in <${p.tagName.toLowerCase()}>: server rendered element contains fewer child nodes than client vdom.`),
                A = !0),
                r(null, S, p, null, v, _, Id(p), b)
            }
        }
        return E
    }
      , x = (E, g, p, v, _, b) => {
        const {slotScopeIds: C} = g;
        C && (_ = _ ? _.concat(C) : C);
        const B = s(E)
          , T = h(o(E), g, B, p, v, _, b);
        return T && Iu(T) && T.data === "]" ? o(g.anchor = T) : (Cs = !0,
        l(g.anchor = c("]"), B, T),
        T)
    }
      , y = (E, g, p, v, _, b) => {
        if (Cs = !0,
        ue(`Hydration node mismatch:
- Client vnode:`, g.type, `
- Server rendered DOM:`, E, E.nodeType === 3 ? "(text)" : Iu(E) && E.data === "[" ? "(start of fragment)" : ""),
        g.el = null,
        b) {
            const T = m(E);
            for (; ; ) {
                const A = o(E);
                if (A && A !== T)
                    a(A);
                else
                    break
            }
        }
        const C = o(E)
          , B = s(E);
        return a(E),
        r(null, g, B, C, p, v, Id(B), _),
        C
    }
      , m = E => {
        let g = 0;
        for (; E; )
            if (E = o(E),
            E && Iu(E) && (E.data === "[" && g++,
            E.data === "]")) {
                if (g === 0)
                    return o(E);
                g--
            }
        return E
    }
    ;
    return [u, f]
}
let Ou, Ns;
function Mo(t, e) {
    t.appContext.config.performance && gx() && Ns.mark(`vue-${e}-${t.uid}`),
    $L(t, e, gx() ? Ns.now() : Date.now())
}
function No(t, e) {
    if (t.appContext.config.performance && gx()) {
        const r = `vue-${e}-${t.uid}`
          , n = r + ":end";
        Ns.mark(n),
        Ns.measure(`<${Pp(t, t.type)}> ${e}`, r, n),
        Ns.clearMarks(r),
        Ns.clearMarks(n)
    }
    UL(t, e, gx() ? Ns.now() : Date.now())
}
function gx() {
    return Ou !== void 0 || (typeof window < "u" && window.performance ? (Ou = !0,
    Ns = window.performance) : Ou = !1),
    Ou
}
function tU() {
    const t = [];
    if (t.length) {
        const e = t.length > 1;
        console.warn(`Feature flag${e ? "s" : ""} ${t.join(", ")} ${e ? "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 $r = W5;
function mB(t) {
    return yB(t)
}
function vB(t) {
    return yB(t, eU)
}
function yB(t, e) {
    tU();
    const r = ux();
    r.__VUE__ = !0,
    v_(r.__VUE_DEVTOOLS_GLOBAL_HOOK__, r);
    const {insert: n, remove: i, patchProp: o, createElement: s, createText: a, createComment: l, setText: c, setElementText: u, parentNode: f, nextSibling: d, setScopeId: h=Bn, insertStaticContent: x} = t
      , y = (I, z, q, ce=null, fe=null, k=null, L=!1, Y=null, ee=Ks ? !1 : !!z.dynamicChildren) => {
        if (I === z)
            return;
        I && !Si(I, z) && (ce = re(I),
        V(I, fe, k, !0),
        I = null),
        z.patchFlag === -2 && (ee = !1,
        z.dynamicChildren = null);
        const {type: de, ref: ye, shapeFlag: pe} = z;
        switch (de) {
        case go:
            m(I, z, q, ce);
            break;
        case tr:
            E(I, z, q, ce);
            break;
        case qs:
            I == null ? g(z, q, ce, L) : p(I, z, q, L);
            break;
        case Nt:
            D(I, z, q, ce, fe, k, L, Y, ee);
            break;
        default:
            pe & 1 ? b(I, z, q, ce, fe, k, L, Y, ee) : pe & 6 ? F(I, z, q, ce, fe, k, L, Y, ee) : pe & 64 || pe & 128 ? de.process(I, z, q, ce, fe, k, L, Y, ee, he) : ue("Invalid VNode type:", de, `(${typeof de})`)
        }
        ye != null && fe && px(ye, I && I.ref, k, z || I, !z)
    }
      , m = (I, z, q, ce) => {
        if (I == null)
            n(z.el = a(z.children), q, ce);
        else {
            const fe = z.el = I.el;
            z.children !== I.children && c(fe, z.children)
        }
    }
      , E = (I, z, q, ce) => {
        I == null ? n(z.el = l(z.children || ""), q, ce) : z.el = I.el
    }
      , g = (I, z, q, ce) => {
        [I.el,I.anchor] = x(I.children, z, q, ce, I.el, I.anchor)
    }
      , p = (I, z, q, ce) => {
        if (z.children !== I.children) {
            const fe = d(I.anchor);
            _(I),
            [z.el,z.anchor] = x(z.children, q, fe, ce)
        } else
            z.el = I.el,
            z.anchor = I.anchor
    }
      , v = ({el: I, anchor: z}, q, ce) => {
        let fe;
        for (; I && I !== z; )
            fe = d(I),
            n(I, q, ce),
            I = fe;
        n(z, q, ce)
    }
      , _ = ({el: I, anchor: z}) => {
        let q;
        for (; I && I !== z; )
            q = d(I),
            i(I),
            I = q;
        i(z)
    }
      , b = (I, z, q, ce, fe, k, L, Y, ee) => {
        L = L || z.type === "svg",
        I == null ? C(z, q, ce, fe, k, L, Y, ee) : A(I, z, fe, k, L, Y, ee)
    }
      , C = (I, z, q, ce, fe, k, L, Y) => {
        let ee, de;
        const {type: ye, props: pe, shapeFlag: Z, transition: se, dirs: we} = I;
        if (ee = I.el = s(I.type, k, pe && pe.is, pe),
        Z & 8 ? u(ee, I.children) : Z & 16 && T(I.children, ee, null, ce, fe, k && ye !== "foreignObject", L, Y),
        we && ro(I, null, ce, "created"),
        B(ee, I, I.scopeId, L, ce),
        pe) {
            for (const et in pe)
                et !== "value" && !y0(et) && o(ee, et, null, pe[et], k, I.children, ce, fe, G);
            "value"in pe && o(ee, "value", null, pe.value),
            (de = pe.onVnodeBeforeMount) && En(de, ce, I)
        }
        Object.defineProperty(ee, "__vnode", {
            value: I,
            enumerable: !1
        }),
        Object.defineProperty(ee, "__vueParentComponent", {
            value: ce,
            enumerable: !1
        }),
        we && ro(I, null, ce, "beforeMount");
        const Ue = (!fe || fe && !fe.pendingBranch) && se && !se.persisted;
        Ue && se.beforeEnter(ee),
        n(ee, z, q),
        ((de = pe && pe.onVnodeMounted) || Ue || we) && $r( () => {
            de && En(de, ce, I),
            Ue && se.enter(ee),
            we && ro(I, null, ce, "mounted")
        }
        , fe)
    }
      , B = (I, z, q, ce, fe) => {
        if (q && h(I, q),
        ce)
            for (let k = 0; k < ce.length; k++)
                h(I, ce[k]);
        if (fe) {
            let k = fe.subTree;
            if (k.patchFlag > 0 && k.patchFlag & 2048 && (k = __(k.children) || k),
            z === k) {
                const L = fe.vnode;
                B(I, L, L.scopeId, L.slotScopeIds, fe.parent)
            }
        }
    }
      , T = (I, z, q, ce, fe, k, L, Y, ee=0) => {
        for (let de = ee; de < I.length; de++) {
            const ye = I[de] = Y ? ks(I[de]) : Cn(I[de]);
            y(null, ye, z, q, ce, fe, k, L, Y)
        }
    }
      , A = (I, z, q, ce, fe, k, L) => {
        const Y = z.el = I.el;
        let {patchFlag: ee, dynamicChildren: de, dirs: ye} = z;
        ee |= I.patchFlag & 16;
        const pe = I.props || Ct
          , Z = z.props || Ct;
        let se;
        q && Ca(q, !1),
        (se = Z.onVnodeBeforeUpdate) && En(se, q, z, I),
        ye && ro(z, I, q, "beforeUpdate"),
        q && Ca(q, !0),
        Ks && (ee = 0,
        L = !1,
        de = null);
        const we = fe && z.type !== "foreignObject";
        if (de ? (w(I.dynamicChildren, de, Y, q, ce, we, k),
        mx(I, z)) : L || K(I, z, Y, null, q, ce, we, k, !1),
        ee > 0) {
            if (ee & 16)
                S(Y, z, pe, Z, q, ce, fe);
            else if (ee & 2 && pe.class !== Z.class && o(Y, "class", null, Z.class, fe),
            ee & 4 && o(Y, "style", pe.style, Z.style, fe),
            ee & 8) {
                const Ue = z.dynamicProps;
                for (let et = 0; et < Ue.length; et++) {
                    const Ot = Ue[et]
                      , Sr = pe[Ot]
                      , vn = Z[Ot];
                    (vn !== Sr || Ot === "value") && o(Y, Ot, Sr, vn, fe, I.children, q, ce, G)
                }
            }
            ee & 1 && I.children !== z.children && u(Y, z.children)
        } else
            !L && de == null && S(Y, z, pe, Z, q, ce, fe);
        ((se = Z.onVnodeUpdated) || ye) && $r( () => {
            se && En(se, q, z, I),
            ye && ro(z, I, q, "updated")
        }
        , ce)
    }
      , w = (I, z, q, ce, fe, k, L) => {
        for (let Y = 0; Y < z.length; Y++) {
            const ee = I[Y]
              , de = z[Y]
              , ye = ee.el && (ee.type === Nt || !Si(ee, de) || ee.shapeFlag & 70) ? f(ee.el) : q;
            y(ee, de, ye, null, ce, fe, k, L, !0)
        }
    }
      , S = (I, z, q, ce, fe, k, L) => {
        if (q !== ce) {
            if (q !== Ct)
                for (const Y in q)
                    !y0(Y) && !(Y in ce) && o(I, Y, q[Y], null, L, z.children, fe, k, G);
            for (const Y in ce) {
                if (y0(Y))
                    continue;
                const ee = ce[Y]
                  , de = q[Y];
                ee !== de && Y !== "value" && o(I, Y, de, ee, L, z.children, fe, k, G)
            }
            "value"in ce && o(I, "value", q.value, ce.value)
        }
    }
      , D = (I, z, q, ce, fe, k, L, Y, ee) => {
        const de = z.el = I ? I.el : a("")
          , ye = z.anchor = I ? I.anchor : a("");
        let {patchFlag: pe, dynamicChildren: Z, slotScopeIds: se} = z;
        (Ks || pe & 2048) && (pe = 0,
        ee = !1,
        Z = null),
        se && (Y = Y ? Y.concat(se) : se),
        I == null ? (n(de, q, ce),
        n(ye, q, ce),
        T(z.children, q, ye, fe, k, L, Y, ee)) : pe > 0 && pe & 64 && Z && I.dynamicChildren ? (w(I.dynamicChildren, Z, q, fe, k, L, Y),
        mx(I, z)) : K(I, z, q, ye, fe, k, L, Y, ee)
    }
      , F = (I, z, q, ce, fe, k, L, Y, ee) => {
        z.slotScopeIds = Y,
        I == null ? z.shapeFlag & 512 ? fe.ctx.activate(z, q, ce, L, ee) : R(z, q, ce, fe, k, L, ee) : P(I, z, ee)
    }
      , R = (I, z, q, ce, fe, k, L) => {
        const Y = I.component = BB(I, ce, fe);
        if (Y.type.__hmrId && PL(Y),
        E0(I),
        Mo(Y, "mount"),
        vu(I) && (Y.ctx.renderer = he),
        Mo(Y, "init"),
        TB(Y),
        No(Y, "init"),
        Y.asyncDep) {
            if (fe && fe.registerDep(Y, N),
            !I.el) {
                const ee = Y.subTree = O(tr);
                E(null, ee, z, q)
            }
            return
        }
        N(Y, I, z, q, fe, k, L),
        _0(),
        No(Y, "mount")
    }
      , P = (I, z, q) => {
        const ce = z.component = I.component;
        if (KL(I, z, q))
            if (ce.asyncDep && !ce.asyncResolved) {
                E0(z),
                j(ce, z, q),
                _0();
                return
            } else
                ce.next = z,
                DL(ce.update),
                ce.update();
        else
            z.el = I.el,
            ce.vnode = z
    }
      , N = (I, z, q, ce, fe, k, L) => {
        const Y = () => {
            if (I.isMounted) {
                let {next: ye, bu: pe, u: Z, parent: se, vnode: we} = I, Ue = ye, et;
                E0(ye || I.vnode),
                Ca(I, !1),
                ye ? (ye.el = we.el,
                j(I, ye, L)) : ye = we,
                pe && Ua(pe),
                (et = ye.props && ye.props.onVnodeBeforeUpdate) && En(et, se, ye, we),
                Ca(I, !0),
                Mo(I, "render");
                const Ot = Oh(I);
                No(I, "render");
                const Sr = I.subTree;
                I.subTree = Ot,
                Mo(I, "patch"),
                y(Sr, Ot, f(Sr.el), re(Sr), I, fe, k),
                No(I, "patch"),
                ye.el = Ot.el,
                Ue === null && b_(I, Ot.el),
                Z && $r(Z, fe),
                (et = ye.props && ye.props.onVnodeUpdated) && $r( () => En(et, se, ye, we), fe),
                H5(I),
                _0()
            } else {
                let ye;
                const {el: pe, props: Z} = z
                  , {bm: se, m: we, parent: Ue} = I
                  , et = nl(z);
                if (Ca(I, !1),
                se && Ua(se),
                !et && (ye = Z && Z.onVnodeBeforeMount) && En(ye, Ue, z),
                Ca(I, !0),
                pe && ve) {
                    const Ot = () => {
                        Mo(I, "render"),
                        I.subTree = Oh(I),
                        No(I, "render"),
                        Mo(I, "hydrate"),
                        ve(pe, I.subTree, I, fe, null),
                        No(I, "hydrate")
                    }
                    ;
                    et ? z.type.__asyncLoader().then( () => !I.isUnmounted && Ot()) : Ot()
                } else {
                    Mo(I, "render");
                    const Ot = I.subTree = Oh(I);
                    No(I, "render"),
                    Mo(I, "patch"),
                    y(null, Ot, q, ce, I, fe, k),
                    No(I, "patch"),
                    z.el = Ot.el
                }
                if (we && $r(we, fe),
                !et && (ye = Z && Z.onVnodeMounted)) {
                    const Ot = z;
                    $r( () => En(ye, Ue, Ot), fe)
                }
                (z.shapeFlag & 256 || Ue && nl(Ue.vnode) && Ue.vnode.shapeFlag & 256) && I.a && $r(I.a, fe),
                I.isMounted = !0,
                Pv(I),
                z = q = ce = null
            }
        }
          , ee = I.effect = new Lf(Y, () => zf(de),I.scope)
          , de = I.update = () => ee.run();
        de.id = I.uid,
        Ca(I, !0),
        ee.onTrack = I.rtc ? ye => Ua(I.rtc, ye) : void 0,
        ee.onTrigger = I.rtg ? ye => Ua(I.rtg, ye) : void 0,
        de.ownerInstance = I,
        de()
    }
      , j = (I, z, q) => {
        z.component = I;
        const ce = I.vnode.props;
        I.vnode = z,
        I.next = null,
        j$(I, z.props, ce, q),
        Q$(I, z.children, q),
        Il(),
        XC(),
        Ol()
    }
      , K = (I, z, q, ce, fe, k, L, Y, ee=!1) => {
        const de = I && I.children
          , ye = I ? I.shapeFlag : 0
          , pe = z.children
          , {patchFlag: Z, shapeFlag: se} = z;
        if (Z > 0) {
            if (Z & 128) {
                U(de, pe, q, ce, fe, k, L, Y, ee);
                return
            } else if (Z & 256) {
                oe(de, pe, q, ce, fe, k, L, Y, ee);
                return
            }
        }
        se & 8 ? (ye & 16 && G(de, fe, k),
        pe !== de && u(q, pe)) : ye & 16 ? se & 16 ? U(de, pe, q, ce, fe, k, L, Y, ee) : G(de, fe, k, !0) : (ye & 8 && u(q, ""),
        se & 16 && T(pe, q, ce, fe, k, L, Y, ee))
    }
      , oe = (I, z, q, ce, fe, k, L, Y, ee) => {
        I = I || Fc,
        z = z || Fc;
        const de = I.length
          , ye = z.length
          , pe = Math.min(de, ye);
        let Z;
        for (Z = 0; Z < pe; Z++) {
            const se = z[Z] = ee ? ks(z[Z]) : Cn(z[Z]);
            y(I[Z], se, q, null, fe, k, L, Y, ee)
        }
        de > ye ? G(I, fe, k, !0, !1, pe) : T(z, q, ce, fe, k, L, Y, ee, pe)
    }
      , U = (I, z, q, ce, fe, k, L, Y, ee) => {
        let de = 0;
        const ye = z.length;
        let pe = I.length - 1
          , Z = ye - 1;
        for (; de <= pe && de <= Z; ) {
            const se = I[de]
              , we = z[de] = ee ? ks(z[de]) : Cn(z[de]);
            if (Si(se, we))
                y(se, we, q, null, fe, k, L, Y, ee);
            else
                break;
            de++
        }
        for (; de <= pe && de <= Z; ) {
            const se = I[pe]
              , we = z[Z] = ee ? ks(z[Z]) : Cn(z[Z]);
            if (Si(se, we))
                y(se, we, q, null, fe, k, L, Y, ee);
            else
                break;
            pe--,
            Z--
        }
        if (de > pe) {
            if (de <= Z) {
                const se = Z + 1
                  , we = se < ye ? z[se].el : ce;
                for (; de <= Z; )
                    y(null, z[de] = ee ? ks(z[de]) : Cn(z[de]), q, we, fe, k, L, Y, ee),
                    de++
            }
        } else if (de > Z)
            for (; de <= pe; )
                V(I[de], fe, k, !0),
                de++;
        else {
            const se = de
              , we = de
              , Ue = new Map;
            for (de = we; de <= Z; de++) {
                const nn = z[de] = ee ? ks(z[de]) : Cn(z[de]);
                nn.key != null && (Ue.has(nn.key) && ue("Duplicate keys found during update:", JSON.stringify(nn.key), "Make sure keys are unique."),
                Ue.set(nn.key, de))
            }
            let et, Ot = 0;
            const Sr = Z - we + 1;
            let vn = !1
              , wd = 0;
            const _s = new Array(Sr);
            for (de = 0; de < Sr; de++)
                _s[de] = 0;
            for (de = se; de <= pe; de++) {
                const nn = I[de];
                if (Ot >= Sr) {
                    V(nn, fe, k, !0);
                    continue
                }
                let Wi;
                if (nn.key != null)
                    Wi = Ue.get(nn.key);
                else
                    for (et = we; et <= Z; et++)
                        if (_s[et - we] === 0 && Si(nn, z[et])) {
                            Wi = et;
                            break
                        }
                Wi === void 0 ? V(nn, fe, k, !0) : (_s[Wi - we] = de + 1,
                Wi >= wd ? wd = Wi : vn = !0,
                y(nn, z[Wi], q, null, fe, k, L, Y, ee),
                Ot++)
            }
            const NC = vn ? rU(_s) : Fc;
            for (et = NC.length - 1,
            de = Sr - 1; de >= 0; de--) {
                const nn = we + de
                  , Wi = z[nn]
                  , LC = nn + 1 < ye ? z[nn + 1].el : ce;
                _s[de] === 0 ? y(null, Wi, q, LC, fe, k, L, Y, ee) : vn && (et < 0 || de !== NC[et] ? $(Wi, q, LC, 2) : et--)
            }
        }
    }
      , $ = (I, z, q, ce, fe=null) => {
        const {el: k, type: L, transition: Y, children: ee, shapeFlag: de} = I;
        if (de & 6) {
            $(I.component.subTree, z, q, ce);
            return
        }
        if (de & 128) {
            I.suspense.move(z, q, ce);
            return
        }
        if (de & 64) {
            L.move(I, z, q, he);
            return
        }
        if (L === Nt) {
            n(k, z, q);
            for (let pe = 0; pe < ee.length; pe++)
                $(ee[pe], z, q, ce);
            n(I.anchor, z, q);
            return
        }
        if (L === qs) {
            v(I, z, q);
            return
        }
        if (ce !== 2 && de & 1 && Y)
            if (ce === 0)
                Y.beforeEnter(k),
                n(k, z, q),
                $r( () => Y.enter(k), fe);
            else {
                const {leave: pe, delayLeave: Z, afterLeave: se} = Y
                  , we = () => n(k, z, q)
                  , Ue = () => {
                    pe(k, () => {
                        we(),
                        se && se()
                    }
                    )
                }
                ;
                Z ? Z(k, we, Ue) : Ue()
            }
        else
            n(k, z, q)
    }
      , V = (I, z, q, ce=!1, fe=!1) => {
        const {type: k, props: L, ref: Y, children: ee, dynamicChildren: de, shapeFlag: ye, patchFlag: pe, dirs: Z} = I;
        if (Y != null && px(Y, null, q, I, !0),
        ye & 256) {
            z.ctx.deactivate(I);
            return
        }
        const se = ye & 1 && Z
          , we = !nl(I);
        let Ue;
        if (we && (Ue = L && L.onVnodeBeforeUnmount) && En(Ue, z, I),
        ye & 6)
            Q(I.component, q, ce);
        else {
            if (ye & 128) {
                I.suspense.unmount(q, ce);
                return
            }
            se && ro(I, null, z, "beforeUnmount"),
            ye & 64 ? I.type.remove(I, z, q, fe, he, ce) : de && (k !== Nt || pe > 0 && pe & 64) ? G(de, z, q, !1, !0) : (k === Nt && pe & 384 || !fe && ye & 16) && G(ee, z, q),
            ce && W(I)
        }
        (we && (Ue = L && L.onVnodeUnmounted) || se) && $r( () => {
            Ue && En(Ue, z, I),
            se && ro(I, null, z, "unmounted")
        }
        , q)
    }
      , W = I => {
        const {type: z, el: q, anchor: ce, transition: fe} = I;
        if (z === Nt) {
            I.patchFlag > 0 && I.patchFlag & 2048 && fe && !fe.persisted ? I.children.forEach(L => {
                L.type === tr ? i(L.el) : W(L)
            }
            ) : H(q, ce);
            return
        }
        if (z === qs) {
            _(I);
            return
        }
        const k = () => {
            i(q),
            fe && !fe.persisted && fe.afterLeave && fe.afterLeave()
        }
        ;
        if (I.shapeFlag & 1 && fe && !fe.persisted) {
            const {leave: L, delayLeave: Y} = fe
              , ee = () => L(q, k);
            Y ? Y(I.el, k, ee) : ee()
        } else
            k()
    }
      , H = (I, z) => {
        let q;
        for (; I !== z; )
            q = d(I),
            i(I),
            I = q;
        i(z)
    }
      , Q = (I, z, q) => {
        I.type.__hmrId && IL(I);
        const {bum: ce, scope: fe, update: k, subTree: L, um: Y} = I;
        ce && Ua(ce),
        fe.stop(),
        k && (k.active = !1,
        V(L, I, z, q)),
        Y && $r(Y, z),
        $r( () => {
            I.isUnmounted = !0
        }
        , z),
        z && z.pendingBranch && !z.isUnmounted && I.asyncDep && !I.asyncResolved && I.suspenseId === z.pendingId && (z.deps--,
        z.deps === 0 && z.resolve()),
        LL(I)
    }
      , G = (I, z, q, ce=!1, fe=!1, k=0) => {
        for (let L = k; L < I.length; L++)
            V(I[L], z, q, ce, fe)
    }
      , re = I => I.shapeFlag & 6 ? re(I.component.subTree) : I.shapeFlag & 128 ? I.suspense.next() : d(I.anchor || I.el)
      , te = (I, z, q) => {
        I == null ? z._vnode && V(z._vnode, null, null, !0) : y(z._vnode || null, I, z, null, null, null, q),
        XC(),
        fx(),
        z._vnode = I
    }
      , he = {
        p: y,
        um: V,
        m: $,
        r: W,
        mt: R,
        mc: T,
        pc: K,
        pbc: w,
        n: re,
        o: t
    };
    let xe, ve;
    return e && ([xe,ve] = e(he)),
    {
        render: te,
        hydrate: xe,
        createApp: H$(te, xe)
    }
}
function Ca({effect: t, update: e}, r) {
    t.allowRecurse = e.allowRecurse = r
}
function mx(t, e, r=!1) {
    const n = t.children
      , i = e.children;
    if (Ve(n) && Ve(i))
        for (let o = 0; o < n.length; o++) {
            const s = n[o];
            let a = i[o];
            a.shapeFlag & 1 && !a.dynamicChildren && ((a.patchFlag <= 0 || a.patchFlag === 32) && (a = i[o] = ks(i[o]),
            a.el = s.el),
            r || mx(s, a)),
            a.type === go && (a.el = s.el),
            a.type === tr && !a.el && (a.el = s.el)
        }
}
function rU(t) {
    const e = t.slice()
      , r = [0];
    let n, i, o, s, a;
    const l = t.length;
    for (n = 0; n < l; n++) {
        const c = t[n];
        if (c !== 0) {
            if (i = r[r.length - 1],
            t[i] < c) {
                e[n] = i,
                r.push(n);
                continue
            }
            for (o = 0,
            s = r.length - 1; o < s; )
                a = o + s >> 1,
                t[r[a]] < c ? o = a + 1 : s = a;
            c < t[r[o]] && (o > 0 && (e[n] = r[o - 1]),
            r[o] = n)
        }
    }
    for (o = r.length,
    s = r[o - 1]; o-- > 0; )
        r[o] = s,
        s = e[s];
    return r
}
const nU = t => t.__isTeleport
  , Oc = t => t && (t.disabled || t.disabled === "")
  , u8 = t => typeof SVGElement < "u" && t instanceof SVGElement
  , Lv = (t, e) => {
    const r = t && t.to;
    if (nr(r))
        if (e) {
            const n = e(r);
            return n || ue(`Failed to locate Teleport target with selector "${r}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`),
            n
        } else
            return ue("Current renderer does not support string target for Teleports. (missing querySelector renderer option)"),
            null;
    else
        return !r && !Oc(t) && ue(`Invalid Teleport target: ${r}`),
        r
}
  , iU = {
    __isTeleport: !0,
    process(t, e, r, n, i, o, s, a, l, c) {
        const {mc: u, pc: f, pbc: d, o: {insert: h, querySelector: x, createText: y, createComment: m}} = c
          , E = Oc(e.props);
        let {shapeFlag: g, children: p, dynamicChildren: v} = e;
        if (Ks && (l = !1,
        v = null),
        t == null) {
            const _ = e.el = m("teleport start")
              , b = e.anchor = m("teleport end");
            h(_, r, n),
            h(b, r, n);
            const C = e.target = Lv(e.props, x)
              , B = e.targetAnchor = y("");
            C ? (h(B, C),
            s = s || u8(C)) : E || ue("Invalid Teleport target on mount:", C, `(${typeof C})`);
            const T = (A, w) => {
                g & 16 && u(p, A, w, i, o, s, a, l)
            }
            ;
            E ? T(r, b) : C && T(C, B)
        } else {
            e.el = t.el;
            const _ = e.anchor = t.anchor
              , b = e.target = t.target
              , C = e.targetAnchor = t.targetAnchor
              , B = Oc(t.props)
              , T = B ? r : b
              , A = B ? _ : C;
            if (s = s || u8(b),
            v ? (d(t.dynamicChildren, v, T, i, o, s, a),
            mx(t, e, !0)) : l || f(t, e, T, A, i, o, s, a, !1),
            E)
                B || Od(e, r, _, c, 1);
            else if ((e.props && e.props.to) !== (t.props && t.props.to)) {
                const w = e.target = Lv(e.props, x);
                w ? Od(e, w, null, c, 0) : ue("Invalid Teleport target on update:", b, `(${typeof b})`)
            } else
                B && Od(e, b, C, c, 1)
        }
        EB(e)
    },
    remove(t, e, r, n, {um: i, o: {remove: o}}, s) {
        const {shapeFlag: a, children: l, anchor: c, targetAnchor: u, target: f, props: d} = t;
        if (f && o(u),
        (s || !Oc(d)) && (o(c),
        a & 16))
            for (let h = 0; h < l.length; h++) {
                const x = l[h];
                i(x, e, r, !0, !!x.dynamicChildren)
            }
    },
    move: Od,
    hydrate: oU
};
function Od(t, e, r, {o: {insert: n}, m: i}, o=2) {
    o === 0 && n(t.targetAnchor, e, r);
    const {el: s, anchor: a, shapeFlag: l, children: c, props: u} = t
      , f = o === 2;
    if (f && n(s, e, r),
    (!f || Oc(u)) && l & 16)
        for (let d = 0; d < c.length; d++)
            i(c[d], e, r, 2);
    f && n(a, e, r)
}
function oU(t, e, r, n, i, o, {o: {nextSibling: s, parentNode: a, querySelector: l}}, c) {
    const u = e.target = Lv(e.props, l);
    if (u) {
        const f = u._lpa || u.firstChild;
        if (e.shapeFlag & 16)
            if (Oc(e.props))
                e.anchor = c(s(t), e, a(t), r, n, i, o),
                e.targetAnchor = f;
            else {
                e.anchor = s(t);
                let d = f;
                for (; d; )
                    if (d = s(d),
                    d && d.nodeType === 8 && d.data === "teleport anchor") {
                        e.targetAnchor = d,
                        u._lpa = e.targetAnchor && s(e.targetAnchor);
                        break
                    }
                c(f, e, u, r, n, i, o)
            }
        EB(e)
    }
    return e.anchor && s(e.anchor)
}
const Bp = iU;
function EB(t) {
    const e = t.ctx;
    if (e && e.ut) {
        let r = t.children[0].el;
        for (; r !== t.targetAnchor; )
            r.nodeType === 1 && r.setAttribute("data-v-owner", e.uid),
            r = r.nextSibling;
        e.ut()
    }
}
const Nt = Symbol.for("v-fgt")
  , go = Symbol.for("v-txt")
  , tr = Symbol.for("v-cmt")
  , qs = Symbol.for("v-stc")
  , A0 = [];
let Sn = null;
function Sp(t=!1) {
    A0.push(Sn = t ? null : [])
}
function _B() {
    A0.pop(),
    Sn = A0[A0.length - 1] || null
}
let xl = 1;
function $v(t) {
    xl += t
}
function bB(t) {
    return t.dynamicChildren = xl > 0 ? Sn || Fc : null,
    _B(),
    xl > 0 && Sn && Sn.push(t),
    t
}
function sU(t, e, r, n, i, o) {
    return bB(P_(t, e, r, n, i, o, !0))
}
function F_(t, e, r, n, i) {
    return bB(O(t, e, r, n, i, !0))
}
function mo(t) {
    return t ? t.__v_isVNode === !0 : !1
}
function Si(t, e) {
    return e.shapeFlag & 6 && xc.has(e.type) ? (t.shapeFlag &= -257,
    e.shapeFlag &= -513,
    !1) : t.type === e.type && t.key === e.key
}
let Uv;
function aU(t) {
    Uv = t
}
const lU = (...t) => cU(...Uv ? Uv(t, cr) : t)
  , Tp = "__vInternal"
  , CB = ({key: t}) => t ?? null
  , kh = ({ref: t, ref_key: e, ref_for: r}) => (typeof t == "number" && (t = "" + t),
t != null ? nr(t) || xt(t) || He(t) ? {
    i: cr,
    r: t,
    k: e,
    f: !!r
} : t : null);
function P_(t, e=null, r=null, n=0, i=null, o=t === Nt ? 0 : 1, s=!1, a=!1) {
    const l = {
        __v_isVNode: !0,
        __v_skip: !0,
        type: t,
        props: e,
        key: e && CB(e),
        ref: e && kh(e),
        scopeId: bp,
        slotScopeIds: null,
        children: r,
        component: null,
        suspense: null,
        ssContent: null,
        ssFallback: null,
        dirs: null,
        transition: null,
        el: null,
        anchor: null,
        target: null,
        targetAnchor: null,
        staticCount: 0,
        shapeFlag: o,
        patchFlag: n,
        dynamicProps: i,
        dynamicChildren: null,
        appContext: null,
        ctx: cr
    };
    return a ? (I_(l, r),
    o & 128 && t.normalize(l)) : r && (l.shapeFlag |= nr(r) ? 8 : 16),
    l.key !== l.key && ue("VNode created with invalid key (NaN). VNode type:", l.type),
    xl > 0 && !s && Sn && (l.patchFlag > 0 || o & 6) && l.patchFlag !== 32 && Sn.push(l),
    l
}
const O = lU;
function cU(t, e=null, r=null, n=0, i=null, o=!1) {
    if ((!t || t === iB) && (t || ue(`Invalid vnode type when creating vnode: ${t}.`),
    t = tr),
    mo(t)) {
        const a = vi(t, e, !0);
        return r && I_(a, r),
        xl > 0 && !o && Sn && (a.shapeFlag & 6 ? Sn[Sn.indexOf(t)] = a : Sn.push(a)),
        a.patchFlag |= -2,
        a
    }
    if (PB(t) && (t = t.__vccOpts),
    e) {
        e = AB(e);
        let {class: a, style: l} = e;
        a && !nr(a) && (e.class = Vf(a)),
        Bt(l) && (q0(l) && !Ve(l) && (l = Xt({}, l)),
        e.style = Hf(l))
    }
    const s = nr(t) ? 1 : j5(t) ? 128 : nU(t) ? 64 : Bt(t) ? 4 : He(t) ? 2 : 0;
    return s & 4 && q0(t) && (t = Le(t),
    ue("Vue received a Component which 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: `, t)),
    P_(t, e, r, n, i, s, o, !0)
}
function AB(t) {
    return t ? q0(t) || Tp in t ? Xt({}, t) : t : null
}
function vi(t, e, r=!1) {
    const {props: n, ref: i, patchFlag: o, children: s} = t
      , a = e ? st(n || {}, e) : n;
    return {
        __v_isVNode: !0,
        __v_skip: !0,
        type: t.type,
        props: a,
        key: a && CB(a),
        ref: e && e.ref ? r && i ? Ve(i) ? i.concat(kh(e)) : [i, kh(e)] : kh(e) : i,
        scopeId: t.scopeId,
        slotScopeIds: t.slotScopeIds,
        children: o === -1 && Ve(s) ? s.map(wB) : s,
        target: t.target,
        targetAnchor: t.targetAnchor,
        staticCount: t.staticCount,
        shapeFlag: t.shapeFlag,
        patchFlag: e && t.type !== Nt ? o === -1 ? 16 : o | 16 : o,
        dynamicProps: t.dynamicProps,
        dynamicChildren: t.dynamicChildren,
        appContext: t.appContext,
        dirs: t.dirs,
        transition: t.transition,
        component: t.component,
        suspense: t.suspense,
        ssContent: t.ssContent && vi(t.ssContent),
        ssFallback: t.ssFallback && vi(t.ssFallback),
        el: t.el,
        anchor: t.anchor,
        ctx: t.ctx,
        ce: t.ce
    }
}
function wB(t) {
    const e = vi(t);
    return Ve(t.children) && (e.children = t.children.map(wB)),
    e
}
function Dp(t=" ", e=0) {
    return O(go, null, t, e)
}
function uU(t, e) {
    const r = O(qs, null, t);
    return r.staticCount = e,
    r
}
function fU(t="", e=!1) {
    return e ? (Sp(),
    F_(tr, null, t)) : O(tr, null, t)
}
function Cn(t) {
    return t == null || typeof t == "boolean" ? O(tr) : Ve(t) ? O(Nt, null, t.slice()) : typeof t == "object" ? ks(t) : O(go, null, String(t))
}
function ks(t) {
    return t.el === null && t.patchFlag !== -1 || t.memo ? t : vi(t)
}
function I_(t, e) {
    let r = 0;
    const {shapeFlag: n} = t;
    if (e == null)
        e = null;
    else if (Ve(e))
        r = 16;
    else if (typeof e == "object")
        if (n & 65) {
            const i = e.default;
            i && (i._c && (i._d = !1),
            I_(t, i()),
            i._c && (i._d = !0));
            return
        } else {
            r = 32;
            const i = e._;
            !i && !(Tp in e) ? e._ctx = cr : i === 3 && cr && (cr.slots._ === 1 ? e._ = 1 : (e._ = 2,
            t.patchFlag |= 1024))
        }
    else
        He(e) ? (e = {
            default: e,
            _ctx: cr
        },
        r = 32) : (e = String(e),
        n & 64 ? (r = 16,
        e = [Dp(e)]) : r = 8);
    t.children = e,
    t.shapeFlag |= r
}
function st(...t) {
    const e = {};
    for (let r = 0; r < t.length; r++) {
        const n = t[r];
        for (const i in n)
            if (i === "class")
                e.class !== n.class && (e.class = Vf([e.class, n.class]));
            else if (i === "style")
                e.style = Hf([e.style, n.style]);
            else if (Uf(i)) {
                const o = e[i]
                  , s = n[i];
                s && o !== s && !(Ve(o) && o.includes(s)) && (e[i] = o ? [].concat(o, s) : s)
            } else
                i !== "" && (e[i] = n[i])
    }
    return e
}
function En(t, e, r, n=null) {
    zn(t, e, 7, [r, n])
}
const dU = cB();
let hU = 0;
function BB(t, e, r) {
    const n = t.type
      , i = (e ? e.appContext : t.appContext) || dU
      , o = {
        uid: hU++,
        vnode: t,
        type: n,
        parent: e,
        appContext: i,
        root: null,
        next: null,
        subTree: null,
        effect: null,
        update: null,
        scope: new s_(!0),
        render: null,
        proxy: null,
        exposed: null,
        exposeProxy: null,
        withProxy: null,
        provides: e ? e.provides : Object.create(i.provides),
        accessCache: null,
        renderCache: [],
        components: null,
        directives: null,
        propsOptions: dB(n, i),
        emitsOptions: z5(n, i),
        emit: null,
        emitted: null,
        propsDefaults: Ct,
        inheritAttrs: n.inheritAttrs,
        ctx: Ct,
        data: Ct,
        props: Ct,
        attrs: Ct,
        slots: Ct,
        refs: Ct,
        setupState: Ct,
        setupContext: null,
        attrsProxy: null,
        slotsProxy: null,
        suspense: r,
        suspenseId: r ? r.pendingId : 0,
        asyncDep: null,
        asyncResolved: !1,
        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 o.ctx = v$(o),
    o.root = e ? e.root : o,
    o.emit = HL.bind(null, o),
    t.ce && t.ce(o),
    o
}
let lr = null;
const It = () => lr || cr;
let O_, jl, f8 = "__VUE_INSTANCE_SETTERS__";
(jl = ux()[f8]) || (jl = ux()[f8] = []),
jl.push(t => lr = t),
O_ = t => {
    jl.length > 1 ? jl.forEach(e => e(t)) : jl[0](t)
}
;
const oa = t => {
    O_(t),
    t.scope.on()
}
  , Zs = () => {
    lr && lr.scope.off(),
    O_(null)
}
  , xU = $f("slot,component");
function Gv(t, e) {
    const r = e.isNativeTag || P5;
    (xU(t) || r(t)) && ue("Do not use built-in or reserved HTML elements as component id: " + t)
}
function SB(t) {
    return t.vnode.shapeFlag & 4
}
let zc = !1;
function TB(t, e=!1) {
    zc = e;
    const {props: r, children: n} = t.vnode
      , i = SB(t);
    V$(t, r, i, e),
    J$(t, n);
    const o = i ? pU(t, e) : void 0;
    return zc = !1,
    o
}
function pU(t, e) {
    var r;
    const n = t.type;
    {
        if (n.name && Gv(n.name, t.appContext.config),
        n.components) {
            const o = Object.keys(n.components);
            for (let s = 0; s < o.length; s++)
                Gv(o[s], t.appContext.config)
        }
        if (n.directives) {
            const o = Object.keys(n.directives);
            for (let s = 0; s < o.length; s++)
                K5(o[s])
        }
        n.compilerOptions && k_() && ue('"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.')
    }
    t.accessCache = Object.create(null),
    t.proxy = ao(new Proxy(t.ctx,C0)),
    y$(t);
    const {setup: i} = n;
    if (i) {
        const o = t.setupContext = i.length > 1 ? FB(t) : null;
        oa(t),
        Il();
        const s = uo(i, t, 0, [Ec(t.props), o]);
        if (Ol(),
        Zs(),
        vp(s)) {
            if (s.then(Zs, Zs),
            e)
                return s.then(a => {
                    Hv(t, a, e)
                }
                ).catch(a => {
                    Rl(a, t, 0)
                }
                );
            if (t.asyncDep = s,
            !t.suspense) {
                const a = (r = n.name) != null ? r : "Anonymous";
                ue(`Component <${a}>: 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
            Hv(t, s, e)
    } else
        DB(t, e)
}
function Hv(t, e, r) {
    He(e) ? t.type.__ssrInlineRender ? t.ssrRender = e : t.render = e : Bt(e) ? (mo(e) && ue("setup() should not return VNodes directly - return a render function instead."),
    t.devtoolsRawSetupState = e,
    t.setupState = d_(e),
    E$(t)) : e !== void 0 && ue(`setup() should return an object. Received: ${e === null ? "null" : typeof e}`),
    DB(t, r)
}
let w0, Vv;
function gU(t) {
    w0 = t,
    Vv = e => {
        e.render._rc && (e.withProxy = new Proxy(e.ctx,m$))
    }
}
const k_ = () => !w0;
function DB(t, e, r) {
    const n = t.type;
    if (!t.render) {
        if (!e && w0 && !n.render) {
            const i = n.template || T_(t).template;
            if (i) {
                Mo(t, "compile");
                const {isCustomElement: o, compilerOptions: s} = t.appContext.config
                  , {delimiters: a, compilerOptions: l} = n
                  , c = Xt(Xt({
                    isCustomElement: o,
                    delimiters: a
                }, s), l);
                n.render = w0(i, c),
                No(t, "compile")
            }
        }
        t.render = n.render || Bn,
        Vv && Vv(t)
    }
    oa(t),
    Il(),
    M$(t),
    Ol(),
    Zs(),
    !n.render && t.render === Bn && !e && (!w0 && n.template ? ue('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".') : ue("Component is missing template or render function."))
}
function mU(t) {
    return t.attrsProxy || (t.attrsProxy = new Proxy(t.attrs,{
        get(e, r) {
            return dx(),
            tn(t, "get", "$attrs"),
            e[r]
        },
        set() {
            return ue("setupContext.attrs is readonly."),
            !1
        },
        deleteProperty() {
            return ue("setupContext.attrs is readonly."),
            !1
        }
    }))
}
function vU(t) {
    return t.slotsProxy || (t.slotsProxy = new Proxy(t.slots,{
        get(e, r) {
            return tn(t, "get", "$slots"),
            e[r]
        }
    }))
}
function FB(t) {
    return Object.freeze({
        get attrs() {
            return mU(t)
        },
        get slots() {
            return vU(t)
        },
        get emit() {
            return (r, ...n) => t.emit(r, ...n)
        },
        expose: r => {
            if (t.exposed && ue("expose() should be called only once per setup()."),
            r != null) {
                let n = typeof r;
                n === "object" && (Ve(r) ? n = "array" : xt(r) && (n = "ref")),
                n !== "object" && ue(`expose() should be passed a plain object, received ${n}.`)
            }
            t.exposed = r || {}
        }
    })
}
function Fp(t) {
    if (t.exposed)
        return t.exposeProxy || (t.exposeProxy = new Proxy(d_(ao(t.exposed)),{
            get(e, r) {
                if (r in e)
                    return e[r];
                if (r in il)
                    return il[r](t)
            },
            has(e, r) {
                return r in e || r in il
            }
        }))
}
const yU = /(?:^|[-_])(\w)/g
  , EU = t => t.replace(yU, e => e.toUpperCase()).replace(/[-_]/g, "");
function of(t, e=!0) {
    return He(t) ? t.displayName || t.name : t.name || e && t.__name
}
function Pp(t, e, r=!1) {
    let n = of(e);
    if (!n && e.__file) {
        const i = e.__file.match(/([^/\\]+)\.\w+$/);
        i && (n = i[1])
    }
    if (!n && t && t.parent) {
        const i = o => {
            for (const s in o)
                if (o[s] === e)
                    return s
        }
        ;
        n = i(t.components || t.parent.type.components) || i(t.appContext.components)
    }
    return n ? EU(n) : r ? "App" : "Anonymous"
}
function PB(t) {
    return He(t) && "__vccOpts"in t
}
const ae = (t, e) => iL(t, e, zc);
function Or(t, e, r) {
    const n = arguments.length;
    return n === 2 ? Bt(e) && !Ve(e) ? mo(e) ? O(t, null, [e]) : O(t, e) : O(t, null, e) : (n > 3 ? r = Array.prototype.slice.call(arguments, 2) : n === 3 && mo(r) && (r = [r]),
    O(t, e, r))
}
const IB = Symbol.for("v-scx")
  , OB = () => {
    {
        const t = dr(IB);
        return t || ue("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),
        t
    }
}
;
function W1(t) {
    return !!(t && t.__v_isShallow)
}
function kB() {
    if (typeof window > "u")
        return;
    const t = {
        style: "color:#3ba776"
    }
      , e = {
        style: "color:#0b1bc9"
    }
      , r = {
        style: "color:#b62e24"
    }
      , n = {
        style: "color:#9d288c"
    }
      , i = {
        header(f) {
            return Bt(f) ? f.__isVue ? ["div", t, "VueInstance"] : xt(f) ? ["div", {}, ["span", t, u(f)], "<", a(f.value), ">"] : Ri(f) ? ["div", {}, ["span", t, W1(f) ? "ShallowReactive" : "Reactive"], "<", a(f), `>${as(f) ? " (readonly)" : ""}`] : as(f) ? ["div", {}, ["span", t, W1(f) ? "ShallowReadonly" : "Readonly"], "<", a(f), ">"] : null : null
        },
        hasBody(f) {
            return f && f.__isVue
        },
        body(f) {
            if (f && f.__isVue)
                return ["div", {}, ...o(f.$)]
        }
    };
    function o(f) {
        const d = [];
        f.type.props && f.props && d.push(s("props", Le(f.props))),
        f.setupState !== Ct && d.push(s("setup", f.setupState)),
        f.data !== Ct && d.push(s("data", Le(f.data)));
        const h = l(f, "computed");
        h && d.push(s("computed", h));
        const x = l(f, "inject");
        return x && d.push(s("injected", x)),
        d.push(["div", {}, ["span", {
            style: n.style + ";opacity:0.66"
        }, "$ (internal): "], ["object", {
            object: f
        }]]),
        d
    }
    function s(f, d) {
        return d = Xt({}, d),
        Object.keys(d).length ? ["div", {
            style: "line-height:1.25em;margin-bottom:0.6em"
        }, ["div", {
            style: "color:#476582"
        }, f], ["div", {
            style: "padding-left:1.25em"
        }, ...Object.keys(d).map(h => ["div", {}, ["span", n, h + ": "], a(d[h], !1)])]] : ["span", {}]
    }
    function a(f, d=!0) {
        return typeof f == "number" ? ["span", e, f] : typeof f == "string" ? ["span", r, JSON.stringify(f)] : typeof f == "boolean" ? ["span", n, f] : Bt(f) ? ["object", {
            object: d ? Le(f) : f
        }] : ["span", r, String(f)]
    }
    function l(f, d) {
        const h = f.type;
        if (He(h))
            return;
        const x = {};
        for (const y in f.ctx)
            c(h, y, d) && (x[y] = f.ctx[y]);
        return x
    }
    function c(f, d, h) {
        const x = f[h];
        if (Ve(x) && x.includes(d) || Bt(x) && d in x || f.extends && c(f.extends, d, h) || f.mixins && f.mixins.some(y => c(y, d, h)))
            return !0
    }
    function u(f) {
        return W1(f) ? "ShallowRef" : f.effect ? "ComputedRef" : "Ref"
    }
    window.devtoolsFormatters ? window.devtoolsFormatters.push(i) : window.devtoolsFormatters = [i]
}
function _U(t, e, r, n) {
    const i = r[n];
    if (i && RB(i, t))
        return i;
    const o = e();
    return o.memo = t.slice(),
    r[n] = o
}
function RB(t, e) {
    const r = t.memo;
    if (r.length != e.length)
        return !1;
    for (let n = 0; n < r.length; n++)
        if (Sv(r[n], e[n]))
            return !1;
    return xl > 0 && Sn && Sn.push(t),
    !0
}
const zv = "3.3.4"
  , bU = {
    createComponentInstance: BB,
    setupComponent: TB,
    renderComponentRoot: Oh,
    setCurrentRenderingInstance: ef,
    isVNode: mo,
    normalizeVNode: Cn
}
  , CU = bU
  , AU = null
  , wU = null;
function R_(t, e) {
    const r = Object.create(null)
      , n = t.split(",");
    for (let i = 0; i < n.length; i++)
        r[n[i]] = !0;
    return e ? i => !!r[i.toLowerCase()] : i => !!r[i]
}
const Y1 = Object.freeze({})
  , BU = /^on[^a-z]/
  , SU = t => BU.test(t)
  , TU = t => t.startsWith("onUpdate:")
  , Yf = Object.assign
  , In = Array.isArray
  , Xf = t => NB(t) === "[object Set]"
  , d8 = t => NB(t) === "[object Date]"
  , MB = t => typeof t == "function"
  , sf = t => typeof t == "string"
  , h8 = t => typeof t == "symbol"
  , jv = t => t !== null && typeof t == "object"
  , DU = Object.prototype.toString
  , NB = t => DU.call(t)
  , M_ = t => {
    const e = Object.create(null);
    return r => e[r] || (e[r] = t(r))
}
  , FU = /-(\w)/g
  , X1 = M_(t => t.replace(FU, (e, r) => r ? r.toUpperCase() : ""))
  , PU = /\B([A-Z])/g
  , Ls = M_(t => t.replace(PU, "-$1").toLowerCase())
  , IU = M_(t => t.charAt(0).toUpperCase() + t.slice(1))
  , OU = (t, e) => {
    for (let r = 0; r < t.length; r++)
        t[r](e)
}
  , Wv = t => {
    const e = parseFloat(t);
    return isNaN(e) ? t : e
}
  , Yv = t => {
    const e = sf(t) ? Number(t) : NaN;
    return isNaN(e) ? t : e
}
  , kU = "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"
  , RU = "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"
  , MU = R_(kU)
  , NU = R_(RU)
  , LU = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly"
  , $U = R_(LU);
function LB(t) {
    return !!t || t === ""
}
function UU(t, e) {
    if (t.length !== e.length)
        return !1;
    let r = !0;
    for (let n = 0; r && n < t.length; n++)
        r = sa(t[n], e[n]);
    return r
}
function sa(t, e) {
    if (t === e)
        return !0;
    let r = d8(t)
      , n = d8(e);
    if (r || n)
        return r && n ? t.getTime() === e.getTime() : !1;
    if (r = h8(t),
    n = h8(e),
    r || n)
        return t === e;
    if (r = In(t),
    n = In(e),
    r || n)
        return r && n ? UU(t, e) : !1;
    if (r = jv(t),
    n = jv(e),
    r || n) {
        if (!r || !n)
            return !1;
        const i = Object.keys(t).length
          , o = Object.keys(e).length;
        if (i !== o)
            return !1;
        for (const s in t) {
            const a = t.hasOwnProperty(s)
              , l = e.hasOwnProperty(s);
            if (a && !l || !a && l || !sa(t[s], e[s]))
                return !1
        }
    }
    return String(t) === String(e)
}
function Ip(t, e) {
    return t.findIndex(r => sa(r, e))
}
const GU = "http://www.w3.org/2000/svg"
  , Ga = typeof document < "u" ? document : null
  , x8 = Ga && Ga.createElement("template")
  , HU = {
    insert: (t, e, r) => {
        e.insertBefore(t, r || null)
    }
    ,
    remove: t => {
        const e = t.parentNode;
        e && e.removeChild(t)
    }
    ,
    createElement: (t, e, r, n) => {
        const i = e ? Ga.createElementNS(GU, t) : Ga.createElement(t, r ? {
            is: r
        } : void 0);
        return t === "select" && n && n.multiple != null && i.setAttribute("multiple", n.multiple),
        i
    }
    ,
    createText: t => Ga.createTextNode(t),
    createComment: t => Ga.createComment(t),
    setText: (t, e) => {
        t.nodeValue = e
    }
    ,
    setElementText: (t, e) => {
        t.textContent = e
    }
    ,
    parentNode: t => t.parentNode,
    nextSibling: t => t.nextSibling,
    querySelector: t => Ga.querySelector(t),
    setScopeId(t, e) {
        t.setAttribute(e, "")
    },
    insertStaticContent(t, e, r, n, i, o) {
        const s = r ? r.previousSibling : e.lastChild;
        if (i && (i === o || i.nextSibling))
            for (; e.insertBefore(i.cloneNode(!0), r),
            !(i === o || !(i = i.nextSibling)); )
                ;
        else {
            x8.innerHTML = n ? `<svg>${t}</svg>` : t;
            const a = x8.content;
            if (n) {
                const l = a.firstChild;
                for (; l.firstChild; )
                    a.appendChild(l.firstChild);
                a.removeChild(l)
            }
            e.insertBefore(a, r)
        }
        return [s ? s.nextSibling : e.firstChild, r ? r.previousSibling : e.lastChild]
    }
};
function VU(t, e, r) {
    const n = t._vtc;
    n && (e = (e ? [e, ...n] : [...n]).join(" ")),
    e == null ? t.removeAttribute("class") : r ? t.setAttribute("class", e) : t.className = e
}
function zU(t, e, r) {
    const n = t.style
      , i = sf(r);
    if (r && !i) {
        if (e && !sf(e))
            for (const o in e)
                r[o] == null && Xv(n, o, "");
        for (const o in r)
            Xv(n, o, r[o])
    } else {
        const o = n.display;
        i ? e !== r && (n.cssText = r) : e && t.removeAttribute("style"),
        "_vod"in t && (n.display = o)
    }
}
const jU = /[^\\];\s*$/
  , p8 = /\s*!important$/;
function Xv(t, e, r) {
    if (In(r))
        r.forEach(n => Xv(t, e, n));
    else if (r == null && (r = ""),
    jU.test(r) && ue(`Unexpected semicolon at the end of '${e}' style value: '${r}'`),
    e.startsWith("--"))
        t.setProperty(e, r);
    else {
        const n = WU(t, e);
        p8.test(r) ? t.setProperty(Ls(n), r.replace(p8, ""), "important") : t[n] = r
    }
}
const g8 = ["Webkit", "Moz", "ms"]
  , K1 = {};
function WU(t, e) {
    const r = K1[e];
    if (r)
        return r;
    let n = Li(e);
    if (n !== "filter" && n in t)
        return K1[e] = n;
    n = IU(n);
    for (let i = 0; i < g8.length; i++) {
        const o = g8[i] + n;
        if (o in t)
            return K1[e] = o
    }
    return e
}
const m8 = "http://www.w3.org/1999/xlink";
function YU(t, e, r, n, i) {
    if (n && e.startsWith("xlink:"))
        r == null ? t.removeAttributeNS(m8, e.slice(6, e.length)) : t.setAttributeNS(m8, e, r);
    else {
        const o = $U(e);
        r == null || o && !LB(r) ? t.removeAttribute(e) : t.setAttribute(e, o ? "" : r)
    }
}
function XU(t, e, r, n, i, o, s) {
    if (e === "innerHTML" || e === "textContent") {
        n && s(n, i, o),
        t[e] = r ?? "";
        return
    }
    const a = t.tagName;
    if (e === "value" && a !== "PROGRESS" && !a.includes("-")) {
        t._value = r;
        const c = a === "OPTION" ? t.getAttribute("value") : t.value
          , u = r ?? "";
        c !== u && (t.value = u),
        r == null && t.removeAttribute(e);
        return
    }
    let l = !1;
    if (r === "" || r == null) {
        const c = typeof t[e];
        c === "boolean" ? r = LB(r) : r == null && c === "string" ? (r = "",
        l = !0) : c === "number" && (r = 0,
        l = !0)
    }
    try {
        t[e] = r
    } catch (c) {
        l || ue(`Failed setting prop "${e}" on <${a.toLowerCase()}>: value ${r} is invalid.`, c)
    }
    l && t.removeAttribute(e)
}
function Wo(t, e, r, n) {
    t.addEventListener(e, r, n)
}
function KU(t, e, r, n) {
    t.removeEventListener(e, r, n)
}
function qU(t, e, r, n, i=null) {
    const o = t._vei || (t._vei = {})
      , s = o[e];
    if (n && s)
        s.value = n;
    else {
        const [a,l] = ZU(e);
        if (n) {
            const c = o[e] = eG(n, i);
            Wo(t, a, c, l)
        } else
            s && (KU(t, a, s, l),
            o[e] = void 0)
    }
}
const v8 = /(?:Once|Passive|Capture)$/;
function ZU(t) {
    let e;
    if (v8.test(t)) {
        e = {};
        let n;
        for (; n = t.match(v8); )
            t = t.slice(0, t.length - n[0].length),
            e[n[0].toLowerCase()] = !0
    }
    return [t[2] === ":" ? t.slice(3) : Ls(t.slice(2)), e]
}
let q1 = 0;
const JU = Promise.resolve()
  , QU = () => q1 || (JU.then( () => q1 = 0),
q1 = Date.now());
function eG(t, e) {
    const r = n => {
        if (!n._vts)
            n._vts = Date.now();
        else if (n._vts <= r.attached)
            return;
        zn(tG(n, r.value), e, 5, [n])
    }
    ;
    return r.value = t,
    r.attached = QU(),
    r
}
function tG(t, e) {
    if (In(e)) {
        const r = t.stopImmediatePropagation;
        return t.stopImmediatePropagation = () => {
            r.call(t),
            t._stopped = !0
        }
        ,
        e.map(n => i => !i._stopped && n && n(i))
    } else
        return e
}
const y8 = /^on[a-z]/
  , rG = (t, e, r, n, i=!1, o, s, a, l) => {
    e === "class" ? VU(t, n, i) : e === "style" ? zU(t, r, n) : SU(e) ? TU(e) || qU(t, e, r, n, s) : (e[0] === "." ? (e = e.slice(1),
    !0) : e[0] === "^" ? (e = e.slice(1),
    !1) : nG(t, e, n, i)) ? XU(t, e, n, o, s, a, l) : (e === "true-value" ? t._trueValue = n : e === "false-value" && (t._falseValue = n),
    YU(t, e, n, i))
}
;
function nG(t, e, r, n) {
    return n ? !!(e === "innerHTML" || e === "textContent" || e in t && y8.test(e) && MB(r)) : e === "spellcheck" || e === "draggable" || e === "translate" || e === "form" || e === "list" && t.tagName === "INPUT" || e === "type" && t.tagName === "TEXTAREA" || y8.test(e) && sf(r) ? !1 : e in t
}
function $B(t, e) {
    const r = be(t);
    class n extends Op {
        constructor(o) {
            super(r, o, e)
        }
    }
    return n.def = r,
    n
}
const iG = t => $B(t, tS)
  , oG = typeof HTMLElement < "u" ? HTMLElement : class {
}
;
class Op extends oG {
    constructor(e, r={}, n) {
        super(),
        this._def = e,
        this._props = r,
        this._instance = null,
        this._connected = !1,
        this._resolved = !1,
        this._numberProps = null,
        this.shadowRoot && n ? n(this._createVNode(), this.shadowRoot) : (this.shadowRoot && ue("Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use `defineSSRCustomElement`."),
        this.attachShadow({
            mode: "open"
        }),
        this._def.__asyncLoader || this._resolveProps(this._def))
    }
    connectedCallback() {
        this._connected = !0,
        this._instance || (this._resolved ? this._update() : this._resolveDef())
    }
    disconnectedCallback() {
        this._connected = !1,
        Xe( () => {
            this._connected || (Zv(null, this.shadowRoot),
            this._instance = null)
        }
        )
    }
    _resolveDef() {
        this._resolved = !0;
        for (let n = 0; n < this.attributes.length; n++)
            this._setAttr(this.attributes[n].name);
        new MutationObserver(n => {
            for (const i of n)
                this._setAttr(i.attributeName)
        }
        ).observe(this, {
            attributes: !0
        });
        const e = (n, i=!1) => {
            const {props: o, styles: s} = n;
            let a;
            if (o && !In(o))
                for (const l in o) {
                    const c = o[l];
                    (c === Number || c && c.type === Number) && (l in this._props && (this._props[l] = Yv(this._props[l])),
                    (a || (a = Object.create(null)))[X1(l)] = !0)
                }
            this._numberProps = a,
            i && this._resolveProps(n),
            this._applyStyles(s),
            this._update()
        }
          , r = this._def.__asyncLoader;
        r ? r().then(n => e(n, !0)) : e(this._def)
    }
    _resolveProps(e) {
        const {props: r} = e
          , n = In(r) ? r : Object.keys(r || {});
        for (const i of Object.keys(this))
            i[0] !== "_" && n.includes(i) && this._setProp(i, this[i], !0, !1);
        for (const i of n.map(X1))
            Object.defineProperty(this, i, {
                get() {
                    return this._getProp(i)
                },
                set(o) {
                    this._setProp(i, o)
                }
            })
    }
    _setAttr(e) {
        let r = this.getAttribute(e);
        const n = X1(e);
        this._numberProps && this._numberProps[n] && (r = Yv(r)),
        this._setProp(n, r, !1)
    }
    _getProp(e) {
        return this._props[e]
    }
    _setProp(e, r, n=!0, i=!0) {
        r !== this._props[e] && (this._props[e] = r,
        i && this._instance && this._update(),
        n && (r === !0 ? this.setAttribute(Ls(e), "") : typeof r == "string" || typeof r == "number" ? this.setAttribute(Ls(e), r + "") : r || this.removeAttribute(Ls(e))))
    }
    _update() {
        Zv(this._createVNode(), this.shadowRoot)
    }
    _createVNode() {
        const e = O(this._def, Yf({}, this._props));
        return this._instance || (e.ce = r => {
            this._instance = r,
            r.isCE = !0,
            r.ceReload = o => {
                this._styles && (this._styles.forEach(s => this.shadowRoot.removeChild(s)),
                this._styles.length = 0),
                this._applyStyles(o),
                this._instance = null,
                this._update()
            }
            ;
            const n = (o, s) => {
                this.dispatchEvent(new CustomEvent(o,{
                    detail: s
                }))
            }
            ;
            r.emit = (o, ...s) => {
                n(o, s),
                Ls(o) !== o && n(Ls(o), s)
            }
            ;
            let i = this;
            for (; i = i && (i.parentNode || i.host); )
                if (i instanceof Op) {
                    r.parent = i._instance,
                    r.provides = i._instance.provides;
                    break
                }
        }
        ),
        e
    }
    _applyStyles(e) {
        e && e.forEach(r => {
            const n = document.createElement("style");
            n.textContent = r,
            this.shadowRoot.appendChild(n),
            (this._styles || (this._styles = [])).push(n)
        }
        )
    }
}
function sG(t="$style") {
    {
        const e = It();
        if (!e)
            return ue("useCssModule must be called inside setup()"),
            Y1;
        const r = e.type.__cssModules;
        if (!r)
            return ue("Current instance does not have CSS modules injected."),
            Y1;
        const n = r[t];
        return n || (ue(`Current instance does not have CSS module named "${t}".`),
        Y1)
    }
}
function aG(t) {
    const e = It();
    if (!e) {
        ue("useCssVars is called without current active component instance.");
        return
    }
    const r = e.ut = (i=t(e.proxy)) => {
        Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(o => qv(o, i))
    }
      , n = () => {
        const i = t(e.proxy);
        Kv(e.subTree, i),
        r(i)
    }
    ;
    Y5(n),
    Ht( () => {
        const i = new MutationObserver(n);
        i.observe(e.subTree.el.parentNode, {
            childList: !0
        }),
        vs( () => i.disconnect())
    }
    )
}
function Kv(t, e) {
    if (t.shapeFlag & 128) {
        const r = t.suspense;
        t = r.activeBranch,
        r.pendingBranch && !r.isHydrating && r.effects.push( () => {
            Kv(r.activeBranch, e)
        }
        )
    }
    for (; t.component; )
        t = t.component.subTree;
    if (t.shapeFlag & 1 && t.el)
        qv(t.el, e);
    else if (t.type === Nt)
        t.children.forEach(r => Kv(r, e));
    else if (t.type === qs) {
        let {el: r, anchor: n} = t;
        for (; r && (qv(r, e),
        r !== n); )
            r = r.nextSibling
    }
}
function qv(t, e) {
    if (t.nodeType === 1) {
        const r = t.style;
        for (const n in e)
            r.setProperty(`--${n}`, e[n])
    }
}
const As = "transition"
  , ku = "animation"
  , Kf = (t, {slots: e}) => Or(q5, GB(t), e);
Kf.displayName = "Transition";
const UB = {
    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
}
  , lG = Kf.props = Yf({}, w_, UB)
  , Aa = (t, e=[]) => {
    In(t) ? t.forEach(r => r(...e)) : t && t(...e)
}
  , E8 = t => t ? In(t) ? t.some(e => e.length > 1) : t.length > 1 : !1;
function GB(t) {
    const e = {};
    for (const S in t)
        S in UB || (e[S] = t[S]);
    if (t.css === !1)
        return e;
    const {name: r="v", type: n, duration: i, enterFromClass: o=`${r}-enter-from`, enterActiveClass: s=`${r}-enter-active`, enterToClass: a=`${r}-enter-to`, appearFromClass: l=o, appearActiveClass: c=s, appearToClass: u=a, leaveFromClass: f=`${r}-leave-from`, leaveActiveClass: d=`${r}-leave-active`, leaveToClass: h=`${r}-leave-to`} = t
      , x = cG(i)
      , y = x && x[0]
      , m = x && x[1]
      , {onBeforeEnter: E, onEnter: g, onEnterCancelled: p, onLeave: v, onLeaveCancelled: _, onBeforeAppear: b=E, onAppear: C=g, onAppearCancelled: B=p} = e
      , T = (S, D, F) => {
        Is(S, D ? u : a),
        Is(S, D ? c : s),
        F && F()
    }
      , A = (S, D) => {
        S._isLeaving = !1,
        Is(S, f),
        Is(S, h),
        Is(S, d),
        D && D()
    }
      , w = S => (D, F) => {
        const R = S ? C : g
          , P = () => T(D, S, F);
        Aa(R, [D, P]),
        _8( () => {
            Is(D, S ? l : o),
            Lo(D, S ? u : a),
            E8(R) || b8(D, n, y, P)
        }
        )
    }
    ;
    return Yf(e, {
        onBeforeEnter(S) {
            Aa(E, [S]),
            Lo(S, o),
            Lo(S, s)
        },
        onBeforeAppear(S) {
            Aa(b, [S]),
            Lo(S, l),
            Lo(S, c)
        },
        onEnter: w(!1),
        onAppear: w(!0),
        onLeave(S, D) {
            S._isLeaving = !0;
            const F = () => A(S, D);
            Lo(S, f),
            VB(),
            Lo(S, d),
            _8( () => {
                S._isLeaving && (Is(S, f),
                Lo(S, h),
                E8(v) || b8(S, n, m, F))
            }
            ),
            Aa(v, [S, F])
        },
        onEnterCancelled(S) {
            T(S, !1),
            Aa(p, [S])
        },
        onAppearCancelled(S) {
            T(S, !0),
            Aa(B, [S])
        },
        onLeaveCancelled(S) {
            A(S),
            Aa(_, [S])
        }
    })
}
function cG(t) {
    if (t == null)
        return null;
    if (jv(t))
        return [Z1(t.enter), Z1(t.leave)];
    {
        const e = Z1(t);
        return [e, e]
    }
}
function Z1(t) {
    const e = Yv(t);
    return x_(e, "<transition> explicit duration"),
    e
}
function Lo(t, e) {
    e.split(/\s+/).forEach(r => r && t.classList.add(r)),
    (t._vtc || (t._vtc = new Set)).add(e)
}
function Is(t, e) {
    e.split(/\s+/).forEach(n => n && t.classList.remove(n));
    const {_vtc: r} = t;
    r && (r.delete(e),
    r.size || (t._vtc = void 0))
}
function _8(t) {
    requestAnimationFrame( () => {
        requestAnimationFrame(t)
    }
    )
}
let uG = 0;
function b8(t, e, r, n) {
    const i = t._endId = ++uG
      , o = () => {
        i === t._endId && n()
    }
    ;
    if (r)
        return setTimeout(o, r);
    const {type: s, timeout: a, propCount: l} = HB(t, e);
    if (!s)
        return n();
    const c = s + "end";
    let u = 0;
    const f = () => {
        t.removeEventListener(c, d),
        o()
    }
      , d = h => {
        h.target === t && ++u >= l && f()
    }
    ;
    setTimeout( () => {
        u < l && f()
    }
    , a + 1),
    t.addEventListener(c, d)
}
function HB(t, e) {
    const r = window.getComputedStyle(t)
      , n = x => (r[x] || "").split(", ")
      , i = n(`${As}Delay`)
      , o = n(`${As}Duration`)
      , s = C8(i, o)
      , a = n(`${ku}Delay`)
      , l = n(`${ku}Duration`)
      , c = C8(a, l);
    let u = null
      , f = 0
      , d = 0;
    e === As ? s > 0 && (u = As,
    f = s,
    d = o.length) : e === ku ? c > 0 && (u = ku,
    f = c,
    d = l.length) : (f = Math.max(s, c),
    u = f > 0 ? s > c ? As : ku : null,
    d = u ? u === As ? o.length : l.length : 0);
    const h = u === As && /\b(transform|all)(,|$)/.test(n(`${As}Property`).toString());
    return {
        type: u,
        timeout: f,
        propCount: d,
        hasTransform: h
    }
}
function C8(t, e) {
    for (; t.length < e.length; )
        t = t.concat(t);
    return Math.max(...e.map( (r, n) => A8(r) + A8(t[n])))
}
function A8(t) {
    return Number(t.slice(0, -1).replace(",", ".")) * 1e3
}
function VB() {
    return document.body.offsetHeight
}
const zB = new WeakMap
  , jB = new WeakMap
  , WB = {
    name: "TransitionGroup",
    props: Yf({}, lG, {
        tag: String,
        moveClass: String
    }),
    setup(t, {slots: e}) {
        const r = It()
          , n = A_();
        let i, o;
        return Ml( () => {
            if (!i.length)
                return;
            const s = t.moveClass || `${t.name || "v"}-move`;
            if (!gG(i[0].el, r.vnode.el, s))
                return;
            i.forEach(hG),
            i.forEach(xG);
            const a = i.filter(pG);
            VB(),
            a.forEach(l => {
                const c = l.el
                  , u = c.style;
                Lo(c, s),
                u.transform = u.webkitTransform = u.transitionDuration = "";
                const f = c._moveCb = d => {
                    d && d.target !== c || (!d || /transform$/.test(d.propertyName)) && (c.removeEventListener("transitionend", f),
                    c._moveCb = null,
                    Is(c, s))
                }
                ;
                c.addEventListener("transitionend", f)
            }
            )
        }
        ),
        () => {
            const s = Le(t)
              , a = GB(s);
            let l = s.tag || Nt;
            i = o,
            o = e.default ? Cp(e.default()) : [];
            for (let c = 0; c < o.length; c++) {
                const u = o[c];
                u.key != null ? hl(u, Vc(u, a, n, r)) : ue("<TransitionGroup> children must be keyed.")
            }
            if (i)
                for (let c = 0; c < i.length; c++) {
                    const u = i[c];
                    hl(u, Vc(u, a, n, r)),
                    zB.set(u, u.el.getBoundingClientRect())
                }
            return O(l, null, o)
        }
    }
}
  , fG = t => delete t.mode;
WB.props;
const dG = WB;
function hG(t) {
    const e = t.el;
    e._moveCb && e._moveCb(),
    e._enterCb && e._enterCb()
}
function xG(t) {
    jB.set(t, t.el.getBoundingClientRect())
}
function pG(t) {
    const e = zB.get(t)
      , r = jB.get(t)
      , n = e.left - r.left
      , i = e.top - r.top;
    if (n || i) {
        const o = t.el.style;
        return o.transform = o.webkitTransform = `translate(${n}px,${i}px)`,
        o.transitionDuration = "0s",
        t
    }
}
function gG(t, e, r) {
    const n = t.cloneNode();
    t._vtc && t._vtc.forEach(s => {
        s.split(/\s+/).forEach(a => a && n.classList.remove(a))
    }
    ),
    r.split(/\s+/).forEach(s => s && n.classList.add(s)),
    n.style.display = "none";
    const i = e.nodeType === 1 ? e : e.parentNode;
    i.appendChild(n);
    const {hasTransform: o} = HB(n);
    return i.removeChild(n),
    o
}
const aa = t => {
    const e = t.props["onUpdate:modelValue"] || !1;
    return In(e) ? r => OU(e, r) : e
}
;
function mG(t) {
    t.target.composing = !0
}
function w8(t) {
    const e = t.target;
    e.composing && (e.composing = !1,
    e.dispatchEvent(new Event("input")))
}
const vx = {
    created(t, {modifiers: {lazy: e, trim: r, number: n}}, i) {
        t._assign = aa(i);
        const o = n || i.props && i.props.type === "number";
        Wo(t, e ? "change" : "input", s => {
            if (s.target.composing)
                return;
            let a = t.value;
            r && (a = a.trim()),
            o && (a = Wv(a)),
            t._assign(a)
        }
        ),
        r && Wo(t, "change", () => {
            t.value = t.value.trim()
        }
        ),
        e || (Wo(t, "compositionstart", mG),
        Wo(t, "compositionend", w8),
        Wo(t, "change", w8))
    },
    mounted(t, {value: e}) {
        t.value = e ?? ""
    },
    beforeUpdate(t, {value: e, modifiers: {lazy: r, trim: n, number: i}}, o) {
        if (t._assign = aa(o),
        t.composing || document.activeElement === t && t.type !== "range" && (r || n && t.value.trim() === e || (i || t.type === "number") && Wv(t.value) === e))
            return;
        const s = e ?? "";
        t.value !== s && (t.value = s)
    }
}
  , N_ = {
    deep: !0,
    created(t, e, r) {
        t._assign = aa(r),
        Wo(t, "change", () => {
            const n = t._modelValue
              , i = jc(t)
              , o = t.checked
              , s = t._assign;
            if (In(n)) {
                const a = Ip(n, i)
                  , l = a !== -1;
                if (o && !l)
                    s(n.concat(i));
                else if (!o && l) {
                    const c = [...n];
                    c.splice(a, 1),
                    s(c)
                }
            } else if (Xf(n)) {
                const a = new Set(n);
                o ? a.add(i) : a.delete(i),
                s(a)
            } else
                s(XB(t, o))
        }
        )
    },
    mounted: B8,
    beforeUpdate(t, e, r) {
        t._assign = aa(r),
        B8(t, e, r)
    }
};
function B8(t, {value: e, oldValue: r}, n) {
    t._modelValue = e,
    In(e) ? t.checked = Ip(e, n.props.value) > -1 : Xf(e) ? t.checked = e.has(n.props.value) : e !== r && (t.checked = sa(e, XB(t, !0)))
}
const L_ = {
    created(t, {value: e}, r) {
        t.checked = sa(e, r.props.value),
        t._assign = aa(r),
        Wo(t, "change", () => {
            t._assign(jc(t))
        }
        )
    },
    beforeUpdate(t, {value: e, oldValue: r}, n) {
        t._assign = aa(n),
        e !== r && (t.checked = sa(e, n.props.value))
    }
}
  , YB = {
    deep: !0,
    created(t, {value: e, modifiers: {number: r}}, n) {
        const i = Xf(e);
        Wo(t, "change", () => {
            const o = Array.prototype.filter.call(t.options, s => s.selected).map(s => r ? Wv(jc(s)) : jc(s));
            t._assign(t.multiple ? i ? new Set(o) : o : o[0])
        }
        ),
        t._assign = aa(n)
    },
    mounted(t, {value: e}) {
        S8(t, e)
    },
    beforeUpdate(t, e, r) {
        t._assign = aa(r)
    },
    updated(t, {value: e}) {
        S8(t, e)
    }
};
function S8(t, e) {
    const r = t.multiple;
    if (r && !In(e) && !Xf(e)) {
        ue(`<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(e).slice(8, -1)}.`);
        return
    }
    for (let n = 0, i = t.options.length; n < i; n++) {
        const o = t.options[n]
          , s = jc(o);
        if (r)
            In(e) ? o.selected = Ip(e, s) > -1 : o.selected = e.has(s);
        else if (sa(jc(o), e)) {
            t.selectedIndex !== n && (t.selectedIndex = n);
            return
        }
    }
    !r && t.selectedIndex !== -1 && (t.selectedIndex = -1)
}
function jc(t) {
    return "_value"in t ? t._value : t.value
}
function XB(t, e) {
    const r = e ? "_trueValue" : "_falseValue";
    return r in t ? t[r] : e
}
const KB = {
    created(t, e, r) {
        kd(t, e, r, null, "created")
    },
    mounted(t, e, r) {
        kd(t, e, r, null, "mounted")
    },
    beforeUpdate(t, e, r, n) {
        kd(t, e, r, n, "beforeUpdate")
    },
    updated(t, e, r, n) {
        kd(t, e, r, n, "updated")
    }
};
function qB(t, e) {
    switch (t) {
    case "SELECT":
        return YB;
    case "TEXTAREA":
        return vx;
    default:
        switch (e) {
        case "checkbox":
            return N_;
        case "radio":
            return L_;
        default:
            return vx
        }
    }
}
function kd(t, e, r, n, i) {
    const s = qB(t.tagName, r.props && r.props.type)[i];
    s && s(t, e, r, n)
}
function vG() {
    vx.getSSRProps = ({value: t}) => ({
        value: t
    }),
    L_.getSSRProps = ({value: t}, e) => {
        if (e.props && sa(e.props.value, t))
            return {
                checked: !0
            }
    }
    ,
    N_.getSSRProps = ({value: t}, e) => {
        if (In(t)) {
            if (e.props && Ip(t, e.props.value) > -1)
                return {
                    checked: !0
                }
        } else if (Xf(t)) {
            if (e.props && t.has(e.props.value))
                return {
                    checked: !0
                }
        } else if (t)
            return {
                checked: !0
            }
    }
    ,
    KB.getSSRProps = (t, e) => {
        if (typeof e.type != "string")
            return;
        const r = qB(e.type.toUpperCase(), e.props && e.props.type);
        if (r.getSSRProps)
            return r.getSSRProps(t, e)
    }
}
const yG = ["ctrl", "shift", "alt", "meta"]
  , EG = {
    stop: t => t.stopPropagation(),
    prevent: t => t.preventDefault(),
    self: t => t.target !== t.currentTarget,
    ctrl: t => !t.ctrlKey,
    shift: t => !t.shiftKey,
    alt: t => !t.altKey,
    meta: t => !t.metaKey,
    left: t => "button"in t && t.button !== 0,
    middle: t => "button"in t && t.button !== 1,
    right: t => "button"in t && t.button !== 2,
    exact: (t, e) => yG.some(r => t[`${r}Key`] && !e.includes(r))
}
  , _G = (t, e) => (r, ...n) => {
    for (let i = 0; i < e.length; i++) {
        const o = EG[e[i]];
        if (o && o(r, e))
            return
    }
    return t(r, ...n)
}
  , bG = {
    esc: "escape",
    space: " ",
    up: "arrow-up",
    left: "arrow-left",
    right: "arrow-right",
    down: "arrow-down",
    delete: "backspace"
}
  , ZB = (t, e) => r => {
    if (!("key"in r))
        return;
    const n = Ls(r.key);
    if (e.some(i => i === n || bG[i] === n))
        return t(r)
}
  , pi = {
    beforeMount(t, {value: e}, {transition: r}) {
        t._vod = t.style.display === "none" ? "" : t.style.display,
        r && e ? r.beforeEnter(t) : Ru(t, e)
    },
    mounted(t, {value: e}, {transition: r}) {
        r && e && r.enter(t)
    },
    updated(t, {value: e, oldValue: r}, {transition: n}) {
        !e != !r && (n ? e ? (n.beforeEnter(t),
        Ru(t, !0),
        n.enter(t)) : n.leave(t, () => {
            Ru(t, !1)
        }
        ) : Ru(t, e))
    },
    beforeUnmount(t, {value: e}) {
        Ru(t, e)
    }
};
function Ru(t, e) {
    t.style.display = e ? t._vod : "none"
}
function CG() {
    pi.getSSRProps = ({value: t}) => {
        if (!t)
            return {
                style: {
                    display: "none"
                }
            }
    }
}
const JB = Yf({
    patchProp: rG
}, HU);
let B0, T8 = !1;
function QB() {
    return B0 || (B0 = mB(JB))
}
function eS() {
    return B0 = T8 ? B0 : vB(JB),
    T8 = !0,
    B0
}
const Zv = (...t) => {
    QB().render(...t)
}
  , tS = (...t) => {
    eS().hydrate(...t)
}
  , rS = (...t) => {
    const e = QB().createApp(...t);
    nS(e),
    iS(e);
    const {mount: r} = e;
    return e.mount = n => {
        const i = oS(n);
        if (!i)
            return;
        const o = e._component;
        !MB(o) && !o.render && !o.template && (o.template = i.innerHTML),
        i.innerHTML = "";
        const s = r(i, !1, i instanceof SVGElement);
        return i instanceof Element && (i.removeAttribute("v-cloak"),
        i.setAttribute("data-v-app", "")),
        s
    }
    ,
    e
}
  , AG = (...t) => {
    const e = eS().createApp(...t);
    nS(e),
    iS(e);
    const {mount: r} = e;
    return e.mount = n => {
        const i = oS(n);
        if (i)
            return r(i, !0, i instanceof SVGElement)
    }
    ,
    e
}
;
function nS(t) {
    Object.defineProperty(t.config, "isNativeTag", {
        value: e => MU(e) || NU(e),
        writable: !1
    })
}
function iS(t) {
    if (k_()) {
        const e = t.config.isCustomElement;
        Object.defineProperty(t.config, "isCustomElement", {
            get() {
                return e
            },
            set() {
                ue("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")
            }
        });
        const r = t.config.compilerOptions
          , n = '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(t.config, "compilerOptions", {
            get() {
                return ue(n),
                r
            },
            set() {
                ue(n)
            }
        })
    }
}
function oS(t) {
    if (sf(t)) {
        const e = document.querySelector(t);
        return e || ue(`Failed to mount app: mount target selector "${t}" returned null.`),
        e
    }
    return window.ShadowRoot && t instanceof window.ShadowRoot && t.mode === "closed" && ue('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),
    t
}
let D8 = !1;
const wG = () => {
    D8 || (D8 = !0,
    vG(),
    CG())
}
;
function BG() {
    kB()
}
BG();
const SG = () => {
    ue('Runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".')
}
  , Jv = Object.freeze(Object.defineProperty({
    __proto__: null,
    BaseTransition: q5,
    BaseTransitionPropsValidators: w_,
    Comment: tr,
    EffectScope: s_,
    Fragment: Nt,
    KeepAlive: l$,
    ReactiveEffect: Lf,
    Static: qs,
    Suspense: ZL,
    Teleport: Bp,
    Text: go,
    Transition: Kf,
    TransitionGroup: dG,
    VueElement: Op,
    assertNumber: x_,
    callWithAsyncErrorHandling: zn,
    callWithErrorHandling: uo,
    camelize: Li,
    capitalize: Hc,
    cloneVNode: vi,
    compatUtils: wU,
    compile: SG,
    computed: ae,
    createApp: rS,
    createBlock: F_,
    createCommentVNode: fU,
    createElementBlock: sU,
    createElementVNode: P_,
    createHydrationRenderer: vB,
    createPropsRestProxy: O$,
    createRenderer: mB,
    createSSRApp: AG,
    createSlots: x$,
    createStaticVNode: uU,
    createTextVNode: Dp,
    createVNode: O,
    customRef: D5,
    defineAsyncComponent: s$,
    defineComponent: be,
    defineCustomElement: $B,
    defineEmits: b$,
    defineExpose: C$,
    defineModel: B$,
    defineOptions: A$,
    defineProps: _$,
    defineSSRCustomElement: iG,
    defineSlots: w$,
    get devtools() {
        return Bi
    },
    effect: bN,
    effectScope: Mf,
    getCurrentInstance: It,
    getCurrentScope: Nf,
    getTransitionRawChildren: Cp,
    guardReactiveProps: AB,
    h: Or,
    handleError: Rl,
    hasInjectionContext: uB,
    hydrate: tS,
    initCustomFormatter: kB,
    initDirectivesForSSR: wG,
    inject: dr,
    isMemoSame: RB,
    isProxy: q0,
    isReactive: Ri,
    isReadonly: as,
    isRef: xt,
    isRuntimeOnly: k_,
    isShallow: K0,
    isVNode: mo,
    markRaw: ao,
    mergeDefaults: P$,
    mergeModels: I$,
    mergeProps: st,
    nextTick: Xe,
    normalizeClass: Vf,
    normalizeProps: EL,
    normalizeStyle: Hf,
    onActivated: gs,
    onBeforeMount: Q5,
    onBeforeUnmount: Zn,
    onBeforeUpdate: wp,
    onDeactivated: wo,
    onErrorCaptured: nB,
    onMounted: Ht,
    onRenderTracked: rB,
    onRenderTriggered: tB,
    onScopeDispose: a_,
    onServerPrefetch: eB,
    onUnmounted: vs,
    onUpdated: Ml,
    openBlock: Sp,
    popScopeId: zL,
    provide: xi,
    proxyRefs: d_,
    pushScopeId: VL,
    queuePostFlushCb: Ep,
    reactive: Pt,
    readonly: kl,
    ref: ie,
    registerRuntimeCompiler: gU,
    render: Zv,
    renderList: h$,
    renderSlot: p$,
    resolveComponent: f$,
    resolveDirective: oB,
    resolveDynamicComponent: d$,
    resolveFilter: AU,
    resolveTransitionHooks: Vc,
    setBlockTracking: $v,
    setDevtoolsHook: v_,
    setTransitionHooks: hl,
    shallowReactive: S5,
    shallowReadonly: Ec,
    shallowRef: mp,
    ssrContextKey: IB,
    ssrUtils: CU,
    stop: CN,
    toDisplayString: _L,
    toHandlerKey: Ho,
    toHandlers: g$,
    toRaw: Le,
    toRef: v0,
    toRefs: wv,
    toValue: JN,
    transformVNodeArgs: aU,
    triggerRef: ZN,
    unref: hn,
    useAttrs: D$,
    useCssModule: sG,
    useCssVars: aG,
    useModel: F$,
    useSSRContext: OB,
    useSlots: T$,
    useTransitionState: A_,
    vModelCheckbox: N_,
    vModelDynamic: KB,
    vModelRadio: L_,
    vModelSelect: YB,
    vModelText: vx,
    vShow: pi,
    version: zv,
    warn: ue,
    watch: me,
    watchEffect: mu,
    watchPostEffect: Y5,
    watchSyncEffect: n$,
    withAsyncContext: k$,
    withCtx: E_,
    withDefaults: S$,
    withDirectives: hi,
    withKeys: ZB,
    withMemo: _U,
    withModifiers: _G,
    withScopeId: jL
}, Symbol.toStringTag, {
    value: "Module"
}));
var TG = !1;
function Rd(t, e, r) {
    return Array.isArray(t) ? (t.length = Math.max(t.length, e),
    t.splice(e, 1, r),
    r) : (t[e] = r,
    r)
}
function J1(t, e) {
    if (Array.isArray(t)) {
        t.splice(e, 1);
        return
    }
    delete t[e]
}
function DG() {
    return sS().__VUE_DEVTOOLS_GLOBAL_HOOK__
}
function sS() {
    return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {}
}
const FG = typeof Proxy == "function"
  , PG = "devtools-plugin:setup"
  , IG = "plugin:settings:set";
let Wl, Qv;
function OG() {
    var t;
    return Wl !== void 0 || (typeof window < "u" && window.performance ? (Wl = !0,
    Qv = window.performance) : typeof globalThis < "u" && (!((t = globalThis.perf_hooks) === null || t === void 0) && t.performance) ? (Wl = !0,
    Qv = globalThis.perf_hooks.performance) : Wl = !1),
    Wl
}
function kG() {
    return OG() ? Qv.now() : Date.now()
}
class RG {
    constructor(e, r) {
        this.target = null,
        this.targetQueue = [],
        this.onQueue = [],
        this.plugin = e,
        this.hook = r;
        const n = {};
        if (e.settings)
            for (const s in e.settings) {
                const a = e.settings[s];
                n[s] = a.defaultValue
            }
        const i = `__vue-devtools-plugin-settings__${e.id}`;
        let o = Object.assign({}, n);
        try {
            const s = localStorage.getItem(i)
              , a = JSON.parse(s);
            Object.assign(o, a)
        } catch {}
        this.fallbacks = {
            getSettings() {
                return o
            },
            setSettings(s) {
                try {
                    localStorage.setItem(i, JSON.stringify(s))
                } catch {}
                o = s
            },
            now() {
                return kG()
            }
        },
        r && r.on(IG, (s, a) => {
            s === this.plugin.id && this.fallbacks.setSettings(a)
        }
        ),
        this.proxiedOn = new Proxy({},{
            get: (s, a) => this.target ? this.target.on[a] : (...l) => {
                this.onQueue.push({
                    method: a,
                    args: l
                })
            }
        }),
        this.proxiedTarget = new Proxy({},{
            get: (s, a) => this.target ? this.target[a] : a === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(a) ? (...l) => (this.targetQueue.push({
                method: a,
                args: l,
                resolve: () => {}
            }),
            this.fallbacks[a](...l)) : (...l) => new Promise(c => {
                this.targetQueue.push({
                    method: a,
                    args: l,
                    resolve: c
                })
            }
            )
        })
    }
    async setRealTarget(e) {
        this.target = e;
        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 kp(t, e) {
    const r = t
      , n = sS()
      , i = DG()
      , o = FG && r.enableEarlyProxy;
    if (i && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !o))
        i.emit(PG, t, e);
    else {
        const s = o ? new RG(r,i) : null;
        (n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
            pluginDescriptor: r,
            setupFn: e,
            proxy: s
        }),
        s && e(s.proxiedTarget)
    }
}
/*!
 * pinia v2.3.1
 * (c) 2025 Eduardo San Martin Morote
 * @license MIT
 */
let ey;
const af = t => ey = t
  , aS = Symbol("pinia");
function pl(t) {
    return t && typeof t == "object" && Object.prototype.toString.call(t) === "[object Object]" && typeof t.toJSON != "function"
}
var fo;
(function(t) {
    t.direct = "direct",
    t.patchObject = "patch object",
    t.patchFunction = "patch function"
}
)(fo || (fo = {}));
const ol = typeof window < "u"
  , F8 = ( () => 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 MG(t, {autoBom: e=!1}={}) {
    return e && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type) ? new Blob([String.fromCharCode(65279), t],{
        type: t.type
    }) : t
}
function $_(t, e, r) {
    const n = new XMLHttpRequest;
    n.open("GET", t),
    n.responseType = "blob",
    n.onload = function() {
        uS(n.response, e, r)
    }
    ,
    n.onerror = function() {
        console.error("could not download file")
    }
    ,
    n.send()
}
function lS(t) {
    const e = new XMLHttpRequest;
    e.open("HEAD", t, !1);
    try {
        e.send()
    } catch {}
    return e.status >= 200 && e.status <= 299
}
function Rh(t) {
    try {
        t.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),
        t.dispatchEvent(r)
    }
}
const Mh = typeof navigator == "object" ? navigator : {
    userAgent: ""
}
  , cS = ( () => /Macintosh/.test(Mh.userAgent) && /AppleWebKit/.test(Mh.userAgent) && !/Safari/.test(Mh.userAgent))()
  , uS = ol ? typeof HTMLAnchorElement < "u" && "download"in HTMLAnchorElement.prototype && !cS ? NG : "msSaveOrOpenBlob"in Mh ? LG : $G : () => {}
;
function NG(t, e="download", r) {
    const n = document.createElement("a");
    n.download = e,
    n.rel = "noopener",
    typeof t == "string" ? (n.href = t,
    n.origin !== location.origin ? lS(n.href) ? $_(t, e, r) : (n.target = "_blank",
    Rh(n)) : Rh(n)) : (n.href = URL.createObjectURL(t),
    setTimeout(function() {
        URL.revokeObjectURL(n.href)
    }, 4e4),
    setTimeout(function() {
        Rh(n)
    }, 0))
}
function LG(t, e="download", r) {
    if (typeof t == "string")
        if (lS(t))
            $_(t, e, r);
        else {
            const n = document.createElement("a");
            n.href = t,
            n.target = "_blank",
            setTimeout(function() {
                Rh(n)
            })
        }
    else
        navigator.msSaveOrOpenBlob(MG(t, r), e)
}
function $G(t, e, r, n) {
    if (n = n || open("", "_blank"),
    n && (n.document.title = n.document.body.innerText = "downloading..."),
    typeof t == "string")
        return $_(t, e, r);
    const i = t.type === "application/octet-stream"
      , o = /constructor/i.test(String(F8.HTMLElement)) || "safari"in F8
      , s = /CriOS\/[\d]+/.test(navigator.userAgent);
    if ((s || i && o || cS) && typeof FileReader < "u") {
        const a = new FileReader;
        a.onloadend = function() {
            let l = a.result;
            if (typeof l != "string")
                throw n = null,
                new Error("Wrong reader.result type");
            l = s ? l : l.replace(/^data:[^;]*;/, "data:attachment/file;"),
            n ? n.location.href = l : location.assign(l),
            n = null
        }
        ,
        a.readAsDataURL(t)
    } else {
        const a = URL.createObjectURL(t);
        n ? n.location.assign(a) : location.href = a,
        n = null,
        setTimeout(function() {
            URL.revokeObjectURL(a)
        }, 4e4)
    }
}
function Ir(t, e) {
    const r = "🍍 " + t;
    typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(r, e) : e === "error" ? console.error(r) : e === "warn" ? console.warn(r) : console.log(r)
}
function U_(t) {
    return "_a"in t && "install"in t
}
function fS() {
    if (!("clipboard"in navigator))
        return Ir("Your browser doesn't support the Clipboard API", "error"),
        !0
}
function dS(t) {
    return t instanceof Error && t.message.toLowerCase().includes("document is not focused") ? (Ir('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"),
    !0) : !1
}
async function UG(t) {
    if (!fS())
        try {
            await navigator.clipboard.writeText(JSON.stringify(t.state.value)),
            Ir("Global state copied to clipboard.")
        } catch (e) {
            if (dS(e))
                return;
            Ir("Failed to serialize the state. Check the console for more details.", "error"),
            console.error(e)
        }
}
async function GG(t) {
    if (!fS())
        try {
            hS(t, JSON.parse(await navigator.clipboard.readText())),
            Ir("Global state pasted from clipboard.")
        } catch (e) {
            if (dS(e))
                return;
            Ir("Failed to deserialize the state from clipboard. Check the console for more details.", "error"),
            console.error(e)
        }
}
async function HG(t) {
    try {
        uS(new Blob([JSON.stringify(t.state.value)],{
            type: "text/plain;charset=utf-8"
        }), "pinia-state.json")
    } catch (e) {
        Ir("Failed to export the state as JSON. Check the console for more details.", "error"),
        console.error(e)
    }
}
let Fo;
function VG() {
    Fo || (Fo = document.createElement("input"),
    Fo.type = "file",
    Fo.accept = ".json");
    function t() {
        return new Promise( (e, r) => {
            Fo.onchange = async () => {
                const n = Fo.files;
                if (!n)
                    return e(null);
                const i = n.item(0);
                return e(i ? {
                    text: await i.text(),
                    file: i
                } : null)
            }
            ,
            Fo.oncancel = () => e(null),
            Fo.onerror = r,
            Fo.click()
        }
        )
    }
    return t
}
async function zG(t) {
    try {
        const r = await VG()();
        if (!r)
            return;
        const {text: n, file: i} = r;
        hS(t, JSON.parse(n)),
        Ir(`Global state imported from "${i.name}".`)
    } catch (e) {
        Ir("Failed to import the state from JSON. Check the console for more details.", "error"),
        console.error(e)
    }
}
function hS(t, e) {
    for (const r in e) {
        const n = t.state.value[r];
        n ? Object.assign(n, e[r]) : t.state.value[r] = e[r]
    }
}
function wi(t) {
    return {
        _custom: {
            display: t
        }
    }
}
const xS = "🍍 Pinia (root)"
  , Nh = "_root";
function jG(t) {
    return U_(t) ? {
        id: Nh,
        label: xS
    } : {
        id: t.$id,
        label: t.$id
    }
}
function WG(t) {
    if (U_(t)) {
        const r = Array.from(t._s.keys())
          , n = t._s;
        return {
            state: r.map(o => ({
                editable: !0,
                key: o,
                value: t.state.value[o]
            })),
            getters: r.filter(o => n.get(o)._getters).map(o => {
                const s = n.get(o);
                return {
                    editable: !1,
                    key: o,
                    value: s._getters.reduce( (a, l) => (a[l] = s[l],
                    a), {})
                }
            }
            )
        }
    }
    const e = {
        state: Object.keys(t.$state).map(r => ({
            editable: !0,
            key: r,
            value: t.$state[r]
        }))
    };
    return t._getters && t._getters.length && (e.getters = t._getters.map(r => ({
        editable: !1,
        key: r,
        value: t[r]
    }))),
    t._customProperties.size && (e.customProperties = Array.from(t._customProperties).map(r => ({
        editable: !0,
        key: r,
        value: t[r]
    }))),
    e
}
function YG(t) {
    return t ? Array.isArray(t) ? t.reduce( (e, r) => (e.keys.push(r.key),
    e.operations.push(r.type),
    e.oldValue[r.key] = r.oldValue,
    e.newValue[r.key] = r.newValue,
    e), {
        oldValue: {},
        keys: [],
        operations: [],
        newValue: {}
    }) : {
        operation: wi(t.type),
        key: wi(t.key),
        oldValue: t.oldValue,
        newValue: t.newValue
    } : {}
}
function XG(t) {
    switch (t) {
    case fo.direct:
        return "mutation";
    case fo.patchFunction:
        return "$patch";
    case fo.patchObject:
        return "$patch";
    default:
        return "unknown"
    }
}
let _c = !0;
const Lh = []
  , Oa = "pinia:mutations"
  , Xr = "pinia"
  , {assign: KG} = Object
  , yx = t => "🍍 " + t;
function qG(t, e) {
    kp({
        id: "dev.esm.pinia",
        label: "Pinia 🍍",
        logo: "https://pinia.vuejs.org/logo.svg",
        packageName: "pinia",
        homepage: "https://pinia.vuejs.org",
        componentStateTypes: Lh,
        app: t
    }, r => {
        typeof r.now != "function" && Ir("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: Oa,
            label: "Pinia 🍍",
            color: 15064968
        }),
        r.addInspector({
            id: Xr,
            label: "Pinia 🍍",
            icon: "storage",
            treeFilterPlaceholder: "Search stores",
            actions: [{
                icon: "content_copy",
                action: () => {
                    UG(e)
                }
                ,
                tooltip: "Serialize and copy the state"
            }, {
                icon: "content_paste",
                action: async () => {
                    await GG(e),
                    r.sendInspectorTree(Xr),
                    r.sendInspectorState(Xr)
                }
                ,
                tooltip: "Replace the state with the content of your clipboard"
            }, {
                icon: "save",
                action: () => {
                    HG(e)
                }
                ,
                tooltip: "Save the state as a JSON file"
            }, {
                icon: "folder_open",
                action: async () => {
                    await zG(e),
                    r.sendInspectorTree(Xr),
                    r.sendInspectorState(Xr)
                }
                ,
                tooltip: "Import the state from a JSON file"
            }],
            nodeActions: [{
                icon: "restore",
                tooltip: 'Reset the state (with "$reset")',
                action: n => {
                    const i = e._s.get(n);
                    i ? typeof i.$reset != "function" ? Ir(`Cannot reset "${n}" store because it doesn't have a "$reset" method implemented.`, "warn") : (i.$reset(),
                    Ir(`Store "${n}" reset.`)) : Ir(`Cannot reset "${n}" store because it wasn't found.`, "warn")
                }
            }]
        }),
        r.on.inspectComponent( (n, i) => {
            const o = n.componentInstance && n.componentInstance.proxy;
            if (o && o._pStores) {
                const s = n.componentInstance.proxy._pStores;
                Object.values(s).forEach(a => {
                    n.instanceData.state.push({
                        type: yx(a.$id),
                        key: "state",
                        editable: !0,
                        value: a._isOptionsAPI ? {
                            _custom: {
                                value: Le(a.$state),
                                actions: [{
                                    icon: "restore",
                                    tooltip: "Reset the state of this store",
                                    action: () => a.$reset()
                                }]
                            }
                        } : Object.keys(a.$state).reduce( (l, c) => (l[c] = a.$state[c],
                        l), {})
                    }),
                    a._getters && a._getters.length && n.instanceData.state.push({
                        type: yx(a.$id),
                        key: "getters",
                        editable: !1,
                        value: a._getters.reduce( (l, c) => {
                            try {
                                l[c] = a[c]
                            } catch (u) {
                                l[c] = u
                            }
                            return l
                        }
                        , {})
                    })
                }
                )
            }
        }
        ),
        r.on.getInspectorTree(n => {
            if (n.app === t && n.inspectorId === Xr) {
                let i = [e];
                i = i.concat(Array.from(e._s.values())),
                n.rootNodes = (n.filter ? i.filter(o => "$id"in o ? o.$id.toLowerCase().includes(n.filter.toLowerCase()) : xS.toLowerCase().includes(n.filter.toLowerCase())) : i).map(jG)
            }
        }
        ),
        globalThis.$pinia = e,
        r.on.getInspectorState(n => {
            if (n.app === t && n.inspectorId === Xr) {
                const i = n.nodeId === Nh ? e : e._s.get(n.nodeId);
                if (!i)
                    return;
                i && (n.nodeId !== Nh && (globalThis.$store = Le(i)),
                n.state = WG(i))
            }
        }
        ),
        r.on.editInspectorState( (n, i) => {
            if (n.app === t && n.inspectorId === Xr) {
                const o = n.nodeId === Nh ? e : e._s.get(n.nodeId);
                if (!o)
                    return Ir(`store "${n.nodeId}" not found`, "error");
                const {path: s} = n;
                U_(o) ? s.unshift("state") : (s.length !== 1 || !o._customProperties.has(s[0]) || s[0]in o.$state) && s.unshift("$state"),
                _c = !1,
                n.set(o, s, n.state.value),
                _c = !0
            }
        }
        ),
        r.on.editComponentState(n => {
            if (n.type.startsWith("🍍")) {
                const i = n.type.replace(/^🍍\s*/, "")
                  , o = e._s.get(i);
                if (!o)
                    return Ir(`store "${i}" not found`, "error");
                const {path: s} = n;
                if (s[0] !== "state")
                    return Ir(`Invalid path for store "${i}":
${s}
Only state can be modified.`);
                s[0] = "$state",
                _c = !1,
                n.set(o, s, n.state.value),
                _c = !0
            }
        }
        )
    }
    )
}
function ZG(t, e) {
    Lh.includes(yx(e.$id)) || Lh.push(yx(e.$id)),
    kp({
        id: "dev.esm.pinia",
        label: "Pinia 🍍",
        logo: "https://pinia.vuejs.org/logo.svg",
        packageName: "pinia",
        homepage: "https://pinia.vuejs.org",
        componentStateTypes: Lh,
        app: t,
        settings: {
            logStoreChanges: {
                label: "Notify about new/deleted stores",
                type: "boolean",
                defaultValue: !0
            }
        }
    }, r => {
        const n = typeof r.now == "function" ? r.now.bind(r) : Date.now;
        e.$onAction( ({after: s, onError: a, name: l, args: c}) => {
            const u = pS++;
            r.addTimelineEvent({
                layerId: Oa,
                event: {
                    time: n(),
                    title: "🛫 " + l,
                    subtitle: "start",
                    data: {
                        store: wi(e.$id),
                        action: wi(l),
                        args: c
                    },
                    groupId: u
                }
            }),
            s(f => {
                Us = void 0,
                r.addTimelineEvent({
                    layerId: Oa,
                    event: {
                        time: n(),
                        title: "🛬 " + l,
                        subtitle: "end",
                        data: {
                            store: wi(e.$id),
                            action: wi(l),
                            args: c,
                            result: f
                        },
                        groupId: u
                    }
                })
            }
            ),
            a(f => {
                Us = void 0,
                r.addTimelineEvent({
                    layerId: Oa,
                    event: {
                        time: n(),
                        logType: "error",
                        title: "💥 " + l,
                        subtitle: "end",
                        data: {
                            store: wi(e.$id),
                            action: wi(l),
                            args: c,
                            error: f
                        },
                        groupId: u
                    }
                })
            }
            )
        }
        , !0),
        e._customProperties.forEach(s => {
            me( () => hn(e[s]), (a, l) => {
                r.notifyComponentUpdate(),
                r.sendInspectorState(Xr),
                _c && r.addTimelineEvent({
                    layerId: Oa,
                    event: {
                        time: n(),
                        title: "Change",
                        subtitle: s,
                        data: {
                            newValue: a,
                            oldValue: l
                        },
                        groupId: Us
                    }
                })
            }
            , {
                deep: !0
            })
        }
        ),
        e.$subscribe( ({events: s, type: a}, l) => {
            if (r.notifyComponentUpdate(),
            r.sendInspectorState(Xr),
            !_c)
                return;
            const c = {
                time: n(),
                title: XG(a),
                data: KG({
                    store: wi(e.$id)
                }, YG(s)),
                groupId: Us
            };
            a === fo.patchFunction ? c.subtitle = "⤵️" : a === fo.patchObject ? c.subtitle = "🧩" : s && !Array.isArray(s) && (c.subtitle = s.type),
            s && (c.data["rawEvent(s)"] = {
                _custom: {
                    display: "DebuggerEvent",
                    type: "object",
                    tooltip: "raw DebuggerEvent[]",
                    value: s
                }
            }),
            r.addTimelineEvent({
                layerId: Oa,
                event: c
            })
        }
        , {
            detached: !0,
            flush: "sync"
        });
        const i = e._hotUpdate;
        e._hotUpdate = ao(s => {
            i(s),
            r.addTimelineEvent({
                layerId: Oa,
                event: {
                    time: n(),
                    title: "🔥 " + e.$id,
                    subtitle: "HMR update",
                    data: {
                        store: wi(e.$id),
                        info: wi("HMR update")
                    }
                }
            }),
            r.notifyComponentUpdate(),
            r.sendInspectorTree(Xr),
            r.sendInspectorState(Xr)
        }
        );
        const {$dispose: o} = e;
        e.$dispose = () => {
            o(),
            r.notifyComponentUpdate(),
            r.sendInspectorTree(Xr),
            r.sendInspectorState(Xr),
            r.getSettings().logStoreChanges && Ir(`Disposed "${e.$id}" store 🗑`)
        }
        ,
        r.notifyComponentUpdate(),
        r.sendInspectorTree(Xr),
        r.sendInspectorState(Xr),
        r.getSettings().logStoreChanges && Ir(`"${e.$id}" store installed 🆕`)
    }
    )
}
let pS = 0, Us;
function P8(t, e, r) {
    const n = e.reduce( (i, o) => (i[o] = Le(t)[o],
    i), {});
    for (const i in n)
        t[i] = function() {
            const o = pS
              , s = r ? new Proxy(t,{
                get(...l) {
                    return Us = o,
                    Reflect.get(...l)
                },
                set(...l) {
                    return Us = o,
                    Reflect.set(...l)
                }
            }) : t;
            Us = o;
            const a = n[i].apply(s, arguments);
            return Us = void 0,
            a
        }
}
function JG({app: t, store: e, options: r}) {
    if (!e.$id.startsWith("__hot:")) {
        if (e._isOptionsAPI = !!r.state,
        !e._p._testing) {
            P8(e, Object.keys(r.actions), e._isOptionsAPI);
            const n = e._hotUpdate;
            Le(e)._hotUpdate = function(i) {
                n.apply(this, arguments),
                P8(e, Object.keys(i._hmrPayload.actions), !!e._isOptionsAPI)
            }
        }
        ZG(t, e)
    }
}
function R3e() {
    const t = Mf(!0)
      , e = t.run( () => ie({}));
    let r = []
      , n = [];
    const i = ao({
        install(o) {
            af(i),
            i._a = o,
            o.provide(aS, i),
            o.config.globalProperties.$pinia = i,
            ol && qG(o, i),
            n.forEach(s => r.push(s)),
            n = []
        },
        use(o) {
            return !this._a && !TG ? n.push(o) : r.push(o),
            this
        },
        _p: r,
        _a: null,
        _e: t,
        _s: new Map,
        state: e
    });
    return ol && typeof Proxy < "u" && i.use(JG),
    i
}
function gS(t, e) {
    for (const r in e) {
        const n = e[r];
        if (!(r in t))
            continue;
        const i = t[r];
        pl(i) && pl(n) && !xt(n) && !Ri(n) ? t[r] = gS(i, n) : t[r] = n
    }
    return t
}
const QG = () => {}
;
function I8(t, e, r, n=QG) {
    t.push(e);
    const i = () => {
        const o = t.indexOf(e);
        o > -1 && (t.splice(o, 1),
        n())
    }
    ;
    return !r && Nf() && a_(i),
    i
}
function Yl(t, ...e) {
    t.slice().forEach(r => {
        r(...e)
    }
    )
}
const eH = t => t()
  , O8 = Symbol()
  , Q1 = Symbol();
function ty(t, e) {
    t instanceof Map && e instanceof Map ? e.forEach( (r, n) => t.set(n, r)) : t instanceof Set && e instanceof Set && e.forEach(t.add, t);
    for (const r in e) {
        if (!e.hasOwnProperty(r))
            continue;
        const n = e[r]
          , i = t[r];
        pl(i) && pl(n) && t.hasOwnProperty(r) && !xt(n) && !Ri(n) ? t[r] = ty(i, n) : t[r] = n
    }
    return t
}
const tH = Symbol("pinia:skipHydration");
function rH(t) {
    return !pl(t) || !t.hasOwnProperty(tH)
}
const {assign: oi} = Object;
function k8(t) {
    return !!(xt(t) && t.effect)
}
function R8(t, e, r, n) {
    const {state: i, actions: o, getters: s} = e
      , a = r.state.value[t];
    let l;
    function c() {
        !a && !n && (r.state.value[t] = i ? i() : {});
        const u = wv(n ? ie(i ? i() : {}).value : r.state.value[t]);
        return oi(u, o, Object.keys(s || {}).reduce( (f, d) => (d in u && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${d}" in store "${t}".`),
        f[d] = ao(ae( () => {
            af(r);
            const h = r._s.get(t);
            return s[d].call(h, h)
        }
        )),
        f), {}))
    }
    return l = ry(t, c, e, r, n, !0),
    l
}
function ry(t, e, r={}, n, i, o) {
    let s;
    const a = oi({
        actions: {}
    }, r);
    if (!n._e.active)
        throw new Error("Pinia destroyed");
    const l = {
        deep: !0
    };
    l.onTrigger = A => {
        c ? h = A : c == !1 && !C._hotUpdating && (Array.isArray(h) ? h.push(A) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))
    }
    ;
    let c, u, f = [], d = [], h;
    const x = n.state.value[t];
    !o && !x && !i && (n.state.value[t] = {});
    const y = ie({});
    let m;
    function E(A) {
        let w;
        c = u = !1,
        h = [],
        typeof A == "function" ? (A(n.state.value[t]),
        w = {
            type: fo.patchFunction,
            storeId: t,
            events: h
        }) : (ty(n.state.value[t], A),
        w = {
            type: fo.patchObject,
            payload: A,
            storeId: t,
            events: h
        });
        const S = m = Symbol();
        Xe().then( () => {
            m === S && (c = !0)
        }
        ),
        u = !0,
        Yl(f, w, n.state.value[t])
    }
    const g = o ? function() {
        const {state: w} = r
          , S = w ? w() : {};
        this.$patch(D => {
            oi(D, S)
        }
        )
    }
    : () => {
        throw new Error(`🍍: Store "${t}" is built using the setup syntax and does not implement $reset().`)
    }
    ;
    function p() {
        s.stop(),
        f = [],
        d = [],
        n._s.delete(t)
    }
    const v = (A, w="") => {
        if (O8 in A)
            return A[Q1] = w,
            A;
        const S = function() {
            af(n);
            const D = Array.from(arguments)
              , F = []
              , R = [];
            function P(K) {
                F.push(K)
            }
            function N(K) {
                R.push(K)
            }
            Yl(d, {
                args: D,
                name: S[Q1],
                store: C,
                after: P,
                onError: N
            });
            let j;
            try {
                j = A.apply(this && this.$id === t ? this : C, D)
            } catch (K) {
                throw Yl(R, K),
                K
            }
            return j instanceof Promise ? j.then(K => (Yl(F, K),
            K)).catch(K => (Yl(R, K),
            Promise.reject(K))) : (Yl(F, j),
            j)
        };
        return S[O8] = !0,
        S[Q1] = w,
        S
    }
      , _ = ao({
        actions: {},
        getters: {},
        state: [],
        hotState: y
    })
      , b = {
        _p: n,
        $id: t,
        $onAction: I8.bind(null, d),
        $patch: E,
        $reset: g,
        $subscribe(A, w={}) {
            const S = I8(f, A, w.detached, () => D())
              , D = s.run( () => me( () => n.state.value[t], F => {
                (w.flush === "sync" ? u : c) && A({
                    storeId: t,
                    type: fo.direct,
                    events: h
                }, F)
            }
            , oi({}, l, w)));
            return S
        },
        $dispose: p
    }
      , C = Pt(oi({
        _hmrPayload: _,
        _customProperties: ao(new Set)
    }, b));
    n._s.set(t, C);
    const T = (n._a && n._a.runWithContext || eH)( () => n._e.run( () => (s = Mf()).run( () => e({
        action: v
    }))));
    for (const A in T) {
        const w = T[A];
        if (xt(w) && !k8(w) || Ri(w))
            i ? Rd(y.value, A, v0(T, A)) : o || (x && rH(w) && (xt(w) ? w.value = x[A] : ty(w, x[A])),
            n.state.value[t][A] = w),
            _.state.push(A);
        else if (typeof w == "function") {
            const S = i ? w : v(w, A);
            T[A] = S,
            _.actions[A] = w,
            a.actions[A] = w
        } else
            k8(w) && (_.getters[A] = o ? r.getters[A] : w,
            ol && (T._getters || (T._getters = ao([]))).push(A))
    }
    if (oi(C, T),
    oi(Le(C), T),
    Object.defineProperty(C, "$state", {
        get: () => i ? y.value : n.state.value[t],
        set: A => {
            if (i)
                throw new Error("cannot set hotState");
            E(w => {
                oi(w, A)
            }
            )
        }
    }),
    C._hotUpdate = ao(A => {
        C._hotUpdating = !0,
        A._hmrPayload.state.forEach(w => {
            if (w in C.$state) {
                const S = A.$state[w]
                  , D = C.$state[w];
                typeof S == "object" && pl(S) && pl(D) ? gS(S, D) : A.$state[w] = D
            }
            Rd(C, w, v0(A.$state, w))
        }
        ),
        Object.keys(C.$state).forEach(w => {
            w in A.$state || J1(C, w)
        }
        ),
        c = !1,
        u = !1,
        n.state.value[t] = v0(A._hmrPayload, "hotState"),
        u = !0,
        Xe().then( () => {
            c = !0
        }
        );
        for (const w in A._hmrPayload.actions) {
            const S = A[w];
            Rd(C, w, v(S, w))
        }
        for (const w in A._hmrPayload.getters) {
            const S = A._hmrPayload.getters[w]
              , D = o ? ae( () => (af(n),
            S.call(C, C))) : S;
            Rd(C, w, D)
        }
        Object.keys(C._hmrPayload.getters).forEach(w => {
            w in A._hmrPayload.getters || J1(C, w)
        }
        ),
        Object.keys(C._hmrPayload.actions).forEach(w => {
            w in A._hmrPayload.actions || J1(C, w)
        }
        ),
        C._hmrPayload = A._hmrPayload,
        C._getters = A._getters,
        C._hotUpdating = !1
    }
    ),
    ol) {
        const A = {
            writable: !0,
            configurable: !0,
            enumerable: !1
        };
        ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach(w => {
            Object.defineProperty(C, w, oi({
                value: C[w]
            }, A))
        }
        )
    }
    return n._p.forEach(A => {
        if (ol) {
            const w = s.run( () => A({
                store: C,
                app: n._a,
                pinia: n,
                options: a
            }));
            Object.keys(w || {}).forEach(S => C._customProperties.add(S)),
            oi(C, w)
        } else
            oi(C, s.run( () => A({
                store: C,
                app: n._a,
                pinia: n,
                options: a
            })))
    }
    ),
    C.$state && typeof C.$state == "object" && typeof C.$state.constructor == "function" && !C.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
	state: () => new MyClass()
Found in store "${C.$id}".`),
    x && o && r.hydrate && r.hydrate(C.$state, x),
    c = !0,
    u = !0,
    C
}
/*! #__NO_SIDE_EFFECTS__ */
function M3e(t, e, r) {
    let n, i;
    const o = typeof e == "function";
    if (typeof t == "string")
        n = t,
        i = o ? r : e;
    else if (i = t,
    n = t.id,
    typeof n != "string")
        throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
    function s(a, l) {
        const c = uB();
        if (a = a || (c ? dr(aS, null) : null),
        a && af(a),
        !ey)
            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.`);
        a = ey,
        a._s.has(n) || (o ? ry(n, e, i, a) : R8(n, i, a),
        s._pinia = a);
        const u = a._s.get(n);
        if (l) {
            const f = "__hot:" + n
              , d = o ? ry(f, e, i, a, !0) : R8(f, oi({}, i), a, !0);
            l._hotUpdate(d),
            delete a.state.value[f],
            a._s.delete(f)
        }
        if (ol) {
            const f = It();
            if (f && f.proxy && !l) {
                const d = f.proxy
                  , h = "_pStores"in d ? d._pStores : d._pStores = {};
                h[n] = u
            }
        }
        return u
    }
    return s.$id = n,
    s
}
(function(t, e) {
    var r = t.document, n = r.documentElement, i = r.querySelector('meta[name="viewport"]'), o = r.querySelector('meta[name="flexible"]'), s = 0, a = 0, l, c = e.flexible || (e.flexible = {});
    if (i) {
        console.warn("");
        var u = i.getAttribute("content").match(/initial\-scale=([\d\.]+)/);
        u && (a = parseFloat(u[1]),
        s = parseInt(1 / a))
    } else if (o) {
        var f = o.getAttribute("content");
        if (f) {
            var d = f.match(/initial\-dpr=([\d\.]+)/)
              , h = f.match(/maximum\-dpr=([\d\.]+)/);
            d && (s = parseFloat(d[1]),
            a = parseFloat((1 / s).toFixed(2))),
            h && (s = parseFloat(h[1]),
            a = parseFloat((1 / s).toFixed(2)))
        }
    }
    if (!s && !a) {
        t.navigator.appVersion.match(/android/gi);
        var x = t.navigator.appVersion.match(/iphone/gi)
          , y = t.devicePixelRatio;
        x ? y >= 3 && (!s || s >= 3) ? s = 3 : y >= 2 && (!s || s >= 2) ? s = 2 : s = 1 : s = 1,
        a = 1 / s
    }
    if (n.setAttribute("data-dpr", s),
    !i)
        if (i = r.createElement("meta"),
        i.setAttribute("name", "viewport"),
        i.setAttribute("content", "initial-scale=" + a + ", maximum-scale=" + a + ", minimum-scale=" + a + ", user-scalable=no"),
        n.firstElementChild)
            n.firstElementChild.appendChild(i);
        else {
            var m = r.createElement("div");
            m.appendChild(i),
            r.write(m.innerHTML)
        }
    function E() {
        var g = n.getBoundingClientRect().width;
        g / s > 540 && (g = 540 * s);
        var p = g / 10;
        n.style.fontSize = p + "px",
        c.rem = t.rem = p
    }
    t.addEventListener("resize", function() {
        clearTimeout(l),
        l = setTimeout(E, 300)
    }, !1),
    t.addEventListener("pageshow", function(g) {
        g.persisted && (clearTimeout(l),
        l = setTimeout(E, 300))
    }, !1),
    r.readyState === "complete" ? r.body.style.fontSize = 12 * s + "px" : r.addEventListener("DOMContentLoaded", function(g) {
        r.body.style.fontSize = 12 * s + "px"
    }, !1),
    E(),
    c.dpr = t.dpr = s,
    c.refreshRem = E,
    c.rem2px = function(g) {
        var p = parseFloat(g) * this.rem;
        return typeof g == "string" && g.match(/rem$/) && (p += "px"),
        p
    }
    ,
    c.px2rem = function(g) {
        var p = parseFloat(g) / this.rem;
        return typeof g == "string" && g.match(/px$/) && (p += "rem"),
        p
    }
}
)(window, window.lib || (window.lib = {}));
function nH(t) {
    return typeof t == "object" && t !== null
}
function M8(t, e) {
    return t = nH(t) ? t : Object.create(null),
    new Proxy(t,{
        get(r, n, i) {
            return n === "key" ? Reflect.get(r, n, i) : Reflect.get(r, n, i) || Reflect.get(e, n, i)
        }
    })
}
function iH(t, e) {
    return e.reduce( (r, n) => r == null ? void 0 : r[n], t)
}
function oH(t, e, r) {
    return e.slice(0, -1).reduce( (n, i) => /^(__proto__)$/.test(i) ? {} : n[i] = n[i] || {}, t)[e[e.length - 1]] = r,
    t
}
function sH(t, e) {
    return e.reduce( (r, n) => {
        const i = n.split(".");
        return oH(r, i, iH(t, i))
    }
    , {})
}
function aH(t, e) {
    return r => {
        var n;
        try {
            const {storage: i=localStorage, beforeRestore: o=void 0, afterRestore: s=void 0, serializer: a={
                serialize: JSON.stringify,
                deserialize: JSON.parse
            }, key: l=e.$id, paths: c=null, debug: u=!1} = r;
            return {
                storage: i,
                beforeRestore: o,
                afterRestore: s,
                serializer: a,
                key: ((n = t.key) != null ? n : f => f)(typeof l == "string" ? l : l(e.$id)),
                paths: c,
                debug: u
            }
        } catch (i) {
            return r.debug && console.error("[pinia-plugin-persistedstate]", i),
            null
        }
    }
}
function N8(t, {storage: e, serializer: r, key: n, debug: i}) {
    try {
        const o = e == null ? void 0 : e.getItem(n);
        o && t.$patch(r == null ? void 0 : r.deserialize(o))
    } catch (o) {
        i && console.error("[pinia-plugin-persistedstate]", o)
    }
}
function L8(t, {storage: e, serializer: r, key: n, paths: i, debug: o}) {
    try {
        const s = Array.isArray(i) ? sH(t, i) : t;
        e.setItem(n, r.serialize(s))
    } catch (s) {
        o && console.error("[pinia-plugin-persistedstate]", s)
    }
}
function lH(t={}) {
    return e => {
        const {auto: r=!1} = t
          , {options: {persist: n=r}, store: i, pinia: o} = e;
        if (!n)
            return;
        if (!(i.$id in o.state.value)) {
            const a = o._s.get(i.$id.replace("__hot:", ""));
            a && Promise.resolve().then( () => a.$persist());
            return
        }
        const s = (Array.isArray(n) ? n.map(a => M8(a, t)) : [M8(n, t)]).map(aH(t, i)).filter(Boolean);
        i.$persist = () => {
            s.forEach(a => {
                L8(i.$state, a)
            }
            )
        }
        ,
        i.$hydrate = ({runHooks: a=!0}={}) => {
            s.forEach(l => {
                const {beforeRestore: c, afterRestore: u} = l;
                a && (c == null || c(e)),
                N8(i, l),
                a && (u == null || u(e))
            }
            )
        }
        ,
        s.forEach(a => {
            const {beforeRestore: l, afterRestore: c} = a;
            l == null || l(e),
            N8(i, a),
            c == null || c(e),
            i.$subscribe( (u, f) => {
                L8(f, a)
            }
            , {
                detached: !0
            })
        }
        )
    }
}
var N3e = lH()
  , er = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Gi(t) {
    return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t
}
function G_(t) {
    if (t.__esModule)
        return t;
    var e = t.default;
    if (typeof e == "function") {
        var r = function n() {
            return this instanceof n ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments)
        };
        r.prototype = e.prototype
    } else
        r = {};
    return Object.defineProperty(r, "__esModule", {
        value: !0
    }),
    Object.keys(t).forEach(function(n) {
        var i = Object.getOwnPropertyDescriptor(t, n);
        Object.defineProperty(r, n, i.get ? i : {
            enumerable: !0,
            get: function() {
                return t[n]
            }
        })
    }),
    r
}
const zr = G_(Jv);
var mS = {
    exports: {}
}
  , H_ = Object.defineProperty
  , cH = Object.getOwnPropertyDescriptor
  , uH = Object.getOwnPropertyNames
  , fH = Object.prototype.hasOwnProperty
  , dH = (t, e) => {
    for (var r in e)
        H_(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , hH = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of uH(e))
            !fH.call(t, i) && i !== r && H_(t, i, {
                get: () => e[i],
                enumerable: !(n = cH(e, i)) || n.enumerable
            });
    return t
}
  , xH = t => hH(H_({}, "__esModule", {
    value: !0
}), t)
  , vS = {};
dH(vS, {
    extend: () => gH,
    flat: () => SH,
    get: () => CH,
    inBrowser: () => yS,
    isDate: () => yH,
    isDef: () => mH,
    isFunction: () => ny,
    isIOS: () => bH,
    isMobile: () => EH,
    isNumeric: () => _H,
    isObject: () => V_,
    isPromise: () => vH,
    isSameValue: () => wH,
    noop: () => pH,
    pick: () => AH,
    toArray: () => BH
});
var ha = xH(vS);
function pH() {}
const gH = Object.assign
  , yS = typeof window < "u"
  , V_ = t => t !== null && typeof t == "object"
  , mH = t => t != null
  , ny = t => typeof t == "function"
  , vH = t => V_(t) && ny(t.then) && ny(t.catch)
  , yH = t => Object.prototype.toString.call(t) === "[object Date]" && !Number.isNaN(t.getTime());
function EH(t) {
    return t = t.replace(/[^-|\d]/g, ""),
    /^((\+86)|(86))?(1)\d{10}$/.test(t) || /^0[0-9-]{10,13}$/.test(t)
}
const _H = t => typeof t == "number" || /^\d+(\.\d+)?$/.test(t)
  , bH = () => yS ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : !1;
function CH(t, e) {
    const r = e.split(".");
    let n = t;
    return r.forEach(i => {
        var o;
        n = V_(n) && (o = n[i]) != null ? o : ""
    }
    ),
    n
}
function AH(t, e, r) {
    return e.reduce( (n, i) => ((!r || t[i] !== void 0) && (n[i] = t[i]),
    n), {})
}
const wH = (t, e) => JSON.stringify(t) === JSON.stringify(e)
  , BH = t => Array.isArray(t) ? t : [t]
  , SH = t => t.reduce( (e, r) => e.concat(r), []);
var z_ = Object.defineProperty
  , TH = Object.getOwnPropertyDescriptor
  , DH = Object.getOwnPropertyNames
  , FH = Object.prototype.hasOwnProperty
  , PH = (t, e) => {
    for (var r in e)
        z_(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , IH = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of DH(e))
            !FH.call(t, i) && i !== r && z_(t, i, {
                get: () => e[i],
                enumerable: !(n = TH(e, i)) || n.enumerable
            });
    return t
}
  , OH = t => IH(z_({}, "__esModule", {
    value: !0
}), t)
  , ES = {};
PH(ES, {
    makeArrayProp: () => LH,
    makeNumberProp: () => $H,
    makeNumericProp: () => UH,
    makeRequiredProp: () => NH,
    makeStringProp: () => GH,
    numericProp: () => _S,
    truthProp: () => MH,
    unknownProp: () => RH
});
var kH = OH(ES);
const RH = null
  , _S = [Number, String]
  , MH = {
    type: Boolean,
    default: !0
}
  , NH = t => ({
    type: t,
    required: !0
})
  , LH = () => ({
    type: Array,
    default: () => []
})
  , $H = t => ({
    type: Number,
    default: t
})
  , UH = t => ({
    type: _S,
    default: t
})
  , GH = t => ({
    type: String,
    default: t
});
var Bo = typeof window < "u"
  , HH = !0;
function xn(t) {
    return Bo ? requestAnimationFrame(t) : -1
}
function qf(t) {
    Bo && cancelAnimationFrame(t)
}
function ja(t) {
    xn( () => xn(t))
}
var VH = t => t === window
  , $8 = (t, e) => ({
    top: 0,
    left: 0,
    right: t,
    bottom: e,
    width: t,
    height: e
})
  , Cr = t => {
    const e = hn(t);
    if (VH(e)) {
        const r = e.innerWidth
          , n = e.innerHeight;
        return $8(r, n)
    }
    return e != null && e.getBoundingClientRect ? e.getBoundingClientRect() : $8(0, 0)
}
;
function bS(t=!1) {
    const e = ie(t);
    return [e, (n=!e.value) => {
        e.value = n
    }
    ]
}
function Jn(t) {
    const e = dr(t, null);
    if (e) {
        const r = It()
          , {link: n, unlink: i, internalChildren: o} = e;
        n(r),
        vs( () => i(r));
        const s = ae( () => o.indexOf(r));
        return {
            parent: e,
            index: s
        }
    }
    return {
        parent: null,
        index: ie(-1)
    }
}
function CS(t) {
    const e = []
      , r = n => {
        Array.isArray(n) && n.forEach(i => {
            var o;
            mo(i) && (e.push(i),
            (o = i.component) != null && o.subTree && (e.push(i.component.subTree),
            r(i.component.subTree.children)),
            i.children && r(i.children))
        }
        )
    }
    ;
    return r(t),
    e
}
var U8 = (t, e) => {
    const r = t.indexOf(e);
    return r === -1 ? t.findIndex(n => e.key !== void 0 && e.key !== null && n.type === e.type && n.key === e.key) : r
}
;
function AS(t, e, r) {
    const n = CS(t.subTree.children);
    r.sort( (o, s) => U8(n, o.vnode) - U8(n, s.vnode));
    const i = r.map(o => o.proxy);
    e.sort( (o, s) => {
        const a = i.indexOf(o)
          , l = i.indexOf(s);
        return a - l
    }
    )
}
function Hi(t) {
    const e = Pt([])
      , r = Pt([])
      , n = It();
    return {
        children: e,
        linkChildren: o => {
            xi(t, Object.assign({
                link: l => {
                    l.proxy && (r.push(l),
                    e.push(l.proxy),
                    AS(n, e, r))
                }
                ,
                unlink: l => {
                    const c = r.indexOf(l);
                    e.splice(c, 1),
                    r.splice(c, 1)
                }
                ,
                children: e,
                internalChildren: r
            }, o))
        }
    }
}
var iy = 1e3
  , oy = 60 * iy
  , sy = 60 * oy
  , G8 = 24 * sy;
function zH(t) {
    const e = Math.floor(t / G8)
      , r = Math.floor(t % G8 / sy)
      , n = Math.floor(t % sy / oy)
      , i = Math.floor(t % oy / iy)
      , o = Math.floor(t % iy);
    return {
        total: t,
        days: e,
        hours: r,
        minutes: n,
        seconds: i,
        milliseconds: o
    }
}
function jH(t, e) {
    return Math.floor(t / 1e3) === Math.floor(e / 1e3)
}
function wS(t) {
    let e, r, n, i;
    const o = ie(t.time)
      , s = ae( () => zH(o.value))
      , a = () => {
        n = !1,
        qf(e)
    }
      , l = () => Math.max(r - Date.now(), 0)
      , c = y => {
        var m, E;
        o.value = y,
        (m = t.onChange) == null || m.call(t, s.value),
        y === 0 && (a(),
        (E = t.onFinish) == null || E.call(t))
    }
      , u = () => {
        e = xn( () => {
            n && (c(l()),
            o.value > 0 && u())
        }
        )
    }
      , f = () => {
        e = xn( () => {
            if (n) {
                const y = l();
                (!jH(y, o.value) || y === 0) && c(y),
                o.value > 0 && f()
            }
        }
        )
    }
      , d = () => {
        Bo && (t.millisecond ? u() : f())
    }
      , h = () => {
        n || (r = Date.now() + o.value,
        n = !0,
        d())
    }
      , x = (y=t.time) => {
        a(),
        o.value = y
    }
    ;
    return Zn(a),
    gs( () => {
        i && (n = !0,
        i = !1,
        d())
    }
    ),
    wo( () => {
        n && (a(),
        i = !0)
    }
    ),
    {
        start: h,
        pause: a,
        reset: x,
        current: s
    }
}
function yu(t) {
    let e;
    Ht( () => {
        t(),
        Xe( () => {
            e = !0
        }
        )
    }
    ),
    gs( () => {
        e && t()
    }
    )
}
function mn(t, e, r={}) {
    if (!Bo)
        return;
    const {target: n=window, passive: i=!1, capture: o=!1} = r;
    let s = !1, a;
    const l = f => {
        if (s)
            return;
        const d = hn(f);
        d && !a && (d.addEventListener(t, e, {
            capture: o,
            passive: i
        }),
        a = !0)
    }
      , c = f => {
        if (s)
            return;
        const d = hn(f);
        d && a && (d.removeEventListener(t, e, o),
        a = !1)
    }
    ;
    vs( () => c(n)),
    wo( () => c(n)),
    yu( () => l(n));
    let u;
    return xt(n) && (u = me(n, (f, d) => {
        c(d),
        l(f)
    }
    )),
    () => {
        u == null || u(),
        c(n),
        s = !0
    }
}
function BS(t, e, r={}) {
    if (!Bo)
        return;
    const {eventName: n="click"} = r;
    mn(n, o => {
        (Array.isArray(t) ? t : [t]).every(l => {
            const c = hn(l);
            return c && !c.contains(o.target)
        }
        ) && e(o)
    }
    , {
        target: document
    })
}
var Md, eg;
function SS() {
    if (!Md && (Md = ie(0),
    eg = ie(0),
    Bo)) {
        const t = () => {
            Md.value = window.innerWidth,
            eg.value = window.innerHeight
        }
        ;
        t(),
        window.addEventListener("resize", t, {
            passive: !0
        }),
        window.addEventListener("orientationchange", t, {
            passive: !0
        })
    }
    return {
        width: Md,
        height: eg
    }
}
var WH = /scroll|auto|overlay/i
  , TS = Bo ? window : void 0;
function YH(t) {
    return t.tagName !== "HTML" && t.tagName !== "BODY" && t.nodeType === 1
}
function j_(t, e=TS) {
    let r = t;
    for (; r && r !== e && YH(r); ) {
        const {overflowY: n} = window.getComputedStyle(r);
        if (WH.test(n))
            return r;
        r = r.parentNode
    }
    return e
}
function Zf(t, e=TS) {
    const r = ie();
    return Ht( () => {
        t.value && (r.value = j_(t.value, e))
    }
    ),
    r
}
var Nd;
function DS() {
    if (!Nd && (Nd = ie("visible"),
    Bo)) {
        const t = () => {
            Nd.value = document.hidden ? "hidden" : "visible"
        }
        ;
        t(),
        window.addEventListener("visibilitychange", t)
    }
    return Nd
}
var W_ = Symbol("van-field");
function Ll(t) {
    const e = dr(W_, null);
    e && !e.customValue.value && (e.customValue.value = t,
    me(t, () => {
        e.resetValidation(),
        e.validateWithTrigger("onChange")
    }
    ))
}
function XH(t, e) {
    if (Bo) {
        const {interval: r=0, isLoop: n=!1} = e || {};
        let i, o = !1, s;
        const a = () => {
            o = !0,
            cancelAnimationFrame(s)
        }
          , l = c => {
            if (!o) {
                if (i === void 0)
                    i = c;
                else if (c - i > r && (t(c),
                i = c,
                !n)) {
                    a();
                    return
                }
                s = requestAnimationFrame(l)
            }
        }
        ;
        return s = requestAnimationFrame(l),
        a
    }
    return () => {}
}
const KH = Object.freeze(Object.defineProperty({
    __proto__: null,
    CUSTOM_FIELD_INJECTION_KEY: W_,
    cancelRaf: qf,
    doubleRaf: ja,
    flattenVNodes: CS,
    getScrollParent: j_,
    inBrowser: Bo,
    onMountedOrActivated: yu,
    raf: xn,
    sortChildren: AS,
    supportsPassive: HH,
    useChildren: Hi,
    useClickAway: BS,
    useCountDown: wS,
    useCustomFieldValue: Ll,
    useEventListener: mn,
    usePageVisibility: DS,
    useParent: Jn,
    useRaf: XH,
    useRect: Cr,
    useScrollParent: Zf,
    useToggle: bS,
    useWindowSize: SS
}, Symbol.toStringTag, {
    value: "Module"
}))
  , Rp = G_(KH);
var Y_ = Object.defineProperty
  , qH = Object.getOwnPropertyDescriptor
  , ZH = Object.getOwnPropertyNames
  , JH = Object.prototype.hasOwnProperty
  , QH = (t, e) => {
    for (var r in e)
        Y_(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , eV = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of ZH(e))
            !JH.call(t, i) && i !== r && Y_(t, i, {
                get: () => e[i],
                enumerable: !(n = qH(e, i)) || n.enumerable
            });
    return t
}
  , tV = t => eV(Y_({}, "__esModule", {
    value: !0
}), t)
  , FS = {};
QH(FS, {
    getContainingBlock: () => dV,
    getElementTop: () => iV,
    getRootScrollTop: () => X_,
    getScrollTop: () => OS,
    isHidden: () => lV,
    preventDefault: () => aV,
    resetScroll: () => sV,
    setRootScrollTop: () => kS,
    setScrollTop: () => ay,
    stopPropagation: () => RS,
    windowHeight: () => uV,
    windowWidth: () => cV
});
var PS = tV(FS)
  , IS = Rp
  , rV = zr
  , nV = ha;
function OS(t) {
    const e = "scrollTop"in t ? t.scrollTop : t.pageYOffset;
    return Math.max(e, 0)
}
function ay(t, e) {
    "scrollTop"in t ? t.scrollTop = e : t.scrollTo(t.scrollX, e)
}
function X_() {
    return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0
}
function kS(t) {
    ay(window, t),
    ay(document.body, t)
}
function iV(t, e) {
    if (t === window)
        return 0;
    const r = e ? OS(e) : X_();
    return (0,
    IS.useRect)(t).top + r
}
const oV = (0,
nV.isIOS)();
function sV() {
    oV && kS(X_())
}
const RS = t => t.stopPropagation();
function aV(t, e) {
    (typeof t.cancelable != "boolean" || t.cancelable) && t.preventDefault(),
    e && RS(t)
}
function lV(t) {
    const e = (0,
    rV.unref)(t);
    if (!e)
        return !1;
    const r = window.getComputedStyle(e)
      , n = r.display === "none"
      , i = e.offsetParent === null && r.position !== "fixed";
    return n || i
}
const {width: cV, height: uV} = (0,
IS.useWindowSize)();
function fV(t) {
    const e = window.getComputedStyle(t);
    return e.transform !== "none" || e.perspective !== "none" || ["transform", "perspective", "filter"].some(r => (e.willChange || "").includes(r))
}
function dV(t) {
    let e = t.parentElement;
    for (; e; ) {
        if (e && e.tagName !== "HTML" && e.tagName !== "BODY" && fV(e))
            return e;
        e = e.parentElement
    }
    return null
}
var K_ = Object.defineProperty
  , hV = Object.getOwnPropertyDescriptor
  , xV = Object.getOwnPropertyNames
  , pV = Object.prototype.hasOwnProperty
  , gV = (t, e) => {
    for (var r in e)
        K_(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , mV = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of xV(e))
            !pV.call(t, i) && i !== r && K_(t, i, {
                get: () => e[i],
                enumerable: !(n = hV(e, i)) || n.enumerable
            });
    return t
}
  , vV = t => mV(K_({}, "__esModule", {
    value: !0
}), t)
  , MS = {};
gV(MS, {
    addNumber: () => OV,
    addUnit: () => $h,
    camelize: () => TV,
    clamp: () => PV,
    formatNumber: () => IV,
    getSizeStyle: () => EV,
    getZIndexStyle: () => _V,
    kebabCase: () => DV,
    padZero: () => FV,
    unitToPx: () => BV
});
var q_ = vV(MS)
  , yV = ha
  , NS = PS
  , ly = ha;
function $h(t) {
    if ((0,
    ly.isDef)(t))
        return (0,
        ly.isNumeric)(t) ? `${t}px` : String(t)
}
function EV(t) {
    if ((0,
    ly.isDef)(t)) {
        if (Array.isArray(t))
            return {
                width: $h(t[0]),
                height: $h(t[1])
            };
        const e = $h(t);
        return {
            width: e,
            height: e
        }
    }
}
function _V(t) {
    const e = {};
    return t !== void 0 && (e.zIndex = +t),
    e
}
let tg;
function bV() {
    if (!tg) {
        const t = document.documentElement
          , e = t.style.fontSize || window.getComputedStyle(t).fontSize;
        tg = parseFloat(e)
    }
    return tg
}
function CV(t) {
    return t = t.replace(/rem/g, ""),
    +t * bV()
}
function AV(t) {
    return t = t.replace(/vw/g, ""),
    +t * NS.windowWidth.value / 100
}
function wV(t) {
    return t = t.replace(/vh/g, ""),
    +t * NS.windowHeight.value / 100
}
function BV(t) {
    if (typeof t == "number")
        return t;
    if (yV.inBrowser) {
        if (t.includes("rem"))
            return CV(t);
        if (t.includes("vw"))
            return AV(t);
        if (t.includes("vh"))
            return wV(t)
    }
    return parseFloat(t)
}
const SV = /-(\w)/g
  , TV = t => t.replace(SV, (e, r) => r.toUpperCase())
  , DV = t => t.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
function FV(t, e=2) {
    let r = t + "";
    for (; r.length < e; )
        r = "0" + r;
    return r
}
const PV = (t, e, r) => Math.min(Math.max(t, e), r);
function H8(t, e, r) {
    const n = t.indexOf(e);
    return n === -1 ? t : e === "-" && n !== 0 ? t.slice(0, n) : t.slice(0, n + 1) + t.slice(n).replace(r, "")
}
function IV(t, e=!0, r=!0) {
    e ? t = H8(t, ".", /\./g) : t = t.split(".")[0],
    r ? t = H8(t, "-", /-/g) : t = t.replace(/-/, "");
    const n = e ? /[^-0-9.]/g : /[^-0-9]/g;
    return t.replace(n, "")
}
function OV(t, e) {
    return Math.round((t + e) * 1e10) / 1e10
}
var Z_ = Object.defineProperty
  , kV = Object.getOwnPropertyDescriptor
  , RV = Object.getOwnPropertyNames
  , MV = Object.prototype.hasOwnProperty
  , NV = (t, e) => {
    for (var r in e)
        Z_(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , LV = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of RV(e))
            !MV.call(t, i) && i !== r && Z_(t, i, {
                get: () => e[i],
                enumerable: !(n = kV(e, i)) || n.enumerable
            });
    return t
}
  , $V = t => LV(Z_({}, "__esModule", {
    value: !0
}), t)
  , LS = {};
NV(LS, {
    deepAssign: () => $S
});
var UV = $V(LS)
  , V8 = ha;
const {hasOwnProperty: GV} = Object.prototype;
function HV(t, e, r) {
    const n = e[r];
    (0,
    V8.isDef)(n) && (!GV.call(t, r) || !(0,
    V8.isObject)(n) ? t[r] = n : t[r] = $S(Object(t[r]), n))
}
function $S(t, e) {
    return Object.keys(e).forEach(r => {
        HV(t, e, r)
    }
    ),
    t
}
var J_ = Object.defineProperty
  , VV = Object.getOwnPropertyDescriptor
  , zV = Object.getOwnPropertyNames
  , jV = Object.prototype.hasOwnProperty
  , WV = (t, e) => {
    for (var r in e)
        J_(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , YV = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of zV(e))
            !jV.call(t, i) && i !== r && J_(t, i, {
                get: () => e[i],
                enumerable: !(n = VV(e, i)) || n.enumerable
            });
    return t
}
  , XV = t => YV(J_({}, "__esModule", {
    value: !0
}), t)
  , US = {};
WV(US, {
    default: () => qV
});
var KV = XV(US)
  , qV = {
    name: "姓名",
    tel: "电话",
    save: "保存",
    clear: "清空",
    cancel: "取消",
    confirm: "确认",
    delete: "删除",
    loading: "加载中...",
    noCoupon: "暂无优惠券",
    nameEmpty: "请填写姓名",
    addContact: "添加联系人",
    telInvalid: "请填写正确的电话",
    vanCalendar: {
        end: "结束",
        start: "开始",
        title: "日期选择",
        weekdays: ["日", "一", "二", "三", "四", "五", "六"],
        monthTitle: (t, e) => `${t}年${e}月`,
        rangePrompt: t => `最多选择 ${t} 天`
    },
    vanCascader: {
        select: "请选择"
    },
    vanPagination: {
        prev: "上一页",
        next: "下一页"
    },
    vanPullRefresh: {
        pulling: "下拉即可刷新...",
        loosing: "释放即可刷新..."
    },
    vanSubmitBar: {
        label: "合计:"
    },
    vanCoupon: {
        unlimited: "无门槛",
        discount: t => `${t}折`,
        condition: t => `满${t}元可用`
    },
    vanCouponCell: {
        title: "优惠券",
        count: t => `${t}张可用`
    },
    vanCouponList: {
        exchange: "兑换",
        close: "不使用",
        enable: "可用",
        disabled: "不可用",
        placeholder: "输入优惠码"
    },
    vanAddressEdit: {
        area: "地区",
        areaEmpty: "请选择地区",
        addressEmpty: "请填写详细地址",
        addressDetail: "详细地址",
        defaultAddress: "设为默认收货地址"
    },
    vanAddressList: {
        add: "新增地址"
    }
}
  , ZV = Object.create
  , Mp = Object.defineProperty
  , JV = Object.getOwnPropertyDescriptor
  , QV = Object.getOwnPropertyNames
  , ez = Object.getPrototypeOf
  , tz = Object.prototype.hasOwnProperty
  , rz = (t, e) => {
    for (var r in e)
        Mp(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , GS = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of QV(e))
            !tz.call(t, i) && i !== r && Mp(t, i, {
                get: () => e[i],
                enumerable: !(n = JV(e, i)) || n.enumerable
            });
    return t
}
  , nz = (t, e, r) => (r = t != null ? ZV(ez(t)) : {},
GS(e || !t || !t.__esModule ? Mp(r, "default", {
    value: t,
    enumerable: !0
}) : r, t))
  , iz = t => GS(Mp({}, "__esModule", {
    value: !0
}), t)
  , HS = {};
rz(HS, {
    Locale: () => zS,
    default: () => cz,
    useCurrentLang: () => lz
});
var oz = iz(HS)
  , VS = zr
  , sz = UV
  , az = nz(KV);
const cy = (0,
VS.ref)("zh-CN")
  , z8 = (0,
VS.reactive)({
    "zh-CN": az.default
})
  , zS = {
    messages() {
        return z8[cy.value]
    },
    use(t, e) {
        cy.value = t,
        this.add({
            [t]: e
        })
    },
    add(t={}) {
        (0,
        sz.deepAssign)(z8, t)
    }
}
  , lz = () => cy;
var cz = zS
  , uz = Object.create
  , Np = Object.defineProperty
  , fz = Object.getOwnPropertyDescriptor
  , dz = Object.getOwnPropertyNames
  , hz = Object.getPrototypeOf
  , xz = Object.prototype.hasOwnProperty
  , pz = (t, e) => {
    for (var r in e)
        Np(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , jS = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of dz(e))
            !xz.call(t, i) && i !== r && Np(t, i, {
                get: () => e[i],
                enumerable: !(n = fz(e, i)) || n.enumerable
            });
    return t
}
  , gz = (t, e, r) => (r = t != null ? uz(hz(t)) : {},
jS(e || !t || !t.__esModule ? Np(r, "default", {
    value: t,
    enumerable: !0
}) : r, t))
  , mz = t => jS(Np({}, "__esModule", {
    value: !0
}), t)
  , WS = {};
pz(WS, {
    createBEM: () => XS,
    createNamespace: () => _z,
    createTranslate: () => YS
});
var vz = mz(WS)
  , rg = ha
  , yz = q_
  , Ez = gz(oz);
function YS(t) {
    const e = (0,
    yz.camelize)(t) + ".";
    return (r, ...n) => {
        const i = Ez.default.messages()
          , o = (0,
        rg.get)(i, e + r) || (0,
        rg.get)(i, r);
        return (0,
        rg.isFunction)(o) ? o(...n) : o
    }
}
function uy(t, e) {
    return e ? typeof e == "string" ? ` ${t}--${e}` : Array.isArray(e) ? e.reduce( (r, n) => r + uy(t, n), "") : Object.keys(e).reduce( (r, n) => r + (e[n] ? uy(t, n) : ""), "") : ""
}
function XS(t) {
    return (e, r) => (e && typeof e != "string" && (r = e,
    e = ""),
    e = e ? `${t}__${e}` : t,
    `${e}${uy(e, r)}`)
}
function _z(t) {
    const e = `van-${t}`;
    return [e, XS(e), YS(e)]
}
var Q_ = Object.defineProperty
  , bz = Object.getOwnPropertyDescriptor
  , Cz = Object.getOwnPropertyNames
  , Az = Object.prototype.hasOwnProperty
  , wz = (t, e) => {
    for (var r in e)
        Q_(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , Bz = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of Cz(e))
            !Az.call(t, i) && i !== r && Q_(t, i, {
                get: () => e[i],
                enumerable: !(n = bz(e, i)) || n.enumerable
            });
    return t
}
  , Sz = t => Bz(Q_({}, "__esModule", {
    value: !0
}), t)
  , KS = {};
wz(KS, {
    BORDER: () => xa,
    BORDER_BOTTOM: () => Iz,
    BORDER_LEFT: () => Fz,
    BORDER_RIGHT: () => Pz,
    BORDER_SURROUND: () => Oz,
    BORDER_TOP: () => Dz,
    BORDER_TOP_BOTTOM: () => kz,
    BORDER_UNSET_TOP_BOTTOM: () => Rz,
    FORM_KEY: () => Nz,
    HAPTICS_FEEDBACK: () => Mz,
    LONG_PRESS_START_TIME: () => Lz,
    TAP_OFFSET: () => $z
});
var Tz = Sz(KS);
const xa = "van-hairline"
  , Dz = `${xa}--top`
  , Fz = `${xa}--left`
  , Pz = `${xa}--right`
  , Iz = `${xa}--bottom`
  , Oz = `${xa}--surround`
  , kz = `${xa}--top-bottom`
  , Rz = `${xa}-unset--top-bottom`
  , Mz = "van-haptics-feedback"
  , Nz = Symbol("van-form")
  , Lz = 500
  , $z = 5;
var e2 = Object.defineProperty
  , Uz = Object.getOwnPropertyDescriptor
  , Gz = Object.getOwnPropertyNames
  , Hz = Object.prototype.hasOwnProperty
  , Vz = (t, e) => {
    for (var r in e)
        e2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , zz = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of Gz(e))
            !Hz.call(t, i) && i !== r && e2(t, i, {
                get: () => e[i],
                enumerable: !(n = Uz(e, i)) || n.enumerable
            });
    return t
}
  , jz = t => zz(e2({}, "__esModule", {
    value: !0
}), t)
  , qS = {};
Vz(qS, {
    callInterceptor: () => Yz
});
var Wz = jz(qS)
  , j8 = ha;
function Yz(t, {args: e=[], done: r, canceled: n, error: i}) {
    if (t) {
        const o = t.apply(null, e);
        (0,
        j8.isPromise)(o) ? o.then(s => {
            s ? r() : n && n()
        }
        ).catch(i || j8.noop) : o ? r() : n && n()
    } else
        r()
}
var t2 = Object.defineProperty
  , Xz = Object.getOwnPropertyDescriptor
  , Kz = Object.getOwnPropertyNames
  , qz = Object.prototype.hasOwnProperty
  , Zz = (t, e) => {
    for (var r in e)
        t2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , Jz = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of Kz(e))
            !qz.call(t, i) && i !== r && t2(t, i, {
                get: () => e[i],
                enumerable: !(n = Xz(e, i)) || n.enumerable
            });
    return t
}
  , Qz = t => Jz(t2({}, "__esModule", {
    value: !0
}), t)
  , ZS = {};
Zz(ZS, {
    withInstall: () => rj
});
var ej = Qz(ZS)
  , tj = q_;
function rj(t) {
    return t.install = e => {
        const {name: r} = t;
        r && (e.component(r, t),
        e.component((0,
        tj.camelize)(`-${r}`), t))
    }
    ,
    t
}
var r2 = Object.defineProperty
  , nj = Object.getOwnPropertyDescriptor
  , ij = Object.getOwnPropertyNames
  , oj = Object.prototype.hasOwnProperty
  , sj = (t, e) => {
    for (var r in e)
        r2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , aj = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of ij(e))
            !oj.call(t, i) && i !== r && r2(t, i, {
                get: () => e[i],
                enumerable: !(n = nj(e, i)) || n.enumerable
            });
    return t
}
  , lj = t => aj(r2({}, "__esModule", {
    value: !0
}), t)
  , JS = {};
sj(JS, {
    closest: () => uj
});
var cj = lj(JS);
function uj(t, e) {
    return t.reduce( (r, n) => Math.abs(r - e) < Math.abs(n - e) ? r : n)
}
(function(t) {
    var e = Object.defineProperty
      , r = Object.getOwnPropertyDescriptor
      , n = Object.getOwnPropertyNames
      , i = Object.prototype.hasOwnProperty
      , o = (c, u, f, d) => {
        if (u && typeof u == "object" || typeof u == "function")
            for (let h of n(u))
                !i.call(c, h) && h !== f && e(c, h, {
                    get: () => u[h],
                    enumerable: !(d = r(u, h)) || d.enumerable
                });
        return c
    }
      , s = (c, u, f) => (o(c, u, "default"),
    f && o(f, u, "default"))
      , a = c => o(e({}, "__esModule", {
        value: !0
    }), c)
      , l = {};
    t.exports = a(l),
    s(l, ha, t.exports),
    s(l, kH, t.exports),
    s(l, PS, t.exports),
    s(l, vz, t.exports),
    s(l, q_, t.exports),
    s(l, Tz, t.exports),
    s(l, Wz, t.exports),
    s(l, ej, t.exports),
    s(l, cj, t.exports)
}
)(mS);
var jr = mS.exports
  , n2 = Object.defineProperty
  , fj = Object.getOwnPropertyDescriptor
  , dj = Object.getOwnPropertyNames
  , hj = Object.prototype.hasOwnProperty
  , xj = (t, e) => {
    for (var r in e)
        n2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , pj = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of dj(e))
            !hj.call(t, i) && i !== r && n2(t, i, {
                get: () => e[i],
                enumerable: !(n = fj(e, i)) || n.enumerable
            });
    return t
}
  , gj = t => pj(n2({}, "__esModule", {
    value: !0
}), t)
  , QS = {};
xj(QS, {
    useExpose: () => yj
});
var eT = gj(QS)
  , mj = zr
  , vj = jr;
function yj(t) {
    const e = (0,
    mj.getCurrentInstance)();
    e && (0,
    vj.extend)(e.proxy, t)
}
var i2 = Object.defineProperty
  , Ej = Object.getOwnPropertyDescriptor
  , _j = Object.getOwnPropertyNames
  , bj = Object.prototype.hasOwnProperty
  , Cj = (t, e) => {
    for (var r in e)
        i2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , Aj = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of _j(e))
            !bj.call(t, i) && i !== r && i2(t, i, {
                get: () => e[i],
                enumerable: !(n = Ej(e, i)) || n.enumerable
            });
    return t
}
  , wj = t => Aj(i2({}, "__esModule", {
    value: !0
}), t)
  , tT = {};
Cj(tT, {
    mountComponent: () => Fj,
    usePopupState: () => Dj
});
var Bj = wj(tT)
  , rT = zr
  , Sj = ha
  , Tj = eT;
function Dj() {
    const t = (0,
    rT.reactive)({
        show: !1
    })
      , e = i => {
        t.show = i
    }
      , r = i => {
        (0,
        Sj.extend)(t, i, {
            transitionAppear: !0
        }),
        e(!0)
    }
      , n = () => e(!1);
    return (0,
    Tj.useExpose)({
        open: r,
        close: n,
        toggle: e
    }),
    {
        open: r,
        close: n,
        state: t,
        toggle: e
    }
}
function Fj(t) {
    const e = (0,
    rT.createApp)(t)
      , r = document.createElement("div");
    return document.body.appendChild(r),
    {
        instance: e.mount(r),
        unmount() {
            e.unmount(),
            document.body.removeChild(r)
        }
    }
}
var o2 = Object.defineProperty
  , Pj = Object.getOwnPropertyDescriptor
  , Ij = Object.getOwnPropertyNames
  , Oj = Object.prototype.hasOwnProperty
  , kj = (t, e) => {
    for (var r in e)
        o2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , Rj = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of Ij(e))
            !Oj.call(t, i) && i !== r && o2(t, i, {
                get: () => e[i],
                enumerable: !(n = Pj(e, i)) || n.enumerable
            });
    return t
}
  , Mj = t => Rj(o2({}, "__esModule", {
    value: !0
}), t)
  , nT = {};
kj(nT, {
    lockClick: () => Lj
});
var Nj = Mj(nT);
let Mu = 0;
function Lj(t) {
    t ? (Mu || document.body.classList.add("van-toast--unclickable"),
    Mu++) : Mu && (Mu--,
    Mu || document.body.classList.remove("van-toast--unclickable"))
}
var s2 = Object.defineProperty
  , $j = Object.getOwnPropertyDescriptor
  , Uj = Object.getOwnPropertyNames
  , Gj = Object.prototype.hasOwnProperty
  , Hj = (t, e) => {
    for (var r in e)
        s2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , Vj = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of Uj(e))
            !Gj.call(t, i) && i !== r && s2(t, i, {
                get: () => e[i],
                enumerable: !(n = $j(e, i)) || n.enumerable
            });
    return t
}
  , zj = t => Vj(s2({}, "__esModule", {
    value: !0
}), t)
  , iT = {};
Hj(iT, {
    badgeProps: () => sT,
    default: () => Wj
});
var oT = zj(iT)
  , Ld = zr
  , cn = jr;
const [jj,W8] = (0,
cn.createNamespace)("badge")
  , sT = {
    dot: Boolean,
    max: cn.numericProp,
    tag: (0,
    cn.makeStringProp)("div"),
    color: String,
    offset: Array,
    content: cn.numericProp,
    showZero: cn.truthProp,
    position: (0,
    cn.makeStringProp)("top-right")
};
var Wj = (0,
Ld.defineComponent)({
    name: jj,
    props: sT,
    setup(t, {slots: e}) {
        const r = () => {
            if (e.content)
                return !0;
            const {content: a, showZero: l} = t;
            return (0,
            cn.isDef)(a) && a !== "" && (l || a !== 0 && a !== "0")
        }
          , n = () => {
            const {dot: a, max: l, content: c} = t;
            if (!a && r())
                return e.content ? e.content() : (0,
                cn.isDef)(l) && (0,
                cn.isNumeric)(c) && +c > +l ? `${l}+` : c
        }
          , i = a => a.startsWith("-") ? a.replace("-", "") : `-${a}`
          , o = (0,
        Ld.computed)( () => {
            const a = {
                background: t.color
            };
            if (t.offset) {
                const [l,c] = t.offset
                  , {position: u} = t
                  , [f,d] = u.split("-");
                e.default ? (typeof c == "number" ? a[f] = (0,
                cn.addUnit)(f === "top" ? c : -c) : a[f] = f === "top" ? (0,
                cn.addUnit)(c) : i(c),
                typeof l == "number" ? a[d] = (0,
                cn.addUnit)(d === "left" ? l : -l) : a[d] = d === "left" ? (0,
                cn.addUnit)(l) : i(l)) : (a.marginTop = (0,
                cn.addUnit)(c),
                a.marginLeft = (0,
                cn.addUnit)(l))
            }
            return a
        }
        )
          , s = () => {
            if (r() || t.dot)
                return (0,
                Ld.createVNode)("div", {
                    class: W8([t.position, {
                        dot: t.dot,
                        fixed: !!e.default
                    }]),
                    style: o.value
                }, [n()])
        }
        ;
        return () => {
            if (e.default) {
                const {tag: a} = t;
                return (0,
                Ld.createVNode)(a, {
                    class: W8("wrapper")
                }, {
                    default: () => [e.default(), s()]
                })
            }
            return s()
        }
    }
})
  , Yj = Object.create
  , Lp = Object.defineProperty
  , Xj = Object.getOwnPropertyDescriptor
  , Kj = Object.getOwnPropertyNames
  , qj = Object.getPrototypeOf
  , Zj = Object.prototype.hasOwnProperty
  , Jj = (t, e) => {
    for (var r in e)
        Lp(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , aT = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of Kj(e))
            !Zj.call(t, i) && i !== r && Lp(t, i, {
                get: () => e[i],
                enumerable: !(n = Xj(e, i)) || n.enumerable
            });
    return t
}
  , Qj = (t, e, r) => (r = t != null ? Yj(qj(t)) : {},
aT(e || !t || !t.__esModule ? Lp(r, "default", {
    value: t,
    enumerable: !0
}) : r, t))
  , eW = t => aT(Lp({}, "__esModule", {
    value: !0
}), t)
  , lT = {};
Jj(lT, {
    Badge: () => cT,
    badgeProps: () => iW.badgeProps,
    default: () => oW
});
var tW = eW(lT)
  , rW = jr
  , nW = Qj(oT)
  , iW = oT;
const cT = (0,
rW.withInstall)(nW.default);
var oW = cT
  , a2 = Object.defineProperty
  , sW = Object.getOwnPropertyDescriptor
  , aW = Object.getOwnPropertyNames
  , lW = Object.prototype.hasOwnProperty
  , cW = (t, e) => {
    for (var r in e)
        a2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , uW = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of aW(e))
            !lW.call(t, i) && i !== r && a2(t, i, {
                get: () => e[i],
                enumerable: !(n = sW(e, i)) || n.enumerable
            });
    return t
}
  , fW = t => uW(a2({}, "__esModule", {
    value: !0
}), t)
  , uT = {};
cW(uT, {
    setGlobalZIndex: () => hW,
    useGlobalZIndex: () => dW
});
var fT = fW(uT);
let dT = 2e3;
const dW = () => ++dT
  , hW = t => {
    dT = t
}
;
var l2 = Object.defineProperty
  , xW = Object.getOwnPropertyDescriptor
  , pW = Object.getOwnPropertyNames
  , gW = Object.prototype.hasOwnProperty
  , mW = (t, e) => {
    for (var r in e)
        l2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , vW = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of pW(e))
            !gW.call(t, i) && i !== r && l2(t, i, {
                get: () => e[i],
                enumerable: !(n = xW(e, i)) || n.enumerable
            });
    return t
}
  , yW = t => vW(l2({}, "__esModule", {
    value: !0
}), t)
  , hT = {};
mW(hT, {
    CONFIG_PROVIDER_KEY: () => pT,
    configProviderProps: () => gT,
    default: () => wW
});
var EW = yW(hT)
  , Ei = zr
  , sl = jr
  , _W = fT;
const [xT,bW] = (0,
sl.createNamespace)("config-provider")
  , pT = Symbol(xT)
  , gT = {
    tag: (0,
    sl.makeStringProp)("div"),
    theme: (0,
    sl.makeStringProp)("light"),
    zIndex: Number,
    themeVars: Object,
    themeVarsDark: Object,
    themeVarsLight: Object,
    themeVarsScope: (0,
    sl.makeStringProp)("local"),
    iconPrefix: String
};
function CW(t) {
    return t.replace(/([a-zA-Z])(\d)/g, "$1-$2")
}
function AW(t) {
    const e = {};
    return Object.keys(t).forEach(r => {
        const n = CW((0,
        sl.kebabCase)(r));
        e[`--van-${n}`] = t[r]
    }
    ),
    e
}
function $d(t={}, e={}) {
    Object.keys(t).forEach(r => {
        t[r] !== e[r] && document.documentElement.style.setProperty(r, t[r])
    }
    ),
    Object.keys(e).forEach(r => {
        t[r] || document.documentElement.style.removeProperty(r)
    }
    )
}
var wW = (0,
Ei.defineComponent)({
    name: xT,
    props: gT,
    setup(t, {slots: e}) {
        const r = (0,
        Ei.computed)( () => AW((0,
        sl.extend)({}, t.themeVars, t.theme === "dark" ? t.themeVarsDark : t.themeVarsLight)));
        if (sl.inBrowser) {
            const n = () => {
                document.documentElement.classList.add(`van-theme-${t.theme}`)
            }
              , i = (o=t.theme) => {
                document.documentElement.classList.remove(`van-theme-${o}`)
            }
            ;
            (0,
            Ei.watch)( () => t.theme, (o, s) => {
                s && i(s),
                n()
            }
            , {
                immediate: !0
            }),
            (0,
            Ei.onActivated)(n),
            (0,
            Ei.onDeactivated)(i),
            (0,
            Ei.onBeforeUnmount)(i),
            (0,
            Ei.watch)(r, (o, s) => {
                t.themeVarsScope === "global" && $d(o, s)
            }
            ),
            (0,
            Ei.watch)( () => t.themeVarsScope, (o, s) => {
                s === "global" && $d({}, r.value),
                o === "global" && $d(r.value, {})
            }
            ),
            t.themeVarsScope === "global" && $d(r.value, {})
        }
        return (0,
        Ei.provide)(pT, t),
        (0,
        Ei.watchEffect)( () => {
            t.zIndex !== void 0 && (0,
            _W.setGlobalZIndex)(t.zIndex)
        }
        ),
        () => (0,
        Ei.createVNode)(t.tag, {
            class: bW(),
            style: t.themeVarsScope === "local" ? r.value : void 0
        }, {
            default: () => {
                var n;
                return [(n = e.default) == null ? void 0 : n.call(e)]
            }
        })
    }
})
  , c2 = Object.defineProperty
  , BW = Object.getOwnPropertyDescriptor
  , SW = Object.getOwnPropertyNames
  , TW = Object.prototype.hasOwnProperty
  , DW = (t, e) => {
    for (var r in e)
        c2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , FW = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of SW(e))
            !TW.call(t, i) && i !== r && c2(t, i, {
                get: () => e[i],
                enumerable: !(n = BW(e, i)) || n.enumerable
            });
    return t
}
  , PW = t => FW(c2({}, "__esModule", {
    value: !0
}), t)
  , mT = {};
DW(mT, {
    default: () => MW,
    iconProps: () => yT
});
var vT = PW(mT)
  , Xl = zr
  , S0 = jr
  , IW = tW
  , OW = EW;
const [kW,Y8] = (0,
S0.createNamespace)("icon")
  , RW = t => t == null ? void 0 : t.includes("/")
  , yT = {
    dot: Boolean,
    tag: (0,
    S0.makeStringProp)("i"),
    name: String,
    size: S0.numericProp,
    badge: S0.numericProp,
    color: String,
    badgeProps: Object,
    classPrefix: String
};
var MW = (0,
Xl.defineComponent)({
    name: kW,
    props: yT,
    setup(t, {slots: e}) {
        const r = (0,
        Xl.inject)(OW.CONFIG_PROVIDER_KEY, null)
          , n = (0,
        Xl.computed)( () => t.classPrefix || (r == null ? void 0 : r.iconPrefix) || Y8());
        return () => {
            const {tag: i, dot: o, name: s, size: a, badge: l, color: c} = t
              , u = RW(s);
            return (0,
            Xl.createVNode)(IW.Badge, (0,
            Xl.mergeProps)({
                dot: o,
                tag: i,
                class: [n.value, u ? "" : `${n.value}-${s}`],
                style: {
                    color: c,
                    fontSize: (0,
                    S0.addUnit)(a)
                },
                content: l
            }, t.badgeProps), {
                default: () => {
                    var f;
                    return [(f = e.default) == null ? void 0 : f.call(e), u && (0,
                    Xl.createVNode)("img", {
                        class: Y8("image"),
                        src: s
                    }, null)]
                }
            })
        }
    }
})
  , NW = Object.create
  , $p = Object.defineProperty
  , LW = Object.getOwnPropertyDescriptor
  , $W = Object.getOwnPropertyNames
  , UW = Object.getPrototypeOf
  , GW = Object.prototype.hasOwnProperty
  , HW = (t, e) => {
    for (var r in e)
        $p(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , ET = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of $W(e))
            !GW.call(t, i) && i !== r && $p(t, i, {
                get: () => e[i],
                enumerable: !(n = LW(e, i)) || n.enumerable
            });
    return t
}
  , VW = (t, e, r) => (r = t != null ? NW(UW(t)) : {},
ET(e || !t || !t.__esModule ? $p(r, "default", {
    value: t,
    enumerable: !0
}) : r, t))
  , zW = t => ET($p({}, "__esModule", {
    value: !0
}), t)
  , _T = {};
HW(_T, {
    Icon: () => CT,
    default: () => XW,
    iconProps: () => YW.iconProps
});
var bT = zW(_T)
  , jW = jr
  , WW = VW(vT)
  , YW = vT;
const CT = (0,
jW.withInstall)(WW.default);
var XW = CT
  , u2 = Object.defineProperty
  , KW = Object.getOwnPropertyDescriptor
  , qW = Object.getOwnPropertyNames
  , ZW = Object.prototype.hasOwnProperty
  , JW = (t, e) => {
    for (var r in e)
        u2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , QW = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of qW(e))
            !ZW.call(t, i) && i !== r && u2(t, i, {
                get: () => e[i],
                enumerable: !(n = KW(e, i)) || n.enumerable
            });
    return t
}
  , eY = t => QW(u2({}, "__esModule", {
    value: !0
}), t)
  , AT = {};
JW(AT, {
    popupSharedPropKeys: () => rY,
    popupSharedProps: () => wT
});
var tY = eY(AT)
  , wa = jr;
const wT = {
    show: Boolean,
    zIndex: wa.numericProp,
    overlay: wa.truthProp,
    duration: wa.numericProp,
    teleport: [String, Object],
    lockScroll: wa.truthProp,
    lazyRender: wa.truthProp,
    beforeClose: Function,
    overlayProps: Object,
    overlayStyle: Object,
    overlayClass: wa.unknownProp,
    transitionAppear: Boolean,
    closeOnClickOverlay: wa.truthProp
}
  , rY = Object.keys(wT);
var f2 = Object.defineProperty
  , nY = Object.getOwnPropertyDescriptor
  , iY = Object.getOwnPropertyNames
  , oY = Object.prototype.hasOwnProperty
  , sY = (t, e) => {
    for (var r in e)
        f2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , aY = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of iY(e))
            !oY.call(t, i) && i !== r && f2(t, i, {
                get: () => e[i],
                enumerable: !(n = nY(e, i)) || n.enumerable
            });
    return t
}
  , lY = t => aY(f2({}, "__esModule", {
    value: !0
}), t)
  , BT = {};
sY(BT, {
    useTouch: () => fY
});
var cY = lY(BT)
  , ws = zr
  , X8 = jr;
function uY(t, e) {
    return t > e ? "horizontal" : e > t ? "vertical" : ""
}
function fY() {
    const t = (0,
    ws.ref)(0)
      , e = (0,
    ws.ref)(0)
      , r = (0,
    ws.ref)(0)
      , n = (0,
    ws.ref)(0)
      , i = (0,
    ws.ref)(0)
      , o = (0,
    ws.ref)(0)
      , s = (0,
    ws.ref)("")
      , a = (0,
    ws.ref)(!0)
      , l = () => s.value === "vertical"
      , c = () => s.value === "horizontal"
      , u = () => {
        r.value = 0,
        n.value = 0,
        i.value = 0,
        o.value = 0,
        s.value = "",
        a.value = !0
    }
    ;
    return {
        move: h => {
            const x = h.touches[0];
            r.value = (x.clientX < 0 ? 0 : x.clientX) - t.value,
            n.value = x.clientY - e.value,
            i.value = Math.abs(r.value),
            o.value = Math.abs(n.value);
            const y = 10;
            (!s.value || i.value < y && o.value < y) && (s.value = uY(i.value, o.value)),
            a.value && (i.value > X8.TAP_OFFSET || o.value > X8.TAP_OFFSET) && (a.value = !1)
        }
        ,
        start: h => {
            u(),
            t.value = h.touches[0].clientX,
            e.value = h.touches[0].clientY
        }
        ,
        reset: u,
        startX: t,
        startY: e,
        deltaX: r,
        deltaY: n,
        offsetX: i,
        offsetY: o,
        direction: s,
        isVertical: l,
        isHorizontal: c,
        isTap: a
    }
}
var d2 = Object.defineProperty
  , dY = Object.getOwnPropertyDescriptor
  , hY = Object.getOwnPropertyNames
  , xY = Object.prototype.hasOwnProperty
  , pY = (t, e) => {
    for (var r in e)
        d2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , gY = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of hY(e))
            !xY.call(t, i) && i !== r && d2(t, i, {
                get: () => e[i],
                enumerable: !(n = dY(e, i)) || n.enumerable
            });
    return t
}
  , mY = t => gY(d2({}, "__esModule", {
    value: !0
}), t)
  , ST = {};
pY(ST, {
    useLockScroll: () => _Y
});
var vY = mY(ST)
  , ng = zr
  , K8 = Rp
  , yY = cY
  , EY = jr;
let Nu = 0;
const q8 = "van-overflow-hidden";
function _Y(t, e) {
    const r = (0,
    yY.useTouch)()
      , n = "01"
      , i = "10"
      , o = u => {
        r.move(u);
        const f = r.deltaY.value > 0 ? i : n
          , d = (0,
        K8.getScrollParent)(u.target, t.value)
          , {scrollHeight: h, offsetHeight: x, scrollTop: y} = d;
        let m = "11";
        y === 0 ? m = x >= h ? "00" : "01" : y + x >= h && (m = "10"),
        m !== "11" && r.isVertical() && !(parseInt(m, 2) & parseInt(f, 2)) && (0,
        EY.preventDefault)(u, !0)
    }
      , s = () => {
        document.addEventListener("touchstart", r.start),
        document.addEventListener("touchmove", o, {
            passive: !1
        }),
        Nu || document.body.classList.add(q8),
        Nu++
    }
      , a = () => {
        Nu && (document.removeEventListener("touchstart", r.start),
        document.removeEventListener("touchmove", o),
        Nu--,
        Nu || document.body.classList.remove(q8))
    }
      , l = () => e() && s()
      , c = () => e() && a();
    (0,
    K8.onMountedOrActivated)(l),
    (0,
    ng.onDeactivated)(c),
    (0,
    ng.onBeforeUnmount)(c),
    (0,
    ng.watch)(e, u => {
        u ? s() : a()
    }
    )
}
var h2 = Object.defineProperty
  , bY = Object.getOwnPropertyDescriptor
  , CY = Object.getOwnPropertyNames
  , AY = Object.prototype.hasOwnProperty
  , wY = (t, e) => {
    for (var r in e)
        h2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , BY = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of CY(e))
            !AY.call(t, i) && i !== r && h2(t, i, {
                get: () => e[i],
                enumerable: !(n = bY(e, i)) || n.enumerable
            });
    return t
}
  , SY = t => BY(h2({}, "__esModule", {
    value: !0
}), t)
  , TT = {};
wY(TT, {
    useLazyRender: () => TY
});
var DT = SY(TT)
  , Z8 = zr;
function TY(t) {
    const e = (0,
    Z8.ref)(!1);
    return (0,
    Z8.watch)(t, r => {
        r && (e.value = r)
    }
    , {
        immediate: !0
    }),
    r => () => e.value ? r() : null
}
var x2 = Object.defineProperty
  , DY = Object.getOwnPropertyDescriptor
  , FY = Object.getOwnPropertyNames
  , PY = Object.prototype.hasOwnProperty
  , IY = (t, e) => {
    for (var r in e)
        x2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , OY = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of FY(e))
            !PY.call(t, i) && i !== r && x2(t, i, {
                get: () => e[i],
                enumerable: !(n = DY(e, i)) || n.enumerable
            });
    return t
}
  , kY = t => OY(x2({}, "__esModule", {
    value: !0
}), t)
  , FT = {};
IY(FT, {
    POPUP_TOGGLE_KEY: () => PT,
    onPopupReopen: () => MY
});
var RY = kY(FT)
  , J8 = zr;
const PT = Symbol();
function MY(t) {
    const e = (0,
    J8.inject)(PT, null);
    e && (0,
    J8.watch)(e, r => {
        r && t()
    }
    )
}
var p2 = Object.defineProperty
  , NY = Object.getOwnPropertyDescriptor
  , LY = Object.getOwnPropertyNames
  , $Y = Object.prototype.hasOwnProperty
  , UY = (t, e) => {
    for (var r in e)
        p2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , GY = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of LY(e))
            !$Y.call(t, i) && i !== r && p2(t, i, {
                get: () => e[i],
                enumerable: !(n = NY(e, i)) || n.enumerable
            });
    return t
}
  , HY = t => GY(p2({}, "__esModule", {
    value: !0
}), t)
  , IT = {};
UY(IT, {
    useScopeId: () => jY
});
var VY = HY(IT)
  , zY = zr;
const jY = () => {
    var t;
    const {scopeId: e} = ((t = (0,
    zY.getCurrentInstance)()) == null ? void 0 : t.vnode) || {};
    return e ? {
        [e]: ""
    } : null
}
;
var g2 = Object.defineProperty
  , WY = Object.getOwnPropertyDescriptor
  , YY = Object.getOwnPropertyNames
  , XY = Object.prototype.hasOwnProperty
  , KY = (t, e) => {
    for (var r in e)
        g2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , qY = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of YY(e))
            !XY.call(t, i) && i !== r && g2(t, i, {
                get: () => e[i],
                enumerable: !(n = WY(e, i)) || n.enumerable
            });
    return t
}
  , ZY = t => qY(g2({}, "__esModule", {
    value: !0
}), t)
  , OT = {};
KY(OT, {
    default: () => rX,
    overlayProps: () => RT
});
var kT = ZY(OT)
  , Yi = zr
  , so = jr
  , JY = Rp
  , QY = DT;
const [eX,tX] = (0,
so.createNamespace)("overlay")
  , RT = {
    show: Boolean,
    zIndex: so.numericProp,
    duration: so.numericProp,
    className: so.unknownProp,
    lockScroll: so.truthProp,
    lazyRender: so.truthProp,
    customStyle: Object,
    teleport: [String, Object]
};
var rX = (0,
Yi.defineComponent)({
    name: eX,
    inheritAttrs: !1,
    props: RT,
    setup(t, {attrs: e, slots: r}) {
        const n = (0,
        Yi.ref)()
          , i = (0,
        QY.useLazyRender)( () => t.show || !t.lazyRender)
          , o = a => {
            t.lockScroll && (0,
            so.preventDefault)(a, !0)
        }
          , s = i( () => {
            var a;
            const l = (0,
            so.extend)((0,
            so.getZIndexStyle)(t.zIndex), t.customStyle);
            return (0,
            so.isDef)(t.duration) && (l.animationDuration = `${t.duration}s`),
            (0,
            Yi.withDirectives)((0,
            Yi.createVNode)("div", (0,
            Yi.mergeProps)({
                ref: n,
                style: l,
                class: [tX(), t.className]
            }, e), [(a = r.default) == null ? void 0 : a.call(r)]), [[Yi.vShow, t.show]])
        }
        );
        return (0,
        JY.useEventListener)("touchmove", o, {
            target: n
        }),
        () => {
            const a = (0,
            Yi.createVNode)(Yi.Transition, {
                name: "van-fade",
                appear: !0
            }, {
                default: s
            });
            return t.teleport ? (0,
            Yi.createVNode)(Yi.Teleport, {
                to: t.teleport
            }, {
                default: () => [a]
            }) : a
        }
    }
})
  , nX = Object.create
  , Up = Object.defineProperty
  , iX = Object.getOwnPropertyDescriptor
  , oX = Object.getOwnPropertyNames
  , sX = Object.getPrototypeOf
  , aX = Object.prototype.hasOwnProperty
  , lX = (t, e) => {
    for (var r in e)
        Up(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , MT = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of oX(e))
            !aX.call(t, i) && i !== r && Up(t, i, {
                get: () => e[i],
                enumerable: !(n = iX(e, i)) || n.enumerable
            });
    return t
}
  , cX = (t, e, r) => (r = t != null ? nX(sX(t)) : {},
MT(e || !t || !t.__esModule ? Up(r, "default", {
    value: t,
    enumerable: !0
}) : r, t))
  , uX = t => MT(Up({}, "__esModule", {
    value: !0
}), t)
  , NT = {};
lX(NT, {
    Overlay: () => LT,
    default: () => pX,
    overlayProps: () => xX.overlayProps
});
var fX = uX(NT)
  , dX = jr
  , hX = cX(kT)
  , xX = kT;
const LT = (0,
dX.withInstall)(hX.default);
var pX = LT
  , m2 = Object.defineProperty
  , gX = Object.getOwnPropertyDescriptor
  , mX = Object.getOwnPropertyNames
  , vX = Object.prototype.hasOwnProperty
  , yX = (t, e) => {
    for (var r in e)
        m2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , EX = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of mX(e))
            !vX.call(t, i) && i !== r && m2(t, i, {
                get: () => e[i],
                enumerable: !(n = gX(e, i)) || n.enumerable
            });
    return t
}
  , _X = t => EX(m2({}, "__esModule", {
    value: !0
}), t)
  , $T = {};
yX($T, {
    default: () => IX,
    popupProps: () => GT
});
var UT = _X($T)
  , Vt = zr
  , bX = tY
  , Xo = jr
  , CX = Rp
  , AX = eT
  , wX = vY
  , BX = DT
  , SX = RY
  , TX = fT
  , Q8 = VY
  , DX = bT
  , FX = fX;
const GT = (0,
Xo.extend)({}, bX.popupSharedProps, {
    round: Boolean,
    position: (0,
    Xo.makeStringProp)("center"),
    closeIcon: (0,
    Xo.makeStringProp)("cross"),
    closeable: Boolean,
    transition: String,
    iconPrefix: String,
    closeOnPopstate: Boolean,
    closeIconPosition: (0,
    Xo.makeStringProp)("top-right"),
    destroyOnClose: Boolean,
    safeAreaInsetTop: Boolean,
    safeAreaInsetBottom: Boolean
})
  , [PX,e9] = (0,
Xo.createNamespace)("popup");
var IX = (0,
Vt.defineComponent)({
    name: PX,
    inheritAttrs: !1,
    props: GT,
    emits: ["open", "close", "opened", "closed", "keydown", "update:show", "clickOverlay", "clickCloseIcon"],
    setup(t, {emit: e, attrs: r, slots: n}) {
        let i, o;
        const s = (0,
        Vt.ref)()
          , a = (0,
        Vt.ref)()
          , l = (0,
        BX.useLazyRender)( () => t.show || !t.lazyRender)
          , c = (0,
        Vt.computed)( () => {
            const b = {
                zIndex: s.value
            };
            if ((0,
            Xo.isDef)(t.duration)) {
                const C = t.position === "center" ? "animationDuration" : "transitionDuration";
                b[C] = `${t.duration}s`
            }
            return b
        }
        )
          , u = () => {
            i || (i = !0,
            s.value = t.zIndex !== void 0 ? +t.zIndex : (0,
            TX.useGlobalZIndex)(),
            e("open"))
        }
          , f = () => {
            i && (0,
            Xo.callInterceptor)(t.beforeClose, {
                done() {
                    i = !1,
                    e("close"),
                    e("update:show", !1)
                }
            })
        }
          , d = b => {
            e("clickOverlay", b),
            t.closeOnClickOverlay && f()
        }
          , h = () => {
            if (t.overlay) {
                const b = (0,
                Xo.extend)({
                    show: t.show,
                    class: t.overlayClass,
                    zIndex: s.value,
                    duration: t.duration,
                    customStyle: t.overlayStyle,
                    role: t.closeOnClickOverlay ? "button" : void 0,
                    tabindex: t.closeOnClickOverlay ? 0 : void 0
                }, t.overlayProps);
                return (0,
                Vt.createVNode)(FX.Overlay, (0,
                Vt.mergeProps)(b, (0,
                Q8.useScopeId)(), {
                    onClick: d
                }), {
                    default: n["overlay-content"]
                })
            }
        }
          , x = b => {
            e("clickCloseIcon", b),
            f()
        }
          , y = () => {
            if (t.closeable)
                return (0,
                Vt.createVNode)(DX.Icon, {
                    role: "button",
                    tabindex: 0,
                    name: t.closeIcon,
                    class: [e9("close-icon", t.closeIconPosition), Xo.HAPTICS_FEEDBACK],
                    classPrefix: t.iconPrefix,
                    onClick: x
                }, null)
        }
        ;
        let m;
        const E = () => {
            m && clearTimeout(m),
            m = setTimeout( () => {
                e("opened")
            }
            )
        }
          , g = () => e("closed")
          , p = b => e("keydown", b)
          , v = l( () => {
            var b;
            const {destroyOnClose: C, round: B, position: T, safeAreaInsetTop: A, safeAreaInsetBottom: w, show: S} = t;
            if (!(!S && C))
                return (0,
                Vt.withDirectives)((0,
                Vt.createVNode)("div", (0,
                Vt.mergeProps)({
                    ref: a,
                    style: c.value,
                    role: "dialog",
                    tabindex: 0,
                    class: [e9({
                        round: B,
                        [T]: T
                    }), {
                        "van-safe-area-top": A,
                        "van-safe-area-bottom": w
                    }],
                    onKeydown: p
                }, r, (0,
                Q8.useScopeId)()), [(b = n.default) == null ? void 0 : b.call(n), y()]), [[Vt.vShow, S]])
        }
        )
          , _ = () => {
            const {position: b, transition: C, transitionAppear: B} = t
              , T = b === "center" ? "van-fade" : `van-popup-slide-${b}`;
            return (0,
            Vt.createVNode)(Vt.Transition, {
                name: C || T,
                appear: B,
                onAfterEnter: E,
                onAfterLeave: g
            }, {
                default: v
            })
        }
        ;
        return (0,
        Vt.watch)( () => t.show, b => {
            b && !i && (u(),
            r.tabindex === 0 && (0,
            Vt.nextTick)( () => {
                var C;
                (C = a.value) == null || C.focus()
            }
            )),
            !b && i && (i = !1,
            e("close"))
        }
        ),
        (0,
        AX.useExpose)({
            popupRef: a
        }),
        (0,
        wX.useLockScroll)(a, () => t.show && t.lockScroll),
        (0,
        CX.useEventListener)("popstate", () => {
            t.closeOnPopstate && (f(),
            o = !1)
        }
        ),
        (0,
        Vt.onMounted)( () => {
            t.show && u()
        }
        ),
        (0,
        Vt.onActivated)( () => {
            o && (e("update:show", !0),
            o = !1)
        }
        ),
        (0,
        Vt.onDeactivated)( () => {
            t.show && t.teleport && (f(),
            o = !0)
        }
        ),
        (0,
        Vt.provide)(SX.POPUP_TOGGLE_KEY, () => t.show),
        () => t.teleport ? (0,
        Vt.createVNode)(Vt.Teleport, {
            to: t.teleport
        }, {
            default: () => [h(), _()]
        }) : (0,
        Vt.createVNode)(Vt.Fragment, null, [h(), _()])
    }
})
  , OX = Object.create
  , Gp = Object.defineProperty
  , kX = Object.getOwnPropertyDescriptor
  , RX = Object.getOwnPropertyNames
  , MX = Object.getPrototypeOf
  , NX = Object.prototype.hasOwnProperty
  , LX = (t, e) => {
    for (var r in e)
        Gp(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , HT = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of RX(e))
            !NX.call(t, i) && i !== r && Gp(t, i, {
                get: () => e[i],
                enumerable: !(n = kX(e, i)) || n.enumerable
            });
    return t
}
  , $X = (t, e, r) => (r = t != null ? OX(MX(t)) : {},
HT(e || !t || !t.__esModule ? Gp(r, "default", {
    value: t,
    enumerable: !0
}) : r, t))
  , UX = t => HT(Gp({}, "__esModule", {
    value: !0
}), t)
  , VT = {};
LX(VT, {
    Popup: () => zT,
    default: () => jX,
    popupProps: () => zX.popupProps
});
var GX = UX(VT)
  , HX = jr
  , VX = $X(UT)
  , zX = UT;
const zT = (0,
HX.withInstall)(VX.default);
var jX = zT
  , v2 = Object.defineProperty
  , WX = Object.getOwnPropertyDescriptor
  , YX = Object.getOwnPropertyNames
  , XX = Object.prototype.hasOwnProperty
  , KX = (t, e) => {
    for (var r in e)
        v2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , qX = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of YX(e))
            !XX.call(t, i) && i !== r && v2(t, i, {
                get: () => e[i],
                enumerable: !(n = WX(e, i)) || n.enumerable
            });
    return t
}
  , ZX = t => qX(v2({}, "__esModule", {
    value: !0
}), t)
  , jT = {};
KX(jT, {
    default: () => tK,
    loadingProps: () => YT
});
var WT = ZX(jT)
  , $s = zr
  , al = jr;
const [JX,T0] = (0,
al.createNamespace)("loading")
  , QX = Array(12).fill(null).map( (t, e) => (0,
$s.createVNode)("i", {
    class: T0("line", String(e + 1))
}, null))
  , eK = (0,
$s.createVNode)("svg", {
    class: T0("circular"),
    viewBox: "25 25 50 50"
}, [(0,
$s.createVNode)("circle", {
    cx: "50",
    cy: "50",
    r: "20",
    fill: "none"
}, null)])
  , YT = {
    size: al.numericProp,
    type: (0,
    al.makeStringProp)("circular"),
    color: String,
    vertical: Boolean,
    textSize: al.numericProp,
    textColor: String
};
var tK = (0,
$s.defineComponent)({
    name: JX,
    props: YT,
    setup(t, {slots: e}) {
        const r = (0,
        $s.computed)( () => (0,
        al.extend)({
            color: t.color
        }, (0,
        al.getSizeStyle)(t.size)))
          , n = () => {
            const o = t.type === "spinner" ? QX : eK;
            return (0,
            $s.createVNode)("span", {
                class: T0("spinner", t.type),
                style: r.value
            }, [e.icon ? e.icon() : o])
        }
          , i = () => {
            var o;
            if (e.default)
                return (0,
                $s.createVNode)("span", {
                    class: T0("text"),
                    style: {
                        fontSize: (0,
                        al.addUnit)(t.textSize),
                        color: (o = t.textColor) != null ? o : t.color
                    }
                }, [e.default()])
        }
        ;
        return () => {
            const {type: o, vertical: s} = t;
            return (0,
            $s.createVNode)("div", {
                class: T0([o, {
                    vertical: s
                }]),
                "aria-live": "polite",
                "aria-busy": !0
            }, [n(), i()])
        }
    }
})
  , rK = Object.create
  , Hp = Object.defineProperty
  , nK = Object.getOwnPropertyDescriptor
  , iK = Object.getOwnPropertyNames
  , oK = Object.getPrototypeOf
  , sK = Object.prototype.hasOwnProperty
  , aK = (t, e) => {
    for (var r in e)
        Hp(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , XT = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of iK(e))
            !sK.call(t, i) && i !== r && Hp(t, i, {
                get: () => e[i],
                enumerable: !(n = nK(e, i)) || n.enumerable
            });
    return t
}
  , lK = (t, e, r) => (r = t != null ? rK(oK(t)) : {},
XT(e || !t || !t.__esModule ? Hp(r, "default", {
    value: t,
    enumerable: !0
}) : r, t))
  , cK = t => XT(Hp({}, "__esModule", {
    value: !0
}), t)
  , KT = {};
aK(KT, {
    Loading: () => qT,
    default: () => xK,
    loadingProps: () => hK.loadingProps
});
var uK = cK(KT)
  , fK = jr
  , dK = lK(WT)
  , hK = WT;
const qT = (0,
fK.withInstall)(dK.default);
var xK = qT
  , y2 = Object.defineProperty
  , pK = Object.getOwnPropertyDescriptor
  , gK = Object.getOwnPropertyNames
  , mK = Object.prototype.hasOwnProperty
  , vK = (t, e) => {
    for (var r in e)
        y2(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , yK = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of gK(e))
            !mK.call(t, i) && i !== r && y2(t, i, {
                get: () => e[i],
                enumerable: !(n = pK(e, i)) || n.enumerable
            });
    return t
}
  , EK = t => yK(y2({}, "__esModule", {
    value: !0
}), t)
  , ZT = {};
vK(ZT, {
    default: () => TK,
    toastProps: () => JT
});
var _K = EK(ZT)
  , ri = zr
  , ai = jr
  , bK = Nj
  , CK = bT
  , AK = GX
  , wK = uK;
const [BK,Kl] = (0,
ai.createNamespace)("toast")
  , SK = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay", "zIndex"]
  , JT = {
    icon: String,
    show: Boolean,
    type: (0,
    ai.makeStringProp)("text"),
    overlay: Boolean,
    message: ai.numericProp,
    iconSize: ai.numericProp,
    duration: (0,
    ai.makeNumberProp)(2e3),
    position: (0,
    ai.makeStringProp)("middle"),
    teleport: [String, Object],
    wordBreak: String,
    className: ai.unknownProp,
    iconPrefix: String,
    transition: (0,
    ai.makeStringProp)("van-fade"),
    loadingType: String,
    forbidClick: Boolean,
    overlayClass: ai.unknownProp,
    overlayStyle: Object,
    closeOnClick: Boolean,
    closeOnClickOverlay: Boolean,
    zIndex: ai.numericProp
};
var TK = (0,
ri.defineComponent)({
    name: BK,
    props: JT,
    emits: ["update:show"],
    setup(t, {emit: e, slots: r}) {
        let n, i = !1;
        const o = () => {
            const f = t.show && t.forbidClick;
            i !== f && (i = f,
            (0,
            bK.lockClick)(i))
        }
          , s = f => e("update:show", f)
          , a = () => {
            t.closeOnClick && s(!1)
        }
          , l = () => clearTimeout(n)
          , c = () => {
            const {icon: f, type: d, iconSize: h, iconPrefix: x, loadingType: y} = t;
            if (f || d === "success" || d === "fail")
                return (0,
                ri.createVNode)(CK.Icon, {
                    name: f || d,
                    size: h,
                    class: Kl("icon"),
                    classPrefix: x
                }, null);
            if (d === "loading")
                return (0,
                ri.createVNode)(wK.Loading, {
                    class: Kl("loading"),
                    size: h,
                    type: y
                }, null)
        }
          , u = () => {
            const {type: f, message: d} = t;
            if (r.message)
                return (0,
                ri.createVNode)("div", {
                    class: Kl("text")
                }, [r.message()]);
            if ((0,
            ai.isDef)(d) && d !== "")
                return f === "html" ? (0,
                ri.createVNode)("div", {
                    key: 0,
                    class: Kl("text"),
                    innerHTML: String(d)
                }, null) : (0,
                ri.createVNode)("div", {
                    class: Kl("text")
                }, [d])
        }
        ;
        return (0,
        ri.watch)( () => [t.show, t.forbidClick], o),
        (0,
        ri.watch)( () => [t.show, t.type, t.message, t.duration], () => {
            l(),
            t.show && t.duration > 0 && (n = setTimeout( () => {
                s(!1)
            }
            , t.duration))
        }
        ),
        (0,
        ri.onMounted)(o),
        (0,
        ri.onUnmounted)(o),
        () => (0,
        ri.createVNode)(AK.Popup, (0,
        ri.mergeProps)({
            class: [Kl([t.position, t.wordBreak === "normal" ? "break-normal" : t.wordBreak, {
                [t.type]: !t.icon
            }]), t.className],
            lockScroll: !1,
            onClick: a,
            onClosed: l,
            "onUpdate:show": s
        }, (0,
        ai.pick)(t, SK)), {
            default: () => [c(), u()]
        })
    }
})
  , DK = Object.create
  , Vp = Object.defineProperty
  , FK = Object.getOwnPropertyDescriptor
  , PK = Object.getOwnPropertyNames
  , IK = Object.getPrototypeOf
  , OK = Object.prototype.hasOwnProperty
  , kK = (t, e) => {
    for (var r in e)
        Vp(t, r, {
            get: e[r],
            enumerable: !0
        })
}
  , QT = (t, e, r, n) => {
    if (e && typeof e == "object" || typeof e == "function")
        for (let i of PK(e))
            !OK.call(t, i) && i !== r && Vp(t, i, {
                get: () => e[i],
                enumerable: !(n = FK(e, i)) || n.enumerable
            });
    return t
}
  , RK = (t, e, r) => (r = t != null ? DK(IK(t)) : {},
QT(e || !t || !t.__esModule ? Vp(r, "default", {
    value: t,
    enumerable: !0
}) : r, t))
  , MK = t => QT(Vp({}, "__esModule", {
    value: !0
}), t)
  , e7 = {};
kK(e7, {
    allowMultipleToast: () => WK,
    closeToast: () => VK,
    resetToastDefaultOptions: () => jK,
    setToastDefaultOptions: () => zK,
    showFailToast: () => HK,
    showLoadingToast: () => UK,
    showSuccessToast: () => GK,
    showToast: () => n7
});
var L3e = MK(e7)
  , Lu = zr
  , gl = jr
  , t9 = Bj
  , NK = RK(_K);
const t7 = {
    icon: "",
    type: "text",
    message: "",
    className: "",
    overlay: !1,
    onClose: void 0,
    onOpened: void 0,
    duration: 2e3,
    teleport: "body",
    iconSize: void 0,
    iconPrefix: void 0,
    position: "middle",
    transition: "van-fade",
    forbidClick: !1,
    loadingType: void 0,
    overlayClass: "",
    overlayStyle: void 0,
    closeOnClick: !1,
    closeOnClickOverlay: !1
};
let Ti = []
  , zp = !1
  , Ex = (0,
gl.extend)({}, t7);
const _x = new Map;
function r7(t) {
    return (0,
    gl.isObject)(t) ? t : {
        message: t
    }
}
function LK() {
    const {instance: t, unmount: e} = (0,
    t9.mountComponent)({
        setup() {
            const r = (0,
            Lu.ref)("")
              , {open: n, state: i, close: o, toggle: s} = (0,
            t9.usePopupState)()
              , a = () => {
                zp && (Ti = Ti.filter(c => c !== t),
                e())
            }
              , l = () => {
                const c = {
                    onClosed: a,
                    "onUpdate:show": s
                };
                return (0,
                Lu.createVNode)(NK.default, (0,
                Lu.mergeProps)(i, c), null)
            }
            ;
            return (0,
            Lu.watch)(r, c => {
                i.message = c
            }
            ),
            (0,
            Lu.getCurrentInstance)().render = l,
            {
                open: n,
                close: o,
                message: r
            }
        }
    });
    return t
}
function $K() {
    if (!Ti.length || zp) {
        const t = LK();
        Ti.push(t)
    }
    return Ti[Ti.length - 1]
}
function n7(t={}) {
    if (!gl.inBrowser)
        return {};
    const e = $K()
      , r = r7(t);
    return e.open((0,
    gl.extend)({}, Ex, _x.get(r.type || Ex.type), r)),
    e
}
const E2 = t => e => n7((0,
gl.extend)({
    type: t
}, r7(e)))
  , UK = E2("loading")
  , GK = E2("success")
  , HK = E2("fail")
  , VK = t => {
    var e;
    Ti.length && (t ? (Ti.forEach(r => {
        r.close()
    }
    ),
    Ti = []) : zp ? (e = Ti.shift()) == null || e.close() : Ti[0].close())
}
;
function zK(t, e) {
    typeof t == "string" ? _x.set(t, e) : (0,
    gl.extend)(Ex, t)
}
const jK = t => {
    typeof t == "string" ? _x.delete(t) : (Ex = (0,
    gl.extend)({}, t7),
    _x.clear())
}
  , WK = (t=!0) => {
    zp = t
}
;
var i7 = {
    exports: {}
};
(function(t, e) {
    (function(r) {
        t.exports = r()
    }
    )(function(r) {
        var n = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
        function i(E, g) {
            var p = E[0]
              , v = E[1]
              , _ = E[2]
              , b = E[3];
            p += (v & _ | ~v & b) + g[0] - 680876936 | 0,
            p = (p << 7 | p >>> 25) + v | 0,
            b += (p & v | ~p & _) + g[1] - 389564586 | 0,
            b = (b << 12 | b >>> 20) + p | 0,
            _ += (b & p | ~b & v) + g[2] + 606105819 | 0,
            _ = (_ << 17 | _ >>> 15) + b | 0,
            v += (_ & b | ~_ & p) + g[3] - 1044525330 | 0,
            v = (v << 22 | v >>> 10) + _ | 0,
            p += (v & _ | ~v & b) + g[4] - 176418897 | 0,
            p = (p << 7 | p >>> 25) + v | 0,
            b += (p & v | ~p & _) + g[5] + 1200080426 | 0,
            b = (b << 12 | b >>> 20) + p | 0,
            _ += (b & p | ~b & v) + g[6] - 1473231341 | 0,
            _ = (_ << 17 | _ >>> 15) + b | 0,
            v += (_ & b | ~_ & p) + g[7] - 45705983 | 0,
            v = (v << 22 | v >>> 10) + _ | 0,
            p += (v & _ | ~v & b) + g[8] + 1770035416 | 0,
            p = (p << 7 | p >>> 25) + v | 0,
            b += (p & v | ~p & _) + g[9] - 1958414417 | 0,
            b = (b << 12 | b >>> 20) + p | 0,
            _ += (b & p | ~b & v) + g[10] - 42063 | 0,
            _ = (_ << 17 | _ >>> 15) + b | 0,
            v += (_ & b | ~_ & p) + g[11] - 1990404162 | 0,
            v = (v << 22 | v >>> 10) + _ | 0,
            p += (v & _ | ~v & b) + g[12] + 1804603682 | 0,
            p = (p << 7 | p >>> 25) + v | 0,
            b += (p & v | ~p & _) + g[13] - 40341101 | 0,
            b = (b << 12 | b >>> 20) + p | 0,
            _ += (b & p | ~b & v) + g[14] - 1502002290 | 0,
            _ = (_ << 17 | _ >>> 15) + b | 0,
            v += (_ & b | ~_ & p) + g[15] + 1236535329 | 0,
            v = (v << 22 | v >>> 10) + _ | 0,
            p += (v & b | _ & ~b) + g[1] - 165796510 | 0,
            p = (p << 5 | p >>> 27) + v | 0,
            b += (p & _ | v & ~_) + g[6] - 1069501632 | 0,
            b = (b << 9 | b >>> 23) + p | 0,
            _ += (b & v | p & ~v) + g[11] + 643717713 | 0,
            _ = (_ << 14 | _ >>> 18) + b | 0,
            v += (_ & p | b & ~p) + g[0] - 373897302 | 0,
            v = (v << 20 | v >>> 12) + _ | 0,
            p += (v & b | _ & ~b) + g[5] - 701558691 | 0,
            p = (p << 5 | p >>> 27) + v | 0,
            b += (p & _ | v & ~_) + g[10] + 38016083 | 0,
            b = (b << 9 | b >>> 23) + p | 0,
            _ += (b & v | p & ~v) + g[15] - 660478335 | 0,
            _ = (_ << 14 | _ >>> 18) + b | 0,
            v += (_ & p | b & ~p) + g[4] - 405537848 | 0,
            v = (v << 20 | v >>> 12) + _ | 0,
            p += (v & b | _ & ~b) + g[9] + 568446438 | 0,
            p = (p << 5 | p >>> 27) + v | 0,
            b += (p & _ | v & ~_) + g[14] - 1019803690 | 0,
            b = (b << 9 | b >>> 23) + p | 0,
            _ += (b & v | p & ~v) + g[3] - 187363961 | 0,
            _ = (_ << 14 | _ >>> 18) + b | 0,
            v += (_ & p | b & ~p) + g[8] + 1163531501 | 0,
            v = (v << 20 | v >>> 12) + _ | 0,
            p += (v & b | _ & ~b) + g[13] - 1444681467 | 0,
            p = (p << 5 | p >>> 27) + v | 0,
            b += (p & _ | v & ~_) + g[2] - 51403784 | 0,
            b = (b << 9 | b >>> 23) + p | 0,
            _ += (b & v | p & ~v) + g[7] + 1735328473 | 0,
            _ = (_ << 14 | _ >>> 18) + b | 0,
            v += (_ & p | b & ~p) + g[12] - 1926607734 | 0,
            v = (v << 20 | v >>> 12) + _ | 0,
            p += (v ^ _ ^ b) + g[5] - 378558 | 0,
            p = (p << 4 | p >>> 28) + v | 0,
            b += (p ^ v ^ _) + g[8] - 2022574463 | 0,
            b = (b << 11 | b >>> 21) + p | 0,
            _ += (b ^ p ^ v) + g[11] + 1839030562 | 0,
            _ = (_ << 16 | _ >>> 16) + b | 0,
            v += (_ ^ b ^ p) + g[14] - 35309556 | 0,
            v = (v << 23 | v >>> 9) + _ | 0,
            p += (v ^ _ ^ b) + g[1] - 1530992060 | 0,
            p = (p << 4 | p >>> 28) + v | 0,
            b += (p ^ v ^ _) + g[4] + 1272893353 | 0,
            b = (b << 11 | b >>> 21) + p | 0,
            _ += (b ^ p ^ v) + g[7] - 155497632 | 0,
            _ = (_ << 16 | _ >>> 16) + b | 0,
            v += (_ ^ b ^ p) + g[10] - 1094730640 | 0,
            v = (v << 23 | v >>> 9) + _ | 0,
            p += (v ^ _ ^ b) + g[13] + 681279174 | 0,
            p = (p << 4 | p >>> 28) + v | 0,
            b += (p ^ v ^ _) + g[0] - 358537222 | 0,
            b = (b << 11 | b >>> 21) + p | 0,
            _ += (b ^ p ^ v) + g[3] - 722521979 | 0,
            _ = (_ << 16 | _ >>> 16) + b | 0,
            v += (_ ^ b ^ p) + g[6] + 76029189 | 0,
            v = (v << 23 | v >>> 9) + _ | 0,
            p += (v ^ _ ^ b) + g[9] - 640364487 | 0,
            p = (p << 4 | p >>> 28) + v | 0,
            b += (p ^ v ^ _) + g[12] - 421815835 | 0,
            b = (b << 11 | b >>> 21) + p | 0,
            _ += (b ^ p ^ v) + g[15] + 530742520 | 0,
            _ = (_ << 16 | _ >>> 16) + b | 0,
            v += (_ ^ b ^ p) + g[2] - 995338651 | 0,
            v = (v << 23 | v >>> 9) + _ | 0,
            p += (_ ^ (v | ~b)) + g[0] - 198630844 | 0,
            p = (p << 6 | p >>> 26) + v | 0,
            b += (v ^ (p | ~_)) + g[7] + 1126891415 | 0,
            b = (b << 10 | b >>> 22) + p | 0,
            _ += (p ^ (b | ~v)) + g[14] - 1416354905 | 0,
            _ = (_ << 15 | _ >>> 17) + b | 0,
            v += (b ^ (_ | ~p)) + g[5] - 57434055 | 0,
            v = (v << 21 | v >>> 11) + _ | 0,
            p += (_ ^ (v | ~b)) + g[12] + 1700485571 | 0,
            p = (p << 6 | p >>> 26) + v | 0,
            b += (v ^ (p | ~_)) + g[3] - 1894986606 | 0,
            b = (b << 10 | b >>> 22) + p | 0,
            _ += (p ^ (b | ~v)) + g[10] - 1051523 | 0,
            _ = (_ << 15 | _ >>> 17) + b | 0,
            v += (b ^ (_ | ~p)) + g[1] - 2054922799 | 0,
            v = (v << 21 | v >>> 11) + _ | 0,
            p += (_ ^ (v | ~b)) + g[8] + 1873313359 | 0,
            p = (p << 6 | p >>> 26) + v | 0,
            b += (v ^ (p | ~_)) + g[15] - 30611744 | 0,
            b = (b << 10 | b >>> 22) + p | 0,
            _ += (p ^ (b | ~v)) + g[6] - 1560198380 | 0,
            _ = (_ << 15 | _ >>> 17) + b | 0,
            v += (b ^ (_ | ~p)) + g[13] + 1309151649 | 0,
            v = (v << 21 | v >>> 11) + _ | 0,
            p += (_ ^ (v | ~b)) + g[4] - 145523070 | 0,
            p = (p << 6 | p >>> 26) + v | 0,
            b += (v ^ (p | ~_)) + g[11] - 1120210379 | 0,
            b = (b << 10 | b >>> 22) + p | 0,
            _ += (p ^ (b | ~v)) + g[2] + 718787259 | 0,
            _ = (_ << 15 | _ >>> 17) + b | 0,
            v += (b ^ (_ | ~p)) + g[9] - 343485551 | 0,
            v = (v << 21 | v >>> 11) + _ | 0,
            E[0] = p + E[0] | 0,
            E[1] = v + E[1] | 0,
            E[2] = _ + E[2] | 0,
            E[3] = b + E[3] | 0
        }
        function o(E) {
            var g = [], p;
            for (p = 0; p < 64; p += 4)
                g[p >> 2] = E.charCodeAt(p) + (E.charCodeAt(p + 1) << 8) + (E.charCodeAt(p + 2) << 16) + (E.charCodeAt(p + 3) << 24);
            return g
        }
        function s(E) {
            var g = [], p;
            for (p = 0; p < 64; p += 4)
                g[p >> 2] = E[p] + (E[p + 1] << 8) + (E[p + 2] << 16) + (E[p + 3] << 24);
            return g
        }
        function a(E) {
            var g = E.length, p = [1732584193, -271733879, -1732584194, 271733878], v, _, b, C, B, T;
            for (v = 64; v <= g; v += 64)
                i(p, o(E.substring(v - 64, v)));
            for (E = E.substring(v - 64),
            _ = E.length,
            b = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
            v = 0; v < _; v += 1)
                b[v >> 2] |= E.charCodeAt(v) << (v % 4 << 3);
            if (b[v >> 2] |= 128 << (v % 4 << 3),
            v > 55)
                for (i(p, b),
                v = 0; v < 16; v += 1)
                    b[v] = 0;
            return C = g * 8,
            C = C.toString(16).match(/(.*?)(.{0,8})$/),
            B = parseInt(C[2], 16),
            T = parseInt(C[1], 16) || 0,
            b[14] = B,
            b[15] = T,
            i(p, b),
            p
        }
        function l(E) {
            var g = E.length, p = [1732584193, -271733879, -1732584194, 271733878], v, _, b, C, B, T;
            for (v = 64; v <= g; v += 64)
                i(p, s(E.subarray(v - 64, v)));
            for (E = v - 64 < g ? E.subarray(v - 64) : new Uint8Array(0),
            _ = E.length,
            b = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
            v = 0; v < _; v += 1)
                b[v >> 2] |= E[v] << (v % 4 << 3);
            if (b[v >> 2] |= 128 << (v % 4 << 3),
            v > 55)
                for (i(p, b),
                v = 0; v < 16; v += 1)
                    b[v] = 0;
            return C = g * 8,
            C = C.toString(16).match(/(.*?)(.{0,8})$/),
            B = parseInt(C[2], 16),
            T = parseInt(C[1], 16) || 0,
            b[14] = B,
            b[15] = T,
            i(p, b),
            p
        }
        function c(E) {
            var g = "", p;
            for (p = 0; p < 4; p += 1)
                g += n[E >> p * 8 + 4 & 15] + n[E >> p * 8 & 15];
            return g
        }
        function u(E) {
            var g;
            for (g = 0; g < E.length; g += 1)
                E[g] = c(E[g]);
            return E.join("")
        }
        u(a("hello")),
        typeof ArrayBuffer < "u" && !ArrayBuffer.prototype.slice && function() {
            function E(g, p) {
                return g = g | 0 || 0,
                g < 0 ? Math.max(g + p, 0) : Math.min(g, p)
            }
            ArrayBuffer.prototype.slice = function(g, p) {
                var v = this.byteLength, _ = E(g, v), b = v, C, B, T, A;
                return p !== r && (b = E(p, v)),
                _ > b ? new ArrayBuffer(0) : (C = b - _,
                B = new ArrayBuffer(C),
                T = new Uint8Array(B),
                A = new Uint8Array(this,_,C),
                T.set(A),
                B)
            }
        }();
        function f(E) {
            return /[\u0080-\uFFFF]/.test(E) && (E = unescape(encodeURIComponent(E))),
            E
        }
        function d(E, g) {
            var p = E.length, v = new ArrayBuffer(p), _ = new Uint8Array(v), b;
            for (b = 0; b < p; b += 1)
                _[b] = E.charCodeAt(b);
            return g ? _ : v
        }
        function h(E) {
            return String.fromCharCode.apply(null, new Uint8Array(E))
        }
        function x(E, g, p) {
            var v = new Uint8Array(E.byteLength + g.byteLength);
            return v.set(new Uint8Array(E)),
            v.set(new Uint8Array(g), E.byteLength),
            p ? v : v.buffer
        }
        function y(E) {
            var g = [], p = E.length, v;
            for (v = 0; v < p - 1; v += 2)
                g.push(parseInt(E.substr(v, 2), 16));
            return String.fromCharCode.apply(String, g)
        }
        function m() {
            this.reset()
        }
        return m.prototype.append = function(E) {
            return this.appendBinary(f(E)),
            this
        }
        ,
        m.prototype.appendBinary = function(E) {
            this._buff += E,
            this._length += E.length;
            var g = this._buff.length, p;
            for (p = 64; p <= g; p += 64)
                i(this._hash, o(this._buff.substring(p - 64, p)));
            return this._buff = this._buff.substring(p - 64),
            this
        }
        ,
        m.prototype.end = function(E) {
            var g = this._buff, p = g.length, v, _ = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], b;
            for (v = 0; v < p; v += 1)
                _[v >> 2] |= g.charCodeAt(v) << (v % 4 << 3);
            return this._finish(_, p),
            b = u(this._hash),
            E && (b = y(b)),
            this.reset(),
            b
        }
        ,
        m.prototype.reset = function() {
            return this._buff = "",
            this._length = 0,
            this._hash = [1732584193, -271733879, -1732584194, 271733878],
            this
        }
        ,
        m.prototype.getState = function() {
            return {
                buff: this._buff,
                length: this._length,
                hash: this._hash.slice()
            }
        }
        ,
        m.prototype.setState = function(E) {
            return this._buff = E.buff,
            this._length = E.length,
            this._hash = E.hash,
            this
        }
        ,
        m.prototype.destroy = function() {
            delete this._hash,
            delete this._buff,
            delete this._length
        }
        ,
        m.prototype._finish = function(E, g) {
            var p = g, v, _, b;
            if (E[p >> 2] |= 128 << (p % 4 << 3),
            p > 55)
                for (i(this._hash, E),
                p = 0; p < 16; p += 1)
                    E[p] = 0;
            v = this._length * 8,
            v = v.toString(16).match(/(.*?)(.{0,8})$/),
            _ = parseInt(v[2], 16),
            b = parseInt(v[1], 16) || 0,
            E[14] = _,
            E[15] = b,
            i(this._hash, E)
        }
        ,
        m.hash = function(E, g) {
            return m.hashBinary(f(E), g)
        }
        ,
        m.hashBinary = function(E, g) {
            var p = a(E)
              , v = u(p);
            return g ? y(v) : v
        }
        ,
        m.ArrayBuffer = function() {
            this.reset()
        }
        ,
        m.ArrayBuffer.prototype.append = function(E) {
            var g = x(this._buff.buffer, E, !0), p = g.length, v;
            for (this._length += E.byteLength,
            v = 64; v <= p; v += 64)
                i(this._hash, s(g.subarray(v - 64, v)));
            return this._buff = v - 64 < p ? new Uint8Array(g.buffer.slice(v - 64)) : new Uint8Array(0),
            this
        }
        ,
        m.ArrayBuffer.prototype.end = function(E) {
            var g = this._buff, p = g.length, v = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], _, b;
            for (_ = 0; _ < p; _ += 1)
                v[_ >> 2] |= g[_] << (_ % 4 << 3);
            return this._finish(v, p),
            b = u(this._hash),
            E && (b = y(b)),
            this.reset(),
            b
        }
        ,
        m.ArrayBuffer.prototype.reset = function() {
            return this._buff = new Uint8Array(0),
            this._length = 0,
            this._hash = [1732584193, -271733879, -1732584194, 271733878],
            this
        }
        ,
        m.ArrayBuffer.prototype.getState = function() {
            var E = m.prototype.getState.call(this);
            return E.buff = h(E.buff),
            E
        }
        ,
        m.ArrayBuffer.prototype.setState = function(E) {
            return E.buff = d(E.buff, !0),
            m.prototype.setState.call(this, E)
        }
        ,
        m.ArrayBuffer.prototype.destroy = m.prototype.destroy,
        m.ArrayBuffer.prototype._finish = m.prototype._finish,
        m.ArrayBuffer.hash = function(E, g) {
            var p = l(new Uint8Array(E))
              , v = u(p);
            return g ? y(v) : v
        }
        ,
        m
    })
}
)(i7);
var YK = i7.exports;
const $3e = Gi(YK);
var o7 = {
    exports: {}
};
(function(t, e) {
    (function(r, n) {
        t.exports = n()
    }
    )(er, function() {
        var r = 1e3
          , n = 6e4
          , i = 36e5
          , o = "millisecond"
          , s = "second"
          , a = "minute"
          , l = "hour"
          , c = "day"
          , u = "week"
          , f = "month"
          , d = "quarter"
          , h = "year"
          , x = "date"
          , y = "Invalid Date"
          , m = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/
          , E = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g
          , g = {
            name: "en",
            weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
            months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
            ordinal: function(F) {
                var R = ["th", "st", "nd", "rd"]
                  , P = F % 100;
                return "[" + F + (R[(P - 20) % 10] || R[P] || R[0]) + "]"
            }
        }
          , p = function(F, R, P) {
            var N = String(F);
            return !N || N.length >= R ? F : "" + Array(R + 1 - N.length).join(P) + F
        }
          , v = {
            s: p,
            z: function(F) {
                var R = -F.utcOffset()
                  , P = Math.abs(R)
                  , N = Math.floor(P / 60)
                  , j = P % 60;
                return (R <= 0 ? "+" : "-") + p(N, 2, "0") + ":" + p(j, 2, "0")
            },
            m: function F(R, P) {
                if (R.date() < P.date())
                    return -F(P, R);
                var N = 12 * (P.year() - R.year()) + (P.month() - R.month())
                  , j = R.clone().add(N, f)
                  , K = P - j < 0
                  , oe = R.clone().add(N + (K ? -1 : 1), f);
                return +(-(N + (P - j) / (K ? j - oe : oe - j)) || 0)
            },
            a: function(F) {
                return F < 0 ? Math.ceil(F) || 0 : Math.floor(F)
            },
            p: function(F) {
                return {
                    M: f,
                    y: h,
                    w: u,
                    d: c,
                    D: x,
                    h: l,
                    m: a,
                    s,
                    ms: o,
                    Q: d
                }[F] || String(F || "").toLowerCase().replace(/s$/, "")
            },
            u: function(F) {
                return F === void 0
            }
        }
          , _ = "en"
          , b = {};
        b[_] = g;
        var C = "$isDayjsObject"
          , B = function(F) {
            return F instanceof S || !(!F || !F[C])
        }
          , T = function F(R, P, N) {
            var j;
            if (!R)
                return _;
            if (typeof R == "string") {
                var K = R.toLowerCase();
                b[K] && (j = K),
                P && (b[K] = P,
                j = K);
                var oe = R.split("-");
                if (!j && oe.length > 1)
                    return F(oe[0])
            } else {
                var U = R.name;
                b[U] = R,
                j = U
            }
            return !N && j && (_ = j),
            j || !N && _
        }
          , A = function(F, R) {
            if (B(F))
                return F.clone();
            var P = typeof R == "object" ? R : {};
            return P.date = F,
            P.args = arguments,
            new S(P)
        }
          , w = v;
        w.l = T,
        w.i = B,
        w.w = function(F, R) {
            return A(F, {
                locale: R.$L,
                utc: R.$u,
                x: R.$x,
                $offset: R.$offset
            })
        }
        ;
        var S = function() {
            function F(P) {
                this.$L = T(P.locale, null, !0),
                this.parse(P),
                this.$x = this.$x || P.x || {},
                this[C] = !0
            }
            var R = F.prototype;
            return R.parse = function(P) {
                this.$d = function(N) {
                    var j = N.date
                      , K = N.utc;
                    if (j === null)
                        return new Date(NaN);
                    if (w.u(j))
                        return new Date;
                    if (j instanceof Date)
                        return new Date(j);
                    if (typeof j == "string" && !/Z$/i.test(j)) {
                        var oe = j.match(m);
                        if (oe) {
                            var U = oe[2] - 1 || 0
                              , $ = (oe[7] || "0").substring(0, 3);
                            return K ? new Date(Date.UTC(oe[1], U, oe[3] || 1, oe[4] || 0, oe[5] || 0, oe[6] || 0, $)) : new Date(oe[1],U,oe[3] || 1,oe[4] || 0,oe[5] || 0,oe[6] || 0,$)
                        }
                    }
                    return new Date(j)
                }(P),
                this.init()
            }
            ,
            R.init = function() {
                var P = this.$d;
                this.$y = P.getFullYear(),
                this.$M = P.getMonth(),
                this.$D = P.getDate(),
                this.$W = P.getDay(),
                this.$H = P.getHours(),
                this.$m = P.getMinutes(),
                this.$s = P.getSeconds(),
                this.$ms = P.getMilliseconds()
            }
            ,
            R.$utils = function() {
                return w
            }
            ,
            R.isValid = function() {
                return this.$d.toString() !== y
            }
            ,
            R.isSame = function(P, N) {
                var j = A(P);
                return this.startOf(N) <= j && j <= this.endOf(N)
            }
            ,
            R.isAfter = function(P, N) {
                return A(P) < this.startOf(N)
            }
            ,
            R.isBefore = function(P, N) {
                return this.endOf(N) < A(P)
            }
            ,
            R.$g = function(P, N, j) {
                return w.u(P) ? this[N] : this.set(j, P)
            }
            ,
            R.unix = function() {
                return Math.floor(this.valueOf() / 1e3)
            }
            ,
            R.valueOf = function() {
                return this.$d.getTime()
            }
            ,
            R.startOf = function(P, N) {
                var j = this
                  , K = !!w.u(N) || N
                  , oe = w.p(P)
                  , U = function(te, he) {
                    var xe = w.w(j.$u ? Date.UTC(j.$y, he, te) : new Date(j.$y,he,te), j);
                    return K ? xe : xe.endOf(c)
                }
                  , $ = function(te, he) {
                    return w.w(j.toDate()[te].apply(j.toDate("s"), (K ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(he)), j)
                }
                  , V = this.$W
                  , W = this.$M
                  , H = this.$D
                  , Q = "set" + (this.$u ? "UTC" : "");
                switch (oe) {
                case h:
                    return K ? U(1, 0) : U(31, 11);
                case f:
                    return K ? U(1, W) : U(0, W + 1);
                case u:
                    var G = this.$locale().weekStart || 0
                      , re = (V < G ? V + 7 : V) - G;
                    return U(K ? H - re : H + (6 - re), W);
                case c:
                case x:
                    return $(Q + "Hours", 0);
                case l:
                    return $(Q + "Minutes", 1);
                case a:
                    return $(Q + "Seconds", 2);
                case s:
                    return $(Q + "Milliseconds", 3);
                default:
                    return this.clone()
                }
            }
            ,
            R.endOf = function(P) {
                return this.startOf(P, !1)
            }
            ,
            R.$set = function(P, N) {
                var j, K = w.p(P), oe = "set" + (this.$u ? "UTC" : ""), U = (j = {},
                j[c] = oe + "Date",
                j[x] = oe + "Date",
                j[f] = oe + "Month",
                j[h] = oe + "FullYear",
                j[l] = oe + "Hours",
                j[a] = oe + "Minutes",
                j[s] = oe + "Seconds",
                j[o] = oe + "Milliseconds",
                j)[K], $ = K === c ? this.$D + (N - this.$W) : N;
                if (K === f || K === h) {
                    var V = this.clone().set(x, 1);
                    V.$d[U]($),
                    V.init(),
                    this.$d = V.set(x, Math.min(this.$D, V.daysInMonth())).$d
                } else
                    U && this.$d[U]($);
                return this.init(),
                this
            }
            ,
            R.set = function(P, N) {
                return this.clone().$set(P, N)
            }
            ,
            R.get = function(P) {
                return this[w.p(P)]()
            }
            ,
            R.add = function(P, N) {
                var j, K = this;
                P = Number(P);
                var oe = w.p(N)
                  , U = function(W) {
                    var H = A(K);
                    return w.w(H.date(H.date() + Math.round(W * P)), K)
                };
                if (oe === f)
                    return this.set(f, this.$M + P);
                if (oe === h)
                    return this.set(h, this.$y + P);
                if (oe === c)
                    return U(1);
                if (oe === u)
                    return U(7);
                var $ = (j = {},
                j[a] = n,
                j[l] = i,
                j[s] = r,
                j)[oe] || 1
                  , V = this.$d.getTime() + P * $;
                return w.w(V, this)
            }
            ,
            R.subtract = function(P, N) {
                return this.add(-1 * P, N)
            }
            ,
            R.format = function(P) {
                var N = this
                  , j = this.$locale();
                if (!this.isValid())
                    return j.invalidDate || y;
                var K = P || "YYYY-MM-DDTHH:mm:ssZ"
                  , oe = w.z(this)
                  , U = this.$H
                  , $ = this.$m
                  , V = this.$M
                  , W = j.weekdays
                  , H = j.months
                  , Q = j.meridiem
                  , G = function(he, xe, ve, I) {
                    return he && (he[xe] || he(N, K)) || ve[xe].slice(0, I)
                }
                  , re = function(he) {
                    return w.s(U % 12 || 12, he, "0")
                }
                  , te = Q || function(he, xe, ve) {
                    var I = he < 12 ? "AM" : "PM";
                    return ve ? I.toLowerCase() : I
                }
                ;
                return K.replace(E, function(he, xe) {
                    return xe || function(ve) {
                        switch (ve) {
                        case "YY":
                            return String(N.$y).slice(-2);
                        case "YYYY":
                            return w.s(N.$y, 4, "0");
                        case "M":
                            return V + 1;
                        case "MM":
                            return w.s(V + 1, 2, "0");
                        case "MMM":
                            return G(j.monthsShort, V, H, 3);
                        case "MMMM":
                            return G(H, V);
                        case "D":
                            return N.$D;
                        case "DD":
                            return w.s(N.$D, 2, "0");
                        case "d":
                            return String(N.$W);
                        case "dd":
                            return G(j.weekdaysMin, N.$W, W, 2);
                        case "ddd":
                            return G(j.weekdaysShort, N.$W, W, 3);
                        case "dddd":
                            return W[N.$W];
                        case "H":
                            return String(U);
                        case "HH":
                            return w.s(U, 2, "0");
                        case "h":
                            return re(1);
                        case "hh":
                            return re(2);
                        case "a":
                            return te(U, $, !0);
                        case "A":
                            return te(U, $, !1);
                        case "m":
                            return String($);
                        case "mm":
                            return w.s($, 2, "0");
                        case "s":
                            return String(N.$s);
                        case "ss":
                            return w.s(N.$s, 2, "0");
                        case "SSS":
                            return w.s(N.$ms, 3, "0");
                        case "Z":
                            return oe
                        }
                        return null
                    }(he) || oe.replace(":", "")
                })
            }
            ,
            R.utcOffset = function() {
                return 15 * -Math.round(this.$d.getTimezoneOffset() / 15)
            }
            ,
            R.diff = function(P, N, j) {
                var K, oe = this, U = w.p(N), $ = A(P), V = ($.utcOffset() - this.utcOffset()) * n, W = this - $, H = function() {
                    return w.m(oe, $)
                };
                switch (U) {
                case h:
                    K = H() / 12;
                    break;
                case f:
                    K = H();
                    break;
                case d:
                    K = H() / 3;
                    break;
                case u:
                    K = (W - V) / 6048e5;
                    break;
                case c:
                    K = (W - V) / 864e5;
                    break;
                case l:
                    K = W / i;
                    break;
                case a:
                    K = W / n;
                    break;
                case s:
                    K = W / r;
                    break;
                default:
                    K = W
                }
                return j ? K : w.a(K)
            }
            ,
            R.daysInMonth = function() {
                return this.endOf(f).$D
            }
            ,
            R.$locale = function() {
                return b[this.$L]
            }
            ,
            R.locale = function(P, N) {
                if (!P)
                    return this.$L;
                var j = this.clone()
                  , K = T(P, N, !0);
                return K && (j.$L = K),
                j
            }
            ,
            R.clone = function() {
                return w.w(this.$d, this)
            }
            ,
            R.toDate = function() {
                return new Date(this.valueOf())
            }
            ,
            R.toJSON = function() {
                return this.isValid() ? this.toISOString() : null
            }
            ,
            R.toISOString = function() {
                return this.$d.toISOString()
            }
            ,
            R.toString = function() {
                return this.$d.toUTCString()
            }
            ,
            F
        }()
          , D = S.prototype;
        return A.prototype = D,
        [["$ms", o], ["$s", s], ["$m", a], ["$H", l], ["$W", c], ["$M", f], ["$y", h], ["$D", x]].forEach(function(F) {
            D[F[1]] = function(R) {
                return this.$g(R, F[0], F[1])
            }
        }),
        A.extend = function(F, R) {
            return F.$i || (F(R, S, A),
            F.$i = !0),
            A
        }
        ,
        A.locale = T,
        A.isDayjs = B,
        A.unix = function(F) {
            return A(1e3 * F)
        }
        ,
        A.en = b[_],
        A.Ls = b,
        A.p = {},
        A
    })
}
)(o7);
var _2 = o7.exports;
const U3e = Gi(_2);
function fy() {}
const We = Object.assign
  , vo = typeof window < "u"
  , yo = t => t !== null && typeof t == "object"
  , Lt = t => t != null
  , Wc = t => typeof t == "function"
  , b2 = t => yo(t) && Wc(t.then) && Wc(t.catch)
  , lf = t => Object.prototype.toString.call(t) === "[object Date]" && !Number.isNaN(t.getTime())
  , s7 = t => typeof t == "number" || /^\d+(\.\d+)?$/.test(t)
  , XK = () => vo ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : !1;
function r9(t, e) {
    const r = e.split(".");
    let n = t;
    return r.forEach(i => {
        var o;
        n = yo(n) && (o = n[i]) != null ? o : ""
    }
    ),
    n
}
function $t(t, e, r) {
    return e.reduce( (n, i) => ((!r || t[i] !== void 0) && (n[i] = t[i]),
    n), {})
}
const Js = (t, e) => JSON.stringify(t) === JSON.stringify(e)
  , bx = t => Array.isArray(t) ? t : [t]
  , hr = null
  , Ae = [Number, String]
  , Ee = {
    type: Boolean,
    default: !0
}
  , fn = t => ({
    type: t,
    required: !0
})
  , ls = () => ({
    type: Array,
    default: () => []
})
  , jp = t => ({
    type: Number,
    default: t
})
  , ze = t => ({
    type: Ae,
    default: t
})
  , Ie = t => ({
    type: String,
    default: t
});
function Jf(t) {
    const e = "scrollTop"in t ? t.scrollTop : t.pageYOffset;
    return Math.max(e, 0)
}
function Cx(t, e) {
    "scrollTop"in t ? t.scrollTop = e : t.scrollTo(t.scrollX, e)
}
function C2() {
    return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0
}
function A2(t) {
    Cx(window, t),
    Cx(document.body, t)
}
function n9(t, e) {
    if (t === window)
        return 0;
    const r = e ? Jf(e) : C2();
    return Cr(t).top + r
}
const KK = XK();
function a7() {
    KK && A2(C2())
}
const l7 = t => t.stopPropagation();
function Rr(t, e) {
    (typeof t.cancelable != "boolean" || t.cancelable) && t.preventDefault(),
    e && l7(t)
}
function Yc(t) {
    const e = hn(t);
    if (!e)
        return !1;
    const r = window.getComputedStyle(e)
      , n = r.display === "none"
      , i = e.offsetParent === null && r.position !== "fixed";
    return n || i
}
const {width: Zo, height: Qs} = SS();
function rt(t) {
    if (Lt(t))
        return s7(t) ? `${t}px` : String(t)
}
function $l(t) {
    if (Lt(t)) {
        if (Array.isArray(t))
            return {
                width: rt(t[0]),
                height: rt(t[1])
            };
        const e = rt(t);
        return {
            width: e,
            height: e
        }
    }
}
function c7(t) {
    const e = {};
    return t !== void 0 && (e.zIndex = +t),
    e
}
let ig;
function qK() {
    if (!ig) {
        const t = document.documentElement
          , e = t.style.fontSize || window.getComputedStyle(t).fontSize;
        ig = parseFloat(e)
    }
    return ig
}
function ZK(t) {
    return t = t.replace(/rem/g, ""),
    +t * qK()
}
function JK(t) {
    return t = t.replace(/vw/g, ""),
    +t * Zo.value / 100
}
function QK(t) {
    return t = t.replace(/vh/g, ""),
    +t * Qs.value / 100
}
function w2(t) {
    if (typeof t == "number")
        return t;
    if (vo) {
        if (t.includes("rem"))
            return ZK(t);
        if (t.includes("vw"))
            return JK(t);
        if (t.includes("vh"))
            return QK(t)
    }
    return parseFloat(t)
}
const eq = /-(\w)/g
  , u7 = t => t.replace(eq, (e, r) => r.toUpperCase());
function Ha(t, e=2) {
    let r = t + "";
    for (; r.length < e; )
        r = "0" + r;
    return r
}
const Ur = (t, e, r) => Math.min(Math.max(t, e), r);
function i9(t, e, r) {
    const n = t.indexOf(e);
    return n === -1 ? t : e === "-" && n !== 0 ? t.slice(0, n) : t.slice(0, n + 1) + t.slice(n).replace(r, "")
}
function dy(t, e=!0, r=!0) {
    e ? t = i9(t, ".", /\./g) : t = t.split(".")[0],
    r ? t = i9(t, "-", /-/g) : t = t.replace(/-/, "");
    const n = e ? /[^-0-9.]/g : /[^-0-9]/g;
    return t.replace(n, "")
}
function f7(t, e) {
    return Math.round((t + e) * 1e10) / 1e10
}
const {hasOwnProperty: tq} = Object.prototype;
function rq(t, e, r) {
    const n = e[r];
    Lt(n) && (!tq.call(t, r) || !yo(n) ? t[r] = n : t[r] = d7(Object(t[r]), n))
}
function d7(t, e) {
    return Object.keys(e).forEach(r => {
        rq(t, e, r)
    }
    ),
    t
}
var nq = {
    name: "姓名",
    tel: "电话",
    save: "保存",
    clear: "清空",
    cancel: "取消",
    confirm: "确认",
    delete: "删除",
    loading: "加载中...",
    noCoupon: "暂无优惠券",
    nameEmpty: "请填写姓名",
    addContact: "添加联系人",
    telInvalid: "请填写正确的电话",
    vanCalendar: {
        end: "结束",
        start: "开始",
        title: "日期选择",
        weekdays: ["日", "一", "二", "三", "四", "五", "六"],
        monthTitle: (t, e) => `${t}年${e}月`,
        rangePrompt: t => `最多选择 ${t} 天`
    },
    vanCascader: {
        select: "请选择"
    },
    vanPagination: {
        prev: "上一页",
        next: "下一页"
    },
    vanPullRefresh: {
        pulling: "下拉即可刷新...",
        loosing: "释放即可刷新..."
    },
    vanSubmitBar: {
        label: "合计:"
    },
    vanCoupon: {
        unlimited: "无门槛",
        discount: t => `${t}折`,
        condition: t => `满${t}元可用`
    },
    vanCouponCell: {
        title: "优惠券",
        count: t => `${t}张可用`
    },
    vanCouponList: {
        exchange: "兑换",
        close: "不使用",
        enable: "可用",
        disabled: "不可用",
        placeholder: "输入优惠码"
    },
    vanAddressEdit: {
        area: "地区",
        areaEmpty: "请选择地区",
        addressEmpty: "请填写详细地址",
        addressDetail: "详细地址",
        defaultAddress: "设为默认收货地址"
    },
    vanAddressList: {
        add: "新增地址"
    }
};
const o9 = ie("zh-CN")
  , s9 = Pt({
    "zh-CN": nq
})
  , iq = {
    messages() {
        return s9[o9.value]
    },
    use(t, e) {
        o9.value = t,
        this.add({
            [t]: e
        })
    },
    add(t={}) {
        d7(s9, t)
    }
};
var oq = iq;
function sq(t) {
    const e = u7(t) + ".";
    return (r, ...n) => {
        const i = oq.messages()
          , o = r9(i, e + r) || r9(i, r);
        return Wc(o) ? o(...n) : o
    }
}
function hy(t, e) {
    return e ? typeof e == "string" ? ` ${t}--${e}` : Array.isArray(e) ? e.reduce( (r, n) => r + hy(t, n), "") : Object.keys(e).reduce( (r, n) => r + (e[n] ? hy(t, n) : ""), "") : ""
}
function aq(t) {
    return (e, r) => (e && typeof e != "string" && (r = e,
    e = ""),
    e = e ? `${t}__${e}` : t,
    `${e}${hy(e, r)}`)
}
function Se(t) {
    const e = `van-${t}`;
    return [e, aq(e), sq(e)]
}
const pa = "van-hairline"
  , h7 = `${pa}--top`
  , lq = `${pa}--left`
  , cq = `${pa}--right`
  , uq = `${pa}--bottom`
  , Uh = `${pa}--surround`
  , x7 = `${pa}--top-bottom`
  , fq = `${pa}-unset--top-bottom`
  , cs = "van-haptics-feedback"
  , p7 = Symbol("van-form")
  , g7 = 500
  , a9 = 5;
function Eu(t, {args: e=[], done: r, canceled: n, error: i}) {
    if (t) {
        const o = t.apply(null, e);
        b2(o) ? o.then(s => {
            s ? r() : n && n()
        }
        ).catch(i || fy) : o ? r() : n && n()
    } else
        r()
}
function Oe(t) {
    return t.install = e => {
        const {name: r} = t;
        r && (e.component(r, t),
        e.component(u7(`-${r}`), t))
    }
    ,
    t
}
function l9(t, e) {
    return t.reduce( (r, n) => Math.abs(r - e) < Math.abs(n - e) ? r : n)
}
const m7 = Symbol();
function B2(t) {
    const e = dr(m7, null);
    e && me(e, r => {
        r && t()
    }
    )
}
const v7 = (t, e) => {
    const r = ie()
      , n = () => {
        r.value = Cr(t).height
    }
    ;
    return Ht( () => {
        if (Xe(n),
        e)
            for (let i = 1; i <= 3; i++)
                setTimeout(n, 100 * i)
    }
    ),
    B2( () => Xe(n)),
    me([Zo, Qs], n),
    r
}
;
function dq(t, e) {
    const r = v7(t, !0);
    return n => O("div", {
        class: e("placeholder"),
        style: {
            height: r.value ? `${r.value}px` : void 0
        }
    }, [n()])
}
const [y7,c9] = Se("action-bar")
  , E7 = Symbol(y7)
  , hq = {
    placeholder: Boolean,
    safeAreaInsetBottom: Ee
};
var xq = be({
    name: y7,
    props: hq,
    setup(t, {slots: e}) {
        const r = ie()
          , n = dq(r, c9)
          , {linkChildren: i} = Hi(E7);
        i();
        const o = () => {
            var s;
            return O("div", {
                ref: r,
                class: [c9(), {
                    "van-safe-area-bottom": t.safeAreaInsetBottom
                }]
            }, [(s = e.default) == null ? void 0 : s.call(e)])
        }
        ;
        return () => t.placeholder ? n(o) : o()
    }
});
const pq = Oe(xq);
function Kt(t) {
    const e = It();
    e && We(e.proxy, t)
}
const _u = {
    to: [String, Object],
    url: String,
    replace: Boolean
};
function _7({to: t, url: e, replace: r, $router: n}) {
    t && n ? n[r ? "replace" : "push"](t) : e && (r ? location.replace(e) : location.href = e)
}
function Qf() {
    const t = It().proxy;
    return () => _7(t)
}
const [gq,u9] = Se("badge")
  , mq = {
    dot: Boolean,
    max: Ae,
    tag: Ie("div"),
    color: String,
    offset: Array,
    content: Ae,
    showZero: Ee,
    position: Ie("top-right")
};
var vq = be({
    name: gq,
    props: mq,
    setup(t, {slots: e}) {
        const r = () => {
            if (e.content)
                return !0;
            const {content: a, showZero: l} = t;
            return Lt(a) && a !== "" && (l || a !== 0 && a !== "0")
        }
          , n = () => {
            const {dot: a, max: l, content: c} = t;
            if (!a && r())
                return e.content ? e.content() : Lt(l) && s7(c) && +c > +l ? `${l}+` : c
        }
          , i = a => a.startsWith("-") ? a.replace("-", "") : `-${a}`
          , o = ae( () => {
            const a = {
                background: t.color
            };
            if (t.offset) {
                const [l,c] = t.offset
                  , {position: u} = t
                  , [f,d] = u.split("-");
                e.default ? (typeof c == "number" ? a[f] = rt(f === "top" ? c : -c) : a[f] = f === "top" ? rt(c) : i(c),
                typeof l == "number" ? a[d] = rt(d === "left" ? l : -l) : a[d] = d === "left" ? rt(l) : i(l)) : (a.marginTop = rt(c),
                a.marginLeft = rt(l))
            }
            return a
        }
        )
          , s = () => {
            if (r() || t.dot)
                return O("div", {
                    class: u9([t.position, {
                        dot: t.dot,
                        fixed: !!e.default
                    }]),
                    style: o.value
                }, [n()])
        }
        ;
        return () => {
            if (e.default) {
                const {tag: a} = t;
                return O(a, {
                    class: u9("wrapper")
                }, {
                    default: () => [e.default(), s()]
                })
            }
            return s()
        }
    }
});
const Wp = Oe(vq);
let yq = 2e3;
const Eq = () => ++yq
  , [_q,G3e] = Se("config-provider")
  , bq = Symbol(_q)
  , [Cq,f9] = Se("icon")
  , Aq = t => t == null ? void 0 : t.includes("/")
  , wq = {
    dot: Boolean,
    tag: Ie("i"),
    name: String,
    size: Ae,
    badge: Ae,
    color: String,
    badgeProps: Object,
    classPrefix: String
};
var Bq = be({
    name: Cq,
    props: wq,
    setup(t, {slots: e}) {
        const r = dr(bq, null)
          , n = ae( () => t.classPrefix || (r == null ? void 0 : r.iconPrefix) || f9());
        return () => {
            const {tag: i, dot: o, name: s, size: a, badge: l, color: c} = t
              , u = Aq(s);
            return O(Wp, st({
                dot: o,
                tag: i,
                class: [n.value, u ? "" : `${n.value}-${s}`],
                style: {
                    color: c,
                    fontSize: rt(a)
                },
                content: l
            }, t.badgeProps), {
                default: () => {
                    var f;
                    return [(f = e.default) == null ? void 0 : f.call(e), u && O("img", {
                        class: f9("image"),
                        src: s
                    }, null)]
                }
            })
        }
    }
});
const rr = Oe(Bq);
var Sq = rr;
const [Tq,D0] = Se("loading")
  , Dq = Array(12).fill(null).map( (t, e) => O("i", {
    class: D0("line", String(e + 1))
}, null))
  , Fq = O("svg", {
    class: D0("circular"),
    viewBox: "25 25 50 50"
}, [O("circle", {
    cx: "50",
    cy: "50",
    r: "20",
    fill: "none"
}, null)])
  , Pq = {
    size: Ae,
    type: Ie("circular"),
    color: String,
    vertical: Boolean,
    textSize: Ae,
    textColor: String
};
var Iq = be({
    name: Tq,
    props: Pq,
    setup(t, {slots: e}) {
        const r = ae( () => We({
            color: t.color
        }, $l(t.size)))
          , n = () => {
            const o = t.type === "spinner" ? Dq : Fq;
            return O("span", {
                class: D0("spinner", t.type),
                style: r.value
            }, [e.icon ? e.icon() : o])
        }
          , i = () => {
            var o;
            if (e.default)
                return O("span", {
                    class: D0("text"),
                    style: {
                        fontSize: rt(t.textSize),
                        color: (o = t.textColor) != null ? o : t.color
                    }
                }, [e.default()])
        }
        ;
        return () => {
            const {type: o, vertical: s} = t;
            return O("div", {
                class: D0([o, {
                    vertical: s
                }]),
                "aria-live": "polite",
                "aria-busy": !0
            }, [n(), i()])
        }
    }
});
const ys = Oe(Iq)
  , [Oq,ql] = Se("button")
  , kq = We({}, _u, {
    tag: Ie("button"),
    text: String,
    icon: String,
    type: Ie("default"),
    size: Ie("normal"),
    color: String,
    block: Boolean,
    plain: Boolean,
    round: Boolean,
    square: Boolean,
    loading: Boolean,
    hairline: Boolean,
    disabled: Boolean,
    iconPrefix: String,
    nativeType: Ie("button"),
    loadingSize: Ae,
    loadingText: String,
    loadingType: String,
    iconPosition: Ie("left")
});
var Rq = be({
    name: Oq,
    props: kq,
    emits: ["click"],
    setup(t, {emit: e, slots: r}) {
        const n = Qf()
          , i = () => r.loading ? r.loading() : O(ys, {
            size: t.loadingSize,
            type: t.loadingType,
            class: ql("loading")
        }, null)
          , o = () => {
            if (t.loading)
                return i();
            if (r.icon)
                return O("div", {
                    class: ql("icon")
                }, [r.icon()]);
            if (t.icon)
                return O(rr, {
                    name: t.icon,
                    class: ql("icon"),
                    classPrefix: t.iconPrefix
                }, null)
        }
          , s = () => {
            let c;
            if (t.loading ? c = t.loadingText : c = r.default ? r.default() : t.text,
            c)
                return O("span", {
                    class: ql("text")
                }, [c])
        }
          , a = () => {
            const {color: c, plain: u} = t;
            if (c) {
                const f = {
                    color: u ? c : "white"
                };
                return u || (f.background = c),
                c.includes("gradient") ? f.border = 0 : f.borderColor = c,
                f
            }
        }
          , l = c => {
            t.loading ? Rr(c) : t.disabled || (e("click", c),
            n())
        }
        ;
        return () => {
            const {tag: c, type: u, size: f, block: d, round: h, plain: x, square: y, loading: m, disabled: E, hairline: g, nativeType: p, iconPosition: v} = t
              , _ = [ql([u, f, {
                plain: x,
                block: d,
                round: h,
                square: y,
                loading: m,
                disabled: E,
                hairline: g
            }]), {
                [Uh]: g
            }];
            return O(c, {
                type: p,
                class: _,
                style: a(),
                disabled: E,
                onClick: l
            }, {
                default: () => [O("div", {
                    class: ql("content")
                }, [v === "left" && o(), s(), v === "right" && o()])]
            })
        }
    }
});
const Ax = Oe(Rq)
  , [Mq,Nq] = Se("action-bar-button")
  , Lq = We({}, _u, {
    type: String,
    text: String,
    icon: String,
    color: String,
    loading: Boolean,
    disabled: Boolean
});
var $q = be({
    name: Mq,
    props: Lq,
    setup(t, {slots: e}) {
        const r = Qf()
          , {parent: n, index: i} = Jn(E7)
          , o = ae( () => {
            if (n) {
                const a = n.children[i.value - 1];
                return !(a && "isButton"in a)
            }
        }
        )
          , s = ae( () => {
            if (n) {
                const a = n.children[i.value + 1];
                return !(a && "isButton"in a)
            }
        }
        );
        return Kt({
            isButton: !0
        }),
        () => {
            const {type: a, icon: l, text: c, color: u, loading: f, disabled: d} = t;
            return O(Ax, {
                class: Nq([a, {
                    last: s.value,
                    first: o.value
                }]),
                size: "large",
                type: a,
                icon: l,
                color: u,
                loading: f,
                disabled: d,
                onClick: r
            }, {
                default: () => [e.default ? e.default() : c]
            })
        }
    }
});
const d9 = Oe($q)
  , ed = {
    show: Boolean,
    zIndex: Ae,
    overlay: Ee,
    duration: Ae,
    teleport: [String, Object],
    lockScroll: Ee,
    lazyRender: Ee,
    beforeClose: Function,
    overlayProps: Object,
    overlayStyle: Object,
    overlayClass: hr,
    transitionAppear: Boolean,
    closeOnClickOverlay: Ee
}
  , b7 = Object.keys(ed);
function Uq(t, e) {
    return t > e ? "horizontal" : e > t ? "vertical" : ""
}
function Ul() {
    const t = ie(0)
      , e = ie(0)
      , r = ie(0)
      , n = ie(0)
      , i = ie(0)
      , o = ie(0)
      , s = ie("")
      , a = ie(!0)
      , l = () => s.value === "vertical"
      , c = () => s.value === "horizontal"
      , u = () => {
        r.value = 0,
        n.value = 0,
        i.value = 0,
        o.value = 0,
        s.value = "",
        a.value = !0
    }
    ;
    return {
        move: h => {
            const x = h.touches[0];
            r.value = (x.clientX < 0 ? 0 : x.clientX) - t.value,
            n.value = x.clientY - e.value,
            i.value = Math.abs(r.value),
            o.value = Math.abs(n.value);
            const y = 10;
            (!s.value || i.value < y && o.value < y) && (s.value = Uq(i.value, o.value)),
            a.value && (i.value > a9 || o.value > a9) && (a.value = !1)
        }
        ,
        start: h => {
            u(),
            t.value = h.touches[0].clientX,
            e.value = h.touches[0].clientY
        }
        ,
        reset: u,
        startX: t,
        startY: e,
        deltaX: r,
        deltaY: n,
        offsetX: i,
        offsetY: o,
        direction: s,
        isVertical: l,
        isHorizontal: c,
        isTap: a
    }
}
let $u = 0;
const h9 = "van-overflow-hidden";
function Gq(t, e) {
    const r = Ul()
      , n = "01"
      , i = "10"
      , o = u => {
        r.move(u);
        const f = r.deltaY.value > 0 ? i : n
          , d = j_(u.target, t.value)
          , {scrollHeight: h, offsetHeight: x, scrollTop: y} = d;
        let m = "11";
        y === 0 ? m = x >= h ? "00" : "01" : y + x >= h && (m = "10"),
        m !== "11" && r.isVertical() && !(parseInt(m, 2) & parseInt(f, 2)) && Rr(u, !0)
    }
      , s = () => {
        document.addEventListener("touchstart", r.start),
        document.addEventListener("touchmove", o, {
            passive: !1
        }),
        $u || document.body.classList.add(h9),
        $u++
    }
      , a = () => {
        $u && (document.removeEventListener("touchstart", r.start),
        document.removeEventListener("touchmove", o),
        $u--,
        $u || document.body.classList.remove(h9))
    }
      , l = () => e() && s()
      , c = () => e() && a();
    yu(l),
    wo(c),
    Zn(c),
    me(e, u => {
        u ? s() : a()
    }
    )
}
function S2(t) {
    const e = ie(!1);
    return me(t, r => {
        r && (e.value = r)
    }
    , {
        immediate: !0
    }),
    r => () => e.value ? r() : null
}
const xy = () => {
    var t;
    const {scopeId: e} = ((t = It()) == null ? void 0 : t.vnode) || {};
    return e ? {
        [e]: ""
    } : null
}
  , [Hq,Vq] = Se("overlay")
  , zq = {
    show: Boolean,
    zIndex: Ae,
    duration: Ae,
    className: hr,
    lockScroll: Ee,
    lazyRender: Ee,
    customStyle: Object,
    teleport: [String, Object]
};
var jq = be({
    name: Hq,
    inheritAttrs: !1,
    props: zq,
    setup(t, {attrs: e, slots: r}) {
        const n = ie()
          , i = S2( () => t.show || !t.lazyRender)
          , o = a => {
            t.lockScroll && Rr(a, !0)
        }
          , s = i( () => {
            var a;
            const l = We(c7(t.zIndex), t.customStyle);
            return Lt(t.duration) && (l.animationDuration = `${t.duration}s`),
            hi(O("div", st({
                ref: n,
                style: l,
                class: [Vq(), t.className]
            }, e), [(a = r.default) == null ? void 0 : a.call(r)]), [[pi, t.show]])
        }
        );
        return mn("touchmove", o, {
            target: n
        }),
        () => {
            const a = O(Kf, {
                name: "van-fade",
                appear: !0
            }, {
                default: s
            });
            return t.teleport ? O(Bp, {
                to: t.teleport
            }, {
                default: () => [a]
            }) : a
        }
    }
});
const Wq = Oe(jq)
  , Yq = We({}, ed, {
    round: Boolean,
    position: Ie("center"),
    closeIcon: Ie("cross"),
    closeable: Boolean,
    transition: String,
    iconPrefix: String,
    closeOnPopstate: Boolean,
    closeIconPosition: Ie("top-right"),
    destroyOnClose: Boolean,
    safeAreaInsetTop: Boolean,
    safeAreaInsetBottom: Boolean
})
  , [Xq,x9] = Se("popup");
var Kq = be({
    name: Xq,
    inheritAttrs: !1,
    props: Yq,
    emits: ["open", "close", "opened", "closed", "keydown", "update:show", "clickOverlay", "clickCloseIcon"],
    setup(t, {emit: e, attrs: r, slots: n}) {
        let i, o;
        const s = ie()
          , a = ie()
          , l = S2( () => t.show || !t.lazyRender)
          , c = ae( () => {
            const b = {
                zIndex: s.value
            };
            if (Lt(t.duration)) {
                const C = t.position === "center" ? "animationDuration" : "transitionDuration";
                b[C] = `${t.duration}s`
            }
            return b
        }
        )
          , u = () => {
            i || (i = !0,
            s.value = t.zIndex !== void 0 ? +t.zIndex : Eq(),
            e("open"))
        }
          , f = () => {
            i && Eu(t.beforeClose, {
                done() {
                    i = !1,
                    e("close"),
                    e("update:show", !1)
                }
            })
        }
          , d = b => {
            e("clickOverlay", b),
            t.closeOnClickOverlay && f()
        }
          , h = () => {
            if (t.overlay) {
                const b = We({
                    show: t.show,
                    class: t.overlayClass,
                    zIndex: s.value,
                    duration: t.duration,
                    customStyle: t.overlayStyle,
                    role: t.closeOnClickOverlay ? "button" : void 0,
                    tabindex: t.closeOnClickOverlay ? 0 : void 0
                }, t.overlayProps);
                return O(Wq, st(b, xy(), {
                    onClick: d
                }), {
                    default: n["overlay-content"]
                })
            }
        }
          , x = b => {
            e("clickCloseIcon", b),
            f()
        }
          , y = () => {
            if (t.closeable)
                return O(rr, {
                    role: "button",
                    tabindex: 0,
                    name: t.closeIcon,
                    class: [x9("close-icon", t.closeIconPosition), cs],
                    classPrefix: t.iconPrefix,
                    onClick: x
                }, null)
        }
        ;
        let m;
        const E = () => {
            m && clearTimeout(m),
            m = setTimeout( () => {
                e("opened")
            }
            )
        }
          , g = () => e("closed")
          , p = b => e("keydown", b)
          , v = l( () => {
            var b;
            const {destroyOnClose: C, round: B, position: T, safeAreaInsetTop: A, safeAreaInsetBottom: w, show: S} = t;
            if (!(!S && C))
                return hi(O("div", st({
                    ref: a,
                    style: c.value,
                    role: "dialog",
                    tabindex: 0,
                    class: [x9({
                        round: B,
                        [T]: T
                    }), {
                        "van-safe-area-top": A,
                        "van-safe-area-bottom": w
                    }],
                    onKeydown: p
                }, r, xy()), [(b = n.default) == null ? void 0 : b.call(n), y()]), [[pi, S]])
        }
        )
          , _ = () => {
            const {position: b, transition: C, transitionAppear: B} = t
              , T = b === "center" ? "van-fade" : `van-popup-slide-${b}`;
            return O(Kf, {
                name: C || T,
                appear: B,
                onAfterEnter: E,
                onAfterLeave: g
            }, {
                default: v
            })
        }
        ;
        return me( () => t.show, b => {
            b && !i && (u(),
            r.tabindex === 0 && Xe( () => {
                var C;
                (C = a.value) == null || C.focus()
            }
            )),
            !b && i && (i = !1,
            e("close"))
        }
        ),
        Kt({
            popupRef: a
        }),
        Gq(a, () => t.show && t.lockScroll),
        mn("popstate", () => {
            t.closeOnPopstate && (f(),
            o = !1)
        }
        ),
        Ht( () => {
            t.show && u()
        }
        ),
        gs( () => {
            o && (e("update:show", !0),
            o = !1)
        }
        ),
        wo( () => {
            t.show && t.teleport && (f(),
            o = !0)
        }
        ),
        xi(m7, () => t.show),
        () => t.teleport ? O(Bp, {
            to: t.teleport
        }, {
            default: () => [h(), _()]
        }) : O(Nt, null, [h(), _()])
    }
});
const Gl = Oe(Kq)
  , [qq,ni] = Se("action-sheet")
  , Zq = We({}, ed, {
    title: String,
    round: Ee,
    actions: ls(),
    closeIcon: Ie("cross"),
    closeable: Ee,
    cancelText: String,
    description: String,
    closeOnPopstate: Ee,
    closeOnClickAction: Boolean,
    safeAreaInsetBottom: Ee
})
  , Jq = [...b7, "round", "closeOnPopstate", "safeAreaInsetBottom"];
var Qq = be({
    name: qq,
    props: Zq,
    emits: ["select", "cancel", "update:show"],
    setup(t, {slots: e, emit: r}) {
        const n = f => r("update:show", f)
          , i = () => {
            n(!1),
            r("cancel")
        }
          , o = () => {
            if (t.title)
                return O("div", {
                    class: ni("header")
                }, [t.title, t.closeable && O(rr, {
                    name: t.closeIcon,
                    class: [ni("close"), cs],
                    onClick: i
                }, null)])
        }
          , s = () => {
            if (e.cancel || t.cancelText)
                return [O("div", {
                    class: ni("gap")
                }, null), O("button", {
                    type: "button",
                    class: ni("cancel"),
                    onClick: i
                }, [e.cancel ? e.cancel() : t.cancelText])]
        }
          , a = f => {
            if (f.icon)
                return O(rr, {
                    class: ni("item-icon"),
                    name: f.icon
                }, null)
        }
          , l = (f, d) => f.loading ? O(ys, {
            class: ni("loading-icon")
        }, null) : e.action ? e.action({
            action: f,
            index: d
        }) : [O("span", {
            class: ni("name")
        }, [f.name]), f.subname && O("div", {
            class: ni("subname")
        }, [f.subname])]
          , c = (f, d) => {
            const {color: h, loading: x, callback: y, disabled: m, className: E} = f
              , g = () => {
                m || x || (y && y(f),
                t.closeOnClickAction && n(!1),
                Xe( () => r("select", f, d)))
            }
            ;
            return O("button", {
                type: "button",
                style: {
                    color: h
                },
                class: [ni("item", {
                    loading: x,
                    disabled: m
                }), E],
                onClick: g
            }, [a(f), l(f, d)])
        }
          , u = () => {
            if (t.description || e.description) {
                const f = e.description ? e.description() : t.description;
                return O("div", {
                    class: ni("description")
                }, [f])
            }
        }
        ;
        return () => O(Gl, st({
            class: ni(),
            position: "bottom",
            "onUpdate:show": n
        }, $t(t, Jq)), {
            default: () => {
                var f;
                return [o(), u(), O("div", {
                    class: ni("content")
                }, [t.actions.map(c), (f = e.default) == null ? void 0 : f.call(e)]), s()]
            }
        })
    }
});
const H3e = Oe(Qq)
  , [eZ,Yo,p9] = Se("picker")
  , C7 = t => t.find(e => !e.disabled) || t[0];
function tZ(t, e) {
    const r = t[0];
    if (r) {
        if (Array.isArray(r))
            return "multiple";
        if (e.children in r)
            return "cascade"
    }
    return "default"
}
function Gh(t, e) {
    e = Ur(e, 0, t.length);
    for (let r = e; r < t.length; r++)
        if (!t[r].disabled)
            return r;
    for (let r = e - 1; r >= 0; r--)
        if (!t[r].disabled)
            return r;
    return 0
}
const g9 = (t, e, r) => e !== void 0 && t.some(n => n[r.value] === e);
function py(t, e, r) {
    const n = t.findIndex(o => o[r.value] === e)
      , i = Gh(t, n);
    return t[i]
}
function rZ(t, e, r) {
    const n = [];
    let i = {
        [e.children]: t
    }
      , o = 0;
    for (; i && i[e.children]; ) {
        const s = i[e.children]
          , a = r.value[o];
        if (i = Lt(a) ? py(s, a, e) : void 0,
        !i && s.length) {
            const l = C7(s)[e.value];
            i = py(s, l, e)
        }
        o++,
        n.push(s)
    }
    return n
}
function nZ(t) {
    const {transform: e} = window.getComputedStyle(t)
      , r = e.slice(7, e.length - 1).split(", ")[5];
    return Number(r)
}
function iZ(t) {
    return We({
        text: "text",
        value: "value",
        children: "children"
    }, t)
}
const m9 = 200
  , v9 = 300
  , oZ = 15
  , [A7,og] = Se("picker-column")
  , w7 = Symbol(A7);
var sZ = be({
    name: A7,
    props: {
        value: Ae,
        fields: fn(Object),
        options: ls(),
        readonly: Boolean,
        allowHtml: Boolean,
        optionHeight: fn(Number),
        swipeDuration: fn(Ae),
        visibleOptionNum: fn(Ae)
    },
    emits: ["change", "clickOption", "scrollInto"],
    setup(t, {emit: e, slots: r}) {
        let n, i, o, s, a;
        const l = ie()
          , c = ie()
          , u = ie(0)
          , f = ie(0)
          , d = Ul()
          , h = () => t.options.length
          , x = () => t.optionHeight * (+t.visibleOptionNum - 1) / 2
          , y = A => {
            let w = Gh(t.options, A);
            const S = -w * t.optionHeight
              , D = () => {
                w > h() - 1 && (w = Gh(t.options, A));
                const F = t.options[w][t.fields.value];
                F !== t.value && e("change", F)
            }
            ;
            n && S !== u.value ? a = D : D(),
            u.value = S
        }
          , m = () => t.readonly || !t.options.length
          , E = A => {
            n || m() || (a = null,
            f.value = m9,
            y(A),
            e("clickOption", t.options[A]))
        }
          , g = A => Ur(Math.round(-A / t.optionHeight), 0, h() - 1)
          , p = ae( () => g(u.value))
          , v = (A, w) => {
            const S = Math.abs(A / w);
            A = u.value + S / .003 * (A < 0 ? -1 : 1);
            const D = g(A);
            f.value = +t.swipeDuration,
            y(D)
        }
          , _ = () => {
            n = !1,
            f.value = 0,
            a && (a(),
            a = null)
        }
          , b = A => {
            if (!m()) {
                if (d.start(A),
                n) {
                    const w = nZ(c.value);
                    u.value = Math.min(0, w - x())
                }
                f.value = 0,
                i = u.value,
                o = Date.now(),
                s = i,
                a = null
            }
        }
          , C = A => {
            if (m())
                return;
            d.move(A),
            d.isVertical() && (n = !0,
            Rr(A, !0));
            const w = Ur(i + d.deltaY.value, -(h() * t.optionHeight), t.optionHeight)
              , S = g(w);
            S !== p.value && e("scrollInto", t.options[S]),
            u.value = w;
            const D = Date.now();
            D - o > v9 && (o = D,
            s = w)
        }
          , B = () => {
            if (m())
                return;
            const A = u.value - s
              , w = Date.now() - o;
            if (w < v9 && Math.abs(A) > oZ) {
                v(A, w);
                return
            }
            const D = g(u.value);
            f.value = m9,
            y(D),
            setTimeout( () => {
                n = !1
            }
            , 0)
        }
          , T = () => {
            const A = {
                height: `${t.optionHeight}px`
            };
            return t.options.map( (w, S) => {
                const D = w[t.fields.text]
                  , {disabled: F} = w
                  , R = w[t.fields.value]
                  , P = {
                    role: "button",
                    style: A,
                    tabindex: F ? -1 : 0,
                    class: [og("item", {
                        disabled: F,
                        selected: R === t.value
                    }), w.className],
                    onClick: () => E(S)
                }
                  , N = {
                    class: "van-ellipsis",
                    [t.allowHtml ? "innerHTML" : "textContent"]: D
                };
                return O("li", P, [r.option ? r.option(w, S) : O("div", N, null)])
            }
            )
        }
        ;
        return Jn(w7),
        Kt({
            stopMomentum: _
        }),
        mu( () => {
            const A = n ? Math.floor(-u.value / t.optionHeight) : t.options.findIndex(D => D[t.fields.value] === t.value)
              , w = Gh(t.options, A)
              , S = -w * t.optionHeight;
            n && w < A && _(),
            u.value = S
        }
        ),
        mn("touchmove", C, {
            target: l
        }),
        () => O("div", {
            ref: l,
            class: og(),
            onTouchstartPassive: b,
            onTouchend: B,
            onTouchcancel: B
        }, [O("ul", {
            ref: c,
            style: {
                transform: `translate3d(0, ${u.value + x()}px, 0)`,
                transitionDuration: `${f.value}ms`,
                transitionProperty: f.value ? "all" : "none"
            },
            class: og("wrapper"),
            onTransitionend: _
        }, [T()])])
    }
});
const [aZ] = Se("picker-toolbar")
  , Yp = {
    title: String,
    cancelButtonText: String,
    confirmButtonText: String
}
  , lZ = ["cancel", "confirm", "title", "toolbar"]
  , cZ = Object.keys(Yp);
var uZ = be({
    name: aZ,
    props: Yp,
    emits: ["confirm", "cancel"],
    setup(t, {emit: e, slots: r}) {
        const n = () => {
            if (r.title)
                return r.title();
            if (t.title)
                return O("div", {
                    class: [Yo("title"), "van-ellipsis"]
                }, [t.title])
        }
          , i = () => e("cancel")
          , o = () => e("confirm")
          , s = () => {
            var l;
            const c = (l = t.cancelButtonText) != null ? l : p9("cancel");
            if (!(!r.cancel && !c))
                return O("button", {
                    type: "button",
                    class: [Yo("cancel"), cs],
                    onClick: i
                }, [r.cancel ? r.cancel() : c])
        }
          , a = () => {
            var l;
            const c = (l = t.confirmButtonText) != null ? l : p9("confirm");
            if (!(!r.confirm && !c))
                return O("button", {
                    type: "button",
                    class: [Yo("confirm"), cs],
                    onClick: o
                }, [r.confirm ? r.confirm() : c])
        }
        ;
        return () => O("div", {
            class: Yo("toolbar")
        }, [r.toolbar ? r.toolbar() : [s(), n(), a()]])
    }
});
const fZ = (t, e) => {
    const r = ie(t());
    return me(t, n => {
        n !== r.value && (r.value = n)
    }
    ),
    me(r, n => {
        n !== t() && e(n)
    }
    ),
    r
}
;
/**
* @vue/shared v3.5.25
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
const B7 = Array.isArray
  , cf = t => typeof t == "string"
  , S7 = t => t !== null && typeof t == "object"
  , dZ = t => {
    const e = Object.create(null);
    return r => e[r] || (e[r] = t(r))
}
  , hZ = /\B([A-Z])/g
  , xZ = dZ(t => t.replace(hZ, "-$1").toLowerCase());
function T7(t) {
    if (B7(t)) {
        const e = {};
        for (let r = 0; r < t.length; r++) {
            const n = t[r]
              , i = cf(n) ? vZ(n) : T7(n);
            if (i)
                for (const o in i)
                    e[o] = i[o]
        }
        return e
    } else if (cf(t) || S7(t))
        return t
}
const pZ = /;(?![^(]*\))/g
  , gZ = /:([^]+)/
  , mZ = /\/\*[^]*?\*\//g;
function vZ(t) {
    const e = {};
    return t.replace(mZ, "").split(pZ).forEach(r => {
        if (r) {
            const n = r.split(gZ);
            n.length > 1 && (e[n[0].trim()] = n[1].trim())
        }
    }
    ),
    e
}
function yZ(t) {
    if (!t)
        return "";
    if (cf(t))
        return t;
    let e = "";
    for (const r in t) {
        const n = t[r];
        if (cf(n) || typeof n == "number") {
            const i = r.startsWith("--") ? r : xZ(r);
            e += `${i}:${n};`
        }
    }
    return e
}
function D7(t) {
    let e = "";
    if (cf(t))
        e = t;
    else if (B7(t))
        for (let r = 0; r < t.length; r++) {
            const n = D7(t[r]);
            n && (e += n + " ")
        }
    else if (S7(t))
        for (const r in t)
            t[r] && (e += r + " ");
    return e.trim()
}
function EZ(t, e, r) {
    let n, i = 0;
    const o = t.scrollLeft
      , s = r === 0 ? 1 : Math.round(r * 1e3 / 16);
    let a = o;
    function l() {
        qf(n)
    }
    function c() {
        a += (e - o) / s,
        t.scrollLeft = a,
        ++i < s && (n = xn(c))
    }
    return c(),
    l
}
function _Z(t, e, r, n) {
    let i, o = Jf(t);
    const s = o < e
      , a = r === 0 ? 1 : Math.round(r * 1e3 / 16)
      , l = (e - o) / a;
    function c() {
        qf(i)
    }
    function u() {
        o += l,
        (s && o > e || !s && o < e) && (o = e),
        Cx(t, o),
        s && o < e || !s && o > e ? i = xn(u) : n && (i = xn(n))
    }
    return u(),
    c
}
let bZ = 0;
function T2() {
    const t = It()
      , {name: e="unknown"} = (t == null ? void 0 : t.type) || {};
    return `${e}-${++bZ}`
}
function F7() {
    const t = ie([])
      , e = [];
    return wp( () => {
        t.value = []
    }
    ),
    [t, n => (e[n] || (e[n] = i => {
        t.value[n] = i
    }
    ),
    e[n])]
}
function P7(t, e) {
    if (!vo || !window.IntersectionObserver)
        return;
    const r = new IntersectionObserver(o => {
        e(o[0].intersectionRatio > 0)
    }
    ,{
        root: document.body
    })
      , n = () => {
        t.value && r.observe(t.value)
    }
      , i = () => {
        t.value && r.unobserve(t.value)
    }
    ;
    wo(i),
    Zn(i),
    yu(n)
}
const [CZ,AZ] = Se("sticky")
  , wZ = {
    zIndex: Ae,
    position: Ie("top"),
    container: Object,
    offsetTop: ze(0),
    offsetBottom: ze(0)
};
var BZ = be({
    name: CZ,
    props: wZ,
    emits: ["scroll", "change"],
    setup(t, {emit: e, slots: r}) {
        const n = ie()
          , i = Zf(n)
          , o = Pt({
            fixed: !1,
            width: 0,
            height: 0,
            transform: 0
        })
          , s = ie(!1)
          , a = ae( () => w2(t.position === "top" ? t.offsetTop : t.offsetBottom))
          , l = ae( () => {
            if (s.value)
                return;
            const {fixed: d, height: h, width: x} = o;
            if (d)
                return {
                    width: `${x}px`,
                    height: `${h}px`
                }
        }
        )
          , c = ae( () => {
            if (!o.fixed || s.value)
                return;
            const d = We(c7(t.zIndex), {
                width: `${o.width}px`,
                height: `${o.height}px`,
                [t.position]: `${a.value}px`
            });
            return o.transform && (d.transform = `translate3d(0, ${o.transform}px, 0)`),
            d
        }
        )
          , u = d => e("scroll", {
            scrollTop: d,
            isFixed: o.fixed
        })
          , f = () => {
            if (!n.value || Yc(n))
                return;
            const {container: d, position: h} = t
              , x = Cr(n)
              , y = Jf(window);
            if (o.width = x.width,
            o.height = x.height,
            h === "top")
                if (d) {
                    const m = Cr(d)
                      , E = m.bottom - a.value - o.height;
                    o.fixed = a.value > x.top && m.bottom > 0,
                    o.transform = E < 0 ? E : 0
                } else
                    o.fixed = a.value > x.top;
            else {
                const {clientHeight: m} = document.documentElement;
                if (d) {
                    const E = Cr(d)
                      , g = m - E.top - a.value - o.height;
                    o.fixed = m - a.value < x.bottom && m > E.top,
                    o.transform = g < 0 ? -g : 0
                } else
                    o.fixed = m - a.value < x.bottom
            }
            u(y)
        }
        ;
        return me( () => o.fixed, d => e("change", d)),
        mn("scroll", f, {
            target: i,
            passive: !0
        }),
        P7(n, f),
        me([Zo, Qs], () => {
            !n.value || Yc(n) || !o.fixed || (s.value = !0,
            Xe( () => {
                const d = Cr(n);
                o.width = d.width,
                o.height = d.height,
                s.value = !1
            }
            ))
        }
        ),
        () => {
            var d;
            return O("div", {
                ref: n,
                style: l.value
            }, [O("div", {
                class: AZ({
                    fixed: o.fixed && !s.value
                }),
                style: c.value
            }, [(d = r.default) == null ? void 0 : d.call(r)])])
        }
    }
});
const SZ = Oe(BZ)
  , [I7,Ud] = Se("swipe")
  , TZ = {
    loop: Ee,
    width: Ae,
    height: Ae,
    vertical: Boolean,
    autoplay: ze(0),
    duration: ze(500),
    touchable: Ee,
    lazyRender: Boolean,
    initialSwipe: ze(0),
    indicatorColor: String,
    showIndicators: Ee,
    stopPropagation: Ee
}
  , O7 = Symbol(I7);
var DZ = be({
    name: I7,
    props: TZ,
    emits: ["change", "dragStart", "dragEnd"],
    setup(t, {emit: e, slots: r}) {
        const n = ie()
          , i = ie()
          , o = Pt({
            rect: null,
            width: 0,
            height: 0,
            offset: 0,
            active: 0,
            swiping: !1
        });
        let s = !1;
        const a = Ul()
          , {children: l, linkChildren: c} = Hi(O7)
          , u = ae( () => l.length)
          , f = ae( () => o[t.vertical ? "height" : "width"])
          , d = ae( () => t.vertical ? a.deltaY.value : a.deltaX.value)
          , h = ae( () => o.rect ? (t.vertical ? o.rect.height : o.rect.width) - f.value * u.value : 0)
          , x = ae( () => f.value ? Math.ceil(Math.abs(h.value) / f.value) : u.value)
          , y = ae( () => u.value * f.value)
          , m = ae( () => (o.active + u.value) % u.value)
          , E = ae( () => {
            const U = t.vertical ? "vertical" : "horizontal";
            return a.direction.value === U
        }
        )
          , g = ae( () => {
            const U = {
                transitionDuration: `${o.swiping ? 0 : t.duration}ms`,
                transform: `translate${t.vertical ? "Y" : "X"}(${+o.offset.toFixed(2)}px)`
            };
            if (f.value) {
                const $ = t.vertical ? "height" : "width"
                  , V = t.vertical ? "width" : "height";
                U[$] = `${y.value}px`,
                U[V] = t[V] ? `${t[V]}px` : ""
            }
            return U
        }
        )
          , p = U => {
            const {active: $} = o;
            return U ? t.loop ? Ur($ + U, -1, u.value) : Ur($ + U, 0, x.value) : $
        }
          , v = (U, $=0) => {
            let V = U * f.value;
            t.loop || (V = Math.min(V, -h.value));
            let W = $ - V;
            return t.loop || (W = Ur(W, h.value, 0)),
            W
        }
          , _ = ({pace: U=0, offset: $=0, emitChange: V}) => {
            if (u.value <= 1)
                return;
            const {active: W} = o
              , H = p(U)
              , Q = v(H, $);
            if (t.loop) {
                if (l[0] && Q !== h.value) {
                    const G = Q < h.value;
                    l[0].setOffset(G ? y.value : 0)
                }
                if (l[u.value - 1] && Q !== 0) {
                    const G = Q > 0;
                    l[u.value - 1].setOffset(G ? -y.value : 0)
                }
            }
            o.active = H,
            o.offset = Q,
            V && H !== W && e("change", m.value)
        }
          , b = () => {
            o.swiping = !0,
            o.active <= -1 ? _({
                pace: u.value
            }) : o.active >= u.value && _({
                pace: -u.value
            })
        }
          , C = () => {
            b(),
            a.reset(),
            ja( () => {
                o.swiping = !1,
                _({
                    pace: -1,
                    emitChange: !0
                })
            }
            )
        }
          , B = () => {
            b(),
            a.reset(),
            ja( () => {
                o.swiping = !1,
                _({
                    pace: 1,
                    emitChange: !0
                })
            }
            )
        }
        ;
        let T;
        const A = () => clearTimeout(T)
          , w = () => {
            A(),
            +t.autoplay > 0 && u.value > 1 && (T = setTimeout( () => {
                B(),
                w()
            }
            , +t.autoplay))
        }
          , S = (U=+t.initialSwipe) => {
            if (!n.value)
                return;
            const $ = () => {
                var V, W;
                if (!Yc(n)) {
                    const H = {
                        width: n.value.offsetWidth,
                        height: n.value.offsetHeight
                    };
                    o.rect = H,
                    o.width = +((V = t.width) != null ? V : H.width),
                    o.height = +((W = t.height) != null ? W : H.height)
                }
                u.value && (U = Math.min(u.value - 1, U),
                U === -1 && (U = u.value - 1)),
                o.active = U,
                o.swiping = !0,
                o.offset = v(U),
                l.forEach(H => {
                    H.setOffset(0)
                }
                ),
                w()
            }
            ;
            Yc(n) ? Xe().then($) : $()
        }
          , D = () => S(o.active);
        let F;
        const R = U => {
            !t.touchable || U.touches.length > 1 || (a.start(U),
            s = !1,
            F = Date.now(),
            A(),
            b())
        }
          , P = U => {
            t.touchable && o.swiping && (a.move(U),
            E.value && (!t.loop && (o.active === 0 && d.value > 0 || o.active === u.value - 1 && d.value < 0) || (Rr(U, t.stopPropagation),
            _({
                offset: d.value
            }),
            s || (e("dragStart", {
                index: m.value
            }),
            s = !0))))
        }
          , N = () => {
            if (!t.touchable || !o.swiping)
                return;
            const U = Date.now() - F
              , $ = d.value / U;
            if ((Math.abs($) > .25 || Math.abs(d.value) > f.value / 2) && E.value) {
                const W = t.vertical ? a.offsetY.value : a.offsetX.value;
                let H = 0;
                t.loop ? H = W > 0 ? d.value > 0 ? -1 : 1 : 0 : H = -Math[d.value > 0 ? "ceil" : "floor"](d.value / f.value),
                _({
                    pace: H,
                    emitChange: !0
                })
            } else
                d.value && _({
                    pace: 0
                });
            s = !1,
            o.swiping = !1,
            e("dragEnd", {
                index: m.value
            }),
            w()
        }
          , j = (U, $={}) => {
            b(),
            a.reset(),
            ja( () => {
                let V;
                t.loop && U === u.value ? V = o.active === 0 ? 0 : U : V = U % u.value,
                $.immediate ? ja( () => {
                    o.swiping = !1
                }
                ) : o.swiping = !1,
                _({
                    pace: V - o.active,
                    emitChange: !0
                })
            }
            )
        }
          , K = (U, $) => {
            const V = $ === m.value
              , W = V ? {
                backgroundColor: t.indicatorColor
            } : void 0;
            return O("i", {
                style: W,
                class: Ud("indicator", {
                    active: V
                })
            }, null)
        }
          , oe = () => {
            if (r.indicator)
                return r.indicator({
                    active: m.value,
                    total: u.value
                });
            if (t.showIndicators && u.value > 1)
                return O("div", {
                    class: Ud("indicators", {
                        vertical: t.vertical
                    })
                }, [Array(u.value).fill("").map(K)])
        }
        ;
        return Kt({
            prev: C,
            next: B,
            state: o,
            resize: D,
            swipeTo: j
        }),
        c({
            size: f,
            props: t,
            count: u,
            activeIndicator: m
        }),
        me( () => t.initialSwipe, U => S(+U)),
        me(u, () => S(o.active)),
        me( () => t.autoplay, w),
        me([Zo, Qs, () => t.width, () => t.height], D),
        me(DS(), U => {
            U === "visible" ? w() : A()
        }
        ),
        Ht(S),
        gs( () => S(o.active)),
        B2( () => S(o.active)),
        wo(A),
        Zn(A),
        mn("touchmove", P, {
            target: i
        }),
        () => {
            var U;
            return O("div", {
                ref: n,
                class: Ud()
            }, [O("div", {
                ref: i,
                style: g.value,
                class: Ud("track", {
                    vertical: t.vertical
                }),
                onTouchstartPassive: R,
                onTouchend: N,
                onTouchcancel: N
            }, [(U = r.default) == null ? void 0 : U.call(r)]), oe()])
        }
    }
});
const k7 = Oe(DZ)
  , [FZ,y9] = Se("tabs");
var PZ = be({
    name: FZ,
    props: {
        count: fn(Number),
        inited: Boolean,
        animated: Boolean,
        duration: fn(Ae),
        swipeable: Boolean,
        lazyRender: Boolean,
        currentIndex: fn(Number)
    },
    emits: ["change"],
    setup(t, {emit: e, slots: r}) {
        const n = ie()
          , i = a => e("change", a)
          , o = () => {
            var a;
            const l = (a = r.default) == null ? void 0 : a.call(r);
            return t.animated || t.swipeable ? O(k7, {
                ref: n,
                loop: !1,
                class: y9("track"),
                duration: +t.duration * 1e3,
                touchable: t.swipeable,
                lazyRender: t.lazyRender,
                showIndicators: !1,
                onChange: i
            }, {
                default: () => [l]
            }) : l
        }
          , s = a => {
            const l = n.value;
            l && l.state.active !== a && l.swipeTo(a, {
                immediate: !t.inited
            })
        }
        ;
        return me( () => t.currentIndex, s),
        Ht( () => {
            s(t.currentIndex)
        }
        ),
        Kt({
            swipeRef: n
        }),
        () => O("div", {
            class: y9("content", {
                animated: t.animated || t.swipeable
            })
        }, [o()])
    }
});
const [R7,Gd] = Se("tabs")
  , IZ = {
    type: Ie("line"),
    color: String,
    border: Boolean,
    sticky: Boolean,
    shrink: Boolean,
    active: ze(0),
    duration: ze(.3),
    animated: Boolean,
    ellipsis: Ee,
    swipeable: Boolean,
    scrollspy: Boolean,
    offsetTop: ze(0),
    background: String,
    lazyRender: Ee,
    showHeader: Ee,
    lineWidth: Ae,
    lineHeight: Ae,
    beforeChange: Function,
    swipeThreshold: ze(5),
    titleActiveColor: String,
    titleInactiveColor: String
}
  , M7 = Symbol(R7);
var OZ = be({
    name: R7,
    props: IZ,
    emits: ["change", "scroll", "rendered", "clickTab", "update:active"],
    setup(t, {emit: e, slots: r}) {
        let n, i, o, s, a;
        const l = ie()
          , c = ie()
          , u = ie()
          , f = ie()
          , d = T2()
          , h = Zf(l)
          , [x,y] = F7()
          , {children: m, linkChildren: E} = Hi(M7)
          , g = Pt({
            inited: !1,
            position: "",
            lineStyle: {},
            currentIndex: -1
        })
          , p = ae( () => m.length > +t.swipeThreshold || !t.ellipsis || t.shrink)
          , v = ae( () => ({
            borderColor: t.color,
            background: t.background
        }))
          , _ = (H, Q) => {
            var G;
            return (G = H.name) != null ? G : Q
        }
          , b = ae( () => {
            const H = m[g.currentIndex];
            if (H)
                return _(H, g.currentIndex)
        }
        )
          , C = ae( () => w2(t.offsetTop))
          , B = ae( () => t.sticky ? C.value + n : 0)
          , T = H => {
            const Q = c.value
              , G = x.value;
            if (!p.value || !Q || !G || !G[g.currentIndex])
                return;
            const re = G[g.currentIndex].$el
              , te = re.offsetLeft - (Q.offsetWidth - re.offsetWidth) / 2;
            s && s(),
            s = EZ(Q, te, H ? 0 : +t.duration)
        }
          , A = () => {
            const H = g.inited;
            Xe( () => {
                const Q = x.value;
                if (!Q || !Q[g.currentIndex] || t.type !== "line" || Yc(l.value))
                    return;
                const G = Q[g.currentIndex].$el
                  , {lineWidth: re, lineHeight: te} = t
                  , he = G.offsetLeft + G.offsetWidth / 2
                  , xe = {
                    width: rt(re),
                    backgroundColor: t.color,
                    transform: `translateX(${he}px) translateX(-50%)`
                };
                if (H && (xe.transitionDuration = `${t.duration}s`),
                Lt(te)) {
                    const ve = rt(te);
                    xe.height = ve,
                    xe.borderRadius = ve
                }
                g.lineStyle = xe
            }
            )
        }
          , w = H => {
            const Q = H < g.currentIndex ? -1 : 1;
            for (; H >= 0 && H < m.length; ) {
                if (!m[H].disabled)
                    return H;
                H += Q
            }
        }
          , S = (H, Q) => {
            const G = w(H);
            if (!Lt(G))
                return;
            const re = m[G]
              , te = _(re, G)
              , he = g.currentIndex !== null;
            g.currentIndex !== G && (g.currentIndex = G,
            Q || T(),
            A()),
            te !== t.active && (e("update:active", te),
            he && e("change", te, re.title)),
            o && !t.scrollspy && A2(Math.ceil(n9(l.value) - C.value))
        }
          , D = (H, Q) => {
            const G = m.findIndex( (re, te) => _(re, te) === H);
            S(G === -1 ? 0 : G, Q)
        }
          , F = (H=!1) => {
            if (t.scrollspy) {
                const Q = m[g.currentIndex].$el;
                if (Q && h.value) {
                    const G = n9(Q, h.value) - B.value;
                    i = !0,
                    a && a(),
                    a = _Z(h.value, G, H ? 0 : +t.duration, () => {
                        i = !1
                    }
                    )
                }
            }
        }
          , R = (H, Q, G) => {
            const {title: re, disabled: te} = m[Q]
              , he = _(m[Q], Q);
            te || (Eu(t.beforeChange, {
                args: [he],
                done: () => {
                    S(Q),
                    F()
                }
            }),
            _7(H)),
            e("clickTab", {
                name: he,
                title: re,
                event: G,
                disabled: te
            })
        }
          , P = H => {
            o = H.isFixed,
            e("scroll", H)
        }
          , N = H => {
            Xe( () => {
                D(H),
                F(!0)
            }
            )
        }
          , j = () => {
            for (let H = 0; H < m.length; H++) {
                const {top: Q} = Cr(m[H].$el);
                if (Q > B.value)
                    return H === 0 ? 0 : H - 1
            }
            return m.length - 1
        }
          , K = () => {
            if (t.scrollspy && !i) {
                const H = j();
                S(H)
            }
        }
          , oe = () => {
            if (t.type === "line" && m.length)
                return O("div", {
                    class: Gd("line"),
                    style: g.lineStyle
                }, null)
        }
          , U = () => {
            var H, Q, G;
            const {type: re, border: te, sticky: he} = t
              , xe = [O("div", {
                ref: he ? void 0 : u,
                class: [Gd("wrap"), {
                    [x7]: re === "line" && te
                }]
            }, [O("div", {
                ref: c,
                role: "tablist",
                class: Gd("nav", [re, {
                    shrink: t.shrink,
                    complete: p.value
                }]),
                style: v.value,
                "aria-orientation": "horizontal"
            }, [(H = r["nav-left"]) == null ? void 0 : H.call(r), m.map(ve => ve.renderTitle(R)), oe(), (Q = r["nav-right"]) == null ? void 0 : Q.call(r)])]), (G = r["nav-bottom"]) == null ? void 0 : G.call(r)];
            return he ? O("div", {
                ref: u
            }, [xe]) : xe
        }
          , $ = () => {
            A(),
            Xe( () => {
                var H, Q;
                T(!0),
                (Q = (H = f.value) == null ? void 0 : H.swipeRef.value) == null || Q.resize()
            }
            )
        }
        ;
        me( () => [t.color, t.duration, t.lineWidth, t.lineHeight], A),
        me(Zo, $),
        me( () => t.active, H => {
            H !== b.value && D(H)
        }
        ),
        me( () => m.length, () => {
            g.inited && (D(t.active),
            A(),
            Xe( () => {
                T(!0)
            }
            ))
        }
        );
        const V = () => {
            D(t.active, !0),
            Xe( () => {
                g.inited = !0,
                u.value && (n = Cr(u.value).height),
                T(!0)
            }
            )
        }
          , W = (H, Q) => e("rendered", H, Q);
        return Kt({
            resize: $,
            scrollTo: N
        }),
        gs(A),
        B2(A),
        yu(V),
        P7(l, A),
        mn("scroll", K, {
            target: h,
            passive: !0
        }),
        E({
            id: d,
            props: t,
            setLine: A,
            scrollable: p,
            onRendered: W,
            currentName: b,
            setTitleRefs: y,
            scrollIntoView: T
        }),
        () => O("div", {
            ref: l,
            class: Gd([t.type])
        }, [t.showHeader ? t.sticky ? O(SZ, {
            container: l.value,
            offsetTop: C.value,
            onScroll: P
        }, {
            default: () => [U()]
        }) : U() : null, O(PZ, {
            ref: f,
            count: m.length,
            inited: g.inited,
            animated: t.animated,
            duration: t.duration,
            swipeable: t.swipeable,
            lazyRender: t.lazyRender,
            currentIndex: g.currentIndex,
            onChange: S
        }, {
            default: () => {
                var H;
                return [(H = r.default) == null ? void 0 : H.call(r)]
            }
        })])
    }
});
const kZ = Symbol()
  , N7 = Symbol()
  , L7 = () => dr(N7, null)
  , RZ = t => {
    const e = L7();
    xi(kZ, t),
    xi(N7, ae( () => (e == null || e.value) && t.value))
}
  , [MZ,E9] = Se("tab")
  , NZ = be({
    name: MZ,
    props: {
        id: String,
        dot: Boolean,
        type: String,
        color: String,
        title: String,
        badge: Ae,
        shrink: Boolean,
        isActive: Boolean,
        disabled: Boolean,
        controls: String,
        scrollable: Boolean,
        activeColor: String,
        inactiveColor: String,
        showZeroBadge: Ee
    },
    setup(t, {slots: e}) {
        const r = ae( () => {
            const i = {}
              , {type: o, color: s, disabled: a, isActive: l, activeColor: c, inactiveColor: u} = t;
            s && o === "card" && (i.borderColor = s,
            a || (l ? i.backgroundColor = s : i.color = s));
            const d = l ? c : u;
            return d && (i.color = d),
            i
        }
        )
          , n = () => {
            const i = O("span", {
                class: E9("text", {
                    ellipsis: !t.scrollable
                })
            }, [e.title ? e.title() : t.title]);
            return t.dot || Lt(t.badge) && t.badge !== "" ? O(Wp, {
                dot: t.dot,
                content: t.badge,
                showZero: t.showZeroBadge
            }, {
                default: () => [i]
            }) : i
        }
        ;
        return () => O("div", {
            id: t.id,
            role: "tab",
            class: [E9([t.type, {
                grow: t.scrollable && !t.shrink,
                shrink: t.shrink,
                active: t.isActive,
                disabled: t.disabled
            }])],
            style: r.value,
            tabindex: t.disabled ? void 0 : t.isActive ? 0 : -1,
            "aria-selected": t.isActive,
            "aria-disabled": t.disabled || void 0,
            "aria-controls": t.controls,
            "data-allow-mismatch": "attribute"
        }, [n()])
    }
})
  , [LZ,$Z] = Se("swipe-item");
var UZ = be({
    name: LZ,
    setup(t, {slots: e}) {
        let r;
        const n = Pt({
            offset: 0,
            inited: !1,
            mounted: !1
        })
          , {parent: i, index: o} = Jn(O7);
        if (!i) {
            console.error("[Vant] <SwipeItem> must be a child component of <Swipe>.");
            return
        }
        const s = ae( () => {
            const c = {}
              , {vertical: u} = i.props;
            return i.size.value && (c[u ? "height" : "width"] = `${i.size.value}px`),
            n.offset && (c.transform = `translate${u ? "Y" : "X"}(${n.offset}px)`),
            c
        }
        )
          , a = ae( () => {
            const {loop: c, lazyRender: u} = i.props;
            if (!u || r)
                return !0;
            if (!n.mounted)
                return !1;
            const f = i.activeIndicator.value
              , d = i.count.value - 1
              , h = f === 0 && c ? d : f - 1
              , x = f === d && c ? 0 : f + 1;
            return r = o.value === f || o.value === h || o.value === x,
            r
        }
        )
          , l = c => {
            n.offset = c
        }
        ;
        return Ht( () => {
            Xe( () => {
                n.mounted = !0
            }
            )
        }
        ),
        Kt({
            setOffset: l
        }),
        () => {
            var c;
            return O("div", {
                class: $Z(),
                style: s.value
            }, [a.value ? (c = e.default) == null ? void 0 : c.call(e) : null])
        }
    }
});
const $7 = Oe(UZ)
  , [GZ,sg] = Se("tab")
  , HZ = We({}, _u, {
    dot: Boolean,
    name: Ae,
    badge: Ae,
    title: String,
    disabled: Boolean,
    titleClass: hr,
    titleStyle: [String, Object],
    showZeroBadge: Ee
});
var VZ = be({
    name: GZ,
    props: HZ,
    setup(t, {slots: e}) {
        const r = T2()
          , n = ie(!1)
          , i = It()
          , {parent: o, index: s} = Jn(M7);
        if (!o) {
            console.error("[Vant] <Tab> must be a child component of <Tabs>.");
            return
        }
        const a = () => {
            var x;
            return (x = t.name) != null ? x : s.value
        }
          , l = () => {
            n.value = !0,
            o.props.lazyRender && Xe( () => {
                o.onRendered(a(), t.title)
            }
            )
        }
          , c = ae( () => {
            const x = a() === o.currentName.value;
            return x && !n.value && l(),
            x
        }
        )
          , u = ie("")
          , f = ie("");
        mu( () => {
            const {titleClass: x, titleStyle: y} = t;
            u.value = x ? D7(x) : "",
            f.value = y && typeof y != "string" ? yZ(T7(y)) : y
        }
        );
        const d = x => O(NZ, st({
            key: r,
            id: `${o.id}-${s.value}`,
            ref: o.setTitleRefs(s.value),
            style: f.value,
            class: u.value,
            isActive: c.value,
            controls: r,
            scrollable: o.scrollable.value,
            activeColor: o.props.titleActiveColor,
            inactiveColor: o.props.titleInactiveColor,
            onClick: y => x(i.proxy, s.value, y)
        }, $t(o.props, ["type", "color", "shrink"]), $t(t, ["dot", "badge", "title", "disabled", "showZeroBadge"])), {
            title: e.title
        })
          , h = ie(!c.value);
        return me(c, x => {
            x ? h.value = !1 : ja( () => {
                h.value = !0
            }
            )
        }
        ),
        me( () => t.title, () => {
            o.setLine(),
            o.scrollIntoView()
        }
        ),
        RZ(c),
        Kt({
            id: r,
            renderTitle: d
        }),
        () => {
            var x;
            const y = `${o.id}-${s.value}`
              , {animated: m, swipeable: E, scrollspy: g, lazyRender: p} = o.props;
            if (!e.default && !m)
                return;
            const v = g || c.value;
            if (m || E)
                return O($7, {
                    id: r,
                    role: "tabpanel",
                    class: sg("panel-wrapper", {
                        inactive: h.value
                    }),
                    tabindex: c.value ? 0 : -1,
                    "aria-hidden": !c.value,
                    "aria-labelledby": y,
                    "data-allow-mismatch": "attribute"
                }, {
                    default: () => {
                        var C;
                        return [O("div", {
                            class: sg("panel")
                        }, [(C = e.default) == null ? void 0 : C.call(e)])]
                    }
                });
            const b = n.value || g || !p ? (x = e.default) == null ? void 0 : x.call(e) : null;
            return hi(O("div", {
                id: r,
                role: "tabpanel",
                class: sg("panel"),
                tabindex: v ? 0 : -1,
                "aria-labelledby": y,
                "data-allow-mismatch": "attribute"
            }, [b]), [[pi, v]])
        }
    }
});
const V3e = Oe(VZ)
  , z3e = Oe(OZ)
  , [zZ,j3e] = Se("picker-group")
  , jZ = Symbol(zZ);
We({
    tabs: ls(),
    activeTab: ze(0),
    nextStepText: String,
    showToolbar: Ee
}, Yp);
const D2 = We({
    loading: Boolean,
    readonly: Boolean,
    allowHtml: Boolean,
    optionHeight: ze(44),
    showToolbar: Ee,
    swipeDuration: ze(1e3),
    visibleOptionNum: ze(6)
}, Yp)
  , WZ = We({}, D2, {
    columns: ls(),
    modelValue: ls(),
    toolbarPosition: Ie("top"),
    columnsFieldNames: Object
});
var YZ = be({
    name: eZ,
    props: WZ,
    emits: ["confirm", "cancel", "change", "scrollInto", "clickOption", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const n = ie()
          , i = ie(t.modelValue.slice(0))
          , {parent: o} = Jn(jZ)
          , {children: s, linkChildren: a} = Hi(w7);
        a();
        const l = ae( () => iZ(t.columnsFieldNames))
          , c = ae( () => w2(t.optionHeight))
          , u = ae( () => tZ(t.columns, l.value))
          , f = ae( () => {
            const {columns: S} = t;
            switch (u.value) {
            case "multiple":
                return S;
            case "cascade":
                return rZ(S, l.value, i);
            default:
                return [S]
            }
        }
        )
          , d = ae( () => f.value.some(S => S.length))
          , h = ae( () => f.value.map( (S, D) => py(S, i.value[D], l.value)))
          , x = ae( () => f.value.map( (S, D) => S.findIndex(F => F[l.value.value] === i.value[D])))
          , y = (S, D) => {
            if (i.value[S] !== D) {
                const F = i.value.slice(0);
                F[S] = D,
                i.value = F
            }
        }
          , m = () => ({
            selectedValues: i.value.slice(0),
            selectedOptions: h.value,
            selectedIndexes: x.value
        })
          , E = (S, D) => {
            y(D, S),
            u.value === "cascade" && i.value.forEach( (F, R) => {
                const P = f.value[R];
                g9(P, F, l.value) || y(R, P.length ? P[0][l.value.value] : void 0)
            }
            ),
            Xe( () => {
                e("change", We({
                    columnIndex: D
                }, m()))
            }
            )
        }
          , g = (S, D) => {
            const F = {
                columnIndex: D,
                currentOption: S
            };
            e("clickOption", We(m(), F)),
            e("scrollInto", F)
        }
          , p = () => {
            s.forEach(D => D.stopMomentum());
            const S = m();
            return Xe( () => {
                const D = m();
                e("confirm", D)
            }
            ),
            S
        }
          , v = () => e("cancel", m())
          , _ = () => f.value.map( (S, D) => O(sZ, {
            value: i.value[D],
            fields: l.value,
            options: S,
            readonly: t.readonly,
            allowHtml: t.allowHtml,
            optionHeight: c.value,
            swipeDuration: t.swipeDuration,
            visibleOptionNum: t.visibleOptionNum,
            onChange: F => E(F, D),
            onClickOption: F => g(F, D),
            onScrollInto: F => {
                e("scrollInto", {
                    currentOption: F,
                    columnIndex: D
                })
            }
        }, {
            option: r.option
        }))
          , b = S => {
            if (d.value) {
                const D = {
                    height: `${c.value}px`
                }
                  , F = {
                    backgroundSize: `100% ${(S - c.value) / 2}px`
                };
                return [O("div", {
                    class: Yo("mask"),
                    style: F
                }, null), O("div", {
                    class: [fq, Yo("frame")],
                    style: D
                }, null)]
            }
        }
          , C = () => {
            const S = c.value * +t.visibleOptionNum
              , D = {
                height: `${S}px`
            };
            return !t.loading && !d.value && r.empty ? r.empty() : O("div", {
                ref: n,
                class: Yo("columns"),
                style: D
            }, [_(), b(S)])
        }
          , B = () => {
            if (t.showToolbar && !o)
                return O(uZ, st($t(t, cZ), {
                    onConfirm: p,
                    onCancel: v
                }), $t(r, lZ))
        }
          , T = S => {
            S.forEach( (D, F) => {
                D.length && !g9(D, i.value[F], l.value) && y(F, C7(D)[l.value.value])
            }
            )
        }
        ;
        me(f, S => T(S), {
            immediate: !0
        });
        let A;
        return me( () => t.modelValue, S => {
            !Js(S, i.value) && !Js(S, A) && (i.value = S.slice(0),
            A = S.slice(0)),
            t.modelValue.length === 0 && T(f.value)
        }
        , {
            deep: !0
        }),
        me(i, S => {
            Js(S, t.modelValue) || (A = S.slice(0),
            e("update:modelValue", A))
        }
        , {
            immediate: !0
        }),
        mn("touchmove", Rr, {
            target: n
        }),
        Kt({
            confirm: p,
            getSelectedOptions: () => h.value
        }),
        () => {
            var S, D;
            return O("div", {
                class: Yo()
            }, [t.toolbarPosition === "top" ? B() : null, t.loading ? O(ys, {
                class: Yo("loading")
            }, null) : null, (S = r["columns-top"]) == null ? void 0 : S.call(r), C(), (D = r["columns-bottom"]) == null ? void 0 : D.call(r), t.toolbarPosition === "bottom" ? B() : null])
        }
    }
});
const XZ = Oe(YZ)
  , [KZ,Zl] = Se("cell")
  , Xp = {
    tag: Ie("div"),
    icon: String,
    size: String,
    title: Ae,
    value: Ae,
    label: Ae,
    center: Boolean,
    isLink: Boolean,
    border: Ee,
    iconPrefix: String,
    valueClass: hr,
    labelClass: hr,
    titleClass: hr,
    titleStyle: null,
    arrowDirection: String,
    required: {
        type: [Boolean, String],
        default: null
    },
    clickable: {
        type: Boolean,
        default: null
    }
}
  , qZ = We({}, Xp, _u);
var ZZ = be({
    name: KZ,
    props: qZ,
    setup(t, {slots: e}) {
        const r = Qf()
          , n = () => {
            if (e.label || Lt(t.label))
                return O("div", {
                    class: [Zl("label"), t.labelClass]
                }, [e.label ? e.label() : t.label])
        }
          , i = () => {
            var l;
            if (e.title || Lt(t.title)) {
                const c = (l = e.title) == null ? void 0 : l.call(e);
                return Array.isArray(c) && c.length === 0 ? void 0 : O("div", {
                    class: [Zl("title"), t.titleClass],
                    style: t.titleStyle
                }, [c || O("span", null, [t.title]), n()])
            }
        }
          , o = () => {
            const l = e.value || e.default;
            if (l || Lt(t.value))
                return O("div", {
                    class: [Zl("value"), t.valueClass]
                }, [l ? l() : O("span", null, [t.value])])
        }
          , s = () => {
            if (e.icon)
                return e.icon();
            if (t.icon)
                return O(rr, {
                    name: t.icon,
                    class: Zl("left-icon"),
                    classPrefix: t.iconPrefix
                }, null)
        }
          , a = () => {
            if (e["right-icon"])
                return e["right-icon"]();
            if (t.isLink) {
                const l = t.arrowDirection && t.arrowDirection !== "right" ? `arrow-${t.arrowDirection}` : "arrow";
                return O(rr, {
                    name: l,
                    class: Zl("right-icon")
                }, null)
            }
        }
        ;
        return () => {
            var l;
            const {tag: c, size: u, center: f, border: d, isLink: h, required: x} = t
              , y = (l = t.clickable) != null ? l : h
              , m = {
                center: f,
                required: !!x,
                clickable: y,
                borderless: !d
            };
            return u && (m[u] = !!u),
            O(c, {
                class: Zl(m),
                role: y ? "button" : void 0,
                tabindex: y ? 0 : void 0,
                onClick: r
            }, {
                default: () => {
                    var E;
                    return [s(), i(), o(), a(), (E = e.extra) == null ? void 0 : E.call(e)]
                }
            })
        }
    }
});
const U7 = Oe(ZZ)
  , [JZ,QZ] = Se("form")
  , eJ = {
    colon: Boolean,
    disabled: Boolean,
    readonly: Boolean,
    required: [Boolean, String],
    showError: Boolean,
    labelWidth: Ae,
    labelAlign: String,
    inputAlign: String,
    scrollToError: Boolean,
    scrollToErrorPosition: String,
    validateFirst: Boolean,
    submitOnEnter: Ee,
    showErrorMessage: Ee,
    errorMessageAlign: String,
    validateTrigger: {
        type: [String, Array],
        default: "onBlur"
    }
};
var tJ = be({
    name: JZ,
    props: eJ,
    emits: ["submit", "failed"],
    setup(t, {emit: e, slots: r}) {
        const {children: n, linkChildren: i} = Hi(p7)
          , o = m => m ? n.filter(E => m.includes(E.name)) : n
          , s = m => new Promise( (E, g) => {
            const p = [];
            o(m).reduce( (_, b) => _.then( () => {
                if (!p.length)
                    return b.validate().then(C => {
                        C && p.push(C)
                    }
                    )
            }
            ), Promise.resolve()).then( () => {
                p.length ? g(p) : E()
            }
            )
        }
        )
          , a = m => new Promise( (E, g) => {
            const p = o(m);
            Promise.all(p.map(v => v.validate())).then(v => {
                v = v.filter(Boolean),
                v.length ? g(v) : E()
            }
            )
        }
        )
          , l = m => {
            const E = n.find(g => g.name === m);
            return E ? new Promise( (g, p) => {
                E.validate().then(v => {
                    v ? p(v) : g()
                }
                )
            }
            ) : Promise.reject()
        }
          , c = m => typeof m == "string" ? l(m) : t.validateFirst ? s(m) : a(m)
          , u = m => {
            typeof m == "string" && (m = [m]),
            o(m).forEach(g => {
                g.resetValidation()
            }
            )
        }
          , f = () => n.reduce( (m, E) => (m[E.name] = E.getValidationStatus(),
        m), {})
          , d = (m, E) => {
            n.some(g => g.name === m ? (g.$el.scrollIntoView(E),
            !0) : !1)
        }
          , h = () => n.reduce( (m, E) => (E.name !== void 0 && (m[E.name] = E.formValue.value),
        m), {})
          , x = () => {
            const m = h();
            c().then( () => e("submit", m)).catch(E => {
                e("failed", {
                    values: m,
                    errors: E
                });
                const {scrollToError: g, scrollToErrorPosition: p} = t;
                g && E[0].name && d(E[0].name, p ? {
                    block: p
                } : void 0)
            }
            )
        }
          , y = m => {
            Rr(m),
            x()
        }
        ;
        return i({
            props: t
        }),
        Kt({
            submit: x,
            validate: c,
            getValues: h,
            scrollToField: d,
            resetValidation: u,
            getValidationStatus: f
        }),
        () => {
            var m;
            return O("form", {
                class: QZ(),
                onSubmit: y
            }, [(m = r.default) == null ? void 0 : m.call(r)])
        }
    }
});
const W3e = Oe(tJ);
function G7(t) {
    return Array.isArray(t) ? !t.length : t === 0 ? !1 : !t
}
function rJ(t, e) {
    if (G7(t)) {
        if (e.required)
            return !1;
        if (e.validateEmpty === !1)
            return !0
    }
    return !(e.pattern && !e.pattern.test(String(t)))
}
function nJ(t, e) {
    return new Promise(r => {
        const n = e.validator(t, e);
        if (b2(n)) {
            n.then(r);
            return
        }
        r(n)
    }
    )
}
function _9(t, e) {
    const {message: r} = e;
    return Wc(r) ? r(t, e) : r || ""
}
function iJ({target: t}) {
    t.composing = !0
}
function b9({target: t}) {
    t.composing && (t.composing = !1,
    t.dispatchEvent(new Event("input")))
}
function oJ(t, e) {
    const r = C2();
    t.style.height = "auto";
    let n = t.scrollHeight;
    if (yo(e)) {
        const {maxHeight: i, minHeight: o} = e;
        i !== void 0 && (n = Math.min(n, i)),
        o !== void 0 && (n = Math.max(n, o))
    }
    n && (t.style.height = `${n}px`,
    A2(r))
}
function sJ(t, e) {
    return t === "number" && (t = "text",
    e ?? (e = "decimal")),
    t === "digit" && (t = "tel",
    e ?? (e = "numeric")),
    {
        type: t,
        inputmode: e
    }
}
function Po(t) {
    return [...t].length
}
function ag(t, e) {
    return [...t].slice(0, e).join("")
}
const [aJ,ii] = Se("field")
  , lJ = {
    id: String,
    name: String,
    leftIcon: String,
    rightIcon: String,
    autofocus: Boolean,
    clearable: Boolean,
    maxlength: Ae,
    max: Number,
    min: Number,
    formatter: Function,
    clearIcon: Ie("clear"),
    modelValue: ze(""),
    inputAlign: String,
    placeholder: String,
    autocomplete: String,
    autocapitalize: String,
    autocorrect: String,
    errorMessage: String,
    enterkeyhint: String,
    clearTrigger: Ie("focus"),
    formatTrigger: Ie("onChange"),
    spellcheck: {
        type: Boolean,
        default: null
    },
    error: {
        type: Boolean,
        default: null
    },
    disabled: {
        type: Boolean,
        default: null
    },
    readonly: {
        type: Boolean,
        default: null
    },
    inputmode: String
}
  , cJ = We({}, Xp, lJ, {
    rows: Ae,
    type: Ie("text"),
    rules: Array,
    autosize: [Boolean, Object],
    labelWidth: Ae,
    labelClass: hr,
    labelAlign: String,
    showWordLimit: Boolean,
    errorMessageAlign: String,
    colon: {
        type: Boolean,
        default: null
    }
});
var uJ = be({
    name: aJ,
    props: cJ,
    emits: ["blur", "focus", "clear", "keypress", "clickInput", "endValidate", "startValidate", "clickLeftIcon", "clickRightIcon", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const n = T2()
          , i = Pt({
            status: "unvalidated",
            focused: !1,
            validateMessage: ""
        })
          , o = ie()
          , s = ie()
          , a = ie()
          , {parent: l} = Jn(p7)
          , c = () => {
            var G;
            return String((G = t.modelValue) != null ? G : "")
        }
          , u = G => {
            if (Lt(t[G]))
                return t[G];
            if (l && Lt(l.props[G]))
                return l.props[G]
        }
          , f = ae( () => {
            const G = u("readonly");
            if (t.clearable && !G) {
                const re = c() !== ""
                  , te = t.clearTrigger === "always" || t.clearTrigger === "focus" && i.focused;
                return re && te
            }
            return !1
        }
        )
          , d = ae( () => a.value && r.input ? a.value() : t.modelValue)
          , h = ae( () => {
            var G;
            const re = u("required");
            return re === "auto" ? (G = t.rules) == null ? void 0 : G.some(te => te.required) : re
        }
        )
          , x = G => G.reduce( (re, te) => re.then( () => {
            if (i.status === "failed")
                return;
            let {value: he} = d;
            if (te.formatter && (he = te.formatter(he, te)),
            !rJ(he, te)) {
                i.status = "failed",
                i.validateMessage = _9(he, te);
                return
            }
            if (te.validator)
                return G7(he) && te.validateEmpty === !1 ? void 0 : nJ(he, te).then(xe => {
                    xe && typeof xe == "string" ? (i.status = "failed",
                    i.validateMessage = xe) : xe === !1 && (i.status = "failed",
                    i.validateMessage = _9(he, te))
                }
                )
        }
        ), Promise.resolve())
          , y = () => {
            i.status = "unvalidated",
            i.validateMessage = ""
        }
          , m = () => e("endValidate", {
            status: i.status,
            message: i.validateMessage
        })
          , E = (G=t.rules) => new Promise(re => {
            y(),
            G ? (e("startValidate"),
            x(G).then( () => {
                i.status === "failed" ? (re({
                    name: t.name,
                    message: i.validateMessage
                }),
                m()) : (i.status = "passed",
                re(),
                m())
            }
            )) : re()
        }
        )
          , g = G => {
            if (l && t.rules) {
                const {validateTrigger: re} = l.props
                  , te = bx(re).includes(G)
                  , he = t.rules.filter(xe => xe.trigger ? bx(xe.trigger).includes(G) : te);
                he.length && E(he)
            }
        }
          , p = G => {
            var re;
            const {maxlength: te} = t;
            if (Lt(te) && Po(G) > +te) {
                const he = c();
                if (he && Po(he) === +te)
                    return he;
                const xe = (re = o.value) == null ? void 0 : re.selectionEnd;
                if (i.focused && xe) {
                    const ve = [...G]
                      , I = ve.length - +te;
                    return ve.splice(xe - I, I),
                    ve.join("")
                }
                return ag(G, +te)
            }
            return G
        }
          , v = (G, re="onChange") => {
            var te, he;
            const xe = G;
            G = p(G);
            const ve = Po(xe) - Po(G);
            if (t.type === "number" || t.type === "digit") {
                const z = t.type === "number";
                if (G = dy(G, z, z),
                re === "onBlur" && G !== "" && (t.min !== void 0 || t.max !== void 0)) {
                    const q = Ur(+G, (te = t.min) != null ? te : -1 / 0, (he = t.max) != null ? he : 1 / 0);
                    +G !== q && (G = q.toString())
                }
            }
            let I = 0;
            if (t.formatter && re === t.formatTrigger) {
                const {formatter: z, maxlength: q} = t;
                if (G = z(G),
                Lt(q) && Po(G) > +q && (G = ag(G, +q)),
                o.value && i.focused) {
                    const {selectionEnd: ce} = o.value
                      , fe = ag(xe, ce);
                    I = Po(z(fe)) - Po(fe)
                }
            }
            if (o.value && o.value.value !== G)
                if (i.focused) {
                    let {selectionStart: z, selectionEnd: q} = o.value;
                    if (o.value.value = G,
                    Lt(z) && Lt(q)) {
                        const ce = Po(G);
                        ve ? (z -= ve,
                        q -= ve) : I && (z += I,
                        q += I),
                        o.value.setSelectionRange(Math.min(z, ce), Math.min(q, ce))
                    }
                } else
                    o.value.value = G;
            G !== t.modelValue && e("update:modelValue", G)
        }
          , _ = G => {
            G.target.composing || v(G.target.value)
        }
          , b = () => {
            var G;
            return (G = o.value) == null ? void 0 : G.blur()
        }
          , C = () => {
            var G;
            return (G = o.value) == null ? void 0 : G.focus()
        }
          , B = () => {
            const G = o.value;
            t.type === "textarea" && t.autosize && G && oJ(G, t.autosize)
        }
          , T = G => {
            i.focused = !0,
            e("focus", G),
            Xe(B),
            u("readonly") && b()
        }
          , A = G => {
            i.focused = !1,
            v(c(), "onBlur"),
            e("blur", G),
            !u("readonly") && (g("onBlur"),
            Xe(B),
            a7())
        }
          , w = G => e("clickInput", G)
          , S = G => e("clickLeftIcon", G)
          , D = G => e("clickRightIcon", G)
          , F = G => {
            Rr(G),
            e("update:modelValue", ""),
            e("clear", G)
        }
          , R = ae( () => {
            if (typeof t.error == "boolean")
                return t.error;
            if (l && l.props.showError && i.status === "failed")
                return !0
        }
        )
          , P = ae( () => {
            const G = u("labelWidth")
              , re = u("labelAlign");
            if (G && re !== "top")
                return {
                    width: rt(G)
                }
        }
        )
          , N = G => {
            G.keyCode === 13 && (!(l && l.props.submitOnEnter) && t.type !== "textarea" && Rr(G),
            t.type === "search" && b()),
            e("keypress", G)
        }
          , j = () => t.id || `${n}-input`
          , K = () => i.status
          , oe = () => {
            const G = ii("control", [u("inputAlign"), {
                error: R.value,
                custom: !!r.input,
                "min-height": t.type === "textarea" && !t.autosize
            }]);
            if (r.input)
                return O("div", {
                    class: G,
                    onClick: w
                }, [r.input()]);
            const re = {
                id: j(),
                ref: o,
                name: t.name,
                rows: t.rows !== void 0 ? +t.rows : void 0,
                class: G,
                disabled: u("disabled"),
                readonly: u("readonly"),
                autofocus: t.autofocus,
                placeholder: t.placeholder,
                autocomplete: t.autocomplete,
                autocapitalize: t.autocapitalize,
                autocorrect: t.autocorrect,
                enterkeyhint: t.enterkeyhint,
                spellcheck: t.spellcheck,
                "aria-labelledby": t.label ? `${n}-label` : void 0,
                "data-allow-mismatch": "attribute",
                onBlur: A,
                onFocus: T,
                onInput: _,
                onClick: w,
                onChange: b9,
                onKeypress: N,
                onCompositionend: b9,
                onCompositionstart: iJ
            };
            return t.type === "textarea" ? O("textarea", st(re, {
                inputmode: t.inputmode
            }), null) : O("input", st(sJ(t.type, t.inputmode), re), null)
        }
          , U = () => {
            const G = r["left-icon"];
            if (t.leftIcon || G)
                return O("div", {
                    class: ii("left-icon"),
                    onClick: S
                }, [G ? G() : O(rr, {
                    name: t.leftIcon,
                    classPrefix: t.iconPrefix
                }, null)])
        }
          , $ = () => {
            const G = r["right-icon"];
            if (t.rightIcon || G)
                return O("div", {
                    class: ii("right-icon"),
                    onClick: D
                }, [G ? G() : O(rr, {
                    name: t.rightIcon,
                    classPrefix: t.iconPrefix
                }, null)])
        }
          , V = () => {
            if (t.showWordLimit && t.maxlength) {
                const G = Po(c());
                return O("div", {
                    class: ii("word-limit")
                }, [O("span", {
                    class: ii("word-num")
                }, [G]), Dp("/"), t.maxlength])
            }
        }
          , W = () => {
            if (l && l.props.showErrorMessage === !1)
                return;
            const G = t.errorMessage || i.validateMessage;
            if (G) {
                const re = r["error-message"]
                  , te = u("errorMessageAlign");
                return O("div", {
                    class: ii("error-message", te)
                }, [re ? re({
                    message: G
                }) : G])
            }
        }
          , H = () => {
            const G = u("labelWidth")
              , re = u("labelAlign")
              , te = u("colon") ? ":" : "";
            if (r.label)
                return [r.label(), te];
            if (t.label)
                return O("label", {
                    id: `${n}-label`,
                    for: r.input ? void 0 : j(),
                    "data-allow-mismatch": "attribute",
                    onClick: he => {
                        Rr(he),
                        C()
                    }
                    ,
                    style: re === "top" && G ? {
                        width: rt(G)
                    } : void 0
                }, [t.label + te])
        }
          , Q = () => [O("div", {
            class: ii("body")
        }, [oe(), f.value && O(rr, {
            ref: s,
            name: t.clearIcon,
            class: ii("clear")
        }, null), $(), r.button && O("div", {
            class: ii("button")
        }, [r.button()])]), V(), W()];
        return Kt({
            blur: b,
            focus: C,
            validate: E,
            formValue: d,
            resetValidation: y,
            getValidationStatus: K
        }),
        xi(W_, {
            customValue: a,
            resetValidation: y,
            validateWithTrigger: g
        }),
        me( () => t.modelValue, () => {
            v(c()),
            y(),
            g("onChange"),
            Xe(B)
        }
        ),
        Ht( () => {
            v(c(), t.formatTrigger),
            Xe(B)
        }
        ),
        mn("touchstart", F, {
            target: ae( () => {
                var G;
                return (G = s.value) == null ? void 0 : G.$el
            }
            )
        }),
        () => {
            const G = u("disabled")
              , re = u("labelAlign")
              , te = U()
              , he = () => {
                const xe = H();
                return re === "top" ? [te, xe].filter(Boolean) : xe || []
            }
            ;
            return O(U7, {
                size: t.size,
                class: ii({
                    error: R.value,
                    disabled: G,
                    [`label-${re}`]: re
                }),
                center: t.center,
                border: t.border,
                isLink: t.isLink,
                clickable: t.clickable,
                titleStyle: P.value,
                valueClass: ii("value"),
                titleClass: [ii("label", [re, {
                    required: h.value
                }]), t.labelClass],
                arrowDirection: t.arrowDirection
            }, {
                icon: te && re !== "top" ? () => te : null,
                title: he,
                value: Q,
                extra: r.extra
            })
        }
    }
});
const Y3e = Oe(uJ);
let Uu = 0;
function fJ(t) {
    t ? (Uu || document.body.classList.add("van-toast--unclickable"),
    Uu++) : Uu && (Uu--,
    Uu || document.body.classList.remove("van-toast--unclickable"))
}
const [dJ,Jl] = Se("toast")
  , hJ = ["show", "overlay", "teleport", "transition", "overlayClass", "overlayStyle", "closeOnClickOverlay", "zIndex"]
  , xJ = {
    icon: String,
    show: Boolean,
    type: Ie("text"),
    overlay: Boolean,
    message: Ae,
    iconSize: Ae,
    duration: jp(2e3),
    position: Ie("middle"),
    teleport: [String, Object],
    wordBreak: String,
    className: hr,
    iconPrefix: String,
    transition: Ie("van-fade"),
    loadingType: String,
    forbidClick: Boolean,
    overlayClass: hr,
    overlayStyle: Object,
    closeOnClick: Boolean,
    closeOnClickOverlay: Boolean,
    zIndex: Ae
};
var H7 = be({
    name: dJ,
    props: xJ,
    emits: ["update:show"],
    setup(t, {emit: e, slots: r}) {
        let n, i = !1;
        const o = () => {
            const f = t.show && t.forbidClick;
            i !== f && (i = f,
            fJ(i))
        }
          , s = f => e("update:show", f)
          , a = () => {
            t.closeOnClick && s(!1)
        }
          , l = () => clearTimeout(n)
          , c = () => {
            const {icon: f, type: d, iconSize: h, iconPrefix: x, loadingType: y} = t;
            if (f || d === "success" || d === "fail")
                return O(rr, {
                    name: f || d,
                    size: h,
                    class: Jl("icon"),
                    classPrefix: x
                }, null);
            if (d === "loading")
                return O(ys, {
                    class: Jl("loading"),
                    size: h,
                    type: y
                }, null)
        }
          , u = () => {
            const {type: f, message: d} = t;
            if (r.message)
                return O("div", {
                    class: Jl("text")
                }, [r.message()]);
            if (Lt(d) && d !== "")
                return f === "html" ? O("div", {
                    key: 0,
                    class: Jl("text"),
                    innerHTML: String(d)
                }, null) : O("div", {
                    class: Jl("text")
                }, [d])
        }
        ;
        return me( () => [t.show, t.forbidClick], o),
        me( () => [t.show, t.type, t.message, t.duration], () => {
            l(),
            t.show && t.duration > 0 && (n = setTimeout( () => {
                s(!1)
            }
            , t.duration))
        }
        ),
        Ht(o),
        vs(o),
        () => O(Gl, st({
            class: [Jl([t.position, t.wordBreak === "normal" ? "break-normal" : t.wordBreak, {
                [t.type]: !t.icon
            }]), t.className],
            lockScroll: !1,
            onClick: a,
            onClosed: l,
            "onUpdate:show": s
        }, $t(t, hJ)), {
            default: () => [c(), u()]
        })
    }
});
function Kp() {
    const t = Pt({
        show: !1
    })
      , e = i => {
        t.show = i
    }
      , r = i => {
        We(t, i, {
            transitionAppear: !0
        }),
        e(!0)
    }
      , n = () => e(!1);
    return Kt({
        open: r,
        close: n,
        toggle: e
    }),
    {
        open: r,
        close: n,
        state: t,
        toggle: e
    }
}
function qp(t) {
    const e = rS(t)
      , r = document.createElement("div");
    return document.body.appendChild(r),
    {
        instance: e.mount(r),
        unmount() {
            e.unmount(),
            document.body.removeChild(r)
        }
    }
}
const pJ = {
    icon: "",
    type: "text",
    message: "",
    className: "",
    overlay: !1,
    onClose: void 0,
    onOpened: void 0,
    duration: 2e3,
    teleport: "body",
    iconSize: void 0,
    iconPrefix: void 0,
    position: "middle",
    transition: "van-fade",
    forbidClick: !1,
    loadingType: void 0,
    overlayClass: "",
    overlayStyle: void 0,
    closeOnClick: !1,
    closeOnClickOverlay: !1
};
let Gs = []
  , gJ = !1
  , gy = We({}, pJ);
const V7 = new Map;
function z7(t) {
    return yo(t) ? t : {
        message: t
    }
}
function mJ() {
    const {instance: t, unmount: e} = qp({
        setup() {
            const r = ie("")
              , {open: n, state: i, close: o, toggle: s} = Kp()
              , a = () => {}
              , l = () => O(H7, st(i, {
                onClosed: a,
                "onUpdate:show": s
            }), null);
            return me(r, c => {
                i.message = c
            }
            ),
            It().render = l,
            {
                open: n,
                close: o,
                message: r
            }
        }
    });
    return t
}
function vJ() {
    if (!Gs.length || gJ) {
        const t = mJ();
        Gs.push(t)
    }
    return Gs[Gs.length - 1]
}
function my(t={}) {
    if (!vo)
        return {};
    const e = vJ()
      , r = z7(t);
    return e.open(We({}, gy, V7.get(r.type || gy.type), r)),
    e
}
const F2 = t => e => my(We({
    type: t
}, z7(e)))
  , X3e = F2("loading")
  , K3e = F2("success")
  , q3e = F2("fail")
  , Z3e = t => {
    Gs.length && (t ? (Gs.forEach(e => {
        e.close()
    }
    ),
    Gs = []) : Gs[0].close())
}
;
function J3e(t, e) {
    typeof t == "string" ? V7.set(t, e) : We(gy, t)
}
const Q3e = Oe(H7)
  , [yJ,lg] = Se("switch")
  , EJ = {
    size: Ae,
    loading: Boolean,
    disabled: Boolean,
    modelValue: hr,
    activeColor: String,
    inactiveColor: String,
    activeValue: {
        type: hr,
        default: !0
    },
    inactiveValue: {
        type: hr,
        default: !1
    }
};
var _J = be({
    name: yJ,
    props: EJ,
    emits: ["change", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const n = () => t.modelValue === t.activeValue
          , i = () => {
            if (!t.disabled && !t.loading) {
                const s = n() ? t.inactiveValue : t.activeValue;
                e("update:modelValue", s),
                e("change", s)
            }
        }
          , o = () => {
            if (t.loading) {
                const s = n() ? t.activeColor : t.inactiveColor;
                return O(ys, {
                    class: lg("loading"),
                    color: s
                }, null)
            }
            if (r.node)
                return r.node()
        }
        ;
        return Ll( () => t.modelValue),
        () => {
            var s;
            const {size: a, loading: l, disabled: c, activeColor: u, inactiveColor: f} = t
              , d = n()
              , h = {
                fontSize: rt(a),
                backgroundColor: d ? u : f
            };
            return O("div", {
                role: "switch",
                class: lg({
                    on: d,
                    loading: l,
                    disabled: c
                }),
                style: h,
                tabindex: c ? void 0 : 0,
                "aria-checked": d,
                onClick: i
            }, [O("div", {
                class: lg("node")
            }, [o()]), (s = r.background) == null ? void 0 : s.call(r)])
        }
    }
});
const e4e = Oe(_J)
  , [j7,bJ] = Se("radio-group")
  , CJ = {
    shape: String,
    disabled: Boolean,
    iconSize: Ae,
    direction: String,
    modelValue: hr,
    checkedColor: String
}
  , W7 = Symbol(j7);
var AJ = be({
    name: j7,
    props: CJ,
    emits: ["change", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const {linkChildren: n} = Hi(W7)
          , i = o => e("update:modelValue", o);
        return me( () => t.modelValue, o => e("change", o)),
        n({
            props: t,
            updateValue: i
        }),
        Ll( () => t.modelValue),
        () => {
            var o;
            return O("div", {
                class: bJ([t.direction]),
                role: "radiogroup"
            }, [(o = r.default) == null ? void 0 : o.call(r)])
        }
    }
});
const t4e = Oe(AJ)
  , [wJ,r4e] = Se("checkbox-group")
  , BJ = Symbol(wJ)
  , P2 = {
    name: hr,
    disabled: Boolean,
    iconSize: Ae,
    modelValue: hr,
    checkedColor: String,
    labelPosition: String,
    labelDisabled: Boolean
};
var Y7 = be({
    props: We({}, P2, {
        bem: fn(Function),
        role: String,
        shape: String,
        parent: Object,
        checked: Boolean,
        bindGroup: Ee,
        indeterminate: {
            type: Boolean,
            default: null
        }
    }),
    emits: ["click", "toggle"],
    setup(t, {emit: e, slots: r}) {
        const n = ie()
          , i = d => {
            if (t.parent && t.bindGroup)
                return t.parent.props[d]
        }
          , o = ae( () => {
            if (t.parent && t.bindGroup) {
                const d = i("disabled") || t.disabled;
                if (t.role === "checkbox") {
                    const h = i("modelValue").length
                      , x = i("max")
                      , y = x && h >= +x;
                    return d || y && !t.checked
                }
                return d
            }
            return t.disabled
        }
        )
          , s = ae( () => i("direction"))
          , a = ae( () => {
            const d = t.checkedColor || i("checkedColor");
            if (d && (t.checked || t.indeterminate) && !o.value)
                return {
                    borderColor: d,
                    backgroundColor: d
                }
        }
        )
          , l = ae( () => t.shape || i("shape") || "round")
          , c = d => {
            const {target: h} = d
              , x = n.value
              , y = x === h || (x == null ? void 0 : x.contains(h));
            !o.value && (y || !t.labelDisabled) && e("toggle"),
            e("click", d)
        }
          , u = () => {
            var d, h;
            const {bem: x, checked: y, indeterminate: m} = t
              , E = t.iconSize || i("iconSize");
            return O("div", {
                ref: n,
                class: x("icon", [l.value, {
                    disabled: o.value,
                    checked: y,
                    indeterminate: m
                }]),
                style: l.value !== "dot" ? {
                    fontSize: rt(E)
                } : {
                    width: rt(E),
                    height: rt(E),
                    borderColor: (d = a.value) == null ? void 0 : d.borderColor
                }
            }, [r.icon ? r.icon({
                checked: y,
                disabled: o.value
            }) : l.value !== "dot" ? O(rr, {
                name: m ? "minus" : "success",
                style: a.value
            }, null) : O("div", {
                class: x("icon--dot__icon"),
                style: {
                    backgroundColor: (h = a.value) == null ? void 0 : h.backgroundColor
                }
            }, null)])
        }
          , f = () => {
            const {checked: d} = t;
            if (r.default)
                return O("span", {
                    class: t.bem("label", [t.labelPosition, {
                        disabled: o.value
                    }])
                }, [r.default({
                    checked: d,
                    disabled: o.value
                })])
        }
        ;
        return () => {
            const d = t.labelPosition === "left" ? [f(), u()] : [u(), f()];
            return O("div", {
                role: t.role,
                class: t.bem([{
                    disabled: o.value,
                    "label-disabled": t.labelDisabled
                }, s.value]),
                tabindex: o.value ? void 0 : 0,
                "aria-checked": t.checked,
                onClick: c
            }, [d])
        }
    }
});
const SJ = We({}, P2, {
    shape: String
})
  , [TJ,DJ] = Se("radio");
var FJ = be({
    name: TJ,
    props: SJ,
    emits: ["update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const {parent: n} = Jn(W7)
          , i = () => (n ? n.props.modelValue : t.modelValue) === t.name
          , o = () => {
            n ? n.updateValue(t.name) : e("update:modelValue", t.name)
        }
        ;
        return () => O(Y7, st({
            bem: DJ,
            role: "radio",
            parent: n,
            checked: i(),
            onToggle: o
        }, t), $t(r, ["default", "icon"]))
    }
});
const n4e = Oe(FJ)
  , [PJ,IJ] = Se("checkbox")
  , OJ = We({}, P2, {
    shape: String,
    bindGroup: Ee,
    indeterminate: {
        type: Boolean,
        default: null
    }
});
var kJ = be({
    name: PJ,
    props: OJ,
    emits: ["change", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const {parent: n} = Jn(BJ)
          , i = a => {
            const {name: l} = t
              , {max: c, modelValue: u} = n.props
              , f = u.slice();
            if (a)
                !(c && f.length >= +c) && !f.includes(l) && (f.push(l),
                t.bindGroup && n.updateValue(f));
            else {
                const d = f.indexOf(l);
                d !== -1 && (f.splice(d, 1),
                t.bindGroup && n.updateValue(f))
            }
        }
          , o = ae( () => n && t.bindGroup ? n.props.modelValue.indexOf(t.name) !== -1 : !!t.modelValue)
          , s = (a=!o.value) => {
            n && t.bindGroup ? i(a) : e("update:modelValue", a),
            t.indeterminate !== null && e("change", a)
        }
        ;
        return me( () => t.modelValue, a => {
            t.indeterminate === null && e("change", a)
        }
        ),
        Kt({
            toggle: s,
            props: t,
            checked: o
        }),
        Ll( () => t.modelValue),
        () => O(Y7, st({
            bem: IJ,
            role: "checkbox",
            parent: n,
            checked: o.value,
            onToggle: s
        }, t), $t(r, ["default", "icon"]))
    }
});
const i4e = Oe(kJ)
  , [RJ,Qt,Jo] = Se("calendar")
  , MJ = t => Jo("monthTitle", t.getFullYear(), t.getMonth() + 1);
function Wa(t, e) {
    const r = t.getFullYear()
      , n = e.getFullYear();
    if (r === n) {
        const i = t.getMonth()
          , o = e.getMonth();
        return i === o ? 0 : i > o ? 1 : -1
    }
    return r > n ? 1 : -1
}
function _n(t, e) {
    const r = Wa(t, e);
    if (r === 0) {
        const n = t.getDate()
          , i = e.getDate();
        return n === i ? 0 : n > i ? 1 : -1
    }
    return r
}
const Xc = t => new Date(t)
  , C9 = t => Array.isArray(t) ? t.map(Xc) : Xc(t);
function I2(t, e) {
    const r = Xc(t);
    return r.setDate(r.getDate() + e),
    r
}
function O2(t, e) {
    const r = Xc(t);
    return r.setMonth(r.getMonth() + e),
    r.getDate() !== t.getDate() && r.setDate(0),
    r
}
function X7(t, e) {
    const r = Xc(t);
    return r.setFullYear(r.getFullYear() + e),
    r.getDate() !== t.getDate() && r.setDate(0),
    r
}
const vy = t => I2(t, -1)
  , yy = t => I2(t, 1)
  , A9 = t => O2(t, -1)
  , w9 = t => O2(t, 1)
  , B9 = t => X7(t, -1)
  , S9 = t => X7(t, 1)
  , Hd = () => {
    const t = new Date;
    return t.setHours(0, 0, 0, 0),
    t
}
;
function NJ(t) {
    const e = t[0].getTime();
    return (t[1].getTime() - e) / (1e3 * 60 * 60 * 24) + 1
}
function LJ(t, e=0) {
    const r = new Date(t.getFullYear(),t.getMonth() + 1,0)
      , n = e + t.getDate() - 1
      , i = e + r.getDate() - 1;
    return Math.floor(n / 7) === Math.floor(i / 7)
}
const $J = We({}, D2, {
    modelValue: ls(),
    filter: Function,
    formatter: {
        type: Function,
        default: (t, e) => e
    }
})
  , UJ = Object.keys(D2);
function GJ(t, e) {
    if (t < 0)
        return [];
    const r = Array(t);
    let n = -1;
    for (; ++n < t; )
        r[n] = e(n);
    return r
}
const K7 = (t, e) => 32 - new Date(t,e - 1,32).getDate()
  , cg = (t, e, r, n, i, o) => {
    const s = GJ(e - t + 1, a => {
        const l = Ha(t + a);
        return n(r, {
            text: l,
            value: l
        })
    }
    );
    return i ? i(r, s, o) : s
}
  , HJ = (t, e) => t.map( (r, n) => {
    const i = e[n];
    if (i.length) {
        const o = +i[0].value
          , s = +i[i.length - 1].value;
        return Ha(Ur(+r, o, s))
    }
    return r
}
)
  , [VJ] = Se("calendar-day");
var zJ = be({
    name: VJ,
    props: {
        item: fn(Object),
        color: String,
        index: Number,
        offset: jp(0),
        rowHeight: String
    },
    emits: ["click", "clickDisabledDate"],
    setup(t, {emit: e, slots: r}) {
        const n = ae( () => {
            const {item: c, index: u, color: f, offset: d, rowHeight: h} = t
              , x = {
                height: h
            };
            if (c.type === "placeholder")
                return x.width = "100%",
                x;
            if (u === 0 && (x.marginLeft = `${100 * d / 7}%`),
            f)
                switch (c.type) {
                case "end":
                case "start":
                case "start-end":
                case "multiple-middle":
                case "multiple-selected":
                    x.background = f;
                    break;
                case "middle":
                    x.color = f;
                    break
                }
            return c.date && LJ(c.date, d) && (x.marginBottom = 0),
            x
        }
        )
          , i = () => {
            t.item.type !== "disabled" ? e("click", t.item) : e("clickDisabledDate", t.item)
        }
          , o = () => {
            const {topInfo: c} = t.item;
            if (c || r["top-info"])
                return O("div", {
                    class: Qt("top-info")
                }, [r["top-info"] ? r["top-info"](t.item) : c])
        }
          , s = () => {
            const {bottomInfo: c} = t.item;
            if (c || r["bottom-info"])
                return O("div", {
                    class: Qt("bottom-info")
                }, [r["bottom-info"] ? r["bottom-info"](t.item) : c])
        }
          , a = () => r.text ? r.text(t.item) : t.item.text
          , l = () => {
            const {item: c, color: u, rowHeight: f} = t
              , {type: d} = c
              , h = [o(), a(), s()];
            return d === "selected" ? O("div", {
                class: Qt("selected-day"),
                style: {
                    width: f,
                    height: f,
                    background: u
                }
            }, [h]) : h
        }
        ;
        return () => {
            const {type: c, className: u} = t.item;
            return c === "placeholder" ? O("div", {
                class: Qt("day"),
                style: n.value
            }, null) : O("div", {
                role: "gridcell",
                style: n.value,
                class: [Qt("day", c), u],
                tabindex: c === "disabled" ? void 0 : -1,
                onClick: i
            }, [l()])
        }
    }
});
const [jJ] = Se("calendar-month")
  , WJ = {
    date: fn(Date),
    type: String,
    color: String,
    minDate: Date,
    maxDate: Date,
    showMark: Boolean,
    rowHeight: Ae,
    formatter: Function,
    lazyRender: Boolean,
    currentDate: [Date, Array],
    allowSameDay: Boolean,
    showSubtitle: Boolean,
    showMonthTitle: Boolean,
    firstDayOfWeek: Number
};
var YJ = be({
    name: jJ,
    props: WJ,
    emits: ["click", "clickDisabledDate"],
    setup(t, {emit: e, slots: r}) {
        const [n,i] = bS()
          , o = ie()
          , s = ie()
          , a = v7(s)
          , l = ae( () => MJ(t.date))
          , c = ae( () => rt(t.rowHeight))
          , u = ae( () => {
            const A = t.date.getDate()
              , S = (t.date.getDay() - A % 7 + 8) % 7;
            return t.firstDayOfWeek ? (S + 7 - t.firstDayOfWeek) % 7 : S
        }
        )
          , f = ae( () => K7(t.date.getFullYear(), t.date.getMonth() + 1))
          , d = ae( () => n.value || !t.lazyRender)
          , h = () => l.value
          , x = A => {
            const w = S => t.currentDate.some(D => _n(D, S) === 0);
            if (w(A)) {
                const S = vy(A)
                  , D = yy(A)
                  , F = w(S)
                  , R = w(D);
                return F && R ? "multiple-middle" : F ? "end" : R ? "start" : "multiple-selected"
            }
            return ""
        }
          , y = A => {
            const [w,S] = t.currentDate;
            if (!w)
                return "";
            const D = _n(A, w);
            if (!S)
                return D === 0 ? "start" : "";
            const F = _n(A, S);
            return t.allowSameDay && D === 0 && F === 0 ? "start-end" : D === 0 ? "start" : F === 0 ? "end" : D > 0 && F < 0 ? "middle" : ""
        }
          , m = A => {
            const {type: w, minDate: S, maxDate: D, currentDate: F} = t;
            if (S && _n(A, S) < 0 || D && _n(A, D) > 0)
                return "disabled";
            if (F === null)
                return "";
            if (Array.isArray(F)) {
                if (w === "multiple")
                    return x(A);
                if (w === "range")
                    return y(A)
            } else if (w === "single")
                return _n(A, F) === 0 ? "selected" : "";
            return ""
        }
          , E = A => {
            if (t.type === "range") {
                if (A === "start" || A === "end")
                    return Jo(A);
                if (A === "start-end")
                    return `${Jo("start")}/${Jo("end")}`
            }
        }
          , g = () => {
            if (t.showMonthTitle)
                return O("div", {
                    class: Qt("month-title")
                }, [r["month-title"] ? r["month-title"]({
                    date: t.date,
                    text: l.value
                }) : l.value])
        }
          , p = () => {
            if (t.showMark && d.value)
                return O("div", {
                    class: Qt("month-mark")
                }, [t.date.getMonth() + 1])
        }
          , v = ae( () => {
            const A = Math.ceil((f.value + u.value) / 7);
            return Array(A).fill({
                type: "placeholder"
            })
        }
        )
          , _ = ae( () => {
            const A = []
              , w = t.date.getFullYear()
              , S = t.date.getMonth();
            for (let D = 1; D <= f.value; D++) {
                const F = new Date(w,S,D)
                  , R = m(F);
                let P = {
                    date: F,
                    type: R,
                    text: D,
                    bottomInfo: E(R)
                };
                t.formatter && (P = t.formatter(P)),
                A.push(P)
            }
            return A
        }
        )
          , b = ae( () => _.value.filter(A => A.type === "disabled"))
          , C = (A, w) => {
            if (o.value) {
                const S = Cr(o.value)
                  , D = v.value.length
                  , R = (Math.ceil((w.getDate() + u.value) / 7) - 1) * S.height / D;
                Cx(A, S.top + R + A.scrollTop - Cr(A).top)
            }
        }
          , B = (A, w) => O(zJ, {
            item: A,
            index: w,
            color: t.color,
            offset: u.value,
            rowHeight: c.value,
            onClick: S => e("click", S),
            onClickDisabledDate: S => e("clickDisabledDate", S)
        }, $t(r, ["top-info", "bottom-info", "text"]))
          , T = () => O("div", {
            ref: o,
            role: "grid",
            class: Qt("days")
        }, [p(), (d.value ? _ : v).value.map(B)]);
        return Kt({
            getTitle: h,
            getHeight: () => a.value,
            setVisible: i,
            scrollToDate: C,
            disabledDays: b
        }),
        () => O("div", {
            class: Qt("month"),
            ref: s
        }, [g(), T()])
    }
});
const [XJ] = Se("calendar-header");
var KJ = be({
    name: XJ,
    props: {
        date: Date,
        minDate: Date,
        maxDate: Date,
        title: String,
        subtitle: String,
        showTitle: Boolean,
        showSubtitle: Boolean,
        firstDayOfWeek: Number,
        switchMode: Ie("none")
    },
    emits: ["clickSubtitle", "panelChange"],
    setup(t, {slots: e, emit: r}) {
        const n = ae( () => t.date && t.minDate && Wa(A9(t.date), t.minDate) < 0)
          , i = ae( () => t.date && t.minDate && Wa(B9(t.date), t.minDate) < 0)
          , o = ae( () => t.date && t.maxDate && Wa(w9(t.date), t.maxDate) > 0)
          , s = ae( () => t.date && t.maxDate && Wa(S9(t.date), t.maxDate) > 0)
          , a = () => {
            if (t.showTitle) {
                const h = t.title || Jo("title")
                  , x = e.title ? e.title() : h;
                return O("div", {
                    class: Qt("header-title")
                }, [x])
            }
        }
          , l = h => r("clickSubtitle", h)
          , c = h => r("panelChange", h)
          , u = h => {
            const x = t.switchMode === "year-month"
              , y = e[h ? "next-month" : "prev-month"]
              , m = e[h ? "next-year" : "prev-year"]
              , E = h ? o.value : n.value
              , g = h ? s.value : i.value
              , p = h ? "arrow" : "arrow-left"
              , v = h ? "arrow-double-right" : "arrow-double-left"
              , _ = () => c((h ? w9 : A9)(t.date))
              , b = () => c((h ? S9 : B9)(t.date))
              , C = O("view", {
                class: Qt("header-action", {
                    disabled: E
                }),
                onClick: E ? void 0 : _
            }, [y ? y({
                disabled: E
            }) : O(rr, {
                class: {
                    [cs]: !E
                },
                name: p
            }, null)])
              , B = x && O("view", {
                class: Qt("header-action", {
                    disabled: g
                }),
                onClick: g ? void 0 : b
            }, [m ? m({
                disabled: g
            }) : O(rr, {
                class: {
                    [cs]: !g
                },
                name: v
            }, null)]);
            return h ? [C, B] : [B, C]
        }
          , f = () => {
            if (t.showSubtitle) {
                const h = e.subtitle ? e.subtitle({
                    date: t.date,
                    text: t.subtitle
                }) : t.subtitle
                  , x = t.switchMode !== "none";
                return O("div", {
                    class: Qt("header-subtitle", {
                        "with-switch": x
                    }),
                    onClick: l
                }, [x ? [u(), O("div", {
                    class: Qt("header-subtitle-text")
                }, [h]), u(!0)] : h])
            }
        }
          , d = () => {
            const {firstDayOfWeek: h} = t
              , x = Jo("weekdays")
              , y = [...x.slice(h, 7), ...x.slice(0, h)];
            return O("div", {
                class: Qt("weekdays")
            }, [y.map(m => O("span", {
                class: Qt("weekday")
            }, [m]))])
        }
        ;
        return () => O("div", {
            class: Qt("header")
        }, [a(), f(), d()])
    }
});
const qJ = {
    show: Boolean,
    type: Ie("single"),
    switchMode: Ie("none"),
    title: String,
    color: String,
    round: Ee,
    readonly: Boolean,
    poppable: Ee,
    maxRange: ze(null),
    position: Ie("bottom"),
    teleport: [String, Object],
    showMark: Ee,
    showTitle: Ee,
    formatter: Function,
    rowHeight: Ae,
    confirmText: String,
    rangePrompt: String,
    lazyRender: Ee,
    showConfirm: Ee,
    defaultDate: [Date, Array],
    allowSameDay: Boolean,
    showSubtitle: Ee,
    closeOnPopstate: Ee,
    showRangePrompt: Ee,
    confirmDisabledText: String,
    closeOnClickOverlay: Ee,
    safeAreaInsetTop: Boolean,
    safeAreaInsetBottom: Ee,
    minDate: {
        type: Date,
        validator: lf
    },
    maxDate: {
        type: Date,
        validator: lf
    },
    firstDayOfWeek: {
        type: Ae,
        default: 0,
        validator: t => t >= 0 && t <= 6
    }
};
var ZJ = be({
    name: RJ,
    props: qJ,
    emits: ["select", "confirm", "unselect", "monthShow", "overRange", "update:show", "clickSubtitle", "clickDisabledDate", "clickOverlay", "panelChange"],
    setup(t, {emit: e, slots: r}) {
        const n = ae( () => t.switchMode !== "none")
          , i = ae( () => !t.minDate && !n.value ? Hd() : t.minDate)
          , o = ae( () => !t.maxDate && !n.value ? O2(Hd(), 6) : t.maxDate)
          , s = ($, V=i.value, W=o.value) => V && _n($, V) === -1 ? V : W && _n($, W) === 1 ? W : $
          , a = ($=t.defaultDate) => {
            const {type: V, allowSameDay: W} = t;
            if ($ === null)
                return $;
            const H = Hd();
            if (V === "range") {
                Array.isArray($) || ($ = []),
                $.length === 1 && _n($[0], H) === 1 && ($ = []);
                const Q = i.value
                  , G = o.value
                  , re = s($[0] || H, Q, G ? W ? G : vy(G) : void 0)
                  , te = s($[1] || (W ? H : yy(H)), Q ? W ? Q : yy(Q) : void 0);
                return [re, te]
            }
            return V === "multiple" ? Array.isArray($) ? $.map(Q => s(Q)) : [s(H)] : ((!$ || Array.isArray($)) && ($ = H),
            s($))
        }
          , l = () => {
            const $ = Array.isArray(f.value) ? f.value[0] : f.value;
            return $ || s(Hd())
        }
        ;
        let c;
        const u = ie()
          , f = ie(a())
          , d = ie(l())
          , h = ie()
          , [x,y] = F7()
          , m = ae( () => t.firstDayOfWeek ? +t.firstDayOfWeek % 7 : 0)
          , E = ae( () => {
            const $ = [];
            if (!i.value || !o.value)
                return $;
            const V = new Date(i.value);
            V.setDate(1);
            do
                $.push(new Date(V)),
                V.setMonth(V.getMonth() + 1);
            while (Wa(V, o.value) !== 1);
            return $
        }
        )
          , g = ae( () => {
            if (f.value) {
                if (t.type === "range")
                    return !f.value[0] || !f.value[1];
                if (t.type === "multiple")
                    return !f.value.length
            }
            return !f.value
        }
        )
          , p = () => f.value
          , v = () => {
            const $ = Jf(u.value)
              , V = $ + c
              , W = E.value.map( (te, he) => x.value[he].getHeight())
              , H = W.reduce( (te, he) => te + he, 0);
            if (V > H && $ > 0)
                return;
            let Q = 0, G;
            const re = [-1, -1];
            for (let te = 0; te < E.value.length; te++) {
                const he = x.value[te];
                Q <= V && Q + W[te] >= $ && (re[1] = te,
                G || (G = he,
                re[0] = te),
                x.value[te].showed || (x.value[te].showed = !0,
                e("monthShow", {
                    date: he.date,
                    title: he.getTitle()
                }))),
                Q += W[te]
            }
            E.value.forEach( (te, he) => {
                const xe = he >= re[0] - 1 && he <= re[1] + 1;
                x.value[he].setVisible(xe)
            }
            ),
            G && (h.value = G)
        }
          , _ = $ => {
            n.value ? d.value = $ : xn( () => {
                E.value.some( (V, W) => Wa(V, $) === 0 ? (u.value && x.value[W].scrollToDate(u.value, $),
                !0) : !1),
                v()
            }
            )
        }
          , b = () => {
            if (!(t.poppable && !t.show))
                if (f.value) {
                    const $ = t.type === "single" ? f.value : f.value[0];
                    lf($) && _($)
                } else
                    n.value || xn(v)
        }
          , C = () => {
            t.poppable && !t.show || (n.value || xn( () => {
                c = Math.floor(Cr(u).height)
            }
            ),
            b())
        }
          , B = ($=a()) => {
            f.value = $,
            b()
        }
          , T = $ => {
            const {maxRange: V, rangePrompt: W, showRangePrompt: H} = t;
            return V && NJ($) > +V ? (H && my(W || Jo("rangePrompt", V)),
            e("overRange"),
            !1) : !0
        }
          , A = $ => {
            d.value = $,
            e("panelChange", {
                date: $
            })
        }
          , w = () => {
            var $;
            return e("confirm", ($ = f.value) != null ? $ : C9(f.value))
        }
          , S = ($, V) => {
            const W = H => {
                f.value = H,
                e("select", C9(H))
            }
            ;
            if (V && t.type === "range" && !T($)) {
                W([$[0], I2($[0], +t.maxRange - 1)]);
                return
            }
            W($),
            V && !t.showConfirm && w()
        }
          , D = ($, V, W) => {
            var H;
            return (H = $.find(Q => _n(V, Q.date) === -1 && _n(Q.date, W) === -1)) == null ? void 0 : H.date
        }
          , F = ae( () => x.value.reduce( ($, V) => {
            var W, H;
            return $.push(...(H = (W = V.disabledDays) == null ? void 0 : W.value) != null ? H : []),
            $
        }
        , []))
          , R = $ => {
            if (t.readonly || !$.date)
                return;
            const {date: V} = $
              , {type: W} = t;
            if (W === "range") {
                if (!f.value) {
                    S([V]);
                    return
                }
                const [H,Q] = f.value;
                if (H && !Q) {
                    const G = _n(V, H);
                    if (G === 1) {
                        const re = D(F.value, H, V);
                        if (re) {
                            const te = vy(re);
                            _n(H, te) === -1 ? S([H, te]) : S([V])
                        } else
                            S([H, V], !0)
                    } else
                        G === -1 ? S([V]) : t.allowSameDay && S([V, V], !0)
                } else
                    S([V])
            } else if (W === "multiple") {
                if (!f.value) {
                    S([V]);
                    return
                }
                const H = f.value
                  , Q = H.findIndex(G => _n(G, V) === 0);
                if (Q !== -1) {
                    const [G] = H.splice(Q, 1);
                    e("unselect", Xc(G))
                } else
                    t.maxRange && H.length >= +t.maxRange ? my(t.rangePrompt || Jo("rangePrompt", t.maxRange)) : S([...H, V])
            } else
                S(V, !0)
        }
          , P = $ => e("clickOverlay", $)
          , N = $ => e("update:show", $)
          , j = ($, V) => {
            const W = V !== 0 || !t.showSubtitle;
            return O(YJ, st({
                ref: n.value ? h : y(V),
                date: $,
                currentDate: f.value,
                showMonthTitle: W,
                firstDayOfWeek: m.value,
                lazyRender: n.value ? !1 : t.lazyRender,
                maxDate: o.value,
                minDate: i.value
            }, $t(t, ["type", "color", "showMark", "formatter", "rowHeight", "showSubtitle", "allowSameDay"]), {
                onClick: R,
                onClickDisabledDate: H => e("clickDisabledDate", H)
            }), $t(r, ["top-info", "bottom-info", "month-title", "text"]))
        }
          , K = () => {
            if (r.footer)
                return r.footer();
            if (t.showConfirm) {
                const $ = r["confirm-text"]
                  , V = g.value
                  , W = V ? t.confirmDisabledText : t.confirmText;
                return O(Ax, {
                    round: !0,
                    block: !0,
                    type: "primary",
                    color: t.color,
                    class: Qt("confirm"),
                    disabled: V,
                    nativeType: "button",
                    onClick: w
                }, {
                    default: () => [$ ? $({
                        disabled: V
                    }) : W || Jo("confirm")]
                })
            }
        }
          , oe = () => O("div", {
            class: [Qt("footer"), {
                "van-safe-area-bottom": t.safeAreaInsetBottom
            }]
        }, [K()])
          , U = () => {
            var $, V;
            return O("div", {
                class: Qt()
            }, [O(KJ, {
                date: ($ = h.value) == null ? void 0 : $.date,
                maxDate: o.value,
                minDate: i.value,
                title: t.title,
                subtitle: (V = h.value) == null ? void 0 : V.getTitle(),
                showTitle: t.showTitle,
                showSubtitle: t.showSubtitle,
                switchMode: t.switchMode,
                firstDayOfWeek: m.value,
                onClickSubtitle: W => e("clickSubtitle", W),
                onPanelChange: A
            }, $t(r, ["title", "subtitle", "prev-month", "prev-year", "next-month", "next-year"])), O("div", {
                ref: u,
                class: Qt("body"),
                onScroll: n.value ? void 0 : v
            }, [n.value ? j(d.value, 0) : E.value.map(j)]), oe()])
        }
        ;
        return me( () => t.show, C),
        me( () => [t.type, t.minDate, t.maxDate, t.switchMode], () => B(a(f.value))),
        me( () => t.defaultDate, $ => {
            B($)
        }
        ),
        Kt({
            reset: B,
            scrollToDate: _,
            getSelectedDate: p
        }),
        yu(C),
        () => t.poppable ? O(Gl, {
            show: t.show,
            class: Qt("popup"),
            round: t.round,
            position: t.position,
            closeable: t.showTitle || t.showSubtitle,
            teleport: t.teleport,
            closeOnPopstate: t.closeOnPopstate,
            safeAreaInsetTop: t.safeAreaInsetTop,
            closeOnClickOverlay: t.closeOnClickOverlay,
            onClickOverlay: P,
            "onUpdate:show": N
        }, {
            default: U
        }) : U()
    }
});
const o4e = Oe(ZJ)
  , [JJ,Ql] = Se("image")
  , QJ = {
    src: String,
    alt: String,
    fit: String,
    position: String,
    round: Boolean,
    block: Boolean,
    width: Ae,
    height: Ae,
    radius: Ae,
    lazyLoad: Boolean,
    iconSize: Ae,
    showError: Ee,
    errorIcon: Ie("photo-fail"),
    iconPrefix: String,
    showLoading: Ee,
    loadingIcon: Ie("photo"),
    crossorigin: String,
    referrerpolicy: String,
    decoding: String
};
var eQ = be({
    name: JJ,
    props: QJ,
    emits: ["load", "error"],
    setup(t, {emit: e, slots: r}) {
        const n = ie(!1)
          , i = ie(!0)
          , o = ie()
          , {$Lazyload: s} = It().proxy
          , a = ae( () => {
            const m = {
                width: rt(t.width),
                height: rt(t.height)
            };
            return Lt(t.radius) && (m.overflow = "hidden",
            m.borderRadius = rt(t.radius)),
            m
        }
        );
        me( () => t.src, () => {
            n.value = !1,
            i.value = !0
        }
        );
        const l = m => {
            i.value && (i.value = !1,
            e("load", m))
        }
          , c = () => {
            const m = new Event("load");
            Object.defineProperty(m, "target", {
                value: o.value,
                enumerable: !0
            }),
            l(m)
        }
          , u = m => {
            n.value = !0,
            i.value = !1,
            e("error", m)
        }
          , f = (m, E, g) => g ? g() : O(rr, {
            name: m,
            size: t.iconSize,
            class: E,
            classPrefix: t.iconPrefix
        }, null)
          , d = () => {
            if (i.value && t.showLoading)
                return O("div", {
                    class: Ql("loading")
                }, [f(t.loadingIcon, Ql("loading-icon"), r.loading)]);
            if (n.value && t.showError)
                return O("div", {
                    class: Ql("error")
                }, [f(t.errorIcon, Ql("error-icon"), r.error)])
        }
          , h = () => {
            if (n.value || !t.src)
                return;
            const m = {
                alt: t.alt,
                class: Ql("img"),
                decoding: t.decoding,
                style: {
                    objectFit: t.fit,
                    objectPosition: t.position
                },
                crossorigin: t.crossorigin,
                referrerpolicy: t.referrerpolicy
            };
            return t.lazyLoad ? hi(O("img", st({
                ref: o
            }, m), null), [[oB("lazy"), t.src]]) : O("img", st({
                ref: o,
                src: t.src,
                onLoad: l,
                onError: u
            }, m), null)
        }
          , x = ({el: m}) => {
            const E = () => {
                m === o.value && i.value && c()
            }
            ;
            o.value ? E() : Xe(E)
        }
          , y = ({el: m}) => {
            m === o.value && !n.value && u()
        }
        ;
        return s && vo && (s.$on("loaded", x),
        s.$on("error", y),
        Zn( () => {
            s.$off("loaded", x),
            s.$off("error", y)
        }
        )),
        Ht( () => {
            Xe( () => {
                var m;
                (m = o.value) != null && m.complete && !t.lazyLoad && c()
            }
            )
        }
        ),
        () => {
            var m;
            return O("div", {
                class: Ql({
                    round: t.round,
                    block: t.block
                }),
                style: a.value
            }, [h(), d(), (m = r.default) == null ? void 0 : m.call(r)])
        }
    }
});
const q7 = Oe(eQ)
  , [tQ,Vd] = Se("circle");
let rQ = 0;
const T9 = t => Math.min(Math.max(+t, 0), 100);
function nQ(t, e) {
    const r = t ? 1 : 0;
    return `M ${e / 2} ${e / 2} m 0, -500 a 500, 500 0 1, ${r} 0, 1000 a 500, 500 0 1, ${r} 0, -1000`
}
const iQ = {
    text: String,
    size: Ae,
    fill: Ie("none"),
    rate: ze(100),
    speed: ze(0),
    color: [String, Object],
    clockwise: Ee,
    layerColor: String,
    currentRate: jp(0),
    strokeWidth: ze(40),
    strokeLinecap: String,
    startPosition: Ie("top")
};
var oQ = be({
    name: tQ,
    props: iQ,
    emits: ["update:currentRate"],
    setup(t, {emit: e, slots: r}) {
        const n = `van-circle-${rQ++}`
          , i = ae( () => +t.strokeWidth + 1e3)
          , o = ae( () => nQ(t.clockwise, i.value))
          , s = ae( () => {
            const d = {
                top: 0,
                right: 90,
                bottom: 180,
                left: 270
            }[t.startPosition];
            if (d)
                return {
                    transform: `rotate(${d}deg)`
                }
        }
        );
        me( () => t.rate, f => {
            let d;
            const h = Date.now()
              , x = t.currentRate
              , y = T9(f)
              , m = Math.abs((x - y) * 1e3 / +t.speed)
              , E = () => {
                const g = Date.now()
                  , v = Math.min((g - h) / m, 1) * (y - x) + x;
                e("update:currentRate", T9(parseFloat(v.toFixed(1)))),
                (y > x ? v < y : v > y) && (d = xn(E))
            }
            ;
            t.speed ? (d && qf(d),
            d = xn(E)) : e("update:currentRate", y)
        }
        , {
            immediate: !0
        });
        const a = () => {
            const {strokeWidth: d, currentRate: h, strokeLinecap: x} = t
              , y = 3140 * h / 100
              , m = yo(t.color) ? `url(#${n})` : t.color
              , E = {
                stroke: m,
                strokeWidth: `${+d + 1}px`,
                strokeLinecap: x,
                strokeDasharray: `${y}px 3140px`
            };
            return O("path", {
                d: o.value,
                style: E,
                class: Vd("hover"),
                stroke: m
            }, null)
        }
          , l = () => {
            const f = {
                fill: t.fill,
                stroke: t.layerColor,
                strokeWidth: `${t.strokeWidth}px`
            };
            return O("path", {
                class: Vd("layer"),
                style: f,
                d: o.value
            }, null)
        }
          , c = () => {
            const {color: f} = t;
            if (!yo(f))
                return;
            const d = Object.keys(f).sort( (h, x) => parseFloat(h) - parseFloat(x)).map( (h, x) => O("stop", {
                key: x,
                offset: h,
                "stop-color": f[h]
            }, null));
            return O("defs", null, [O("linearGradient", {
                id: n,
                x1: "100%",
                y1: "0%",
                x2: "0%",
                y2: "0%"
            }, [d])])
        }
          , u = () => {
            if (r.default)
                return r.default();
            if (t.text)
                return O("div", {
                    class: Vd("text")
                }, [t.text])
        }
        ;
        return () => O("div", {
            class: Vd(),
            style: $l(t.size)
        }, [O("svg", {
            viewBox: `0 0 ${i.value} ${i.value}`,
            style: s.value
        }, [c(), l(), a()]), u()])
    }
});
const s4e = Oe(oQ)
  , [Z7,sQ] = Se("row")
  , J7 = Symbol(Z7)
  , aQ = {
    tag: Ie("div"),
    wrap: Ee,
    align: String,
    gutter: {
        type: [String, Number, Array],
        default: 0
    },
    justify: String
};
var lQ = be({
    name: Z7,
    props: aQ,
    setup(t, {slots: e}) {
        const {children: r, linkChildren: n} = Hi(J7)
          , i = ae( () => {
            const a = [[]];
            let l = 0;
            return r.forEach( (c, u) => {
                l += Number(c.span),
                l > 24 ? (a.push([u]),
                l -= 24) : a[a.length - 1].push(u)
            }
            ),
            a
        }
        )
          , o = ae( () => {
            let a = 0;
            Array.isArray(t.gutter) ? a = Number(t.gutter[0]) || 0 : a = Number(t.gutter);
            const l = [];
            return a && i.value.forEach(c => {
                const u = a * (c.length - 1) / c.length;
                c.forEach( (f, d) => {
                    if (d === 0)
                        l.push({
                            right: u
                        });
                    else {
                        const h = a - l[f - 1].right
                          , x = u - h;
                        l.push({
                            left: h,
                            right: x
                        })
                    }
                }
                )
            }
            ),
            l
        }
        )
          , s = ae( () => {
            const {gutter: a} = t
              , l = [];
            if (Array.isArray(a) && a.length > 1) {
                const c = Number(a[1]) || 0;
                if (c <= 0)
                    return l;
                i.value.forEach( (u, f) => {
                    f !== i.value.length - 1 && u.forEach( () => {
                        l.push({
                            bottom: c
                        })
                    }
                    )
                }
                )
            }
            return l
        }
        );
        return n({
            spaces: o,
            verticalSpaces: s
        }),
        () => {
            const {tag: a, wrap: l, align: c, justify: u} = t;
            return O(a, {
                class: sQ({
                    [`align-${c}`]: c,
                    [`justify-${u}`]: u,
                    nowrap: !l
                })
            }, {
                default: () => {
                    var f;
                    return [(f = e.default) == null ? void 0 : f.call(e)]
                }
            })
        }
    }
});
const [cQ,uQ] = Se("col")
  , fQ = {
    tag: Ie("div"),
    span: ze(0),
    offset: Ae
};
var dQ = be({
    name: cQ,
    props: fQ,
    setup(t, {slots: e}) {
        const {parent: r, index: n} = Jn(J7)
          , i = ae( () => {
            if (!r)
                return;
            const {spaces: o, verticalSpaces: s} = r;
            let a = {};
            if (o && o.value && o.value[n.value]) {
                const {left: c, right: u} = o.value[n.value];
                a = {
                    paddingLeft: c ? `${c}px` : null,
                    paddingRight: u ? `${u}px` : null
                }
            }
            const {bottom: l} = s.value[n.value] || {};
            return We(a, {
                marginBottom: l ? `${l}px` : null
            })
        }
        );
        return () => {
            const {tag: o, span: s, offset: a} = t;
            return O(o, {
                style: i.value,
                class: uQ({
                    [s]: s,
                    [`offset-${a}`]: a
                })
            }, {
                default: () => {
                    var l;
                    return [(l = e.default) == null ? void 0 : l.call(e)]
                }
            })
        }
    }
});
const a4e = Oe(dQ)
  , [Q7,hQ] = Se("collapse")
  , eD = Symbol(Q7)
  , xQ = {
    border: Ee,
    accordion: Boolean,
    modelValue: {
        type: [String, Number, Array],
        default: ""
    }
};
function pQ(t, e) {
    return e && Array.isArray(t) ? (console.error('[Vant] Collapse: "v-model" should not be Array in accordion mode'),
    !1) : !e && !Array.isArray(t) ? (console.error('[Vant] Collapse: "v-model" should be Array in non-accordion mode'),
    !1) : !0
}
var gQ = be({
    name: Q7,
    props: xQ,
    emits: ["change", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const {linkChildren: n, children: i} = Hi(eD)
          , o = c => {
            e("change", c),
            e("update:modelValue", c)
        }
          , s = (c, u) => {
            const {accordion: f, modelValue: d} = t;
            o(f ? c === d ? "" : c : u ? d.concat(c) : d.filter(h => h !== c))
        }
          , a = (c={}) => {
            if (t.accordion)
                return;
            typeof c == "boolean" && (c = {
                expanded: c
            });
            const {expanded: u, skipDisabled: f} = c
              , h = i.filter(x => x.disabled && f ? x.expanded.value : u ?? !x.expanded.value).map(x => x.itemName.value);
            o(h)
        }
          , l = c => {
            const {accordion: u, modelValue: f} = t;
            return pQ(f, u) ? u ? f === c : f.includes(c) : !1
        }
        ;
        return Kt({
            toggleAll: a
        }),
        n({
            toggle: s,
            isExpanded: l
        }),
        () => {
            var c;
            return O("div", {
                class: [hQ(), {
                    [x7]: t.border
                }]
            }, [(c = r.default) == null ? void 0 : c.call(r)])
        }
    }
});
const l4e = Oe(gQ)
  , [mQ,zd] = Se("collapse-item")
  , vQ = ["icon", "title", "value", "label", "right-icon"]
  , yQ = We({}, Xp, {
    name: Ae,
    isLink: Ee,
    disabled: Boolean,
    readonly: Boolean,
    lazyRender: Ee
});
var EQ = be({
    name: mQ,
    props: yQ,
    setup(t, {slots: e}) {
        const r = ie()
          , n = ie()
          , {parent: i, index: o} = Jn(eD);
        if (!i) {
            console.error("[Vant] <CollapseItem> must be a child component of <Collapse>.");
            return
        }
        const s = ae( () => {
            var y;
            return (y = t.name) != null ? y : o.value
        }
        )
          , a = ae( () => i.isExpanded(s.value))
          , l = ie(a.value)
          , c = S2( () => l.value || !t.lazyRender)
          , u = () => {
            a.value ? r.value && (r.value.style.height = "") : l.value = !1
        }
        ;
        me(a, (y, m) => {
            if (m === null)
                return;
            y && (l.value = !0),
            (y ? Xe : xn)( () => {
                if (!n.value || !r.value)
                    return;
                const {offsetHeight: g} = n.value;
                if (g) {
                    const p = `${g}px`;
                    r.value.style.height = y ? "0" : p,
                    ja( () => {
                        r.value && (r.value.style.height = y ? p : "0")
                    }
                    )
                } else
                    u()
            }
            )
        }
        );
        const f = (y=!a.value) => {
            i.toggle(s.value, y)
        }
          , d = () => {
            !t.disabled && !t.readonly && f()
        }
          , h = () => {
            const {border: y, disabled: m, readonly: E} = t
              , g = $t(t, Object.keys(Xp));
            return E && (g.isLink = !1),
            (m || E) && (g.clickable = !1),
            O(U7, st({
                role: "button",
                class: zd("title", {
                    disabled: m,
                    expanded: a.value,
                    borderless: !y
                }),
                "aria-expanded": String(a.value),
                onClick: d
            }, g), $t(e, vQ))
        }
          , x = c( () => {
            var y;
            return hi(O("div", {
                ref: r,
                class: zd("wrapper"),
                onTransitionend: u
            }, [O("div", {
                ref: n,
                class: zd("content")
            }, [(y = e.default) == null ? void 0 : y.call(e)])]), [[pi, l.value]])
        }
        );
        return Kt({
            toggle: f,
            expanded: a,
            itemName: s
        }),
        () => O("div", {
            class: [zd({
                border: o.value && t.border
            })]
        }, [h(), x()])
    }
});
const c4e = Oe(EQ);
function _Q(t, e) {
    const {days: r} = e;
    let {hours: n, minutes: i, seconds: o, milliseconds: s} = e;
    if (t.includes("DD") ? t = t.replace("DD", Ha(r)) : n += r * 24,
    t.includes("HH") ? t = t.replace("HH", Ha(n)) : i += n * 60,
    t.includes("mm") ? t = t.replace("mm", Ha(i)) : o += i * 60,
    t.includes("ss") ? t = t.replace("ss", Ha(o)) : s += o * 1e3,
    t.includes("S")) {
        const a = Ha(s, 3);
        t.includes("SSS") ? t = t.replace("SSS", a) : t.includes("SS") ? t = t.replace("SS", a.slice(0, 2)) : t = t.replace("S", a.charAt(0))
    }
    return t
}
const [bQ,CQ] = Se("count-down")
  , AQ = {
    time: ze(0),
    format: Ie("HH:mm:ss"),
    autoStart: Ee,
    millisecond: Boolean
};
var wQ = be({
    name: bQ,
    props: AQ,
    emits: ["change", "finish"],
    setup(t, {emit: e, slots: r}) {
        const {start: n, pause: i, reset: o, current: s} = wS({
            time: +t.time,
            millisecond: t.millisecond,
            onChange: c => e("change", c),
            onFinish: () => e("finish")
        })
          , a = ae( () => _Q(t.format, s.value))
          , l = () => {
            o(+t.time),
            t.autoStart && n()
        }
        ;
        return me( () => t.time, l, {
            immediate: !0
        }),
        Kt({
            start: n,
            pause: i,
            reset: l
        }),
        () => O("div", {
            role: "timer",
            class: CQ()
        }, [r.default ? r.default(s.value) : a.value])
    }
});
const u4e = Oe(wQ)
  , D9 = new Date().getFullYear()
  , [BQ] = Se("date-picker")
  , SQ = We({}, $J, {
    columnsType: {
        type: Array,
        default: () => ["year", "month", "day"]
    },
    minDate: {
        type: Date,
        default: () => new Date(D9 - 10,0,1),
        validator: lf
    },
    maxDate: {
        type: Date,
        default: () => new Date(D9 + 10,11,31),
        validator: lf
    }
});
var TQ = be({
    name: BQ,
    props: SQ,
    emits: ["confirm", "cancel", "change", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const n = ie(t.modelValue)
          , i = ie(!1)
          , o = ie()
          , s = ae( () => i.value ? t.modelValue : n.value)
          , a = _ => _ === t.minDate.getFullYear()
          , l = _ => _ === t.maxDate.getFullYear()
          , c = _ => _ === t.minDate.getMonth() + 1
          , u = _ => _ === t.maxDate.getMonth() + 1
          , f = _ => {
            const {minDate: b, columnsType: C} = t
              , B = C.indexOf(_)
              , T = s.value[B];
            if (T)
                return +T;
            switch (_) {
            case "year":
                return b.getFullYear();
            case "month":
                return b.getMonth() + 1;
            case "day":
                return b.getDate()
            }
        }
          , d = () => {
            const _ = t.minDate.getFullYear()
              , b = t.maxDate.getFullYear();
            return cg(_, b, "year", t.formatter, t.filter, s.value)
        }
          , h = () => {
            const _ = f("year")
              , b = a(_) ? t.minDate.getMonth() + 1 : 1
              , C = l(_) ? t.maxDate.getMonth() + 1 : 12;
            return cg(b, C, "month", t.formatter, t.filter, s.value)
        }
          , x = () => {
            const _ = f("year")
              , b = f("month")
              , C = a(_) && c(b) ? t.minDate.getDate() : 1
              , B = l(_) && u(b) ? t.maxDate.getDate() : K7(_, b);
            return cg(C, B, "day", t.formatter, t.filter, s.value)
        }
          , y = () => {
            var _;
            return (_ = o.value) == null ? void 0 : _.confirm()
        }
          , m = () => n.value
          , E = ae( () => t.columnsType.map(_ => {
            switch (_) {
            case "year":
                return d();
            case "month":
                return h();
            case "day":
                return x();
            default:
                throw new Error(`[Vant] DatePicker: unsupported columns type: ${_}`)
            }
        }
        ));
        me(n, _ => {
            Js(_, t.modelValue) || e("update:modelValue", _)
        }
        ),
        me( () => t.modelValue, (_, b) => {
            i.value = Js(b, n.value),
            _ = HJ(_, E.value),
            Js(_, n.value) || (n.value = _),
            i.value = !1
        }
        , {
            immediate: !0
        });
        const g = (..._) => e("change", ..._)
          , p = (..._) => e("cancel", ..._)
          , v = (..._) => e("confirm", ..._);
        return Kt({
            confirm: y,
            getSelectedDate: m
        }),
        () => O(XZ, st({
            ref: o,
            modelValue: n.value,
            "onUpdate:modelValue": _ => n.value = _,
            columns: E.value,
            onChange: g,
            onCancel: p,
            onConfirm: v
        }, $t(t, UJ)), r)
    }
});
const f4e = Oe(TQ)
  , [DQ,_i,jd] = Se("dialog")
  , FQ = We({}, ed, {
    title: String,
    theme: String,
    width: Ae,
    message: [String, Function],
    callback: Function,
    allowHtml: Boolean,
    className: hr,
    transition: Ie("van-dialog-bounce"),
    messageAlign: String,
    closeOnPopstate: Ee,
    showCancelButton: Boolean,
    cancelButtonText: String,
    cancelButtonColor: String,
    cancelButtonDisabled: Boolean,
    confirmButtonText: String,
    confirmButtonColor: String,
    confirmButtonDisabled: Boolean,
    showConfirmButton: Ee,
    closeOnClickOverlay: Boolean,
    keyboardEnabled: Ee,
    destroyOnClose: Boolean
})
  , PQ = [...b7, "transition", "closeOnPopstate", "destroyOnClose"];
var tD = be({
    name: DQ,
    props: FQ,
    emits: ["confirm", "cancel", "keydown", "update:show"],
    setup(t, {emit: e, slots: r}) {
        const n = ie()
          , i = Pt({
            confirm: !1,
            cancel: !1
        })
          , o = E => e("update:show", E)
          , s = E => {
            var g;
            o(!1),
            (g = t.callback) == null || g.call(t, E)
        }
          , a = E => () => {
            t.show && (e(E),
            t.beforeClose ? (i[E] = !0,
            Eu(t.beforeClose, {
                args: [E],
                done() {
                    s(E),
                    i[E] = !1
                },
                canceled() {
                    i[E] = !1
                }
            })) : s(E))
        }
          , l = a("cancel")
          , c = a("confirm")
          , u = ZB(E => {
            var g, p;
            if (!t.keyboardEnabled || E.target !== ((p = (g = n.value) == null ? void 0 : g.popupRef) == null ? void 0 : p.value))
                return;
            ({
                Enter: t.showConfirmButton ? c : fy,
                Escape: t.showCancelButton ? l : fy
            })[E.key](),
            e("keydown", E)
        }
        , ["enter", "esc"])
          , f = () => {
            const E = r.title ? r.title() : t.title;
            if (E)
                return O("div", {
                    class: _i("header", {
                        isolated: !t.message && !r.default
                    })
                }, [E])
        }
          , d = E => {
            const {message: g, allowHtml: p, messageAlign: v} = t
              , _ = _i("message", {
                "has-title": E,
                [v]: v
            })
              , b = Wc(g) ? g() : g;
            return p && typeof b == "string" ? O("div", {
                class: _,
                innerHTML: b
            }, null) : O("div", {
                class: _
            }, [b])
        }
          , h = () => {
            if (r.default)
                return O("div", {
                    class: _i("content")
                }, [r.default()]);
            const {title: E, message: g, allowHtml: p} = t;
            if (g) {
                const v = !!(E || r.title);
                return O("div", {
                    key: p ? 1 : 0,
                    class: _i("content", {
                        isolated: !v
                    })
                }, [d(v)])
            }
        }
          , x = () => O("div", {
            class: [h7, _i("footer")]
        }, [t.showCancelButton && O(Ax, {
            size: "large",
            text: t.cancelButtonText || jd("cancel"),
            class: _i("cancel"),
            style: {
                color: t.cancelButtonColor
            },
            loading: i.cancel,
            disabled: t.cancelButtonDisabled,
            onClick: l
        }, null), t.showConfirmButton && O(Ax, {
            size: "large",
            text: t.confirmButtonText || jd("confirm"),
            class: [_i("confirm"), {
                [lq]: t.showCancelButton
            }],
            style: {
                color: t.confirmButtonColor
            },
            loading: i.confirm,
            disabled: t.confirmButtonDisabled,
            onClick: c
        }, null)])
          , y = () => O(pq, {
            class: _i("footer")
        }, {
            default: () => [t.showCancelButton && O(d9, {
                type: "warning",
                text: t.cancelButtonText || jd("cancel"),
                class: _i("cancel"),
                color: t.cancelButtonColor,
                loading: i.cancel,
                disabled: t.cancelButtonDisabled,
                onClick: l
            }, null), t.showConfirmButton && O(d9, {
                type: "danger",
                text: t.confirmButtonText || jd("confirm"),
                class: _i("confirm"),
                color: t.confirmButtonColor,
                loading: i.confirm,
                disabled: t.confirmButtonDisabled,
                onClick: c
            }, null)]
        })
          , m = () => r.footer ? r.footer() : t.theme === "round-button" ? y() : x();
        return () => {
            const {width: E, title: g, theme: p, message: v, className: _} = t;
            return O(Gl, st({
                ref: n,
                role: "dialog",
                class: [_i([p]), _],
                style: {
                    width: rt(E)
                },
                tabindex: 0,
                "aria-labelledby": g || v,
                onKeydown: u,
                "onUpdate:show": o
            }, $t(t, PQ)), {
                default: () => [f(), h(), m()]
            })
        }
    }
});
let Ey;
const IQ = {
    title: "",
    width: "",
    theme: null,
    message: "",
    overlay: !0,
    callback: null,
    teleport: "body",
    className: "",
    allowHtml: !1,
    lockScroll: !0,
    transition: void 0,
    beforeClose: null,
    overlayClass: "",
    overlayStyle: void 0,
    messageAlign: "",
    cancelButtonText: "",
    cancelButtonColor: null,
    cancelButtonDisabled: !1,
    confirmButtonText: "",
    confirmButtonColor: null,
    confirmButtonDisabled: !1,
    showConfirmButton: !0,
    showCancelButton: !1,
    closeOnPopstate: !0,
    closeOnClickOverlay: !1,
    destroyOnClose: !1
};
let OQ = We({}, IQ);
function kQ() {
    ({instance: Ey} = qp({
        setup() {
            const {state: e, toggle: r} = Kp();
            return () => O(tD, st(e, {
                "onUpdate:show": r
            }), null)
        }
    }))
}
function RQ(t) {
    return vo ? new Promise( (e, r) => {
        Ey || kQ(),
        Ey.open(We({}, OQ, t, {
            callback: n => {
                (n === "confirm" ? e : r)(n)
            }
        }))
    }
    ) : Promise.resolve(void 0)
}
const d4e = t => RQ(We({
    showCancelButton: !0
}, t))
  , h4e = Oe(tD)
  , [MQ,NQ] = Se("divider")
  , LQ = {
    dashed: Boolean,
    hairline: Ee,
    vertical: Boolean,
    contentPosition: Ie("center")
};
var $Q = be({
    name: MQ,
    props: LQ,
    setup(t, {slots: e}) {
        return () => {
            var r;
            return O("div", {
                role: "separator",
                class: NQ({
                    dashed: t.dashed,
                    hairline: t.hairline,
                    vertical: t.vertical,
                    [`content-${t.contentPosition}`]: !!e.default && !t.vertical
                })
            }, [!t.vertical && ((r = e.default) == null ? void 0 : r.call(e))])
        }
    }
});
const x4e = Oe($Q)
  , UQ = {
    gap: {
        type: [Number, Object],
        default: 24
    },
    icon: String,
    axis: Ie("y"),
    magnetic: String,
    offset: Object,
    teleport: {
        type: [String, Object],
        default: "body"
    }
}
  , [GQ,F9] = Se("floating-bubble");
var HQ = be({
    name: GQ,
    inheritAttrs: !1,
    props: UQ,
    emits: ["click", "update:offset", "offsetChange"],
    setup(t, {slots: e, emit: r, attrs: n}) {
        const i = ie()
          , o = ie({
            x: 0,
            y: 0,
            width: 0,
            height: 0
        })
          , s = ae( () => yo(t.gap) ? t.gap.x : t.gap)
          , a = ae( () => yo(t.gap) ? t.gap.y : t.gap)
          , l = ae( () => ({
            top: a.value,
            right: Zo.value - o.value.width - s.value,
            bottom: Qs.value - o.value.height - a.value,
            left: s.value
        }))
          , c = ie(!1);
        let u = !1;
        const f = ae( () => {
            const _ = {}
              , b = rt(o.value.x)
              , C = rt(o.value.y);
            return _.transform = `translate3d(${b}, ${C}, 0)`,
            (c.value || !u) && (_.transition = "none"),
            _
        }
        )
          , d = () => {
            if (!v.value)
                return;
            const {width: _, height: b} = Cr(i.value)
              , {offset: C} = t;
            o.value = {
                x: C ? C.x : Zo.value - _ - s.value,
                y: C ? C.y : Qs.value - b - a.value,
                width: _,
                height: b
            }
        }
          , h = Ul();
        let x = 0
          , y = 0;
        const m = _ => {
            h.start(_),
            c.value = !0,
            x = o.value.x,
            y = o.value.y
        }
        ;
        mn("touchmove", _ => {
            if (_.preventDefault(),
            h.move(_),
            t.axis !== "lock" && !h.isTap.value) {
                if (t.axis === "x" || t.axis === "xy") {
                    let C = x + h.deltaX.value;
                    C < l.value.left && (C = l.value.left),
                    C > l.value.right && (C = l.value.right),
                    o.value.x = C
                }
                if (t.axis === "y" || t.axis === "xy") {
                    let C = y + h.deltaY.value;
                    C < l.value.top && (C = l.value.top),
                    C > l.value.bottom && (C = l.value.bottom),
                    o.value.y = C
                }
                const b = $t(o.value, ["x", "y"]);
                r("update:offset", b)
            }
        }
        , {
            target: i
        });
        const g = () => {
            c.value = !1,
            Xe( () => {
                if (t.magnetic === "x") {
                    const _ = l9([l.value.left, l.value.right], o.value.x);
                    o.value.x = _
                }
                if (t.magnetic === "y") {
                    const _ = l9([l.value.top, l.value.bottom], o.value.y);
                    o.value.y = _
                }
                if (!h.isTap.value) {
                    const _ = $t(o.value, ["x", "y"]);
                    r("update:offset", _),
                    (x !== _.x || y !== _.y) && r("offsetChange", _)
                }
            }
            )
        }
          , p = _ => {
            h.isTap.value ? r("click", _) : _.stopPropagation()
        }
        ;
        Ht( () => {
            d(),
            Xe( () => {
                u = !0
            }
            )
        }
        ),
        me([Zo, Qs, s, a, () => t.offset], d, {
            deep: !0
        });
        const v = ie(!0);
        return gs( () => {
            v.value = !0
        }
        ),
        wo( () => {
            t.teleport && (v.value = !1)
        }
        ),
        () => {
            const _ = hi(O("div", st({
                class: F9(),
                ref: i,
                onTouchstartPassive: m,
                onTouchend: g,
                onTouchcancel: g,
                onClickCapture: p,
                style: f.value
            }, n), [e.default ? e.default() : O(Sq, {
                name: t.icon,
                class: F9("icon")
            }, null)]), [[pi, v.value]]);
            return t.teleport ? O(Bp, {
                to: t.teleport
            }, {
                default: () => [_]
            }) : _
        }
    }
});
const p4e = Oe(HQ)
  , [rD,VQ] = Se("grid")
  , zQ = {
    square: Boolean,
    center: Ee,
    border: Ee,
    gutter: Ae,
    reverse: Boolean,
    iconSize: Ae,
    direction: String,
    clickable: Boolean,
    columnNum: ze(4)
}
  , nD = Symbol(rD);
var jQ = be({
    name: rD,
    props: zQ,
    setup(t, {slots: e}) {
        const {linkChildren: r} = Hi(nD);
        return r({
            props: t
        }),
        () => {
            var n;
            return O("div", {
                style: {
                    paddingLeft: rt(t.gutter)
                },
                class: [VQ(), {
                    [h7]: t.border && !t.gutter
                }]
            }, [(n = e.default) == null ? void 0 : n.call(e)])
        }
    }
});
const g4e = Oe(jQ)
  , [WQ,Wd] = Se("grid-item")
  , YQ = We({}, _u, {
    dot: Boolean,
    text: String,
    icon: String,
    badge: Ae,
    iconColor: String,
    iconPrefix: String,
    badgeProps: Object
});
var XQ = be({
    name: WQ,
    props: YQ,
    setup(t, {slots: e}) {
        const {parent: r, index: n} = Jn(nD)
          , i = Qf();
        if (!r) {
            console.error("[Vant] <GridItem> must be a child component of <Grid>.");
            return
        }
        const o = ae( () => {
            const {square: u, gutter: f, columnNum: d} = r.props
              , h = `${100 / +d}%`
              , x = {
                flexBasis: h
            };
            if (u)
                x.paddingTop = h;
            else if (f) {
                const y = rt(f);
                x.paddingRight = y,
                n.value >= +d && (x.marginTop = y)
            }
            return x
        }
        )
          , s = ae( () => {
            const {square: u, gutter: f} = r.props;
            if (u && f) {
                const d = rt(f);
                return {
                    right: d,
                    bottom: d,
                    height: "auto"
                }
            }
        }
        )
          , a = () => {
            if (e.icon)
                return O(Wp, st({
                    dot: t.dot,
                    content: t.badge
                }, t.badgeProps), {
                    default: e.icon
                });
            if (t.icon)
                return O(rr, {
                    dot: t.dot,
                    name: t.icon,
                    size: r.props.iconSize,
                    badge: t.badge,
                    class: Wd("icon"),
                    color: t.iconColor,
                    badgeProps: t.badgeProps,
                    classPrefix: t.iconPrefix
                }, null)
        }
          , l = () => {
            if (e.text)
                return e.text();
            if (t.text)
                return O("span", {
                    class: Wd("text")
                }, [t.text])
        }
          , c = () => e.default ? e.default() : [a(), l()];
        return () => {
            const {center: u, border: f, square: d, gutter: h, reverse: x, direction: y, clickable: m} = r.props
              , E = [Wd("content", [y, {
                center: u,
                square: d,
                reverse: x,
                clickable: m,
                surround: f && h
            }]), {
                [pa]: f
            }];
            return O("div", {
                class: [Wd({
                    square: d
                })],
                style: o.value
            }, [O("div", {
                role: m ? "button" : void 0,
                class: E,
                style: s.value,
                tabindex: m ? 0 : void 0,
                onClick: i
            }, [c()])])
        }
    }
});
const m4e = Oe(XQ)
  , P9 = t => Math.sqrt((t[0].clientX - t[1].clientX) ** 2 + (t[0].clientY - t[1].clientY) ** 2)
  , KQ = t => ({
    x: (t[0].clientX + t[1].clientX) / 2,
    y: (t[0].clientY + t[1].clientY) / 2
})
  , ug = Se("image-preview")[1]
  , I9 = 2.6
  , qQ = {
    src: String,
    show: Boolean,
    active: Number,
    minZoom: fn(Ae),
    maxZoom: fn(Ae),
    rootWidth: fn(Number),
    rootHeight: fn(Number),
    disableZoom: Boolean,
    doubleScale: Boolean,
    closeOnClickImage: Boolean,
    closeOnClickOverlay: Boolean,
    vertical: Boolean
};
var ZQ = be({
    props: qQ,
    emits: ["scale", "close", "longPress"],
    setup(t, {emit: e, slots: r}) {
        const n = Pt({
            scale: 1,
            moveX: 0,
            moveY: 0,
            moving: !1,
            zooming: !1,
            initializing: !1,
            imageRatio: 0
        })
          , i = Ul()
          , o = ie()
          , s = ie()
          , a = ie(!1)
          , l = ie(!1);
        let c = 0;
        const u = ae( () => {
            const {scale: P, moveX: N, moveY: j, moving: K, zooming: oe, initializing: U} = n
              , $ = {
                transitionDuration: oe || K || U ? "0s" : ".3s"
            };
            return (P !== 1 || l.value) && ($.transform = `matrix(${P}, 0, 0, ${P}, ${N}, ${j})`),
            $
        }
        )
          , f = ae( () => {
            if (n.imageRatio) {
                const {rootWidth: P, rootHeight: N} = t
                  , j = a.value ? N / n.imageRatio : P;
                return Math.max(0, (n.scale * j - P) / 2)
            }
            return 0
        }
        )
          , d = ae( () => {
            if (n.imageRatio) {
                const {rootWidth: P, rootHeight: N} = t
                  , j = a.value ? N : P * n.imageRatio;
                return Math.max(0, (n.scale * j - N) / 2)
            }
            return 0
        }
        )
          , h = (P, N) => {
            var j;
            if (P = Ur(P, +t.minZoom, +t.maxZoom + 1),
            P !== n.scale) {
                const K = P / n.scale;
                if (n.scale = P,
                N) {
                    const oe = Cr((j = o.value) == null ? void 0 : j.$el)
                      , U = {
                        x: oe.width * .5,
                        y: oe.height * .5
                    }
                      , $ = n.moveX - (N.x - oe.left - U.x) * (K - 1)
                      , V = n.moveY - (N.y - oe.top - U.y) * (K - 1);
                    n.moveX = Ur($, -f.value, f.value),
                    n.moveY = Ur(V, -d.value, d.value)
                } else
                    n.moveX = 0,
                    n.moveY = l.value ? c : 0;
                e("scale", {
                    scale: P,
                    index: t.active
                })
            }
        }
          , x = () => {
            h(1)
        }
          , y = () => {
            const P = n.scale > 1 ? 1 : 2;
            h(P, P === 2 || l.value ? {
                x: i.startX.value,
                y: i.startY.value
            } : void 0)
        }
        ;
        let m, E, g, p, v, _, b, C, B = !1;
        const T = P => {
            const {touches: N} = P;
            if (m = N.length,
            m === 2 && t.disableZoom)
                return;
            const {offsetX: j} = i;
            i.start(P),
            E = n.moveX,
            g = n.moveY,
            C = Date.now(),
            B = !1,
            n.moving = m === 1 && (n.scale !== 1 || l.value),
            n.zooming = m === 2 && !j.value,
            n.zooming && (p = n.scale,
            v = P9(N))
        }
          , A = P => {
            const {touches: N} = P;
            if (i.move(P),
            n.moving) {
                const {deltaX: j, deltaY: K} = i
                  , oe = j.value + E
                  , U = K.value + g;
                if ((t.vertical ? i.isVertical() && Math.abs(U) > d.value : i.isHorizontal() && Math.abs(oe) > f.value) && !B) {
                    n.moving = !1;
                    return
                }
                B = !0,
                Rr(P, !0),
                n.moveX = Ur(oe, -f.value, f.value),
                n.moveY = Ur(U, -d.value, d.value)
            }
            if (n.zooming && (Rr(P, !0),
            N.length === 2)) {
                const j = P9(N)
                  , K = p * j / v;
                _ = KQ(N),
                h(K, _)
            }
        }
          , w = P => {
            var N;
            const j = (N = s.value) == null ? void 0 : N.$el;
            if (!j)
                return;
            const K = j.firstElementChild
              , oe = P.target === j
              , U = K == null ? void 0 : K.contains(P.target);
            !t.closeOnClickImage && U || !t.closeOnClickOverlay && oe || e("close")
        }
          , S = P => {
            if (m > 1)
                return;
            const N = Date.now() - C
              , j = 250;
            i.isTap.value && (N < j ? t.doubleScale ? b ? (clearTimeout(b),
            b = null,
            y()) : b = setTimeout( () => {
                w(P),
                b = null
            }
            , j) : w(P) : N > g7 && e("longPress"))
        }
          , D = P => {
            let N = !1;
            if ((n.moving || n.zooming) && (N = !0,
            n.moving && E === n.moveX && g === n.moveY && (N = !1),
            !P.touches.length)) {
                n.zooming && (n.moveX = Ur(n.moveX, -f.value, f.value),
                n.moveY = Ur(n.moveY, -d.value, d.value),
                n.zooming = !1),
                n.moving = !1,
                E = 0,
                g = 0,
                p = 1,
                n.scale < 1 && x();
                const j = +t.maxZoom;
                n.scale > j && h(j, _)
            }
            Rr(P, N),
            S(P),
            i.reset()
        }
          , F = () => {
            const {rootWidth: P, rootHeight: N} = t
              , j = N / P
              , {imageRatio: K} = n;
            a.value = n.imageRatio > j && K < I9,
            l.value = n.imageRatio > j && K >= I9,
            l.value && (c = (K * P - N) / 2,
            n.moveY = c,
            n.initializing = !0,
            xn( () => {
                n.initializing = !1
            }
            )),
            x()
        }
          , R = P => {
            const {naturalWidth: N, naturalHeight: j} = P.target;
            n.imageRatio = j / N,
            F()
        }
        ;
        return me( () => t.active, x),
        me( () => t.show, P => {
            P || x()
        }
        ),
        me( () => [t.rootWidth, t.rootHeight], F),
        mn("touchmove", A, {
            target: ae( () => {
                var P;
                return (P = s.value) == null ? void 0 : P.$el
            }
            )
        }),
        Kt({
            resetScale: x
        }),
        () => {
            const P = {
                loading: () => O(ys, {
                    type: "spinner"
                }, null)
            };
            return O($7, {
                ref: s,
                class: ug("swipe-item"),
                onTouchstartPassive: T,
                onTouchend: D,
                onTouchcancel: D
            }, {
                default: () => [r.image ? O("div", {
                    class: ug("image-wrap")
                }, [r.image({
                    src: t.src,
                    onLoad: R,
                    style: u.value
                })]) : O(q7, {
                    ref: o,
                    src: t.src,
                    fit: "contain",
                    class: ug("image", {
                        vertical: a.value
                    }),
                    style: u.value,
                    onLoad: R
                }, P)]
            })
        }
    }
});
const [JQ,ec] = Se("image-preview")
  , QQ = ["show", "teleport", "transition", "overlayStyle", "closeOnPopstate"]
  , eee = {
    show: Boolean,
    loop: Ee,
    images: ls(),
    minZoom: ze(1 / 3),
    maxZoom: ze(3),
    overlay: Ee,
    vertical: Boolean,
    closeable: Boolean,
    showIndex: Ee,
    className: hr,
    closeIcon: Ie("clear"),
    transition: String,
    beforeClose: Function,
    doubleScale: Ee,
    overlayClass: hr,
    overlayStyle: Object,
    swipeDuration: ze(300),
    startPosition: ze(0),
    showIndicators: Boolean,
    closeOnPopstate: Ee,
    closeOnClickImage: Ee,
    closeOnClickOverlay: Ee,
    closeIconPosition: Ie("top-right"),
    teleport: [String, Object]
};
var iD = be({
    name: JQ,
    props: eee,
    emits: ["scale", "close", "closed", "change", "longPress", "update:show"],
    setup(t, {emit: e, slots: r}) {
        const n = ie()
          , i = ie()
          , o = Pt({
            active: 0,
            rootWidth: 0,
            rootHeight: 0,
            disableZoom: !1
        })
          , s = () => {
            if (n.value) {
                const p = Cr(n.value.$el);
                o.rootWidth = p.width,
                o.rootHeight = p.height,
                n.value.resize()
            }
        }
          , a = p => e("scale", p)
          , l = p => e("update:show", p)
          , c = () => {
            Eu(t.beforeClose, {
                args: [o.active],
                done: () => l(!1)
            })
        }
          , u = p => {
            p !== o.active && (o.active = p,
            e("change", p))
        }
          , f = () => {
            if (t.showIndex)
                return O("div", {
                    class: ec("index")
                }, [r.index ? r.index({
                    index: o.active
                }) : `${o.active + 1} / ${t.images.length}`])
        }
          , d = () => {
            if (r.cover)
                return O("div", {
                    class: ec("cover")
                }, [r.cover()])
        }
          , h = () => {
            o.disableZoom = !0
        }
          , x = () => {
            o.disableZoom = !1
        }
          , y = () => O(k7, {
            ref: n,
            lazyRender: !0,
            loop: t.loop,
            class: ec("swipe"),
            vertical: t.vertical,
            duration: t.swipeDuration,
            initialSwipe: t.startPosition,
            showIndicators: t.showIndicators,
            indicatorColor: "white",
            onChange: u,
            onDragEnd: x,
            onDragStart: h
        }, {
            default: () => [t.images.map( (p, v) => O(ZQ, {
                ref: _ => {
                    v === o.active && (i.value = _)
                }
                ,
                src: p,
                show: t.show,
                active: o.active,
                maxZoom: t.maxZoom,
                minZoom: t.minZoom,
                rootWidth: o.rootWidth,
                rootHeight: o.rootHeight,
                disableZoom: o.disableZoom,
                doubleScale: t.doubleScale,
                closeOnClickImage: t.closeOnClickImage,
                closeOnClickOverlay: t.closeOnClickOverlay,
                vertical: t.vertical,
                onScale: a,
                onClose: c,
                onLongPress: () => e("longPress", {
                    index: v
                })
            }, {
                image: r.image
            }))]
        })
          , m = () => {
            if (t.closeable)
                return O(rr, {
                    role: "button",
                    name: t.closeIcon,
                    class: [ec("close-icon", t.closeIconPosition), cs],
                    onClick: c
                }, null)
        }
          , E = () => e("closed")
          , g = (p, v) => {
            var _;
            return (_ = n.value) == null ? void 0 : _.swipeTo(p, v)
        }
        ;
        return Kt({
            resetScale: () => {
                var p;
                (p = i.value) == null || p.resetScale()
            }
            ,
            swipeTo: g
        }),
        Ht(s),
        me([Zo, Qs], s),
        me( () => t.startPosition, p => u(+p)),
        me( () => t.show, p => {
            const {images: v, startPosition: _} = t;
            p ? (u(+_),
            Xe( () => {
                s(),
                g(+_, {
                    immediate: !0
                })
            }
            )) : e("close", {
                index: o.active,
                url: v[o.active]
            })
        }
        ),
        () => O(Gl, st({
            class: [ec(), t.className],
            overlayClass: [ec("overlay"), t.overlayClass],
            onClosed: E,
            "onUpdate:show": l
        }, $t(t, QQ)), {
            default: () => [m(), y(), f(), d()]
        })
    }
});
let Hh;
const tee = {
    loop: !0,
    images: [],
    maxZoom: 3,
    minZoom: 1 / 3,
    onScale: void 0,
    onClose: void 0,
    onChange: void 0,
    vertical: !1,
    teleport: "body",
    className: "",
    showIndex: !0,
    closeable: !1,
    closeIcon: "clear",
    transition: void 0,
    beforeClose: void 0,
    doubleScale: !0,
    overlayStyle: void 0,
    overlayClass: void 0,
    startPosition: 0,
    swipeDuration: 300,
    showIndicators: !1,
    closeOnPopstate: !0,
    closeOnClickOverlay: !0,
    closeIconPosition: "top-right"
};
function ree() {
    ({instance: Hh} = qp({
        setup() {
            const {state: t, toggle: e} = Kp()
              , r = () => {
                t.images = []
            }
            ;
            return () => O(iD, st(t, {
                onClosed: r,
                "onUpdate:show": e
            }), null)
        }
    }))
}
const nee = (t, e=0) => {
    if (vo)
        return Hh || ree(),
        t = Array.isArray(t) ? {
            images: t,
            startPosition: e
        } : t,
        Hh.open(We({}, tee, t)),
        Hh
}
;
Oe(iD);
const [iee,tc,oee] = Se("list")
  , see = {
    error: Boolean,
    offset: ze(300),
    loading: Boolean,
    disabled: Boolean,
    finished: Boolean,
    scroller: Object,
    errorText: String,
    direction: Ie("down"),
    loadingText: String,
    finishedText: String,
    immediateCheck: Ee
};
var aee = be({
    name: iee,
    props: see,
    emits: ["load", "update:error", "update:loading"],
    setup(t, {emit: e, slots: r}) {
        const n = ie(t.loading)
          , i = ie()
          , o = ie()
          , s = L7()
          , a = Zf(i)
          , l = ae( () => t.scroller || a.value)
          , c = () => {
            Xe( () => {
                if (n.value || t.finished || t.disabled || t.error || (s == null ? void 0 : s.value) === !1)
                    return;
                const {direction: x} = t
                  , y = +t.offset
                  , m = Cr(l);
                if (!m.height || Yc(i))
                    return;
                let E = !1;
                const g = Cr(o);
                x === "up" ? E = m.top - g.top <= y : E = g.bottom - m.bottom <= y,
                E && (n.value = !0,
                e("update:loading", !0),
                e("load"))
            }
            )
        }
          , u = () => {
            if (t.finished) {
                const x = r.finished ? r.finished() : t.finishedText;
                if (x)
                    return O("div", {
                        class: tc("finished-text")
                    }, [x])
            }
        }
          , f = () => {
            e("update:error", !1),
            c()
        }
          , d = () => {
            if (t.error) {
                const x = r.error ? r.error() : t.errorText;
                if (x)
                    return O("div", {
                        role: "button",
                        class: tc("error-text"),
                        tabindex: 0,
                        onClick: f
                    }, [x])
            }
        }
          , h = () => {
            if (n.value && !t.finished && !t.disabled)
                return O("div", {
                    class: tc("loading")
                }, [r.loading ? r.loading() : O(ys, {
                    class: tc("loading-icon")
                }, {
                    default: () => [t.loadingText || oee("loading")]
                })])
        }
        ;
        return me( () => [t.loading, t.finished, t.error], c),
        s && me(s, x => {
            x && c()
        }
        ),
        Ml( () => {
            n.value = t.loading
        }
        ),
        Ht( () => {
            t.immediateCheck && c()
        }
        ),
        Kt({
            check: c
        }),
        mn("scroll", c, {
            target: l,
            passive: !0
        }),
        () => {
            var x;
            const y = (x = r.default) == null ? void 0 : x.call(r)
              , m = O("div", {
                ref: o,
                class: tc("placeholder")
            }, null);
            return O("div", {
                ref: i,
                role: "feed",
                class: tc(),
                "aria-busy": n.value
            }, [t.direction === "down" ? y : m, h(), u(), d(), t.direction === "up" ? y : m])
        }
    }
});
const v4e = Oe(aee)
  , [lee,cee] = Se("notify")
  , uee = ["lockScroll", "position", "show", "teleport", "zIndex"]
  , fee = We({}, ed, {
    type: Ie("danger"),
    color: String,
    message: Ae,
    position: Ie("top"),
    className: hr,
    background: String,
    lockScroll: Boolean
});
var oD = be({
    name: lee,
    props: fee,
    emits: ["update:show"],
    setup(t, {emit: e, slots: r}) {
        const n = i => e("update:show", i);
        return () => O(Gl, st({
            class: [cee([t.type]), t.className],
            style: {
                color: t.color,
                background: t.background
            },
            overlay: !1,
            duration: .2,
            "onUpdate:show": n
        }, $t(t, uee)), {
            default: () => [r.default ? r.default() : t.message]
        })
    }
});
let O9, kc;
const dee = t => yo(t) ? t : {
    message: t
};
function hee() {
    ({instance: kc} = qp({
        setup() {
            const {state: t, toggle: e} = Kp();
            return () => O(oD, st(t, {
                "onUpdate:show": e
            }), null)
        }
    }))
}
const xee = () => ({
    type: "danger",
    color: void 0,
    message: "",
    onClose: void 0,
    onClick: void 0,
    onOpened: void 0,
    duration: 3e3,
    position: void 0,
    className: "",
    lockScroll: !1,
    background: void 0
});
let pee = xee();
const gee = () => {
    kc && kc.toggle(!1)
}
;
function y4e(t) {
    if (vo)
        return kc || hee(),
        t = We({}, pee, dee(t)),
        kc.open(t),
        clearTimeout(O9),
        t.duration > 0 && (O9 = setTimeout(gee, t.duration)),
        kc
}
Oe(oD);
const [mee,rc,k9] = Se("pagination")
  , fg = (t, e, r) => ({
    number: t,
    text: e,
    active: r
})
  , vee = {
    mode: Ie("multi"),
    prevText: String,
    nextText: String,
    pageCount: ze(0),
    modelValue: jp(0),
    totalItems: ze(0),
    showPageSize: ze(5),
    itemsPerPage: ze(10),
    forceEllipses: Boolean,
    showPrevButton: Ee,
    showNextButton: Ee
};
var yee = be({
    name: mee,
    props: vee,
    emits: ["change", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const n = ae( () => {
            const {pageCount: u, totalItems: f, itemsPerPage: d} = t
              , h = +u || Math.ceil(+f / +d);
            return Math.max(1, h)
        }
        )
          , i = ae( () => {
            const u = []
              , f = n.value
              , d = +t.showPageSize
              , {modelValue: h, forceEllipses: x} = t;
            let y = 1
              , m = f;
            const E = d < f;
            E && (y = Math.max(h - Math.floor(d / 2), 1),
            m = y + d - 1,
            m > f && (m = f,
            y = m - d + 1));
            for (let g = y; g <= m; g++) {
                const p = fg(g, g, g === h);
                u.push(p)
            }
            if (E && d > 0 && x) {
                if (y > 1) {
                    const g = fg(y - 1, "...");
                    u.unshift(g)
                }
                if (m < f) {
                    const g = fg(m + 1, "...");
                    u.push(g)
                }
            }
            return u
        }
        )
          , o = (u, f) => {
            u = Ur(u, 1, n.value),
            t.modelValue !== u && (e("update:modelValue", u),
            f && e("change", u))
        }
        ;
        mu( () => o(t.modelValue));
        const s = () => O("li", {
            class: rc("page-desc")
        }, [r.pageDesc ? r.pageDesc() : `${t.modelValue}/${n.value}`])
          , a = () => {
            const {mode: u, modelValue: f, showPrevButton: d} = t;
            if (!d)
                return;
            const h = r["prev-text"]
              , x = f === 1;
            return O("li", {
                class: [rc("item", {
                    disabled: x,
                    border: u === "simple",
                    prev: !0
                }), Uh]
            }, [O("button", {
                type: "button",
                disabled: x,
                onClick: () => o(f - 1, !0)
            }, [h ? h() : t.prevText || k9("prev")])])
        }
          , l = () => {
            const {mode: u, modelValue: f, showNextButton: d} = t;
            if (!d)
                return;
            const h = r["next-text"]
              , x = f === n.value;
            return O("li", {
                class: [rc("item", {
                    disabled: x,
                    border: u === "simple",
                    next: !0
                }), Uh]
            }, [O("button", {
                type: "button",
                disabled: x,
                onClick: () => o(f + 1, !0)
            }, [h ? h() : t.nextText || k9("next")])])
        }
          , c = () => i.value.map(u => O("li", {
            class: [rc("item", {
                active: u.active,
                page: !0
            }), Uh]
        }, [O("button", {
            type: "button",
            "aria-current": u.active || void 0,
            onClick: () => o(u.number, !0)
        }, [r.page ? r.page(u) : u.text])]));
        return () => O("nav", {
            role: "navigation",
            class: rc()
        }, [O("ul", {
            class: rc("items")
        }, [a(), t.mode === "simple" ? s() : c(), l()])])
    }
});
const E4e = Oe(yee);
function Vi(t) {
    if (t == null)
        return window;
    if (t.toString() !== "[object Window]") {
        var e = t.ownerDocument;
        return e && e.defaultView || window
    }
    return t
}
function k2(t) {
    var e = Vi(t).Element;
    return t instanceof e || t instanceof Element
}
function Mi(t) {
    var e = Vi(t).HTMLElement;
    return t instanceof e || t instanceof HTMLElement
}
function sD(t) {
    if (typeof ShadowRoot > "u")
        return !1;
    var e = Vi(t).ShadowRoot;
    return t instanceof e || t instanceof ShadowRoot
}
var Kc = Math.round;
function _y() {
    var t = navigator.userAgentData;
    return t != null && t.brands ? t.brands.map(function(e) {
        return e.brand + "/" + e.version
    }).join(" ") : navigator.userAgent
}
function Eee() {
    return !/^((?!chrome|android).)*safari/i.test(_y())
}
function wx(t, e, r) {
    e === void 0 && (e = !1),
    r === void 0 && (r = !1);
    var n = t.getBoundingClientRect()
      , i = 1
      , o = 1;
    e && Mi(t) && (i = t.offsetWidth > 0 && Kc(n.width) / t.offsetWidth || 1,
    o = t.offsetHeight > 0 && Kc(n.height) / t.offsetHeight || 1);
    var s = k2(t) ? Vi(t) : window
      , a = s.visualViewport
      , l = !Eee() && r
      , c = (n.left + (l && a ? a.offsetLeft : 0)) / i
      , u = (n.top + (l && a ? a.offsetTop : 0)) / o
      , f = n.width / i
      , d = n.height / o;
    return {
        width: f,
        height: d,
        top: u,
        right: c + f,
        bottom: u + d,
        left: c,
        x: c,
        y: u
    }
}
function aD(t) {
    var e = Vi(t)
      , r = e.pageXOffset
      , n = e.pageYOffset;
    return {
        scrollLeft: r,
        scrollTop: n
    }
}
function _ee(t) {
    return {
        scrollLeft: t.scrollLeft,
        scrollTop: t.scrollTop
    }
}
function bee(t) {
    return t === Vi(t) || !Mi(t) ? aD(t) : _ee(t)
}
function us(t) {
    return t ? (t.nodeName || "").toLowerCase() : null
}
function Zp(t) {
    return ((k2(t) ? t.ownerDocument : t.document) || window.document).documentElement
}
function Cee(t) {
    return wx(Zp(t)).left + aD(t).scrollLeft
}
function fs(t) {
    return Vi(t).getComputedStyle(t)
}
function R2(t) {
    var e = fs(t)
      , r = e.overflow
      , n = e.overflowX
      , i = e.overflowY;
    return /auto|scroll|overlay|hidden/.test(r + i + n)
}
function Aee(t) {
    var e = t.getBoundingClientRect()
      , r = Kc(e.width) / t.offsetWidth || 1
      , n = Kc(e.height) / t.offsetHeight || 1;
    return r !== 1 || n !== 1
}
function wee(t, e, r) {
    r === void 0 && (r = !1);
    var n = Mi(e)
      , i = Mi(e) && Aee(e)
      , o = Zp(e)
      , s = wx(t, i, r)
      , a = {
        scrollLeft: 0,
        scrollTop: 0
    }
      , l = {
        x: 0,
        y: 0
    };
    return (n || !n && !r) && ((us(e) !== "body" || R2(o)) && (a = bee(e)),
    Mi(e) ? (l = wx(e, !0),
    l.x += e.clientLeft,
    l.y += e.clientTop) : o && (l.x = Cee(o))),
    {
        x: s.left + a.scrollLeft - l.x,
        y: s.top + a.scrollTop - l.y,
        width: s.width,
        height: s.height
    }
}
function Bee(t) {
    var e = wx(t)
      , r = t.offsetWidth
      , n = t.offsetHeight;
    return Math.abs(e.width - r) <= 1 && (r = e.width),
    Math.abs(e.height - n) <= 1 && (n = e.height),
    {
        x: t.offsetLeft,
        y: t.offsetTop,
        width: r,
        height: n
    }
}
function M2(t) {
    return us(t) === "html" ? t : t.assignedSlot || t.parentNode || (sD(t) ? t.host : null) || Zp(t)
}
function lD(t) {
    return ["html", "body", "#document"].indexOf(us(t)) >= 0 ? t.ownerDocument.body : Mi(t) && R2(t) ? t : lD(M2(t))
}
function Vh(t, e) {
    var r;
    e === void 0 && (e = []);
    var n = lD(t)
      , i = n === ((r = t.ownerDocument) == null ? void 0 : r.body)
      , o = Vi(n)
      , s = i ? [o].concat(o.visualViewport || [], R2(n) ? n : []) : n
      , a = e.concat(s);
    return i ? a : a.concat(Vh(M2(s)))
}
function See(t) {
    return ["table", "td", "th"].indexOf(us(t)) >= 0
}
function R9(t) {
    return !Mi(t) || fs(t).position === "fixed" ? null : t.offsetParent
}
function Tee(t) {
    var e = /firefox/i.test(_y())
      , r = /Trident/i.test(_y());
    if (r && Mi(t)) {
        var n = fs(t);
        if (n.position === "fixed")
            return null
    }
    var i = M2(t);
    for (sD(i) && (i = i.host); Mi(i) && ["html", "body"].indexOf(us(i)) < 0; ) {
        var o = fs(i);
        if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || e && o.willChange === "filter" || e && o.filter && o.filter !== "none")
            return i;
        i = i.parentNode
    }
    return null
}
function cD(t) {
    for (var e = Vi(t), r = R9(t); r && See(r) && fs(r).position === "static"; )
        r = R9(r);
    return r && (us(r) === "html" || us(r) === "body" && fs(r).position === "static") ? e : r || Tee(t) || e
}
var Rc = "top"
  , Bx = "bottom"
  , uf = "right"
  , ll = "left"
  , uD = "auto"
  , Dee = [Rc, Bx, uf, ll]
  , fD = "start"
  , Sx = "end"
  , Fee = [].concat(Dee, [uD]).reduce(function(t, e) {
    return t.concat([e, e + "-" + fD, e + "-" + Sx])
}, [])
  , Pee = "beforeRead"
  , Iee = "read"
  , Oee = "afterRead"
  , kee = "beforeMain"
  , Ree = "main"
  , Mee = "afterMain"
  , Nee = "beforeWrite"
  , Lee = "write"
  , $ee = "afterWrite"
  , by = [Pee, Iee, Oee, kee, Ree, Mee, Nee, Lee, $ee];
function Uee(t) {
    var e = new Map
      , r = new Set
      , n = [];
    t.forEach(function(o) {
        e.set(o.name, o)
    });
    function i(o) {
        r.add(o.name);
        var s = [].concat(o.requires || [], o.requiresIfExists || []);
        s.forEach(function(a) {
            if (!r.has(a)) {
                var l = e.get(a);
                l && i(l)
            }
        }),
        n.push(o)
    }
    return t.forEach(function(o) {
        r.has(o.name) || i(o)
    }),
    n
}
function Gee(t) {
    var e = Uee(t);
    return by.reduce(function(r, n) {
        return r.concat(e.filter(function(i) {
            return i.phase === n
        }))
    }, [])
}
function Hee(t) {
    var e;
    return function() {
        return e || (e = new Promise(function(r) {
            Promise.resolve().then(function() {
                e = void 0,
                r(t())
            })
        }
        )),
        e
    }
}
function Bs(t) {
    for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
        r[n - 1] = arguments[n];
    return [].concat(r).reduce(function(i, o) {
        return i.replace(/%s/, o)
    }, t)
}
var Ba = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s'
  , Vee = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available'
  , M9 = ["name", "enabled", "phase", "fn", "effect", "requires", "options"];
function zee(t) {
    t.forEach(function(e) {
        [].concat(Object.keys(e), M9).filter(function(r, n, i) {
            return i.indexOf(r) === n
        }).forEach(function(r) {
            switch (r) {
            case "name":
                typeof e.name != "string" && console.error(Bs(Ba, String(e.name), '"name"', '"string"', '"' + String(e.name) + '"'));
                break;
            case "enabled":
                typeof e.enabled != "boolean" && console.error(Bs(Ba, e.name, '"enabled"', '"boolean"', '"' + String(e.enabled) + '"'));
                break;
            case "phase":
                by.indexOf(e.phase) < 0 && console.error(Bs(Ba, e.name, '"phase"', "either " + by.join(", "), '"' + String(e.phase) + '"'));
                break;
            case "fn":
                typeof e.fn != "function" && console.error(Bs(Ba, e.name, '"fn"', '"function"', '"' + String(e.fn) + '"'));
                break;
            case "effect":
                e.effect != null && typeof e.effect != "function" && console.error(Bs(Ba, e.name, '"effect"', '"function"', '"' + String(e.fn) + '"'));
                break;
            case "requires":
                e.requires != null && !Array.isArray(e.requires) && console.error(Bs(Ba, e.name, '"requires"', '"array"', '"' + String(e.requires) + '"'));
                break;
            case "requiresIfExists":
                Array.isArray(e.requiresIfExists) || console.error(Bs(Ba, e.name, '"requiresIfExists"', '"array"', '"' + String(e.requiresIfExists) + '"'));
                break;
            case "options":
            case "data":
                break;
            default:
                console.error('PopperJS: an invalid property has been provided to the "' + e.name + '" modifier, valid properties are ' + M9.map(function(n) {
                    return '"' + n + '"'
                }).join(", ") + '; but "' + r + '" was provided.')
            }
            e.requires && e.requires.forEach(function(n) {
                t.find(function(i) {
                    return i.name === n
                }) == null && console.error(Bs(Vee, String(e.name), n, n))
            })
        })
    })
}
function jee(t, e) {
    var r = new Set;
    return t.filter(function(n) {
        var i = e(n);
        if (!r.has(i))
            return r.add(i),
            !0
    })
}
function Jp(t) {
    return t.split("-")[0]
}
function Wee(t) {
    var e = t.reduce(function(r, n) {
        var i = r[n.name];
        return r[n.name] = i ? Object.assign({}, i, n, {
            options: Object.assign({}, i.options, n.options),
            data: Object.assign({}, i.data, n.data)
        }) : n,
        r
    }, {});
    return Object.keys(e).map(function(r) {
        return e[r]
    })
}
function dD(t) {
    return t.split("-")[1]
}
function Yee(t) {
    return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y"
}
function Xee(t) {
    var e = t.reference, r = t.element, n = t.placement, i = n ? Jp(n) : null, o = n ? dD(n) : null, s = e.x + e.width / 2 - r.width / 2, a = e.y + e.height / 2 - r.height / 2, l;
    switch (i) {
    case Rc:
        l = {
            x: s,
            y: e.y - r.height
        };
        break;
    case Bx:
        l = {
            x: s,
            y: e.y + e.height
        };
        break;
    case uf:
        l = {
            x: e.x + e.width,
            y: a
        };
        break;
    case ll:
        l = {
            x: e.x - r.width,
            y: a
        };
        break;
    default:
        l = {
            x: e.x,
            y: e.y
        }
    }
    var c = i ? Yee(i) : null;
    if (c != null) {
        var u = c === "y" ? "height" : "width";
        switch (o) {
        case fD:
            l[c] = l[c] - (e[u] / 2 - r[u] / 2);
            break;
        case Sx:
            l[c] = l[c] + (e[u] / 2 - r[u] / 2);
            break
        }
    }
    return l
}
var N9 = "Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element."
  , Kee = "Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash."
  , L9 = {
    placement: "bottom",
    modifiers: [],
    strategy: "absolute"
};
function $9() {
    for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++)
        e[r] = arguments[r];
    return !e.some(function(n) {
        return !(n && typeof n.getBoundingClientRect == "function")
    })
}
function qee(t) {
    t === void 0 && (t = {});
    var e = t
      , r = e.defaultModifiers
      , n = r === void 0 ? [] : r
      , i = e.defaultOptions
      , o = i === void 0 ? L9 : i;
    return function(a, l, c) {
        c === void 0 && (c = o);
        var u = {
            placement: "bottom",
            orderedModifiers: [],
            options: Object.assign({}, L9, o),
            modifiersData: {},
            elements: {
                reference: a,
                popper: l
            },
            attributes: {},
            styles: {}
        }
          , f = []
          , d = !1
          , h = {
            state: u,
            setOptions: function(E) {
                var g = typeof E == "function" ? E(u.options) : E;
                y(),
                u.options = Object.assign({}, o, u.options, g),
                u.scrollParents = {
                    reference: k2(a) ? Vh(a) : a.contextElement ? Vh(a.contextElement) : [],
                    popper: Vh(l)
                };
                var p = Gee(Wee([].concat(n, u.options.modifiers)));
                u.orderedModifiers = p.filter(function(w) {
                    return w.enabled
                });
                {
                    var v = jee([].concat(p, u.options.modifiers), function(w) {
                        var S = w.name;
                        return S
                    });
                    if (zee(v),
                    Jp(u.options.placement) === uD) {
                        var _ = u.orderedModifiers.find(function(w) {
                            var S = w.name;
                            return S === "flip"
                        });
                        _ || console.error(['Popper: "auto" placements require the "flip" modifier be', "present and enabled to work."].join(" "))
                    }
                    var b = fs(l)
                      , C = b.marginTop
                      , B = b.marginRight
                      , T = b.marginBottom
                      , A = b.marginLeft;
                    [C, B, T, A].some(function(w) {
                        return parseFloat(w)
                    }) && console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', "between the popper and its reference element or boundary.", "To replicate margin, use the `offset` modifier, as well as", "the `padding` option in the `preventOverflow` and `flip`", "modifiers."].join(" "))
                }
                return x(),
                h.update()
            },
            forceUpdate: function() {
                if (!d) {
                    var E = u.elements
                      , g = E.reference
                      , p = E.popper;
                    if (!$9(g, p)) {
                        console.error(N9);
                        return
                    }
                    u.rects = {
                        reference: wee(g, cD(p), u.options.strategy === "fixed"),
                        popper: Bee(p)
                    },
                    u.reset = !1,
                    u.placement = u.options.placement,
                    u.orderedModifiers.forEach(function(w) {
                        return u.modifiersData[w.name] = Object.assign({}, w.data)
                    });
                    for (var v = 0, _ = 0; _ < u.orderedModifiers.length; _++) {
                        if (v += 1,
                        v > 100) {
                            console.error(Kee);
                            break
                        }
                        if (u.reset === !0) {
                            u.reset = !1,
                            _ = -1;
                            continue
                        }
                        var b = u.orderedModifiers[_]
                          , C = b.fn
                          , B = b.options
                          , T = B === void 0 ? {} : B
                          , A = b.name;
                        typeof C == "function" && (u = C({
                            state: u,
                            options: T,
                            name: A,
                            instance: h
                        }) || u)
                    }
                }
            },
            update: Hee(function() {
                return new Promise(function(m) {
                    h.forceUpdate(),
                    m(u)
                }
                )
            }),
            destroy: function() {
                y(),
                d = !0
            }
        };
        if (!$9(a, l))
            return console.error(N9),
            h;
        h.setOptions(c).then(function(m) {
            !d && c.onFirstUpdate && c.onFirstUpdate(m)
        });
        function x() {
            u.orderedModifiers.forEach(function(m) {
                var E = m.name
                  , g = m.options
                  , p = g === void 0 ? {} : g
                  , v = m.effect;
                if (typeof v == "function") {
                    var _ = v({
                        state: u,
                        name: E,
                        instance: h,
                        options: p
                    })
                      , b = function() {};
                    f.push(_ || b)
                }
            })
        }
        function y() {
            f.forEach(function(m) {
                return m()
            }),
            f = []
        }
        return h
    }
}
var Yd = {
    passive: !0
};
function Zee(t) {
    var e = t.state
      , r = t.instance
      , n = t.options
      , i = n.scroll
      , o = i === void 0 ? !0 : i
      , s = n.resize
      , a = s === void 0 ? !0 : s
      , l = Vi(e.elements.popper)
      , c = [].concat(e.scrollParents.reference, e.scrollParents.popper);
    return o && c.forEach(function(u) {
        u.addEventListener("scroll", r.update, Yd)
    }),
    a && l.addEventListener("resize", r.update, Yd),
    function() {
        o && c.forEach(function(u) {
            u.removeEventListener("scroll", r.update, Yd)
        }),
        a && l.removeEventListener("resize", r.update, Yd)
    }
}
var Jee = {
    name: "eventListeners",
    enabled: !0,
    phase: "write",
    fn: function() {},
    effect: Zee,
    data: {}
};
function Qee(t) {
    var e = t.state
      , r = t.name;
    e.modifiersData[r] = Xee({
        reference: e.rects.reference,
        element: e.rects.popper,
        strategy: "absolute",
        placement: e.placement
    })
}
var ete = {
    name: "popperOffsets",
    enabled: !0,
    phase: "read",
    fn: Qee,
    data: {}
}
  , tte = {
    top: "auto",
    right: "auto",
    bottom: "auto",
    left: "auto"
};
function rte(t) {
    var e = t.x
      , r = t.y
      , n = window
      , i = n.devicePixelRatio || 1;
    return {
        x: Kc(e * i) / i || 0,
        y: Kc(r * i) / i || 0
    }
}
function U9(t) {
    var e, r = t.popper, n = t.popperRect, i = t.placement, o = t.variation, s = t.offsets, a = t.position, l = t.gpuAcceleration, c = t.adaptive, u = t.roundOffsets, f = t.isFixed, d = s.x, h = d === void 0 ? 0 : d, x = s.y, y = x === void 0 ? 0 : x, m = typeof u == "function" ? u({
        x: h,
        y
    }) : {
        x: h,
        y
    };
    h = m.x,
    y = m.y;
    var E = s.hasOwnProperty("x")
      , g = s.hasOwnProperty("y")
      , p = ll
      , v = Rc
      , _ = window;
    if (c) {
        var b = cD(r)
          , C = "clientHeight"
          , B = "clientWidth";
        if (b === Vi(r) && (b = Zp(r),
        fs(b).position !== "static" && a === "absolute" && (C = "scrollHeight",
        B = "scrollWidth")),
        b = b,
        i === Rc || (i === ll || i === uf) && o === Sx) {
            v = Bx;
            var T = f && b === _ && _.visualViewport ? _.visualViewport.height : b[C];
            y -= T - n.height,
            y *= l ? 1 : -1
        }
        if (i === ll || (i === Rc || i === Bx) && o === Sx) {
            p = uf;
            var A = f && b === _ && _.visualViewport ? _.visualViewport.width : b[B];
            h -= A - n.width,
            h *= l ? 1 : -1
        }
    }
    var w = Object.assign({
        position: a
    }, c && tte)
      , S = u === !0 ? rte({
        x: h,
        y
    }) : {
        x: h,
        y
    };
    if (h = S.x,
    y = S.y,
    l) {
        var D;
        return Object.assign({}, w, (D = {},
        D[v] = g ? "0" : "",
        D[p] = E ? "0" : "",
        D.transform = (_.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + y + "px)" : "translate3d(" + h + "px, " + y + "px, 0)",
        D))
    }
    return Object.assign({}, w, (e = {},
    e[v] = g ? y + "px" : "",
    e[p] = E ? h + "px" : "",
    e.transform = "",
    e))
}
function nte(t) {
    var e = t.state
      , r = t.options
      , n = r.gpuAcceleration
      , i = n === void 0 ? !0 : n
      , o = r.adaptive
      , s = o === void 0 ? !0 : o
      , a = r.roundOffsets
      , l = a === void 0 ? !0 : a;
    {
        var c = fs(e.elements.popper).transitionProperty || "";
        s && ["transform", "top", "right", "bottom", "left"].some(function(f) {
            return c.indexOf(f) >= 0
        }) && console.warn(["Popper: Detected CSS transitions on at least one of the following", 'CSS properties: "transform", "top", "right", "bottom", "left".', `

`, 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', "for smooth transitions, or remove these properties from the CSS", "transition declaration on the popper element if only transitioning", "opacity or background-color for example.", `

`, "We recommend using the popper element as a wrapper around an inner", "element that can have any CSS property transitioned for animations."].join(" "))
    }
    var u = {
        placement: Jp(e.placement),
        variation: dD(e.placement),
        popper: e.elements.popper,
        popperRect: e.rects.popper,
        gpuAcceleration: i,
        isFixed: e.options.strategy === "fixed"
    };
    e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, U9(Object.assign({}, u, {
        offsets: e.modifiersData.popperOffsets,
        position: e.options.strategy,
        adaptive: s,
        roundOffsets: l
    })))),
    e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, U9(Object.assign({}, u, {
        offsets: e.modifiersData.arrow,
        position: "absolute",
        adaptive: !1,
        roundOffsets: l
    })))),
    e.attributes.popper = Object.assign({}, e.attributes.popper, {
        "data-popper-placement": e.placement
    })
}
var ite = {
    name: "computeStyles",
    enabled: !0,
    phase: "beforeWrite",
    fn: nte,
    data: {}
};
function ote(t) {
    var e = t.state;
    Object.keys(e.elements).forEach(function(r) {
        var n = e.styles[r] || {}
          , i = e.attributes[r] || {}
          , o = e.elements[r];
        !Mi(o) || !us(o) || (Object.assign(o.style, n),
        Object.keys(i).forEach(function(s) {
            var a = i[s];
            a === !1 ? o.removeAttribute(s) : o.setAttribute(s, a === !0 ? "" : a)
        }))
    })
}
function ste(t) {
    var e = t.state
      , r = {
        popper: {
            position: e.options.strategy,
            left: "0",
            top: "0",
            margin: "0"
        },
        arrow: {
            position: "absolute"
        },
        reference: {}
    };
    return Object.assign(e.elements.popper.style, r.popper),
    e.styles = r,
    e.elements.arrow && Object.assign(e.elements.arrow.style, r.arrow),
    function() {
        Object.keys(e.elements).forEach(function(n) {
            var i = e.elements[n]
              , o = e.attributes[n] || {}
              , s = Object.keys(e.styles.hasOwnProperty(n) ? e.styles[n] : r[n])
              , a = s.reduce(function(l, c) {
                return l[c] = "",
                l
            }, {});
            !Mi(i) || !us(i) || (Object.assign(i.style, a),
            Object.keys(o).forEach(function(l) {
                i.removeAttribute(l)
            }))
        })
    }
}
var ate = {
    name: "applyStyles",
    enabled: !0,
    phase: "write",
    fn: ote,
    effect: ste,
    requires: ["computeStyles"]
}
  , lte = [Jee, ete, ite, ate]
  , cte = qee({
    defaultModifiers: lte
});
function ute(t, e, r) {
    var n = Jp(t)
      , i = [ll, Rc].indexOf(n) >= 0 ? -1 : 1
      , o = typeof r == "function" ? r(Object.assign({}, e, {
        placement: t
    })) : r
      , s = o[0]
      , a = o[1];
    return s = s || 0,
    a = (a || 0) * i,
    [ll, uf].indexOf(n) >= 0 ? {
        x: a,
        y: s
    } : {
        x: s,
        y: a
    }
}
function fte(t) {
    var e = t.state
      , r = t.options
      , n = t.name
      , i = r.offset
      , o = i === void 0 ? [0, 0] : i
      , s = Fee.reduce(function(u, f) {
        return u[f] = ute(f, e.rects, o),
        u
    }, {})
      , a = s[e.placement]
      , l = a.x
      , c = a.y;
    e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += l,
    e.modifiersData.popperOffsets.y += c),
    e.modifiersData[n] = s
}
var dte = {
    name: "offset",
    enabled: !0,
    phase: "main",
    requires: ["popperOffsets"],
    fn: fte
};
const [hte,Sa] = Se("popover")
  , xte = ["overlay", "duration", "teleport", "overlayStyle", "overlayClass", "closeOnClickOverlay"]
  , pte = {
    show: Boolean,
    theme: Ie("light"),
    overlay: Boolean,
    actions: ls(),
    actionsDirection: Ie("vertical"),
    trigger: Ie("click"),
    duration: Ae,
    showArrow: Ee,
    placement: Ie("bottom"),
    iconPrefix: String,
    overlayClass: hr,
    overlayStyle: Object,
    closeOnClickAction: Ee,
    closeOnClickOverlay: Ee,
    closeOnClickOutside: Ee,
    offset: {
        type: Array,
        default: () => [0, 8]
    },
    teleport: {
        type: [String, Object],
        default: "body"
    }
};
var gte = be({
    name: hte,
    props: pte,
    emits: ["select", "touchstart", "update:show"],
    setup(t, {emit: e, slots: r, attrs: n}) {
        let i;
        const o = ie()
          , s = ie()
          , a = ie()
          , l = fZ( () => t.show, g => e("update:show", g))
          , c = () => ({
            placement: t.placement,
            modifiers: [{
                name: "computeStyles",
                options: {
                    adaptive: !1,
                    gpuAcceleration: !1
                }
            }, We({}, dte, {
                options: {
                    offset: t.offset
                }
            })]
        })
          , u = () => s.value && a.value ? cte(s.value, a.value.popupRef.value, c()) : null
          , f = () => {
            Xe( () => {
                l.value && (i ? i.setOptions(c()) : (i = u(),
                vo && (window.addEventListener("animationend", f),
                window.addEventListener("transitionend", f))))
            }
            )
        }
          , d = g => {
            l.value = g
        }
          , h = () => {
            t.trigger === "click" && (l.value = !l.value)
        }
          , x = (g, p) => {
            g.disabled || (e("select", g, p),
            t.closeOnClickAction && (l.value = !1))
        }
          , y = () => {
            l.value && t.closeOnClickOutside && (!t.overlay || t.closeOnClickOverlay) && (l.value = !1)
        }
          , m = (g, p) => r.action ? r.action({
            action: g,
            index: p
        }) : [g.icon && O(rr, {
            name: g.icon,
            classPrefix: t.iconPrefix,
            class: Sa("action-icon")
        }, null), O("div", {
            class: [Sa("action-text"), {
                [uq]: t.actionsDirection === "vertical"
            }]
        }, [g.text])]
          , E = (g, p) => {
            const {icon: v, color: _, disabled: b, className: C} = g;
            return O("div", {
                role: "menuitem",
                class: [Sa("action", {
                    disabled: b,
                    "with-icon": v
                }), {
                    [cq]: t.actionsDirection === "horizontal"
                }, C],
                style: {
                    color: _
                },
                tabindex: b ? void 0 : 0,
                "aria-disabled": b || void 0,
                onClick: () => x(g, p)
            }, [m(g, p)])
        }
        ;
        return Ht( () => {
            f(),
            mu( () => {
                var g;
                o.value = (g = a.value) == null ? void 0 : g.popupRef.value
            }
            )
        }
        ),
        Zn( () => {
            i && (vo && (window.removeEventListener("animationend", f),
            window.removeEventListener("transitionend", f)),
            i.destroy(),
            i = null)
        }
        ),
        me( () => [l.value, t.offset, t.placement], f),
        BS([s, o], y, {
            eventName: "touchstart"
        }),
        () => {
            var g;
            return O(Nt, null, [O("span", {
                ref: s,
                class: Sa("wrapper"),
                onClick: h
            }, [(g = r.reference) == null ? void 0 : g.call(r)]), O(Gl, st({
                ref: a,
                show: l.value,
                class: Sa([t.theme]),
                position: "",
                transition: "van-popover-zoom",
                lockScroll: !1,
                "onUpdate:show": d
            }, n, xy(), $t(t, xte)), {
                default: () => [t.showArrow && O("div", {
                    class: Sa("arrow")
                }, null), O("div", {
                    role: "menu",
                    class: Sa("content", t.actionsDirection)
                }, [r.default ? r.default() : t.actions.map(E)])]
            })])
        }
    }
});
const _4e = Oe(gte)
  , [mte,dg] = Se("progress")
  , vte = {
    color: String,
    inactive: Boolean,
    pivotText: String,
    textColor: String,
    showPivot: Ee,
    pivotColor: String,
    trackColor: String,
    strokeWidth: Ae,
    percentage: {
        type: Ae,
        default: 0,
        validator: t => +t >= 0 && +t <= 100
    }
};
var yte = be({
    name: mte,
    props: vte,
    setup(t) {
        const e = ae( () => t.inactive ? void 0 : t.color)
          , r = i => Math.min(Math.max(+i, 0), 100)
          , n = () => {
            const {textColor: i, pivotText: o, pivotColor: s, percentage: a} = t
              , l = r(a)
              , c = o ?? `${a}%`;
            if (t.showPivot && c) {
                const u = {
                    color: i,
                    left: `${l}%`,
                    transform: `translate(-${l}%,-50%)`,
                    background: s || e.value
                };
                return O("span", {
                    style: u,
                    class: dg("pivot", {
                        inactive: t.inactive
                    })
                }, [c])
            }
        }
        ;
        return () => {
            const {trackColor: i, percentage: o, strokeWidth: s} = t
              , a = r(o)
              , l = {
                background: i,
                height: rt(s)
            }
              , c = {
                width: `${a}%`,
                background: e.value
            };
            return O("div", {
                class: dg(),
                style: l
            }, [O("span", {
                class: dg("portion", {
                    inactive: t.inactive
                }),
                style: c
            }, null), n()])
        }
    }
});
const b4e = Oe(yte)
  , [Ete,Gu,_te] = Se("pull-refresh")
  , hD = 50
  , bte = ["pulling", "loosing", "success"]
  , Cte = {
    disabled: Boolean,
    modelValue: Boolean,
    headHeight: ze(hD),
    successText: String,
    pullingText: String,
    loosingText: String,
    loadingText: String,
    pullDistance: Ae,
    successDuration: ze(500),
    animationDuration: ze(300)
};
var Ate = be({
    name: Ete,
    props: Cte,
    emits: ["change", "refresh", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        let n;
        const i = ie()
          , o = ie()
          , s = Zf(i)
          , a = Pt({
            status: "normal",
            distance: 0,
            duration: 0
        })
          , l = Ul()
          , c = () => {
            if (t.headHeight !== hD)
                return {
                    height: `${t.headHeight}px`
                }
        }
          , u = () => a.status !== "loading" && a.status !== "success" && !t.disabled
          , f = v => {
            const _ = +(t.pullDistance || t.headHeight);
            return v > _ && (v < _ * 2 ? v = _ + (v - _) / 2 : v = _ * 1.5 + (v - _ * 2) / 4),
            Math.round(v)
        }
          , d = (v, _) => {
            const b = +(t.pullDistance || t.headHeight);
            a.distance = v,
            _ ? a.status = "loading" : v === 0 ? a.status = "normal" : v < b ? a.status = "pulling" : a.status = "loosing",
            e("change", {
                status: a.status,
                distance: v
            })
        }
          , h = () => {
            const {status: v} = a;
            return v === "normal" ? "" : t[`${v}Text`] || _te(v)
        }
          , x = () => {
            const {status: v, distance: _} = a;
            if (r[v])
                return r[v]({
                    distance: _
                });
            const b = [];
            return bte.includes(v) && b.push(O("div", {
                class: Gu("text")
            }, [h()])),
            v === "loading" && b.push(O(ys, {
                class: Gu("loading")
            }, {
                default: h
            })),
            b
        }
          , y = () => {
            a.status = "success",
            setTimeout( () => {
                d(0)
            }
            , +t.successDuration)
        }
          , m = v => {
            n = Jf(s.value) === 0,
            n && (a.duration = 0,
            l.start(v))
        }
          , E = v => {
            u() && m(v)
        }
          , g = v => {
            if (u()) {
                n || m(v);
                const {deltaY: _} = l;
                l.move(v),
                n && _.value >= 0 && l.isVertical() && (Rr(v),
                d(f(_.value)))
            }
        }
          , p = () => {
            n && l.deltaY.value && u() && (a.duration = +t.animationDuration,
            a.status === "loosing" ? (d(+t.headHeight, !0),
            e("update:modelValue", !0),
            Xe( () => e("refresh"))) : d(0))
        }
        ;
        return me( () => t.modelValue, v => {
            a.duration = +t.animationDuration,
            v ? d(+t.headHeight, !0) : r.success || t.successText ? y() : d(0, !1)
        }
        ),
        mn("touchmove", g, {
            target: o
        }),
        () => {
            var v;
            const _ = {
                transitionDuration: `${a.duration}ms`,
                transform: a.distance ? `translate3d(0,${a.distance}px, 0)` : ""
            };
            return O("div", {
                ref: i,
                class: Gu()
            }, [O("div", {
                ref: o,
                class: Gu("track"),
                style: _,
                onTouchstartPassive: E,
                onTouchend: p,
                onTouchcancel: p
            }, [O("div", {
                class: Gu("head"),
                style: c()
            }, [x()]), (v = r.default) == null ? void 0 : v.call(r)])])
        }
    }
});
const C4e = Oe(Ate)
  , A4e = Oe(lQ)
  , [xD,wte] = Se("sidebar")
  , pD = Symbol(xD)
  , Bte = {
    modelValue: ze(0)
};
var Ste = be({
    name: xD,
    props: Bte,
    emits: ["change", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const {linkChildren: n} = Hi(pD)
          , i = () => +t.modelValue;
        return n({
            getActive: i,
            setActive: s => {
                s !== i() && (e("update:modelValue", s),
                e("change", s))
            }
        }),
        () => {
            var s;
            return O("div", {
                role: "tablist",
                class: wte()
            }, [(s = r.default) == null ? void 0 : s.call(r)])
        }
    }
});
const w4e = Oe(Ste)
  , [Tte,G9] = Se("sidebar-item")
  , Dte = We({}, _u, {
    dot: Boolean,
    title: String,
    badge: Ae,
    disabled: Boolean,
    badgeProps: Object
});
var Fte = be({
    name: Tte,
    props: Dte,
    emits: ["click"],
    setup(t, {emit: e, slots: r}) {
        const n = Qf()
          , {parent: i, index: o} = Jn(pD);
        if (!i) {
            console.error("[Vant] <SidebarItem> must be a child component of <Sidebar>.");
            return
        }
        const s = () => {
            t.disabled || (e("click", o.value),
            i.setActive(o.value),
            n())
        }
        ;
        return () => {
            const {dot: a, badge: l, title: c, disabled: u} = t
              , f = o.value === i.getActive();
            return O("div", {
                role: "tab",
                class: G9({
                    select: f,
                    disabled: u
                }),
                tabindex: u ? void 0 : 0,
                "aria-selected": f,
                onClick: s
            }, [O(Wp, st({
                dot: a,
                class: G9("text"),
                content: l
            }, t.badgeProps), {
                default: () => [r.title ? r.title() : c]
            })])
        }
    }
});
const B4e = Oe(Fte)
  , [Pte,Ite] = Se("skeleton-title")
  , Ote = {
    round: Boolean,
    titleWidth: Ae
};
var kte = be({
    name: Pte,
    props: Ote,
    setup(t) {
        return () => O("h3", {
            class: Ite([{
                round: t.round
            }]),
            style: {
                width: rt(t.titleWidth)
            }
        }, null)
    }
});
const Rte = Oe(kte);
var Mte = Rte;
const [Nte,Lte] = Se("skeleton-avatar")
  , $te = {
    avatarSize: Ae,
    avatarShape: Ie("round")
};
var Ute = be({
    name: Nte,
    props: $te,
    setup(t) {
        return () => O("div", {
            class: Lte([t.avatarShape]),
            style: $l(t.avatarSize)
        }, null)
    }
});
const Gte = Oe(Ute);
var Hte = Gte;
const N2 = "100%"
  , Vte = {
    round: Boolean,
    rowWidth: {
        type: Ae,
        default: N2
    }
}
  , [zte,jte] = Se("skeleton-paragraph");
var Wte = be({
    name: zte,
    props: Vte,
    setup(t) {
        return () => O("div", {
            class: jte([{
                round: t.round
            }]),
            style: {
                width: t.rowWidth
            }
        }, null)
    }
});
const Yte = Oe(Wte);
var Xte = Yte;
const [Kte,H9] = Se("skeleton")
  , qte = "60%"
  , Zte = {
    row: ze(0),
    round: Boolean,
    title: Boolean,
    titleWidth: Ae,
    avatar: Boolean,
    avatarSize: Ae,
    avatarShape: Ie("round"),
    loading: Ee,
    animate: Ee,
    rowWidth: {
        type: [Number, String, Array],
        default: N2
    }
};
var Jte = be({
    name: Kte,
    inheritAttrs: !1,
    props: Zte,
    setup(t, {slots: e, attrs: r}) {
        const n = () => {
            if (t.avatar)
                return O(Hte, {
                    avatarShape: t.avatarShape,
                    avatarSize: t.avatarSize
                }, null)
        }
          , i = () => {
            if (t.title)
                return O(Mte, {
                    round: t.round,
                    titleWidth: t.titleWidth
                }, null)
        }
          , o = l => {
            const {rowWidth: c} = t;
            return c === N2 && l === +t.row - 1 ? qte : Array.isArray(c) ? c[l] : c
        }
          , s = () => Array(+t.row).fill("").map( (l, c) => O(Xte, {
            key: c,
            round: t.round,
            rowWidth: rt(o(c))
        }, null))
          , a = () => e.template ? e.template() : O(Nt, null, [n(), O("div", {
            class: H9("content")
        }, [i(), s()])]);
        return () => {
            var l;
            return t.loading ? O("div", st({
                class: H9({
                    animate: t.animate,
                    round: t.round
                })
            }, r), [a()]) : (l = e.default) == null ? void 0 : l.call(e)
        }
    }
});
const S4e = Oe(Jte)
  , [Qte,Hu] = Se("slider")
  , ere = {
    min: ze(0),
    max: ze(100),
    step: ze(1),
    range: Boolean,
    reverse: Boolean,
    disabled: Boolean,
    readonly: Boolean,
    vertical: Boolean,
    barHeight: Ae,
    buttonSize: Ae,
    activeColor: String,
    inactiveColor: String,
    modelValue: {
        type: [Number, Array],
        default: 0
    }
};
var tre = be({
    name: Qte,
    props: ere,
    emits: ["change", "dragEnd", "dragStart", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        let n, i, o;
        const s = ie()
          , a = [ie(), ie()]
          , l = ie()
          , c = Ul()
          , u = ae( () => Number(t.max) - Number(t.min))
          , f = ae( () => {
            const w = t.vertical ? "width" : "height";
            return {
                background: t.inactiveColor,
                [w]: rt(t.barHeight)
            }
        }
        )
          , d = w => t.range && Array.isArray(w)
          , h = () => {
            const {modelValue: w, min: S} = t;
            return d(w) ? `${(w[1] - w[0]) * 100 / u.value}%` : `${(w - Number(S)) * 100 / u.value}%`
        }
          , x = () => {
            const {modelValue: w, min: S} = t;
            return d(w) ? `${(w[0] - Number(S)) * 100 / u.value}%` : "0%"
        }
          , y = ae( () => {
            const S = {
                [t.vertical ? "height" : "width"]: h(),
                background: t.activeColor
            };
            l.value && (S.transition = "none");
            const D = () => t.vertical ? t.reverse ? "bottom" : "top" : t.reverse ? "right" : "left";
            return S[D()] = x(),
            S
        }
        )
          , m = w => {
            const S = +t.min
              , D = +t.max
              , F = +t.step;
            w = Ur(w, S, D);
            const R = Math.round((w - S) / F) * F;
            return f7(S, R)
        }
          , E = () => {
            const w = t.modelValue;
            d(w) ? o = w.map(m) : o = m(w)
        }
          , g = w => {
            var S, D;
            const F = (S = w[0]) != null ? S : Number(t.min)
              , R = (D = w[1]) != null ? D : Number(t.max);
            return F > R ? [R, F] : [F, R]
        }
          , p = (w, S) => {
            d(w) ? w = g(w).map(m) : w = m(w),
            Js(w, t.modelValue) || e("update:modelValue", w),
            S && !Js(w, o) && e("change", w)
        }
          , v = w => {
            if (w.stopPropagation(),
            t.disabled || t.readonly)
                return;
            E();
            const {min: S, reverse: D, vertical: F, modelValue: R} = t
              , P = Cr(s)
              , N = () => F ? D ? P.bottom - w.clientY : w.clientY - P.top : D ? P.right - w.clientX : w.clientX - P.left
              , j = F ? P.height : P.width
              , K = Number(S) + N() / j * u.value;
            if (d(R)) {
                const [oe,U] = R
                  , $ = (oe + U) / 2;
                K <= $ ? p([K, U], !0) : p([oe, K], !0)
            } else
                p(K, !0)
        }
          , _ = w => {
            t.disabled || t.readonly || (c.start(w),
            i = t.modelValue,
            E(),
            l.value = "start")
        }
          , b = w => {
            if (t.disabled || t.readonly)
                return;
            l.value === "start" && e("dragStart", w),
            Rr(w, !0),
            c.move(w),
            l.value = "dragging";
            const S = Cr(s)
              , D = t.vertical ? c.deltaY.value : c.deltaX.value
              , F = t.vertical ? S.height : S.width;
            let R = D / F * u.value;
            if (t.reverse && (R = -R),
            d(o)) {
                const P = t.reverse ? 1 - n : n;
                i[P] = o[P] + R
            } else
                i = o + R;
            p(i)
        }
          , C = w => {
            t.disabled || t.readonly || (l.value === "dragging" && (p(i, !0),
            e("dragEnd", w)),
            l.value = "")
        }
          , B = w => typeof w == "number" ? Hu("button-wrapper", ["left", "right"][w]) : Hu("button-wrapper", t.reverse ? "left" : "right")
          , T = (w, S) => {
            const D = l.value === "dragging";
            if (typeof S == "number") {
                const F = r[S === 0 ? "left-button" : "right-button"];
                let R;
                if (D && Array.isArray(i) && (R = i[0] > i[1] ? n ^ 1 : n),
                F)
                    return F({
                        value: w,
                        dragging: D,
                        dragIndex: R
                    })
            }
            return r.button ? r.button({
                value: w,
                dragging: D
            }) : O("div", {
                class: Hu("button"),
                style: $l(t.buttonSize)
            }, null)
        }
          , A = w => {
            const S = typeof w == "number" ? t.modelValue[w] : t.modelValue;
            return O("div", {
                ref: a[w ?? 0],
                role: "slider",
                class: B(w),
                tabindex: t.disabled ? void 0 : 0,
                "aria-valuemin": t.min,
                "aria-valuenow": S,
                "aria-valuemax": t.max,
                "aria-disabled": t.disabled || void 0,
                "aria-readonly": t.readonly || void 0,
                "aria-orientation": t.vertical ? "vertical" : "horizontal",
                onTouchstartPassive: D => {
                    typeof w == "number" && (n = w),
                    _(D)
                }
                ,
                onTouchend: C,
                onTouchcancel: C,
                onClick: l7
            }, [T(S, w)])
        }
        ;
        return p(t.modelValue),
        Ll( () => t.modelValue),
        a.forEach(w => {
            mn("touchmove", b, {
                target: w
            })
        }
        ),
        () => O("div", {
            ref: s,
            style: f.value,
            class: Hu({
                vertical: t.vertical,
                disabled: t.disabled
            }),
            onClick: v
        }, [O("div", {
            class: Hu("bar"),
            style: y.value
        }, [t.range ? [A(0), A(1)] : A()])])
    }
});
const T4e = Oe(tre)
  , [V9,rre] = Se("space")
  , nre = {
    align: String,
    direction: {
        type: String,
        default: "horizontal"
    },
    size: {
        type: [Number, String, Array],
        default: 8
    },
    wrap: Boolean,
    fill: Boolean
};
function gD(t=[]) {
    const e = [];
    return t.forEach(r => {
        Array.isArray(r) ? e.push(...r) : r.type === Nt ? e.push(...gD(r.children)) : e.push(r)
    }
    ),
    e.filter(r => {
        var n;
        return !(r && (r.type === tr || r.type === Nt && ((n = r.children) == null ? void 0 : n.length) === 0 || r.type === go && r.children.trim() === ""))
    }
    )
}
var ire = be({
    name: V9,
    props: nre,
    setup(t, {slots: e}) {
        const r = ae( () => {
            var o;
            return (o = t.align) != null ? o : t.direction === "horizontal" ? "center" : ""
        }
        )
          , n = o => typeof o == "number" ? o + "px" : o
          , i = o => {
            const s = {}
              , a = `${n(Array.isArray(t.size) ? t.size[0] : t.size)}`
              , l = `${n(Array.isArray(t.size) ? t.size[1] : t.size)}`;
            return o ? t.wrap ? {
                marginBottom: l
            } : {} : (t.direction === "horizontal" && (s.marginRight = a),
            (t.direction === "vertical" || t.wrap) && (s.marginBottom = l),
            s)
        }
        ;
        return () => {
            var o;
            const s = gD((o = e.default) == null ? void 0 : o.call(e));
            return O("div", {
                class: [rre({
                    [t.direction]: t.direction,
                    [`align-${r.value}`]: r.value,
                    wrap: t.wrap,
                    fill: t.fill
                })]
            }, [s.map( (a, l) => O("div", {
                key: `item-${l}`,
                class: `${V9}-item`,
                style: i(l === s.length - 1)
            }, [a]))])
        }
    }
});
const D4e = Oe(ire)
  , [ore,Xd] = Se("stepper")
  , sre = 200
  , Kd = (t, e) => String(t) === String(e)
  , are = {
    min: ze(1),
    max: ze(1 / 0),
    name: ze(""),
    step: ze(1),
    theme: String,
    integer: Boolean,
    disabled: Boolean,
    showPlus: Ee,
    showMinus: Ee,
    showInput: Ee,
    longPress: Ee,
    autoFixed: Ee,
    allowEmpty: Boolean,
    modelValue: Ae,
    inputWidth: Ae,
    buttonSize: Ae,
    placeholder: String,
    disablePlus: Boolean,
    disableMinus: Boolean,
    disableInput: Boolean,
    beforeChange: Function,
    defaultValue: ze(1),
    decimalLength: Ae
};
var lre = be({
    name: ore,
    props: are,
    emits: ["plus", "blur", "minus", "focus", "change", "overlimit", "update:modelValue"],
    setup(t, {emit: e}) {
        const r = (B, T=!0) => {
            const {min: A, max: w, allowEmpty: S, decimalLength: D} = t;
            return S && B === "" || (B = dy(String(B), !t.integer),
            B = B === "" ? 0 : +B,
            B = Number.isNaN(B) ? +A : B,
            B = T ? Math.max(Math.min(+w, B), +A) : B,
            Lt(D) && (B = B.toFixed(+D))),
            B
        }
          , n = () => {
            var B;
            const T = (B = t.modelValue) != null ? B : t.defaultValue
              , A = r(T);
            return Kd(A, t.modelValue) || e("update:modelValue", A),
            A
        }
        ;
        let i;
        const o = ie()
          , s = ie(n())
          , a = ae( () => t.disabled || t.disableMinus || +s.value <= +t.min)
          , l = ae( () => t.disabled || t.disablePlus || +s.value >= +t.max)
          , c = ae( () => ({
            width: rt(t.inputWidth),
            height: rt(t.buttonSize)
        }))
          , u = ae( () => $l(t.buttonSize))
          , f = () => {
            const B = r(s.value);
            Kd(B, s.value) || (s.value = B)
        }
          , d = B => {
            t.beforeChange ? Eu(t.beforeChange, {
                args: [B],
                done() {
                    s.value = B
                }
            }) : s.value = B
        }
          , h = () => {
            if (i === "plus" && l.value || i === "minus" && a.value) {
                e("overlimit", i);
                return
            }
            const B = i === "minus" ? -t.step : +t.step
              , T = r(f7(+s.value, B));
            d(T),
            e(i)
        }
          , x = B => {
            const T = B.target
              , {value: A} = T
              , {decimalLength: w} = t;
            let S = dy(String(A), !t.integer);
            if (Lt(w) && S.includes(".")) {
                const F = S.split(".");
                S = `${F[0]}.${F[1].slice(0, +w)}`
            }
            t.beforeChange ? T.value = String(s.value) : Kd(A, S) || (T.value = S);
            const D = S === String(+S);
            d(D ? +S : S)
        }
          , y = B => {
            var T;
            t.disableInput ? (T = o.value) == null || T.blur() : e("focus", B)
        }
          , m = B => {
            const T = B.target
              , A = r(T.value, t.autoFixed);
            T.value = String(A),
            s.value = A,
            Xe( () => {
                e("blur", B),
                a7()
            }
            )
        }
        ;
        let E, g;
        const p = () => {
            g = setTimeout( () => {
                h(),
                p()
            }
            , sre)
        }
          , v = () => {
            t.longPress && (E = !1,
            clearTimeout(g),
            g = setTimeout( () => {
                E = !0,
                h(),
                p()
            }
            , g7))
        }
          , _ = B => {
            t.longPress && (clearTimeout(g),
            E && Rr(B))
        }
          , b = B => {
            t.disableInput && Rr(B)
        }
          , C = B => ({
            onClick: T => {
                Rr(T),
                i = B,
                h()
            }
            ,
            onTouchstartPassive: () => {
                i = B,
                v()
            }
            ,
            onTouchend: _,
            onTouchcancel: _
        });
        return me( () => [t.max, t.min, t.integer, t.decimalLength], f),
        me( () => t.modelValue, B => {
            Kd(B, s.value) || (s.value = r(B))
        }
        ),
        me(s, B => {
            e("update:modelValue", B),
            e("change", B, {
                name: t.name
            })
        }
        ),
        Ll( () => t.modelValue),
        () => O("div", {
            role: "group",
            class: Xd([t.theme])
        }, [hi(O("button", st({
            type: "button",
            style: u.value,
            class: [Xd("minus", {
                disabled: a.value
            }), {
                [cs]: !a.value
            }],
            "aria-disabled": a.value || void 0
        }, C("minus")), null), [[pi, t.showMinus]]), hi(O("input", {
            ref: o,
            type: t.integer ? "tel" : "text",
            role: "spinbutton",
            class: Xd("input"),
            value: s.value,
            style: c.value,
            disabled: t.disabled,
            readonly: t.disableInput,
            inputmode: t.integer ? "numeric" : "decimal",
            placeholder: t.placeholder,
            autocomplete: "off",
            "aria-valuemax": t.max,
            "aria-valuemin": t.min,
            "aria-valuenow": s.value,
            onBlur: m,
            onInput: x,
            onFocus: y,
            onMousedown: b
        }, null), [[pi, t.showInput]]), hi(O("button", st({
            type: "button",
            style: u.value,
            class: [Xd("plus", {
                disabled: l.value
            }), {
                [cs]: !l.value
            }],
            "aria-disabled": l.value || void 0
        }, C("plus")), null), [[pi, t.showPlus]])])
    }
});
const F4e = Oe(lre)
  , [cre,yr,ure] = Se("uploader");
function z9(t, e) {
    return new Promise(r => {
        if (e === "file") {
            r();
            return
        }
        const n = new FileReader;
        n.onload = i => {
            r(i.target.result)
        }
        ,
        e === "dataUrl" ? n.readAsDataURL(t) : e === "text" && n.readAsText(t)
    }
    )
}
function mD(t, e) {
    return bx(t).some(r => r.file ? Wc(e) ? e(r.file) : r.file.size > +e : !1)
}
function fre(t, e) {
    const r = []
      , n = [];
    return t.forEach(i => {
        mD(i, e) ? n.push(i) : r.push(i)
    }
    ),
    {
        valid: r,
        invalid: n
    }
}
const dre = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i
  , hre = t => dre.test(t);
function vD(t) {
    return t.isImage ? !0 : t.file && t.file.type ? t.file.type.indexOf("image") === 0 : t.url ? hre(t.url) : typeof t.content == "string" ? t.content.indexOf("data:image") === 0 : !1
}
var xre = be({
    props: {
        name: Ae,
        item: fn(Object),
        index: Number,
        imageFit: String,
        lazyLoad: Boolean,
        deletable: Boolean,
        reupload: Boolean,
        previewSize: [Number, String, Array],
        beforeDelete: Function
    },
    emits: ["delete", "preview", "reupload"],
    setup(t, {emit: e, slots: r}) {
        const n = () => {
            const {status: u, message: f} = t.item;
            if (u === "uploading" || u === "failed") {
                const d = u === "failed" ? O(rr, {
                    name: "close",
                    class: yr("mask-icon")
                }, null) : O(ys, {
                    class: yr("loading")
                }, null)
                  , h = Lt(f) && f !== "";
                return O("div", {
                    class: yr("mask")
                }, [d, h && O("div", {
                    class: yr("mask-message")
                }, [f])])
            }
        }
          , i = u => {
            const {name: f, item: d, index: h, beforeDelete: x} = t;
            u.stopPropagation(),
            Eu(x, {
                args: [d, {
                    name: f,
                    index: h
                }],
                done: () => e("delete")
            })
        }
          , o = () => e("preview")
          , s = () => e("reupload")
          , a = () => {
            if (t.deletable && t.item.status !== "uploading") {
                const u = r["preview-delete"];
                return O("div", {
                    role: "button",
                    class: yr("preview-delete", {
                        shadow: !u
                    }),
                    tabindex: 0,
                    "aria-label": ure("delete"),
                    onClick: i
                }, [u ? u() : O(rr, {
                    name: "cross",
                    class: yr("preview-delete-icon")
                }, null)])
            }
        }
          , l = () => {
            if (r["preview-cover"]) {
                const {index: u, item: f} = t;
                return O("div", {
                    class: yr("preview-cover")
                }, [r["preview-cover"](We({
                    index: u
                }, f))])
            }
        }
          , c = () => {
            const {item: u, lazyLoad: f, imageFit: d, previewSize: h, reupload: x} = t;
            return vD(u) ? O(q7, {
                fit: d,
                src: u.objectUrl || u.content || u.url,
                class: yr("preview-image"),
                width: Array.isArray(h) ? h[0] : h,
                height: Array.isArray(h) ? h[1] : h,
                lazyLoad: f,
                onClick: x ? s : o
            }, {
                default: l
            }) : O("div", {
                class: yr("file"),
                style: $l(t.previewSize)
            }, [O(rr, {
                class: yr("file-icon"),
                name: "description"
            }, null), O("div", {
                class: [yr("file-name"), "van-ellipsis"]
            }, [u.file ? u.file.name : u.url]), l()])
        }
        ;
        return () => O("div", {
            class: yr("preview")
        }, [c(), n(), a()])
    }
});
const pre = {
    name: ze(""),
    accept: Ie("image/*"),
    capture: String,
    multiple: Boolean,
    disabled: Boolean,
    readonly: Boolean,
    lazyLoad: Boolean,
    maxCount: ze(1 / 0),
    imageFit: Ie("cover"),
    resultType: Ie("dataUrl"),
    uploadIcon: Ie("photograph"),
    uploadText: String,
    deletable: Ee,
    reupload: Boolean,
    afterRead: Function,
    showUpload: Ee,
    modelValue: ls(),
    beforeRead: Function,
    beforeDelete: Function,
    previewSize: [Number, String, Array],
    previewImage: Ee,
    previewOptions: Object,
    previewFullImage: Ee,
    maxSize: {
        type: [Number, String, Function],
        default: 1 / 0
    }
};
var gre = be({
    name: cre,
    props: pre,
    emits: ["delete", "oversize", "clickUpload", "closePreview", "clickPreview", "clickReupload", "update:modelValue"],
    setup(t, {emit: e, slots: r}) {
        const n = ie()
          , i = []
          , o = ie(-1)
          , s = ie(!1)
          , a = (B=t.modelValue.length) => ({
            name: t.name,
            index: B
        })
          , l = () => {
            n.value && (n.value.value = "")
        }
          , c = B => {
            if (l(),
            mD(B, t.maxSize))
                if (Array.isArray(B)) {
                    const T = fre(B, t.maxSize);
                    if (B = T.valid,
                    e("oversize", T.invalid, a()),
                    !B.length)
                        return
                } else {
                    e("oversize", B, a());
                    return
                }
            if (B = Pt(B),
            o.value > -1) {
                const T = [...t.modelValue];
                T.splice(o.value, 1, B),
                e("update:modelValue", T),
                o.value = -1
            } else
                e("update:modelValue", [...t.modelValue, ...bx(B)]);
            t.afterRead && t.afterRead(B, a())
        }
          , u = B => {
            const {maxCount: T, modelValue: A, resultType: w} = t;
            if (Array.isArray(B)) {
                const S = +T - A.length;
                B.length > S && (B = B.slice(0, S)),
                Promise.all(B.map(D => z9(D, w))).then(D => {
                    const F = B.map( (R, P) => {
                        const N = {
                            file: R,
                            status: "",
                            message: "",
                            objectUrl: URL.createObjectURL(R)
                        };
                        return D[P] && (N.content = D[P]),
                        N
                    }
                    );
                    c(F)
                }
                )
            } else
                z9(B, w).then(S => {
                    const D = {
                        file: B,
                        status: "",
                        message: "",
                        objectUrl: URL.createObjectURL(B)
                    };
                    S && (D.content = S),
                    c(D)
                }
                )
        }
          , f = B => {
            const {files: T} = B.target;
            if (t.disabled || !T || !T.length)
                return;
            const A = T.length === 1 ? T[0] : [].slice.call(T);
            if (t.beforeRead) {
                const w = t.beforeRead(A, a());
                if (!w) {
                    l();
                    return
                }
                if (b2(w)) {
                    w.then(S => {
                        u(S || A)
                    }
                    ).catch(l);
                    return
                }
            }
            u(A)
        }
        ;
        let d;
        const h = () => e("closePreview")
          , x = B => {
            if (t.previewFullImage) {
                const T = t.modelValue.filter(vD)
                  , A = T.map(w => (w.objectUrl && !w.url && w.status !== "failed" && (w.url = w.objectUrl,
                i.push(w.url)),
                w.url)).filter(Boolean);
                d = nee(We({
                    images: A,
                    startPosition: T.indexOf(B),
                    onClose: h
                }, t.previewOptions))
            }
        }
          , y = () => {
            d && d.close()
        }
          , m = (B, T) => {
            const A = t.modelValue.slice(0);
            A.splice(T, 1),
            e("update:modelValue", A),
            e("delete", B, a(T))
        }
          , E = B => {
            s.value = !0,
            o.value = B,
            Xe( () => C())
        }
          , g = () => {
            s.value || (o.value = -1),
            s.value = !1
        }
          , p = (B, T) => {
            const A = ["imageFit", "deletable", "reupload", "previewSize", "beforeDelete"]
              , w = We($t(t, A), $t(B, A, !0));
            return O(xre, st({
                item: B,
                index: T,
                onClick: () => e(t.reupload ? "clickReupload" : "clickPreview", B, a(T)),
                onDelete: () => m(B, T),
                onPreview: () => x(B),
                onReupload: () => E(T)
            }, $t(t, ["name", "lazyLoad"]), w), $t(r, ["preview-cover", "preview-delete"]))
        }
          , v = () => {
            if (t.previewImage)
                return t.modelValue.map(p)
        }
          , _ = B => e("clickUpload", B)
          , b = () => {
            const B = t.modelValue.length < +t.maxCount
              , T = t.readonly ? null : O("input", {
                ref: n,
                type: "file",
                class: yr("input"),
                accept: t.accept,
                capture: t.capture,
                multiple: t.multiple && o.value === -1,
                disabled: t.disabled,
                onChange: f,
                onClick: g
            }, null);
            return r.default ? hi(O("div", {
                class: yr("input-wrapper"),
                onClick: _
            }, [r.default(), T]), [[pi, B]]) : hi(O("div", {
                class: yr("upload", {
                    readonly: t.readonly
                }),
                style: $l(t.previewSize),
                onClick: _
            }, [O(rr, {
                name: t.uploadIcon,
                class: yr("upload-icon")
            }, null), t.uploadText && O("span", {
                class: yr("upload-text")
            }, [t.uploadText]), T]), [[pi, t.showUpload && B]])
        }
          , C = () => {
            n.value && !t.disabled && n.value.click()
        }
        ;
        return Zn( () => {
            i.forEach(B => URL.revokeObjectURL(B))
        }
        ),
        Kt({
            chooseFile: C,
            reuploadFile: E,
            closeImagePreview: y
        }),
        Ll( () => t.modelValue),
        () => O("div", {
            class: yr()
        }, [O("div", {
            class: yr("wrapper", {
                disabled: t.disabled
            })
        }, [v(), b()])])
    }
});
const P4e = Oe(gre);
/*!
  * shared v11.2.2
  * (c) 2025 kazuya kawaguchi
  * Released under the MIT License.
  */
function Eo(t, e) {
    typeof console < "u" && (console.warn("[intlify] " + t),
    e && console.warn(e.stack))
}
const j9 = {};
function L2(t) {
    j9[t] || (j9[t] = !0,
    Eo(t))
}
const $i = typeof window < "u";
let Vn, ml;
{
    const t = $i && window.performance;
    t && t.mark && t.measure && t.clearMarks && t.clearMeasures && (Vn = e => {
        t.mark(e)
    }
    ,
    ml = (e, r, n) => {
        t.measure(e, r, n),
        t.clearMarks(r),
        t.clearMarks(n)
    }
    )
}
const mre = /\{([0-9a-zA-Z]+)\}/g;
function Qp(t, ...e) {
    return e.length === 1 && ot(e[0]) && (e = e[0]),
    (!e || !e.hasOwnProperty) && (e = {}),
    t.replace(mre, (r, n) => e.hasOwnProperty(n) ? e[n] : "")
}
const So = (t, e=!1) => e ? Symbol.for(t) : Symbol(t)
  , vre = (t, e, r) => yre({
    l: t,
    k: e,
    s: r
})
  , yre = t => JSON.stringify(t).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027")
  , ur = t => typeof t == "number" && isFinite(t)
  , Ere = t => $2(t) === "[object Date]"
  , qc = t => $2(t) === "[object RegExp]"
  , e1 = t => Ze(t) && Object.keys(t).length === 0
  , wr = Object.assign
  , _re = Object.create
  , At = (t=null) => _re(t);
let W9;
const Ya = () => W9 || (W9 = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : At());
function Y9(t) {
    return t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/\//g, "&#x2F;").replace(/=/g, "&#x3D;")
}
function X9(t) {
    return t.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/</g, "&lt;").replace(/>/g, "&gt;")
}
function bre(t) {
    return t = t.replace(/(\w+)\s*=\s*"([^"]*)"/g, (n, i, o) => `${i}="${X9(o)}"`),
    t = t.replace(/(\w+)\s*=\s*'([^']*)'/g, (n, i, o) => `${i}='${X9(o)}'`),
    /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(t) && (Eo("Potentially dangerous event handlers detected in translation. Consider removing onclick, onerror, etc. from your translation messages."),
    t = t.replace(/(\s+)(on)(\w+\s*=)/gi, "$1&#111;n$3")),
    [/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi, /(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(n => {
        t = t.replace(n, "$1javascript&#58;")
    }
    ),
    t
}
const Cre = Object.prototype.hasOwnProperty;
function Oi(t, e) {
    return Cre.call(t, e)
}
const Wt = Array.isArray
  , wt = t => typeof t == "function"
  , Ce = t => typeof t == "string"
  , ct = t => typeof t == "boolean"
  , ot = t => t !== null && typeof t == "object"
  , Are = t => ot(t) && wt(t.then) && wt(t.catch)
  , yD = Object.prototype.toString
  , $2 = t => yD.call(t)
  , Ze = t => $2(t) === "[object Object]"
  , wre = t => t == null ? "" : Wt(t) || Ze(t) && t.toString === yD ? JSON.stringify(t, null, 2) : String(t);
function U2(t, e="") {
    return t.reduce( (r, n, i) => i === 0 ? r + n : r + e + n, "")
}
const K9 = 2;
function Bre(t, e=0, r=t.length) {
    const n = t.split(/\r?\n/);
    let i = 0;
    const o = [];
    for (let s = 0; s < n.length; s++)
        if (i += n[s].length + 1,
        i >= e) {
            for (let a = s - K9; a <= s + K9 || r > i; a++) {
                if (a < 0 || a >= n.length)
                    continue;
                const l = a + 1;
                o.push(`${l}${" ".repeat(3 - String(l).length)}|  ${n[a]}`);
                const c = n[a].length;
                if (a === s) {
                    const u = e - (i - c) + 1
                      , f = Math.max(1, r > i ? c - u : r - e);
                    o.push("   |  " + " ".repeat(u) + "^".repeat(f))
                } else if (a > s) {
                    if (r > i) {
                        const u = Math.max(Math.min(r - i, c), 1);
                        o.push("   |  " + "^".repeat(u))
                    }
                    i += c + 1
                }
            }
            break
        }
    return o.join(`
`)
}
function G2() {
    const t = new Map;
    return {
        events: t,
        on(r, n) {
            const i = t.get(r);
            i && i.push(n) || t.set(r, [n])
        },
        off(r, n) {
            const i = t.get(r);
            i && i.splice(i.indexOf(n) >>> 0, 1)
        },
        emit(r, n) {
            (t.get(r) || []).slice().map(i => i(n)),
            (t.get("*") || []).slice().map(i => i(r, n))
        }
    }
}
const qd = t => !ot(t) || Wt(t);
function zh(t, e) {
    if (qd(t) || qd(e))
        throw new Error("Invalid value");
    const r = [{
        src: t,
        des: e
    }];
    for (; r.length; ) {
        const {src: n, des: i} = r.pop();
        Object.keys(n).forEach(o => {
            o !== "__proto__" && (ot(n[o]) && !ot(i[o]) && (i[o] = Array.isArray(n[o]) ? [] : At()),
            qd(i[o]) || qd(n[o]) ? i[o] = n[o] : r.push({
                src: n[o],
                des: i[o]
            }))
        }
        )
    }
}
/*!
  * message-compiler v11.2.2
  * (c) 2025 kazuya kawaguchi
  * Released under the MIT License.
  */
function Sre(t, e, r) {
    return {
        line: t,
        column: e,
        offset: r
    }
}
function Cy(t, e, r) {
    const n = {
        start: t,
        end: e
    };
    return r != null && (n.source = r),
    n
}
const Ge = {
    EXPECTED_TOKEN: 1,
    INVALID_TOKEN_IN_PLACEHOLDER: 2,
    UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
    UNKNOWN_ESCAPE_SEQUENCE: 4,
    INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
    UNBALANCED_CLOSING_BRACE: 6,
    UNTERMINATED_CLOSING_BRACE: 7,
    EMPTY_PLACEHOLDER: 8,
    NOT_ALLOW_NEST_PLACEHOLDER: 9,
    INVALID_LINKED_FORMAT: 10,
    MUST_HAVE_MESSAGES_IN_PLURAL: 11,
    UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
    UNEXPECTED_EMPTY_LINKED_KEY: 13,
    UNEXPECTED_LEXICAL_ANALYSIS: 14,
    UNHANDLED_CODEGEN_NODE_TYPE: 15,
    UNHANDLED_MINIFIER_NODE_TYPE: 16
}
  , Tre = 17
  , Dre = {
    [Ge.EXPECTED_TOKEN]: "Expected token: '{0}'",
    [Ge.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'",
    [Ge.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: "Unterminated single quote in placeholder",
    [Ge.UNKNOWN_ESCAPE_SEQUENCE]: "Unknown escape sequence: \\{0}",
    [Ge.INVALID_UNICODE_ESCAPE_SEQUENCE]: "Invalid unicode escape sequence: {0}",
    [Ge.UNBALANCED_CLOSING_BRACE]: "Unbalanced closing brace",
    [Ge.UNTERMINATED_CLOSING_BRACE]: "Unterminated closing brace",
    [Ge.EMPTY_PLACEHOLDER]: "Empty placeholder",
    [Ge.NOT_ALLOW_NEST_PLACEHOLDER]: "Not allowed nest placeholder",
    [Ge.INVALID_LINKED_FORMAT]: "Invalid linked format",
    [Ge.MUST_HAVE_MESSAGES_IN_PLURAL]: "Plural must have messages",
    [Ge.UNEXPECTED_EMPTY_LINKED_MODIFIER]: "Unexpected empty linked modifier",
    [Ge.UNEXPECTED_EMPTY_LINKED_KEY]: "Unexpected empty linked key",
    [Ge.UNEXPECTED_LEXICAL_ANALYSIS]: "Unexpected lexical analysis in token: '{0}'",
    [Ge.UNHANDLED_CODEGEN_NODE_TYPE]: "unhandled codegen node type: '{0}'",
    [Ge.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'"
};
function bu(t, e, r={}) {
    const {domain: n, messages: i, args: o} = r
      , s = Qp((i || Dre)[t] || "", ...o || [])
      , a = new SyntaxError(String(s));
    return a.code = t,
    e && (a.location = e),
    a.domain = n,
    a
}
function Fre(t) {
    throw t
}
const Pre = /<\/?[\w\s="/.':;#-\/]+>/
  , Ire = t => Pre.test(t)
  , Xi = " "
  , Ore = "\r"
  , Wr = `
`
  , kre = String.fromCharCode(8232)
  , Rre = String.fromCharCode(8233);
function Mre(t) {
    const e = t;
    let r = 0
      , n = 1
      , i = 1
      , o = 0;
    const s = C => e[C] === Ore && e[C + 1] === Wr
      , a = C => e[C] === Wr
      , l = C => e[C] === Rre
      , c = C => e[C] === kre
      , u = C => s(C) || a(C) || l(C) || c(C)
      , f = () => r
      , d = () => n
      , h = () => i
      , x = () => o
      , y = C => s(C) || l(C) || c(C) ? Wr : e[C]
      , m = () => y(r)
      , E = () => y(r + o);
    function g() {
        return o = 0,
        u(r) && (n++,
        i = 0),
        s(r) && r++,
        r++,
        i++,
        e[r]
    }
    function p() {
        return s(r + o) && o++,
        o++,
        e[r + o]
    }
    function v() {
        r = 0,
        n = 1,
        i = 1,
        o = 0
    }
    function _(C=0) {
        o = C
    }
    function b() {
        const C = r + o;
        for (; C !== r; )
            g();
        o = 0
    }
    return {
        index: f,
        line: d,
        column: h,
        peekOffset: x,
        charAt: y,
        currentChar: m,
        currentPeek: E,
        next: g,
        peek: p,
        reset: v,
        resetPeek: _,
        skipToPeek: b
    }
}
const Io = void 0
  , Nre = "."
  , q9 = "'"
  , Lre = "tokenizer";
function $re(t, e={}) {
    const r = e.location !== !1
      , n = Mre(t)
      , i = () => n.index()
      , o = () => Sre(n.line(), n.column(), n.index())
      , s = o()
      , a = i()
      , l = {
        currentType: 13,
        offset: a,
        startLoc: s,
        endLoc: s,
        lastType: 13,
        lastOffset: a,
        lastStartLoc: s,
        lastEndLoc: s,
        braceNest: 0,
        inLinked: !1,
        text: ""
    }
      , c = () => l
      , {onError: u} = e;
    function f(k, L, Y, ...ee) {
        const de = c();
        if (L.column += Y,
        L.offset += Y,
        u) {
            const ye = r ? Cy(de.startLoc, L) : null
              , pe = bu(k, ye, {
                domain: Lre,
                args: ee
            });
            u(pe)
        }
    }
    function d(k, L, Y) {
        k.endLoc = o(),
        k.currentType = L;
        const ee = {
            type: L
        };
        return r && (ee.loc = Cy(k.startLoc, k.endLoc)),
        Y != null && (ee.value = Y),
        ee
    }
    const h = k => d(k, 13);
    function x(k, L) {
        return k.currentChar() === L ? (k.next(),
        L) : (f(Ge.EXPECTED_TOKEN, o(), 0, L),
        "")
    }
    function y(k) {
        let L = "";
        for (; k.currentPeek() === Xi || k.currentPeek() === Wr; )
            L += k.currentPeek(),
            k.peek();
        return L
    }
    function m(k) {
        const L = y(k);
        return k.skipToPeek(),
        L
    }
    function E(k) {
        if (k === Io)
            return !1;
        const L = k.charCodeAt(0);
        return L >= 97 && L <= 122 || L >= 65 && L <= 90 || L === 95
    }
    function g(k) {
        if (k === Io)
            return !1;
        const L = k.charCodeAt(0);
        return L >= 48 && L <= 57
    }
    function p(k, L) {
        const {currentType: Y} = L;
        if (Y !== 2)
            return !1;
        y(k);
        const ee = E(k.currentPeek());
        return k.resetPeek(),
        ee
    }
    function v(k, L) {
        const {currentType: Y} = L;
        if (Y !== 2)
            return !1;
        y(k);
        const ee = k.currentPeek() === "-" ? k.peek() : k.currentPeek()
          , de = g(ee);
        return k.resetPeek(),
        de
    }
    function _(k, L) {
        const {currentType: Y} = L;
        if (Y !== 2)
            return !1;
        y(k);
        const ee = k.currentPeek() === q9;
        return k.resetPeek(),
        ee
    }
    function b(k, L) {
        const {currentType: Y} = L;
        if (Y !== 7)
            return !1;
        y(k);
        const ee = k.currentPeek() === ".";
        return k.resetPeek(),
        ee
    }
    function C(k, L) {
        const {currentType: Y} = L;
        if (Y !== 8)
            return !1;
        y(k);
        const ee = E(k.currentPeek());
        return k.resetPeek(),
        ee
    }
    function B(k, L) {
        const {currentType: Y} = L;
        if (!(Y === 7 || Y === 11))
            return !1;
        y(k);
        const ee = k.currentPeek() === ":";
        return k.resetPeek(),
        ee
    }
    function T(k, L) {
        const {currentType: Y} = L;
        if (Y !== 9)
            return !1;
        const ee = () => {
            const ye = k.currentPeek();
            return ye === "{" ? E(k.peek()) : ye === "@" || ye === "|" || ye === ":" || ye === "." || ye === Xi || !ye ? !1 : ye === Wr ? (k.peek(),
            ee()) : w(k, !1)
        }
          , de = ee();
        return k.resetPeek(),
        de
    }
    function A(k) {
        y(k);
        const L = k.currentPeek() === "|";
        return k.resetPeek(),
        L
    }
    function w(k, L=!0) {
        const Y = (de=!1, ye="") => {
            const pe = k.currentPeek();
            return pe === "{" || pe === "@" || !pe ? de : pe === "|" ? !(ye === Xi || ye === Wr) : pe === Xi ? (k.peek(),
            Y(!0, Xi)) : pe === Wr ? (k.peek(),
            Y(!0, Wr)) : !0
        }
          , ee = Y();
        return L && k.resetPeek(),
        ee
    }
    function S(k, L) {
        const Y = k.currentChar();
        return Y === Io ? Io : L(Y) ? (k.next(),
        Y) : null
    }
    function D(k) {
        const L = k.charCodeAt(0);
        return L >= 97 && L <= 122 || L >= 65 && L <= 90 || L >= 48 && L <= 57 || L === 95 || L === 36
    }
    function F(k) {
        return S(k, D)
    }
    function R(k) {
        const L = k.charCodeAt(0);
        return L >= 97 && L <= 122 || L >= 65 && L <= 90 || L >= 48 && L <= 57 || L === 95 || L === 36 || L === 45
    }
    function P(k) {
        return S(k, R)
    }
    function N(k) {
        const L = k.charCodeAt(0);
        return L >= 48 && L <= 57
    }
    function j(k) {
        return S(k, N)
    }
    function K(k) {
        const L = k.charCodeAt(0);
        return L >= 48 && L <= 57 || L >= 65 && L <= 70 || L >= 97 && L <= 102
    }
    function oe(k) {
        return S(k, K)
    }
    function U(k) {
        let L = ""
          , Y = "";
        for (; L = j(k); )
            Y += L;
        return Y
    }
    function $(k) {
        let L = "";
        for (; ; ) {
            const Y = k.currentChar();
            if (Y === "{" || Y === "}" || Y === "@" || Y === "|" || !Y)
                break;
            if (Y === Xi || Y === Wr)
                if (w(k))
                    L += Y,
                    k.next();
                else {
                    if (A(k))
                        break;
                    L += Y,
                    k.next()
                }
            else
                L += Y,
                k.next()
        }
        return L
    }
    function V(k) {
        m(k);
        let L = ""
          , Y = "";
        for (; L = P(k); )
            Y += L;
        const ee = k.currentChar();
        if (ee && ee !== "}" && ee !== Io && ee !== Xi && ee !== Wr && ee !== "　") {
            const de = he(k);
            return f(Ge.INVALID_TOKEN_IN_PLACEHOLDER, o(), 0, Y + de),
            Y + de
        }
        return k.currentChar() === Io && f(Ge.UNTERMINATED_CLOSING_BRACE, o(), 0),
        Y
    }
    function W(k) {
        m(k);
        let L = "";
        return k.currentChar() === "-" ? (k.next(),
        L += `-${U(k)}`) : L += U(k),
        k.currentChar() === Io && f(Ge.UNTERMINATED_CLOSING_BRACE, o(), 0),
        L
    }
    function H(k) {
        return k !== q9 && k !== Wr
    }
    function Q(k) {
        m(k),
        x(k, "'");
        let L = ""
          , Y = "";
        for (; L = S(k, H); )
            L === "\\" ? Y += G(k) : Y += L;
        const ee = k.currentChar();
        return ee === Wr || ee === Io ? (f(Ge.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, o(), 0),
        ee === Wr && (k.next(),
        x(k, "'")),
        Y) : (x(k, "'"),
        Y)
    }
    function G(k) {
        const L = k.currentChar();
        switch (L) {
        case "\\":
        case "'":
            return k.next(),
            `\\${L}`;
        case "u":
            return re(k, L, 4);
        case "U":
            return re(k, L, 6);
        default:
            return f(Ge.UNKNOWN_ESCAPE_SEQUENCE, o(), 0, L),
            ""
        }
    }
    function re(k, L, Y) {
        x(k, L);
        let ee = "";
        for (let de = 0; de < Y; de++) {
            const ye = oe(k);
            if (!ye) {
                f(Ge.INVALID_UNICODE_ESCAPE_SEQUENCE, o(), 0, `\\${L}${ee}${k.currentChar()}`);
                break
            }
            ee += ye
        }
        return `\\${L}${ee}`
    }
    function te(k) {
        return k !== "{" && k !== "}" && k !== Xi && k !== Wr
    }
    function he(k) {
        m(k);
        let L = ""
          , Y = "";
        for (; L = S(k, te); )
            Y += L;
        return Y
    }
    function xe(k) {
        let L = ""
          , Y = "";
        for (; L = F(k); )
            Y += L;
        return Y
    }
    function ve(k) {
        const L = Y => {
            const ee = k.currentChar();
            return ee === "{" || ee === "@" || ee === "|" || ee === "(" || ee === ")" || !ee || ee === Xi ? Y : (Y += ee,
            k.next(),
            L(Y))
        }
        ;
        return L("")
    }
    function I(k) {
        m(k);
        const L = x(k, "|");
        return m(k),
        L
    }
    function z(k, L) {
        let Y = null;
        switch (k.currentChar()) {
        case "{":
            return L.braceNest >= 1 && f(Ge.NOT_ALLOW_NEST_PLACEHOLDER, o(), 0),
            k.next(),
            Y = d(L, 2, "{"),
            m(k),
            L.braceNest++,
            Y;
        case "}":
            return L.braceNest > 0 && L.currentType === 2 && f(Ge.EMPTY_PLACEHOLDER, o(), 0),
            k.next(),
            Y = d(L, 3, "}"),
            L.braceNest--,
            L.braceNest > 0 && m(k),
            L.inLinked && L.braceNest === 0 && (L.inLinked = !1),
            Y;
        case "@":
            return L.braceNest > 0 && f(Ge.UNTERMINATED_CLOSING_BRACE, o(), 0),
            Y = q(k, L) || h(L),
            L.braceNest = 0,
            Y;
        default:
            {
                let de = !0
                  , ye = !0
                  , pe = !0;
                if (A(k))
                    return L.braceNest > 0 && f(Ge.UNTERMINATED_CLOSING_BRACE, o(), 0),
                    Y = d(L, 1, I(k)),
                    L.braceNest = 0,
                    L.inLinked = !1,
                    Y;
                if (L.braceNest > 0 && (L.currentType === 4 || L.currentType === 5 || L.currentType === 6))
                    return f(Ge.UNTERMINATED_CLOSING_BRACE, o(), 0),
                    L.braceNest = 0,
                    ce(k, L);
                if (de = p(k, L))
                    return Y = d(L, 4, V(k)),
                    m(k),
                    Y;
                if (ye = v(k, L))
                    return Y = d(L, 5, W(k)),
                    m(k),
                    Y;
                if (pe = _(k, L))
                    return Y = d(L, 6, Q(k)),
                    m(k),
                    Y;
                if (!de && !ye && !pe)
                    return Y = d(L, 12, he(k)),
                    f(Ge.INVALID_TOKEN_IN_PLACEHOLDER, o(), 0, Y.value),
                    m(k),
                    Y;
                break
            }
        }
        return Y
    }
    function q(k, L) {
        const {currentType: Y} = L;
        let ee = null;
        const de = k.currentChar();
        switch ((Y === 7 || Y === 8 || Y === 11 || Y === 9) && (de === Wr || de === Xi) && f(Ge.INVALID_LINKED_FORMAT, o(), 0),
        de) {
        case "@":
            return k.next(),
            ee = d(L, 7, "@"),
            L.inLinked = !0,
            ee;
        case ".":
            return m(k),
            k.next(),
            d(L, 8, ".");
        case ":":
            return m(k),
            k.next(),
            d(L, 9, ":");
        default:
            return A(k) ? (ee = d(L, 1, I(k)),
            L.braceNest = 0,
            L.inLinked = !1,
            ee) : b(k, L) || B(k, L) ? (m(k),
            q(k, L)) : C(k, L) ? (m(k),
            d(L, 11, xe(k))) : T(k, L) ? (m(k),
            de === "{" ? z(k, L) || ee : d(L, 10, ve(k))) : (Y === 7 && f(Ge.INVALID_LINKED_FORMAT, o(), 0),
            L.braceNest = 0,
            L.inLinked = !1,
            ce(k, L))
        }
    }
    function ce(k, L) {
        let Y = {
            type: 13
        };
        if (L.braceNest > 0)
            return z(k, L) || h(L);
        if (L.inLinked)
            return q(k, L) || h(L);
        switch (k.currentChar()) {
        case "{":
            return z(k, L) || h(L);
        case "}":
            return f(Ge.UNBALANCED_CLOSING_BRACE, o(), 0),
            k.next(),
            d(L, 3, "}");
        case "@":
            return q(k, L) || h(L);
        default:
            {
                if (A(k))
                    return Y = d(L, 1, I(k)),
                    L.braceNest = 0,
                    L.inLinked = !1,
                    Y;
                if (w(k))
                    return d(L, 0, $(k));
                break
            }
        }
        return Y
    }
    function fe() {
        const {currentType: k, offset: L, startLoc: Y, endLoc: ee} = l;
        return l.lastType = k,
        l.lastOffset = L,
        l.lastStartLoc = Y,
        l.lastEndLoc = ee,
        l.offset = i(),
        l.startLoc = o(),
        n.currentChar() === Io ? d(l, 13) : ce(n, l)
    }
    return {
        nextToken: fe,
        currentOffset: i,
        currentPosition: o,
        context: c
    }
}
const Ure = "parser"
  , Gre = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
function Hre(t, e, r) {
    switch (t) {
    case "\\\\":
        return "\\";
    case "\\'":
        return "'";
    default:
        {
            const n = parseInt(e || r, 16);
            return n <= 55295 || n >= 57344 ? String.fromCodePoint(n) : "�"
        }
    }
}
function Vre(t={}) {
    const e = t.location !== !1
      , {onError: r} = t;
    function n(E, g, p, v, ..._) {
        const b = E.currentPosition();
        if (b.offset += v,
        b.column += v,
        r) {
            const C = e ? Cy(p, b) : null
              , B = bu(g, C, {
                domain: Ure,
                args: _
            });
            r(B)
        }
    }
    function i(E, g, p) {
        const v = {
            type: E
        };
        return e && (v.start = g,
        v.end = g,
        v.loc = {
            start: p,
            end: p
        }),
        v
    }
    function o(E, g, p, v) {
        e && (E.end = g,
        E.loc && (E.loc.end = p))
    }
    function s(E, g) {
        const p = E.context()
          , v = i(3, p.offset, p.startLoc);
        return v.value = g,
        o(v, E.currentOffset(), E.currentPosition()),
        v
    }
    function a(E, g) {
        const p = E.context()
          , {lastOffset: v, lastStartLoc: _} = p
          , b = i(5, v, _);
        return b.index = parseInt(g, 10),
        E.nextToken(),
        o(b, E.currentOffset(), E.currentPosition()),
        b
    }
    function l(E, g) {
        const p = E.context()
          , {lastOffset: v, lastStartLoc: _} = p
          , b = i(4, v, _);
        return b.key = g,
        E.nextToken(),
        o(b, E.currentOffset(), E.currentPosition()),
        b
    }
    function c(E, g) {
        const p = E.context()
          , {lastOffset: v, lastStartLoc: _} = p
          , b = i(9, v, _);
        return b.value = g.replace(Gre, Hre),
        E.nextToken(),
        o(b, E.currentOffset(), E.currentPosition()),
        b
    }
    function u(E) {
        const g = E.nextToken()
          , p = E.context()
          , {lastOffset: v, lastStartLoc: _} = p
          , b = i(8, v, _);
        return g.type !== 11 ? (n(E, Ge.UNEXPECTED_EMPTY_LINKED_MODIFIER, p.lastStartLoc, 0),
        b.value = "",
        o(b, v, _),
        {
            nextConsumeToken: g,
            node: b
        }) : (g.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, Ki(g)),
        b.value = g.value || "",
        o(b, E.currentOffset(), E.currentPosition()),
        {
            node: b
        })
    }
    function f(E, g) {
        const p = E.context()
          , v = i(7, p.offset, p.startLoc);
        return v.value = g,
        o(v, E.currentOffset(), E.currentPosition()),
        v
    }
    function d(E) {
        const g = E.context()
          , p = i(6, g.offset, g.startLoc);
        let v = E.nextToken();
        if (v.type === 8) {
            const _ = u(E);
            p.modifier = _.node,
            v = _.nextConsumeToken || E.nextToken()
        }
        switch (v.type !== 9 && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ki(v)),
        v = E.nextToken(),
        v.type === 2 && (v = E.nextToken()),
        v.type) {
        case 10:
            v.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ki(v)),
            p.key = f(E, v.value || "");
            break;
        case 4:
            v.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ki(v)),
            p.key = l(E, v.value || "");
            break;
        case 5:
            v.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ki(v)),
            p.key = a(E, v.value || "");
            break;
        case 6:
            v.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ki(v)),
            p.key = c(E, v.value || "");
            break;
        default:
            {
                n(E, Ge.UNEXPECTED_EMPTY_LINKED_KEY, g.lastStartLoc, 0);
                const _ = E.context()
                  , b = i(7, _.offset, _.startLoc);
                return b.value = "",
                o(b, _.offset, _.startLoc),
                p.key = b,
                o(p, _.offset, _.startLoc),
                {
                    nextConsumeToken: v,
                    node: p
                }
            }
        }
        return o(p, E.currentOffset(), E.currentPosition()),
        {
            node: p
        }
    }
    function h(E) {
        const g = E.context()
          , p = g.currentType === 1 ? E.currentOffset() : g.offset
          , v = g.currentType === 1 ? g.endLoc : g.startLoc
          , _ = i(2, p, v);
        _.items = [];
        let b = null;
        do {
            const T = b || E.nextToken();
            switch (b = null,
            T.type) {
            case 0:
                T.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ki(T)),
                _.items.push(s(E, T.value || ""));
                break;
            case 5:
                T.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ki(T)),
                _.items.push(a(E, T.value || ""));
                break;
            case 4:
                T.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ki(T)),
                _.items.push(l(E, T.value || ""));
                break;
            case 6:
                T.value == null && n(E, Ge.UNEXPECTED_LEXICAL_ANALYSIS, g.lastStartLoc, 0, Ki(T)),
                _.items.push(c(E, T.value || ""));
                break;
            case 7:
                {
                    const A = d(E);
                    _.items.push(A.node),
                    b = A.nextConsumeToken || null;
                    break
                }
            }
        } while (g.currentType !== 13 && g.currentType !== 1);
        const C = g.currentType === 1 ? g.lastOffset : E.currentOffset()
          , B = g.currentType === 1 ? g.lastEndLoc : E.currentPosition();
        return o(_, C, B),
        _
    }
    function x(E, g, p, v) {
        const _ = E.context();
        let b = v.items.length === 0;
        const C = i(1, g, p);
        C.cases = [],
        C.cases.push(v);
        do {
            const B = h(E);
            b || (b = B.items.length === 0),
            C.cases.push(B)
        } while (_.currentType !== 13);
        return b && n(E, Ge.MUST_HAVE_MESSAGES_IN_PLURAL, p, 0),
        o(C, E.currentOffset(), E.currentPosition()),
        C
    }
    function y(E) {
        const g = E.context()
          , {offset: p, startLoc: v} = g
          , _ = h(E);
        return g.currentType === 13 ? _ : x(E, p, v, _)
    }
    function m(E) {
        const g = $re(E, wr({}, t))
          , p = g.context()
          , v = i(0, p.offset, p.startLoc);
        return e && v.loc && (v.loc.source = E),
        v.body = y(g),
        t.onCacheKey && (v.cacheKey = t.onCacheKey(E)),
        p.currentType !== 13 && n(g, Ge.UNEXPECTED_LEXICAL_ANALYSIS, p.lastStartLoc, 0, E[p.offset] || ""),
        o(v, g.currentOffset(), g.currentPosition()),
        v
    }
    return {
        parse: m
    }
}
function Ki(t) {
    if (t.type === 13)
        return "EOF";
    const e = (t.value || "").replace(/\r?\n/gu, "\\n");
    return e.length > 10 ? e.slice(0, 9) + "…" : e
}
function zre(t, e={}) {
    const r = {
        ast: t,
        helpers: new Set
    };
    return {
        context: () => r,
        helper: o => (r.helpers.add(o),
        o)
    }
}
function Z9(t, e) {
    for (let r = 0; r < t.length; r++)
        H2(t[r], e)
}
function H2(t, e) {
    switch (t.type) {
    case 1:
        Z9(t.cases, e),
        e.helper("plural");
        break;
    case 2:
        Z9(t.items, e);
        break;
    case 6:
        {
            H2(t.key, e),
            e.helper("linked"),
            e.helper("type");
            break
        }
    case 5:
        e.helper("interpolate"),
        e.helper("list");
        break;
    case 4:
        e.helper("interpolate"),
        e.helper("named");
        break
    }
}
function jre(t, e={}) {
    const r = zre(t);
    r.helper("normalize"),
    t.body && H2(t.body, r);
    const n = r.context();
    t.helpers = Array.from(n.helpers)
}
function Wre(t) {
    const e = t.body;
    return e.type === 2 ? J9(e) : e.cases.forEach(r => J9(r)),
    t
}
function J9(t) {
    if (t.items.length === 1) {
        const e = t.items[0];
        (e.type === 3 || e.type === 9) && (t.static = e.value,
        delete e.value)
    } else {
        const e = [];
        for (let r = 0; r < t.items.length; r++) {
            const n = t.items[r];
            if (!(n.type === 3 || n.type === 9) || n.value == null)
                break;
            e.push(n.value)
        }
        if (e.length === t.items.length) {
            t.static = U2(e);
            for (let r = 0; r < t.items.length; r++) {
                const n = t.items[r];
                (n.type === 3 || n.type === 9) && delete n.value
            }
        }
    }
}
const Yre = "minifier";
function pc(t) {
    switch (t.t = t.type,
    t.type) {
    case 0:
        {
            const e = t;
            pc(e.body),
            e.b = e.body,
            delete e.body;
            break
        }
    case 1:
        {
            const e = t
              , r = e.cases;
            for (let n = 0; n < r.length; n++)
                pc(r[n]);
            e.c = r,
            delete e.cases;
            break
        }
    case 2:
        {
            const e = t
              , r = e.items;
            for (let n = 0; n < r.length; n++)
                pc(r[n]);
            e.i = r,
            delete e.items,
            e.static && (e.s = e.static,
            delete e.static);
            break
        }
    case 3:
    case 9:
    case 8:
    case 7:
        {
            const e = t;
            e.value && (e.v = e.value,
            delete e.value);
            break
        }
    case 6:
        {
            const e = t;
            pc(e.key),
            e.k = e.key,
            delete e.key,
            e.modifier && (pc(e.modifier),
            e.m = e.modifier,
            delete e.modifier);
            break
        }
    case 5:
        {
            const e = t;
            e.i = e.index,
            delete e.index;
            break
        }
    case 4:
        {
            const e = t;
            e.k = e.key,
            delete e.key;
            break
        }
    default:
        throw bu(Ge.UNHANDLED_MINIFIER_NODE_TYPE, null, {
            domain: Yre,
            args: [t.type]
        })
    }
    delete t.type
}
const Xre = "parser";
function Kre(t, e) {
    const {sourceMap: r, filename: n, breakLineCode: i, needIndent: o} = e
      , s = e.location !== !1
      , a = {
        filename: n,
        code: "",
        column: 1,
        line: 1,
        offset: 0,
        map: void 0,
        breakLineCode: i,
        needIndent: o,
        indentLevel: 0
    };
    s && t.loc && (a.source = t.loc.source);
    const l = () => a;
    function c(m, E) {
        a.code += m
    }
    function u(m, E=!0) {
        const g = E ? i : "";
        c(o ? g + "  ".repeat(m) : g)
    }
    function f(m=!0) {
        const E = ++a.indentLevel;
        m && u(E)
    }
    function d(m=!0) {
        const E = --a.indentLevel;
        m && u(E)
    }
    function h() {
        u(a.indentLevel)
    }
    return {
        context: l,
        push: c,
        indent: f,
        deindent: d,
        newline: h,
        helper: m => `_${m}`,
        needIndent: () => a.needIndent
    }
}
function qre(t, e) {
    const {helper: r} = t;
    t.push(`${r("linked")}(`),
    Zc(t, e.key),
    e.modifier ? (t.push(", "),
    Zc(t, e.modifier),
    t.push(", _type")) : t.push(", undefined, _type"),
    t.push(")")
}
function Zre(t, e) {
    const {helper: r, needIndent: n} = t;
    t.push(`${r("normalize")}([`),
    t.indent(n());
    const i = e.items.length;
    for (let o = 0; o < i && (Zc(t, e.items[o]),
    o !== i - 1); o++)
        t.push(", ");
    t.deindent(n()),
    t.push("])")
}
function Jre(t, e) {
    const {helper: r, needIndent: n} = t;
    if (e.cases.length > 1) {
        t.push(`${r("plural")}([`),
        t.indent(n());
        const i = e.cases.length;
        for (let o = 0; o < i && (Zc(t, e.cases[o]),
        o !== i - 1); o++)
            t.push(", ");
        t.deindent(n()),
        t.push("])")
    }
}
function Qre(t, e) {
    e.body ? Zc(t, e.body) : t.push("null")
}
function Zc(t, e) {
    const {helper: r} = t;
    switch (e.type) {
    case 0:
        Qre(t, e);
        break;
    case 1:
        Jre(t, e);
        break;
    case 2:
        Zre(t, e);
        break;
    case 6:
        qre(t, e);
        break;
    case 8:
        t.push(JSON.stringify(e.value), e);
        break;
    case 7:
        t.push(JSON.stringify(e.value), e);
        break;
    case 5:
        t.push(`${r("interpolate")}(${r("list")}(${e.index}))`, e);
        break;
    case 4:
        t.push(`${r("interpolate")}(${r("named")}(${JSON.stringify(e.key)}))`, e);
        break;
    case 9:
        t.push(JSON.stringify(e.value), e);
        break;
    case 3:
        t.push(JSON.stringify(e.value), e);
        break;
    default:
        throw bu(Ge.UNHANDLED_CODEGEN_NODE_TYPE, null, {
            domain: Xre,
            args: [e.type]
        })
    }
}
const ene = (t, e={}) => {
    const r = Ce(e.mode) ? e.mode : "normal"
      , n = Ce(e.filename) ? e.filename : "message.intl"
      , i = !!e.sourceMap
      , o = e.breakLineCode != null ? e.breakLineCode : r === "arrow" ? ";" : `
`
      , s = e.needIndent ? e.needIndent : r !== "arrow"
      , a = t.helpers || []
      , l = Kre(t, {
        mode: r,
        filename: n,
        sourceMap: i,
        breakLineCode: o,
        needIndent: s
    });
    l.push(r === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"),
    l.indent(s),
    a.length > 0 && (l.push(`const { ${U2(a.map(f => `${f}: _${f}`), ", ")} } = ctx`),
    l.newline()),
    l.push("return "),
    Zc(l, t),
    l.deindent(s),
    l.push("}"),
    delete t.helpers;
    const {code: c, map: u} = l.context();
    return {
        ast: t,
        code: c,
        map: u ? u.toJSON() : void 0
    }
}
;
function tne(t, e={}) {
    const r = wr({}, e)
      , n = !!r.jit
      , i = !!r.minify
      , o = r.optimize == null ? !0 : r.optimize
      , a = Vre(r).parse(t);
    return n ? (o && Wre(a),
    i && pc(a),
    {
        ast: a,
        code: ""
    }) : (jre(a, r),
    ene(a, r))
}
/*!
  * core-base v11.2.2
  * (c) 2025 kazuya kawaguchi
  * Released under the MIT License.
  */
function rne() {
    typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ya().__INTLIFY_PROD_DEVTOOLS__ = !1),
    typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ya().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1)
}
function gi(t) {
    return ot(t) && V2(t) === 0 && (Oi(t, "b") || Oi(t, "body"))
}
const ED = ["b", "body"];
function nne(t) {
    return ga(t, ED)
}
const _D = ["c", "cases"];
function ine(t) {
    return ga(t, _D, [])
}
const bD = ["s", "static"];
function one(t) {
    return ga(t, bD)
}
const CD = ["i", "items"];
function sne(t) {
    return ga(t, CD, [])
}
const AD = ["t", "type"];
function V2(t) {
    return ga(t, AD)
}
const wD = ["v", "value"];
function Zd(t, e) {
    const r = ga(t, wD);
    if (r != null)
        return r;
    throw ff(e)
}
const BD = ["m", "modifier"];
function ane(t) {
    return ga(t, BD)
}
const SD = ["k", "key"];
function lne(t) {
    const e = ga(t, SD);
    if (e)
        return e;
    throw ff(6)
}
function ga(t, e, r) {
    for (let n = 0; n < e.length; n++) {
        const i = e[n];
        if (Oi(t, i) && t[i] != null)
            return t[i]
    }
    return r
}
const TD = [...ED, ..._D, ...bD, ...CD, ...SD, ...BD, ...wD, ...AD];
function ff(t) {
    return new Error(`unhandled node type: ${t}`)
}
function hg(t) {
    return r => cne(r, t)
}
function cne(t, e) {
    const r = nne(e);
    if (r == null)
        throw ff(0);
    if (V2(r) === 1) {
        const o = ine(r);
        return t.plural(o.reduce( (s, a) => [...s, Q9(t, a)], []))
    } else
        return Q9(t, r)
}
function Q9(t, e) {
    const r = one(e);
    if (r != null)
        return t.type === "text" ? r : t.normalize([r]);
    {
        const n = sne(e).reduce( (i, o) => [...i, Ay(t, o)], []);
        return t.normalize(n)
    }
}
function Ay(t, e) {
    const r = V2(e);
    switch (r) {
    case 3:
        return Zd(e, r);
    case 9:
        return Zd(e, r);
    case 4:
        {
            const n = e;
            if (Oi(n, "k") && n.k)
                return t.interpolate(t.named(n.k));
            if (Oi(n, "key") && n.key)
                return t.interpolate(t.named(n.key));
            throw ff(r)
        }
    case 5:
        {
            const n = e;
            if (Oi(n, "i") && ur(n.i))
                return t.interpolate(t.list(n.i));
            if (Oi(n, "index") && ur(n.index))
                return t.interpolate(t.list(n.index));
            throw ff(r)
        }
    case 6:
        {
            const n = e
              , i = ane(n)
              , o = lne(n);
            return t.linked(Ay(t, o), i ? Ay(t, i) : void 0, t.type)
        }
    case 7:
        return Zd(e, r);
    case 8:
        return Zd(e, r);
    default:
        throw new Error(`unhandled node on format message part: ${r}`)
    }
}
const une = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";
function fne(t, e) {
    e && Ire(t) && Eo(Qp(une, {
        source: t
    }))
}
const dne = t => t;
let Jd = At();
function hne(t, e={}) {
    let r = !1;
    const n = e.onError || Fre;
    return e.onError = i => {
        r = !0,
        n(i)
    }
    ,
    {
        ...tne(t, e),
        detectError: r
    }
}
function xne(t, e) {
    if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && Ce(t)) {
        const r = ct(e.warnHtmlMessage) ? e.warnHtmlMessage : !0;
        fne(t, r);
        const i = (e.onCacheKey || dne)(t)
          , o = Jd[i];
        if (o)
            return o;
        const {ast: s, detectError: a} = hne(t, {
            ...e,
            location: !0,
            jit: !0
        })
          , l = hg(s);
        return a ? l : Jd[i] = l
    } else {
        if (!gi(t))
            return Eo(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),
            () => t;
        const r = t.cacheKey;
        if (r) {
            const n = Jd[r];
            return n || (Jd[r] = hg(t))
        } else
            return hg(t)
    }
}
let df = null;
function pne(t) {
    df = t
}
function gne(t, e, r) {
    df && df.emit("i18n:init", {
        timestamp: Date.now(),
        i18n: t,
        version: e,
        meta: r
    })
}
const mne = vne("function:translate");
function vne(t) {
    return e => df && df.emit(t, e)
}
const Kr = {
    INVALID_ARGUMENT: Tre,
    INVALID_DATE_ARGUMENT: 18,
    INVALID_ISO_DATE_ARGUMENT: 19,
    NOT_SUPPORT_NON_STRING_MESSAGE: 20,
    NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21,
    NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22,
    NOT_SUPPORT_LOCALE_TYPE: 23
}
  , yne = 24;
function Ko(t) {
    return bu(t, null, {
        messages: Ene
    })
}
const Ene = {
    [Kr.INVALID_ARGUMENT]: "Invalid arguments",
    [Kr.INVALID_DATE_ARGUMENT]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.",
    [Kr.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string",
    [Kr.NOT_SUPPORT_NON_STRING_MESSAGE]: "Not support non-string message",
    [Kr.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: "cannot support promise value",
    [Kr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: "cannot support async function",
    [Kr.NOT_SUPPORT_LOCALE_TYPE]: "cannot support locale type"
};
function z2(t, e) {
    return e.locale != null ? eA(e.locale) : eA(t.locale)
}
let xg;
function eA(t) {
    if (Ce(t))
        return t;
    if (wt(t)) {
        if (t.resolvedOnce && xg != null)
            return xg;
        if (t.constructor.name === "Function") {
            const e = t();
            if (Are(e))
                throw Ko(Kr.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
            return xg = e
        } else
            throw Ko(Kr.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)
    } else
        throw Ko(Kr.NOT_SUPPORT_LOCALE_TYPE)
}
function _ne(t, e, r) {
    return [...new Set([r, ...Wt(e) ? e : ot(e) ? Object.keys(e) : Ce(e) ? [e] : [r]])]
}
function DD(t, e, r) {
    const n = Ce(r) ? r : hf
      , i = t;
    i.__localeChainCache || (i.__localeChainCache = new Map);
    let o = i.__localeChainCache.get(n);
    if (!o) {
        o = [];
        let s = [r];
        for (; Wt(s); )
            s = tA(o, s, e);
        const a = Wt(e) || !Ze(e) ? e : e.default ? e.default : null;
        s = Ce(a) ? [a] : a,
        Wt(s) && tA(o, s, !1),
        i.__localeChainCache.set(n, o)
    }
    return o
}
function tA(t, e, r) {
    let n = !0;
    for (let i = 0; i < e.length && ct(n); i++) {
        const o = e[i];
        Ce(o) && (n = bne(t, e[i], r))
    }
    return n
}
function bne(t, e, r) {
    let n;
    const i = e.split("-");
    do {
        const o = i.join("-");
        n = Cne(t, o, r),
        i.splice(-1, 1)
    } while (i.length && n === !0);
    return n
}
function Cne(t, e, r) {
    let n = !1;
    if (!t.includes(e) && (n = !0,
    e)) {
        n = e[e.length - 1] !== "!";
        const i = e.replace(/!/g, "");
        t.push(i),
        (Wt(r) || Ze(r)) && r[i] && (n = r[i])
    }
    return n
}
const ma = [];
ma[0] = {
    w: [0],
    i: [3, 0],
    "[": [4],
    o: [7]
};
ma[1] = {
    w: [1],
    ".": [2],
    "[": [4],
    o: [7]
};
ma[2] = {
    w: [2],
    i: [3, 0],
    0: [3, 0]
};
ma[3] = {
    i: [3, 0],
    0: [3, 0],
    w: [1, 1],
    ".": [2, 1],
    "[": [4, 1],
    o: [7, 1]
};
ma[4] = {
    "'": [5, 0],
    '"': [6, 0],
    "[": [4, 2],
    "]": [1, 3],
    o: 8,
    l: [4, 0]
};
ma[5] = {
    "'": [4, 0],
    o: 8,
    l: [5, 0]
};
ma[6] = {
    '"': [4, 0],
    o: 8,
    l: [6, 0]
};
const Ane = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
function wne(t) {
    return Ane.test(t)
}
function Bne(t) {
    const e = t.charCodeAt(0)
      , r = t.charCodeAt(t.length - 1);
    return e === r && (e === 34 || e === 39) ? t.slice(1, -1) : t
}
function Sne(t) {
    if (t == null)
        return "o";
    switch (t.charCodeAt(0)) {
    case 91:
    case 93:
    case 46:
    case 34:
    case 39:
        return t;
    case 95:
    case 36:
    case 45:
        return "i";
    case 9:
    case 10:
    case 13:
    case 160:
    case 65279:
    case 8232:
    case 8233:
        return "w"
    }
    return "i"
}
function Tne(t) {
    const e = t.trim();
    return t.charAt(0) === "0" && isNaN(parseInt(t)) ? !1 : wne(e) ? Bne(e) : "*" + e
}
function Dne(t) {
    const e = [];
    let r = -1, n = 0, i = 0, o, s, a, l, c, u, f;
    const d = [];
    d[0] = () => {
        s === void 0 ? s = a : s += a
    }
    ,
    d[1] = () => {
        s !== void 0 && (e.push(s),
        s = void 0)
    }
    ,
    d[2] = () => {
        d[0](),
        i++
    }
    ,
    d[3] = () => {
        if (i > 0)
            i--,
            n = 4,
            d[0]();
        else {
            if (i = 0,
            s === void 0 || (s = Tne(s),
            s === !1))
                return !1;
            d[1]()
        }
    }
    ;
    function h() {
        const x = t[r + 1];
        if (n === 5 && x === "'" || n === 6 && x === '"')
            return r++,
            a = "\\" + x,
            d[0](),
            !0
    }
    for (; n !== null; )
        if (r++,
        o = t[r],
        !(o === "\\" && h())) {
            if (l = Sne(o),
            f = ma[n],
            c = f[l] || f.l || 8,
            c === 8 || (n = c[0],
            c[1] !== void 0 && (u = d[c[1]],
            u && (a = o,
            u() === !1))))
                return;
            if (n === 7)
                return e
        }
}
const rA = new Map;
function Fne(t, e) {
    return ot(t) ? t[e] : null
}
function Pne(t, e) {
    if (!ot(t))
        return null;
    let r = rA.get(e);
    if (r || (r = Dne(e),
    r && rA.set(e, r)),
    !r)
        return null;
    const n = r.length;
    let i = t
      , o = 0;
    for (; o < n; ) {
        const s = r[o];
        if (TD.includes(s) && gi(i))
            return null;
        const a = i[s];
        if (a === void 0 || wt(i))
            return null;
        i = a,
        o++
    }
    return i
}
const bn = {
    NOT_FOUND_KEY: 1,
    FALLBACK_TO_TRANSLATE: 2,
    CANNOT_FORMAT_NUMBER: 3,
    FALLBACK_TO_NUMBER_FORMAT: 4,
    CANNOT_FORMAT_DATE: 5,
    FALLBACK_TO_DATE_FORMAT: 6,
    EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: 7
}
  , Ine = 8
  , One = {
    [bn.NOT_FOUND_KEY]: "Not found '{key}' key in '{locale}' locale messages.",
    [bn.FALLBACK_TO_TRANSLATE]: "Fall back to translate '{key}' key with '{target}' locale.",
    [bn.CANNOT_FORMAT_NUMBER]: "Cannot format a number value due to not supported Intl.NumberFormat.",
    [bn.FALLBACK_TO_NUMBER_FORMAT]: "Fall back to number format '{key}' key with '{target}' locale.",
    [bn.CANNOT_FORMAT_DATE]: "Cannot format a date value due to not supported Intl.DateTimeFormat.",
    [bn.FALLBACK_TO_DATE_FORMAT]: "Fall back to datetime format '{key}' key with '{target}' locale.",
    [bn.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: "This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."
};
function vl(t, ...e) {
    return Qp(One[t], ...e)
}
const kne = "11.2.2"
  , t1 = -1
  , hf = "en-US"
  , Tx = ""
  , nA = t => `${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;
function Rne() {
    return {
        upper: (t, e) => e === "text" && Ce(t) ? t.toUpperCase() : e === "vnode" && ot(t) && "__v_isVNode"in t ? t.children.toUpperCase() : t,
        lower: (t, e) => e === "text" && Ce(t) ? t.toLowerCase() : e === "vnode" && ot(t) && "__v_isVNode"in t ? t.children.toLowerCase() : t,
        capitalize: (t, e) => e === "text" && Ce(t) ? nA(t) : e === "vnode" && ot(t) && "__v_isVNode"in t ? nA(t.children) : t
    }
}
let FD;
function Mne(t) {
    FD = t
}
let PD;
function Nne(t) {
    PD = t
}
let ID;
function Lne(t) {
    ID = t
}
let OD = null;
const $ne = t => {
    OD = t
}
  , Une = () => OD;
let kD = null;
const iA = t => {
    kD = t
}
  , Gne = () => kD;
let oA = 0;
function Hne(t={}) {
    const e = wt(t.onWarn) ? t.onWarn : Eo
      , r = Ce(t.version) ? t.version : kne
      , n = Ce(t.locale) || wt(t.locale) ? t.locale : hf
      , i = wt(n) ? hf : n
      , o = Wt(t.fallbackLocale) || Ze(t.fallbackLocale) || Ce(t.fallbackLocale) || t.fallbackLocale === !1 ? t.fallbackLocale : i
      , s = Ze(t.messages) ? t.messages : pg(i)
      , a = Ze(t.datetimeFormats) ? t.datetimeFormats : pg(i)
      , l = Ze(t.numberFormats) ? t.numberFormats : pg(i)
      , c = wr(At(), t.modifiers, Rne())
      , u = t.pluralRules || At()
      , f = wt(t.missing) ? t.missing : null
      , d = ct(t.missingWarn) || qc(t.missingWarn) ? t.missingWarn : !0
      , h = ct(t.fallbackWarn) || qc(t.fallbackWarn) ? t.fallbackWarn : !0
      , x = !!t.fallbackFormat
      , y = !!t.unresolving
      , m = wt(t.postTranslation) ? t.postTranslation : null
      , E = Ze(t.processor) ? t.processor : null
      , g = ct(t.warnHtmlMessage) ? t.warnHtmlMessage : !0
      , p = !!t.escapeParameter
      , v = wt(t.messageCompiler) ? t.messageCompiler : FD;
    wt(t.messageCompiler) && L2(vl(bn.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
    const _ = wt(t.messageResolver) ? t.messageResolver : PD || Fne
      , b = wt(t.localeFallbacker) ? t.localeFallbacker : ID || _ne
      , C = ot(t.fallbackContext) ? t.fallbackContext : void 0
      , B = t
      , T = ot(B.__datetimeFormatters) ? B.__datetimeFormatters : new Map
      , A = ot(B.__numberFormatters) ? B.__numberFormatters : new Map
      , w = ot(B.__meta) ? B.__meta : {};
    oA++;
    const S = {
        version: r,
        cid: oA,
        locale: n,
        fallbackLocale: o,
        messages: s,
        modifiers: c,
        pluralRules: u,
        missing: f,
        missingWarn: d,
        fallbackWarn: h,
        fallbackFormat: x,
        unresolving: y,
        postTranslation: m,
        processor: E,
        warnHtmlMessage: g,
        escapeParameter: p,
        messageCompiler: v,
        messageResolver: _,
        localeFallbacker: b,
        fallbackContext: C,
        onWarn: e,
        __meta: w
    };
    return S.datetimeFormats = a,
    S.numberFormats = l,
    S.__datetimeFormatters = T,
    S.__numberFormatters = A,
    S.__v_emitter = B.__v_emitter != null ? B.__v_emitter : void 0,
    gne(S, r, w),
    S
}
const pg = t => ({
    [t]: At()
});
function r1(t, e) {
    return t instanceof RegExp ? t.test(e) : t
}
function RD(t, e) {
    return t instanceof RegExp ? t.test(e) : t
}
function j2(t, e, r, n, i) {
    const {missing: o, onWarn: s} = t;
    {
        const a = t.__v_emitter;
        a && a.emit("missing", {
            locale: r,
            key: e,
            type: i,
            groupId: `${i}:${e}`
        })
    }
    if (o !== null) {
        const a = o(t, r, e, i);
        return Ce(a) ? a : e
    } else
        return RD(n, e) && s(vl(bn.NOT_FOUND_KEY, {
            key: e,
            locale: r
        })),
        e
}
function Vu(t, e, r) {
    const n = t;
    n.__localeChainCache = new Map,
    t.localeFallbacker(t, r, e)
}
function MD(t, e) {
    return t === e ? !1 : t.split("-")[0] === e.split("-")[0]
}
function Vne(t, e) {
    const r = e.indexOf(t);
    if (r === -1)
        return !1;
    for (let n = r + 1; n < e.length; n++)
        if (MD(t, e[n]))
            return !0;
    return !1
}
const sA = typeof Intl < "u"
  , ND = {
    dateTimeFormat: sA && typeof Intl.DateTimeFormat < "u",
    numberFormat: sA && typeof Intl.NumberFormat < "u"
};
function aA(t, ...e) {
    const {datetimeFormats: r, unresolving: n, fallbackLocale: i, onWarn: o, localeFallbacker: s} = t
      , {__datetimeFormatters: a} = t;
    if (!ND.dateTimeFormat)
        return o(vl(bn.CANNOT_FORMAT_DATE)),
        Tx;
    const [l,c,u,f] = wy(...e)
      , d = ct(u.missingWarn) ? u.missingWarn : t.missingWarn
      , h = ct(u.fallbackWarn) ? u.fallbackWarn : t.fallbackWarn
      , x = !!u.part
      , y = z2(t, u)
      , m = s(t, i, y);
    if (!Ce(l) || l === "")
        return new Intl.DateTimeFormat(y,f).format(c);
    let E = {}, g, p = null, v = y, _ = null;
    const b = "datetime format";
    for (let T = 0; T < m.length; T++) {
        if (g = _ = m[T],
        y !== g && r1(h, l) && o(vl(bn.FALLBACK_TO_DATE_FORMAT, {
            key: l,
            target: g
        })),
        y !== g) {
            const A = t.__v_emitter;
            A && A.emit("fallback", {
                type: b,
                key: l,
                from: v,
                to: _,
                groupId: `${b}:${l}`
            })
        }
        if (E = r[g] || {},
        p = E[l],
        Ze(p))
            break;
        j2(t, l, g, d, b),
        v = _
    }
    if (!Ze(p) || !Ce(g))
        return n ? t1 : l;
    let C = `${g}__${l}`;
    e1(f) || (C = `${C}__${JSON.stringify(f)}`);
    let B = a.get(C);
    return B || (B = new Intl.DateTimeFormat(g,wr({}, p, f)),
    a.set(C, B)),
    x ? B.formatToParts(c) : B.format(c)
}
const LD = ["localeMatcher", "weekday", "era", "year", "month", "day", "hour", "minute", "second", "timeZoneName", "formatMatcher", "hour12", "timeZone", "dateStyle", "timeStyle", "calendar", "dayPeriod", "numberingSystem", "hourCycle", "fractionalSecondDigits"];
function wy(...t) {
    const [e,r,n,i] = t
      , o = At();
    let s = At(), a;
    if (Ce(e)) {
        const l = e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
        if (!l)
            throw Ko(Kr.INVALID_ISO_DATE_ARGUMENT);
        const c = l[3] ? l[3].trim().startsWith("T") ? `${l[1].trim()}${l[3].trim()}` : `${l[1].trim()}T${l[3].trim()}` : l[1].trim();
        a = new Date(c);
        try {
            a.toISOString()
        } catch {
            throw Ko(Kr.INVALID_ISO_DATE_ARGUMENT)
        }
    } else if (Ere(e)) {
        if (isNaN(e.getTime()))
            throw Ko(Kr.INVALID_DATE_ARGUMENT);
        a = e
    } else if (ur(e))
        a = e;
    else
        throw Ko(Kr.INVALID_ARGUMENT);
    return Ce(r) ? o.key = r : Ze(r) && Object.keys(r).forEach(l => {
        LD.includes(l) ? s[l] = r[l] : o[l] = r[l]
    }
    ),
    Ce(n) ? o.locale = n : Ze(n) && (s = n),
    Ze(i) && (s = i),
    [o.key || "", a, o, s]
}
function lA(t, e, r) {
    const n = t;
    for (const i in r) {
        const o = `${e}__${i}`;
        n.__datetimeFormatters.has(o) && n.__datetimeFormatters.delete(o)
    }
}
function cA(t, ...e) {
    const {numberFormats: r, unresolving: n, fallbackLocale: i, onWarn: o, localeFallbacker: s} = t
      , {__numberFormatters: a} = t;
    if (!ND.numberFormat)
        return o(vl(bn.CANNOT_FORMAT_NUMBER)),
        Tx;
    const [l,c,u,f] = By(...e)
      , d = ct(u.missingWarn) ? u.missingWarn : t.missingWarn
      , h = ct(u.fallbackWarn) ? u.fallbackWarn : t.fallbackWarn
      , x = !!u.part
      , y = z2(t, u)
      , m = s(t, i, y);
    if (!Ce(l) || l === "")
        return new Intl.NumberFormat(y,f).format(c);
    let E = {}, g, p = null, v = y, _ = null;
    const b = "number format";
    for (let T = 0; T < m.length; T++) {
        if (g = _ = m[T],
        y !== g && r1(h, l) && o(vl(bn.FALLBACK_TO_NUMBER_FORMAT, {
            key: l,
            target: g
        })),
        y !== g) {
            const A = t.__v_emitter;
            A && A.emit("fallback", {
                type: b,
                key: l,
                from: v,
                to: _,
                groupId: `${b}:${l}`
            })
        }
        if (E = r[g] || {},
        p = E[l],
        Ze(p))
            break;
        j2(t, l, g, d, b),
        v = _
    }
    if (!Ze(p) || !Ce(g))
        return n ? t1 : l;
    let C = `${g}__${l}`;
    e1(f) || (C = `${C}__${JSON.stringify(f)}`);
    let B = a.get(C);
    return B || (B = new Intl.NumberFormat(g,wr({}, p, f)),
    a.set(C, B)),
    x ? B.formatToParts(c) : B.format(c)
}
const $D = ["localeMatcher", "style", "currency", "currencyDisplay", "currencySign", "useGrouping", "minimumIntegerDigits", "minimumFractionDigits", "maximumFractionDigits", "minimumSignificantDigits", "maximumSignificantDigits", "compactDisplay", "notation", "signDisplay", "unit", "unitDisplay", "roundingMode", "roundingPriority", "roundingIncrement", "trailingZeroDisplay"];
function By(...t) {
    const [e,r,n,i] = t
      , o = At();
    let s = At();
    if (!ur(e))
        throw Ko(Kr.INVALID_ARGUMENT);
    const a = e;
    return Ce(r) ? o.key = r : Ze(r) && Object.keys(r).forEach(l => {
        $D.includes(l) ? s[l] = r[l] : o[l] = r[l]
    }
    ),
    Ce(n) ? o.locale = n : Ze(n) && (s = n),
    Ze(i) && (s = i),
    [o.key || "", a, o, s]
}
function uA(t, e, r) {
    const n = t;
    for (const i in r) {
        const o = `${e}__${i}`;
        n.__numberFormatters.has(o) && n.__numberFormatters.delete(o)
    }
}
const zne = t => t
  , jne = t => ""
  , Wne = "text"
  , Yne = t => t.length === 0 ? "" : U2(t)
  , Xne = wre;
function fA(t, e) {
    return t = Math.abs(t),
    e === 2 ? t ? t > 1 ? 1 : 0 : 1 : t ? Math.min(t, 2) : 0
}
function Kne(t) {
    const e = ur(t.pluralIndex) ? t.pluralIndex : -1;
    return t.named && (ur(t.named.count) || ur(t.named.n)) ? ur(t.named.count) ? t.named.count : ur(t.named.n) ? t.named.n : e : e
}
function qne(t, e) {
    e.count || (e.count = t),
    e.n || (e.n = t)
}
function Zne(t={}) {
    const e = t.locale
      , r = Kne(t)
      , n = ot(t.pluralRules) && Ce(e) && wt(t.pluralRules[e]) ? t.pluralRules[e] : fA
      , i = ot(t.pluralRules) && Ce(e) && wt(t.pluralRules[e]) ? fA : void 0
      , o = E => E[n(r, E.length, i)]
      , s = t.list || []
      , a = E => s[E]
      , l = t.named || At();
    ur(t.pluralIndex) && qne(r, l);
    const c = E => l[E];
    function u(E, g) {
        const p = wt(t.messages) ? t.messages(E, !!g) : ot(t.messages) ? t.messages[E] : !1;
        return p || (t.parent ? t.parent.message(E) : jne)
    }
    const f = E => t.modifiers ? t.modifiers[E] : zne
      , d = Ze(t.processor) && wt(t.processor.normalize) ? t.processor.normalize : Yne
      , h = Ze(t.processor) && wt(t.processor.interpolate) ? t.processor.interpolate : Xne
      , x = Ze(t.processor) && Ce(t.processor.type) ? t.processor.type : Wne
      , m = {
        list: a,
        named: c,
        plural: o,
        linked: (E, ...g) => {
            const [p,v] = g;
            let _ = "text"
              , b = "";
            g.length === 1 ? ot(p) ? (b = p.modifier || b,
            _ = p.type || _) : Ce(p) && (b = p || b) : g.length === 2 && (Ce(p) && (b = p || b),
            Ce(v) && (_ = v || _));
            const C = u(E, !0)(m)
              , B = _ === "vnode" && Wt(C) && b ? C[0] : C;
            return b ? f(b)(B, _) : B
        }
        ,
        message: u,
        type: x,
        interpolate: h,
        normalize: d,
        values: wr(At(), s, l)
    };
    return m
}
const dA = () => ""
  , li = t => wt(t);
function hA(t, ...e) {
    const {fallbackFormat: r, postTranslation: n, unresolving: i, messageCompiler: o, fallbackLocale: s, messages: a} = t
      , [l,c] = Sy(...e)
      , u = ct(c.missingWarn) ? c.missingWarn : t.missingWarn
      , f = ct(c.fallbackWarn) ? c.fallbackWarn : t.fallbackWarn
      , d = ct(c.escapeParameter) ? c.escapeParameter : t.escapeParameter
      , h = !!c.resolvedMessage
      , x = Ce(c.default) || ct(c.default) ? ct(c.default) ? o ? l : () => l : c.default : r ? o ? l : () => l : null
      , y = r || x != null && (Ce(x) || wt(x))
      , m = z2(t, c);
    d && Jne(c);
    let[E,g,p] = h ? [l, m, a[m] || At()] : UD(t, l, m, s, f, u)
      , v = E
      , _ = l;
    if (!h && !(Ce(v) || gi(v) || li(v)) && y && (v = x,
    _ = v),
    !h && (!(Ce(v) || gi(v) || li(v)) || !Ce(g)))
        return i ? t1 : l;
    if (Ce(v) && t.messageCompiler == null)
        return Eo(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${l}'.`),
        l;
    let b = !1;
    const C = () => {
        b = !0
    }
      , B = li(v) ? v : GD(t, l, g, v, _, C);
    if (b)
        return v;
    const T = rie(t, g, p, c)
      , A = Zne(T)
      , w = Qne(t, B, A);
    let S = n ? n(w, l) : w;
    d && Ce(S) && (S = bre(S));
    {
        const D = {
            timestamp: Date.now(),
            key: Ce(l) ? l : li(v) ? v.key : "",
            locale: g || (li(v) ? v.locale : ""),
            format: Ce(v) ? v : li(v) ? v.source : "",
            message: S
        };
        D.meta = wr({}, t.__meta, Une() || {}),
        mne(D)
    }
    return S
}
function Jne(t) {
    Wt(t.list) ? t.list = t.list.map(e => Ce(e) ? Y9(e) : e) : ot(t.named) && Object.keys(t.named).forEach(e => {
        Ce(t.named[e]) && (t.named[e] = Y9(t.named[e]))
    }
    )
}
function UD(t, e, r, n, i, o) {
    const {messages: s, onWarn: a, messageResolver: l, localeFallbacker: c} = t
      , u = c(t, n, r);
    let f = At(), d, h = null, x = r, y = null;
    const m = "translate";
    for (let E = 0; E < u.length; E++) {
        if (d = y = u[E],
        r !== d && !MD(r, d) && r1(i, e) && a(vl(bn.FALLBACK_TO_TRANSLATE, {
            key: e,
            target: d
        })),
        r !== d) {
            const _ = t.__v_emitter;
            _ && _.emit("fallback", {
                type: m,
                key: e,
                from: x,
                to: y,
                groupId: `${m}:${e}`
            })
        }
        f = s[d] || At();
        let g = null, p, v;
        if ($i && (g = window.performance.now(),
        p = "intlify-message-resolve-start",
        v = "intlify-message-resolve-end",
        Vn && Vn(p)),
        (h = l(f, e)) === null && (h = f[e]),
        $i) {
            const _ = window.performance.now()
              , b = t.__v_emitter;
            b && g && h && b.emit("message-resolve", {
                type: "message-resolve",
                key: e,
                message: h,
                time: _ - g,
                groupId: `${m}:${e}`
            }),
            p && v && Vn && ml && (Vn(v),
            ml("intlify message resolve", p, v))
        }
        if (Ce(h) || gi(h) || li(h))
            break;
        if (!Vne(d, u)) {
            const _ = j2(t, e, d, o, m);
            _ !== e && (h = _)
        }
        x = y
    }
    return [h, d, f]
}
function GD(t, e, r, n, i, o) {
    const {messageCompiler: s, warnHtmlMessage: a} = t;
    if (li(n)) {
        const d = n;
        return d.locale = d.locale || r,
        d.key = d.key || e,
        d
    }
    if (s == null) {
        const d = () => n;
        return d.locale = r,
        d.key = e,
        d
    }
    let l = null, c, u;
    $i && (l = window.performance.now(),
    c = "intlify-message-compilation-start",
    u = "intlify-message-compilation-end",
    Vn && Vn(c));
    const f = s(n, eie(t, r, i, n, a, o));
    if ($i) {
        const d = window.performance.now()
          , h = t.__v_emitter;
        h && l && h.emit("message-compilation", {
            type: "message-compilation",
            message: n,
            time: d - l,
            groupId: `translate:${e}`
        }),
        c && u && Vn && ml && (Vn(u),
        ml("intlify message compilation", c, u))
    }
    return f.locale = r,
    f.key = e,
    f.source = n,
    f
}
function Qne(t, e, r) {
    let n = null, i, o;
    $i && (n = window.performance.now(),
    i = "intlify-message-evaluation-start",
    o = "intlify-message-evaluation-end",
    Vn && Vn(i));
    const s = e(r);
    if ($i) {
        const a = window.performance.now()
          , l = t.__v_emitter;
        l && n && l.emit("message-evaluation", {
            type: "message-evaluation",
            value: s,
            time: a - n,
            groupId: `translate:${e.key}`
        }),
        i && o && Vn && ml && (Vn(o),
        ml("intlify message evaluation", i, o))
    }
    return s
}
function Sy(...t) {
    const [e,r,n] = t
      , i = At();
    if (!Ce(e) && !ur(e) && !li(e) && !gi(e))
        throw Ko(Kr.INVALID_ARGUMENT);
    const o = ur(e) ? String(e) : (li(e),
    e);
    return ur(r) ? i.plural = r : Ce(r) ? i.default = r : Ze(r) && !e1(r) ? i.named = r : Wt(r) && (i.list = r),
    ur(n) ? i.plural = n : Ce(n) ? i.default = n : Ze(n) && wr(i, n),
    [o, i]
}
function eie(t, e, r, n, i, o) {
    return {
        locale: e,
        key: r,
        warnHtmlMessage: i,
        onError: s => {
            o && o(s);
            {
                const a = tie(n)
                  , l = `Message compilation error: ${s.message}`
                  , c = s.location && a && Bre(a, s.location.start.offset, s.location.end.offset)
                  , u = t.__v_emitter;
                u && a && u.emit("compile-error", {
                    message: a,
                    error: s.message,
                    start: s.location && s.location.start.offset,
                    end: s.location && s.location.end.offset,
                    groupId: `translate:${r}`
                }),
                console.error(c ? `${l}
${c}` : l)
            }
        }
        ,
        onCacheKey: s => vre(e, r, s)
    }
}
function tie(t) {
    if (Ce(t))
        return t;
    if (t.loc && t.loc.source)
        return t.loc.source
}
function rie(t, e, r, n) {
    const {modifiers: i, pluralRules: o, messageResolver: s, fallbackLocale: a, fallbackWarn: l, missingWarn: c, fallbackContext: u} = t
      , d = {
        locale: e,
        modifiers: i,
        pluralRules: o,
        messages: (h, x) => {
            let y = s(r, h);
            if (y == null && (u || x)) {
                const [,,m] = UD(u || t, h, e, a, l, c);
                y = s(m, h)
            }
            if (Ce(y) || gi(y)) {
                let m = !1;
                const g = GD(t, h, e, y, h, () => {
                    m = !0
                }
                );
                return m ? dA : g
            } else
                return li(y) ? y : dA
        }
    };
    return t.processor && (d.processor = t.processor),
    n.list && (d.list = n.list),
    n.named && (d.named = n.named),
    ur(n.plural) && (d.pluralIndex = n.plural),
    d
}
rne();
/*!
  * vue-i18n v11.2.2
  * (c) 2025 kazuya kawaguchi
  * Released under the MIT License.
  */
const nie = "11.2.2";
function iie() {
    typeof __VUE_I18N_FULL_INSTALL__ != "boolean" && (Ya().__VUE_I18N_FULL_INSTALL__ = !0),
    typeof __VUE_I18N_LEGACY_API__ != "boolean" && (Ya().__VUE_I18N_LEGACY_API__ = !0),
    typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (Ya().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1),
    typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (Ya().__INTLIFY_PROD_DEVTOOLS__ = !1)
}
const St = {
    UNEXPECTED_RETURN_TYPE: yne,
    INVALID_ARGUMENT: 25,
    MUST_BE_CALL_SETUP_TOP: 26,
    NOT_INSTALLED: 27,
    REQUIRED_VALUE: 28,
    INVALID_VALUE: 29,
    CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN: 30,
    NOT_INSTALLED_WITH_PROVIDE: 31,
    UNEXPECTED_ERROR: 32,
    NOT_COMPATIBLE_LEGACY_VUE_I18N: 33,
    NOT_AVAILABLE_COMPOSITION_IN_LEGACY: 34
};
function On(t, ...e) {
    return bu(t, null, {
        messages: oie,
        args: e
    })
}
const oie = {
    [St.UNEXPECTED_RETURN_TYPE]: "Unexpected return type in composer",
    [St.INVALID_ARGUMENT]: "Invalid argument",
    [St.MUST_BE_CALL_SETUP_TOP]: "Must be called at the top of a `setup` function",
    [St.NOT_INSTALLED]: "Need to install with `app.use` function",
    [St.UNEXPECTED_ERROR]: "Unexpected error",
    [St.REQUIRED_VALUE]: "Required in value: {0}",
    [St.INVALID_VALUE]: "Invalid value",
    [St.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]: "Cannot setup vue-devtools plugin",
    [St.NOT_INSTALLED_WITH_PROVIDE]: "Need to install with `provide` function",
    [St.NOT_COMPATIBLE_LEGACY_VUE_I18N]: "Not compatible legacy VueI18n.",
    [St.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: "Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"
}
  , Ty = So("__translateVNode")
  , Dy = So("__datetimeParts")
  , Fy = So("__numberParts")
  , yl = So("__enableEmitter")
  , xf = So("__disableEmitter")
  , HD = So("__setPluralRules")
  , VD = So("__injectWithOption")
  , Py = So("__dispose")
  , ci = {
    FALLBACK_TO_ROOT: Ine,
    NOT_FOUND_PARENT_SCOPE: 9,
    IGNORE_OBJ_FLATTEN: 10,
    DEPRECATE_LEGACY_MODE: 11,
    DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE: 12,
    DUPLICATE_USE_I18N_CALLING: 13
}
  , sie = {
    [ci.FALLBACK_TO_ROOT]: "Fall back to {type} '{key}' with root locale.",
    [ci.NOT_FOUND_PARENT_SCOPE]: "Not found parent scope. use the global scope.",
    [ci.IGNORE_OBJ_FLATTEN]: "Ignore object flatten: '{key}' key has an string value",
    [ci.DEPRECATE_LEGACY_MODE]: `Legacy API mode has been deprecated in v11. Use Composition API mode instead.
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,
    [ci.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]: "'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",
    [ci.DUPLICATE_USE_I18N_CALLING]: "Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."
};
function Jc(t, ...e) {
    return Qp(sie[t], ...e)
}
function pf(t) {
    if (!ot(t) || gi(t))
        return t;
    for (const e in t)
        if (Oi(t, e))
            if (!e.includes("."))
                ot(t[e]) && pf(t[e]);
            else {
                const r = e.split(".")
                  , n = r.length - 1;
                let i = t
                  , o = !1;
                for (let s = 0; s < n; s++) {
                    if (r[s] === "__proto__")
                        throw new Error(`unsafe key: ${r[s]}`);
                    if (r[s]in i || (i[r[s]] = At()),
                    !ot(i[r[s]])) {
                        Eo(Jc(ci.IGNORE_OBJ_FLATTEN, {
                            key: r[s]
                        })),
                        o = !0;
                        break
                    }
                    i = i[r[s]]
                }
                if (o || (gi(i) ? TD.includes(r[n]) || delete t[e] : (i[r[n]] = t[e],
                delete t[e])),
                !gi(i)) {
                    const s = i[r[n]];
                    ot(s) && pf(s)
                }
            }
    return t
}
function W2(t, e) {
    const {messages: r, __i18n: n, messageResolver: i, flatJson: o} = e
      , s = Ze(r) ? r : Wt(n) ? At() : {
        [t]: At()
    };
    if (Wt(n) && n.forEach(a => {
        if ("locale"in a && "resource"in a) {
            const {locale: l, resource: c} = a;
            l ? (s[l] = s[l] || At(),
            zh(c, s[l])) : zh(c, s)
        } else
            Ce(a) && zh(JSON.parse(a), s)
    }
    ),
    i == null && o)
        for (const a in s)
            Oi(s, a) && pf(s[a]);
    return s
}
function zD(t) {
    return t.type
}
function jD(t, e, r) {
    let n = ot(e.messages) ? e.messages : At();
    "__i18nGlobal"in r && (n = W2(t.locale.value, {
        messages: n,
        __i18n: r.__i18nGlobal
    }));
    const i = Object.keys(n);
    i.length && i.forEach(o => {
        t.mergeLocaleMessage(o, n[o])
    }
    );
    {
        if (ot(e.datetimeFormats)) {
            const o = Object.keys(e.datetimeFormats);
            o.length && o.forEach(s => {
                t.mergeDateTimeFormat(s, e.datetimeFormats[s])
            }
            )
        }
        if (ot(e.numberFormats)) {
            const o = Object.keys(e.numberFormats);
            o.length && o.forEach(s => {
                t.mergeNumberFormat(s, e.numberFormats[s])
            }
            )
        }
    }
}
function xA(t) {
    return O(go, null, t, 0)
}
function Mc() {
    return "currentInstance"in Jv ? Jv["currentInstance"] : It()
}
const pA = "__INTLIFY_META__"
  , gA = () => []
  , aie = () => !1;
let mA = 0;
function vA(t) {
    return (e, r, n, i) => t(r, n, Mc() || void 0, i)
}
const lie = () => {
    const t = Mc();
    let e = null;
    return t && (e = zD(t)[pA]) ? {
        [pA]: e
    } : null
}
;
function Y2(t={}) {
    const {__root: e, __injectWithOption: r} = t
      , n = e === void 0
      , i = t.flatJson
      , o = $i ? ie : mp;
    let s = ct(t.inheritLocale) ? t.inheritLocale : !0;
    const a = o(e && s ? e.locale.value : Ce(t.locale) ? t.locale : hf)
      , l = o(e && s ? e.fallbackLocale.value : Ce(t.fallbackLocale) || Wt(t.fallbackLocale) || Ze(t.fallbackLocale) || t.fallbackLocale === !1 ? t.fallbackLocale : a.value)
      , c = o(W2(a.value, t))
      , u = o(Ze(t.datetimeFormats) ? t.datetimeFormats : {
        [a.value]: {}
    })
      , f = o(Ze(t.numberFormats) ? t.numberFormats : {
        [a.value]: {}
    });
    let d = e ? e.missingWarn : ct(t.missingWarn) || qc(t.missingWarn) ? t.missingWarn : !0
      , h = e ? e.fallbackWarn : ct(t.fallbackWarn) || qc(t.fallbackWarn) ? t.fallbackWarn : !0
      , x = e ? e.fallbackRoot : ct(t.fallbackRoot) ? t.fallbackRoot : !0
      , y = !!t.fallbackFormat
      , m = wt(t.missing) ? t.missing : null
      , E = wt(t.missing) ? vA(t.missing) : null
      , g = wt(t.postTranslation) ? t.postTranslation : null
      , p = e ? e.warnHtmlMessage : ct(t.warnHtmlMessage) ? t.warnHtmlMessage : !0
      , v = !!t.escapeParameter;
    const _ = e ? e.modifiers : Ze(t.modifiers) ? t.modifiers : {};
    let b = t.pluralRules || e && e.pluralRules, C;
    C = ( () => {
        n && iA(null);
        const Z = {
            version: nie,
            locale: a.value,
            fallbackLocale: l.value,
            messages: c.value,
            modifiers: _,
            pluralRules: b,
            missing: E === null ? void 0 : E,
            missingWarn: d,
            fallbackWarn: h,
            fallbackFormat: y,
            unresolving: !0,
            postTranslation: g === null ? void 0 : g,
            warnHtmlMessage: p,
            escapeParameter: v,
            messageResolver: t.messageResolver,
            messageCompiler: t.messageCompiler,
            __meta: {
                framework: "vue"
            }
        };
        Z.datetimeFormats = u.value,
        Z.numberFormats = f.value,
        Z.__datetimeFormatters = Ze(C) ? C.__datetimeFormatters : void 0,
        Z.__numberFormatters = Ze(C) ? C.__numberFormatters : void 0,
        Z.__v_emitter = Ze(C) ? C.__v_emitter : void 0;
        const se = Hne(Z);
        return n && iA(se),
        se
    }
    )(),
    Vu(C, a.value, l.value);
    function T() {
        return [a.value, l.value, c.value, u.value, f.value]
    }
    const A = ae({
        get: () => a.value,
        set: Z => {
            C.locale = Z,
            a.value = Z
        }
    })
      , w = ae({
        get: () => l.value,
        set: Z => {
            C.fallbackLocale = Z,
            l.value = Z,
            Vu(C, a.value, Z)
        }
    })
      , S = ae( () => c.value)
      , D = ae( () => u.value)
      , F = ae( () => f.value);
    function R() {
        return wt(g) ? g : null
    }
    function P(Z) {
        g = Z,
        C.postTranslation = Z
    }
    function N() {
        return m
    }
    function j(Z) {
        Z !== null && (E = vA(Z)),
        m = Z,
        C.missing = E
    }
    function K(Z, se) {
        return Z !== "translate" || !se.resolvedMessage
    }
    const oe = (Z, se, we, Ue, et, Ot) => {
        T();
        let Sr;
        try {
            n || (C.fallbackContext = e ? Gne() : void 0),
            Sr = Z(C)
        } finally {
            n || (C.fallbackContext = void 0)
        }
        if (we !== "translate exists" && ur(Sr) && Sr === t1 || we === "translate exists" && !Sr) {
            const [vn,wd] = se();
            if (e && Ce(vn) && K(we, wd)) {
                x && (r1(h, vn) || RD(d, vn)) && Eo(Jc(ci.FALLBACK_TO_ROOT, {
                    key: vn,
                    type: we
                }));
                {
                    const {__v_emitter: _s} = C;
                    _s && x && _s.emit("fallback", {
                        type: we,
                        key: vn,
                        to: "global",
                        groupId: `${we}:${vn}`
                    })
                }
            }
            return e && x ? Ue(e) : et(vn)
        } else {
            if (Ot(Sr))
                return Sr;
            throw On(St.UNEXPECTED_RETURN_TYPE)
        }
    }
    ;
    function U(...Z) {
        return oe(se => Reflect.apply(hA, null, [se, ...Z]), () => Sy(...Z), "translate", se => Reflect.apply(se.t, se, [...Z]), se => se, se => Ce(se))
    }
    function $(...Z) {
        const [se,we,Ue] = Z;
        if (Ue && !ot(Ue))
            throw On(St.INVALID_ARGUMENT);
        return U(se, we, wr({
            resolvedMessage: !0
        }, Ue || {}))
    }
    function V(...Z) {
        return oe(se => Reflect.apply(aA, null, [se, ...Z]), () => wy(...Z), "datetime format", se => Reflect.apply(se.d, se, [...Z]), () => Tx, se => Ce(se) || Wt(se))
    }
    function W(...Z) {
        return oe(se => Reflect.apply(cA, null, [se, ...Z]), () => By(...Z), "number format", se => Reflect.apply(se.n, se, [...Z]), () => Tx, se => Ce(se) || Wt(se))
    }
    function H(Z) {
        return Z.map(se => Ce(se) || ur(se) || ct(se) ? xA(String(se)) : se)
    }
    const G = {
        normalize: H,
        interpolate: Z => Z,
        type: "vnode"
    };
    function re(...Z) {
        return oe(se => {
            let we;
            const Ue = se;
            try {
                Ue.processor = G,
                we = Reflect.apply(hA, null, [Ue, ...Z])
            } finally {
                Ue.processor = null
            }
            return we
        }
        , () => Sy(...Z), "translate", se => se[Ty](...Z), se => [xA(se)], se => Wt(se))
    }
    function te(...Z) {
        return oe(se => Reflect.apply(cA, null, [se, ...Z]), () => By(...Z), "number format", se => se[Fy](...Z), gA, se => Ce(se) || Wt(se))
    }
    function he(...Z) {
        return oe(se => Reflect.apply(aA, null, [se, ...Z]), () => wy(...Z), "datetime format", se => se[Dy](...Z), gA, se => Ce(se) || Wt(se))
    }
    function xe(Z) {
        b = Z,
        C.pluralRules = b
    }
    function ve(Z, se) {
        return oe( () => {
            if (!Z)
                return !1;
            const we = Ce(se) ? se : a.value
              , Ue = q(we)
              , et = C.messageResolver(Ue, Z);
            return gi(et) || li(et) || Ce(et)
        }
        , () => [Z], "translate exists", we => Reflect.apply(we.te, we, [Z, se]), aie, we => ct(we))
    }
    function I(Z) {
        let se = null;
        const we = DD(C, l.value, a.value);
        for (let Ue = 0; Ue < we.length; Ue++) {
            const et = c.value[we[Ue]] || {}
              , Ot = C.messageResolver(et, Z);
            if (Ot != null) {
                se = Ot;
                break
            }
        }
        return se
    }
    function z(Z) {
        const se = I(Z);
        return se ?? (e ? e.tm(Z) || {} : {})
    }
    function q(Z) {
        return c.value[Z] || {}
    }
    function ce(Z, se) {
        if (i) {
            const we = {
                [Z]: se
            };
            for (const Ue in we)
                Oi(we, Ue) && pf(we[Ue]);
            se = we[Z]
        }
        c.value[Z] = se,
        C.messages = c.value
    }
    function fe(Z, se) {
        c.value[Z] = c.value[Z] || {};
        const we = {
            [Z]: se
        };
        if (i)
            for (const Ue in we)
                Oi(we, Ue) && pf(we[Ue]);
        se = we[Z],
        zh(se, c.value[Z]),
        C.messages = c.value
    }
    function k(Z) {
        return u.value[Z] || {}
    }
    function L(Z, se) {
        u.value[Z] = se,
        C.datetimeFormats = u.value,
        lA(C, Z, se)
    }
    function Y(Z, se) {
        u.value[Z] = wr(u.value[Z] || {}, se),
        C.datetimeFormats = u.value,
        lA(C, Z, se)
    }
    function ee(Z) {
        return f.value[Z] || {}
    }
    function de(Z, se) {
        f.value[Z] = se,
        C.numberFormats = f.value,
        uA(C, Z, se)
    }
    function ye(Z, se) {
        f.value[Z] = wr(f.value[Z] || {}, se),
        C.numberFormats = f.value,
        uA(C, Z, se)
    }
    mA++,
    e && $i && (me(e.locale, Z => {
        s && (a.value = Z,
        C.locale = Z,
        Vu(C, a.value, l.value))
    }
    ),
    me(e.fallbackLocale, Z => {
        s && (l.value = Z,
        C.fallbackLocale = Z,
        Vu(C, a.value, l.value))
    }
    ));
    const pe = {
        id: mA,
        locale: A,
        fallbackLocale: w,
        get inheritLocale() {
            return s
        },
        set inheritLocale(Z) {
            s = Z,
            Z && e && (a.value = e.locale.value,
            l.value = e.fallbackLocale.value,
            Vu(C, a.value, l.value))
        },
        get availableLocales() {
            return Object.keys(c.value).sort()
        },
        messages: S,
        get modifiers() {
            return _
        },
        get pluralRules() {
            return b || {}
        },
        get isGlobal() {
            return n
        },
        get missingWarn() {
            return d
        },
        set missingWarn(Z) {
            d = Z,
            C.missingWarn = d
        },
        get fallbackWarn() {
            return h
        },
        set fallbackWarn(Z) {
            h = Z,
            C.fallbackWarn = h
        },
        get fallbackRoot() {
            return x
        },
        set fallbackRoot(Z) {
            x = Z
        },
        get fallbackFormat() {
            return y
        },
        set fallbackFormat(Z) {
            y = Z,
            C.fallbackFormat = y
        },
        get warnHtmlMessage() {
            return p
        },
        set warnHtmlMessage(Z) {
            p = Z,
            C.warnHtmlMessage = Z
        },
        get escapeParameter() {
            return v
        },
        set escapeParameter(Z) {
            v = Z,
            C.escapeParameter = Z
        },
        t: U,
        getLocaleMessage: q,
        setLocaleMessage: ce,
        mergeLocaleMessage: fe,
        getPostTranslationHandler: R,
        setPostTranslationHandler: P,
        getMissingHandler: N,
        setMissingHandler: j,
        [HD]: xe
    };
    return pe.datetimeFormats = D,
    pe.numberFormats = F,
    pe.rt = $,
    pe.te = ve,
    pe.tm = z,
    pe.d = V,
    pe.n = W,
    pe.getDateTimeFormat = k,
    pe.setDateTimeFormat = L,
    pe.mergeDateTimeFormat = Y,
    pe.getNumberFormat = ee,
    pe.setNumberFormat = de,
    pe.mergeNumberFormat = ye,
    pe[VD] = r,
    pe[Ty] = re,
    pe[Dy] = he,
    pe[Fy] = te,
    pe[yl] = Z => {
        C.__v_emitter = Z
    }
    ,
    pe[xf] = () => {
        C.__v_emitter = void 0
    }
    ,
    pe
}
const WD = "vue-i18n: composer properties"
  , gg = {
    "vue-devtools-plugin-vue-i18n": "Vue I18n DevTools",
    "vue-i18n-resource-inspector": "Vue I18n DevTools",
    "vue-i18n-timeline": "Vue I18n"
}
  , cie = {
    "vue-i18n-resource-inspector": "Search for scopes ..."
}
  , uie = {
    "vue-i18n-timeline": 16764185
};
let Iy;
async function fie(t, e) {
    return new Promise( (r, n) => {
        try {
            kp({
                id: "vue-devtools-plugin-vue-i18n",
                label: gg["vue-devtools-plugin-vue-i18n"],
                packageName: "vue-i18n",
                homepage: "https://vue-i18n.intlify.dev",
                logo: "https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",
                componentStateTypes: [WD],
                app: t
            }, i => {
                Iy = i,
                i.on.visitComponentTree( ({componentInstance: s, treeNode: a}) => {
                    die(s, a, e)
                }
                ),
                i.on.inspectComponent( ({componentInstance: s, instanceData: a}) => {
                    s.__VUE_I18N__ && a && (e.mode === "legacy" ? s.__VUE_I18N__ !== e.global.__composer && yA(a, s.__VUE_I18N__) : yA(a, s.__VUE_I18N__))
                }
                ),
                i.addInspector({
                    id: "vue-i18n-resource-inspector",
                    label: gg["vue-i18n-resource-inspector"],
                    icon: "language",
                    treeFilterPlaceholder: cie["vue-i18n-resource-inspector"]
                }),
                i.on.getInspectorTree(s => {
                    s.app === t && s.inspectorId === "vue-i18n-resource-inspector" && mie(s, e)
                }
                );
                const o = new Map;
                i.on.getInspectorState(async s => {
                    if (s.app === t && s.inspectorId === "vue-i18n-resource-inspector")
                        if (i.unhighlightElement(),
                        yie(s, e),
                        s.nodeId === "global") {
                            if (!o.has(s.app)) {
                                const [a] = await i.getComponentInstances(s.app);
                                o.set(s.app, a)
                            }
                            i.highlightElement(o.get(s.app))
                        } else {
                            const a = vie(s.nodeId, e);
                            a && i.highlightElement(a)
                        }
                }
                ),
                i.on.editInspectorState(s => {
                    s.app === t && s.inspectorId === "vue-i18n-resource-inspector" && _ie(s, e)
                }
                ),
                i.addTimelineLayer({
                    id: "vue-i18n-timeline",
                    label: gg["vue-i18n-timeline"],
                    color: uie["vue-i18n-timeline"]
                }),
                r(!0)
            }
            )
        } catch (i) {
            console.error(i),
            n(!1)
        }
    }
    )
}
function YD(t) {
    return t.type.name || t.type.displayName || t.type.__file || "Anonymous"
}
function die(t, e, r) {
    const n = r.mode === "composition" ? r.global : r.global.__composer;
    if (t && t.__VUE_I18N__ && t.__VUE_I18N__ !== n) {
        const i = {
            label: `i18n (${YD(t)} Scope)`,
            textColor: 0,
            backgroundColor: 16764185
        };
        e.tags.push(i)
    }
}
function yA(t, e) {
    const r = WD;
    t.state.push({
        type: r,
        key: "locale",
        editable: !0,
        value: e.locale.value
    }),
    t.state.push({
        type: r,
        key: "availableLocales",
        editable: !1,
        value: e.availableLocales
    }),
    t.state.push({
        type: r,
        key: "fallbackLocale",
        editable: !0,
        value: e.fallbackLocale.value
    }),
    t.state.push({
        type: r,
        key: "inheritLocale",
        editable: !0,
        value: e.inheritLocale
    }),
    t.state.push({
        type: r,
        key: "messages",
        editable: !1,
        value: X2(e.messages.value)
    }),
    t.state.push({
        type: r,
        key: "datetimeFormats",
        editable: !1,
        value: e.datetimeFormats.value
    }),
    t.state.push({
        type: r,
        key: "numberFormats",
        editable: !1,
        value: e.numberFormats.value
    })
}
function X2(t) {
    const e = {};
    return Object.keys(t).forEach(r => {
        const n = t[r];
        wt(n) && "source"in n ? e[r] = gie(n) : gi(n) && n.loc && n.loc.source ? e[r] = n.loc.source : ot(n) ? e[r] = X2(n) : e[r] = n
    }
    ),
    e
}
const hie = {
    "<": "&lt;",
    ">": "&gt;",
    '"': "&quot;",
    "&": "&amp;"
};
function xie(t) {
    return t.replace(/[<>"&]/g, pie)
}
function pie(t) {
    return hie[t] || t
}
function gie(t) {
    return {
        _custom: {
            type: "function",
            display: `<span>ƒ</span> ${t.source ? `("${xie(t.source)}")` : "(?)"}`
        }
    }
}
function mie(t, e) {
    t.rootNodes.push({
        id: "global",
        label: "Global Scope"
    });
    const r = e.mode === "composition" ? e.global : e.global.__composer;
    for (const [n,i] of e.__instances) {
        const o = e.mode === "composition" ? i : i.__composer;
        r !== o && t.rootNodes.push({
            id: o.id.toString(),
            label: `${YD(n)} Scope`
        })
    }
}
function vie(t, e) {
    let r = null;
    if (t !== "global") {
        for (const [n,i] of e.__instances.entries())
            if (i.id.toString() === t) {
                r = n;
                break
            }
    }
    return r
}
function XD(t, e) {
    if (t === "global")
        return e.mode === "composition" ? e.global : e.global.__composer;
    {
        const r = Array.from(e.__instances.values()).find(n => n.id.toString() === t);
        return r ? e.mode === "composition" ? r : r.__composer : null
    }
}
function yie(t, e) {
    const r = XD(t.nodeId, e);
    return r && (t.state = Eie(r)),
    null
}
function Eie(t) {
    const e = {}
      , r = "Locale related info"
      , n = [{
        type: r,
        key: "locale",
        editable: !0,
        value: t.locale.value
    }, {
        type: r,
        key: "fallbackLocale",
        editable: !0,
        value: t.fallbackLocale.value
    }, {
        type: r,
        key: "availableLocales",
        editable: !1,
        value: t.availableLocales
    }, {
        type: r,
        key: "inheritLocale",
        editable: !0,
        value: t.inheritLocale
    }];
    e[r] = n;
    const i = "Locale messages info"
      , o = [{
        type: i,
        key: "messages",
        editable: !1,
        value: X2(t.messages.value)
    }];
    e[i] = o;
    {
        const s = "Datetime formats info"
          , a = [{
            type: s,
            key: "datetimeFormats",
            editable: !1,
            value: t.datetimeFormats.value
        }];
        e[s] = a;
        const l = "Datetime formats info"
          , c = [{
            type: l,
            key: "numberFormats",
            editable: !1,
            value: t.numberFormats.value
        }];
        e[l] = c
    }
    return e
}
function gf(t, e) {
    if (Iy) {
        let r;
        e && "groupId"in e && (r = e.groupId,
        delete e.groupId),
        Iy.addTimelineEvent({
            layerId: "vue-i18n-timeline",
            event: {
                title: t,
                groupId: r,
                time: Date.now(),
                meta: {},
                data: e || {},
                logType: t === "compile-error" ? "error" : t === "fallback" || t === "missing" ? "warning" : "default"
            }
        })
    }
}
function _ie(t, e) {
    const r = XD(t.nodeId, e);
    if (r) {
        const [n] = t.path;
        n === "locale" && Ce(t.state.value) ? r.locale.value = t.state.value : n === "fallbackLocale" && (Ce(t.state.value) || Wt(t.state.value) || ot(t.state.value)) ? r.fallbackLocale.value = t.state.value : n === "inheritLocale" && ct(t.state.value) && (r.inheritLocale = t.state.value)
    }
}
function bie(t) {
    const e = Ce(t.locale) ? t.locale : hf
      , r = Ce(t.fallbackLocale) || Wt(t.fallbackLocale) || Ze(t.fallbackLocale) || t.fallbackLocale === !1 ? t.fallbackLocale : e
      , n = wt(t.missing) ? t.missing : void 0
      , i = ct(t.silentTranslationWarn) || qc(t.silentTranslationWarn) ? !t.silentTranslationWarn : !0
      , o = ct(t.silentFallbackWarn) || qc(t.silentFallbackWarn) ? !t.silentFallbackWarn : !0
      , s = ct(t.fallbackRoot) ? t.fallbackRoot : !0
      , a = !!t.formatFallbackMessages
      , l = Ze(t.modifiers) ? t.modifiers : {}
      , c = t.pluralizationRules
      , u = wt(t.postTranslation) ? t.postTranslation : void 0
      , f = Ce(t.warnHtmlInMessage) ? t.warnHtmlInMessage !== "off" : !0
      , d = !!t.escapeParameterHtml
      , h = ct(t.sync) ? t.sync : !0;
    let x = t.messages;
    if (Ze(t.sharedMessages)) {
        const _ = t.sharedMessages;
        x = Object.keys(_).reduce( (C, B) => {
            const T = C[B] || (C[B] = {});
            return wr(T, _[B]),
            C
        }
        , x || {})
    }
    const {__i18n: y, __root: m, __injectWithOption: E} = t
      , g = t.datetimeFormats
      , p = t.numberFormats
      , v = t.flatJson;
    return {
        locale: e,
        fallbackLocale: r,
        messages: x,
        flatJson: v,
        datetimeFormats: g,
        numberFormats: p,
        missing: n,
        missingWarn: i,
        fallbackWarn: o,
        fallbackRoot: s,
        fallbackFormat: a,
        modifiers: l,
        pluralRules: c,
        postTranslation: u,
        warnHtmlMessage: f,
        escapeParameter: d,
        messageResolver: t.messageResolver,
        inheritLocale: h,
        __i18n: y,
        __root: m,
        __injectWithOption: E
    }
}
function Oy(t={}) {
    const e = Y2(bie(t))
      , {__extender: r} = t
      , n = {
        id: e.id,
        get locale() {
            return e.locale.value
        },
        set locale(i) {
            e.locale.value = i
        },
        get fallbackLocale() {
            return e.fallbackLocale.value
        },
        set fallbackLocale(i) {
            e.fallbackLocale.value = i
        },
        get messages() {
            return e.messages.value
        },
        get datetimeFormats() {
            return e.datetimeFormats.value
        },
        get numberFormats() {
            return e.numberFormats.value
        },
        get availableLocales() {
            return e.availableLocales
        },
        get missing() {
            return e.getMissingHandler()
        },
        set missing(i) {
            e.setMissingHandler(i)
        },
        get silentTranslationWarn() {
            return ct(e.missingWarn) ? !e.missingWarn : e.missingWarn
        },
        set silentTranslationWarn(i) {
            e.missingWarn = ct(i) ? !i : i
        },
        get silentFallbackWarn() {
            return ct(e.fallbackWarn) ? !e.fallbackWarn : e.fallbackWarn
        },
        set silentFallbackWarn(i) {
            e.fallbackWarn = ct(i) ? !i : i
        },
        get modifiers() {
            return e.modifiers
        },
        get formatFallbackMessages() {
            return e.fallbackFormat
        },
        set formatFallbackMessages(i) {
            e.fallbackFormat = i
        },
        get postTranslation() {
            return e.getPostTranslationHandler()
        },
        set postTranslation(i) {
            e.setPostTranslationHandler(i)
        },
        get sync() {
            return e.inheritLocale
        },
        set sync(i) {
            e.inheritLocale = i
        },
        get warnHtmlInMessage() {
            return e.warnHtmlMessage ? "warn" : "off"
        },
        set warnHtmlInMessage(i) {
            e.warnHtmlMessage = i !== "off"
        },
        get escapeParameterHtml() {
            return e.escapeParameter
        },
        set escapeParameterHtml(i) {
            e.escapeParameter = i
        },
        get pluralizationRules() {
            return e.pluralRules || {}
        },
        __composer: e,
        t(...i) {
            return Reflect.apply(e.t, e, [...i])
        },
        rt(...i) {
            return Reflect.apply(e.rt, e, [...i])
        },
        te(i, o) {
            return e.te(i, o)
        },
        tm(i) {
            return e.tm(i)
        },
        getLocaleMessage(i) {
            return e.getLocaleMessage(i)
        },
        setLocaleMessage(i, o) {
            e.setLocaleMessage(i, o)
        },
        mergeLocaleMessage(i, o) {
            e.mergeLocaleMessage(i, o)
        },
        d(...i) {
            return Reflect.apply(e.d, e, [...i])
        },
        getDateTimeFormat(i) {
            return e.getDateTimeFormat(i)
        },
        setDateTimeFormat(i, o) {
            e.setDateTimeFormat(i, o)
        },
        mergeDateTimeFormat(i, o) {
            e.mergeDateTimeFormat(i, o)
        },
        n(...i) {
            return Reflect.apply(e.n, e, [...i])
        },
        getNumberFormat(i) {
            return e.getNumberFormat(i)
        },
        setNumberFormat(i, o) {
            e.setNumberFormat(i, o)
        },
        mergeNumberFormat(i, o) {
            e.mergeNumberFormat(i, o)
        }
    };
    return n.__extender = r,
    n.__enableEmitter = i => {
        const o = e;
        o[yl] && o[yl](i)
    }
    ,
    n.__disableEmitter = () => {
        const i = e;
        i[xf] && i[xf]()
    }
    ,
    n
}
function Cie(t, e, r) {
    return {
        beforeCreate() {
            const n = Mc();
            if (!n)
                throw On(St.UNEXPECTED_ERROR);
            const i = this.$options;
            if (i.i18n) {
                const o = i.i18n;
                if (i.__i18n && (o.__i18n = i.__i18n),
                o.__root = e,
                this === this.$root)
                    this.$i18n = EA(t, o);
                else {
                    o.__injectWithOption = !0,
                    o.__extender = r.__vueI18nExtend,
                    this.$i18n = Oy(o);
                    const s = this.$i18n;
                    s.__extender && (s.__disposer = s.__extender(this.$i18n))
                }
            } else if (i.__i18n)
                if (this === this.$root)
                    this.$i18n = EA(t, i);
                else {
                    this.$i18n = Oy({
                        __i18n: i.__i18n,
                        __injectWithOption: !0,
                        __extender: r.__vueI18nExtend,
                        __root: e
                    });
                    const o = this.$i18n;
                    o.__extender && (o.__disposer = o.__extender(this.$i18n))
                }
            else
                this.$i18n = t;
            i.__i18nGlobal && jD(e, i, i),
            this.$t = (...o) => this.$i18n.t(...o),
            this.$rt = (...o) => this.$i18n.rt(...o),
            this.$te = (o, s) => this.$i18n.te(o, s),
            this.$d = (...o) => this.$i18n.d(...o),
            this.$n = (...o) => this.$i18n.n(...o),
            this.$tm = o => this.$i18n.tm(o),
            r.__setInstance(n, this.$i18n)
        },
        mounted() {
            if (this.$i18n) {
                const n = Mc();
                if (!n)
                    return;
                const i = this.$i18n;
                n.__VUE_I18N__ = i.__composer;
                const o = this.__v_emitter = G2();
                i.__enableEmitter && i.__enableEmitter(o),
                o.on("*", gf)
            }
        },
        unmounted() {
            const n = Mc();
            if (!n)
                throw On(St.UNEXPECTED_ERROR);
            const i = this.$i18n;
            n.__VUE_I18N__ && (this.__v_emitter && (this.__v_emitter.off("*", gf),
            delete this.__v_emitter),
            this.$i18n && (i.__disableEmitter && i.__disableEmitter(),
            delete n.__VUE_I18N__)),
            delete this.$t,
            delete this.$rt,
            delete this.$te,
            delete this.$d,
            delete this.$n,
            delete this.$tm,
            i.__disposer && (i.__disposer(),
            delete i.__disposer,
            delete i.__extender),
            r.__deleteInstance(n),
            delete this.$i18n
        }
    }
}
function EA(t, e) {
    t.locale = e.locale || t.locale,
    t.fallbackLocale = e.fallbackLocale || t.fallbackLocale,
    t.missing = e.missing || t.missing,
    t.silentTranslationWarn = e.silentTranslationWarn || t.silentFallbackWarn,
    t.silentFallbackWarn = e.silentFallbackWarn || t.silentFallbackWarn,
    t.formatFallbackMessages = e.formatFallbackMessages || t.formatFallbackMessages,
    t.postTranslation = e.postTranslation || t.postTranslation,
    t.warnHtmlInMessage = e.warnHtmlInMessage || t.warnHtmlInMessage,
    t.escapeParameterHtml = e.escapeParameterHtml || t.escapeParameterHtml,
    t.sync = e.sync || t.sync,
    t.__composer[HD](e.pluralizationRules || t.pluralizationRules);
    const r = W2(t.locale, {
        messages: e.messages,
        __i18n: e.__i18n
    });
    return Object.keys(r).forEach(n => t.mergeLocaleMessage(n, r[n])),
    e.datetimeFormats && Object.keys(e.datetimeFormats).forEach(n => t.mergeDateTimeFormat(n, e.datetimeFormats[n])),
    e.numberFormats && Object.keys(e.numberFormats).forEach(n => t.mergeNumberFormat(n, e.numberFormats[n])),
    t
}
const K2 = {
    tag: {
        type: [String, Object]
    },
    locale: {
        type: String
    },
    scope: {
        type: String,
        validator: t => t === "parent" || t === "global",
        default: "parent"
    },
    i18n: {
        type: Object
    }
};
function Aie({slots: t}, e) {
    return e.length === 1 && e[0] === "default" ? (t.default ? t.default() : []).reduce( (n, i) => [...n, ...i.type === Nt ? i.children : [i]], []) : e.reduce( (r, n) => {
        const i = t[n];
        return i && (r[n] = i()),
        r
    }
    , At())
}
function KD() {
    return Nt
}
const wie = be({
    name: "i18n-t",
    props: wr({
        keypath: {
            type: String,
            required: !0
        },
        plural: {
            type: [Number, String],
            validator: t => ur(t) || !isNaN(t)
        }
    }, K2),
    setup(t, e) {
        const {slots: r, attrs: n} = e
          , i = t.i18n || q2({
            useScope: t.scope,
            __useComponent: !0
        });
        return () => {
            const o = Object.keys(r).filter(f => f[0] !== "_")
              , s = At();
            t.locale && (s.locale = t.locale),
            t.plural !== void 0 && (s.plural = Ce(t.plural) ? +t.plural : t.plural);
            const a = Aie(e, o)
              , l = i[Ty](t.keypath, a, s)
              , c = wr(At(), n)
              , u = Ce(t.tag) || ot(t.tag) ? t.tag : KD();
            return Or(u, c, l)
        }
    }
})
  , _A = wie;
function Bie(t) {
    return Wt(t) && !Ce(t[0])
}
function qD(t, e, r, n) {
    const {slots: i, attrs: o} = e;
    return () => {
        const s = {
            part: !0
        };
        let a = At();
        t.locale && (s.locale = t.locale),
        Ce(t.format) ? s.key = t.format : ot(t.format) && (Ce(t.format.key) && (s.key = t.format.key),
        a = Object.keys(t.format).reduce( (d, h) => r.includes(h) ? wr(At(), d, {
            [h]: t.format[h]
        }) : d, At()));
        const l = n(t.value, s, a);
        let c = [s.key];
        Wt(l) ? c = l.map( (d, h) => {
            const x = i[d.type]
              , y = x ? x({
                [d.type]: d.value,
                index: h,
                parts: l
            }) : [d.value];
            return Bie(y) && (y[0].key = `${d.type}-${h}`),
            y
        }
        ) : Ce(l) && (c = [l]);
        const u = wr(At(), o)
          , f = Ce(t.tag) || ot(t.tag) ? t.tag : KD();
        return Or(f, u, c)
    }
}
const Sie = be({
    name: "i18n-n",
    props: wr({
        value: {
            type: Number,
            required: !0
        },
        format: {
            type: [String, Object]
        }
    }, K2),
    setup(t, e) {
        const r = t.i18n || q2({
            useScope: t.scope,
            __useComponent: !0
        });
        return qD(t, e, $D, (...n) => r[Fy](...n))
    }
})
  , bA = Sie;
function Tie(t, e) {
    const r = t;
    if (t.mode === "composition")
        return r.__getInstance(e) || t.global;
    {
        const n = r.__getInstance(e);
        return n != null ? n.__composer : t.global.__composer
    }
}
function Die(t) {
    const e = s => {
        L2(Jc(ci.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE));
        const {instance: a, value: l} = s;
        if (!a || !a.$)
            throw On(St.UNEXPECTED_ERROR);
        const c = Tie(t, a.$)
          , u = CA(l);
        return [Reflect.apply(c.t, c, [...AA(u)]), c]
    }
    ;
    return {
        created: (s, a) => {
            const [l,c] = e(a);
            $i && t.global === c && (s.__i18nWatcher = me(c.locale, () => {
                a.instance && a.instance.$forceUpdate()
            }
            )),
            s.__composer = c,
            s.textContent = l
        }
        ,
        unmounted: s => {
            $i && s.__i18nWatcher && (s.__i18nWatcher(),
            s.__i18nWatcher = void 0,
            delete s.__i18nWatcher),
            s.__composer && (s.__composer = void 0,
            delete s.__composer)
        }
        ,
        beforeUpdate: (s, {value: a}) => {
            if (s.__composer) {
                const l = s.__composer
                  , c = CA(a);
                s.textContent = Reflect.apply(l.t, l, [...AA(c)])
            }
        }
        ,
        getSSRProps: s => {
            const [a] = e(s);
            return {
                textContent: a
            }
        }
    }
}
function CA(t) {
    if (Ce(t))
        return {
            path: t
        };
    if (Ze(t)) {
        if (!("path"in t))
            throw On(St.REQUIRED_VALUE, "path");
        return t
    } else
        throw On(St.INVALID_VALUE)
}
function AA(t) {
    const {path: e, locale: r, args: n, choice: i, plural: o} = t
      , s = {}
      , a = n || {};
    return Ce(r) && (s.locale = r),
    ur(i) && (s.plural = i),
    ur(o) && (s.plural = o),
    [e, a, s]
}
function Fie(t, e, ...r) {
    const n = Ze(r[0]) ? r[0] : {};
    (ct(n.globalInstall) ? n.globalInstall : !0) && ([_A.name, "I18nT"].forEach(o => t.component(o, _A)),
    [bA.name, "I18nN"].forEach(o => t.component(o, bA)),
    [BA.name, "I18nD"].forEach(o => t.component(o, BA))),
    t.directive("t", Die(e))
}
const Pie = So("global-vue-i18n");
function I4e(t={}) {
    const e = __VUE_I18N_LEGACY_API__ && ct(t.legacy) ? t.legacy : __VUE_I18N_LEGACY_API__;
    e && L2(Jc(ci.DEPRECATE_LEGACY_MODE));
    const r = ct(t.globalInjection) ? t.globalInjection : !0
      , n = new Map
      , [i,o] = Iie(t, e)
      , s = So("vue-i18n");
    function a(f) {
        return n.get(f) || null
    }
    function l(f, d) {
        n.set(f, d)
    }
    function c(f) {
        n.delete(f)
    }
    const u = {
        get mode() {
            return __VUE_I18N_LEGACY_API__ && e ? "legacy" : "composition"
        },
        async install(f, ...d) {
            if (f.__VUE_I18N__ = u,
            f.__VUE_I18N_SYMBOL__ = s,
            f.provide(f.__VUE_I18N_SYMBOL__, u),
            Ze(d[0])) {
                const y = d[0];
                u.__composerExtend = y.__composerExtend,
                u.__vueI18nExtend = y.__vueI18nExtend
            }
            let h = null;
            !e && r && (h = Uie(f, u.global)),
            __VUE_I18N_FULL_INSTALL__ && Fie(f, u, ...d),
            __VUE_I18N_LEGACY_API__ && e && f.mixin(Cie(o, o.__composer, u));
            const x = f.unmount;
            f.unmount = () => {
                h && h(),
                u.dispose(),
                x()
            }
            ;
            {
                if (!await fie(f, u))
                    throw On(St.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);
                const m = G2();
                if (e) {
                    const E = o;
                    E.__enableEmitter && E.__enableEmitter(m)
                } else {
                    const E = o;
                    E[yl] && E[yl](m)
                }
                m.on("*", gf)
            }
        },
        get global() {
            return o
        },
        dispose() {
            i.stop()
        },
        __instances: n,
        __getInstance: a,
        __setInstance: l,
        __deleteInstance: c
    };
    return u
}
function q2(t={}) {
    const e = Mc();
    if (e == null)
        throw On(St.MUST_BE_CALL_SETUP_TOP);
    if (!e.isCE && e.appContext.app != null && !e.appContext.app.__VUE_I18N_SYMBOL__)
        throw On(St.NOT_INSTALLED);
    const r = Oie(e)
      , n = Rie(r)
      , i = zD(e)
      , o = kie(t, i);
    if (o === "global")
        return jD(n, t, i),
        n;
    if (o === "parent") {
        let l = Mie(r, e, t.__useComponent);
        return l == null && (Eo(Jc(ci.NOT_FOUND_PARENT_SCOPE)),
        l = n),
        l
    }
    const s = r;
    let a = s.__getInstance(e);
    if (a == null) {
        const l = wr({}, t);
        "__i18n"in i && (l.__i18n = i.__i18n),
        n && (l.__root = n),
        a = Y2(l),
        s.__composerExtend && (a[Py] = s.__composerExtend(a)),
        Lie(s, e, a),
        s.__setInstance(e, a)
    } else
        o === "local" && Eo(Jc(ci.DUPLICATE_USE_I18N_CALLING));
    return a
}
function Iie(t, e) {
    const r = Mf()
      , n = __VUE_I18N_LEGACY_API__ && e ? r.run( () => Oy(t)) : r.run( () => Y2(t));
    if (n == null)
        throw On(St.UNEXPECTED_ERROR);
    return [r, n]
}
function Oie(t) {
    const e = dr(t.isCE ? Pie : t.appContext.app.__VUE_I18N_SYMBOL__);
    if (!e)
        throw On(t.isCE ? St.NOT_INSTALLED_WITH_PROVIDE : St.UNEXPECTED_ERROR);
    return e
}
function kie(t, e) {
    return e1(t) ? "__i18n"in e ? "local" : "global" : t.useScope ? t.useScope : "local"
}
function Rie(t) {
    return t.mode === "composition" ? t.global : t.global.__composer
}
function Mie(t, e, r=!1) {
    let n = null;
    const i = e.root;
    let o = Nie(e, r);
    for (; o != null; ) {
        const s = t;
        if (t.mode === "composition")
            n = s.__getInstance(o);
        else if (__VUE_I18N_LEGACY_API__) {
            const a = s.__getInstance(o);
            a != null && (n = a.__composer,
            r && n && !n[VD] && (n = null))
        }
        if (n != null || i === o)
            break;
        o = o.parent
    }
    return n
}
function Nie(t, e=!1) {
    return t == null ? null : e && t.vnode.ctx || t.parent
}
function Lie(t, e, r) {
    let n = null;
    Ht( () => {
        {
            e.__VUE_I18N__ = r,
            n = G2();
            const i = r;
            i[yl] && i[yl](n),
            n.on("*", gf)
        }
    }
    , e),
    vs( () => {
        const i = r;
        n && n.off("*", gf),
        i[xf] && i[xf](),
        delete e.__VUE_I18N__,
        t.__deleteInstance(e);
        const o = i[Py];
        o && (o(),
        delete i[Py])
    }
    , e)
}
const $ie = ["locale", "fallbackLocale", "availableLocales"]
  , wA = ["t", "rt", "d", "n", "tm", "te"];
function Uie(t, e) {
    const r = Object.create(null);
    return $ie.forEach(i => {
        const o = Object.getOwnPropertyDescriptor(e, i);
        if (!o)
            throw On(St.UNEXPECTED_ERROR);
        const s = xt(o.value) ? {
            get() {
                return o.value.value
            },
            set(a) {
                o.value.value = a
            }
        } : {
            get() {
                return o.get && o.get()
            }
        };
        Object.defineProperty(r, i, s)
    }
    ),
    t.config.globalProperties.$i18n = r,
    wA.forEach(i => {
        const o = Object.getOwnPropertyDescriptor(e, i);
        if (!o || !o.value)
            throw On(St.UNEXPECTED_ERROR);
        Object.defineProperty(t.config.globalProperties, `$${i}`, o)
    }
    ),
    () => {
        delete t.config.globalProperties.$i18n,
        wA.forEach(i => {
            delete t.config.globalProperties[`$${i}`]
        }
        )
    }
}
const Gie = be({
    name: "i18n-d",
    props: wr({
        value: {
            type: [Number, Date],
            required: !0
        },
        format: {
            type: [String, Object]
        }
    }, K2),
    setup(t, e) {
        const r = t.i18n || q2({
            useScope: t.scope,
            __useComponent: !0
        });
        return qD(t, e, LD, (...n) => r[Dy](...n))
    }
})
  , BA = Gie;
iie();
Mne(xne);
Nne(Pne);
Lne(DD);
{
    const t = Ya();
    t.__INTLIFY__ = !0,
    pne(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)
}
var O4e = {
    name: "Name",
    tel: "Phone",
    save: "Save",
    clear: "Clear",
    cancel: "Cancel",
    confirm: "Confirm",
    delete: "Delete",
    loading: "Loading...",
    noCoupon: "No coupons",
    nameEmpty: "Please fill in the name",
    addContact: "Add contact",
    telInvalid: "Malformed phone number",
    vanCalendar: {
        end: "End",
        start: "Start",
        title: "Calendar",
        weekdays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
        monthTitle: (t, e) => `${t}/${e}`,
        rangePrompt: t => `Choose no more than ${t} days`
    },
    vanCascader: {
        select: "Select"
    },
    vanPagination: {
        prev: "Previous",
        next: "Next"
    },
    vanPullRefresh: {
        pulling: "Pull to refresh...",
        loosing: "Loose to refresh..."
    },
    vanSubmitBar: {
        label: "Total:"
    },
    vanCoupon: {
        unlimited: "Unlimited",
        discount: t => `${t * 10}% off`,
        condition: t => `At least ${t}`
    },
    vanCouponCell: {
        title: "Coupon",
        count: t => `You have ${t} coupons`
    },
    vanCouponList: {
        exchange: "Exchange",
        close: "Close",
        enable: "Available",
        disabled: "Unavailable",
        placeholder: "Coupon code"
    },
    vanAddressEdit: {
        area: "Area",
        areaEmpty: "Please select a receiving area",
        addressEmpty: "Address can not be empty",
        addressDetail: "Address",
        defaultAddress: "Set as the default address"
    },
    vanAddressList: {
        add: "Add new address"
    }
}
  , k4e = {
    name: "Имя",
    tel: "Телефон",
    save: "Сохранить",
    clear: "Прозрачный",
    cancel: "Отмена",
    confirm: "Подтвердить",
    delete: "Удалить",
    loading: "Загрузка...",
    noCoupon: "Нет купонов",
    nameEmpty: "Пожалуйста укажите имя",
    addContact: "Создать контакт",
    telInvalid: "Некорректный номер телефона",
    vanCalendar: {
        end: "Конец",
        start: "Начало",
        title: "Календарь",
        weekdays: ["ВС", "ПН", "ВТ", "СР", "ЧТ", "ПТ", "СБ"],
        monthTitle: (t, e) => `${t}/${e}`,
        rangePrompt: t => `Укажите более ${t} дней`
    },
    vanCascader: {
        select: "Выбрать"
    },
    vanPagination: {
        prev: "Назад",
        next: "Вперед"
    },
    vanPullRefresh: {
        pulling: "Потяните для обновления...",
        loosing: "Отпустите для обновления..."
    },
    vanSubmitBar: {
        label: "Всего:"
    },
    vanCoupon: {
        unlimited: "Безлимитный",
        discount: t => `${t * 10}% скидка`,
        condition: t => `Как минимум ${t}`
    },
    vanCouponCell: {
        title: "Купон",
        count: t => `У вас есть ${t} купонов`
    },
    vanCouponList: {
        exchange: "Обмен",
        close: "Закрыть",
        enable: "Доступно",
        disabled: "Недоступно",
        placeholder: "Код купона"
    },
    vanAddressEdit: {
        area: "Область",
        areaEmpty: "Укажите зону доставки",
        addressEmpty: "Адрес не может быть пустым",
        addressDetail: "Адрес",
        defaultAddress: "Сделать адресом по умолчанию"
    },
    vanAddressList: {
        add: "Новый адрес"
    }
}
  , R4e = {
    name: "tên",
    tel: "Điện thoại",
    save: "Cứu",
    clear: "Thông thoáng",
    cancel: "Hủy bỏ",
    confirm: "Xác nhận",
    delete: "Xóa",
    loading: "Đang tải ...",
    noCoupon: "Không có phiếu giảm giá",
    nameEmpty: "Vui lòng điền vào tên",
    addContact: "Thêm liên hệ",
    telInvalid: "Số điện thoại không đúng định dạng",
    vanCalendar: {
        end: "Kết thúc",
        start: "Bắt ​​đầu",
        title: "Lịch",
        weekdays: ["chủ nhật", "thứ hai", "thứ ba", "Thứ Tư", "Thứ năm", "Thứ sáu", "thứ bảy"],
        monthTitle: (t, e) => `${t}/${e}`,
        rangePrompt: t => `Chọn không quá ${t} ngày`
    },
    vanCascader: {
        select: "Chọn"
    },
    vanPagination: {
        prev: "Trước đó",
        next: "Tiếp theo"
    },
    vanPullRefresh: {
        pulling: "Kéo để làm mới ...",
        loosing: "Loose để làm mới ..."
    },
    vanSubmitBar: {
        label: "Tổng:"
    },
    vanCoupon: {
        unlimited: "Không giới hạn",
        discount: t => `Chiết khấu ${t * 10}%`,
        condition: t => `Ít nhất ${t}`
    },
    vanCouponCell: {
        title: "Phiếu giảm giá",
        count: t => `Bạn có ${t} phiếu giảm giá`
    },
    vanCouponList: {
        exchange: "Trao đổi",
        close: "Đóng",
        enable: "Có sẵn",
        disabled: "Không khả dụng",
        placeholder: "Mã phiếu thưởng"
    },
    vanAddressEdit: {
        area: "Khu vực",
        areaEmpty: "Vui lòng chọn khu vực nhận hàng",
        addressEmpty: "Địa chỉ không được để trống",
        addressDetail: "Địa chỉ",
        defaultAddress: "Đặt làm địa chỉ mặc định"
    },
    vanAddressList: {
        add: "Thêm địa chỉ mới"
    }
}
  , M4e = {
    name: "Nama",
    tel: "Telepon",
    save: "Simpan",
    clear: "Jernih",
    cancel: "Batal",
    confirm: "Konfirmasi",
    delete: "Hapus",
    loading: "Memuat...",
    noCoupon: "Tidak ada kupon",
    nameEmpty: "Silakan isi nama",
    addContact: "Tambahkan kontak",
    telInvalid: "Nomor telepon salah format",
    vanCalendar: {
        end: "Akhir",
        start: "Mulai",
        title: "Kalender",
        weekdays: ["minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"],
        monthTitle: (t, e) => `${t}/${e}`,
        rangePrompt: t => `Pilih tidak lebih dari ${t} hari`
    },
    vanCascader: {
        select: "Pilih"
    },
    vanPagination: {
        prev: "Sebelumnya",
        next: "Selanjutnya"
    },
    vanPullRefresh: {
        pulling: "Tarik untuk menyegarkan...",
        loosing: "Loose untuk menyegarkan..."
    },
    vanSubmitBar: {
        label: "Jumlah:"
    },
    vanCoupon: {
        unlimited: "Tidak terbatas",
        discount: t => `${t * 10}% off`,
        condition: t => `Setidaknya ${t}`
    },
    vanCouponCell: {
        title: "Kupon",
        count: t => `Anda memiliki kupon ${t}`
    },
    vanCouponList: {
        exchange: "Pertukaran",
        close: "Tutup",
        enable: "Tersedia",
        disabled: "Tidak tersedia",
        placeholder: "Kode kupon"
    },
    vanAddressEdit: {
        area: "Daerah",
        areaEmpty: "Silakan pilih area penerima",
        addressEmpty: "Alamat tidak boleh kosong",
        addressDetail: "Alamat",
        defaultAddress: "Tetapkan sebagai alamat default"
    },
    vanAddressList: {
        add: "Tambahkan alamat baru"
    }
}
  , N4e = {
    name: "नाम",
    tel: "फ़ोन",
    save: "सहेजें",
    clear: "साफ़",
    cancel: "रद्द करें",
    confirm: "पुष्टि करना",
    delete: "हटाएं",
    loading: "लोड हो रहा है...",
    noCoupon: "कोई कूपन नहीं",
    nameEmpty: "कृपया नाम भरें",
    addContact: "संपर्क जोड़ें",
    telInvalid: "विकृत फ़ोन नंबर",
    vanCalendar: {
        end: "समाप्त",
        start: "शुरू",
        title: "पंचांग",
        weekdays: ["रविवार", "सोमवार", "मंगलवार", "बुधवार", "गुरूवार", "शुक्रवार", "शनिवार"],
        monthTitle: (t, e) => `${t}/${e}`,
        rangePrompt: t => `${t} दिन से अधिक नहीं चुनें`
    },
    vanCascader: {
        select: "चुनते हैं"
    },
    vanPagination: {
        prev: "पहले का",
        next: "अगला"
    },
    vanPullRefresh: {
        pulling: "रीफ़्रेश करने के लिए खींचें...",
        loosing: "ताज़ा करने के लिए ढीला..."
    },
    vanSubmitBar: {
        label: "कुल:"
    },
    vanCoupon: {
        unlimited: "असीमित",
        discount: t => `${t * 10}% छूट`,
        condition: t => `कम से कम ${t}`
    },
    vanCouponCell: {
        title: "कूपन",
        count: t => `आपके पास ${t} कूपन हैं`
    },
    vanCouponList: {
        exchange: "अदला बदली",
        close: "बंद करे",
        enable: "उपलब्ध",
        disabled: "अनुपलब्ध",
        placeholder: "कूपन कोड"
    },
    vanAddressEdit: {
        area: "क्षेत्र",
        areaEmpty: "कृपया एक क्षेत्र चुनें",
        addressEmpty: "पता खाली नहीं हो सकता",
        addressDetail: "पता",
        defaultAddress: "डिफ़ॉल्ट पते के रूप में सेट करें"
    },
    vanAddressList: {
        add: "नया पता जोड़ें"
    }
}
  , L4e = {
    name: "ชื่อ",
    tel: "โทรศัพท์",
    save: "บันทึก",
    clear: "ชัดเจน",
    cancel: "ยกเลิก",
    confirm: "ยืนยัน",
    delete: "ลบ",
    loading: "กำลังโหลด...",
    noCoupon: "ไม่มีคูปอง",
    nameEmpty: "กรุณากรอกชื่อของคุณ",
    addContact: "เพิ่มผู้ติดต่อ",
    telInvalid: "กรุณากรอกหมายเลขโทรศัพท์ที่ถูกต้อง",
    vanCalendar: {
        end: "จบ",
        start: "เริ่ม",
        title: "การเลือกวันที่",
        weekdays: ["อา", "จ", "อ", "พ", "พฤ", "ศ", "ส"],
        monthTitle: (t, e) => `${t}ปี${e}เดือน`,
        rangePrompt: t => `จำนวนวันที่เลือกต้องไม่เกิน ${t} วัน`
    },
    vanCascader: {
        select: "โปรดเลือก"
    },
    vanPagination: {
        prev: "หน้าที่แล้ว",
        next: "หน้าต่อไป"
    },
    vanPullRefresh: {
        pulling: "ดึงลงเพื่อรีเฟรช...",
        loosing: "ปล่อยเพื่อรีเฟรช..."
    },
    vanSubmitBar: {
        label: "รวม:"
    },
    vanCoupon: {
        unlimited: "ไม่ จำกัด",
        discount: t => `ลด${t}`,
        condition: t => `มีจำหน่ายในราคา ${t} กว่าหยวน`
    },
    vanCouponCell: {
        title: "คูปอง",
        count: t => `มีรูปภาพ ${t} รูป`
    },
    vanCouponList: {
        exchange: "แลกเปลี่ยน",
        close: "ไม่ได้ใช้",
        enable: "พร้อมใช้งาน",
        disabled: "ไม่พร้อมใช้งาน",
        placeholder: "กรุณากรอกรหัสคูปอง"
    },
    vanAddressEdit: {
        area: "พื้นที่",
        areaEmpty: "โปรดเลือกภูมิภาค",
        addressEmpty: "กรุณากรอกที่อยู่โดยละเอียด",
        addressDetail: "ที่อยู่",
        defaultAddress: "ตั้งเป็นที่อยู่จัดส่งเริ่มต้น"
    },
    vanAddressList: {
        add: "เพิ่มที่อยู่"
    }
}
  , $4e = {
    name: "Nome",
    tel: "Fone",
    save: "Salvar",
    clear: "Claro",
    cancel: "Cancelar",
    confirm: "Confirmar",
    delete: "Excluir",
    loading: "Carregando...",
    noCoupon: "Nenhum cupom",
    nameEmpty: "Por favor, preencha o nome",
    addContact: "Adicionar novo contato",
    telInvalid: "Telefone em formato inválido",
    vanCalendar: {
        end: "Fim",
        start: "Início",
        title: "Calendário",
        weekdays: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"],
        monthTitle: (t, e) => `${e}/${t}`,
        rangePrompt: t => `Escolha no máximo ${t} dias`
    },
    vanCascader: {
        select: "Selecione"
    },
    vanPagination: {
        prev: "Anterior",
        next: "Próximo"
    },
    vanPullRefresh: {
        pulling: "Puxe para atualizar...",
        loosing: "Solte para atualizar..."
    },
    vanSubmitBar: {
        label: "Total:"
    },
    vanCoupon: {
        unlimited: "Ilimitado",
        discount: t => `${t * 10}% de desconto`,
        condition: t => `Pelo menos ${t}`
    },
    vanCouponCell: {
        title: "Cupom",
        count: t => `Você possui ${t} cupom(ns)`
    },
    vanCouponList: {
        exchange: "Usar",
        close: "Fechar",
        enable: "Disponível",
        disabled: "Indisponível",
        placeholder: "Código do cupom"
    },
    vanAddressEdit: {
        area: "Área",
        areaEmpty: "Por favor, selecione uma área de recebimento",
        addressEmpty: "Endereço não pode ser vazio",
        addressDetail: "Endereço",
        defaultAddress: "Usar como endereço padrão"
    },
    vanAddressList: {
        add: "Adicionar novo endereço"
    }
}
  , U4e = {
    name: "নাম",
    tel: "ফোন",
    save: "সংরক্ষণ করুন",
    clear: "পরিষ্কার",
    cancel: "বাতিল",
    confirm: "নিশ্চিত করুন",
    delete: "মুছুন",
    loading: "লোড হচ্ছে...",
    noCoupon: "কোন কুপন নেই",
    nameEmpty: "অনুগ্রহ করে নামটি পূরণ করুন",
    addContact: "যোগাযোগ যোগ করুন",
    telInvalid: "বিকৃত ফোন নম্বর",
    vanCalendar: {
        end: "শেষ",
        start: "শুরু",
        title: "ক্যালেন্ডার",
        weekdays: ["রবিবার", "সোমবার", "মঙ্গলবার", "বুধবার", "বৃহস্পতিবার", "শুক্রবার", "শনিবার"],
        monthTitle: (t, e) => `${t}/${e}`,
        rangePrompt: t => `${t} দিনের বেশি নির্বাচন করবেন না`
    },
    vanCascader: {
        select: "নির্বাচন"
    },
    vanPagination: {
        prev: "পূর্ববর্তী",
        next: "পরবর্তী"
    },
    vanPullRefresh: {
        pulling: "রিফ্রেশ করতে টানুন...",
        loosing: "রিফ্রেশ করতে আলগা..."
    },
    vanSubmitBar: {
        label: "মোট:"
    },
    vanCoupon: {
        unlimited: "আনলিমিটেড",
        discount: t => `${t * 10}% ছাড়`,
        condition: t => `অন্তত ${t}`
    },
    vanCouponCell: {
        title: "কুপন",
        count: t => `আপনার ${t} কুপন আছে`
    },
    vanCouponList: {
        exchange: "বিনিময়",
        close: "বন্ধ",
        enable: "উপলভ্য",
        disabled: "অনুপলব্ধ",
        placeholder: "কুপন কোড"
    },
    vanAddressEdit: {
        area: "এরিয়া",
        areaEmpty: "অনুগ্রহ করে একটি রিসিভিং এলাকা নির্বাচন করুন",
        addressEmpty: "ঠিকানা খালি হতে পারে না",
        addressDetail: "ঠিকানা",
        defaultAddress: "ডিফল্ট ঠিকানা হিসাবে সেট করুন"
    },
    vanAddressList: {
        add: "নতুন ঠিকানা যোগ করুন"
    }
}
  , G4e = {
    name: "الاسم",
    tel: "الهاتف",
    save: "حفظ",
    clear: "مسح",
    cancel: "إلغاء",
    confirm: "تأكيد",
    delete: "حذف",
    loading: "جار التحميل...",
    noCoupon: "لا يوجد كوبونات",
    nameEmpty: "يرجى ملء الاسم",
    addContact: "إضافة جهة اتصال",
    telInvalid: "رقم الهاتف غير صحيح",
    vanCalendar: {
        end: "نهاية",
        start: "بداية",
        title: "التقويم",
        weekdays: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"],
        monthTitle: (t, e) => `${t}/${e}`,
        rangePrompt: t => `اختر لا يزيد عن ${t} أيام`
    },
    vanCascader: {
        select: "اختر"
    },
    vanPagination: {
        prev: "السابق",
        next: "التالي"
    },
    vanPullRefresh: {
        pulling: "اسحب للتحديث...",
        loosing: "أفلت للتحديث..."
    },
    vanSubmitBar: {
        label: "المجموع:"
    },
    vanCoupon: {
        unlimited: "غير محدود",
        discount: t => `${t * 10}% خصم`,
        condition: t => `على الأقل ${t}`
    },
    vanCouponCell: {
        title: "كوبون",
        count: t => `لديك ${t} كوبونات`
    },
    vanCouponList: {
        exchange: "استبدال",
        close: "إغلاق",
        enable: "متاح",
        disabled: "غير متاح",
        placeholder: "كود الكوبون"
    },
    vanAddressEdit: {
        area: "المنطقة",
        areaEmpty: "يرجى اختيار منطقة استقبال",
        addressEmpty: "العنوان لا يمكن أن يكون فارغًا",
        addressDetail: "العنوان",
        defaultAddress: "تعيين كعنوان افتراضي"
    },
    vanAddressList: {
        add: "إضافة عنوان جديد"
    }
};
/*! Capacitor: https://capacitorjs.com/ - MIT License */
var El;
(function(t) {
    t.Unimplemented = "UNIMPLEMENTED",
    t.Unavailable = "UNAVAILABLE"
}
)(El || (El = {}));
class jh extends Error {
    constructor(e, r, n) {
        super(e),
        this.message = e,
        this.code = r,
        this.data = n
    }
}
const Hie = t => {
    var e, r;
    return t != null && t.androidBridge ? "android" : !((r = (e = t == null ? void 0 : t.webkit) === null || e === void 0 ? void 0 : e.messageHandlers) === null || r === void 0) && r.bridge ? "ios" : "web"
}
  , Vie = t => {
    const e = t.CapacitorCustomPlatform || null
      , r = t.Capacitor || {}
      , n = r.Plugins = r.Plugins || {}
      , i = () => e !== null ? e.name : Hie(t)
      , o = () => i() !== "web"
      , s = f => {
        const d = c.get(f);
        return !!(d != null && d.platforms.has(i()) || a(f))
    }
      , a = f => {
        var d;
        return (d = r.PluginHeaders) === null || d === void 0 ? void 0 : d.find(h => h.name === f)
    }
      , l = f => t.console.error(f)
      , c = new Map
      , u = (f, d={}) => {
        const h = c.get(f);
        if (h)
            return console.warn(`Capacitor plugin "${f}" already registered. Cannot register plugins twice.`),
            h.proxy;
        const x = i()
          , y = a(f);
        let m;
        const E = async () => (!m && x in d ? m = typeof d[x] == "function" ? m = await d[x]() : m = d[x] : e !== null && !m && "web"in d && (m = typeof d.web == "function" ? m = await d.web() : m = d.web),
        m)
          , g = (B, T) => {
            var A, w;
            if (y) {
                const S = y == null ? void 0 : y.methods.find(D => T === D.name);
                if (S)
                    return S.rtype === "promise" ? D => r.nativePromise(f, T.toString(), D) : (D, F) => r.nativeCallback(f, T.toString(), D, F);
                if (B)
                    return (A = B[T]) === null || A === void 0 ? void 0 : A.bind(B)
            } else {
                if (B)
                    return (w = B[T]) === null || w === void 0 ? void 0 : w.bind(B);
                throw new jh(`"${f}" plugin is not implemented on ${x}`,El.Unimplemented)
            }
        }
          , p = B => {
            let T;
            const A = (...w) => {
                const S = E().then(D => {
                    const F = g(D, B);
                    if (F) {
                        const R = F(...w);
                        return T = R == null ? void 0 : R.remove,
                        R
                    } else
                        throw new jh(`"${f}.${B}()" is not implemented on ${x}`,El.Unimplemented)
                }
                );
                return B === "addListener" && (S.remove = async () => T()),
                S
            }
            ;
            return A.toString = () => `${B.toString()}() { [capacitor code] }`,
            Object.defineProperty(A, "name", {
                value: B,
                writable: !1,
                configurable: !1
            }),
            A
        }
          , v = p("addListener")
          , _ = p("removeListener")
          , b = (B, T) => {
            const A = v({
                eventName: B
            }, T)
              , w = async () => {
                const D = await A;
                _({
                    eventName: B,
                    callbackId: D
                }, T)
            }
              , S = new Promise(D => A.then( () => D({
                remove: w
            })));
            return S.remove = async () => {
                console.warn("Using addListener() without 'await' is deprecated."),
                await w()
            }
            ,
            S
        }
          , C = new Proxy({},{
            get(B, T) {
                switch (T) {
                case "$$typeof":
                    return;
                case "toJSON":
                    return () => ({});
                case "addListener":
                    return y ? b : v;
                case "removeListener":
                    return _;
                default:
                    return p(T)
                }
            }
        });
        return n[f] = C,
        c.set(f, {
            name: f,
            proxy: C,
            platforms: new Set([...Object.keys(d), ...y ? [x] : []])
        }),
        C
    }
    ;
    return r.convertFileSrc || (r.convertFileSrc = f => f),
    r.getPlatform = i,
    r.handleError = l,
    r.isNativePlatform = o,
    r.isPluginAvailable = s,
    r.registerPlugin = u,
    r.Exception = jh,
    r.DEBUG = !!r.DEBUG,
    r.isLoggingEnabled = !!r.isLoggingEnabled,
    r
}
  , zie = t => t.Capacitor = Vie(t)
  , Dx = zie(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {})
  , td = Dx.registerPlugin;
class n1 {
    constructor() {
        this.listeners = {},
        this.retainedEventArguments = {},
        this.windowListeners = {}
    }
    addListener(e, r) {
        let n = !1;
        this.listeners[e] || (this.listeners[e] = [],
        n = !0),
        this.listeners[e].push(r);
        const o = this.windowListeners[e];
        o && !o.registered && this.addWindowListener(o),
        n && this.sendRetainedArgumentsForEvent(e);
        const s = async () => this.removeListener(e, r);
        return Promise.resolve({
            remove: s
        })
    }
    async removeAllListeners() {
        this.listeners = {};
        for (const e in this.windowListeners)
            this.removeWindowListener(this.windowListeners[e]);
        this.windowListeners = {}
    }
    notifyListeners(e, r, n) {
        const i = this.listeners[e];
        if (!i) {
            if (n) {
                let o = this.retainedEventArguments[e];
                o || (o = []),
                o.push(r),
                this.retainedEventArguments[e] = o
            }
            return
        }
        i.forEach(o => o(r))
    }
    hasListeners(e) {
        var r;
        return !!(!((r = this.listeners[e]) === null || r === void 0) && r.length)
    }
    registerWindowListener(e, r) {
        this.windowListeners[r] = {
            registered: !1,
            windowEventName: e,
            pluginEventName: r,
            handler: n => {
                this.notifyListeners(r, n)
            }
        }
    }
    unimplemented(e="not implemented") {
        return new Dx.Exception(e,El.Unimplemented)
    }
    unavailable(e="not available") {
        return new Dx.Exception(e,El.Unavailable)
    }
    async removeListener(e, r) {
        const n = this.listeners[e];
        if (!n)
            return;
        const i = n.indexOf(r);
        this.listeners[e].splice(i, 1),
        this.listeners[e].length || this.removeWindowListener(this.windowListeners[e])
    }
    addWindowListener(e) {
        window.addEventListener(e.windowEventName, e.handler),
        e.registered = !0
    }
    removeWindowListener(e) {
        e && (window.removeEventListener(e.windowEventName, e.handler),
        e.registered = !1)
    }
    sendRetainedArgumentsForEvent(e) {
        const r = this.retainedEventArguments[e];
        r && (delete this.retainedEventArguments[e],
        r.forEach(n => {
            this.notifyListeners(e, n)
        }
        ))
    }
}
const jie = td("WebView")
  , SA = t => encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape)
  , TA = t => t.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
class Wie extends n1 {
    async getCookies() {
        const e = document.cookie
          , r = {};
        return e.split(";").forEach(n => {
            if (n.length <= 0)
                return;
            let[i,o] = n.replace(/=/, "CAP_COOKIE").split("CAP_COOKIE");
            i = TA(i).trim(),
            o = TA(o).trim(),
            r[i] = o
        }
        ),
        r
    }
    async setCookie(e) {
        try {
            const r = SA(e.key)
              , n = SA(e.value)
              , i = `; expires=${(e.expires || "").replace("expires=", "")}`
              , o = (e.path || "/").replace("path=", "")
              , s = e.url != null && e.url.length > 0 ? `domain=${e.url}` : "";
            document.cookie = `${r}=${n || ""}${i}; path=${o}; ${s};`
        } catch (r) {
            return Promise.reject(r)
        }
    }
    async deleteCookie(e) {
        try {
            document.cookie = `${e.key}=; Max-Age=0`
        } catch (r) {
            return Promise.reject(r)
        }
    }
    async clearCookies() {
        try {
            const e = document.cookie.split(";") || [];
            for (const r of e)
                document.cookie = r.replace(/^ +/, "").replace(/=.*/, `=;expires=${new Date().toUTCString()};path=/`)
        } catch (e) {
            return Promise.reject(e)
        }
    }
    async clearAllCookies() {
        try {
            await this.clearCookies()
        } catch (e) {
            return Promise.reject(e)
        }
    }
}
const Yie = td("CapacitorCookies", {
    web: () => new Wie
})
  , Xie = async t => new Promise( (e, r) => {
    const n = new FileReader;
    n.onload = () => {
        const i = n.result;
        e(i.indexOf(",") >= 0 ? i.split(",")[1] : i)
    }
    ,
    n.onerror = i => r(i),
    n.readAsDataURL(t)
}
)
  , Kie = (t={}) => {
    const e = Object.keys(t);
    return Object.keys(t).map(i => i.toLocaleLowerCase()).reduce( (i, o, s) => (i[o] = t[e[s]],
    i), {})
}
  , qie = (t, e=!0) => t ? Object.entries(t).reduce( (n, i) => {
    const [o,s] = i;
    let a, l;
    return Array.isArray(s) ? (l = "",
    s.forEach(c => {
        a = e ? encodeURIComponent(c) : c,
        l += `${o}=${a}&`
    }
    ),
    l.slice(0, -1)) : (a = e ? encodeURIComponent(s) : s,
    l = `${o}=${a}`),
    `${n}&${l}`
}
, "").substr(1) : null
  , ZD = (t, e={}) => {
    const r = Object.assign({
        method: t.method || "GET",
        headers: t.headers
    }, e)
      , i = Kie(t.headers)["content-type"] || "";
    if (typeof t.data == "string")
        r.body = t.data;
    else if (i.includes("application/x-www-form-urlencoded")) {
        const o = new URLSearchParams;
        for (const [s,a] of Object.entries(t.data || {}))
            o.set(s, a);
        r.body = o.toString()
    } else if (i.includes("multipart/form-data") || t.data instanceof FormData) {
        const o = new FormData;
        if (t.data instanceof FormData)
            t.data.forEach( (a, l) => {
                o.append(l, a)
            }
            );
        else
            for (const a of Object.keys(t.data))
                o.append(a, t.data[a]);
        r.body = o;
        const s = new Headers(r.headers);
        s.delete("content-type"),
        r.headers = s
    } else
        (i.includes("application/json") || typeof t.data == "object") && (r.body = JSON.stringify(t.data));
    return r
}
;
class Zie extends n1 {
    async request(e) {
        const r = ZD(e, e.webFetchExtra)
          , n = qie(e.params, e.shouldEncodeUrlParams)
          , i = n ? `${e.url}?${n}` : e.url
          , o = await fetch(i, r)
          , s = o.headers.get("content-type") || "";
        let {responseType: a="text"} = o.ok ? e : {};
        s.includes("application/json") && (a = "json");
        let l, c;
        switch (a) {
        case "arraybuffer":
        case "blob":
            c = await o.blob(),
            l = await Xie(c);
            break;
        case "json":
            l = await o.json();
            break;
        case "document":
        case "text":
        default:
            l = await o.text()
        }
        const u = {};
        return o.headers.forEach( (f, d) => {
            u[d] = f
        }
        ),
        {
            data: l,
            headers: u,
            status: o.status,
            url: o.url
        }
    }
    async get(e) {
        return this.request(Object.assign(Object.assign({}, e), {
            method: "GET"
        }))
    }
    async post(e) {
        return this.request(Object.assign(Object.assign({}, e), {
            method: "POST"
        }))
    }
    async put(e) {
        return this.request(Object.assign(Object.assign({}, e), {
            method: "PUT"
        }))
    }
    async patch(e) {
        return this.request(Object.assign(Object.assign({}, e), {
            method: "PATCH"
        }))
    }
    async delete(e) {
        return this.request(Object.assign(Object.assign({}, e), {
            method: "DELETE"
        }))
    }
}
const Jie = td("CapacitorHttp", {
    web: () => new Zie
})
  , H4e = Object.freeze(Object.defineProperty({
    __proto__: null,
    Capacitor: Dx,
    CapacitorCookies: Yie,
    CapacitorException: jh,
    CapacitorHttp: Jie,
    get ExceptionCode() {
        return El
    },
    WebPlugin: n1,
    WebView: jie,
    buildRequestInit: ZD,
    registerPlugin: td
}, Symbol.toStringTag, {
    value: "Module"
}));
function la(t) {
    return Nf() ? (a_(t),
    !0) : !1
}
function V4e(t) {
    let e = !1, r;
    const n = Mf(!0);
    return (...i) => (e || (r = n.run( () => t(...i)),
    e = !0),
    r)
}
function pn(t) {
    return typeof t == "function" ? t() : hn(t)
}
const ca = typeof window < "u" && typeof document < "u"
  , z4e = typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope
  , Qie = t => typeof t < "u"
  , eoe = t => t != null
  , toe = Object.prototype.toString
  , roe = t => toe.call(t) === "[object Object]"
  , jn = () => {}
  , ky = noe();
function noe() {
    var t, e;
    return ca && ((t = window == null ? void 0 : window.navigator) == null ? void 0 : t.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent))
}
function Z2(t, e) {
    function r(...n) {
        return new Promise( (i, o) => {
            Promise.resolve(t( () => e.apply(this, n), {
                fn: e,
                thisArg: this,
                args: n
            })).then(i).catch(o)
        }
        )
    }
    return r
}
const JD = t => t();
function QD(t, e={}) {
    let r, n, i = jn;
    const o = a => {
        clearTimeout(a),
        i(),
        i = jn
    }
    ;
    return a => {
        const l = pn(t)
          , c = pn(e.maxWait);
        return r && o(r),
        l <= 0 || c !== void 0 && c <= 0 ? (n && (o(n),
        n = null),
        Promise.resolve(a())) : new Promise( (u, f) => {
            i = e.rejectOnCancel ? f : u,
            c && !n && (n = setTimeout( () => {
                r && o(r),
                n = null,
                u(a())
            }
            , c)),
            r = setTimeout( () => {
                n && o(n),
                n = null,
                u(a())
            }
            , l)
        }
        )
    }
}
function ioe(...t) {
    let e = 0, r, n = !0, i = jn, o, s, a, l, c;
    !xt(t[0]) && typeof t[0] == "object" ? {delay: s, trailing: a=!0, leading: l=!0, rejectOnCancel: c=!1} = t[0] : [s,a=!0,l=!0,c=!1] = t;
    const u = () => {
        r && (clearTimeout(r),
        r = void 0,
        i(),
        i = jn)
    }
    ;
    return d => {
        const h = pn(s)
          , x = Date.now() - e
          , y = () => o = d();
        return u(),
        h <= 0 ? (e = Date.now(),
        y()) : (x > h && (l || !n) ? (e = Date.now(),
        y()) : a && (o = new Promise( (m, E) => {
            i = c ? E : m,
            r = setTimeout( () => {
                e = Date.now(),
                n = !0,
                m(y()),
                u()
            }
            , Math.max(0, h - x))
        }
        )),
        !l && !r && (r = setTimeout( () => n = !0, h)),
        n = !1,
        o)
    }
}
function ooe(t=JD) {
    const e = ie(!0);
    function r() {
        e.value = !1
    }
    function n() {
        e.value = !0
    }
    const i = (...o) => {
        e.value && t(...o)
    }
    ;
    return {
        isActive: kl(e),
        pause: r,
        resume: n,
        eventFilter: i
    }
}
function soe(t) {
    let e;
    function r() {
        return e || (e = t()),
        e
    }
    return r.reset = async () => {
        const n = e;
        e = void 0,
        n && await n
    }
    ,
    r
}
function aoe(t) {
    return t || It()
}
function eF(...t) {
    if (t.length !== 1)
        return v0(...t);
    const e = t[0];
    return typeof e == "function" ? kl(D5( () => ({
        get: e,
        set: jn
    }))) : ie(e)
}
function j4e(t, e=200, r={}) {
    return Z2(QD(e, r), t)
}
function W4e(t, e=200, r=!1, n=!0, i=!1) {
    return Z2(ioe(e, r, n, i), t)
}
function tF(t, e, r={}) {
    const {eventFilter: n=JD, ...i} = r;
    return me(t, Z2(n, e), i)
}
function rF(t, e, r={}) {
    const {eventFilter: n, ...i} = r
      , {eventFilter: o, pause: s, resume: a, isActive: l} = ooe(n);
    return {
        stop: tF(t, e, {
            ...i,
            eventFilter: o
        }),
        pause: s,
        resume: a,
        isActive: l
    }
}
function J2(t, e=!0, r) {
    aoe() ? Ht(t, r) : e ? t() : Xe(t)
}
function Y4e(t, e) {
    return ae( () => pn(t).map(r => pn(r)).filter(e))
}
function X4e(t, e=1e3, r={}) {
    const {immediate: n=!0, immediateCallback: i=!1} = r;
    let o = null;
    const s = ie(!1);
    function a() {
        o && (clearInterval(o),
        o = null)
    }
    function l() {
        s.value = !1,
        a()
    }
    function c() {
        const u = pn(e);
        u <= 0 || (s.value = !0,
        i && t(),
        a(),
        o = setInterval(t, u))
    }
    if (n && ca && c(),
    xt(e) || typeof e == "function") {
        const u = me(e, () => {
            s.value && ca && c()
        }
        );
        la(u)
    }
    return la(l),
    {
        isActive: s,
        pause: l,
        resume: c
    }
}
function loe(t, e, r={}) {
    const {immediate: n=!0} = r
      , i = ie(!1);
    let o = null;
    function s() {
        o && (clearTimeout(o),
        o = null)
    }
    function a() {
        i.value = !1,
        s()
    }
    function l(...c) {
        s(),
        i.value = !0,
        o = setTimeout( () => {
            i.value = !1,
            o = null,
            t(...c)
        }
        , pn(e))
    }
    return n && (i.value = !0,
    ca && l()),
    la(a),
    {
        isPending: kl(i),
        start: l,
        stop: a
    }
}
function K4e(t, e, r={}) {
    const {debounce: n=0, maxWait: i=void 0, ...o} = r;
    return tF(t, e, {
        ...o,
        eventFilter: QD(n, {
            maxWait: i
        })
    })
}
function lo(t) {
    var e;
    const r = pn(t);
    return (e = r == null ? void 0 : r.$el) != null ? e : r
}
const _o = ca ? window : void 0
  , nF = ca ? window.document : void 0
  , iF = ca ? window.navigator : void 0;
function Jr(...t) {
    let e, r, n, i;
    if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([r,n,i] = t,
    e = _o) : [e,r,n,i] = t,
    !e)
        return jn;
    Array.isArray(r) || (r = [r]),
    Array.isArray(n) || (n = [n]);
    const o = []
      , s = () => {
        o.forEach(u => u()),
        o.length = 0
    }
      , a = (u, f, d, h) => (u.addEventListener(f, d, h),
    () => u.removeEventListener(f, d, h))
      , l = me( () => [lo(e), pn(i)], ([u,f]) => {
        if (s(),
        !u)
            return;
        const d = roe(f) ? {
            ...f
        } : f;
        o.push(...r.flatMap(h => n.map(x => a(u, h, x, d))))
    }
    , {
        immediate: !0,
        flush: "post"
    })
      , c = () => {
        l(),
        s()
    }
    ;
    return la(c),
    c
}
let DA = !1;
function q4e(t, e, r={}) {
    const {window: n=_o, ignore: i=[], capture: o=!0, detectIframe: s=!1} = r;
    if (!n)
        return jn;
    ky && !DA && (DA = !0,
    Array.from(n.document.body.children).forEach(d => d.addEventListener("click", jn)),
    n.document.documentElement.addEventListener("click", jn));
    let a = !0;
    const l = d => i.some(h => {
        if (typeof h == "string")
            return Array.from(n.document.querySelectorAll(h)).some(x => x === d.target || d.composedPath().includes(x));
        {
            const x = lo(h);
            return x && (d.target === x || d.composedPath().includes(x))
        }
    }
    )
      , u = [Jr(n, "click", d => {
        const h = lo(t);
        if (!(!h || h === d.target || d.composedPath().includes(h))) {
            if (d.detail === 0 && (a = !l(d)),
            !a) {
                a = !0;
                return
            }
            e(d)
        }
    }
    , {
        passive: !0,
        capture: o
    }), Jr(n, "pointerdown", d => {
        const h = lo(t);
        a = !l(d) && !!(h && !d.composedPath().includes(h))
    }
    , {
        passive: !0
    }), s && Jr(n, "blur", d => {
        setTimeout( () => {
            var h;
            const x = lo(t);
            ((h = n.document.activeElement) == null ? void 0 : h.tagName) === "IFRAME" && !(x != null && x.contains(n.document.activeElement)) && e(d)
        }
        , 0)
    }
    )].filter(Boolean);
    return () => u.forEach(d => d())
}
function coe() {
    const t = ie(!1)
      , e = It();
    return e && Ht( () => {
        t.value = !0
    }
    , e),
    t
}
function i1(t) {
    const e = coe();
    return ae( () => (e.value,
    !!t()))
}
function uoe(t, e, r={}) {
    const {window: n=_o, ...i} = r;
    let o;
    const s = i1( () => n && "MutationObserver"in n)
      , a = () => {
        o && (o.disconnect(),
        o = void 0)
    }
      , l = ae( () => {
        const d = pn(t)
          , h = (Array.isArray(d) ? d : [d]).map(lo).filter(eoe);
        return new Set(h)
    }
    )
      , c = me( () => l.value, d => {
        a(),
        s.value && d.size && (o = new MutationObserver(e),
        d.forEach(h => o.observe(h, i)))
    }
    , {
        immediate: !0,
        flush: "post"
    })
      , u = () => o == null ? void 0 : o.takeRecords()
      , f = () => {
        a(),
        c()
    }
    ;
    return la(f),
    {
        isSupported: s,
        stop: f,
        takeRecords: u
    }
}
function Z4e(t, e) {
    const {interrupt: r=!0, onError: n=jn, onFinished: i=jn, signal: o} = e || {}
      , s = {
        aborted: "aborted",
        fulfilled: "fulfilled",
        pending: "pending",
        rejected: "rejected"
    }
      , a = Array.from(Array.from({
        length: t.length
    }), () => ({
        state: s.pending,
        data: null
    }))
      , l = Pt(a)
      , c = ie(-1);
    if (!t || t.length === 0)
        return i(),
        {
            activeIndex: c,
            result: l
        };
    function u(f, d) {
        c.value++,
        l[c.value].data = d,
        l[c.value].state = f
    }
    return t.reduce( (f, d) => f.then(h => {
        var x;
        if (o != null && o.aborted) {
            u(s.aborted, new Error("aborted"));
            return
        }
        if (((x = l[c.value]) == null ? void 0 : x.state) === s.rejected && r) {
            i();
            return
        }
        const y = d(h).then(m => (u(s.fulfilled, m),
        c.value === t.length - 1 && i(),
        m));
        return o ? Promise.race([y, foe(o)]) : y
    }
    ).catch(h => o != null && o.aborted ? (u(s.aborted, h),
    h) : (u(s.rejected, h),
    n(),
    h)), Promise.resolve()),
    {
        activeIndex: c,
        result: l
    }
}
function foe(t) {
    return new Promise( (e, r) => {
        const n = new Error("aborted");
        t.aborted ? r(n) : t.addEventListener("abort", () => r(n), {
            once: !0
        })
    }
    )
}
function FA(t, e={}) {
    const {controls: r=!1, navigator: n=iF} = e
      , i = i1( () => n && "permissions"in n);
    let o;
    const s = typeof t == "string" ? {
        name: t
    } : t
      , a = ie()
      , l = () => {
        o && (a.value = o.state)
    }
      , c = soe(async () => {
        if (i.value) {
            if (!o)
                try {
                    o = await n.permissions.query(s),
                    Jr(o, "change", l),
                    l()
                } catch {
                    a.value = "prompt"
                }
            return o
        }
    }
    );
    return c(),
    r ? {
        state: a,
        isSupported: i,
        query: c
    } : a
}
function J4e(t={}) {
    const {navigator: e=iF, read: r=!1, source: n, copiedDuring: i=1500, legacy: o=!1} = t
      , s = i1( () => e && "clipboard"in e)
      , a = FA("clipboard-read")
      , l = FA("clipboard-write")
      , c = ae( () => s.value || o)
      , u = ie("")
      , f = ie(!1)
      , d = loe( () => f.value = !1, i);
    function h() {
        s.value && E(a.value) ? e.clipboard.readText().then(g => {
            u.value = g
        }
        ) : u.value = m()
    }
    c.value && r && Jr(["copy", "cut"], h);
    async function x(g=pn(n)) {
        c.value && g != null && (s.value && E(l.value) ? await e.clipboard.writeText(g) : y(g),
        u.value = g,
        f.value = !0,
        d.start())
    }
    function y(g) {
        const p = document.createElement("textarea");
        p.value = g ?? "",
        p.style.position = "absolute",
        p.style.opacity = "0",
        document.body.appendChild(p),
        p.select(),
        document.execCommand("copy"),
        p.remove()
    }
    function m() {
        var g, p, v;
        return (v = (p = (g = document == null ? void 0 : document.getSelection) == null ? void 0 : g.call(document)) == null ? void 0 : p.toString()) != null ? v : ""
    }
    function E(g) {
        return g === "granted" || g === "prompt"
    }
    return {
        isSupported: c,
        text: u,
        copied: f,
        copy: x
    }
}
function doe(t) {
    return JSON.parse(JSON.stringify(t))
}
const Qd = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}
  , eh = "__vueuse_ssr_handlers__"
  , hoe = xoe();
function xoe() {
    return eh in Qd || (Qd[eh] = Qd[eh] || {}),
    Qd[eh]
}
function poe(t, e) {
    return hoe[t] || e
}
function goe(t) {
    return t == null ? "any" : t instanceof Set ? "set" : t instanceof Map ? "map" : t instanceof Date ? "date" : typeof t == "boolean" ? "boolean" : typeof t == "string" ? "string" : typeof t == "object" ? "object" : Number.isNaN(t) ? "any" : "number"
}
const moe = {
    boolean: {
        read: t => t === "true",
        write: t => String(t)
    },
    object: {
        read: t => JSON.parse(t),
        write: t => JSON.stringify(t)
    },
    number: {
        read: t => Number.parseFloat(t),
        write: t => String(t)
    },
    any: {
        read: t => t,
        write: t => String(t)
    },
    string: {
        read: t => t,
        write: t => String(t)
    },
    map: {
        read: t => new Map(JSON.parse(t)),
        write: t => JSON.stringify(Array.from(t.entries()))
    },
    set: {
        read: t => new Set(JSON.parse(t)),
        write: t => JSON.stringify(Array.from(t))
    },
    date: {
        read: t => new Date(t),
        write: t => t.toISOString()
    }
}
  , PA = "vueuse-storage";
function oF(t, e, r, n={}) {
    var i;
    const {flush: o="pre", deep: s=!0, listenToStorageChanges: a=!0, writeDefaults: l=!0, mergeDefaults: c=!1, shallow: u, window: f=_o, eventFilter: d, onError: h=A => {
        console.error(A)
    }
    , initOnMounted: x} = n
      , y = (u ? mp : ie)(typeof e == "function" ? e() : e);
    if (!r)
        try {
            r = poe("getDefaultStorage", () => {
                var A;
                return (A = _o) == null ? void 0 : A.localStorage
            }
            )()
        } catch (A) {
            h(A)
        }
    if (!r)
        return y;
    const m = pn(e)
      , E = goe(m)
      , g = (i = n.serializer) != null ? i : moe[E]
      , {pause: p, resume: v} = rF(y, () => b(y.value), {
        flush: o,
        deep: s,
        eventFilter: d
    });
    f && a && J2( () => {
        Jr(f, "storage", B),
        Jr(f, PA, T),
        x && B()
    }
    ),
    x || B();
    function _(A, w) {
        f && f.dispatchEvent(new CustomEvent(PA,{
            detail: {
                key: t,
                oldValue: A,
                newValue: w,
                storageArea: r
            }
        }))
    }
    function b(A) {
        try {
            const w = r.getItem(t);
            if (A == null)
                _(w, null),
                r.removeItem(t);
            else {
                const S = g.write(A);
                w !== S && (r.setItem(t, S),
                _(w, S))
            }
        } catch (w) {
            h(w)
        }
    }
    function C(A) {
        const w = A ? A.newValue : r.getItem(t);
        if (w == null)
            return l && m != null && r.setItem(t, g.write(m)),
            m;
        if (!A && c) {
            const S = g.read(w);
            return typeof c == "function" ? c(S, m) : E === "object" && !Array.isArray(S) ? {
                ...m,
                ...S
            } : S
        } else
            return typeof w != "string" ? w : g.read(w)
    }
    function B(A) {
        if (!(A && A.storageArea !== r)) {
            if (A && A.key == null) {
                y.value = m;
                return
            }
            if (!(A && A.key !== t)) {
                p();
                try {
                    (A == null ? void 0 : A.newValue) !== g.write(y.value) && (y.value = C(A))
                } catch (w) {
                    h(w)
                } finally {
                    A ? Xe(v) : v()
                }
            }
        }
    }
    function T(A) {
        B(A.detail)
    }
    return y
}
function Q4e(t={}) {
    const {document: e=nF} = t;
    if (!e)
        return ie("visible");
    const r = ie(e.visibilityState);
    return Jr(e, "visibilitychange", () => {
        r.value = e.visibilityState
    }
    ),
    r
}
function voe(t, e, r={}) {
    const {window: n=_o, ...i} = r;
    let o;
    const s = i1( () => n && "ResizeObserver"in n)
      , a = () => {
        o && (o.disconnect(),
        o = void 0)
    }
      , l = ae( () => Array.isArray(t) ? t.map(f => lo(f)) : [lo(t)])
      , c = me(l, f => {
        if (a(),
        s.value && n) {
            o = new ResizeObserver(e);
            for (const d of f)
                d && o.observe(d, i)
        }
    }
    , {
        immediate: !0,
        flush: "post"
    })
      , u = () => {
        a(),
        c()
    }
    ;
    return la(u),
    {
        isSupported: s,
        stop: u
    }
}
function e6e(t, e={}) {
    const {reset: r=!0, windowResize: n=!0, windowScroll: i=!0, immediate: o=!0} = e
      , s = ie(0)
      , a = ie(0)
      , l = ie(0)
      , c = ie(0)
      , u = ie(0)
      , f = ie(0)
      , d = ie(0)
      , h = ie(0);
    function x() {
        const y = lo(t);
        if (!y) {
            r && (s.value = 0,
            a.value = 0,
            l.value = 0,
            c.value = 0,
            u.value = 0,
            f.value = 0,
            d.value = 0,
            h.value = 0);
            return
        }
        const m = y.getBoundingClientRect();
        s.value = m.height,
        a.value = m.bottom,
        l.value = m.left,
        c.value = m.right,
        u.value = m.top,
        f.value = m.width,
        d.value = m.x,
        h.value = m.y
    }
    return voe(t, x),
    me( () => lo(t), y => !y && x()),
    uoe(t, x, {
        attributeFilter: ["style", "class"]
    }),
    i && Jr("scroll", x, {
        capture: !0,
        passive: !0
    }),
    n && Jr("resize", x, {
        passive: !0
    }),
    J2( () => {
        o && x()
    }
    ),
    {
        height: s,
        bottom: a,
        left: l,
        right: c,
        top: u,
        width: f,
        x: d,
        y: h,
        update: x
    }
}
const zu = new Map;
function t6e(t) {
    const e = Nf();
    function r(a) {
        var l;
        const c = zu.get(t) || new Set;
        c.add(a),
        zu.set(t, c);
        const u = () => i(a);
        return (l = e == null ? void 0 : e.cleanups) == null || l.push(u),
        u
    }
    function n(a) {
        function l(...c) {
            i(l),
            a(...c)
        }
        return r(l)
    }
    function i(a) {
        const l = zu.get(t);
        l && (l.delete(a),
        l.size || o())
    }
    function o() {
        zu.delete(t)
    }
    function s(a, l) {
        var c;
        (c = zu.get(t)) == null || c.forEach(u => u(a, l))
    }
    return {
        on: r,
        once: n,
        off: i,
        emit: s,
        reset: o
    }
}
function mg(t) {
    return typeof Window < "u" && t instanceof Window ? t.document.documentElement : typeof Document < "u" && t instanceof Document ? t.documentElement : t
}
function r6e(t, e, r={}) {
    const {window: n=_o} = r;
    return oF(t, e, n == null ? void 0 : n.localStorage, r)
}
function sF(t) {
    const e = window.getComputedStyle(t);
    if (e.overflowX === "scroll" || e.overflowY === "scroll" || e.overflowX === "auto" && t.clientWidth < t.scrollWidth || e.overflowY === "auto" && t.clientHeight < t.scrollHeight)
        return !0;
    {
        const r = t.parentNode;
        return !r || r.tagName === "BODY" ? !1 : sF(r)
    }
}
function yoe(t) {
    const e = t || window.event
      , r = e.target;
    return sF(r) ? !1 : e.touches.length > 1 ? !0 : (e.preventDefault && e.preventDefault(),
    !1)
}
const vg = new WeakMap;
function n6e(t, e=!1) {
    const r = ie(e);
    let n = null
      , i = "";
    me(eF(t), a => {
        const l = mg(pn(a));
        if (l) {
            const c = l;
            if (vg.get(c) || vg.set(c, c.style.overflow),
            c.style.overflow !== "hidden" && (i = c.style.overflow),
            c.style.overflow === "hidden")
                return r.value = !0;
            if (r.value)
                return c.style.overflow = "hidden"
        }
    }
    , {
        immediate: !0
    });
    const o = () => {
        const a = mg(pn(t));
        !a || r.value || (ky && (n = Jr(a, "touchmove", l => {
            yoe(l)
        }
        , {
            passive: !1
        })),
        a.style.overflow = "hidden",
        r.value = !0)
    }
      , s = () => {
        const a = mg(pn(t));
        !a || !r.value || (ky && (n == null || n()),
        a.style.overflow = i,
        vg.delete(a),
        r.value = !1)
    }
    ;
    return la(s),
    ae({
        get() {
            return r.value
        },
        set(a) {
            a ? o() : s()
        }
    })
}
function i6e(t, e, r={}) {
    const {window: n=_o} = r;
    return oF(t, e, n == null ? void 0 : n.sessionStorage, r)
}
let Eoe = 0;
function o6e(t, e={}) {
    const r = ie(!1)
      , {document: n=nF, immediate: i=!0, manual: o=!1, id: s=`vueuse_styletag_${++Eoe}`} = e
      , a = ie(t);
    let l = () => {}
    ;
    const c = () => {
        if (!n)
            return;
        const f = n.getElementById(s) || n.createElement("style");
        f.isConnected || (f.id = s,
        e.media && (f.media = e.media),
        n.head.appendChild(f)),
        !r.value && (l = me(a, d => {
            f.textContent = d
        }
        , {
            immediate: !0
        }),
        r.value = !0)
    }
      , u = () => {
        !n || !r.value || (l(),
        n.head.removeChild(n.getElementById(s)),
        r.value = !1)
    }
    ;
    return i && !o && J2(c),
    o || la(u),
    {
        id: s,
        css: a,
        unload: u,
        load: c,
        isLoaded: kl(r)
    }
}
function s6e(t, e={}) {
    const {threshold: r=50, onSwipe: n, onSwipeEnd: i, onSwipeStart: o, passive: s=!0, window: a=_o} = e
      , l = Pt({
        x: 0,
        y: 0
    })
      , c = Pt({
        x: 0,
        y: 0
    })
      , u = ae( () => l.x - c.x)
      , f = ae( () => l.y - c.y)
      , {max: d, abs: h} = Math
      , x = ae( () => d(h(u.value), h(f.value)) >= r)
      , y = ie(!1)
      , m = ae( () => x.value ? h(u.value) > h(f.value) ? u.value > 0 ? "left" : "right" : f.value > 0 ? "up" : "down" : "none")
      , E = T => [T.touches[0].clientX, T.touches[0].clientY]
      , g = (T, A) => {
        l.x = T,
        l.y = A
    }
      , p = (T, A) => {
        c.x = T,
        c.y = A
    }
    ;
    let v;
    const _ = _oe(a == null ? void 0 : a.document);
    s ? v = _ ? {
        passive: !0
    } : {
        capture: !1
    } : v = _ ? {
        passive: !1,
        capture: !0
    } : {
        capture: !0
    };
    const b = T => {
        y.value && (i == null || i(T, m.value)),
        y.value = !1
    }
      , C = [Jr(t, "touchstart", T => {
        if (T.touches.length !== 1)
            return;
        v.capture && !v.passive && T.preventDefault();
        const [A,w] = E(T);
        g(A, w),
        p(A, w),
        o == null || o(T)
    }
    , v), Jr(t, "touchmove", T => {
        if (T.touches.length !== 1)
            return;
        const [A,w] = E(T);
        p(A, w),
        !y.value && x.value && (y.value = !0),
        y.value && (n == null || n(T))
    }
    , v), Jr(t, ["touchend", "touchcancel"], b, v)];
    return {
        isPassiveEventSupported: _,
        isSwiping: y,
        direction: m,
        coordsStart: l,
        coordsEnd: c,
        lengthX: u,
        lengthY: f,
        stop: () => C.forEach(T => T())
    }
}
function _oe(t) {
    if (!t)
        return !1;
    let e = !1;
    const r = {
        get passive() {
            return e = !0,
            !1
        }
    };
    return t.addEventListener("x", jn, r),
    t.removeEventListener("x", jn),
    e
}
function a6e(t="history", e={}) {
    const {initialValue: r={}, removeNullishValues: n=!0, removeFalsyValues: i=!1, write: o=!0, window: s=_o} = e;
    if (!s)
        return Pt(r);
    const a = Pt({});
    function l() {
        if (t === "history")
            return s.location.search || "";
        if (t === "hash") {
            const E = s.location.hash || ""
              , g = E.indexOf("?");
            return g > 0 ? E.slice(g) : ""
        } else
            return (s.location.hash || "").replace(/^#/, "")
    }
    function c(E) {
        const g = E.toString();
        if (t === "history")
            return `${g ? `?${g}` : ""}${s.location.hash || ""}`;
        if (t === "hash-params")
            return `${s.location.search || ""}${g ? `#${g}` : ""}`;
        const p = s.location.hash || "#"
          , v = p.indexOf("?");
        return v > 0 ? `${p.slice(0, v)}${g ? `?${g}` : ""}` : `${p}${g ? `?${g}` : ""}`
    }
    function u() {
        return new URLSearchParams(l())
    }
    function f(E) {
        const g = new Set(Object.keys(a));
        for (const p of E.keys()) {
            const v = E.getAll(p);
            a[p] = v.length > 1 ? v : E.get(p) || "",
            g.delete(p)
        }
        Array.from(g).forEach(p => delete a[p])
    }
    const {pause: d, resume: h} = rF(a, () => {
        const E = new URLSearchParams("");
        Object.keys(a).forEach(g => {
            const p = a[g];
            Array.isArray(p) ? p.forEach(v => E.append(g, v)) : n && p == null || i && !p ? E.delete(g) : E.set(g, p)
        }
        ),
        x(E)
    }
    , {
        deep: !0
    });
    function x(E, g) {
        d(),
        g && f(E),
        s.history.replaceState(s.history.state, s.document.title, s.location.pathname + c(E)),
        h()
    }
    function y() {
        o && x(u(), !0)
    }
    Jr(s, "popstate", y, !1),
    t !== "history" && Jr(s, "hashchange", y, !1);
    const m = u();
    return m.keys().next().value ? f(m) : Object.assign(a, r),
    a
}
function boe(t, e, r, n={}) {
    var i, o, s;
    const {clone: a=!1, passive: l=!1, eventName: c, deep: u=!1, defaultValue: f, shouldEmit: d} = n
      , h = It()
      , x = r || (h == null ? void 0 : h.emit) || ((i = h == null ? void 0 : h.$emit) == null ? void 0 : i.bind(h)) || ((s = (o = h == null ? void 0 : h.proxy) == null ? void 0 : o.$emit) == null ? void 0 : s.bind(h == null ? void 0 : h.proxy));
    let y = c;
    e || (e = "modelValue"),
    y = y || `update:${e.toString()}`;
    const m = p => a ? typeof a == "function" ? a(p) : doe(p) : p
      , E = () => Qie(t[e]) ? m(t[e]) : f
      , g = p => {
        d ? d(p) && x(y, p) : x(y, p)
    }
    ;
    if (l) {
        const p = E()
          , v = ie(p);
        let _ = !1;
        return me( () => t[e], b => {
            _ || (_ = !0,
            v.value = m(b),
            Xe( () => _ = !1))
        }
        ),
        me(v, b => {
            !_ && (b !== t[e] || u) && g(b)
        }
        , {
            deep: u
        }),
        v
    } else
        return ae({
            get() {
                return E()
            },
            set(p) {
                g(p)
            }
        })
}
function l6e(t, e, r={}) {
    const n = {};
    for (const i in t)
        n[i] = boe(t, i, e, r);
    return n
}
/*!
  * vue-router v4.1.6
  * (c) 2022 Eduardo San Martin Morote
  * @license MIT
  */
const Vo = typeof window < "u";
function Coe(t) {
    return t.__esModule || t[Symbol.toStringTag] === "Module"
}
const gt = Object.assign;
function yg(t, e) {
    const r = {};
    for (const n in e) {
        const i = e[n];
        r[n] = Kn(i) ? i.map(t) : t(i)
    }
    return r
}
const F0 = () => {}
  , Kn = Array.isArray;
function Qe(t) {
    const e = Array.from(arguments).slice(1);
    console.warn.apply(console, ["[Vue Router warn]: " + t].concat(e))
}
const Aoe = /\/$/
  , woe = t => t.replace(Aoe, "");
function Eg(t, e, r="/") {
    let n, i = {}, o = "", s = "";
    const a = e.indexOf("#");
    let l = e.indexOf("?");
    return a < l && a >= 0 && (l = -1),
    l > -1 && (n = e.slice(0, l),
    o = e.slice(l + 1, a > -1 ? a : e.length),
    i = t(o)),
    a > -1 && (n = n || e.slice(0, a),
    s = e.slice(a, e.length)),
    n = Toe(n ?? e, r),
    {
        fullPath: n + (o && "?") + o + s,
        path: n,
        query: i,
        hash: s
    }
}
function Boe(t, e) {
    const r = e.query ? t(e.query) : "";
    return e.path + (r && "?") + r + (e.hash || "")
}
function IA(t, e) {
    return !e || !t.toLowerCase().startsWith(e.toLowerCase()) ? t : t.slice(e.length) || "/"
}
function OA(t, e, r) {
    const n = e.matched.length - 1
      , i = r.matched.length - 1;
    return n > -1 && n === i && ua(e.matched[n], r.matched[i]) && aF(e.params, r.params) && t(e.query) === t(r.query) && e.hash === r.hash
}
function ua(t, e) {
    return (t.aliasOf || t) === (e.aliasOf || e)
}
function aF(t, e) {
    if (Object.keys(t).length !== Object.keys(e).length)
        return !1;
    for (const r in t)
        if (!Soe(t[r], e[r]))
            return !1;
    return !0
}
function Soe(t, e) {
    return Kn(t) ? kA(t, e) : Kn(e) ? kA(e, t) : t === e
}
function kA(t, e) {
    return Kn(e) ? t.length === e.length && t.every( (r, n) => r === e[n]) : t.length === 1 && t[0] === e
}
function Toe(t, e) {
    if (t.startsWith("/"))
        return t;
    if (!e.startsWith("/"))
        return Qe(`Cannot resolve a relative location without an absolute path. Trying to resolve "${t}" from "${e}". It should look like "/${e}".`),
        t;
    if (!t)
        return e;
    const r = e.split("/")
      , n = t.split("/");
    let i = r.length - 1, o, s;
    for (o = 0; o < n.length; o++)
        if (s = n[o],
        s !== ".")
            if (s === "..")
                i > 1 && i--;
            else
                break;
    return r.slice(0, i).join("/") + "/" + n.slice(o - (o === n.length ? 1 : 0)).join("/")
}
var mf;
(function(t) {
    t.pop = "pop",
    t.push = "push"
}
)(mf || (mf = {}));
var P0;
(function(t) {
    t.back = "back",
    t.forward = "forward",
    t.unknown = ""
}
)(P0 || (P0 = {}));
function Doe(t) {
    if (!t)
        if (Vo) {
            const e = document.querySelector("base");
            t = e && e.getAttribute("href") || "/",
            t = t.replace(/^\w+:\/\/[^\/]+/, "")
        } else
            t = "/";
    return t[0] !== "/" && t[0] !== "#" && (t = "/" + t),
    woe(t)
}
const Foe = /^[^#]+#/;
function Poe(t, e) {
    return t.replace(Foe, "#") + e
}
function Ioe(t, e) {
    const r = document.documentElement.getBoundingClientRect()
      , n = t.getBoundingClientRect();
    return {
        behavior: e.behavior,
        left: n.left - r.left - (e.left || 0),
        top: n.top - r.top - (e.top || 0)
    }
}
const o1 = () => ({
    left: window.pageXOffset,
    top: window.pageYOffset
});
function Ooe(t) {
    let e;
    if ("el"in t) {
        const r = t.el
          , n = typeof r == "string" && r.startsWith("#");
        if (typeof t.el == "string" && (!n || !document.getElementById(t.el.slice(1))))
            try {
                const o = document.querySelector(t.el);
                if (n && o) {
                    Qe(`The selector "${t.el}" should be passed as "el: document.querySelector('${t.el}')" because it starts with "#".`);
                    return
                }
            } catch {
                Qe(`The selector "${t.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);
                return
            }
        const i = typeof r == "string" ? n ? document.getElementById(r.slice(1)) : document.querySelector(r) : r;
        if (!i) {
            Qe(`Couldn't find element using selector "${t.el}" returned by scrollBehavior.`);
            return
        }
        e = Ioe(i, t)
    } else
        e = t;
    "scrollBehavior"in document.documentElement.style ? window.scrollTo(e) : window.scrollTo(e.left != null ? e.left : window.pageXOffset, e.top != null ? e.top : window.pageYOffset)
}
function RA(t, e) {
    return (history.state ? history.state.position - e : -1) + t
}
const Ry = new Map;
function koe(t, e) {
    Ry.set(t, e)
}
function Roe(t) {
    const e = Ry.get(t);
    return Ry.delete(t),
    e
}
let Moe = () => location.protocol + "//" + location.host;
function lF(t, e) {
    const {pathname: r, search: n, hash: i} = e
      , o = t.indexOf("#");
    if (o > -1) {
        let a = i.includes(t.slice(o)) ? t.slice(o).length : 1
          , l = i.slice(a);
        return l[0] !== "/" && (l = "/" + l),
        IA(l, "")
    }
    return IA(r, t) + n + i
}
function Noe(t, e, r, n) {
    let i = []
      , o = []
      , s = null;
    const a = ({state: d}) => {
        const h = lF(t, location)
          , x = r.value
          , y = e.value;
        let m = 0;
        if (d) {
            if (r.value = h,
            e.value = d,
            s && s === x) {
                s = null;
                return
            }
            m = y ? d.position - y.position : 0
        } else
            n(h);
        i.forEach(E => {
            E(r.value, x, {
                delta: m,
                type: mf.pop,
                direction: m ? m > 0 ? P0.forward : P0.back : P0.unknown
            })
        }
        )
    }
    ;
    function l() {
        s = r.value
    }
    function c(d) {
        i.push(d);
        const h = () => {
            const x = i.indexOf(d);
            x > -1 && i.splice(x, 1)
        }
        ;
        return o.push(h),
        h
    }
    function u() {
        const {history: d} = window;
        d.state && d.replaceState(gt({}, d.state, {
            scroll: o1()
        }), "")
    }
    function f() {
        for (const d of o)
            d();
        o = [],
        window.removeEventListener("popstate", a),
        window.removeEventListener("beforeunload", u)
    }
    return window.addEventListener("popstate", a),
    window.addEventListener("beforeunload", u),
    {
        pauseListeners: l,
        listen: c,
        destroy: f
    }
}
function MA(t, e, r, n=!1, i=!1) {
    return {
        back: t,
        current: e,
        forward: r,
        replaced: n,
        position: window.history.length,
        scroll: i ? o1() : null
    }
}
function Loe(t) {
    const {history: e, location: r} = window
      , n = {
        value: lF(t, r)
    }
      , i = {
        value: e.state
    };
    i.value || o(n.value, {
        back: null,
        current: n.value,
        forward: null,
        position: e.length - 1,
        replaced: !0,
        scroll: null
    }, !0);
    function o(l, c, u) {
        const f = t.indexOf("#")
          , d = f > -1 ? (r.host && document.querySelector("base") ? t : t.slice(f)) + l : Moe() + t + l;
        try {
            e[u ? "replaceState" : "pushState"](c, "", d),
            i.value = c
        } catch (h) {
            Qe("Error with push/replace State", h),
            r[u ? "replace" : "assign"](d)
        }
    }
    function s(l, c) {
        const u = gt({}, e.state, MA(i.value.back, l, i.value.forward, !0), c, {
            position: i.value.position
        });
        o(l, u, !0),
        n.value = l
    }
    function a(l, c) {
        const u = gt({}, i.value, e.state, {
            forward: l,
            scroll: o1()
        });
        e.state || Qe(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:

history.replaceState(history.state, '', url)

You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`),
        o(u.current, u, !0);
        const f = gt({}, MA(n.value, l, null), {
            position: u.position + 1
        }, c);
        o(l, f, !1),
        n.value = l
    }
    return {
        location: n,
        state: i,
        push: a,
        replace: s
    }
}
function $oe(t) {
    t = Doe(t);
    const e = Loe(t)
      , r = Noe(t, e.state, e.location, e.replace);
    function n(o, s=!0) {
        s || r.pauseListeners(),
        history.go(o)
    }
    const i = gt({
        location: "",
        base: t,
        go: n,
        createHref: Poe.bind(null, t)
    }, e, r);
    return Object.defineProperty(i, "location", {
        enumerable: !0,
        get: () => e.location.value
    }),
    Object.defineProperty(i, "state", {
        enumerable: !0,
        get: () => e.state.value
    }),
    i
}
function c6e(t) {
    return t = location.host ? t || location.pathname + location.search : "",
    t.includes("#") || (t += "#"),
    !t.endsWith("#/") && !t.endsWith("#") && Qe(`A hash base must end with a "#":
"${t}" should be "${t.replace(/#.*$/, "#")}".`),
    $oe(t)
}
function Uoe(t) {
    return typeof t == "string" || t && typeof t == "object"
}
function cF(t) {
    return typeof t == "string" || typeof t == "symbol"
}
const Ss = {
    path: "/",
    name: void 0,
    params: {},
    query: {},
    hash: "",
    fullPath: "/",
    matched: [],
    meta: {},
    redirectedFrom: void 0
}
  , uF = Symbol("navigation failure");
var NA;
(function(t) {
    t[t.aborted = 4] = "aborted",
    t[t.cancelled = 8] = "cancelled",
    t[t.duplicated = 16] = "duplicated"
}
)(NA || (NA = {}));
const Goe = {
    1({location: t, currentLocation: e}) {
        return `No match for
 ${JSON.stringify(t)}${e ? `
while being at
` + JSON.stringify(e) : ""}`
    },
    2({from: t, to: e}) {
        return `Redirected from "${t.fullPath}" to "${Voe(e)}" via a navigation guard.`
    },
    4({from: t, to: e}) {
        return `Navigation aborted from "${t.fullPath}" to "${e.fullPath}" via a navigation guard.`
    },
    8({from: t, to: e}) {
        return `Navigation cancelled from "${t.fullPath}" to "${e.fullPath}" with a new navigation.`
    },
    16({from: t, to: e}) {
        return `Avoided redundant navigation to current location: "${t.fullPath}".`
    }
};
function Qc(t, e) {
    return gt(new Error(Goe[t](e)), {
        type: t,
        [uF]: !0
    }, e)
}
function Oo(t, e) {
    return t instanceof Error && uF in t && (e == null || !!(t.type & e))
}
const Hoe = ["params", "query", "hash"];
function Voe(t) {
    if (typeof t == "string")
        return t;
    if ("path"in t)
        return t.path;
    const e = {};
    for (const r of Hoe)
        r in t && (e[r] = t[r]);
    return JSON.stringify(e, null, 2)
}
const LA = "[^/]+?"
  , zoe = {
    sensitive: !1,
    strict: !1,
    start: !0,
    end: !0
}
  , joe = /[.+*?^${}()[\]/\\]/g;
function Woe(t, e) {
    const r = gt({}, zoe, e)
      , n = [];
    let i = r.start ? "^" : "";
    const o = [];
    for (const c of t) {
        const u = c.length ? [] : [90];
        r.strict && !c.length && (i += "/");
        for (let f = 0; f < c.length; f++) {
            const d = c[f];
            let h = 40 + (r.sensitive ? .25 : 0);
            if (d.type === 0)
                f || (i += "/"),
                i += d.value.replace(joe, "\\$&"),
                h += 40;
            else if (d.type === 1) {
                const {value: x, repeatable: y, optional: m, regexp: E} = d;
                o.push({
                    name: x,
                    repeatable: y,
                    optional: m
                });
                const g = E || LA;
                if (g !== LA) {
                    h += 10;
                    try {
                        new RegExp(`(${g})`)
                    } catch (v) {
                        throw new Error(`Invalid custom RegExp for param "${x}" (${g}): ` + v.message)
                    }
                }
                let p = y ? `((?:${g})(?:/(?:${g}))*)` : `(${g})`;
                f || (p = m && c.length < 2 ? `(?:/${p})` : "/" + p),
                m && (p += "?"),
                i += p,
                h += 20,
                m && (h += -8),
                y && (h += -20),
                g === ".*" && (h += -50)
            }
            u.push(h)
        }
        n.push(u)
    }
    if (r.strict && r.end) {
        const c = n.length - 1;
        n[c][n[c].length - 1] += .7000000000000001
    }
    r.strict || (i += "/?"),
    r.end ? i += "$" : r.strict && (i += "(?:/|$)");
    const s = new RegExp(i,r.sensitive ? "" : "i");
    function a(c) {
        const u = c.match(s)
          , f = {};
        if (!u)
            return null;
        for (let d = 1; d < u.length; d++) {
            const h = u[d] || ""
              , x = o[d - 1];
            f[x.name] = h && x.repeatable ? h.split("/") : h
        }
        return f
    }
    function l(c) {
        let u = ""
          , f = !1;
        for (const d of t) {
            (!f || !u.endsWith("/")) && (u += "/"),
            f = !1;
            for (const h of d)
                if (h.type === 0)
                    u += h.value;
                else if (h.type === 1) {
                    const {value: x, repeatable: y, optional: m} = h
                      , E = x in c ? c[x] : "";
                    if (Kn(E) && !y)
                        throw new Error(`Provided param "${x}" is an array but it is not repeatable (* or + modifiers)`);
                    const g = Kn(E) ? E.join("/") : E;
                    if (!g)
                        if (m)
                            d.length < 2 && (u.endsWith("/") ? u = u.slice(0, -1) : f = !0);
                        else
                            throw new Error(`Missing required param "${x}"`);
                    u += g
                }
        }
        return u || "/"
    }
    return {
        re: s,
        score: n,
        keys: o,
        parse: a,
        stringify: l
    }
}
function Yoe(t, e) {
    let r = 0;
    for (; r < t.length && r < e.length; ) {
        const n = e[r] - t[r];
        if (n)
            return n;
        r++
    }
    return t.length < e.length ? t.length === 1 && t[0] === 40 + 40 ? -1 : 1 : t.length > e.length ? e.length === 1 && e[0] === 40 + 40 ? 1 : -1 : 0
}
function Xoe(t, e) {
    let r = 0;
    const n = t.score
      , i = e.score;
    for (; r < n.length && r < i.length; ) {
        const o = Yoe(n[r], i[r]);
        if (o)
            return o;
        r++
    }
    if (Math.abs(i.length - n.length) === 1) {
        if ($A(n))
            return 1;
        if ($A(i))
            return -1
    }
    return i.length - n.length
}
function $A(t) {
    const e = t[t.length - 1];
    return t.length > 0 && e[e.length - 1] < 0
}
const Koe = {
    type: 0,
    value: ""
}
  , qoe = /[a-zA-Z0-9_]/;
function Zoe(t) {
    if (!t)
        return [[]];
    if (t === "/")
        return [[Koe]];
    if (!t.startsWith("/"))
        throw new Error(`Route paths should start with a "/": "${t}" should be "/${t}".`);
    function e(h) {
        throw new Error(`ERR (${r})/"${c}": ${h}`)
    }
    let r = 0
      , n = r;
    const i = [];
    let o;
    function s() {
        o && i.push(o),
        o = []
    }
    let a = 0, l, c = "", u = "";
    function f() {
        c && (r === 0 ? o.push({
            type: 0,
            value: c
        }) : r === 1 || r === 2 || r === 3 ? (o.length > 1 && (l === "*" || l === "+") && e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),
        o.push({
            type: 1,
            value: c,
            regexp: u,
            repeatable: l === "*" || l === "+",
            optional: l === "*" || l === "?"
        })) : e("Invalid state to consume buffer"),
        c = "")
    }
    function d() {
        c += l
    }
    for (; a < t.length; ) {
        if (l = t[a++],
        l === "\\" && r !== 2) {
            n = r,
            r = 4;
            continue
        }
        switch (r) {
        case 0:
            l === "/" ? (c && f(),
            s()) : l === ":" ? (f(),
            r = 1) : d();
            break;
        case 4:
            d(),
            r = n;
            break;
        case 1:
            l === "(" ? r = 2 : qoe.test(l) ? d() : (f(),
            r = 0,
            l !== "*" && l !== "?" && l !== "+" && a--);
            break;
        case 2:
            l === ")" ? u[u.length - 1] == "\\" ? u = u.slice(0, -1) + l : r = 3 : u += l;
            break;
        case 3:
            f(),
            r = 0,
            l !== "*" && l !== "?" && l !== "+" && a--,
            u = "";
            break;
        default:
            e("Unknown state");
            break
        }
    }
    return r === 2 && e(`Unfinished custom RegExp for param "${c}"`),
    f(),
    s(),
    i
}
function Joe(t, e, r) {
    const n = Woe(Zoe(t.path), r);
    {
        const o = new Set;
        for (const s of n.keys)
            o.has(s.name) && Qe(`Found duplicated params with name "${s.name}" for path "${t.path}". Only the last one will be available on "$route.params".`),
            o.add(s.name)
    }
    const i = gt(n, {
        record: t,
        parent: e,
        children: [],
        alias: []
    });
    return e && !i.record.aliasOf == !e.record.aliasOf && e.children.push(i),
    i
}
function Qoe(t, e) {
    const r = []
      , n = new Map;
    e = HA({
        strict: !1,
        end: !0,
        sensitive: !1
    }, e);
    function i(u) {
        return n.get(u)
    }
    function o(u, f, d) {
        const h = !d
          , x = ese(u);
        ise(x, f),
        x.aliasOf = d && d.record;
        const y = HA(e, u)
          , m = [x];
        if ("alias"in u) {
            const p = typeof u.alias == "string" ? [u.alias] : u.alias;
            for (const v of p)
                m.push(gt({}, x, {
                    components: d ? d.record.components : x.components,
                    path: v,
                    aliasOf: d ? d.record : x
                }))
        }
        let E, g;
        for (const p of m) {
            const {path: v} = p;
            if (f && v[0] !== "/") {
                const _ = f.record.path
                  , b = _[_.length - 1] === "/" ? "" : "/";
                p.path = f.record.path + (v && b + v)
            }
            if (p.path === "*")
                throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
See more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.`);
            if (E = Joe(p, f, y),
            f && v[0] === "/" && ose(E, f),
            d ? (d.alias.push(E),
            nse(d, E)) : (g = g || E,
            g !== E && g.alias.push(E),
            h && u.name && !GA(E) && s(u.name)),
            x.children) {
                const _ = x.children;
                for (let b = 0; b < _.length; b++)
                    o(_[b], E, d && d.children[b])
            }
            d = d || E,
            (E.record.components && Object.keys(E.record.components).length || E.record.name || E.record.redirect) && l(E)
        }
        return g ? () => {
            s(g)
        }
        : F0
    }
    function s(u) {
        if (cF(u)) {
            const f = n.get(u);
            f && (n.delete(u),
            r.splice(r.indexOf(f), 1),
            f.children.forEach(s),
            f.alias.forEach(s))
        } else {
            const f = r.indexOf(u);
            f > -1 && (r.splice(f, 1),
            u.record.name && n.delete(u.record.name),
            u.children.forEach(s),
            u.alias.forEach(s))
        }
    }
    function a() {
        return r
    }
    function l(u) {
        let f = 0;
        for (; f < r.length && Xoe(u, r[f]) >= 0 && (u.record.path !== r[f].record.path || !fF(u, r[f])); )
            f++;
        r.splice(f, 0, u),
        u.record.name && !GA(u) && n.set(u.record.name, u)
    }
    function c(u, f) {
        let d, h = {}, x, y;
        if ("name"in u && u.name) {
            if (d = n.get(u.name),
            !d)
                throw Qc(1, {
                    location: u
                });
            {
                const g = Object.keys(u.params || {}).filter(p => !d.keys.find(v => v.name === p));
                g.length && Qe(`Discarded invalid param(s) "${g.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`)
            }
            y = d.record.name,
            h = gt(UA(f.params, d.keys.filter(g => !g.optional).map(g => g.name)), u.params && UA(u.params, d.keys.map(g => g.name))),
            x = d.stringify(h)
        } else if ("path"in u)
            x = u.path,
            x.startsWith("/") || Qe(`The Matcher cannot resolve relative paths but received "${x}". Unless you directly called \`matcher.resolve("${x}")\`, this is probably a bug in vue-router. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/router.`),
            d = r.find(g => g.re.test(x)),
            d && (h = d.parse(x),
            y = d.record.name);
        else {
            if (d = f.name ? n.get(f.name) : r.find(g => g.re.test(f.path)),
            !d)
                throw Qc(1, {
                    location: u,
                    currentLocation: f
                });
            y = d.record.name,
            h = gt({}, f.params, u.params),
            x = d.stringify(h)
        }
        const m = [];
        let E = d;
        for (; E; )
            m.unshift(E.record),
            E = E.parent;
        return {
            name: y,
            path: x,
            params: h,
            matched: m,
            meta: rse(m)
        }
    }
    return t.forEach(u => o(u)),
    {
        addRoute: o,
        resolve: c,
        removeRoute: s,
        getRoutes: a,
        getRecordMatcher: i
    }
}
function UA(t, e) {
    const r = {};
    for (const n of e)
        n in t && (r[n] = t[n]);
    return r
}
function ese(t) {
    return {
        path: t.path,
        redirect: t.redirect,
        name: t.name,
        meta: t.meta || {},
        aliasOf: void 0,
        beforeEnter: t.beforeEnter,
        props: tse(t),
        children: t.children || [],
        instances: {},
        leaveGuards: new Set,
        updateGuards: new Set,
        enterCallbacks: {},
        components: "components"in t ? t.components || null : t.component && {
            default: t.component
        }
    }
}
function tse(t) {
    const e = {}
      , r = t.props || !1;
    if ("component"in t)
        e.default = r;
    else
        for (const n in t.components)
            e[n] = typeof r == "boolean" ? r : r[n];
    return e
}
function GA(t) {
    for (; t; ) {
        if (t.record.aliasOf)
            return !0;
        t = t.parent
    }
    return !1
}
function rse(t) {
    return t.reduce( (e, r) => gt(e, r.meta), {})
}
function HA(t, e) {
    const r = {};
    for (const n in t)
        r[n] = n in e ? e[n] : t[n];
    return r
}
function My(t, e) {
    return t.name === e.name && t.optional === e.optional && t.repeatable === e.repeatable
}
function nse(t, e) {
    for (const r of t.keys)
        if (!r.optional && !e.keys.find(My.bind(null, r)))
            return Qe(`Alias "${e.record.path}" and the original record: "${t.record.path}" must have the exact same param named "${r.name}"`);
    for (const r of e.keys)
        if (!r.optional && !t.keys.find(My.bind(null, r)))
            return Qe(`Alias "${e.record.path}" and the original record: "${t.record.path}" must have the exact same param named "${r.name}"`)
}
function ise(t, e) {
    e && e.record.name && !t.name && !t.path && Qe(`The route named "${String(e.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`)
}
function ose(t, e) {
    for (const r of e.keys)
        if (!t.keys.find(My.bind(null, r)))
            return Qe(`Absolute path "${t.record.path}" must have the exact same param named "${r.name}" as its parent "${e.record.path}".`)
}
function fF(t, e) {
    return e.children.some(r => r === t || fF(t, r))
}
const dF = /#/g
  , sse = /&/g
  , ase = /\//g
  , lse = /=/g
  , cse = /\?/g
  , hF = /\+/g
  , use = /%5B/g
  , fse = /%5D/g
  , xF = /%5E/g
  , dse = /%60/g
  , pF = /%7B/g
  , hse = /%7C/g
  , gF = /%7D/g
  , xse = /%20/g;
function Q2(t) {
    return encodeURI("" + t).replace(hse, "|").replace(use, "[").replace(fse, "]")
}
function pse(t) {
    return Q2(t).replace(pF, "{").replace(gF, "}").replace(xF, "^")
}
function Ny(t) {
    return Q2(t).replace(hF, "%2B").replace(xse, "+").replace(dF, "%23").replace(sse, "%26").replace(dse, "`").replace(pF, "{").replace(gF, "}").replace(xF, "^")
}
function gse(t) {
    return Ny(t).replace(lse, "%3D")
}
function mse(t) {
    return Q2(t).replace(dF, "%23").replace(cse, "%3F")
}
function vse(t) {
    return t == null ? "" : mse(t).replace(ase, "%2F")
}
function vf(t) {
    try {
        return decodeURIComponent("" + t)
    } catch {
        Qe(`Error decoding "${t}". Using original value`)
    }
    return "" + t
}
function yse(t) {
    const e = {};
    if (t === "" || t === "?")
        return e;
    const n = (t[0] === "?" ? t.slice(1) : t).split("&");
    for (let i = 0; i < n.length; ++i) {
        const o = n[i].replace(hF, " ")
          , s = o.indexOf("=")
          , a = vf(s < 0 ? o : o.slice(0, s))
          , l = s < 0 ? null : vf(o.slice(s + 1));
        if (a in e) {
            let c = e[a];
            Kn(c) || (c = e[a] = [c]),
            c.push(l)
        } else
            e[a] = l
    }
    return e
}
function VA(t) {
    let e = "";
    for (let r in t) {
        const n = t[r];
        if (r = gse(r),
        n == null) {
            n !== void 0 && (e += (e.length ? "&" : "") + r);
            continue
        }
        (Kn(n) ? n.map(o => o && Ny(o)) : [n && Ny(n)]).forEach(o => {
            o !== void 0 && (e += (e.length ? "&" : "") + r,
            o != null && (e += "=" + o))
        }
        )
    }
    return e
}
function Ese(t) {
    const e = {};
    for (const r in t) {
        const n = t[r];
        n !== void 0 && (e[r] = Kn(n) ? n.map(i => i == null ? null : "" + i) : n == null ? n : "" + n)
    }
    return e
}
const mF = Symbol("router view location matched")
  , zA = Symbol("router view depth")
  , s1 = Symbol("router")
  , eb = Symbol("route location")
  , Ly = Symbol("router view location");
function ju() {
    let t = [];
    function e(n) {
        return t.push(n),
        () => {
            const i = t.indexOf(n);
            i > -1 && t.splice(i, 1)
        }
    }
    function r() {
        t = []
    }
    return {
        add: e,
        list: () => t,
        reset: r
    }
}
function _se(t, e, r) {
    const n = () => {
        t[e].delete(r)
    }
    ;
    vs(n),
    wo(n),
    gs( () => {
        t[e].add(r)
    }
    ),
    t[e].add(r)
}
function u6e(t) {
    if (!It()) {
        Qe("getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function");
        return
    }
    const e = dr(mF, {}).value;
    if (!e) {
        Qe("No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?");
        return
    }
    _se(e, "leaveGuards", t)
}
function Rs(t, e, r, n, i) {
    const o = n && (n.enterCallbacks[i] = n.enterCallbacks[i] || []);
    return () => new Promise( (s, a) => {
        const l = f => {
            f === !1 ? a(Qc(4, {
                from: r,
                to: e
            })) : f instanceof Error ? a(f) : Uoe(f) ? a(Qc(2, {
                from: e,
                to: f
            })) : (o && n.enterCallbacks[i] === o && typeof f == "function" && o.push(f),
            s())
        }
          , c = t.call(n && n.instances[i], e, r, bse(l, e, r));
        let u = Promise.resolve(c);
        if (t.length < 3 && (u = u.then(l)),
        t.length > 2) {
            const f = `The "next" callback was never called inside of ${t.name ? '"' + t.name + '"' : ""}:
${t.toString()}
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;
            if (typeof c == "object" && "then"in c)
                u = u.then(d => l._called ? d : (Qe(f),
                Promise.reject(new Error("Invalid navigation guard"))));
            else if (c !== void 0 && !l._called) {
                Qe(f),
                a(new Error("Invalid navigation guard"));
                return
            }
        }
        u.catch(f => a(f))
    }
    )
}
function bse(t, e, r) {
    let n = 0;
    return function() {
        n++ === 1 && Qe(`The "next" callback was called more than once in one navigation guard when going from "${r.fullPath}" to "${e.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`),
        t._called = !0,
        n === 1 && t.apply(null, arguments)
    }
}
function _g(t, e, r, n) {
    const i = [];
    for (const o of t) {
        !o.components && !o.children.length && Qe(`Record with path "${o.path}" is either missing a "component(s)" or "children" property.`);
        for (const s in o.components) {
            let a = o.components[s];
            {
                if (!a || typeof a != "object" && typeof a != "function")
                    throw Qe(`Component "${s}" in record with path "${o.path}" is not a valid component. Received "${String(a)}".`),
                    new Error("Invalid route component");
                if ("then"in a) {
                    Qe(`Component "${s}" in record with path "${o.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);
                    const l = a;
                    a = () => l
                } else
                    a.__asyncLoader && !a.__warnedDefineAsync && (a.__warnedDefineAsync = !0,
                    Qe(`Component "${s}" in record with path "${o.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`))
            }
            if (!(e !== "beforeRouteEnter" && !o.instances[s]))
                if (Cse(a)) {
                    const c = (a.__vccOpts || a)[e];
                    c && i.push(Rs(c, r, n, o, s))
                } else {
                    let l = a();
                    "catch"in l || (Qe(`Component "${s}" in record with path "${o.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`),
                    l = Promise.resolve(l)),
                    i.push( () => l.then(c => {
                        if (!c)
                            return Promise.reject(new Error(`Couldn't resolve component "${s}" at "${o.path}"`));
                        const u = Coe(c) ? c.default : c;
                        o.components[s] = u;
                        const d = (u.__vccOpts || u)[e];
                        return d && Rs(d, r, n, o, s)()
                    }
                    ))
                }
        }
    }
    return i
}
function Cse(t) {
    return typeof t == "object" || "displayName"in t || "props"in t || "__vccOpts"in t
}
function jA(t) {
    const e = dr(s1)
      , r = dr(eb)
      , n = ae( () => e.resolve(hn(t.to)))
      , i = ae( () => {
        const {matched: l} = n.value
          , {length: c} = l
          , u = l[c - 1]
          , f = r.matched;
        if (!u || !f.length)
            return -1;
        const d = f.findIndex(ua.bind(null, u));
        if (d > -1)
            return d;
        const h = WA(l[c - 2]);
        return c > 1 && WA(u) === h && f[f.length - 1].path !== h ? f.findIndex(ua.bind(null, l[c - 2])) : d
    }
    )
      , o = ae( () => i.value > -1 && Sse(r.params, n.value.params))
      , s = ae( () => i.value > -1 && i.value === r.matched.length - 1 && aF(r.params, n.value.params));
    function a(l={}) {
        return Bse(l) ? e[hn(t.replace) ? "replace" : "push"](hn(t.to)).catch(F0) : Promise.resolve()
    }
    if (Vo) {
        const l = It();
        if (l) {
            const c = {
                route: n.value,
                isActive: o.value,
                isExactActive: s.value
            };
            l.__vrl_devtools = l.__vrl_devtools || [],
            l.__vrl_devtools.push(c),
            mu( () => {
                c.route = n.value,
                c.isActive = o.value,
                c.isExactActive = s.value
            }
            , {
                flush: "post"
            })
        }
    }
    return {
        route: n,
        href: ae( () => n.value.href),
        isActive: o,
        isExactActive: s,
        navigate: a
    }
}
const Ase = be({
    name: "RouterLink",
    compatConfig: {
        MODE: 3
    },
    props: {
        to: {
            type: [String, Object],
            required: !0
        },
        replace: Boolean,
        activeClass: String,
        exactActiveClass: String,
        custom: Boolean,
        ariaCurrentValue: {
            type: String,
            default: "page"
        }
    },
    useLink: jA,
    setup(t, {slots: e}) {
        const r = Pt(jA(t))
          , {options: n} = dr(s1)
          , i = ae( () => ({
            [YA(t.activeClass, n.linkActiveClass, "router-link-active")]: r.isActive,
            [YA(t.exactActiveClass, n.linkExactActiveClass, "router-link-exact-active")]: r.isExactActive
        }));
        return () => {
            const o = e.default && e.default(r);
            return t.custom ? o : Or("a", {
                "aria-current": r.isExactActive ? t.ariaCurrentValue : null,
                href: r.href,
                onClick: r.navigate,
                class: i.value
            }, o)
        }
    }
})
  , wse = Ase;
function Bse(t) {
    if (!(t.metaKey || t.altKey || t.ctrlKey || t.shiftKey) && !t.defaultPrevented && !(t.button !== void 0 && t.button !== 0)) {
        if (t.currentTarget && t.currentTarget.getAttribute) {
            const e = t.currentTarget.getAttribute("target");
            if (/\b_blank\b/i.test(e))
                return
        }
        return t.preventDefault && t.preventDefault(),
        !0
    }
}
function Sse(t, e) {
    for (const r in e) {
        const n = e[r]
          , i = t[r];
        if (typeof n == "string") {
            if (n !== i)
                return !1
        } else if (!Kn(i) || i.length !== n.length || n.some( (o, s) => o !== i[s]))
            return !1
    }
    return !0
}
function WA(t) {
    return t ? t.aliasOf ? t.aliasOf.path : t.path : ""
}
const YA = (t, e, r) => t ?? e ?? r
  , Tse = be({
    name: "RouterView",
    inheritAttrs: !1,
    props: {
        name: {
            type: String,
            default: "default"
        },
        route: Object
    },
    compatConfig: {
        MODE: 3
    },
    setup(t, {attrs: e, slots: r}) {
        Fse();
        const n = dr(Ly)
          , i = ae( () => t.route || n.value)
          , o = dr(zA, 0)
          , s = ae( () => {
            let c = hn(o);
            const {matched: u} = i.value;
            let f;
            for (; (f = u[c]) && !f.components; )
                c++;
            return c
        }
        )
          , a = ae( () => i.value.matched[s.value]);
        xi(zA, ae( () => s.value + 1)),
        xi(mF, a),
        xi(Ly, i);
        const l = ie();
        return me( () => [l.value, a.value, t.name], ([c,u,f], [d,h,x]) => {
            u && (u.instances[f] = c,
            h && h !== u && c && c === d && (u.leaveGuards.size || (u.leaveGuards = h.leaveGuards),
            u.updateGuards.size || (u.updateGuards = h.updateGuards))),
            c && u && (!h || !ua(u, h) || !d) && (u.enterCallbacks[f] || []).forEach(y => y(c))
        }
        , {
            flush: "post"
        }),
        () => {
            const c = i.value
              , u = t.name
              , f = a.value
              , d = f && f.components[u];
            if (!d)
                return XA(r.default, {
                    Component: d,
                    route: c
                });
            const h = f.props[u]
              , x = h ? h === !0 ? c.params : typeof h == "function" ? h(c) : h : null
              , m = Or(d, gt({}, x, e, {
                onVnodeUnmounted: E => {
                    E.component.isUnmounted && (f.instances[u] = null)
                }
                ,
                ref: l
            }));
            if (Vo && m.ref) {
                const E = {
                    depth: s.value,
                    name: f.name,
                    path: f.path,
                    meta: f.meta
                };
                (Kn(m.ref) ? m.ref.map(p => p.i) : [m.ref.i]).forEach(p => {
                    p.__vrv_devtools = E
                }
                )
            }
            return XA(r.default, {
                Component: m,
                route: c
            }) || m
        }
    }
});
function XA(t, e) {
    if (!t)
        return null;
    const r = t(e);
    return r.length === 1 ? r[0] : r
}
const Dse = Tse;
function Fse() {
    const t = It()
      , e = t.parent && t.parent.type.name;
    if (e && (e === "KeepAlive" || e.includes("Transition"))) {
        const r = e === "KeepAlive" ? "keep-alive" : "transition";
        Qe(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
Use slot props instead:

<router-view v-slot="{ Component }">
  <${r}>
    <component :is="Component" />
  </${r}>
</router-view>`)
    }
}
function Wu(t, e) {
    const r = gt({}, t, {
        matched: t.matched.map(n => $se(n, ["instances", "children", "aliasOf"]))
    });
    return {
        _custom: {
            type: null,
            readOnly: !0,
            display: t.fullPath,
            tooltip: e,
            value: r
        }
    }
}
function th(t) {
    return {
        _custom: {
            display: t
        }
    }
}
let Pse = 0;
function Ise(t, e, r) {
    if (e.__hasDevtools)
        return;
    e.__hasDevtools = !0;
    const n = Pse++;
    kp({
        id: "org.vuejs.router" + (n ? "." + n : ""),
        label: "Vue Router",
        packageName: "vue-router",
        homepage: "https://router.vuejs.org",
        logo: "https://router.vuejs.org/logo.png",
        componentStateTypes: ["Routing"],
        app: t
    }, i => {
        typeof i.now != "function" && console.warn("[Vue Router]: 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."),
        i.on.inspectComponent( (u, f) => {
            u.instanceData && u.instanceData.state.push({
                type: "Routing",
                key: "$route",
                editable: !1,
                value: Wu(e.currentRoute.value, "Current Route")
            })
        }
        ),
        i.on.visitComponentTree( ({treeNode: u, componentInstance: f}) => {
            if (f.__vrv_devtools) {
                const d = f.__vrv_devtools;
                u.tags.push({
                    label: (d.name ? `${d.name.toString()}: ` : "") + d.path,
                    textColor: 0,
                    tooltip: "This component is rendered by &lt;router-view&gt;",
                    backgroundColor: vF
                })
            }
            Kn(f.__vrl_devtools) && (f.__devtoolsApi = i,
            f.__vrl_devtools.forEach(d => {
                let h = _F
                  , x = "";
                d.isExactActive ? (h = EF,
                x = "This is exactly active") : d.isActive && (h = yF,
                x = "This link is active"),
                u.tags.push({
                    label: d.route.path,
                    textColor: 0,
                    tooltip: x,
                    backgroundColor: h
                })
            }
            ))
        }
        ),
        me(e.currentRoute, () => {
            l(),
            i.notifyComponentUpdate(),
            i.sendInspectorTree(a),
            i.sendInspectorState(a)
        }
        );
        const o = "router:navigations:" + n;
        i.addTimelineLayer({
            id: o,
            label: `Router${n ? " " + n : ""} Navigations`,
            color: 4237508
        }),
        e.onError( (u, f) => {
            i.addTimelineEvent({
                layerId: o,
                event: {
                    title: "Error during Navigation",
                    subtitle: f.fullPath,
                    logType: "error",
                    time: i.now(),
                    data: {
                        error: u
                    },
                    groupId: f.meta.__navigationId
                }
            })
        }
        );
        let s = 0;
        e.beforeEach( (u, f) => {
            const d = {
                guard: th("beforeEach"),
                from: Wu(f, "Current Location during this navigation"),
                to: Wu(u, "Target location")
            };
            Object.defineProperty(u.meta, "__navigationId", {
                value: s++
            }),
            i.addTimelineEvent({
                layerId: o,
                event: {
                    time: i.now(),
                    title: "Start of navigation",
                    subtitle: u.fullPath,
                    data: d,
                    groupId: u.meta.__navigationId
                }
            })
        }
        ),
        e.afterEach( (u, f, d) => {
            const h = {
                guard: th("afterEach")
            };
            d ? (h.failure = {
                _custom: {
                    type: Error,
                    readOnly: !0,
                    display: d ? d.message : "",
                    tooltip: "Navigation Failure",
                    value: d
                }
            },
            h.status = th("❌")) : h.status = th("✅"),
            h.from = Wu(f, "Current Location during this navigation"),
            h.to = Wu(u, "Target location"),
            i.addTimelineEvent({
                layerId: o,
                event: {
                    title: "End of navigation",
                    subtitle: u.fullPath,
                    time: i.now(),
                    data: h,
                    logType: d ? "warning" : "default",
                    groupId: u.meta.__navigationId
                }
            })
        }
        );
        const a = "router-inspector:" + n;
        i.addInspector({
            id: a,
            label: "Routes" + (n ? " " + n : ""),
            icon: "book",
            treeFilterPlaceholder: "Search routes"
        });
        function l() {
            if (!c)
                return;
            const u = c;
            let f = r.getRoutes().filter(d => !d.parent);
            f.forEach(AF),
            u.filter && (f = f.filter(d => $y(d, u.filter.toLowerCase()))),
            f.forEach(d => CF(d, e.currentRoute.value)),
            u.rootNodes = f.map(bF)
        }
        let c;
        i.on.getInspectorTree(u => {
            c = u,
            u.app === t && u.inspectorId === a && l()
        }
        ),
        i.on.getInspectorState(u => {
            if (u.app === t && u.inspectorId === a) {
                const d = r.getRoutes().find(h => h.record.__vd_id === u.nodeId);
                d && (u.state = {
                    options: kse(d)
                })
            }
        }
        ),
        i.sendInspectorTree(a),
        i.sendInspectorState(a)
    }
    )
}
function Ose(t) {
    return t.optional ? t.repeatable ? "*" : "?" : t.repeatable ? "+" : ""
}
function kse(t) {
    const {record: e} = t
      , r = [{
        editable: !1,
        key: "path",
        value: e.path
    }];
    return e.name != null && r.push({
        editable: !1,
        key: "name",
        value: e.name
    }),
    r.push({
        editable: !1,
        key: "regexp",
        value: t.re
    }),
    t.keys.length && r.push({
        editable: !1,
        key: "keys",
        value: {
            _custom: {
                type: null,
                readOnly: !0,
                display: t.keys.map(n => `${n.name}${Ose(n)}`).join(" "),
                tooltip: "Param keys",
                value: t.keys
            }
        }
    }),
    e.redirect != null && r.push({
        editable: !1,
        key: "redirect",
        value: e.redirect
    }),
    t.alias.length && r.push({
        editable: !1,
        key: "aliases",
        value: t.alias.map(n => n.record.path)
    }),
    Object.keys(t.record.meta).length && r.push({
        editable: !1,
        key: "meta",
        value: t.record.meta
    }),
    r.push({
        key: "score",
        editable: !1,
        value: {
            _custom: {
                type: null,
                readOnly: !0,
                display: t.score.map(n => n.join(", ")).join(" | "),
                tooltip: "Score used to sort routes",
                value: t.score
            }
        }
    }),
    r
}
const vF = 15485081
  , yF = 2450411
  , EF = 8702998
  , Rse = 2282478
  , _F = 16486972
  , Mse = 6710886;
function bF(t) {
    const e = []
      , {record: r} = t;
    r.name != null && e.push({
        label: String(r.name),
        textColor: 0,
        backgroundColor: Rse
    }),
    r.aliasOf && e.push({
        label: "alias",
        textColor: 0,
        backgroundColor: _F
    }),
    t.__vd_match && e.push({
        label: "matches",
        textColor: 0,
        backgroundColor: vF
    }),
    t.__vd_exactActive && e.push({
        label: "exact",
        textColor: 0,
        backgroundColor: EF
    }),
    t.__vd_active && e.push({
        label: "active",
        textColor: 0,
        backgroundColor: yF
    }),
    r.redirect && e.push({
        label: typeof r.redirect == "string" ? `redirect: ${r.redirect}` : "redirects",
        textColor: 16777215,
        backgroundColor: Mse
    });
    let n = r.__vd_id;
    return n == null && (n = String(Nse++),
    r.__vd_id = n),
    {
        id: n,
        label: r.path,
        tags: e,
        children: t.children.map(bF)
    }
}
let Nse = 0;
const Lse = /^\/(.*)\/([a-z]*)$/;
function CF(t, e) {
    const r = e.matched.length && ua(e.matched[e.matched.length - 1], t.record);
    t.__vd_exactActive = t.__vd_active = r,
    r || (t.__vd_active = e.matched.some(n => ua(n, t.record))),
    t.children.forEach(n => CF(n, e))
}
function AF(t) {
    t.__vd_match = !1,
    t.children.forEach(AF)
}
function $y(t, e) {
    const r = String(t.re).match(Lse);
    if (t.__vd_match = !1,
    !r || r.length < 3)
        return !1;
    if (new RegExp(r[1].replace(/\$$/, ""),r[2]).test(e))
        return t.children.forEach(s => $y(s, e)),
        t.record.path !== "/" || e === "/" ? (t.__vd_match = t.re.test(e),
        !0) : !1;
    const i = t.record.path.toLowerCase()
      , o = vf(i);
    return !e.startsWith("/") && (o.includes(e) || i.includes(e)) || o.startsWith(e) || i.startsWith(e) || t.record.name && String(t.record.name).includes(e) ? !0 : t.children.some(s => $y(s, e))
}
function $se(t, e) {
    const r = {};
    for (const n in t)
        e.includes(n) || (r[n] = t[n]);
    return r
}
function f6e(t) {
    const e = Qoe(t.routes, t)
      , r = t.parseQuery || yse
      , n = t.stringifyQuery || VA
      , i = t.history;
    if (!i)
        throw new Error('Provide the "history" option when calling "createRouter()": https://next.router.vuejs.org/api/#history.');
    const o = ju()
      , s = ju()
      , a = ju()
      , l = mp(Ss);
    let c = Ss;
    Vo && t.scrollBehavior && "scrollRestoration"in history && (history.scrollRestoration = "manual");
    const u = yg.bind(null, H => "" + H)
      , f = yg.bind(null, vse)
      , d = yg.bind(null, vf);
    function h(H, Q) {
        let G, re;
        return cF(H) ? (G = e.getRecordMatcher(H),
        re = Q) : re = H,
        e.addRoute(re, G)
    }
    function x(H) {
        const Q = e.getRecordMatcher(H);
        Q ? e.removeRoute(Q) : Qe(`Cannot remove non-existent route "${String(H)}"`)
    }
    function y() {
        return e.getRoutes().map(H => H.record)
    }
    function m(H) {
        return !!e.getRecordMatcher(H)
    }
    function E(H, Q) {
        if (Q = gt({}, Q || l.value),
        typeof H == "string") {
            const ve = Eg(r, H, Q.path)
              , I = e.resolve({
                path: ve.path
            }, Q)
              , z = i.createHref(ve.fullPath);
            return z.startsWith("//") ? Qe(`Location "${H}" resolved to "${z}". A resolved location cannot start with multiple slashes.`) : I.matched.length || Qe(`No match found for location with path "${H}"`),
            gt(ve, I, {
                params: d(I.params),
                hash: vf(ve.hash),
                redirectedFrom: void 0,
                href: z
            })
        }
        let G;
        if ("path"in H)
            "params"in H && !("name"in H) && Object.keys(H.params).length && Qe(`Path "${H.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),
            G = gt({}, H, {
                path: Eg(r, H.path, Q.path).path
            });
        else {
            const ve = gt({}, H.params);
            for (const I in ve)
                ve[I] == null && delete ve[I];
            G = gt({}, H, {
                params: f(H.params)
            }),
            Q.params = f(Q.params)
        }
        const re = e.resolve(G, Q)
          , te = H.hash || "";
        te && !te.startsWith("#") && Qe(`A \`hash\` should always start with the character "#". Replace "${te}" with "#${te}".`),
        re.params = u(d(re.params));
        const he = Boe(n, gt({}, H, {
            hash: pse(te),
            path: re.path
        }))
          , xe = i.createHref(he);
        return xe.startsWith("//") ? Qe(`Location "${H}" resolved to "${xe}". A resolved location cannot start with multiple slashes.`) : re.matched.length || Qe(`No match found for location with path "${"path"in H ? H.path : H}"`),
        gt({
            fullPath: he,
            hash: te,
            query: n === VA ? Ese(H.query) : H.query || {}
        }, re, {
            redirectedFrom: void 0,
            href: xe
        })
    }
    function g(H) {
        return typeof H == "string" ? Eg(r, H, l.value.path) : gt({}, H)
    }
    function p(H, Q) {
        if (c !== H)
            return Qc(8, {
                from: Q,
                to: H
            })
    }
    function v(H) {
        return C(H)
    }
    function _(H) {
        return v(gt(g(H), {
            replace: !0
        }))
    }
    function b(H) {
        const Q = H.matched[H.matched.length - 1];
        if (Q && Q.redirect) {
            const {redirect: G} = Q;
            let re = typeof G == "function" ? G(H) : G;
            if (typeof re == "string" && (re = re.includes("?") || re.includes("#") ? re = g(re) : {
                path: re
            },
            re.params = {}),
            !("path"in re) && !("name"in re))
                throw Qe(`Invalid redirect found:
${JSON.stringify(re, null, 2)}
 when navigating to "${H.fullPath}". A redirect must contain a name or path. This will break in production.`),
                new Error("Invalid redirect");
            return gt({
                query: H.query,
                hash: H.hash,
                params: "path"in re ? {} : H.params
            }, re)
        }
    }
    function C(H, Q) {
        const G = c = E(H)
          , re = l.value
          , te = H.state
          , he = H.force
          , xe = H.replace === !0
          , ve = b(G);
        if (ve)
            return C(gt(g(ve), {
                state: typeof ve == "object" ? gt({}, te, ve.state) : te,
                force: he,
                replace: xe
            }), Q || G);
        const I = G;
        I.redirectedFrom = Q;
        let z;
        return !he && OA(n, re, G) && (z = Qc(16, {
            to: I,
            from: re
        }),
        oe(re, re, !0, !1)),
        (z ? Promise.resolve(z) : T(I, re)).catch(q => Oo(q) ? Oo(q, 2) ? q : K(q) : N(q, I, re)).then(q => {
            if (q) {
                if (Oo(q, 2))
                    return OA(n, E(q.to), I) && Q && (Q._count = Q._count ? Q._count + 1 : 1) > 10 ? (Qe(`Detected an infinite redirection in a navigation guard when going from "${re.fullPath}" to "${I.fullPath}". Aborting to avoid a Stack Overflow. This will break in production if not fixed.`),
                    Promise.reject(new Error("Infinite redirect in navigation guard"))) : C(gt({
                        replace: xe
                    }, g(q.to), {
                        state: typeof q.to == "object" ? gt({}, te, q.to.state) : te,
                        force: he
                    }), Q || I)
            } else
                q = w(I, re, !0, xe, te);
            return A(I, re, q),
            q
        }
        )
    }
    function B(H, Q) {
        const G = p(H, Q);
        return G ? Promise.reject(G) : Promise.resolve()
    }
    function T(H, Q) {
        let G;
        const [re,te,he] = Use(H, Q);
        G = _g(re.reverse(), "beforeRouteLeave", H, Q);
        for (const ve of re)
            ve.leaveGuards.forEach(I => {
                G.push(Rs(I, H, Q))
            }
            );
        const xe = B.bind(null, H, Q);
        return G.push(xe),
        nc(G).then( () => {
            G = [];
            for (const ve of o.list())
                G.push(Rs(ve, H, Q));
            return G.push(xe),
            nc(G)
        }
        ).then( () => {
            G = _g(te, "beforeRouteUpdate", H, Q);
            for (const ve of te)
                ve.updateGuards.forEach(I => {
                    G.push(Rs(I, H, Q))
                }
                );
            return G.push(xe),
            nc(G)
        }
        ).then( () => {
            G = [];
            for (const ve of H.matched)
                if (ve.beforeEnter && !Q.matched.includes(ve))
                    if (Kn(ve.beforeEnter))
                        for (const I of ve.beforeEnter)
                            G.push(Rs(I, H, Q));
                    else
                        G.push(Rs(ve.beforeEnter, H, Q));
            return G.push(xe),
            nc(G)
        }
        ).then( () => (H.matched.forEach(ve => ve.enterCallbacks = {}),
        G = _g(he, "beforeRouteEnter", H, Q),
        G.push(xe),
        nc(G))).then( () => {
            G = [];
            for (const ve of s.list())
                G.push(Rs(ve, H, Q));
            return G.push(xe),
            nc(G)
        }
        ).catch(ve => Oo(ve, 8) ? ve : Promise.reject(ve))
    }
    function A(H, Q, G) {
        for (const re of a.list())
            re(H, Q, G)
    }
    function w(H, Q, G, re, te) {
        const he = p(H, Q);
        if (he)
            return he;
        const xe = Q === Ss
          , ve = Vo ? history.state : {};
        G && (re || xe ? i.replace(H.fullPath, gt({
            scroll: xe && ve && ve.scroll
        }, te)) : i.push(H.fullPath, te)),
        l.value = H,
        oe(H, Q, G, xe),
        K()
    }
    let S;
    function D() {
        S || (S = i.listen( (H, Q, G) => {
            if (!W.listening)
                return;
            const re = E(H)
              , te = b(re);
            if (te) {
                C(gt(te, {
                    replace: !0
                }), re).catch(F0);
                return
            }
            c = re;
            const he = l.value;
            Vo && koe(RA(he.fullPath, G.delta), o1()),
            T(re, he).catch(xe => Oo(xe, 12) ? xe : Oo(xe, 2) ? (C(xe.to, re).then(ve => {
                Oo(ve, 20) && !G.delta && G.type === mf.pop && i.go(-1, !1)
            }
            ).catch(F0),
            Promise.reject()) : (G.delta && i.go(-G.delta, !1),
            N(xe, re, he))).then(xe => {
                xe = xe || w(re, he, !1),
                xe && (G.delta && !Oo(xe, 8) ? i.go(-G.delta, !1) : G.type === mf.pop && Oo(xe, 20) && i.go(-1, !1)),
                A(re, he, xe)
            }
            ).catch(F0)
        }
        ))
    }
    let F = ju(), R = ju(), P;
    function N(H, Q, G) {
        K(H);
        const re = R.list();
        return re.length ? re.forEach(te => te(H, Q, G)) : (Qe("uncaught error during route navigation:"),
        console.error(H)),
        Promise.reject(H)
    }
    function j() {
        return P && l.value !== Ss ? Promise.resolve() : new Promise( (H, Q) => {
            F.add([H, Q])
        }
        )
    }
    function K(H) {
        return P || (P = !H,
        D(),
        F.list().forEach( ([Q,G]) => H ? G(H) : Q()),
        F.reset()),
        H
    }
    function oe(H, Q, G, re) {
        const {scrollBehavior: te} = t;
        if (!Vo || !te)
            return Promise.resolve();
        const he = !G && Roe(RA(H.fullPath, 0)) || (re || !G) && history.state && history.state.scroll || null;
        return Xe().then( () => te(H, Q, he)).then(xe => xe && Ooe(xe)).catch(xe => N(xe, H, Q))
    }
    const U = H => i.go(H);
    let $;
    const V = new Set
      , W = {
        currentRoute: l,
        listening: !0,
        addRoute: h,
        removeRoute: x,
        hasRoute: m,
        getRoutes: y,
        resolve: E,
        options: t,
        push: v,
        replace: _,
        go: U,
        back: () => U(-1),
        forward: () => U(1),
        beforeEach: o.add,
        beforeResolve: s.add,
        afterEach: a.add,
        onError: R.add,
        isReady: j,
        install(H) {
            const Q = this;
            H.component("RouterLink", wse),
            H.component("RouterView", Dse),
            H.config.globalProperties.$router = Q,
            Object.defineProperty(H.config.globalProperties, "$route", {
                enumerable: !0,
                get: () => hn(l)
            }),
            Vo && !$ && l.value === Ss && ($ = !0,
            v(i.location).catch(te => {
                Qe("Unexpected error when starting the router:", te)
            }
            ));
            const G = {};
            for (const te in Ss)
                G[te] = ae( () => l.value[te]);
            H.provide(s1, Q),
            H.provide(eb, Pt(G)),
            H.provide(Ly, l);
            const re = H.unmount;
            V.add(H),
            H.unmount = function() {
                V.delete(H),
                V.size < 1 && (c = Ss,
                S && S(),
                S = null,
                l.value = Ss,
                $ = !1,
                P = !1),
                re()
            }
            ,
            Vo && Ise(H, Q, e)
        }
    };
    return W
}
function nc(t) {
    return t.reduce( (e, r) => e.then( () => r()), Promise.resolve())
}
function Use(t, e) {
    const r = []
      , n = []
      , i = []
      , o = Math.max(e.matched.length, t.matched.length);
    for (let s = 0; s < o; s++) {
        const a = e.matched[s];
        a && (t.matched.find(c => ua(c, a)) ? n.push(a) : r.push(a));
        const l = t.matched[s];
        l && (e.matched.find(c => ua(c, l)) || i.push(l))
    }
    return [r, n, i]
}
function d6e() {
    return dr(s1)
}
function h6e() {
    return dr(eb)
}
var X = (t => (t.Application = "application",
t.WebGLPipes = "webgl-pipes",
t.WebGLPipesAdaptor = "webgl-pipes-adaptor",
t.WebGLSystem = "webgl-system",
t.WebGPUPipes = "webgpu-pipes",
t.WebGPUPipesAdaptor = "webgpu-pipes-adaptor",
t.WebGPUSystem = "webgpu-system",
t.CanvasSystem = "canvas-system",
t.CanvasPipesAdaptor = "canvas-pipes-adaptor",
t.CanvasPipes = "canvas-pipes",
t.Asset = "asset",
t.LoadParser = "load-parser",
t.ResolveParser = "resolve-parser",
t.CacheParser = "cache-parser",
t.DetectionParser = "detection-parser",
t.MaskEffect = "mask-effect",
t.BlendMode = "blend-mode",
t.TextureSource = "texture-source",
t.Environment = "environment",
t.ShapeBuilder = "shape-builder",
t.Batcher = "batcher",
t))(X || {});
const Uy = t => {
    if (typeof t == "function" || typeof t == "object" && t.extension) {
        if (!t.extension)
            throw new Error("Extension class must have an extension object");
        t = {
            ...typeof t.extension != "object" ? {
                type: t.extension
            } : t.extension,
            ref: t
        }
    }
    if (typeof t == "object")
        t = {
            ...t
        };
    else
        throw new Error("Invalid extension type");
    return typeof t.type == "string" && (t.type = [t.type]),
    t
}
  , rh = (t, e) => Uy(t).priority ?? e
  , $e = {
    _addHandlers: {},
    _removeHandlers: {},
    _queue: {},
    remove(...t) {
        return t.map(Uy).forEach(e => {
            e.type.forEach(r => {
                var n, i;
                return (i = (n = this._removeHandlers)[r]) == null ? void 0 : i.call(n, e)
            }
            )
        }
        ),
        this
    },
    add(...t) {
        return t.map(Uy).forEach(e => {
            e.type.forEach(r => {
                var o, s;
                const n = this._addHandlers
                  , i = this._queue;
                n[r] ? (s = n[r]) == null || s.call(n, e) : (i[r] = i[r] || [],
                (o = i[r]) == null || o.push(e))
            }
            )
        }
        ),
        this
    },
    handle(t, e, r) {
        var s;
        const n = this._addHandlers
          , i = this._removeHandlers;
        if (n[t] || i[t])
            throw new Error(`Extension type ${t} already has a handler`);
        n[t] = e,
        i[t] = r;
        const o = this._queue;
        return o[t] && ((s = o[t]) == null || s.forEach(a => e(a)),
        delete o[t]),
        this
    },
    handleByMap(t, e) {
        return this.handle(t, r => {
            r.name && (e[r.name] = r.ref)
        }
        , r => {
            r.name && delete e[r.name]
        }
        )
    },
    handleByNamedList(t, e, r=-1) {
        return this.handle(t, n => {
            e.findIndex(o => o.name === n.name) >= 0 || (e.push({
                name: n.name,
                value: n.ref
            }),
            e.sort( (o, s) => rh(s.value, r) - rh(o.value, r)))
        }
        , n => {
            const i = e.findIndex(o => o.name === n.name);
            i !== -1 && e.splice(i, 1)
        }
        )
    },
    handleByList(t, e, r=-1) {
        return this.handle(t, n => {
            e.includes(n.ref) || (e.push(n.ref),
            e.sort( (i, o) => rh(o, r) - rh(i, r)))
        }
        , n => {
            const i = e.indexOf(n.ref);
            i !== -1 && e.splice(i, 1)
        }
        )
    },
    mixin(t, ...e) {
        for (const r of e)
            Object.defineProperties(t.prototype, Object.getOwnPropertyDescriptors(r))
    }
}
  , Gse = {
    extension: {
        type: X.Environment,
        name: "browser",
        priority: -1
    },
    test: () => !0,
    load: async () => {
        await X0( () => Promise.resolve().then( () => vve), void 0)
    }
}
  , Hse = {
    extension: {
        type: X.Environment,
        name: "webworker",
        priority: 0
    },
    test: () => typeof self < "u" && self.WorkerGlobalScope !== void 0,
    load: async () => {
        await X0( () => Promise.resolve().then( () => yve), void 0)
    }
};
class Jt {
    constructor(e, r, n) {
        this._x = r || 0,
        this._y = n || 0,
        this._observer = e
    }
    clone(e) {
        return new Jt(e ?? this._observer,this._x,this._y)
    }
    set(e=0, r=e) {
        return (this._x !== e || this._y !== r) && (this._x = e,
        this._y = r,
        this._observer._onUpdate(this)),
        this
    }
    copyFrom(e) {
        return (this._x !== e.x || this._y !== e.y) && (this._x = e.x,
        this._y = e.y,
        this._observer._onUpdate(this)),
        this
    }
    copyTo(e) {
        return e.set(this._x, this._y),
        e
    }
    equals(e) {
        return e.x === this._x && e.y === this._y
    }
    toString() {
        return `[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`
    }
    get x() {
        return this._x
    }
    set x(e) {
        this._x !== e && (this._x = e,
        this._observer._onUpdate(this))
    }
    get y() {
        return this._y
    }
    set y(e) {
        this._y !== e && (this._y = e,
        this._observer._onUpdate(this))
    }
}
var wF = {
    exports: {}
};
(function(t) {
    var e = Object.prototype.hasOwnProperty
      , r = "~";
    function n() {}
    Object.create && (n.prototype = Object.create(null),
    new n().__proto__ || (r = !1));
    function i(l, c, u) {
        this.fn = l,
        this.context = c,
        this.once = u || !1
    }
    function o(l, c, u, f, d) {
        if (typeof u != "function")
            throw new TypeError("The listener must be a function");
        var h = new i(u,f || l,d)
          , x = r ? r + c : c;
        return l._events[x] ? l._events[x].fn ? l._events[x] = [l._events[x], h] : l._events[x].push(h) : (l._events[x] = h,
        l._eventsCount++),
        l
    }
    function s(l, c) {
        --l._eventsCount === 0 ? l._events = new n : delete l._events[c]
    }
    function a() {
        this._events = new n,
        this._eventsCount = 0
    }
    a.prototype.eventNames = function() {
        var c = [], u, f;
        if (this._eventsCount === 0)
            return c;
        for (f in u = this._events)
            e.call(u, f) && c.push(r ? f.slice(1) : f);
        return Object.getOwnPropertySymbols ? c.concat(Object.getOwnPropertySymbols(u)) : c
    }
    ,
    a.prototype.listeners = function(c) {
        var u = r ? r + c : c
          , f = this._events[u];
        if (!f)
            return [];
        if (f.fn)
            return [f.fn];
        for (var d = 0, h = f.length, x = new Array(h); d < h; d++)
            x[d] = f[d].fn;
        return x
    }
    ,
    a.prototype.listenerCount = function(c) {
        var u = r ? r + c : c
          , f = this._events[u];
        return f ? f.fn ? 1 : f.length : 0
    }
    ,
    a.prototype.emit = function(c, u, f, d, h, x) {
        var y = r ? r + c : c;
        if (!this._events[y])
            return !1;
        var m = this._events[y], E = arguments.length, g, p;
        if (m.fn) {
            switch (m.once && this.removeListener(c, m.fn, void 0, !0),
            E) {
            case 1:
                return m.fn.call(m.context),
                !0;
            case 2:
                return m.fn.call(m.context, u),
                !0;
            case 3:
                return m.fn.call(m.context, u, f),
                !0;
            case 4:
                return m.fn.call(m.context, u, f, d),
                !0;
            case 5:
                return m.fn.call(m.context, u, f, d, h),
                !0;
            case 6:
                return m.fn.call(m.context, u, f, d, h, x),
                !0
            }
            for (p = 1,
            g = new Array(E - 1); p < E; p++)
                g[p - 1] = arguments[p];
            m.fn.apply(m.context, g)
        } else {
            var v = m.length, _;
            for (p = 0; p < v; p++)
                switch (m[p].once && this.removeListener(c, m[p].fn, void 0, !0),
                E) {
                case 1:
                    m[p].fn.call(m[p].context);
                    break;
                case 2:
                    m[p].fn.call(m[p].context, u);
                    break;
                case 3:
                    m[p].fn.call(m[p].context, u, f);
                    break;
                case 4:
                    m[p].fn.call(m[p].context, u, f, d);
                    break;
                default:
                    if (!g)
                        for (_ = 1,
                        g = new Array(E - 1); _ < E; _++)
                            g[_ - 1] = arguments[_];
                    m[p].fn.apply(m[p].context, g)
                }
        }
        return !0
    }
    ,
    a.prototype.on = function(c, u, f) {
        return o(this, c, u, f, !1)
    }
    ,
    a.prototype.once = function(c, u, f) {
        return o(this, c, u, f, !0)
    }
    ,
    a.prototype.removeListener = function(c, u, f, d) {
        var h = r ? r + c : c;
        if (!this._events[h])
            return this;
        if (!u)
            return s(this, h),
            this;
        var x = this._events[h];
        if (x.fn)
            x.fn === u && (!d || x.once) && (!f || x.context === f) && s(this, h);
        else {
            for (var y = 0, m = [], E = x.length; y < E; y++)
                (x[y].fn !== u || d && !x[y].once || f && x[y].context !== f) && m.push(x[y]);
            m.length ? this._events[h] = m.length === 1 ? m[0] : m : s(this, h)
        }
        return this
    }
    ,
    a.prototype.removeAllListeners = function(c) {
        var u;
        return c ? (u = r ? r + c : c,
        this._events[u] && s(this, u)) : (this._events = new n,
        this._eventsCount = 0),
        this
    }
    ,
    a.prototype.off = a.prototype.removeListener,
    a.prototype.addListener = a.prototype.on,
    a.prefixed = r,
    a.EventEmitter = a,
    t.exports = a
}
)(wF);
var Vse = wF.exports;
const Qn = Gi(Vse)
  , zse = Math.PI * 2
  , jse = 180 / Math.PI
  , Wse = Math.PI / 180;
let Gt = class BF {
    constructor(e=0, r=0) {
        this.x = 0,
        this.y = 0,
        this.x = e,
        this.y = r
    }
    clone() {
        return new BF(this.x,this.y)
    }
    copyFrom(e) {
        return this.set(e.x, e.y),
        this
    }
    copyTo(e) {
        return e.set(this.x, this.y),
        e
    }
    equals(e) {
        return e.x === this.x && e.y === this.y
    }
    set(e=0, r=e) {
        return this.x = e,
        this.y = r,
        this
    }
    toString() {
        return `[pixi.js/math:Point x=${this.x} y=${this.y}]`
    }
    static get shared() {
        return bg.x = 0,
        bg.y = 0,
        bg
    }
}
;
const bg = new Gt;
class Pe {
    constructor(e=1, r=0, n=0, i=1, o=0, s=0) {
        this.array = null,
        this.a = e,
        this.b = r,
        this.c = n,
        this.d = i,
        this.tx = o,
        this.ty = s
    }
    fromArray(e) {
        this.a = e[0],
        this.b = e[1],
        this.c = e[3],
        this.d = e[4],
        this.tx = e[2],
        this.ty = e[5]
    }
    set(e, r, n, i, o, s) {
        return this.a = e,
        this.b = r,
        this.c = n,
        this.d = i,
        this.tx = o,
        this.ty = s,
        this
    }
    toArray(e, r) {
        this.array || (this.array = new Float32Array(9));
        const n = r || this.array;
        return e ? (n[0] = this.a,
        n[1] = this.b,
        n[2] = 0,
        n[3] = this.c,
        n[4] = this.d,
        n[5] = 0,
        n[6] = this.tx,
        n[7] = this.ty,
        n[8] = 1) : (n[0] = this.a,
        n[1] = this.c,
        n[2] = this.tx,
        n[3] = this.b,
        n[4] = this.d,
        n[5] = this.ty,
        n[6] = 0,
        n[7] = 0,
        n[8] = 1),
        n
    }
    apply(e, r) {
        r = r || new Gt;
        const n = e.x
          , i = e.y;
        return r.x = this.a * n + this.c * i + this.tx,
        r.y = this.b * n + this.d * i + this.ty,
        r
    }
    applyInverse(e, r) {
        r = r || new Gt;
        const n = this.a
          , i = this.b
          , o = this.c
          , s = this.d
          , a = this.tx
          , l = this.ty
          , c = 1 / (n * s + o * -i)
          , u = e.x
          , f = e.y;
        return r.x = s * c * u + -o * c * f + (l * o - a * s) * c,
        r.y = n * c * f + -i * c * u + (-l * n + a * i) * c,
        r
    }
    translate(e, r) {
        return this.tx += e,
        this.ty += r,
        this
    }
    scale(e, r) {
        return this.a *= e,
        this.d *= r,
        this.c *= e,
        this.b *= r,
        this.tx *= e,
        this.ty *= r,
        this
    }
    rotate(e) {
        const r = Math.cos(e)
          , n = Math.sin(e)
          , i = this.a
          , o = this.c
          , s = this.tx;
        return this.a = i * r - this.b * n,
        this.b = i * n + this.b * r,
        this.c = o * r - this.d * n,
        this.d = o * n + this.d * r,
        this.tx = s * r - this.ty * n,
        this.ty = s * n + this.ty * r,
        this
    }
    append(e) {
        const r = this.a
          , n = this.b
          , i = this.c
          , o = this.d;
        return this.a = e.a * r + e.b * i,
        this.b = e.a * n + e.b * o,
        this.c = e.c * r + e.d * i,
        this.d = e.c * n + e.d * o,
        this.tx = e.tx * r + e.ty * i + this.tx,
        this.ty = e.tx * n + e.ty * o + this.ty,
        this
    }
    appendFrom(e, r) {
        const n = e.a
          , i = e.b
          , o = e.c
          , s = e.d
          , a = e.tx
          , l = e.ty
          , c = r.a
          , u = r.b
          , f = r.c
          , d = r.d;
        return this.a = n * c + i * f,
        this.b = n * u + i * d,
        this.c = o * c + s * f,
        this.d = o * u + s * d,
        this.tx = a * c + l * f + r.tx,
        this.ty = a * u + l * d + r.ty,
        this
    }
    setTransform(e, r, n, i, o, s, a, l, c) {
        return this.a = Math.cos(a + c) * o,
        this.b = Math.sin(a + c) * o,
        this.c = -Math.sin(a - l) * s,
        this.d = Math.cos(a - l) * s,
        this.tx = e - (n * this.a + i * this.c),
        this.ty = r - (n * this.b + i * this.d),
        this
    }
    prepend(e) {
        const r = this.tx;
        if (e.a !== 1 || e.b !== 0 || e.c !== 0 || e.d !== 1) {
            const n = this.a
              , i = this.c;
            this.a = n * e.a + this.b * e.c,
            this.b = n * e.b + this.b * e.d,
            this.c = i * e.a + this.d * e.c,
            this.d = i * e.b + this.d * e.d
        }
        return this.tx = r * e.a + this.ty * e.c + e.tx,
        this.ty = r * e.b + this.ty * e.d + e.ty,
        this
    }
    decompose(e) {
        const r = this.a
          , n = this.b
          , i = this.c
          , o = this.d
          , s = e.pivot
          , a = -Math.atan2(-i, o)
          , l = Math.atan2(n, r)
          , c = Math.abs(a + l);
        return c < 1e-5 || Math.abs(zse - c) < 1e-5 ? (e.rotation = l,
        e.skew.x = e.skew.y = 0) : (e.rotation = 0,
        e.skew.x = a,
        e.skew.y = l),
        e.scale.x = Math.sqrt(r * r + n * n),
        e.scale.y = Math.sqrt(i * i + o * o),
        e.position.x = this.tx + (s.x * r + s.y * i),
        e.position.y = this.ty + (s.x * n + s.y * o),
        e
    }
    invert() {
        const e = this.a
          , r = this.b
          , n = this.c
          , i = this.d
          , o = this.tx
          , s = e * i - r * n;
        return this.a = i / s,
        this.b = -r / s,
        this.c = -n / s,
        this.d = e / s,
        this.tx = (n * this.ty - i * o) / s,
        this.ty = -(e * this.ty - r * o) / s,
        this
    }
    isIdentity() {
        return this.a === 1 && this.b === 0 && this.c === 0 && this.d === 1 && this.tx === 0 && this.ty === 0
    }
    identity() {
        return this.a = 1,
        this.b = 0,
        this.c = 0,
        this.d = 1,
        this.tx = 0,
        this.ty = 0,
        this
    }
    clone() {
        const e = new Pe;
        return e.a = this.a,
        e.b = this.b,
        e.c = this.c,
        e.d = this.d,
        e.tx = this.tx,
        e.ty = this.ty,
        e
    }
    copyTo(e) {
        return e.a = this.a,
        e.b = this.b,
        e.c = this.c,
        e.d = this.d,
        e.tx = this.tx,
        e.ty = this.ty,
        e
    }
    copyFrom(e) {
        return this.a = e.a,
        this.b = e.b,
        this.c = e.c,
        this.d = e.d,
        this.tx = e.tx,
        this.ty = e.ty,
        this
    }
    equals(e) {
        return e.a === this.a && e.b === this.b && e.c === this.c && e.d === this.d && e.tx === this.tx && e.ty === this.ty
    }
    toString() {
        return `[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`
    }
    static get IDENTITY() {
        return Xse.identity()
    }
    static get shared() {
        return Yse.identity()
    }
}
const Yse = new Pe
  , Xse = new Pe
  , ka = [1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1, 0, 1]
  , Ra = [0, 1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, -1, -1]
  , Ma = [0, -1, -1, -1, 0, 1, 1, 1, 0, 1, 1, 1, 0, -1, -1, -1]
  , Na = [1, 1, 0, -1, -1, -1, 0, 1, -1, -1, 0, 1, 1, 1, 0, -1]
  , Gy = []
  , SF = []
  , nh = Math.sign;
function Kse() {
    for (let t = 0; t < 16; t++) {
        const e = [];
        Gy.push(e);
        for (let r = 0; r < 16; r++) {
            const n = nh(ka[t] * ka[r] + Ma[t] * Ra[r])
              , i = nh(Ra[t] * ka[r] + Na[t] * Ra[r])
              , o = nh(ka[t] * Ma[r] + Ma[t] * Na[r])
              , s = nh(Ra[t] * Ma[r] + Na[t] * Na[r]);
            for (let a = 0; a < 16; a++)
                if (ka[a] === n && Ra[a] === i && Ma[a] === o && Na[a] === s) {
                    e.push(a);
                    break
                }
        }
    }
    for (let t = 0; t < 16; t++) {
        const e = new Pe;
        e.set(ka[t], Ra[t], Ma[t], Na[t], 0, 0),
        SF.push(e)
    }
}
Kse();
const bt = {
    E: 0,
    SE: 1,
    S: 2,
    SW: 3,
    W: 4,
    NW: 5,
    N: 6,
    NE: 7,
    MIRROR_VERTICAL: 8,
    MAIN_DIAGONAL: 10,
    MIRROR_HORIZONTAL: 12,
    REVERSE_DIAGONAL: 14,
    uX: t => ka[t],
    uY: t => Ra[t],
    vX: t => Ma[t],
    vY: t => Na[t],
    inv: t => t & 8 ? t & 15 : -t & 7,
    add: (t, e) => Gy[t][e],
    sub: (t, e) => Gy[t][bt.inv(e)],
    rotate180: t => t ^ 4,
    isVertical: t => (t & 3) === 2,
    byDirection: (t, e) => Math.abs(t) * 2 <= Math.abs(e) ? e >= 0 ? bt.S : bt.N : Math.abs(e) * 2 <= Math.abs(t) ? t > 0 ? bt.E : bt.W : e > 0 ? t > 0 ? bt.SE : bt.SW : t > 0 ? bt.NE : bt.NW,
    matrixAppendRotationInv: (t, e, r=0, n=0) => {
        const i = SF[bt.inv(e)];
        i.tx = r,
        i.ty = n,
        t.append(i)
    }
    ,
    transformRectCoords: (t, e, r, n) => {
        const {x: i, y: o, width: s, height: a} = t
          , {x: l, y: c, width: u, height: f} = e;
        return r === bt.E ? (n.set(i + l, o + c, s, a),
        n) : r === bt.S ? n.set(u - o - a + l, i + c, a, s) : r === bt.W ? n.set(u - i - s + l, f - o - a + c, s, a) : r === bt.N ? n.set(o + l, f - i - s + c, a, s) : n.set(i + l, o + c, s, a)
    }
}
  , ih = [new Gt, new Gt, new Gt, new Gt];
class mt {
    constructor(e=0, r=0, n=0, i=0) {
        this.type = "rectangle",
        this.x = Number(e),
        this.y = Number(r),
        this.width = Number(n),
        this.height = Number(i)
    }
    get left() {
        return this.x
    }
    get right() {
        return this.x + this.width
    }
    get top() {
        return this.y
    }
    get bottom() {
        return this.y + this.height
    }
    isEmpty() {
        return this.left === this.right || this.top === this.bottom
    }
    static get EMPTY() {
        return new mt(0,0,0,0)
    }
    clone() {
        return new mt(this.x,this.y,this.width,this.height)
    }
    copyFromBounds(e) {
        return this.x = e.minX,
        this.y = e.minY,
        this.width = e.maxX - e.minX,
        this.height = e.maxY - e.minY,
        this
    }
    copyFrom(e) {
        return this.x = e.x,
        this.y = e.y,
        this.width = e.width,
        this.height = e.height,
        this
    }
    copyTo(e) {
        return e.copyFrom(this),
        e
    }
    contains(e, r) {
        return this.width <= 0 || this.height <= 0 ? !1 : e >= this.x && e < this.x + this.width && r >= this.y && r < this.y + this.height
    }
    strokeContains(e, r, n, i=.5) {
        const {width: o, height: s} = this;
        if (o <= 0 || s <= 0)
            return !1;
        const a = this.x
          , l = this.y
          , c = n * (1 - i)
          , u = n - c
          , f = a - c
          , d = a + o + c
          , h = l - c
          , x = l + s + c
          , y = a + u
          , m = a + o - u
          , E = l + u
          , g = l + s - u;
        return e >= f && e <= d && r >= h && r <= x && !(e > y && e < m && r > E && r < g)
    }
    intersects(e, r) {
        if (!r) {
            const B = this.x < e.x ? e.x : this.x;
            if ((this.right > e.right ? e.right : this.right) <= B)
                return !1;
            const A = this.y < e.y ? e.y : this.y;
            return (this.bottom > e.bottom ? e.bottom : this.bottom) > A
        }
        const n = this.left
          , i = this.right
          , o = this.top
          , s = this.bottom;
        if (i <= n || s <= o)
            return !1;
        const a = ih[0].set(e.left, e.top)
          , l = ih[1].set(e.left, e.bottom)
          , c = ih[2].set(e.right, e.top)
          , u = ih[3].set(e.right, e.bottom);
        if (c.x <= a.x || l.y <= a.y)
            return !1;
        const f = Math.sign(r.a * r.d - r.b * r.c);
        if (f === 0 || (r.apply(a, a),
        r.apply(l, l),
        r.apply(c, c),
        r.apply(u, u),
        Math.max(a.x, l.x, c.x, u.x) <= n || Math.min(a.x, l.x, c.x, u.x) >= i || Math.max(a.y, l.y, c.y, u.y) <= o || Math.min(a.y, l.y, c.y, u.y) >= s))
            return !1;
        const d = f * (l.y - a.y)
          , h = f * (a.x - l.x)
          , x = d * n + h * o
          , y = d * i + h * o
          , m = d * n + h * s
          , E = d * i + h * s;
        if (Math.max(x, y, m, E) <= d * a.x + h * a.y || Math.min(x, y, m, E) >= d * u.x + h * u.y)
            return !1;
        const g = f * (a.y - c.y)
          , p = f * (c.x - a.x)
          , v = g * n + p * o
          , _ = g * i + p * o
          , b = g * n + p * s
          , C = g * i + p * s;
        return !(Math.max(v, _, b, C) <= g * a.x + p * a.y || Math.min(v, _, b, C) >= g * u.x + p * u.y)
    }
    pad(e=0, r=e) {
        return this.x -= e,
        this.y -= r,
        this.width += e * 2,
        this.height += r * 2,
        this
    }
    fit(e) {
        const r = Math.max(this.x, e.x)
          , n = Math.min(this.x + this.width, e.x + e.width)
          , i = Math.max(this.y, e.y)
          , o = Math.min(this.y + this.height, e.y + e.height);
        return this.x = r,
        this.width = Math.max(n - r, 0),
        this.y = i,
        this.height = Math.max(o - i, 0),
        this
    }
    ceil(e=1, r=.001) {
        const n = Math.ceil((this.x + this.width - r) * e) / e
          , i = Math.ceil((this.y + this.height - r) * e) / e;
        return this.x = Math.floor((this.x + r) * e) / e,
        this.y = Math.floor((this.y + r) * e) / e,
        this.width = n - this.x,
        this.height = i - this.y,
        this
    }
    scale(e, r=e) {
        return this.x *= e,
        this.y *= r,
        this.width *= e,
        this.height *= r,
        this
    }
    enlarge(e) {
        const r = Math.min(this.x, e.x)
          , n = Math.max(this.x + this.width, e.x + e.width)
          , i = Math.min(this.y, e.y)
          , o = Math.max(this.y + this.height, e.y + e.height);
        return this.x = r,
        this.width = n - r,
        this.y = i,
        this.height = o - i,
        this
    }
    getBounds(e) {
        return e || (e = new mt),
        e.copyFrom(this),
        e
    }
    containsRect(e) {
        if (this.width <= 0 || this.height <= 0)
            return !1;
        const r = e.x
          , n = e.y
          , i = e.x + e.width
          , o = e.y + e.height;
        return r >= this.x && r < this.x + this.width && n >= this.y && n < this.y + this.height && i >= this.x && i < this.x + this.width && o >= this.y && o < this.y + this.height
    }
    set(e, r, n, i) {
        return this.x = e,
        this.y = r,
        this.width = n,
        this.height = i,
        this
    }
    toString() {
        return `[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`
    }
}
const Cg = {
    default: -1
};
function Tt(t="default") {
    return Cg[t] === void 0 && (Cg[t] = -1),
    ++Cg[t]
}
const KA = new Set
  , tt = "8.0.0"
  , qse = "8.3.4"
  , bc = {
    quiet: !1,
    noColor: !1
}
  , Re = (t, e, r=3) => {
    if (bc.quiet || KA.has(e))
        return;
    let n = new Error().stack;
    const i = `${e}
Deprecated since v${t}`
      , o = typeof console.groupCollapsed == "function" && !bc.noColor;
    typeof n > "u" ? console.warn("PixiJS Deprecation Warning: ", i) : (n = n.split(`
`).splice(r).join(`
`),
    o ? (console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s", "color:#614108;background:#fffbe6", "font-weight:normal;color:#614108;background:#fffbe6", i),
    console.warn(n),
    console.groupEnd()) : (console.warn("PixiJS Deprecation Warning: ", i),
    console.warn(n))),
    KA.add(e)
}
;
Object.defineProperties(Re, {
    quiet: {
        get: () => bc.quiet,
        set: t => {
            bc.quiet = t
        }
        ,
        enumerable: !0,
        configurable: !1
    },
    noColor: {
        get: () => bc.noColor,
        set: t => {
            bc.noColor = t
        }
        ,
        enumerable: !0,
        configurable: !1
    }
});
const TF = () => {}
;
function eu(t) {
    return t += t === 0 ? 1 : 0,
    --t,
    t |= t >>> 1,
    t |= t >>> 2,
    t |= t >>> 4,
    t |= t >>> 8,
    t |= t >>> 16,
    t + 1
}
function qA(t) {
    return !(t & t - 1) && !!t
}
function DF(t) {
    const e = {};
    for (const r in t)
        t[r] !== void 0 && (e[r] = t[r]);
    return e
}
const ZA = Object.create(null);
function Zse(t) {
    const e = ZA[t];
    return e === void 0 && (ZA[t] = Tt("resource")),
    e
}
const FF = class PF extends Qn {
    constructor(e={}) {
        super(),
        this._resourceType = "textureSampler",
        this._touched = 0,
        this._maxAnisotropy = 1,
        this.destroyed = !1,
        e = {
            ...PF.defaultOptions,
            ...e
        },
        this.addressMode = e.addressMode,
        this.addressModeU = e.addressModeU ?? this.addressModeU,
        this.addressModeV = e.addressModeV ?? this.addressModeV,
        this.addressModeW = e.addressModeW ?? this.addressModeW,
        this.scaleMode = e.scaleMode,
        this.magFilter = e.magFilter ?? this.magFilter,
        this.minFilter = e.minFilter ?? this.minFilter,
        this.mipmapFilter = e.mipmapFilter ?? this.mipmapFilter,
        this.lodMinClamp = e.lodMinClamp,
        this.lodMaxClamp = e.lodMaxClamp,
        this.compare = e.compare,
        this.maxAnisotropy = e.maxAnisotropy ?? 1
    }
    set addressMode(e) {
        this.addressModeU = e,
        this.addressModeV = e,
        this.addressModeW = e
    }
    get addressMode() {
        return this.addressModeU
    }
    set wrapMode(e) {
        Re(tt, "TextureStyle.wrapMode is now TextureStyle.addressMode"),
        this.addressMode = e
    }
    get wrapMode() {
        return this.addressMode
    }
    set scaleMode(e) {
        this.magFilter = e,
        this.minFilter = e,
        this.mipmapFilter = e
    }
    get scaleMode() {
        return this.magFilter
    }
    set maxAnisotropy(e) {
        this._maxAnisotropy = Math.min(e, 16),
        this._maxAnisotropy > 1 && (this.scaleMode = "linear")
    }
    get maxAnisotropy() {
        return this._maxAnisotropy
    }
    get _resourceId() {
        return this._sharedResourceId || this._generateResourceId()
    }
    update() {
        this.emit("change", this),
        this._sharedResourceId = null
    }
    _generateResourceId() {
        const e = `${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;
        return this._sharedResourceId = Zse(e),
        this._resourceId
    }
    destroy() {
        this.destroyed = !0,
        this.emit("destroy", this),
        this.emit("change", this),
        this.removeAllListeners()
    }
}
;
FF.defaultOptions = {
    addressMode: "clamp-to-edge",
    scaleMode: "linear"
};
let bo = FF;
const IF = class OF extends Qn {
    constructor(e={}) {
        super(),
        this.options = e,
        this.uid = Tt("textureSource"),
        this._resourceType = "textureSource",
        this._resourceId = Tt("resource"),
        this.uploadMethodId = "unknown",
        this._resolution = 1,
        this.pixelWidth = 1,
        this.pixelHeight = 1,
        this.width = 1,
        this.height = 1,
        this.sampleCount = 1,
        this.mipLevelCount = 1,
        this.autoGenerateMipmaps = !1,
        this.format = "rgba8unorm",
        this.dimension = "2d",
        this.antialias = !1,
        this._touched = 0,
        this._batchTick = -1,
        this._textureBindLocation = -1,
        e = {
            ...OF.defaultOptions,
            ...e
        },
        this.label = e.label ?? "",
        this.resource = e.resource,
        this.autoGarbageCollect = e.autoGarbageCollect,
        this._resolution = e.resolution,
        e.width ? this.pixelWidth = e.width * this._resolution : this.pixelWidth = this.resource ? this.resourceWidth ?? 1 : 1,
        e.height ? this.pixelHeight = e.height * this._resolution : this.pixelHeight = this.resource ? this.resourceHeight ?? 1 : 1,
        this.width = this.pixelWidth / this._resolution,
        this.height = this.pixelHeight / this._resolution,
        this.format = e.format,
        this.dimension = e.dimensions,
        this.mipLevelCount = e.mipLevelCount,
        this.autoGenerateMipmaps = e.autoGenerateMipmaps,
        this.sampleCount = e.sampleCount,
        this.antialias = e.antialias,
        this.alphaMode = e.alphaMode,
        this.style = new bo(DF(e)),
        this.destroyed = !1,
        this._refreshPOT()
    }
    get source() {
        return this
    }
    get style() {
        return this._style
    }
    set style(e) {
        var r, n;
        this.style !== e && ((r = this._style) == null || r.off("change", this._onStyleChange, this),
        this._style = e,
        (n = this._style) == null || n.on("change", this._onStyleChange, this),
        this._onStyleChange())
    }
    set maxAnisotropy(e) {
        this._style.maxAnisotropy = e
    }
    get maxAnisotropy() {
        return this._style.maxAnisotropy
    }
    get addressMode() {
        return this._style.addressMode
    }
    set addressMode(e) {
        this._style.addressMode = e
    }
    get repeatMode() {
        return this._style.addressMode
    }
    set repeatMode(e) {
        this._style.addressMode = e
    }
    get magFilter() {
        return this._style.magFilter
    }
    set magFilter(e) {
        this._style.magFilter = e
    }
    get minFilter() {
        return this._style.minFilter
    }
    set minFilter(e) {
        this._style.minFilter = e
    }
    get mipmapFilter() {
        return this._style.mipmapFilter
    }
    set mipmapFilter(e) {
        this._style.mipmapFilter = e
    }
    get lodMinClamp() {
        return this._style.lodMinClamp
    }
    set lodMinClamp(e) {
        this._style.lodMinClamp = e
    }
    get lodMaxClamp() {
        return this._style.lodMaxClamp
    }
    set lodMaxClamp(e) {
        this._style.lodMaxClamp = e
    }
    _onStyleChange() {
        this.emit("styleChange", this)
    }
    update() {
        if (this.resource) {
            const e = this._resolution;
            if (this.resize(this.resourceWidth / e, this.resourceHeight / e))
                return
        }
        this.emit("update", this)
    }
    destroy() {
        this.destroyed = !0,
        this.emit("destroy", this),
        this.emit("change", this),
        this._style && (this._style.destroy(),
        this._style = null),
        this.uploadMethodId = null,
        this.resource = null,
        this.removeAllListeners()
    }
    unload() {
        this._resourceId = Tt("resource"),
        this.emit("change", this),
        this.emit("unload", this)
    }
    get resourceWidth() {
        const {resource: e} = this;
        return e.naturalWidth || e.videoWidth || e.displayWidth || e.width
    }
    get resourceHeight() {
        const {resource: e} = this;
        return e.naturalHeight || e.videoHeight || e.displayHeight || e.height
    }
    get resolution() {
        return this._resolution
    }
    set resolution(e) {
        this._resolution !== e && (this._resolution = e,
        this.width = this.pixelWidth / e,
        this.height = this.pixelHeight / e)
    }
    resize(e, r, n) {
        n || (n = this._resolution),
        e || (e = this.width),
        r || (r = this.height);
        const i = Math.round(e * n)
          , o = Math.round(r * n);
        return this.width = i / n,
        this.height = o / n,
        this._resolution = n,
        this.pixelWidth === i && this.pixelHeight === o ? !1 : (this._refreshPOT(),
        this.pixelWidth = i,
        this.pixelHeight = o,
        this.emit("resize", this),
        this._resourceId = Tt("resource"),
        this.emit("change", this),
        !0)
    }
    updateMipmaps() {
        this.autoGenerateMipmaps && this.mipLevelCount > 1 && this.emit("updateMipmaps", this)
    }
    set wrapMode(e) {
        this._style.wrapMode = e
    }
    get wrapMode() {
        return this._style.wrapMode
    }
    set scaleMode(e) {
        this._style.scaleMode = e
    }
    get scaleMode() {
        return this._style.scaleMode
    }
    _refreshPOT() {
        this.isPowerOfTwo = qA(this.pixelWidth) && qA(this.pixelHeight)
    }
    static test(e) {
        throw new Error("Unimplemented")
    }
}
;
IF.defaultOptions = {
    resolution: 1,
    format: "bgra8unorm",
    alphaMode: "premultiply-alpha-on-upload",
    dimensions: "2d",
    mipLevelCount: 1,
    autoGenerateMipmaps: !1,
    sampleCount: 1,
    antialias: !1,
    autoGarbageCollect: !1
};
let Br = IF;
class tb extends Br {
    constructor(e) {
        const r = e.resource || new Float32Array(e.width * e.height * 4);
        let n = e.format;
        n || (r instanceof Float32Array ? n = "rgba32float" : r instanceof Int32Array || r instanceof Uint32Array ? n = "rgba32uint" : r instanceof Int16Array || r instanceof Uint16Array ? n = "rgba16uint" : (r instanceof Int8Array,
        n = "bgra8unorm")),
        super({
            ...e,
            resource: r,
            format: n
        }),
        this.uploadMethodId = "buffer"
    }
    static test(e) {
        return e instanceof Int8Array || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Int16Array || e instanceof Uint16Array || e instanceof Int32Array || e instanceof Uint32Array || e instanceof Float32Array
    }
}
tb.extension = X.TextureSource;
const JA = new Pe;
class kF {
    constructor(e, r) {
        this.mapCoord = new Pe,
        this.uClampFrame = new Float32Array(4),
        this.uClampOffset = new Float32Array(2),
        this._textureID = -1,
        this._updateID = 0,
        this.clampOffset = 0,
        typeof r > "u" ? this.clampMargin = e.width < 10 ? 0 : .5 : this.clampMargin = r,
        this.isSimple = !1,
        this.texture = e
    }
    get texture() {
        return this._texture
    }
    set texture(e) {
        var r;
        this.texture !== e && ((r = this._texture) == null || r.removeListener("update", this.update, this),
        this._texture = e,
        this._texture.addListener("update", this.update, this),
        this.update())
    }
    multiplyUvs(e, r) {
        r === void 0 && (r = e);
        const n = this.mapCoord;
        for (let i = 0; i < e.length; i += 2) {
            const o = e[i]
              , s = e[i + 1];
            r[i] = o * n.a + s * n.c + n.tx,
            r[i + 1] = o * n.b + s * n.d + n.ty
        }
        return r
    }
    update() {
        const e = this._texture;
        this._updateID++;
        const r = e.uvs;
        this.mapCoord.set(r.x1 - r.x0, r.y1 - r.y0, r.x3 - r.x0, r.y3 - r.y0, r.x0, r.y0);
        const n = e.orig
          , i = e.trim;
        i && (JA.set(n.width / i.width, 0, 0, n.height / i.height, -i.x / i.width, -i.y / i.height),
        this.mapCoord.append(JA));
        const o = e.source
          , s = this.uClampFrame
          , a = this.clampMargin / o._resolution
          , l = this.clampOffset / o._resolution;
        return s[0] = (e.frame.x + a + l) / o.width,
        s[1] = (e.frame.y + a + l) / o.height,
        s[2] = (e.frame.x + e.frame.width - a + l) / o.width,
        s[3] = (e.frame.y + e.frame.height - a + l) / o.height,
        this.uClampOffset[0] = this.clampOffset / o.pixelWidth,
        this.uClampOffset[1] = this.clampOffset / o.pixelHeight,
        this.isSimple = e.frame.width === o.width && e.frame.height === o.height && e.rotate === 0,
        !0
    }
}
class Be extends Qn {
    constructor({source: e, label: r, frame: n, orig: i, trim: o, defaultAnchor: s, defaultBorders: a, rotate: l, dynamic: c}={}) {
        if (super(),
        this.uid = Tt("texture"),
        this.uvs = {
            x0: 0,
            y0: 0,
            x1: 0,
            y1: 0,
            x2: 0,
            y2: 0,
            x3: 0,
            y3: 0
        },
        this.frame = new mt,
        this.noFrame = !1,
        this.dynamic = !1,
        this.isTexture = !0,
        this.label = r,
        this.source = (e == null ? void 0 : e.source) ?? new Br,
        this.noFrame = !n,
        n)
            this.frame.copyFrom(n);
        else {
            const {width: u, height: f} = this._source;
            this.frame.width = u,
            this.frame.height = f
        }
        this.orig = i || this.frame,
        this.trim = o,
        this.rotate = l ?? 0,
        this.defaultAnchor = s,
        this.defaultBorders = a,
        this.destroyed = !1,
        this.dynamic = c || !1,
        this.updateUvs()
    }
    set source(e) {
        this._source && this._source.off("resize", this.update, this),
        this._source = e,
        e.on("resize", this.update, this),
        this.emit("update", this)
    }
    get source() {
        return this._source
    }
    get textureMatrix() {
        return this._textureMatrix || (this._textureMatrix = new kF(this)),
        this._textureMatrix
    }
    get width() {
        return this.orig.width
    }
    get height() {
        return this.orig.height
    }
    updateUvs() {
        const {uvs: e, frame: r} = this
          , {width: n, height: i} = this._source
          , o = r.x / n
          , s = r.y / i
          , a = r.width / n
          , l = r.height / i;
        let c = this.rotate;
        if (c) {
            const u = a / 2
              , f = l / 2
              , d = o + u
              , h = s + f;
            c = bt.add(c, bt.NW),
            e.x0 = d + u * bt.uX(c),
            e.y0 = h + f * bt.uY(c),
            c = bt.add(c, 2),
            e.x1 = d + u * bt.uX(c),
            e.y1 = h + f * bt.uY(c),
            c = bt.add(c, 2),
            e.x2 = d + u * bt.uX(c),
            e.y2 = h + f * bt.uY(c),
            c = bt.add(c, 2),
            e.x3 = d + u * bt.uX(c),
            e.y3 = h + f * bt.uY(c)
        } else
            e.x0 = o,
            e.y0 = s,
            e.x1 = o + a,
            e.y1 = s,
            e.x2 = o + a,
            e.y2 = s + l,
            e.x3 = o,
            e.y3 = s + l
    }
    destroy(e=!1) {
        this._source && (this._source.off("resize", this.update, this),
        e && (this._source.destroy(),
        this._source = null)),
        this._textureMatrix = null,
        this.destroyed = !0,
        this.emit("destroy", this),
        this.removeAllListeners()
    }
    update() {
        this.noFrame && (this.frame.width = this._source.width,
        this.frame.height = this._source.height),
        this.updateUvs(),
        this.emit("update", this)
    }
    get baseTexture() {
        return Re(tt, "Texture.baseTexture is now Texture.source"),
        this._source
    }
}
Be.EMPTY = new Be({
    label: "EMPTY",
    source: new Br({
        label: "EMPTY"
    })
});
Be.EMPTY.destroy = TF;
Be.WHITE = new Be({
    source: new tb({
        resource: new Uint8Array([255, 255, 255, 255]),
        width: 1,
        height: 1,
        alphaMode: "premultiply-alpha-on-upload",
        label: "WHITE"
    }),
    label: "WHITE"
});
Be.WHITE.destroy = TF;
function RF(t, e, r) {
    const {width: n, height: i} = r.orig
      , o = r.trim;
    if (o) {
        const s = o.width
          , a = o.height;
        t.minX = o.x - e._x * n,
        t.maxX = t.minX + s,
        t.minY = o.y - e._y * i,
        t.maxY = t.minY + a
    } else
        t.minX = -e._x * n,
        t.maxX = t.minX + n,
        t.minY = -e._y * i,
        t.maxY = t.minY + i
}
const QA = new Pe;
class Vr {
    constructor(e=1 / 0, r=1 / 0, n=-1 / 0, i=-1 / 0) {
        this.minX = 1 / 0,
        this.minY = 1 / 0,
        this.maxX = -1 / 0,
        this.maxY = -1 / 0,
        this.matrix = QA,
        this.minX = e,
        this.minY = r,
        this.maxX = n,
        this.maxY = i
    }
    isEmpty() {
        return this.minX > this.maxX || this.minY > this.maxY
    }
    get rectangle() {
        this._rectangle || (this._rectangle = new mt);
        const e = this._rectangle;
        return this.minX > this.maxX || this.minY > this.maxY ? (e.x = 0,
        e.y = 0,
        e.width = 0,
        e.height = 0) : e.copyFromBounds(this),
        e
    }
    clear() {
        return this.minX = 1 / 0,
        this.minY = 1 / 0,
        this.maxX = -1 / 0,
        this.maxY = -1 / 0,
        this.matrix = QA,
        this
    }
    set(e, r, n, i) {
        this.minX = e,
        this.minY = r,
        this.maxX = n,
        this.maxY = i
    }
    addFrame(e, r, n, i, o) {
        o || (o = this.matrix);
        const s = o.a
          , a = o.b
          , l = o.c
          , c = o.d
          , u = o.tx
          , f = o.ty;
        let d = this.minX
          , h = this.minY
          , x = this.maxX
          , y = this.maxY
          , m = s * e + l * r + u
          , E = a * e + c * r + f;
        m < d && (d = m),
        E < h && (h = E),
        m > x && (x = m),
        E > y && (y = E),
        m = s * n + l * r + u,
        E = a * n + c * r + f,
        m < d && (d = m),
        E < h && (h = E),
        m > x && (x = m),
        E > y && (y = E),
        m = s * e + l * i + u,
        E = a * e + c * i + f,
        m < d && (d = m),
        E < h && (h = E),
        m > x && (x = m),
        E > y && (y = E),
        m = s * n + l * i + u,
        E = a * n + c * i + f,
        m < d && (d = m),
        E < h && (h = E),
        m > x && (x = m),
        E > y && (y = E),
        this.minX = d,
        this.minY = h,
        this.maxX = x,
        this.maxY = y
    }
    addRect(e, r) {
        this.addFrame(e.x, e.y, e.x + e.width, e.y + e.height, r)
    }
    addBounds(e, r) {
        this.addFrame(e.minX, e.minY, e.maxX, e.maxY, r)
    }
    addBoundsMask(e) {
        this.minX = this.minX > e.minX ? this.minX : e.minX,
        this.minY = this.minY > e.minY ? this.minY : e.minY,
        this.maxX = this.maxX < e.maxX ? this.maxX : e.maxX,
        this.maxY = this.maxY < e.maxY ? this.maxY : e.maxY
    }
    applyMatrix(e) {
        const r = this.minX
          , n = this.minY
          , i = this.maxX
          , o = this.maxY
          , {a: s, b: a, c: l, d: c, tx: u, ty: f} = e;
        let d = s * r + l * n + u
          , h = a * r + c * n + f;
        this.minX = d,
        this.minY = h,
        this.maxX = d,
        this.maxY = h,
        d = s * i + l * n + u,
        h = a * i + c * n + f,
        this.minX = d < this.minX ? d : this.minX,
        this.minY = h < this.minY ? h : this.minY,
        this.maxX = d > this.maxX ? d : this.maxX,
        this.maxY = h > this.maxY ? h : this.maxY,
        d = s * r + l * o + u,
        h = a * r + c * o + f,
        this.minX = d < this.minX ? d : this.minX,
        this.minY = h < this.minY ? h : this.minY,
        this.maxX = d > this.maxX ? d : this.maxX,
        this.maxY = h > this.maxY ? h : this.maxY,
        d = s * i + l * o + u,
        h = a * i + c * o + f,
        this.minX = d < this.minX ? d : this.minX,
        this.minY = h < this.minY ? h : this.minY,
        this.maxX = d > this.maxX ? d : this.maxX,
        this.maxY = h > this.maxY ? h : this.maxY
    }
    fit(e) {
        return this.minX < e.left && (this.minX = e.left),
        this.maxX > e.right && (this.maxX = e.right),
        this.minY < e.top && (this.minY = e.top),
        this.maxY > e.bottom && (this.maxY = e.bottom),
        this
    }
    fitBounds(e, r, n, i) {
        return this.minX < e && (this.minX = e),
        this.maxX > r && (this.maxX = r),
        this.minY < n && (this.minY = n),
        this.maxY > i && (this.maxY = i),
        this
    }
    pad(e, r=e) {
        return this.minX -= e,
        this.maxX += e,
        this.minY -= r,
        this.maxY += r,
        this
    }
    ceil() {
        return this.minX = Math.floor(this.minX),
        this.minY = Math.floor(this.minY),
        this.maxX = Math.ceil(this.maxX),
        this.maxY = Math.ceil(this.maxY),
        this
    }
    clone() {
        return new Vr(this.minX,this.minY,this.maxX,this.maxY)
    }
    scale(e, r=e) {
        return this.minX *= e,
        this.minY *= r,
        this.maxX *= e,
        this.maxY *= r,
        this
    }
    get x() {
        return this.minX
    }
    set x(e) {
        const r = this.maxX - this.minX;
        this.minX = e,
        this.maxX = e + r
    }
    get y() {
        return this.minY
    }
    set y(e) {
        const r = this.maxY - this.minY;
        this.minY = e,
        this.maxY = e + r
    }
    get width() {
        return this.maxX - this.minX
    }
    set width(e) {
        this.maxX = this.minX + e
    }
    get height() {
        return this.maxY - this.minY
    }
    set height(e) {
        this.maxY = this.minY + e
    }
    get left() {
        return this.minX
    }
    get right() {
        return this.maxX
    }
    get top() {
        return this.minY
    }
    get bottom() {
        return this.maxY
    }
    get isPositive() {
        return this.maxX - this.minX > 0 && this.maxY - this.minY > 0
    }
    get isValid() {
        return this.minX + this.minY !== 1 / 0
    }
    addVertexData(e, r, n, i) {
        let o = this.minX
          , s = this.minY
          , a = this.maxX
          , l = this.maxY;
        i || (i = this.matrix);
        const c = i.a
          , u = i.b
          , f = i.c
          , d = i.d
          , h = i.tx
          , x = i.ty;
        for (let y = r; y < n; y += 2) {
            const m = e[y]
              , E = e[y + 1]
              , g = c * m + f * E + h
              , p = u * m + d * E + x;
            o = g < o ? g : o,
            s = p < s ? p : s,
            a = g > a ? g : a,
            l = p > l ? p : l
        }
        this.minX = o,
        this.minY = s,
        this.maxX = a,
        this.maxY = l
    }
    containsPoint(e, r) {
        return this.minX <= e && this.minY <= r && this.maxX >= e && this.maxY >= r
    }
    toString() {
        return `[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`
    }
    copyFrom(e) {
        return this.minX = e.minX,
        this.minY = e.minY,
        this.maxX = e.maxX,
        this.maxY = e.maxY,
        this
    }
}
var Jse = {
    grad: .9,
    turn: 360,
    rad: 360 / (2 * Math.PI)
}
  , ko = function(t) {
    return typeof t == "string" ? t.length > 0 : typeof t == "number"
}
  , Pr = function(t, e, r) {
    return e === void 0 && (e = 0),
    r === void 0 && (r = Math.pow(10, e)),
    Math.round(r * t) / r + 0
}
  , fi = function(t, e, r) {
    return e === void 0 && (e = 0),
    r === void 0 && (r = 1),
    t > r ? r : t > e ? t : e
}
  , MF = function(t) {
    return (t = isFinite(t) ? t % 360 : 0) > 0 ? t : t + 360
}
  , ew = function(t) {
    return {
        r: fi(t.r, 0, 255),
        g: fi(t.g, 0, 255),
        b: fi(t.b, 0, 255),
        a: fi(t.a)
    }
}
  , Ag = function(t) {
    return {
        r: Pr(t.r),
        g: Pr(t.g),
        b: Pr(t.b),
        a: Pr(t.a, 3)
    }
}
  , Qse = /^#([0-9a-f]{3,8})$/i
  , oh = function(t) {
    var e = t.toString(16);
    return e.length < 2 ? "0" + e : e
}
  , NF = function(t) {
    var e = t.r
      , r = t.g
      , n = t.b
      , i = t.a
      , o = Math.max(e, r, n)
      , s = o - Math.min(e, r, n)
      , a = s ? o === e ? (r - n) / s : o === r ? 2 + (n - e) / s : 4 + (e - r) / s : 0;
    return {
        h: 60 * (a < 0 ? a + 6 : a),
        s: o ? s / o * 100 : 0,
        v: o / 255 * 100,
        a: i
    }
}
  , LF = function(t) {
    var e = t.h
      , r = t.s
      , n = t.v
      , i = t.a;
    e = e / 360 * 6,
    r /= 100,
    n /= 100;
    var o = Math.floor(e)
      , s = n * (1 - r)
      , a = n * (1 - (e - o) * r)
      , l = n * (1 - (1 - e + o) * r)
      , c = o % 6;
    return {
        r: 255 * [n, a, s, s, l, n][c],
        g: 255 * [l, n, n, a, s, s][c],
        b: 255 * [s, s, l, n, n, a][c],
        a: i
    }
}
  , tw = function(t) {
    return {
        h: MF(t.h),
        s: fi(t.s, 0, 100),
        l: fi(t.l, 0, 100),
        a: fi(t.a)
    }
}
  , rw = function(t) {
    return {
        h: Pr(t.h),
        s: Pr(t.s),
        l: Pr(t.l),
        a: Pr(t.a, 3)
    }
}
  , nw = function(t) {
    return LF((r = (e = t).s,
    {
        h: e.h,
        s: (r *= ((n = e.l) < 50 ? n : 100 - n) / 100) > 0 ? 2 * r / (n + r) * 100 : 0,
        v: n + r,
        a: e.a
    }));
    var e, r, n
}
  , I0 = function(t) {
    return {
        h: (e = NF(t)).h,
        s: (i = (200 - (r = e.s)) * (n = e.v) / 100) > 0 && i < 200 ? r * n / 100 / (i <= 100 ? i : 200 - i) * 100 : 0,
        l: i / 2,
        a: e.a
    };
    var e, r, n, i
}
  , eae = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i
  , tae = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i
  , rae = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i
  , nae = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i
  , Hy = {
    string: [[function(t) {
        var e = Qse.exec(t);
        return e ? (t = e[1]).length <= 4 ? {
            r: parseInt(t[0] + t[0], 16),
            g: parseInt(t[1] + t[1], 16),
            b: parseInt(t[2] + t[2], 16),
            a: t.length === 4 ? Pr(parseInt(t[3] + t[3], 16) / 255, 2) : 1
        } : t.length === 6 || t.length === 8 ? {
            r: parseInt(t.substr(0, 2), 16),
            g: parseInt(t.substr(2, 2), 16),
            b: parseInt(t.substr(4, 2), 16),
            a: t.length === 8 ? Pr(parseInt(t.substr(6, 2), 16) / 255, 2) : 1
        } : null : null
    }
    , "hex"], [function(t) {
        var e = rae.exec(t) || nae.exec(t);
        return e ? e[2] !== e[4] || e[4] !== e[6] ? null : ew({
            r: Number(e[1]) / (e[2] ? 100 / 255 : 1),
            g: Number(e[3]) / (e[4] ? 100 / 255 : 1),
            b: Number(e[5]) / (e[6] ? 100 / 255 : 1),
            a: e[7] === void 0 ? 1 : Number(e[7]) / (e[8] ? 100 : 1)
        }) : null
    }
    , "rgb"], [function(t) {
        var e = eae.exec(t) || tae.exec(t);
        if (!e)
            return null;
        var r, n, i = tw({
            h: (r = e[1],
            n = e[2],
            n === void 0 && (n = "deg"),
            Number(r) * (Jse[n] || 1)),
            s: Number(e[3]),
            l: Number(e[4]),
            a: e[5] === void 0 ? 1 : Number(e[5]) / (e[6] ? 100 : 1)
        });
        return nw(i)
    }
    , "hsl"]],
    object: [[function(t) {
        var e = t.r
          , r = t.g
          , n = t.b
          , i = t.a
          , o = i === void 0 ? 1 : i;
        return ko(e) && ko(r) && ko(n) ? ew({
            r: Number(e),
            g: Number(r),
            b: Number(n),
            a: Number(o)
        }) : null
    }
    , "rgb"], [function(t) {
        var e = t.h
          , r = t.s
          , n = t.l
          , i = t.a
          , o = i === void 0 ? 1 : i;
        if (!ko(e) || !ko(r) || !ko(n))
            return null;
        var s = tw({
            h: Number(e),
            s: Number(r),
            l: Number(n),
            a: Number(o)
        });
        return nw(s)
    }
    , "hsl"], [function(t) {
        var e = t.h
          , r = t.s
          , n = t.v
          , i = t.a
          , o = i === void 0 ? 1 : i;
        if (!ko(e) || !ko(r) || !ko(n))
            return null;
        var s = function(a) {
            return {
                h: MF(a.h),
                s: fi(a.s, 0, 100),
                v: fi(a.v, 0, 100),
                a: fi(a.a)
            }
        }({
            h: Number(e),
            s: Number(r),
            v: Number(n),
            a: Number(o)
        });
        return LF(s)
    }
    , "hsv"]]
}
  , iw = function(t, e) {
    for (var r = 0; r < e.length; r++) {
        var n = e[r][0](t);
        if (n)
            return [n, e[r][1]]
    }
    return [null, void 0]
}
  , iae = function(t) {
    return typeof t == "string" ? iw(t.trim(), Hy.string) : typeof t == "object" && t !== null ? iw(t, Hy.object) : [null, void 0]
}
  , wg = function(t, e) {
    var r = I0(t);
    return {
        h: r.h,
        s: fi(r.s + 100 * e, 0, 100),
        l: r.l,
        a: r.a
    }
}
  , Bg = function(t) {
    return (299 * t.r + 587 * t.g + 114 * t.b) / 1e3 / 255
}
  , ow = function(t, e) {
    var r = I0(t);
    return {
        h: r.h,
        s: r.s,
        l: fi(r.l + 100 * e, 0, 100),
        a: r.a
    }
}
  , Vy = function() {
    function t(e) {
        this.parsed = iae(e)[0],
        this.rgba = this.parsed || {
            r: 0,
            g: 0,
            b: 0,
            a: 1
        }
    }
    return t.prototype.isValid = function() {
        return this.parsed !== null
    }
    ,
    t.prototype.brightness = function() {
        return Pr(Bg(this.rgba), 2)
    }
    ,
    t.prototype.isDark = function() {
        return Bg(this.rgba) < .5
    }
    ,
    t.prototype.isLight = function() {
        return Bg(this.rgba) >= .5
    }
    ,
    t.prototype.toHex = function() {
        return e = Ag(this.rgba),
        r = e.r,
        n = e.g,
        i = e.b,
        s = (o = e.a) < 1 ? oh(Pr(255 * o)) : "",
        "#" + oh(r) + oh(n) + oh(i) + s;
        var e, r, n, i, o, s
    }
    ,
    t.prototype.toRgb = function() {
        return Ag(this.rgba)
    }
    ,
    t.prototype.toRgbString = function() {
        return e = Ag(this.rgba),
        r = e.r,
        n = e.g,
        i = e.b,
        (o = e.a) < 1 ? "rgba(" + r + ", " + n + ", " + i + ", " + o + ")" : "rgb(" + r + ", " + n + ", " + i + ")";
        var e, r, n, i, o
    }
    ,
    t.prototype.toHsl = function() {
        return rw(I0(this.rgba))
    }
    ,
    t.prototype.toHslString = function() {
        return e = rw(I0(this.rgba)),
        r = e.h,
        n = e.s,
        i = e.l,
        (o = e.a) < 1 ? "hsla(" + r + ", " + n + "%, " + i + "%, " + o + ")" : "hsl(" + r + ", " + n + "%, " + i + "%)";
        var e, r, n, i, o
    }
    ,
    t.prototype.toHsv = function() {
        return e = NF(this.rgba),
        {
            h: Pr(e.h),
            s: Pr(e.s),
            v: Pr(e.v),
            a: Pr(e.a, 3)
        };
        var e
    }
    ,
    t.prototype.invert = function() {
        return Ji({
            r: 255 - (e = this.rgba).r,
            g: 255 - e.g,
            b: 255 - e.b,
            a: e.a
        });
        var e
    }
    ,
    t.prototype.saturate = function(e) {
        return e === void 0 && (e = .1),
        Ji(wg(this.rgba, e))
    }
    ,
    t.prototype.desaturate = function(e) {
        return e === void 0 && (e = .1),
        Ji(wg(this.rgba, -e))
    }
    ,
    t.prototype.grayscale = function() {
        return Ji(wg(this.rgba, -1))
    }
    ,
    t.prototype.lighten = function(e) {
        return e === void 0 && (e = .1),
        Ji(ow(this.rgba, e))
    }
    ,
    t.prototype.darken = function(e) {
        return e === void 0 && (e = .1),
        Ji(ow(this.rgba, -e))
    }
    ,
    t.prototype.rotate = function(e) {
        return e === void 0 && (e = 15),
        this.hue(this.hue() + e)
    }
    ,
    t.prototype.alpha = function(e) {
        return typeof e == "number" ? Ji({
            r: (r = this.rgba).r,
            g: r.g,
            b: r.b,
            a: e
        }) : Pr(this.rgba.a, 3);
        var r
    }
    ,
    t.prototype.hue = function(e) {
        var r = I0(this.rgba);
        return typeof e == "number" ? Ji({
            h: e,
            s: r.s,
            l: r.l,
            a: r.a
        }) : Pr(r.h)
    }
    ,
    t.prototype.isEqual = function(e) {
        return this.toHex() === Ji(e).toHex()
    }
    ,
    t
}()
  , Ji = function(t) {
    return t instanceof Vy ? t : new Vy(t)
}
  , sw = []
  , oae = function(t) {
    t.forEach(function(e) {
        sw.indexOf(e) < 0 && (e(Vy, Hy),
        sw.push(e))
    })
};
function sae(t, e) {
    var r = {
        white: "#ffffff",
        bisque: "#ffe4c4",
        blue: "#0000ff",
        cadetblue: "#5f9ea0",
        chartreuse: "#7fff00",
        chocolate: "#d2691e",
        coral: "#ff7f50",
        antiquewhite: "#faebd7",
        aqua: "#00ffff",
        azure: "#f0ffff",
        whitesmoke: "#f5f5f5",
        papayawhip: "#ffefd5",
        plum: "#dda0dd",
        blanchedalmond: "#ffebcd",
        black: "#000000",
        gold: "#ffd700",
        goldenrod: "#daa520",
        gainsboro: "#dcdcdc",
        cornsilk: "#fff8dc",
        cornflowerblue: "#6495ed",
        burlywood: "#deb887",
        aquamarine: "#7fffd4",
        beige: "#f5f5dc",
        crimson: "#dc143c",
        cyan: "#00ffff",
        darkblue: "#00008b",
        darkcyan: "#008b8b",
        darkgoldenrod: "#b8860b",
        darkkhaki: "#bdb76b",
        darkgray: "#a9a9a9",
        darkgreen: "#006400",
        darkgrey: "#a9a9a9",
        peachpuff: "#ffdab9",
        darkmagenta: "#8b008b",
        darkred: "#8b0000",
        darkorchid: "#9932cc",
        darkorange: "#ff8c00",
        darkslateblue: "#483d8b",
        gray: "#808080",
        darkslategray: "#2f4f4f",
        darkslategrey: "#2f4f4f",
        deeppink: "#ff1493",
        deepskyblue: "#00bfff",
        wheat: "#f5deb3",
        firebrick: "#b22222",
        floralwhite: "#fffaf0",
        ghostwhite: "#f8f8ff",
        darkviolet: "#9400d3",
        magenta: "#ff00ff",
        green: "#008000",
        dodgerblue: "#1e90ff",
        grey: "#808080",
        honeydew: "#f0fff0",
        hotpink: "#ff69b4",
        blueviolet: "#8a2be2",
        forestgreen: "#228b22",
        lawngreen: "#7cfc00",
        indianred: "#cd5c5c",
        indigo: "#4b0082",
        fuchsia: "#ff00ff",
        brown: "#a52a2a",
        maroon: "#800000",
        mediumblue: "#0000cd",
        lightcoral: "#f08080",
        darkturquoise: "#00ced1",
        lightcyan: "#e0ffff",
        ivory: "#fffff0",
        lightyellow: "#ffffe0",
        lightsalmon: "#ffa07a",
        lightseagreen: "#20b2aa",
        linen: "#faf0e6",
        mediumaquamarine: "#66cdaa",
        lemonchiffon: "#fffacd",
        lime: "#00ff00",
        khaki: "#f0e68c",
        mediumseagreen: "#3cb371",
        limegreen: "#32cd32",
        mediumspringgreen: "#00fa9a",
        lightskyblue: "#87cefa",
        lightblue: "#add8e6",
        midnightblue: "#191970",
        lightpink: "#ffb6c1",
        mistyrose: "#ffe4e1",
        moccasin: "#ffe4b5",
        mintcream: "#f5fffa",
        lightslategray: "#778899",
        lightslategrey: "#778899",
        navajowhite: "#ffdead",
        navy: "#000080",
        mediumvioletred: "#c71585",
        powderblue: "#b0e0e6",
        palegoldenrod: "#eee8aa",
        oldlace: "#fdf5e6",
        paleturquoise: "#afeeee",
        mediumturquoise: "#48d1cc",
        mediumorchid: "#ba55d3",
        rebeccapurple: "#663399",
        lightsteelblue: "#b0c4de",
        mediumslateblue: "#7b68ee",
        thistle: "#d8bfd8",
        tan: "#d2b48c",
        orchid: "#da70d6",
        mediumpurple: "#9370db",
        purple: "#800080",
        pink: "#ffc0cb",
        skyblue: "#87ceeb",
        springgreen: "#00ff7f",
        palegreen: "#98fb98",
        red: "#ff0000",
        yellow: "#ffff00",
        slateblue: "#6a5acd",
        lavenderblush: "#fff0f5",
        peru: "#cd853f",
        palevioletred: "#db7093",
        violet: "#ee82ee",
        teal: "#008080",
        slategray: "#708090",
        slategrey: "#708090",
        aliceblue: "#f0f8ff",
        darkseagreen: "#8fbc8f",
        darkolivegreen: "#556b2f",
        greenyellow: "#adff2f",
        seagreen: "#2e8b57",
        seashell: "#fff5ee",
        tomato: "#ff6347",
        silver: "#c0c0c0",
        sienna: "#a0522d",
        lavender: "#e6e6fa",
        lightgreen: "#90ee90",
        orange: "#ffa500",
        orangered: "#ff4500",
        steelblue: "#4682b4",
        royalblue: "#4169e1",
        turquoise: "#40e0d0",
        yellowgreen: "#9acd32",
        salmon: "#fa8072",
        saddlebrown: "#8b4513",
        sandybrown: "#f4a460",
        rosybrown: "#bc8f8f",
        darksalmon: "#e9967a",
        lightgoldenrodyellow: "#fafad2",
        snow: "#fffafa",
        lightgrey: "#d3d3d3",
        lightgray: "#d3d3d3",
        dimgray: "#696969",
        dimgrey: "#696969",
        olivedrab: "#6b8e23",
        olive: "#808000"
    }
      , n = {};
    for (var i in r)
        n[r[i]] = i;
    var o = {};
    t.prototype.toName = function(s) {
        if (!(this.rgba.a || this.rgba.r || this.rgba.g || this.rgba.b))
            return "transparent";
        var a, l, c = n[this.toHex()];
        if (c)
            return c;
        if (s != null && s.closest) {
            var u = this.toRgb()
              , f = 1 / 0
              , d = "black";
            if (!o.length)
                for (var h in r)
                    o[h] = new t(r[h]).toRgb();
            for (var x in r) {
                var y = (a = u,
                l = o[x],
                Math.pow(a.r - l.r, 2) + Math.pow(a.g - l.g, 2) + Math.pow(a.b - l.b, 2));
                y < f && (f = y,
                d = x)
            }
            return d
        }
    }
    ,
    e.string.push([function(s) {
        var a = s.toLowerCase()
          , l = a === "transparent" ? "#0000" : r[a];
        return l ? new t(l).toRgb() : null
    }
    , "name"])
}
oae([sae]);
const tu = class u0 {
    constructor(e=16777215) {
        this._value = null,
        this._components = new Float32Array(4),
        this._components.fill(1),
        this._int = 16777215,
        this.value = e
    }
    get red() {
        return this._components[0]
    }
    get green() {
        return this._components[1]
    }
    get blue() {
        return this._components[2]
    }
    get alpha() {
        return this._components[3]
    }
    setValue(e) {
        return this.value = e,
        this
    }
    set value(e) {
        if (e instanceof u0)
            this._value = this._cloneSource(e._value),
            this._int = e._int,
            this._components.set(e._components);
        else {
            if (e === null)
                throw new Error("Cannot set Color#value to null");
            (this._value === null || !this._isSourceEqual(this._value, e)) && (this._value = this._cloneSource(e),
            this._normalize(this._value))
        }
    }
    get value() {
        return this._value
    }
    _cloneSource(e) {
        return typeof e == "string" || typeof e == "number" || e instanceof Number || e === null ? e : Array.isArray(e) || ArrayBuffer.isView(e) ? e.slice(0) : typeof e == "object" && e !== null ? {
            ...e
        } : e
    }
    _isSourceEqual(e, r) {
        const n = typeof e;
        if (n !== typeof r)
            return !1;
        if (n === "number" || n === "string" || e instanceof Number)
            return e === r;
        if (Array.isArray(e) && Array.isArray(r) || ArrayBuffer.isView(e) && ArrayBuffer.isView(r))
            return e.length !== r.length ? !1 : e.every( (o, s) => o === r[s]);
        if (e !== null && r !== null) {
            const o = Object.keys(e)
              , s = Object.keys(r);
            return o.length !== s.length ? !1 : o.every(a => e[a] === r[a])
        }
        return e === r
    }
    toRgba() {
        const [e,r,n,i] = this._components;
        return {
            r: e,
            g: r,
            b: n,
            a: i
        }
    }
    toRgb() {
        const [e,r,n] = this._components;
        return {
            r: e,
            g: r,
            b: n
        }
    }
    toRgbaString() {
        const [e,r,n] = this.toUint8RgbArray();
        return `rgba(${e},${r},${n},${this.alpha})`
    }
    toUint8RgbArray(e) {
        const [r,n,i] = this._components;
        return this._arrayRgb || (this._arrayRgb = []),
        e || (e = this._arrayRgb),
        e[0] = Math.round(r * 255),
        e[1] = Math.round(n * 255),
        e[2] = Math.round(i * 255),
        e
    }
    toArray(e) {
        this._arrayRgba || (this._arrayRgba = []),
        e || (e = this._arrayRgba);
        const [r,n,i,o] = this._components;
        return e[0] = r,
        e[1] = n,
        e[2] = i,
        e[3] = o,
        e
    }
    toRgbArray(e) {
        this._arrayRgb || (this._arrayRgb = []),
        e || (e = this._arrayRgb);
        const [r,n,i] = this._components;
        return e[0] = r,
        e[1] = n,
        e[2] = i,
        e
    }
    toNumber() {
        return this._int
    }
    toBgrNumber() {
        const [e,r,n] = this.toUint8RgbArray();
        return (n << 16) + (r << 8) + e
    }
    toLittleEndianNumber() {
        const e = this._int;
        return (e >> 16) + (e & 65280) + ((e & 255) << 16)
    }
    multiply(e) {
        const [r,n,i,o] = u0._temp.setValue(e)._components;
        return this._components[0] *= r,
        this._components[1] *= n,
        this._components[2] *= i,
        this._components[3] *= o,
        this._refreshInt(),
        this._value = null,
        this
    }
    premultiply(e, r=!0) {
        return r && (this._components[0] *= e,
        this._components[1] *= e,
        this._components[2] *= e),
        this._components[3] = e,
        this._refreshInt(),
        this._value = null,
        this
    }
    toPremultiplied(e, r=!0) {
        if (e === 1)
            return (255 << 24) + this._int;
        if (e === 0)
            return r ? 0 : this._int;
        let n = this._int >> 16 & 255
          , i = this._int >> 8 & 255
          , o = this._int & 255;
        return r && (n = n * e + .5 | 0,
        i = i * e + .5 | 0,
        o = o * e + .5 | 0),
        (e * 255 << 24) + (n << 16) + (i << 8) + o
    }
    toHex() {
        const e = this._int.toString(16);
        return `#${"000000".substring(0, 6 - e.length) + e}`
    }
    toHexa() {
        const r = Math.round(this._components[3] * 255).toString(16);
        return this.toHex() + "00".substring(0, 2 - r.length) + r
    }
    setAlpha(e) {
        return this._components[3] = this._clamp(e),
        this
    }
    _normalize(e) {
        let r, n, i, o;
        if ((typeof e == "number" || e instanceof Number) && e >= 0 && e <= 16777215) {
            const s = e;
            r = (s >> 16 & 255) / 255,
            n = (s >> 8 & 255) / 255,
            i = (s & 255) / 255,
            o = 1
        } else if ((Array.isArray(e) || e instanceof Float32Array) && e.length >= 3 && e.length <= 4)
            e = this._clamp(e),
            [r,n,i,o=1] = e;
        else if ((e instanceof Uint8Array || e instanceof Uint8ClampedArray) && e.length >= 3 && e.length <= 4)
            e = this._clamp(e, 0, 255),
            [r,n,i,o=255] = e,
            r /= 255,
            n /= 255,
            i /= 255,
            o /= 255;
        else if (typeof e == "string" || typeof e == "object") {
            if (typeof e == "string") {
                const a = u0.HEX_PATTERN.exec(e);
                a && (e = `#${a[2]}`)
            }
            const s = Ji(e);
            s.isValid() && ({r, g: n, b: i, a: o} = s.rgba,
            r /= 255,
            n /= 255,
            i /= 255)
        }
        if (r !== void 0)
            this._components[0] = r,
            this._components[1] = n,
            this._components[2] = i,
            this._components[3] = o,
            this._refreshInt();
        else
            throw new Error(`Unable to convert color ${e}`)
    }
    _refreshInt() {
        this._clamp(this._components);
        const [e,r,n] = this._components;
        this._int = (e * 255 << 16) + (r * 255 << 8) + (n * 255 | 0)
    }
    _clamp(e, r=0, n=1) {
        return typeof e == "number" ? Math.min(Math.max(e, r), n) : (e.forEach( (i, o) => {
            e[o] = Math.min(Math.max(i, r), n)
        }
        ),
        e)
    }
    static isColorLike(e) {
        return typeof e == "number" || typeof e == "string" || e instanceof Number || e instanceof u0 || Array.isArray(e) || e instanceof Uint8Array || e instanceof Uint8ClampedArray || e instanceof Float32Array || e.r !== void 0 && e.g !== void 0 && e.b !== void 0 || e.r !== void 0 && e.g !== void 0 && e.b !== void 0 && e.a !== void 0 || e.h !== void 0 && e.s !== void 0 && e.l !== void 0 || e.h !== void 0 && e.s !== void 0 && e.l !== void 0 && e.a !== void 0 || e.h !== void 0 && e.s !== void 0 && e.v !== void 0 || e.h !== void 0 && e.s !== void 0 && e.v !== void 0 && e.a !== void 0
    }
}
;
tu.shared = new tu;
tu._temp = new tu;
tu.HEX_PATTERN = /^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;
let Ut = tu;
const aae = {
    cullArea: null,
    cullable: !1,
    cullableChildren: !0
};
let Sg = 0;
const aw = 500;
function Ne(...t) {
    Sg !== aw && (Sg++,
    Sg === aw ? console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS.") : console.warn("PixiJS Warning: ", ...t))
}
const Cu = {
    _registeredResources: new Set,
    register(t) {
        this._registeredResources.add(t)
    },
    unregister(t) {
        this._registeredResources.delete(t)
    },
    release() {
        this._registeredResources.forEach(t => t.clear())
    },
    get registeredCount() {
        return this._registeredResources.size
    },
    isRegistered(t) {
        return this._registeredResources.has(t)
    },
    reset() {
        this._registeredResources.clear()
    }
};
class lae {
    constructor(e, r) {
        this._pool = [],
        this._count = 0,
        this._index = 0,
        this._classType = e,
        r && this.prepopulate(r)
    }
    prepopulate(e) {
        for (let r = 0; r < e; r++)
            this._pool[this._index++] = new this._classType;
        this._count += e
    }
    get(e) {
        var n;
        let r;
        return this._index > 0 ? r = this._pool[--this._index] : (r = new this._classType,
        this._count++),
        (n = r.init) == null || n.call(r, e),
        r
    }
    return(e) {
        var r;
        (r = e.reset) == null || r.call(e),
        this._pool[this._index++] = e
    }
    get totalSize() {
        return this._count
    }
    get totalFree() {
        return this._index
    }
    get totalUsed() {
        return this._count - this._index
    }
    clear() {
        if (this._pool.length > 0 && this._pool[0].destroy)
            for (let e = 0; e < this._index; e++)
                this._pool[e].destroy();
        this._pool.length = 0,
        this._count = 0,
        this._index = 0
    }
}
class cae {
    constructor() {
        this._poolsByClass = new Map
    }
    prepopulate(e, r) {
        this.getPool(e).prepopulate(r)
    }
    get(e, r) {
        return this.getPool(e).get(r)
    }
    return(e) {
        this.getPool(e.constructor).return(e)
    }
    getPool(e) {
        return this._poolsByClass.has(e) || this._poolsByClass.set(e, new lae(e)),
        this._poolsByClass.get(e)
    }
    stats() {
        const e = {};
        return this._poolsByClass.forEach(r => {
            const n = e[r._classType.name] ? r._classType.name + r._classType.ID : r._classType.name;
            e[n] = {
                free: r.totalFree,
                used: r.totalUsed,
                size: r.totalSize
            }
        }
        ),
        e
    }
    clear() {
        this._poolsByClass.forEach(e => e.clear()),
        this._poolsByClass.clear()
    }
}
const xr = new cae;
Cu.register(xr);
const uae = {
    get isCachedAsTexture() {
        var t;
        return !!((t = this.renderGroup) != null && t.isCachedAsTexture)
    },
    cacheAsTexture(t) {
        typeof t == "boolean" && t === !1 ? this.disableRenderGroup() : (this.enableRenderGroup(),
        this.renderGroup.enableCacheAsTexture(t === !0 ? {} : t))
    },
    updateCacheTexture() {
        var t;
        (t = this.renderGroup) == null || t.updateCacheTexture()
    },
    get cacheAsBitmap() {
        return this.isCachedAsTexture
    },
    set cacheAsBitmap(t) {
        Re("v8.6.0", "cacheAsBitmap is deprecated, use cacheAsTexture instead."),
        this.cacheAsTexture(t)
    }
};
function $F(t, e, r) {
    const n = t.length;
    let i;
    if (e >= n || r === 0)
        return;
    r = e + r > n ? n - e : r;
    const o = n - r;
    for (i = e; i < o; ++i)
        t[i] = t[i + r];
    t.length = o
}
const fae = {
    allowChildren: !0,
    removeChildren(t=0, e) {
        var o;
        const r = e ?? this.children.length
          , n = r - t
          , i = [];
        if (n > 0 && n <= r) {
            for (let a = r - 1; a >= t; a--) {
                const l = this.children[a];
                l && (i.push(l),
                l.parent = null)
            }
            $F(this.children, t, r);
            const s = this.renderGroup || this.parentRenderGroup;
            s && s.removeChildren(i);
            for (let a = 0; a < i.length; ++a) {
                const l = i[a];
                (o = l.parentRenderLayer) == null || o.detach(l),
                this.emit("childRemoved", l, this, a),
                i[a].emit("removed", this)
            }
            return i.length > 0 && this._didViewChangeTick++,
            i
        } else if (n === 0 && this.children.length === 0)
            return i;
        throw new RangeError("removeChildren: numeric values are outside the acceptable range.")
    },
    removeChildAt(t) {
        const e = this.getChildAt(t);
        return this.removeChild(e)
    },
    getChildAt(t) {
        if (t < 0 || t >= this.children.length)
            throw new Error(`getChildAt: Index (${t}) does not exist.`);
        return this.children[t]
    },
    setChildIndex(t, e) {
        if (e < 0 || e >= this.children.length)
            throw new Error(`The index ${e} supplied is out of bounds ${this.children.length}`);
        this.getChildIndex(t),
        this.addChildAt(t, e)
    },
    getChildIndex(t) {
        const e = this.children.indexOf(t);
        if (e === -1)
            throw new Error("The supplied Container must be a child of the caller");
        return e
    },
    addChildAt(t, e) {
        this.allowChildren || Re(tt, "addChildAt: Only Containers will be allowed to add children in v8.0.0");
        const {children: r} = this;
        if (e < 0 || e > r.length)
            throw new Error(`${t}addChildAt: The index ${e} supplied is out of bounds ${r.length}`);
        if (t.parent) {
            const i = t.parent.children.indexOf(t);
            if (t.parent === this && i === e)
                return t;
            i !== -1 && t.parent.children.splice(i, 1)
        }
        e === r.length ? r.push(t) : r.splice(e, 0, t),
        t.parent = this,
        t.didChange = !0,
        t._updateFlags = 15;
        const n = this.renderGroup || this.parentRenderGroup;
        return n && n.addChild(t),
        this.sortableChildren && (this.sortDirty = !0),
        this.emit("childAdded", t, this, e),
        t.emit("added", this),
        t
    },
    swapChildren(t, e) {
        if (t === e)
            return;
        const r = this.getChildIndex(t)
          , n = this.getChildIndex(e);
        this.children[r] = e,
        this.children[n] = t;
        const i = this.renderGroup || this.parentRenderGroup;
        i && (i.structureDidChange = !0),
        this._didContainerChangeTick++
    },
    removeFromParent() {
        var t;
        (t = this.parent) == null || t.removeChild(this)
    },
    reparentChild(...t) {
        return t.length === 1 ? this.reparentChildAt(t[0], this.children.length) : (t.forEach(e => this.reparentChildAt(e, this.children.length)),
        t[0])
    },
    reparentChildAt(t, e) {
        if (t.parent === this)
            return this.setChildIndex(t, e),
            t;
        const r = t.worldTransform.clone();
        t.removeFromParent(),
        this.addChildAt(t, e);
        const n = this.worldTransform.clone();
        return n.invert(),
        r.prepend(n),
        t.setFromMatrix(r),
        t
    },
    replaceChild(t, e) {
        t.updateLocalTransform(),
        this.addChildAt(e, this.getChildIndex(t)),
        e.setFromMatrix(t.localTransform),
        e.updateLocalTransform(),
        this.removeChild(t)
    }
}
  , dae = {
    collectRenderables(t, e, r) {
        this.parentRenderLayer && this.parentRenderLayer !== r || this.globalDisplayStatus < 7 || !this.includeInBuild || (this.sortableChildren && this.sortChildren(),
        this.isSimple ? this.collectRenderablesSimple(t, e, r) : this.renderGroup ? e.renderPipes.renderGroup.addRenderGroup(this.renderGroup, t) : this.collectRenderablesWithEffects(t, e, r))
    },
    collectRenderablesSimple(t, e, r) {
        const n = this.children
          , i = n.length;
        for (let o = 0; o < i; o++)
            n[o].collectRenderables(t, e, r)
    },
    collectRenderablesWithEffects(t, e, r) {
        const {renderPipes: n} = e;
        for (let i = 0; i < this.effects.length; i++) {
            const o = this.effects[i];
            n[o.pipe].push(o, this, t)
        }
        this.collectRenderablesSimple(t, e, r);
        for (let i = this.effects.length - 1; i >= 0; i--) {
            const o = this.effects[i];
            n[o.pipe].pop(o, this, t)
        }
    }
};
class Fx {
    constructor() {
        this.pipe = "filter",
        this.priority = 1
    }
    destroy() {
        for (let e = 0; e < this.filters.length; e++)
            this.filters[e].destroy();
        this.filters = null,
        this.filterArea = null
    }
}
class hae {
    constructor() {
        this._effectClasses = [],
        this._tests = [],
        this._initialized = !1
    }
    init() {
        this._initialized || (this._initialized = !0,
        this._effectClasses.forEach(e => {
            this.add({
                test: e.test,
                maskClass: e
            })
        }
        ))
    }
    add(e) {
        this._tests.push(e)
    }
    getMaskEffect(e) {
        this._initialized || this.init();
        for (let r = 0; r < this._tests.length; r++) {
            const n = this._tests[r];
            if (n.test(e))
                return xr.get(n.maskClass, e)
        }
        return e
    }
    returnMaskEffect(e) {
        xr.return(e)
    }
}
const zy = new hae;
$e.handleByList(X.MaskEffect, zy._effectClasses);
const xae = {
    _maskEffect: null,
    _maskOptions: {
        inverse: !1
    },
    _filterEffect: null,
    effects: [],
    _markStructureAsChanged() {
        const t = this.renderGroup || this.parentRenderGroup;
        t && (t.structureDidChange = !0)
    },
    addEffect(t) {
        this.effects.indexOf(t) === -1 && (this.effects.push(t),
        this.effects.sort( (r, n) => r.priority - n.priority),
        this._markStructureAsChanged(),
        this._updateIsSimple())
    },
    removeEffect(t) {
        const e = this.effects.indexOf(t);
        e !== -1 && (this.effects.splice(e, 1),
        this._markStructureAsChanged(),
        this._updateIsSimple())
    },
    set mask(t) {
        const e = this._maskEffect;
        (e == null ? void 0 : e.mask) !== t && (e && (this.removeEffect(e),
        zy.returnMaskEffect(e),
        this._maskEffect = null),
        t != null && (this._maskEffect = zy.getMaskEffect(t),
        this.addEffect(this._maskEffect)))
    },
    get mask() {
        var t;
        return (t = this._maskEffect) == null ? void 0 : t.mask
    },
    setMask(t) {
        this._maskOptions = {
            ...this._maskOptions,
            ...t
        },
        t.mask && (this.mask = t.mask),
        this._markStructureAsChanged()
    },
    set filters(t) {
        var o;
        !Array.isArray(t) && t && (t = [t]);
        const e = this._filterEffect || (this._filterEffect = new Fx);
        t = t;
        const r = (t == null ? void 0 : t.length) > 0
          , n = ((o = e.filters) == null ? void 0 : o.length) > 0
          , i = r !== n;
        t = Array.isArray(t) ? t.slice(0) : t,
        e.filters = Object.freeze(t),
        i && (r ? this.addEffect(e) : (this.removeEffect(e),
        e.filters = t ?? null))
    },
    get filters() {
        var t;
        return (t = this._filterEffect) == null ? void 0 : t.filters
    },
    set filterArea(t) {
        this._filterEffect || (this._filterEffect = new Fx),
        this._filterEffect.filterArea = t
    },
    get filterArea() {
        var t;
        return (t = this._filterEffect) == null ? void 0 : t.filterArea
    }
}
  , pae = {
    label: null,
    get name() {
        return Re(tt, "Container.name property has been removed, use Container.label instead"),
        this.label
    },
    set name(t) {
        Re(tt, "Container.name property has been removed, use Container.label instead"),
        this.label = t
    },
    getChildByName(t, e=!1) {
        return this.getChildByLabel(t, e)
    },
    getChildByLabel(t, e=!1) {
        const r = this.children;
        for (let n = 0; n < r.length; n++) {
            const i = r[n];
            if (i.label === t || t instanceof RegExp && t.test(i.label))
                return i
        }
        if (e)
            for (let n = 0; n < r.length; n++) {
                const o = r[n].getChildByLabel(t, !0);
                if (o)
                    return o
            }
        return null
    },
    getChildrenByLabel(t, e=!1, r=[]) {
        const n = this.children;
        for (let i = 0; i < n.length; i++) {
            const o = n[i];
            (o.label === t || t instanceof RegExp && t.test(o.label)) && r.push(o)
        }
        if (e)
            for (let i = 0; i < n.length; i++)
                n[i].getChildrenByLabel(t, !0, r);
        return r
    }
}
  , dn = xr.getPool(Pe)
  , Qo = xr.getPool(Vr)
  , gae = new Pe
  , mae = {
    getFastGlobalBounds(t, e) {
        e || (e = new Vr),
        e.clear(),
        this._getGlobalBoundsRecursive(!!t, e, this.parentRenderLayer),
        e.isValid || e.set(0, 0, 0, 0);
        const r = this.renderGroup || this.parentRenderGroup;
        return e.applyMatrix(r.worldTransform),
        e
    },
    _getGlobalBoundsRecursive(t, e, r) {
        let n = e;
        if (t && this.parentRenderLayer && this.parentRenderLayer !== r || this.localDisplayStatus !== 7 || !this.measurable)
            return;
        const i = !!this.effects.length;
        if ((this.renderGroup || i) && (n = Qo.get().clear()),
        this.boundsArea)
            e.addRect(this.boundsArea, this.worldTransform);
        else {
            if (this.renderPipeId) {
                const s = this.bounds;
                n.addFrame(s.minX, s.minY, s.maxX, s.maxY, this.groupTransform)
            }
            const o = this.children;
            for (let s = 0; s < o.length; s++)
                o[s]._getGlobalBoundsRecursive(t, n, r)
        }
        if (i) {
            let o = !1;
            const s = this.renderGroup || this.parentRenderGroup;
            for (let a = 0; a < this.effects.length; a++)
                this.effects[a].addBounds && (o || (o = !0,
                n.applyMatrix(s.worldTransform)),
                this.effects[a].addBounds(n, !0));
            o && n.applyMatrix(s.worldTransform.copyTo(gae).invert()),
            e.addBounds(n),
            Qo.return(n)
        } else
            this.renderGroup && (e.addBounds(n, this.relativeGroupTransform),
            Qo.return(n))
    }
};
function rb(t, e, r) {
    r.clear();
    let n, i;
    return t.parent ? e ? n = t.parent.worldTransform : (i = dn.get().identity(),
    n = nb(t, i)) : n = Pe.IDENTITY,
    UF(t, r, n, e),
    i && dn.return(i),
    r.isValid || r.set(0, 0, 0, 0),
    r
}
function UF(t, e, r, n) {
    var a, l;
    if (!t.visible || !t.measurable)
        return;
    let i;
    n ? i = t.worldTransform : (t.updateLocalTransform(),
    i = dn.get(),
    i.appendFrom(t.localTransform, r));
    const o = e
      , s = !!t.effects.length;
    if (s && (e = Qo.get().clear()),
    t.boundsArea)
        e.addRect(t.boundsArea, i);
    else {
        const c = t.bounds;
        c && !c.isEmpty() && (e.matrix = i,
        e.addBounds(c));
        for (let u = 0; u < t.children.length; u++)
            UF(t.children[u], e, i, n)
    }
    if (s) {
        for (let c = 0; c < t.effects.length; c++)
            (l = (a = t.effects[c]).addBounds) == null || l.call(a, e);
        o.addBounds(e, Pe.IDENTITY),
        Qo.return(e)
    }
    n || dn.return(i)
}
function nb(t, e) {
    const r = t.parent;
    return r && (nb(r, e),
    r.updateLocalTransform(),
    e.append(r.localTransform)),
    e
}
function GF(t, e) {
    if (t === 16777215 || !e)
        return e;
    if (e === 16777215 || !t)
        return t;
    const r = t >> 16 & 255
      , n = t >> 8 & 255
      , i = t & 255
      , o = e >> 16 & 255
      , s = e >> 8 & 255
      , a = e & 255
      , l = r * o / 255 | 0
      , c = n * s / 255 | 0
      , u = i * a / 255 | 0;
    return (l << 16) + (c << 8) + u
}
const lw = 16777215;
function Px(t, e) {
    return t === lw ? e : e === lw ? t : GF(t, e)
}
function O0(t) {
    return ((t & 255) << 16) + (t & 65280) + (t >> 16 & 255)
}
const vae = {
    getGlobalAlpha(t) {
        if (t)
            return this.renderGroup ? this.renderGroup.worldAlpha : this.parentRenderGroup ? this.parentRenderGroup.worldAlpha * this.alpha : this.alpha;
        let e = this.alpha
          , r = this.parent;
        for (; r; )
            e *= r.alpha,
            r = r.parent;
        return e
    },
    getGlobalTransform(t=new Pe, e) {
        if (e)
            return t.copyFrom(this.worldTransform);
        this.updateLocalTransform();
        const r = nb(this, dn.get().identity());
        return t.appendFrom(this.localTransform, r),
        dn.return(r),
        t
    },
    getGlobalTint(t) {
        if (t)
            return this.renderGroup ? O0(this.renderGroup.worldColor) : this.parentRenderGroup ? O0(Px(this.localColor, this.parentRenderGroup.worldColor)) : this.tint;
        let e = this.localColor
          , r = this.parent;
        for (; r; )
            e = Px(e, r.localColor),
            r = r.parent;
        return O0(e)
    }
};
function ib(t, e, r) {
    return e.clear(),
    r || (r = Pe.IDENTITY),
    HF(t, e, r, t, !0),
    e.isValid || e.set(0, 0, 0, 0),
    e
}
function HF(t, e, r, n, i) {
    var l, c;
    let o;
    if (i)
        o = dn.get(),
        o = r.copyTo(o);
    else {
        if (!t.visible || !t.measurable)
            return;
        t.updateLocalTransform();
        const u = t.localTransform;
        o = dn.get(),
        o.appendFrom(u, r)
    }
    const s = e
      , a = !!t.effects.length;
    if (a && (e = Qo.get().clear()),
    t.boundsArea)
        e.addRect(t.boundsArea, o);
    else {
        t.renderPipeId && (e.matrix = o,
        e.addBounds(t.bounds));
        const u = t.children;
        for (let f = 0; f < u.length; f++)
            HF(u[f], e, o, n, !1)
    }
    if (a) {
        for (let u = 0; u < t.effects.length; u++)
            (c = (l = t.effects[u]).addLocalBounds) == null || c.call(l, e, n);
        s.addBounds(e, Pe.IDENTITY),
        Qo.return(e)
    }
    dn.return(o)
}
function VF(t, e) {
    const r = t.children;
    for (let n = 0; n < r.length; n++) {
        const i = r[n]
          , o = i.uid
          , s = (i._didViewChangeTick & 65535) << 16 | i._didContainerChangeTick & 65535
          , a = e.index;
        (e.data[a] !== o || e.data[a + 1] !== s) && (e.data[e.index] = o,
        e.data[e.index + 1] = s,
        e.didChange = !0),
        e.index = a + 2,
        i.children.length && VF(i, e)
    }
    return e.didChange
}
const yae = new Pe
  , Eae = {
    _localBoundsCacheId: -1,
    _localBoundsCacheData: null,
    _setWidth(t, e) {
        const r = Math.sign(this.scale.x) || 1;
        e !== 0 ? this.scale.x = t / e * r : this.scale.x = r
    },
    _setHeight(t, e) {
        const r = Math.sign(this.scale.y) || 1;
        e !== 0 ? this.scale.y = t / e * r : this.scale.y = r
    },
    getLocalBounds() {
        this._localBoundsCacheData || (this._localBoundsCacheData = {
            data: [],
            index: 1,
            didChange: !1,
            localBounds: new Vr
        });
        const t = this._localBoundsCacheData;
        return t.index = 1,
        t.didChange = !1,
        t.data[0] !== this._didViewChangeTick && (t.didChange = !0,
        t.data[0] = this._didViewChangeTick),
        VF(this, t),
        t.didChange && ib(this, t.localBounds, yae),
        t.localBounds
    },
    getBounds(t, e) {
        return rb(this, t, e || new Vr)
    }
}
  , _ae = {
    _onRender: null,
    set onRender(t) {
        const e = this.renderGroup || this.parentRenderGroup;
        if (!t) {
            this._onRender && (e == null || e.removeOnRender(this)),
            this._onRender = null;
            return
        }
        this._onRender || e == null || e.addOnRender(this),
        this._onRender = t
    },
    get onRender() {
        return this._onRender
    }
}
  , bae = {
    _zIndex: 0,
    sortDirty: !1,
    sortableChildren: !1,
    get zIndex() {
        return this._zIndex
    },
    set zIndex(t) {
        this._zIndex !== t && (this._zIndex = t,
        this.depthOfChildModified())
    },
    depthOfChildModified() {
        this.parent && (this.parent.sortableChildren = !0,
        this.parent.sortDirty = !0),
        this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0)
    },
    sortChildren() {
        this.sortDirty && (this.sortDirty = !1,
        this.children.sort(Cae))
    }
};
function Cae(t, e) {
    return t._zIndex - e._zIndex
}
const Aae = {
    getGlobalPosition(t=new Gt, e=!1) {
        return this.parent ? this.parent.toGlobal(this._position, t, e) : (t.x = this._position.x,
        t.y = this._position.y),
        t
    },
    toGlobal(t, e, r=!1) {
        const n = this.getGlobalTransform(dn.get(), r);
        return e = n.apply(t, e),
        dn.return(n),
        e
    },
    toLocal(t, e, r, n) {
        e && (t = e.toGlobal(t, r, n));
        const i = this.getGlobalTransform(dn.get(), n);
        return r = i.applyInverse(t, r),
        dn.return(i),
        r
    }
};
class zF {
    constructor() {
        this.uid = Tt("instructionSet"),
        this.instructions = [],
        this.instructionSize = 0,
        this.renderables = [],
        this.gcTick = 0
    }
    reset() {
        this.instructionSize = 0
    }
    destroy() {
        this.instructions.length = 0,
        this.renderables.length = 0,
        this.renderPipes = null,
        this.gcTick = 0
    }
    add(e) {
        this.instructions[this.instructionSize++] = e
    }
    log() {
        this.instructions.length = this.instructionSize,
        console.table(this.instructions, ["type", "action"])
    }
}
let wae = 0;
class Bae {
    constructor(e) {
        this._poolKeyHash = Object.create(null),
        this._texturePool = {},
        this.textureOptions = e || {},
        this.enableFullScreen = !1,
        this.textureStyle = new bo(this.textureOptions)
    }
    createTexture(e, r, n) {
        const i = new Br({
            ...this.textureOptions,
            width: e,
            height: r,
            resolution: 1,
            antialias: n,
            autoGarbageCollect: !1
        });
        return new Be({
            source: i,
            label: `texturePool_${wae++}`
        })
    }
    getOptimalTexture(e, r, n=1, i) {
        let o = Math.ceil(e * n - 1e-6)
          , s = Math.ceil(r * n - 1e-6);
        o = eu(o),
        s = eu(s);
        const a = (o << 17) + (s << 1) + (i ? 1 : 0);
        this._texturePool[a] || (this._texturePool[a] = []);
        let l = this._texturePool[a].pop();
        return l || (l = this.createTexture(o, s, i)),
        l.source._resolution = n,
        l.source.width = o / n,
        l.source.height = s / n,
        l.source.pixelWidth = o,
        l.source.pixelHeight = s,
        l.frame.x = 0,
        l.frame.y = 0,
        l.frame.width = e,
        l.frame.height = r,
        l.updateUvs(),
        this._poolKeyHash[l.uid] = a,
        l
    }
    getSameSizeTexture(e, r=!1) {
        const n = e.source;
        return this.getOptimalTexture(e.width, e.height, n._resolution, r)
    }
    returnTexture(e, r=!1) {
        const n = this._poolKeyHash[e.uid];
        r && (e.source.style = this.textureStyle),
        this._texturePool[n].push(e)
    }
    clear(e) {
        if (e = e !== !1,
        e)
            for (const r in this._texturePool) {
                const n = this._texturePool[r];
                if (n)
                    for (let i = 0; i < n.length; i++)
                        n[i].destroy(!0)
            }
        this._texturePool = {}
    }
}
const sr = new Bae;
Cu.register(sr);
class jy {
    constructor() {
        this.renderPipeId = "renderGroup",
        this.root = null,
        this.canBundle = !1,
        this.renderGroupParent = null,
        this.renderGroupChildren = [],
        this.worldTransform = new Pe,
        this.worldColorAlpha = 4294967295,
        this.worldColor = 16777215,
        this.worldAlpha = 1,
        this.childrenToUpdate = Object.create(null),
        this.updateTick = 0,
        this.gcTick = 0,
        this.childrenRenderablesToUpdate = {
            list: [],
            index: 0
        },
        this.structureDidChange = !0,
        this.instructionSet = new zF,
        this._onRenderContainers = [],
        this.textureNeedsUpdate = !0,
        this.isCachedAsTexture = !1,
        this._matrixDirty = 7
    }
    init(e) {
        this.root = e,
        e._onRender && this.addOnRender(e),
        e.didChange = !0;
        const r = e.children;
        for (let n = 0; n < r.length; n++) {
            const i = r[n];
            i._updateFlags = 15,
            this.addChild(i)
        }
    }
    enableCacheAsTexture(e={}) {
        this.textureOptions = e,
        this.isCachedAsTexture = !0,
        this.textureNeedsUpdate = !0
    }
    disableCacheAsTexture() {
        this.isCachedAsTexture = !1,
        this.texture && (sr.returnTexture(this.texture, !0),
        this.texture = null)
    }
    updateCacheTexture() {
        this.textureNeedsUpdate = !0;
        const e = this._parentCacheAsTextureRenderGroup;
        e && !e.textureNeedsUpdate && e.updateCacheTexture()
    }
    reset() {
        this.renderGroupChildren.length = 0;
        for (const e in this.childrenToUpdate) {
            const r = this.childrenToUpdate[e];
            r.list.fill(null),
            r.index = 0
        }
        this.childrenRenderablesToUpdate.index = 0,
        this.childrenRenderablesToUpdate.list.fill(null),
        this.root = null,
        this.updateTick = 0,
        this.structureDidChange = !0,
        this._onRenderContainers.length = 0,
        this.renderGroupParent = null,
        this.disableCacheAsTexture()
    }
    get localTransform() {
        return this.root.localTransform
    }
    addRenderGroupChild(e) {
        e.renderGroupParent && e.renderGroupParent._removeRenderGroupChild(e),
        e.renderGroupParent = this,
        this.renderGroupChildren.push(e)
    }
    _removeRenderGroupChild(e) {
        const r = this.renderGroupChildren.indexOf(e);
        r > -1 && this.renderGroupChildren.splice(r, 1),
        e.renderGroupParent = null
    }
    addChild(e) {
        if (this.structureDidChange = !0,
        e.parentRenderGroup = this,
        e.updateTick = -1,
        e.parent === this.root ? e.relativeRenderGroupDepth = 1 : e.relativeRenderGroupDepth = e.parent.relativeRenderGroupDepth + 1,
        e.didChange = !0,
        this.onChildUpdate(e),
        e.renderGroup) {
            this.addRenderGroupChild(e.renderGroup);
            return
        }
        e._onRender && this.addOnRender(e);
        const r = e.children;
        for (let n = 0; n < r.length; n++)
            this.addChild(r[n])
    }
    removeChild(e) {
        if (this.structureDidChange = !0,
        e._onRender && (e.renderGroup || this.removeOnRender(e)),
        e.parentRenderGroup = null,
        e.renderGroup) {
            this._removeRenderGroupChild(e.renderGroup);
            return
        }
        const r = e.children;
        for (let n = 0; n < r.length; n++)
            this.removeChild(r[n])
    }
    removeChildren(e) {
        for (let r = 0; r < e.length; r++)
            this.removeChild(e[r])
    }
    onChildUpdate(e) {
        let r = this.childrenToUpdate[e.relativeRenderGroupDepth];
        r || (r = this.childrenToUpdate[e.relativeRenderGroupDepth] = {
            index: 0,
            list: []
        }),
        r.list[r.index++] = e
    }
    updateRenderable(e) {
        e.globalDisplayStatus < 7 || (this.instructionSet.renderPipes[e.renderPipeId].updateRenderable(e),
        e.didViewUpdate = !1)
    }
    onChildViewUpdate(e) {
        this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++] = e
    }
    get isRenderable() {
        return this.root.localDisplayStatus === 7 && this.worldAlpha > 0
    }
    addOnRender(e) {
        this._onRenderContainers.push(e)
    }
    removeOnRender(e) {
        this._onRenderContainers.splice(this._onRenderContainers.indexOf(e), 1)
    }
    runOnRender(e) {
        for (let r = 0; r < this._onRenderContainers.length; r++)
            this._onRenderContainers[r]._onRender(e)
    }
    destroy() {
        this.disableCacheAsTexture(),
        this.renderGroupParent = null,
        this.root = null,
        this.childrenRenderablesToUpdate = null,
        this.childrenToUpdate = null,
        this.renderGroupChildren = null,
        this._onRenderContainers = null,
        this.instructionSet = null
    }
    getChildren(e=[]) {
        const r = this.root.children;
        for (let n = 0; n < r.length; n++)
            this._getChildren(r[n], e);
        return e
    }
    _getChildren(e, r=[]) {
        if (r.push(e),
        e.renderGroup)
            return r;
        const n = e.children;
        for (let i = 0; i < n.length; i++)
            this._getChildren(n[i], r);
        return r
    }
    invalidateMatrices() {
        this._matrixDirty = 7
    }
    get inverseWorldTransform() {
        return this._matrixDirty & 1 ? (this._matrixDirty &= -2,
        this._inverseWorldTransform || (this._inverseWorldTransform = new Pe),
        this._inverseWorldTransform.copyFrom(this.worldTransform).invert()) : this._inverseWorldTransform
    }
    get textureOffsetInverseTransform() {
        return this._matrixDirty & 2 ? (this._matrixDirty &= -3,
        this._textureOffsetInverseTransform || (this._textureOffsetInverseTransform = new Pe),
        this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x, -this._textureBounds.y)) : this._textureOffsetInverseTransform
    }
    get inverseParentTextureTransform() {
        if (!(this._matrixDirty & 4))
            return this._inverseParentTextureTransform;
        this._matrixDirty &= -5;
        const e = this._parentCacheAsTextureRenderGroup;
        return e ? (this._inverseParentTextureTransform || (this._inverseParentTextureTransform = new Pe),
        this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(e.inverseWorldTransform).translate(-e._textureBounds.x, -e._textureBounds.y)) : this.worldTransform
    }
    get cacheToLocalTransform() {
        return this.isCachedAsTexture ? this.textureOffsetInverseTransform : this._parentCacheAsTextureRenderGroup ? this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform : null
    }
}
function Wy(t, e, r={}) {
    for (const n in e)
        !r[n] && e[n] !== void 0 && (t[n] = e[n])
}
const Tg = new Jt(null)
  , sh = new Jt(null)
  , Dg = new Jt(null,1,1)
  , ah = new Jt(null)
  , Ix = 1
  , ob = 2
  , k0 = 4;
class kn extends Qn {
    constructor(e={}) {
        var r, n;
        super(),
        this.uid = Tt("renderable"),
        this._updateFlags = 15,
        this.renderGroup = null,
        this.parentRenderGroup = null,
        this.parentRenderGroupIndex = 0,
        this.didChange = !1,
        this.didViewUpdate = !1,
        this.relativeRenderGroupDepth = 0,
        this.children = [],
        this.parent = null,
        this.includeInBuild = !0,
        this.measurable = !0,
        this.isSimple = !0,
        this.parentRenderLayer = null,
        this.updateTick = -1,
        this.localTransform = new Pe,
        this.relativeGroupTransform = new Pe,
        this.groupTransform = this.relativeGroupTransform,
        this.destroyed = !1,
        this._position = new Jt(this,0,0),
        this._scale = Dg,
        this._pivot = sh,
        this._origin = ah,
        this._skew = Tg,
        this._cx = 1,
        this._sx = 0,
        this._cy = 0,
        this._sy = 1,
        this._rotation = 0,
        this.localColor = 16777215,
        this.localAlpha = 1,
        this.groupAlpha = 1,
        this.groupColor = 16777215,
        this.groupColorAlpha = 4294967295,
        this.localBlendMode = "inherit",
        this.groupBlendMode = "normal",
        this.localDisplayStatus = 7,
        this.globalDisplayStatus = 7,
        this._didContainerChangeTick = 0,
        this._didViewChangeTick = 0,
        this._didLocalTransformChangeId = -1,
        this.effects = [],
        Wy(this, e, {
            children: !0,
            parent: !0,
            effects: !0
        }),
        (r = e.children) == null || r.forEach(i => this.addChild(i)),
        (n = e.parent) == null || n.addChild(this)
    }
    static mixin(e) {
        Re("8.8.0", "Container.mixin is deprecated, please use extensions.mixin instead."),
        $e.mixin(kn, e)
    }
    set _didChangeId(e) {
        this._didViewChangeTick = e >> 12 & 4095,
        this._didContainerChangeTick = e & 4095
    }
    get _didChangeId() {
        return this._didContainerChangeTick & 4095 | (this._didViewChangeTick & 4095) << 12
    }
    addChild(...e) {
        if (this.allowChildren || Re(tt, "addChild: Only Containers will be allowed to add children in v8.0.0"),
        e.length > 1) {
            for (let i = 0; i < e.length; i++)
                this.addChild(e[i]);
            return e[0]
        }
        const r = e[0]
          , n = this.renderGroup || this.parentRenderGroup;
        return r.parent === this ? (this.children.splice(this.children.indexOf(r), 1),
        this.children.push(r),
        n && (n.structureDidChange = !0),
        r) : (r.parent && r.parent.removeChild(r),
        this.children.push(r),
        this.sortableChildren && (this.sortDirty = !0),
        r.parent = this,
        r.didChange = !0,
        r._updateFlags = 15,
        n && n.addChild(r),
        this.emit("childAdded", r, this, this.children.length - 1),
        r.emit("added", this),
        this._didViewChangeTick++,
        r._zIndex !== 0 && r.depthOfChildModified(),
        r)
    }
    removeChild(...e) {
        if (e.length > 1) {
            for (let i = 0; i < e.length; i++)
                this.removeChild(e[i]);
            return e[0]
        }
        const r = e[0]
          , n = this.children.indexOf(r);
        return n > -1 && (this._didViewChangeTick++,
        this.children.splice(n, 1),
        this.renderGroup ? this.renderGroup.removeChild(r) : this.parentRenderGroup && this.parentRenderGroup.removeChild(r),
        r.parentRenderLayer && r.parentRenderLayer.detach(r),
        r.parent = null,
        this.emit("childRemoved", r, this, n),
        r.emit("removed", this)),
        r
    }
    _onUpdate(e) {
        e && e === this._skew && this._updateSkew(),
        this._didContainerChangeTick++,
        !this.didChange && (this.didChange = !0,
        this.parentRenderGroup && this.parentRenderGroup.onChildUpdate(this))
    }
    set isRenderGroup(e) {
        !!this.renderGroup !== e && (e ? this.enableRenderGroup() : this.disableRenderGroup())
    }
    get isRenderGroup() {
        return !!this.renderGroup
    }
    enableRenderGroup() {
        if (this.renderGroup)
            return;
        const e = this.parentRenderGroup;
        e == null || e.removeChild(this),
        this.renderGroup = xr.get(jy, this),
        this.groupTransform = Pe.IDENTITY,
        e == null || e.addChild(this),
        this._updateIsSimple()
    }
    disableRenderGroup() {
        if (!this.renderGroup)
            return;
        const e = this.parentRenderGroup;
        e == null || e.removeChild(this),
        xr.return(this.renderGroup),
        this.renderGroup = null,
        this.groupTransform = this.relativeGroupTransform,
        e == null || e.addChild(this),
        this._updateIsSimple()
    }
    _updateIsSimple() {
        this.isSimple = !this.renderGroup && this.effects.length === 0
    }
    get worldTransform() {
        return this._worldTransform || (this._worldTransform = new Pe),
        this.renderGroup ? this._worldTransform.copyFrom(this.renderGroup.worldTransform) : this.parentRenderGroup && this._worldTransform.appendFrom(this.relativeGroupTransform, this.parentRenderGroup.worldTransform),
        this._worldTransform
    }
    get x() {
        return this._position.x
    }
    set x(e) {
        this._position.x = e
    }
    get y() {
        return this._position.y
    }
    set y(e) {
        this._position.y = e
    }
    get position() {
        return this._position
    }
    set position(e) {
        this._position.copyFrom(e)
    }
    get rotation() {
        return this._rotation
    }
    set rotation(e) {
        this._rotation !== e && (this._rotation = e,
        this._onUpdate(this._skew))
    }
    get angle() {
        return this.rotation * jse
    }
    set angle(e) {
        this.rotation = e * Wse
    }
    get pivot() {
        return this._pivot === sh && (this._pivot = new Jt(this,0,0)),
        this._pivot
    }
    set pivot(e) {
        this._pivot === sh && (this._pivot = new Jt(this,0,0),
        this._origin !== ah && Ne("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),
        typeof e == "number" ? this._pivot.set(e) : this._pivot.copyFrom(e)
    }
    get skew() {
        return this._skew === Tg && (this._skew = new Jt(this,0,0)),
        this._skew
    }
    set skew(e) {
        this._skew === Tg && (this._skew = new Jt(this,0,0)),
        this._skew.copyFrom(e)
    }
    get scale() {
        return this._scale === Dg && (this._scale = new Jt(this,1,1)),
        this._scale
    }
    set scale(e) {
        this._scale === Dg && (this._scale = new Jt(this,0,0)),
        typeof e == "string" && (e = parseFloat(e)),
        typeof e == "number" ? this._scale.set(e) : this._scale.copyFrom(e)
    }
    get origin() {
        return this._origin === ah && (this._origin = new Jt(this,0,0)),
        this._origin
    }
    set origin(e) {
        this._origin === ah && (this._origin = new Jt(this,0,0),
        this._pivot !== sh && Ne("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),
        typeof e == "number" ? this._origin.set(e) : this._origin.copyFrom(e)
    }
    get width() {
        return Math.abs(this.scale.x * this.getLocalBounds().width)
    }
    set width(e) {
        const r = this.getLocalBounds().width;
        this._setWidth(e, r)
    }
    get height() {
        return Math.abs(this.scale.y * this.getLocalBounds().height)
    }
    set height(e) {
        const r = this.getLocalBounds().height;
        this._setHeight(e, r)
    }
    getSize(e) {
        e || (e = {});
        const r = this.getLocalBounds();
        return e.width = Math.abs(this.scale.x * r.width),
        e.height = Math.abs(this.scale.y * r.height),
        e
    }
    setSize(e, r) {
        const n = this.getLocalBounds();
        typeof e == "object" ? (r = e.height ?? e.width,
        e = e.width) : r ?? (r = e),
        e !== void 0 && this._setWidth(e, n.width),
        r !== void 0 && this._setHeight(r, n.height)
    }
    _updateSkew() {
        const e = this._rotation
          , r = this._skew;
        this._cx = Math.cos(e + r._y),
        this._sx = Math.sin(e + r._y),
        this._cy = -Math.sin(e - r._x),
        this._sy = Math.cos(e - r._x)
    }
    updateTransform(e) {
        return this.position.set(typeof e.x == "number" ? e.x : this.position.x, typeof e.y == "number" ? e.y : this.position.y),
        this.scale.set(typeof e.scaleX == "number" ? e.scaleX || 1 : this.scale.x, typeof e.scaleY == "number" ? e.scaleY || 1 : this.scale.y),
        this.rotation = typeof e.rotation == "number" ? e.rotation : this.rotation,
        this.skew.set(typeof e.skewX == "number" ? e.skewX : this.skew.x, typeof e.skewY == "number" ? e.skewY : this.skew.y),
        this.pivot.set(typeof e.pivotX == "number" ? e.pivotX : this.pivot.x, typeof e.pivotY == "number" ? e.pivotY : this.pivot.y),
        this.origin.set(typeof e.originX == "number" ? e.originX : this.origin.x, typeof e.originY == "number" ? e.originY : this.origin.y),
        this
    }
    setFromMatrix(e) {
        e.decompose(this)
    }
    updateLocalTransform() {
        const e = this._didContainerChangeTick;
        if (this._didLocalTransformChangeId === e)
            return;
        this._didLocalTransformChangeId = e;
        const r = this.localTransform
          , n = this._scale
          , i = this._pivot
          , o = this._origin
          , s = this._position
          , a = n._x
          , l = n._y
          , c = i._x
          , u = i._y
          , f = -o._x
          , d = -o._y;
        r.a = this._cx * a,
        r.b = this._sx * a,
        r.c = this._cy * l,
        r.d = this._sy * l,
        r.tx = s._x - (c * r.a + u * r.c) + (f * r.a + d * r.c) - f,
        r.ty = s._y - (c * r.b + u * r.d) + (f * r.b + d * r.d) - d
    }
    set alpha(e) {
        e !== this.localAlpha && (this.localAlpha = e,
        this._updateFlags |= Ix,
        this._onUpdate())
    }
    get alpha() {
        return this.localAlpha
    }
    set tint(e) {
        const n = Ut.shared.setValue(e ?? 16777215).toBgrNumber();
        n !== this.localColor && (this.localColor = n,
        this._updateFlags |= Ix,
        this._onUpdate())
    }
    get tint() {
        return O0(this.localColor)
    }
    set blendMode(e) {
        this.localBlendMode !== e && (this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0),
        this._updateFlags |= ob,
        this.localBlendMode = e,
        this._onUpdate())
    }
    get blendMode() {
        return this.localBlendMode
    }
    get visible() {
        return !!(this.localDisplayStatus & 2)
    }
    set visible(e) {
        const r = e ? 2 : 0;
        (this.localDisplayStatus & 2) !== r && (this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0),
        this._updateFlags |= k0,
        this.localDisplayStatus ^= 2,
        this._onUpdate())
    }
    get culled() {
        return !(this.localDisplayStatus & 4)
    }
    set culled(e) {
        const r = e ? 0 : 4;
        (this.localDisplayStatus & 4) !== r && (this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0),
        this._updateFlags |= k0,
        this.localDisplayStatus ^= 4,
        this._onUpdate())
    }
    get renderable() {
        return !!(this.localDisplayStatus & 1)
    }
    set renderable(e) {
        const r = e ? 1 : 0;
        (this.localDisplayStatus & 1) !== r && (this._updateFlags |= k0,
        this.localDisplayStatus ^= 1,
        this.parentRenderGroup && (this.parentRenderGroup.structureDidChange = !0),
        this._onUpdate())
    }
    get isRenderable() {
        return this.localDisplayStatus === 7 && this.groupAlpha > 0
    }
    destroy(e=!1) {
        var i;
        if (this.destroyed)
            return;
        this.destroyed = !0;
        let r;
        if (this.children.length && (r = this.removeChildren(0, this.children.length)),
        this.removeFromParent(),
        this.parent = null,
        this._maskEffect = null,
        this._filterEffect = null,
        this.effects = null,
        this._position = null,
        this._scale = null,
        this._pivot = null,
        this._origin = null,
        this._skew = null,
        this.emit("destroyed", this),
        this.removeAllListeners(),
        (typeof e == "boolean" ? e : e == null ? void 0 : e.children) && r)
            for (let o = 0; o < r.length; ++o)
                r[o].destroy(e);
        (i = this.renderGroup) == null || i.destroy(),
        this.renderGroup = null
    }
}
$e.mixin(kn, fae, mae, Aae, _ae, Eae, xae, pae, bae, aae, uae, vae, dae);
class rd extends kn {
    constructor(e) {
        super(e),
        this.canBundle = !0,
        this.allowChildren = !1,
        this._roundPixels = 0,
        this._lastUsed = -1,
        this._gpuData = Object.create(null),
        this._bounds = new Vr(0,1,0,0),
        this._boundsDirty = !0
    }
    get bounds() {
        return this._boundsDirty ? (this.updateBounds(),
        this._boundsDirty = !1,
        this._bounds) : this._bounds
    }
    get roundPixels() {
        return !!this._roundPixels
    }
    set roundPixels(e) {
        this._roundPixels = e ? 1 : 0
    }
    containsPoint(e) {
        const r = this.bounds
          , {x: n, y: i} = e;
        return n >= r.minX && n <= r.maxX && i >= r.minY && i <= r.maxY
    }
    onViewUpdate() {
        if (this._didViewChangeTick++,
        this._boundsDirty = !0,
        this.didViewUpdate)
            return;
        this.didViewUpdate = !0;
        const e = this.renderGroup || this.parentRenderGroup;
        e && e.onChildViewUpdate(this)
    }
    destroy(e) {
        var r, n;
        super.destroy(e),
        this._bounds = null;
        for (const i in this._gpuData)
            (n = (r = this._gpuData[i]).destroy) == null || n.call(r);
        this._gpuData = null
    }
    collectRenderablesSimple(e, r, n) {
        const {renderPipes: i} = r;
        i.blendMode.pushBlendMode(this, this.groupBlendMode, e),
        i[this.renderPipeId].addRenderable(this, e),
        this.didViewUpdate = !1;
        const s = this.children
          , a = s.length;
        for (let l = 0; l < a; l++)
            s[l].collectRenderables(e, r, n);
        i.blendMode.popBlendMode(e)
    }
}
class _l extends rd {
    constructor(e=Be.EMPTY) {
        e instanceof Be && (e = {
            texture: e
        });
        const {texture: r=Be.EMPTY, anchor: n, roundPixels: i, width: o, height: s, ...a} = e;
        super({
            label: "Sprite",
            ...a
        }),
        this.renderPipeId = "sprite",
        this.batched = !0,
        this._visualBounds = {
            minX: 0,
            maxX: 1,
            minY: 0,
            maxY: 0
        },
        this._anchor = new Jt({
            _onUpdate: () => {
                this.onViewUpdate()
            }
        }),
        n ? this.anchor = n : r.defaultAnchor && (this.anchor = r.defaultAnchor),
        this.texture = r,
        this.allowChildren = !1,
        this.roundPixels = i ?? !1,
        o !== void 0 && (this.width = o),
        s !== void 0 && (this.height = s)
    }
    static from(e, r=!1) {
        return e instanceof Be ? new _l(e) : new _l(Be.from(e, r))
    }
    set texture(e) {
        e || (e = Be.EMPTY);
        const r = this._texture;
        r !== e && (r && r.dynamic && r.off("update", this.onViewUpdate, this),
        e.dynamic && e.on("update", this.onViewUpdate, this),
        this._texture = e,
        this._width && this._setWidth(this._width, this._texture.orig.width),
        this._height && this._setHeight(this._height, this._texture.orig.height),
        this.onViewUpdate())
    }
    get texture() {
        return this._texture
    }
    get visualBounds() {
        return RF(this._visualBounds, this._anchor, this._texture),
        this._visualBounds
    }
    get sourceBounds() {
        return Re("8.6.1", "Sprite.sourceBounds is deprecated, use visualBounds instead."),
        this.visualBounds
    }
    updateBounds() {
        const e = this._anchor
          , r = this._texture
          , n = this._bounds
          , {width: i, height: o} = r.orig;
        n.minX = -e._x * i,
        n.maxX = n.minX + i,
        n.minY = -e._y * o,
        n.maxY = n.minY + o
    }
    destroy(e=!1) {
        if (super.destroy(e),
        typeof e == "boolean" ? e : e == null ? void 0 : e.texture) {
            const n = typeof e == "boolean" ? e : e == null ? void 0 : e.textureSource;
            this._texture.destroy(n)
        }
        this._texture = null,
        this._visualBounds = null,
        this._bounds = null,
        this._anchor = null,
        this._gpuData = null
    }
    get anchor() {
        return this._anchor
    }
    set anchor(e) {
        typeof e == "number" ? this._anchor.set(e) : this._anchor.copyFrom(e)
    }
    get width() {
        return Math.abs(this.scale.x) * this._texture.orig.width
    }
    set width(e) {
        this._setWidth(e, this._texture.orig.width),
        this._width = e
    }
    get height() {
        return Math.abs(this.scale.y) * this._texture.orig.height
    }
    set height(e) {
        this._setHeight(e, this._texture.orig.height),
        this._height = e
    }
    getSize(e) {
        return e || (e = {}),
        e.width = Math.abs(this.scale.x) * this._texture.orig.width,
        e.height = Math.abs(this.scale.y) * this._texture.orig.height,
        e
    }
    setSize(e, r) {
        typeof e == "object" ? (r = e.height ?? e.width,
        e = e.width) : r ?? (r = e),
        e !== void 0 && this._setWidth(e, this._texture.orig.width),
        r !== void 0 && this._setHeight(r, this._texture.orig.height)
    }
}
const Sae = new Vr;
function jF(t, e, r) {
    const n = Sae;
    t.measurable = !0,
    rb(t, r, n),
    e.addBoundsMask(n),
    t.measurable = !1
}
function WF(t, e, r) {
    const n = Qo.get();
    t.measurable = !0;
    const i = dn.get().identity()
      , o = YF(t, r, i);
    ib(t, n, o),
    t.measurable = !1,
    e.addBoundsMask(n),
    dn.return(i),
    Qo.return(n)
}
function YF(t, e, r) {
    return t ? (t !== e && (YF(t.parent, e, r),
    t.updateLocalTransform(),
    r.append(t.localTransform)),
    r) : (Ne("Mask bounds, renderable is not inside the root container"),
    r)
}
class XF {
    constructor(e) {
        this.priority = 0,
        this.inverse = !1,
        this.pipe = "alphaMask",
        e != null && e.mask && this.init(e.mask)
    }
    init(e) {
        this.mask = e,
        this.renderMaskToTexture = !(e instanceof _l),
        this.mask.renderable = this.renderMaskToTexture,
        this.mask.includeInBuild = !this.renderMaskToTexture,
        this.mask.measurable = !1
    }
    reset() {
        this.mask !== null && (this.mask.measurable = !0,
        this.mask = null)
    }
    addBounds(e, r) {
        this.inverse || jF(this.mask, e, r)
    }
    addLocalBounds(e, r) {
        WF(this.mask, e, r)
    }
    containsPoint(e, r) {
        const n = this.mask;
        return r(n, e)
    }
    destroy() {
        this.reset()
    }
    static test(e) {
        return e instanceof _l
    }
}
XF.extension = X.MaskEffect;
class KF {
    constructor(e) {
        this.priority = 0,
        this.pipe = "colorMask",
        e != null && e.mask && this.init(e.mask)
    }
    init(e) {
        this.mask = e
    }
    destroy() {}
    static test(e) {
        return typeof e == "number"
    }
}
KF.extension = X.MaskEffect;
class qF {
    constructor(e) {
        this.priority = 0,
        this.pipe = "stencilMask",
        e != null && e.mask && this.init(e.mask)
    }
    init(e) {
        this.mask = e,
        this.mask.includeInBuild = !1,
        this.mask.measurable = !1
    }
    reset() {
        this.mask !== null && (this.mask.measurable = !0,
        this.mask.includeInBuild = !0,
        this.mask = null)
    }
    addBounds(e, r) {
        jF(this.mask, e, r)
    }
    addLocalBounds(e, r) {
        WF(this.mask, e, r)
    }
    containsPoint(e, r) {
        const n = this.mask;
        return r(n, e)
    }
    destroy() {
        this.reset()
    }
    static test(e) {
        return e instanceof kn
    }
}
qF.extension = X.MaskEffect;
const Tae = {
    createCanvas: (t, e) => {
        const r = document.createElement("canvas");
        return r.width = t,
        r.height = e,
        r
    }
    ,
    createImage: () => new Image,
    getCanvasRenderingContext2D: () => CanvasRenderingContext2D,
    getWebGLRenderingContext: () => WebGLRenderingContext,
    getNavigator: () => navigator,
    getBaseUrl: () => document.baseURI ?? window.location.href,
    getFontFaceSet: () => document.fonts,
    fetch: (t, e) => fetch(t, e),
    parseXML: t => new DOMParser().parseFromString(t, "text/xml")
};
let cw = Tae;
const je = {
    get() {
        return cw
    },
    set(t) {
        cw = t
    }
};
class ho extends Br {
    constructor(e) {
        e.resource || (e.resource = je.get().createCanvas()),
        e.width || (e.width = e.resource.width,
        e.autoDensity || (e.width /= e.resolution)),
        e.height || (e.height = e.resource.height,
        e.autoDensity || (e.height /= e.resolution)),
        super(e),
        this.uploadMethodId = "image",
        this.autoDensity = e.autoDensity,
        this.resizeCanvas(),
        this.transparent = !!e.transparent
    }
    resizeCanvas() {
        this.autoDensity && "style"in this.resource && (this.resource.style.width = `${this.width}px`,
        this.resource.style.height = `${this.height}px`),
        (this.resource.width !== this.pixelWidth || this.resource.height !== this.pixelHeight) && (this.resource.width = this.pixelWidth,
        this.resource.height = this.pixelHeight)
    }
    resize(e=this.width, r=this.height, n=this._resolution) {
        const i = super.resize(e, r, n);
        return i && this.resizeCanvas(),
        i
    }
    static test(e) {
        return globalThis.HTMLCanvasElement && e instanceof HTMLCanvasElement || globalThis.OffscreenCanvas && e instanceof OffscreenCanvas
    }
    get context2D() {
        return this._context2D || (this._context2D = this.resource.getContext("2d"))
    }
}
ho.extension = X.TextureSource;
class bl extends Br {
    constructor(e) {
        super(e),
        this.uploadMethodId = "image",
        this.autoGarbageCollect = !0
    }
    static test(e) {
        return globalThis.HTMLImageElement && e instanceof HTMLImageElement || typeof ImageBitmap < "u" && e instanceof ImageBitmap || globalThis.VideoFrame && e instanceof VideoFrame
    }
}
bl.extension = X.TextureSource;
var Cl = (t => (t[t.INTERACTION = 50] = "INTERACTION",
t[t.HIGH = 25] = "HIGH",
t[t.NORMAL = 0] = "NORMAL",
t[t.LOW = -25] = "LOW",
t[t.UTILITY = -50] = "UTILITY",
t))(Cl || {});
class Fg {
    constructor(e, r=null, n=0, i=!1) {
        this.next = null,
        this.previous = null,
        this._destroyed = !1,
        this._fn = e,
        this._context = r,
        this.priority = n,
        this._once = i
    }
    match(e, r=null) {
        return this._fn === e && this._context === r
    }
    emit(e) {
        this._fn && (this._context ? this._fn.call(this._context, e) : this._fn(e));
        const r = this.next;
        return this._once && this.destroy(!0),
        this._destroyed && (this.next = null),
        r
    }
    connect(e) {
        this.previous = e,
        e.next && (e.next.previous = this),
        this.next = e.next,
        e.next = this
    }
    destroy(e=!1) {
        this._destroyed = !0,
        this._fn = null,
        this._context = null,
        this.previous && (this.previous.next = this.next),
        this.next && (this.next.previous = this.previous);
        const r = this.next;
        return this.next = e ? null : r,
        this.previous = null,
        r
    }
}
const ZF = class Ln {
    constructor() {
        this.autoStart = !1,
        this.deltaTime = 1,
        this.lastTime = -1,
        this.speed = 1,
        this.started = !1,
        this._requestId = null,
        this._maxElapsedMS = 100,
        this._minElapsedMS = 0,
        this._protected = !1,
        this._lastFrame = -1,
        this._head = new Fg(null,null,1 / 0),
        this.deltaMS = 1 / Ln.targetFPMS,
        this.elapsedMS = 1 / Ln.targetFPMS,
        this._tick = e => {
            this._requestId = null,
            this.started && (this.update(e),
            this.started && this._requestId === null && this._head.next && (this._requestId = requestAnimationFrame(this._tick)))
        }
    }
    _requestIfNeeded() {
        this._requestId === null && this._head.next && (this.lastTime = performance.now(),
        this._lastFrame = this.lastTime,
        this._requestId = requestAnimationFrame(this._tick))
    }
    _cancelIfNeeded() {
        this._requestId !== null && (cancelAnimationFrame(this._requestId),
        this._requestId = null)
    }
    _startIfPossible() {
        this.started ? this._requestIfNeeded() : this.autoStart && this.start()
    }
    add(e, r, n=Cl.NORMAL) {
        return this._addListener(new Fg(e,r,n))
    }
    addOnce(e, r, n=Cl.NORMAL) {
        return this._addListener(new Fg(e,r,n,!0))
    }
    _addListener(e) {
        let r = this._head.next
          , n = this._head;
        if (!r)
            e.connect(n);
        else {
            for (; r; ) {
                if (e.priority > r.priority) {
                    e.connect(n);
                    break
                }
                n = r,
                r = r.next
            }
            e.previous || e.connect(n)
        }
        return this._startIfPossible(),
        this
    }
    remove(e, r) {
        let n = this._head.next;
        for (; n; )
            n.match(e, r) ? n = n.destroy() : n = n.next;
        return this._head.next || this._cancelIfNeeded(),
        this
    }
    get count() {
        if (!this._head)
            return 0;
        let e = 0
          , r = this._head;
        for (; r = r.next; )
            e++;
        return e
    }
    start() {
        this.started || (this.started = !0,
        this._requestIfNeeded())
    }
    stop() {
        this.started && (this.started = !1,
        this._cancelIfNeeded())
    }
    destroy() {
        if (!this._protected) {
            this.stop();
            let e = this._head.next;
            for (; e; )
                e = e.destroy(!0);
            this._head.destroy(),
            this._head = null
        }
    }
    update(e=performance.now()) {
        let r;
        if (e > this.lastTime) {
            if (r = this.elapsedMS = e - this.lastTime,
            r > this._maxElapsedMS && (r = this._maxElapsedMS),
            r *= this.speed,
            this._minElapsedMS) {
                const o = e - this._lastFrame | 0;
                if (o < this._minElapsedMS)
                    return;
                this._lastFrame = e - o % this._minElapsedMS
            }
            this.deltaMS = r,
            this.deltaTime = this.deltaMS * Ln.targetFPMS;
            const n = this._head;
            let i = n.next;
            for (; i; )
                i = i.emit(this);
            n.next || this._cancelIfNeeded()
        } else
            this.deltaTime = this.deltaMS = this.elapsedMS = 0;
        this.lastTime = e
    }
    get FPS() {
        return 1e3 / this.elapsedMS
    }
    get minFPS() {
        return 1e3 / this._maxElapsedMS
    }
    set minFPS(e) {
        const r = Math.min(this.maxFPS, e)
          , n = Math.min(Math.max(0, r) / 1e3, Ln.targetFPMS);
        this._maxElapsedMS = 1 / n
    }
    get maxFPS() {
        return this._minElapsedMS ? Math.round(1e3 / this._minElapsedMS) : 0
    }
    set maxFPS(e) {
        if (e === 0)
            this._minElapsedMS = 0;
        else {
            const r = Math.max(this.minFPS, e);
            this._minElapsedMS = 1 / (r / 1e3)
        }
    }
    static get shared() {
        if (!Ln._shared) {
            const e = Ln._shared = new Ln;
            e.autoStart = !0,
            e._protected = !0
        }
        return Ln._shared
    }
    static get system() {
        if (!Ln._system) {
            const e = Ln._system = new Ln;
            e.autoStart = !0,
            e._protected = !0
        }
        return Ln._system
    }
}
;
ZF.targetFPMS = .06;
let Gr = ZF, Pg;
async function JF() {
    return Pg ?? (Pg = (async () => {
        var s;
        const e = je.get().createCanvas(1, 1).getContext("webgl");
        if (!e)
            return "premultiply-alpha-on-upload";
        const r = await new Promise(a => {
            const l = document.createElement("video");
            l.onloadeddata = () => a(l),
            l.onerror = () => a(null),
            l.autoplay = !1,
            l.crossOrigin = "anonymous",
            l.preload = "auto",
            l.src = "data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",
            l.load()
        }
        );
        if (!r)
            return "premultiply-alpha-on-upload";
        const n = e.createTexture();
        e.bindTexture(e.TEXTURE_2D, n);
        const i = e.createFramebuffer();
        e.bindFramebuffer(e.FRAMEBUFFER, i),
        e.framebufferTexture2D(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.TEXTURE_2D, n, 0),
        e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1),
        e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL, e.NONE),
        e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, e.UNSIGNED_BYTE, r);
        const o = new Uint8Array(4);
        return e.readPixels(0, 0, 1, 1, e.RGBA, e.UNSIGNED_BYTE, o),
        e.deleteFramebuffer(i),
        e.deleteTexture(n),
        (s = e.getExtension("WEBGL_lose_context")) == null || s.loseContext(),
        o[0] <= o[3] ? "premultiplied-alpha" : "premultiply-alpha-on-upload"
    }
    )()),
    Pg
}
const a1 = class QF extends Br {
    constructor(e) {
        super(e),
        this.isReady = !1,
        this.uploadMethodId = "video",
        e = {
            ...QF.defaultOptions,
            ...e
        },
        this._autoUpdate = !0,
        this._isConnectedToTicker = !1,
        this._updateFPS = e.updateFPS || 0,
        this._msToNextUpdate = 0,
        this.autoPlay = e.autoPlay !== !1,
        this.alphaMode = e.alphaMode ?? "premultiply-alpha-on-upload",
        this._videoFrameRequestCallback = this._videoFrameRequestCallback.bind(this),
        this._videoFrameRequestCallbackHandle = null,
        this._load = null,
        this._resolve = null,
        this._reject = null,
        this._onCanPlay = this._onCanPlay.bind(this),
        this._onCanPlayThrough = this._onCanPlayThrough.bind(this),
        this._onError = this._onError.bind(this),
        this._onPlayStart = this._onPlayStart.bind(this),
        this._onPlayStop = this._onPlayStop.bind(this),
        this._onSeeked = this._onSeeked.bind(this),
        e.autoLoad !== !1 && this.load()
    }
    updateFrame() {
        if (!this.destroyed) {
            if (this._updateFPS) {
                const e = Gr.shared.elapsedMS * this.resource.playbackRate;
                this._msToNextUpdate = Math.floor(this._msToNextUpdate - e)
            }
            (!this._updateFPS || this._msToNextUpdate <= 0) && (this._msToNextUpdate = this._updateFPS ? Math.floor(1e3 / this._updateFPS) : 0),
            this.isValid && this.update()
        }
    }
    _videoFrameRequestCallback() {
        this.updateFrame(),
        this.destroyed ? this._videoFrameRequestCallbackHandle = null : this._videoFrameRequestCallbackHandle = this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)
    }
    get isValid() {
        return !!this.resource.videoWidth && !!this.resource.videoHeight
    }
    async load() {
        if (this._load)
            return this._load;
        const e = this.resource
          , r = this.options;
        return (e.readyState === e.HAVE_ENOUGH_DATA || e.readyState === e.HAVE_FUTURE_DATA) && e.width && e.height && (e.complete = !0),
        e.addEventListener("play", this._onPlayStart),
        e.addEventListener("pause", this._onPlayStop),
        e.addEventListener("seeked", this._onSeeked),
        this._isSourceReady() ? this._mediaReady() : (r.preload || e.addEventListener("canplay", this._onCanPlay),
        e.addEventListener("canplaythrough", this._onCanPlayThrough),
        e.addEventListener("error", this._onError, !0)),
        this.alphaMode = await JF(),
        this._load = new Promise( (n, i) => {
            this.isValid ? n(this) : (this._resolve = n,
            this._reject = i,
            r.preloadTimeoutMs !== void 0 && (this._preloadTimeout = setTimeout( () => {
                this._onError(new ErrorEvent(`Preload exceeded timeout of ${r.preloadTimeoutMs}ms`))
            }
            )),
            e.load())
        }
        ),
        this._load
    }
    _onError(e) {
        this.resource.removeEventListener("error", this._onError, !0),
        this.emit("error", e),
        this._reject && (this._reject(e),
        this._reject = null,
        this._resolve = null)
    }
    _isSourcePlaying() {
        const e = this.resource;
        return !e.paused && !e.ended
    }
    _isSourceReady() {
        return this.resource.readyState > 2
    }
    _onPlayStart() {
        this.isValid || this._mediaReady(),
        this._configureAutoUpdate()
    }
    _onPlayStop() {
        this._configureAutoUpdate()
    }
    _onSeeked() {
        this._autoUpdate && !this._isSourcePlaying() && (this._msToNextUpdate = 0,
        this.updateFrame(),
        this._msToNextUpdate = 0)
    }
    _onCanPlay() {
        this.resource.removeEventListener("canplay", this._onCanPlay),
        this._mediaReady()
    }
    _onCanPlayThrough() {
        this.resource.removeEventListener("canplaythrough", this._onCanPlay),
        this._preloadTimeout && (clearTimeout(this._preloadTimeout),
        this._preloadTimeout = void 0),
        this._mediaReady()
    }
    _mediaReady() {
        const e = this.resource;
        this.isValid && (this.isReady = !0,
        this.resize(e.videoWidth, e.videoHeight)),
        this._msToNextUpdate = 0,
        this.updateFrame(),
        this._msToNextUpdate = 0,
        this._resolve && (this._resolve(this),
        this._resolve = null,
        this._reject = null),
        this._isSourcePlaying() ? this._onPlayStart() : this.autoPlay && this.resource.play()
    }
    destroy() {
        this._configureAutoUpdate();
        const e = this.resource;
        e && (e.removeEventListener("play", this._onPlayStart),
        e.removeEventListener("pause", this._onPlayStop),
        e.removeEventListener("seeked", this._onSeeked),
        e.removeEventListener("canplay", this._onCanPlay),
        e.removeEventListener("canplaythrough", this._onCanPlayThrough),
        e.removeEventListener("error", this._onError, !0),
        e.pause(),
        e.src = "",
        e.load()),
        super.destroy()
    }
    get autoUpdate() {
        return this._autoUpdate
    }
    set autoUpdate(e) {
        e !== this._autoUpdate && (this._autoUpdate = e,
        this._configureAutoUpdate())
    }
    get updateFPS() {
        return this._updateFPS
    }
    set updateFPS(e) {
        e !== this._updateFPS && (this._updateFPS = e,
        this._configureAutoUpdate())
    }
    _configureAutoUpdate() {
        this._autoUpdate && this._isSourcePlaying() ? !this._updateFPS && this.resource.requestVideoFrameCallback ? (this._isConnectedToTicker && (Gr.shared.remove(this.updateFrame, this),
        this._isConnectedToTicker = !1,
        this._msToNextUpdate = 0),
        this._videoFrameRequestCallbackHandle === null && (this._videoFrameRequestCallbackHandle = this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))) : (this._videoFrameRequestCallbackHandle !== null && (this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),
        this._videoFrameRequestCallbackHandle = null),
        this._isConnectedToTicker || (Gr.shared.add(this.updateFrame, this),
        this._isConnectedToTicker = !0,
        this._msToNextUpdate = 0)) : (this._videoFrameRequestCallbackHandle !== null && (this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),
        this._videoFrameRequestCallbackHandle = null),
        this._isConnectedToTicker && (Gr.shared.remove(this.updateFrame, this),
        this._isConnectedToTicker = !1,
        this._msToNextUpdate = 0))
    }
    static test(e) {
        return globalThis.HTMLVideoElement && e instanceof HTMLVideoElement
    }
}
;
a1.extension = X.TextureSource;
a1.defaultOptions = {
    ...Br.defaultOptions,
    autoLoad: !0,
    autoPlay: !0,
    updateFPS: 0,
    crossorigin: !0,
    loop: !1,
    muted: !0,
    playsinline: !0,
    preload: !1
};
a1.MIME_TYPES = {
    ogv: "video/ogg",
    mov: "video/quicktime",
    m4v: "video/mp4"
};
let R0 = a1;
const Di = (t, e, r=!1) => (Array.isArray(t) || (t = [t]),
e ? t.map(n => typeof n == "string" || r ? e(n) : n) : t);
class Dae {
    constructor() {
        this._parsers = [],
        this._cache = new Map,
        this._cacheMap = new Map
    }
    reset() {
        this._cacheMap.clear(),
        this._cache.clear()
    }
    has(e) {
        return this._cache.has(e)
    }
    get(e) {
        const r = this._cache.get(e);
        return r || Ne(`[Assets] Asset id ${e} was not found in the Cache`),
        r
    }
    set(e, r) {
        const n = Di(e);
        let i;
        for (let l = 0; l < this.parsers.length; l++) {
            const c = this.parsers[l];
            if (c.test(r)) {
                i = c.getCacheableAssets(n, r);
                break
            }
        }
        const o = new Map(Object.entries(i || {}));
        i || n.forEach(l => {
            o.set(l, r)
        }
        );
        const s = [...o.keys()]
          , a = {
            cacheKeys: s,
            keys: n
        };
        n.forEach(l => {
            this._cacheMap.set(l, a)
        }
        ),
        s.forEach(l => {
            const c = i ? i[l] : r;
            this._cache.has(l) && this._cache.get(l) !== c && Ne("[Cache] already has key:", l),
            this._cache.set(l, o.get(l))
        }
        )
    }
    remove(e) {
        if (!this._cacheMap.has(e)) {
            Ne(`[Assets] Asset id ${e} was not found in the Cache`);
            return
        }
        const r = this._cacheMap.get(e);
        r.cacheKeys.forEach(i => {
            this._cache.delete(i)
        }
        ),
        r.keys.forEach(i => {
            this._cacheMap.delete(i)
        }
        )
    }
    get parsers() {
        return this._parsers
    }
}
const Et = new Dae
  , Yy = [];
$e.handleByList(X.TextureSource, Yy);
function eP(t={}) {
    const e = t && t.resource
      , r = e ? t.resource : t
      , n = e ? t : {
        resource: t
    };
    for (let i = 0; i < Yy.length; i++) {
        const o = Yy[i];
        if (o.test(r))
            return new o(n)
    }
    throw new Error(`Could not find a source type for resource: ${n.resource}`)
}
function Fae(t={}, e=!1) {
    const r = t && t.resource
      , n = r ? t.resource : t
      , i = r ? t : {
        resource: t
    };
    if (!e && Et.has(n))
        return Et.get(n);
    const o = new Be({
        source: eP(i)
    });
    return o.on("destroy", () => {
        Et.has(n) && Et.remove(n)
    }
    ),
    e || Et.set(n, o),
    o
}
function Pae(t, e=!1) {
    return typeof t == "string" ? Et.get(t) : t instanceof Br ? new Be({
        source: t
    }) : Fae(t, e)
}
Be.from = Pae;
Br.from = eP;
$e.add(XF, KF, qF, R0, bl, ho, tb);
var va = (t => (t[t.Low = 0] = "Low",
t[t.Normal = 1] = "Normal",
t[t.High = 2] = "High",
t))(va || {});
function bi(t) {
    if (typeof t != "string")
        throw new TypeError(`Path must be a string. Received ${JSON.stringify(t)}`)
}
function Yu(t) {
    return t.split("?")[0].split("#")[0]
}
function Iae(t) {
    return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
}
function Oae(t, e, r) {
    return t.replace(new RegExp(Iae(e),"g"), r)
}
function kae(t, e) {
    let r = ""
      , n = 0
      , i = -1
      , o = 0
      , s = -1;
    for (let a = 0; a <= t.length; ++a) {
        if (a < t.length)
            s = t.charCodeAt(a);
        else {
            if (s === 47)
                break;
            s = 47
        }
        if (s === 47) {
            if (!(i === a - 1 || o === 1))
                if (i !== a - 1 && o === 2) {
                    if (r.length < 2 || n !== 2 || r.charCodeAt(r.length - 1) !== 46 || r.charCodeAt(r.length - 2) !== 46) {
                        if (r.length > 2) {
                            const l = r.lastIndexOf("/");
                            if (l !== r.length - 1) {
                                l === -1 ? (r = "",
                                n = 0) : (r = r.slice(0, l),
                                n = r.length - 1 - r.lastIndexOf("/")),
                                i = a,
                                o = 0;
                                continue
                            }
                        } else if (r.length === 2 || r.length === 1) {
                            r = "",
                            n = 0,
                            i = a,
                            o = 0;
                            continue
                        }
                    }
                    e && (r.length > 0 ? r += "/.." : r = "..",
                    n = 2)
                } else
                    r.length > 0 ? r += `/${t.slice(i + 1, a)}` : r = t.slice(i + 1, a),
                    n = a - i - 1;
            i = a,
            o = 0
        } else
            s === 46 && o !== -1 ? ++o : o = -1
    }
    return r
}
const Tn = {
    toPosix(t) {
        return Oae(t, "\\", "/")
    },
    isUrl(t) {
        return /^https?:/.test(this.toPosix(t))
    },
    isDataUrl(t) {
        return /^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(t)
    },
    isBlobUrl(t) {
        return t.startsWith("blob:")
    },
    hasProtocol(t) {
        return /^[^/:]+:/.test(this.toPosix(t))
    },
    getProtocol(t) {
        bi(t),
        t = this.toPosix(t);
        const e = /^file:\/\/\//.exec(t);
        if (e)
            return e[0];
        const r = /^[^/:]+:\/{0,2}/.exec(t);
        return r ? r[0] : ""
    },
    toAbsolute(t, e, r) {
        if (bi(t),
        this.isDataUrl(t) || this.isBlobUrl(t))
            return t;
        const n = Yu(this.toPosix(e ?? je.get().getBaseUrl()))
          , i = Yu(this.toPosix(r ?? this.rootname(n)));
        return t = this.toPosix(t),
        t.startsWith("/") ? Tn.join(i, t.slice(1)) : this.isAbsolute(t) ? t : this.join(n, t)
    },
    normalize(t) {
        if (bi(t),
        t.length === 0)
            return ".";
        if (this.isDataUrl(t) || this.isBlobUrl(t))
            return t;
        t = this.toPosix(t);
        let e = "";
        const r = t.startsWith("/");
        this.hasProtocol(t) && (e = this.rootname(t),
        t = t.slice(e.length));
        const n = t.endsWith("/");
        return t = kae(t, !1),
        t.length > 0 && n && (t += "/"),
        r ? `/${t}` : e + t
    },
    isAbsolute(t) {
        return bi(t),
        t = this.toPosix(t),
        this.hasProtocol(t) ? !0 : t.startsWith("/")
    },
    join(...t) {
        if (t.length === 0)
            return ".";
        let e;
        for (let r = 0; r < t.length; ++r) {
            const n = t[r];
            if (bi(n),
            n.length > 0)
                if (e === void 0)
                    e = n;
                else {
                    const i = t[r - 1] ?? "";
                    this.joinExtensions.includes(this.extname(i).toLowerCase()) ? e += `/../${n}` : e += `/${n}`
                }
        }
        return e === void 0 ? "." : this.normalize(e)
    },
    dirname(t) {
        if (bi(t),
        t.length === 0)
            return ".";
        t = this.toPosix(t);
        let e = t.charCodeAt(0);
        const r = e === 47;
        let n = -1
          , i = !0;
        const o = this.getProtocol(t)
          , s = t;
        t = t.slice(o.length);
        for (let a = t.length - 1; a >= 1; --a)
            if (e = t.charCodeAt(a),
            e === 47) {
                if (!i) {
                    n = a;
                    break
                }
            } else
                i = !1;
        return n === -1 ? r ? "/" : this.isUrl(s) ? o + t : o : r && n === 1 ? "//" : o + t.slice(0, n)
    },
    rootname(t) {
        bi(t),
        t = this.toPosix(t);
        let e = "";
        if (t.startsWith("/") ? e = "/" : e = this.getProtocol(t),
        this.isUrl(t)) {
            const r = t.indexOf("/", e.length);
            r !== -1 ? e = t.slice(0, r) : e = t,
            e.endsWith("/") || (e += "/")
        }
        return e
    },
    basename(t, e) {
        bi(t),
        e && bi(e),
        t = Yu(this.toPosix(t));
        let r = 0, n = -1, i = !0, o;
        if (e !== void 0 && e.length > 0 && e.length <= t.length) {
            if (e.length === t.length && e === t)
                return "";
            let s = e.length - 1
              , a = -1;
            for (o = t.length - 1; o >= 0; --o) {
                const l = t.charCodeAt(o);
                if (l === 47) {
                    if (!i) {
                        r = o + 1;
                        break
                    }
                } else
                    a === -1 && (i = !1,
                    a = o + 1),
                    s >= 0 && (l === e.charCodeAt(s) ? --s === -1 && (n = o) : (s = -1,
                    n = a))
            }
            return r === n ? n = a : n === -1 && (n = t.length),
            t.slice(r, n)
        }
        for (o = t.length - 1; o >= 0; --o)
            if (t.charCodeAt(o) === 47) {
                if (!i) {
                    r = o + 1;
                    break
                }
            } else
                n === -1 && (i = !1,
                n = o + 1);
        return n === -1 ? "" : t.slice(r, n)
    },
    extname(t) {
        bi(t),
        t = Yu(this.toPosix(t));
        let e = -1
          , r = 0
          , n = -1
          , i = !0
          , o = 0;
        for (let s = t.length - 1; s >= 0; --s) {
            const a = t.charCodeAt(s);
            if (a === 47) {
                if (!i) {
                    r = s + 1;
                    break
                }
                continue
            }
            n === -1 && (i = !1,
            n = s + 1),
            a === 46 ? e === -1 ? e = s : o !== 1 && (o = 1) : e !== -1 && (o = -1)
        }
        return e === -1 || n === -1 || o === 0 || o === 1 && e === n - 1 && e === r + 1 ? "" : t.slice(e, n)
    },
    parse(t) {
        bi(t);
        const e = {
            root: "",
            dir: "",
            base: "",
            ext: "",
            name: ""
        };
        if (t.length === 0)
            return e;
        t = Yu(this.toPosix(t));
        let r = t.charCodeAt(0);
        const n = this.isAbsolute(t);
        let i;
        e.root = this.rootname(t),
        n || this.hasProtocol(t) ? i = 1 : i = 0;
        let o = -1
          , s = 0
          , a = -1
          , l = !0
          , c = t.length - 1
          , u = 0;
        for (; c >= i; --c) {
            if (r = t.charCodeAt(c),
            r === 47) {
                if (!l) {
                    s = c + 1;
                    break
                }
                continue
            }
            a === -1 && (l = !1,
            a = c + 1),
            r === 46 ? o === -1 ? o = c : u !== 1 && (u = 1) : o !== -1 && (u = -1)
        }
        return o === -1 || a === -1 || u === 0 || u === 1 && o === a - 1 && o === s + 1 ? a !== -1 && (s === 0 && n ? e.base = e.name = t.slice(1, a) : e.base = e.name = t.slice(s, a)) : (s === 0 && n ? (e.name = t.slice(1, o),
        e.base = t.slice(1, a)) : (e.name = t.slice(s, o),
        e.base = t.slice(s, a)),
        e.ext = t.slice(o, a)),
        e.dir = this.dirname(t),
        e
    },
    sep: "/",
    delimiter: ":",
    joinExtensions: [".html"]
};
function tP(t, e, r, n, i) {
    const o = e[r];
    for (let s = 0; s < o.length; s++) {
        const a = o[s];
        r < e.length - 1 ? tP(t.replace(n[r], a), e, r + 1, n, i) : i.push(t.replace(n[r], a))
    }
}
function Rae(t) {
    const e = /\{(.*?)\}/g
      , r = t.match(e)
      , n = [];
    if (r) {
        const i = [];
        r.forEach(o => {
            const s = o.substring(1, o.length - 1).split(",");
            i.push(s)
        }
        ),
        tP(t, i, 0, r, n)
    } else
        n.push(t);
    return n
}
const Ox = t => !Array.isArray(t);
class Au {
    constructor() {
        this._defaultBundleIdentifierOptions = {
            connector: "-",
            createBundleAssetId: (e, r) => `${e}${this._bundleIdConnector}${r}`,
            extractAssetIdFromBundle: (e, r) => r.replace(`${e}${this._bundleIdConnector}`, "")
        },
        this._bundleIdConnector = this._defaultBundleIdentifierOptions.connector,
        this._createBundleAssetId = this._defaultBundleIdentifierOptions.createBundleAssetId,
        this._extractAssetIdFromBundle = this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,
        this._assetMap = {},
        this._preferredOrder = [],
        this._parsers = [],
        this._resolverHash = {},
        this._bundles = {}
    }
    setBundleIdentifier(e) {
        if (this._bundleIdConnector = e.connector ?? this._bundleIdConnector,
        this._createBundleAssetId = e.createBundleAssetId ?? this._createBundleAssetId,
        this._extractAssetIdFromBundle = e.extractAssetIdFromBundle ?? this._extractAssetIdFromBundle,
        this._extractAssetIdFromBundle("foo", this._createBundleAssetId("foo", "bar")) !== "bar")
            throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")
    }
    prefer(...e) {
        e.forEach(r => {
            this._preferredOrder.push(r),
            r.priority || (r.priority = Object.keys(r.params))
        }
        ),
        this._resolverHash = {}
    }
    set basePath(e) {
        this._basePath = e
    }
    get basePath() {
        return this._basePath
    }
    set rootPath(e) {
        this._rootPath = e
    }
    get rootPath() {
        return this._rootPath
    }
    get parsers() {
        return this._parsers
    }
    reset() {
        this.setBundleIdentifier(this._defaultBundleIdentifierOptions),
        this._assetMap = {},
        this._preferredOrder = [],
        this._resolverHash = {},
        this._rootPath = null,
        this._basePath = null,
        this._manifest = null,
        this._bundles = {},
        this._defaultSearchParams = null
    }
    setDefaultSearchParams(e) {
        if (typeof e == "string")
            this._defaultSearchParams = e;
        else {
            const r = e;
            this._defaultSearchParams = Object.keys(r).map(n => `${encodeURIComponent(n)}=${encodeURIComponent(r[n])}`).join("&")
        }
    }
    getAlias(e) {
        const {alias: r, src: n} = e;
        return Di(r || n, o => typeof o == "string" ? o : Array.isArray(o) ? o.map(s => (s == null ? void 0 : s.src) ?? s) : o != null && o.src ? o.src : o, !0)
    }
    addManifest(e) {
        this._manifest && Ne("[Resolver] Manifest already exists, this will be overwritten"),
        this._manifest = e,
        e.bundles.forEach(r => {
            this.addBundle(r.name, r.assets)
        }
        )
    }
    addBundle(e, r) {
        const n = [];
        let i = r;
        Array.isArray(r) || (i = Object.entries(r).map( ([o,s]) => typeof s == "string" || Array.isArray(s) ? {
            alias: o,
            src: s
        } : {
            alias: o,
            ...s
        })),
        i.forEach(o => {
            const s = o.src
              , a = o.alias;
            let l;
            if (typeof a == "string") {
                const c = this._createBundleAssetId(e, a);
                n.push(c),
                l = [a, c]
            } else {
                const c = a.map(u => this._createBundleAssetId(e, u));
                n.push(...c),
                l = [...a, ...c]
            }
            this.add({
                ...o,
                alias: l,
                src: s
            })
        }
        ),
        this._bundles[e] = n
    }
    add(e) {
        const r = [];
        Array.isArray(e) ? r.push(...e) : r.push(e);
        let n;
        n = o => {
            this.hasKey(o) && Ne(`[Resolver] already has key: ${o} overwriting`)
        }
        ,
        Di(r).forEach(o => {
            const {src: s} = o;
            let {data: a, format: l, loadParser: c, parser: u} = o;
            const f = Di(s).map(y => typeof y == "string" ? Rae(y) : Array.isArray(y) ? y : [y])
              , d = this.getAlias(o);
            Array.isArray(d) ? d.forEach(n) : n(d);
            const h = []
              , x = y => {
                const m = this._parsers.find(E => E.test(y));
                return {
                    ...m == null ? void 0 : m.parse(y),
                    src: y
                }
            }
            ;
            f.forEach(y => {
                y.forEach(m => {
                    let E = {};
                    if (typeof m != "object" ? E = x(m) : (a = m.data ?? a,
                    l = m.format ?? l,
                    (m.loadParser || m.parser) && (c = m.loadParser ?? c,
                    u = m.parser ?? u),
                    E = {
                        ...x(m.src),
                        ...m
                    }),
                    !d)
                        throw new Error(`[Resolver] alias is undefined for this asset: ${E.src}`);
                    E = this._buildResolvedAsset(E, {
                        aliases: d,
                        data: a,
                        format: l,
                        loadParser: c,
                        parser: u,
                        progressSize: o.progressSize
                    }),
                    h.push(E)
                }
                )
            }
            ),
            d.forEach(y => {
                this._assetMap[y] = h
            }
            )
        }
        )
    }
    resolveBundle(e) {
        const r = Ox(e);
        e = Di(e);
        const n = {};
        return e.forEach(i => {
            const o = this._bundles[i];
            if (o) {
                const s = this.resolve(o)
                  , a = {};
                for (const l in s) {
                    const c = s[l];
                    a[this._extractAssetIdFromBundle(i, l)] = c
                }
                n[i] = a
            }
        }
        ),
        r ? n[e[0]] : n
    }
    resolveUrl(e) {
        const r = this.resolve(e);
        if (typeof e != "string") {
            const n = {};
            for (const i in r)
                n[i] = r[i].src;
            return n
        }
        return r.src
    }
    resolve(e) {
        const r = Ox(e);
        e = Di(e);
        const n = {};
        return e.forEach(i => {
            if (!this._resolverHash[i])
                if (this._assetMap[i]) {
                    let o = this._assetMap[i];
                    const s = this._getPreferredOrder(o);
                    s == null || s.priority.forEach(a => {
                        s.params[a].forEach(l => {
                            const c = o.filter(u => u[a] ? u[a] === l : !1);
                            c.length && (o = c)
                        }
                        )
                    }
                    ),
                    this._resolverHash[i] = o[0]
                } else
                    this._resolverHash[i] = this._buildResolvedAsset({
                        alias: [i],
                        src: i
                    }, {});
            n[i] = this._resolverHash[i]
        }
        ),
        r ? n[e[0]] : n
    }
    hasKey(e) {
        return !!this._assetMap[e]
    }
    hasBundle(e) {
        return !!this._bundles[e]
    }
    _getPreferredOrder(e) {
        for (let r = 0; r < e.length; r++) {
            const n = e[r]
              , i = this._preferredOrder.find(o => o.params.format.includes(n.format));
            if (i)
                return i
        }
        return this._preferredOrder[0]
    }
    _appendDefaultSearchParams(e) {
        if (!this._defaultSearchParams)
            return e;
        const r = /\?/.test(e) ? "&" : "?";
        return `${e}${r}${this._defaultSearchParams}`
    }
    _buildResolvedAsset(e, r) {
        const {aliases: n, data: i, loadParser: o, parser: s, format: a, progressSize: l} = r;
        return (this._basePath || this._rootPath) && (e.src = Tn.toAbsolute(e.src, this._basePath, this._rootPath)),
        e.alias = n ?? e.alias ?? [e.src],
        e.src = this._appendDefaultSearchParams(e.src),
        e.data = {
            ...i || {},
            ...e.data
        },
        e.loadParser = o ?? e.loadParser,
        e.parser = s ?? e.parser,
        e.format = a ?? e.format ?? Mae(e.src),
        l !== void 0 && (e.progressSize = l),
        e
    }
}
Au.RETINA_PREFIX = /@([0-9\.]+)x/;
function Mae(t) {
    return t.split(".").pop().split("?").shift().split("#").shift()
}
const Xy = (t, e) => {
    const r = e.split("?")[1];
    return r && (t += `?${r}`),
    t
}
  , rP = class f0 {
    constructor(e, r) {
        this.linkedSheets = [];
        let n = e;
        (e == null ? void 0 : e.source)instanceof Br && (n = {
            texture: e,
            data: r
        });
        const {texture: i, data: o, cachePrefix: s=""} = n;
        this.cachePrefix = s,
        this._texture = i instanceof Be ? i : null,
        this.textureSource = i.source,
        this.textures = {},
        this.animations = {},
        this.data = o;
        const a = parseFloat(o.meta.scale);
        a ? (this.resolution = a,
        i.source.resolution = this.resolution) : this.resolution = i.source._resolution,
        this._frames = this.data.frames,
        this._frameKeys = Object.keys(this._frames),
        this._batchIndex = 0,
        this._callback = null
    }
    parse() {
        return new Promise(e => {
            this._callback = e,
            this._batchIndex = 0,
            this._frameKeys.length <= f0.BATCH_SIZE ? (this._processFrames(0),
            this._processAnimations(),
            this._parseComplete()) : this._nextBatch()
        }
        )
    }
    _processFrames(e) {
        let r = e;
        const n = f0.BATCH_SIZE;
        for (; r - e < n && r < this._frameKeys.length; ) {
            const i = this._frameKeys[r]
              , o = this._frames[i]
              , s = o.frame;
            if (s) {
                let a = null
                  , l = null;
                const c = o.trimmed !== !1 && o.sourceSize ? o.sourceSize : o.frame
                  , u = new mt(0,0,Math.floor(c.w) / this.resolution,Math.floor(c.h) / this.resolution);
                o.rotated ? a = new mt(Math.floor(s.x) / this.resolution,Math.floor(s.y) / this.resolution,Math.floor(s.h) / this.resolution,Math.floor(s.w) / this.resolution) : a = new mt(Math.floor(s.x) / this.resolution,Math.floor(s.y) / this.resolution,Math.floor(s.w) / this.resolution,Math.floor(s.h) / this.resolution),
                o.trimmed !== !1 && o.spriteSourceSize && (l = new mt(Math.floor(o.spriteSourceSize.x) / this.resolution,Math.floor(o.spriteSourceSize.y) / this.resolution,Math.floor(s.w) / this.resolution,Math.floor(s.h) / this.resolution)),
                this.textures[i] = new Be({
                    source: this.textureSource,
                    frame: a,
                    orig: u,
                    trim: l,
                    rotate: o.rotated ? 2 : 0,
                    defaultAnchor: o.anchor,
                    defaultBorders: o.borders,
                    label: i.toString()
                })
            }
            r++
        }
    }
    _processAnimations() {
        const e = this.data.animations || {};
        for (const r in e) {
            this.animations[r] = [];
            for (let n = 0; n < e[r].length; n++) {
                const i = e[r][n];
                this.animations[r].push(this.textures[i])
            }
        }
    }
    _parseComplete() {
        const e = this._callback;
        this._callback = null,
        this._batchIndex = 0,
        e.call(this, this.textures)
    }
    _nextBatch() {
        this._processFrames(this._batchIndex * f0.BATCH_SIZE),
        this._batchIndex++,
        setTimeout( () => {
            this._batchIndex * f0.BATCH_SIZE < this._frameKeys.length ? this._nextBatch() : (this._processAnimations(),
            this._parseComplete())
        }
        , 0)
    }
    destroy(e=!1) {
        var r;
        for (const n in this.textures)
            this.textures[n].destroy();
        this._frames = null,
        this._frameKeys = null,
        this.data = null,
        this.textures = null,
        e && ((r = this._texture) == null || r.destroy(),
        this.textureSource.destroy()),
        this._texture = null,
        this.textureSource = null,
        this.linkedSheets = []
    }
}
;
rP.BATCH_SIZE = 1e3;
let uw = rP;
const Nae = ["jpg", "png", "jpeg", "avif", "webp", "basis", "etc2", "bc7", "bc6h", "bc5", "bc4", "bc3", "bc2", "bc1", "eac", "astc"];
function nP(t, e, r) {
    const n = {};
    if (t.forEach(i => {
        n[i] = e
    }
    ),
    Object.keys(e.textures).forEach(i => {
        n[`${e.cachePrefix}${i}`] = e.textures[i]
    }
    ),
    !r) {
        const i = Tn.dirname(t[0]);
        e.linkedSheets.forEach( (o, s) => {
            const a = nP([`${i}/${e.data.meta.related_multi_packs[s]}`], o, !0);
            Object.assign(n, a)
        }
        )
    }
    return n
}
const Lae = {
    extension: X.Asset,
    cache: {
        test: t => t instanceof uw,
        getCacheableAssets: (t, e) => nP(t, e, !1)
    },
    resolver: {
        extension: {
            type: X.ResolveParser,
            name: "resolveSpritesheet"
        },
        test: t => {
            const r = t.split("?")[0].split(".")
              , n = r.pop()
              , i = r.pop();
            return n === "json" && Nae.includes(i)
        }
        ,
        parse: t => {
            var r;
            const e = t.split(".");
            return {
                resolution: parseFloat(((r = Au.RETINA_PREFIX.exec(t)) == null ? void 0 : r[1]) ?? "1"),
                format: e[e.length - 2],
                src: t
            }
        }
    },
    loader: {
        name: "spritesheetLoader",
        id: "spritesheet",
        extension: {
            type: X.LoadParser,
            priority: va.Normal,
            name: "spritesheetLoader"
        },
        async testParse(t, e) {
            return Tn.extname(e.src).toLowerCase() === ".json" && !!t.frames
        },
        async parse(t, e, r) {
            var f, d;
            const {texture: n, imageFilename: i, textureOptions: o, cachePrefix: s} = (e == null ? void 0 : e.data) ?? {};
            let a = Tn.dirname(e.src);
            a && a.lastIndexOf("/") !== a.length - 1 && (a += "/");
            let l;
            if (n instanceof Be)
                l = n;
            else {
                const h = Xy(a + (i ?? t.meta.image), e.src);
                l = (await r.load([{
                    src: h,
                    data: o
                }]))[h]
            }
            const c = new uw({
                texture: l.source,
                data: t,
                cachePrefix: s
            });
            await c.parse();
            const u = (f = t == null ? void 0 : t.meta) == null ? void 0 : f.related_multi_packs;
            if (Array.isArray(u)) {
                const h = [];
                for (const y of u) {
                    if (typeof y != "string")
                        continue;
                    let m = a + y;
                    (d = e.data) != null && d.ignoreMultiPack || (m = Xy(m, e.src),
                    h.push(r.load({
                        src: m,
                        data: {
                            textureOptions: o,
                            ignoreMultiPack: !0
                        }
                    })))
                }
                const x = await Promise.all(h);
                c.linkedSheets = x,
                x.forEach(y => {
                    y.linkedSheets = [c].concat(c.linkedSheets.filter(m => m !== y))
                }
                )
            }
            return c
        },
        async unload(t, e, r) {
            await r.unload(t.textureSource._sourceOrigin),
            t.destroy(!1)
        }
    }
};
$e.add(Lae);
class iP {
    constructor(e) {
        this._lastTransform = "",
        this._observer = null,
        this._tickerAttached = !1,
        this.updateTranslation = () => {
            if (!this._canvas)
                return;
            const r = this._canvas.getBoundingClientRect()
              , n = this._canvas.width
              , i = this._canvas.height
              , o = r.width / n * this._renderer.resolution
              , s = r.height / i * this._renderer.resolution
              , a = r.left
              , l = r.top
              , c = `translate(${a}px, ${l}px) scale(${o}, ${s})`;
            c !== this._lastTransform && (this._domElement.style.transform = c,
            this._lastTransform = c)
        }
        ,
        this._domElement = e.domElement,
        this._renderer = e.renderer,
        !(globalThis.OffscreenCanvas && this._renderer.canvas instanceof OffscreenCanvas) && (this._canvas = this._renderer.canvas,
        this._attachObserver())
    }
    get canvas() {
        return this._canvas
    }
    ensureAttached() {
        !this._domElement.parentNode && this._canvas.parentNode && (this._canvas.parentNode.appendChild(this._domElement),
        this.updateTranslation())
    }
    _attachObserver() {
        "ResizeObserver"in globalThis ? (this._observer && (this._observer.disconnect(),
        this._observer = null),
        this._observer = new ResizeObserver(e => {
            for (const r of e) {
                if (r.target !== this._canvas)
                    continue;
                const n = this.canvas.width
                  , i = this.canvas.height
                  , o = r.contentRect.width / n * this._renderer.resolution
                  , s = r.contentRect.height / i * this._renderer.resolution;
                (this._lastScaleX !== o || this._lastScaleY !== s) && (this.updateTranslation(),
                this._lastScaleX = o,
                this._lastScaleY = s)
            }
        }
        ),
        this._observer.observe(this._canvas)) : this._tickerAttached || Gr.shared.add(this.updateTranslation, this, Cl.HIGH)
    }
    destroy() {
        this._observer ? (this._observer.disconnect(),
        this._observer = null) : this._tickerAttached && Gr.shared.remove(this.updateTranslation),
        this._domElement = null,
        this._renderer = null,
        this._canvas = null,
        this._tickerAttached = !1,
        this._lastTransform = "",
        this._lastScaleX = null,
        this._lastScaleY = null
    }
}
class nd {
    constructor(e) {
        this.bubbles = !0,
        this.cancelBubble = !0,
        this.cancelable = !1,
        this.composed = !1,
        this.defaultPrevented = !1,
        this.eventPhase = nd.prototype.NONE,
        this.propagationStopped = !1,
        this.propagationImmediatelyStopped = !1,
        this.layer = new Gt,
        this.page = new Gt,
        this.NONE = 0,
        this.CAPTURING_PHASE = 1,
        this.AT_TARGET = 2,
        this.BUBBLING_PHASE = 3,
        this.manager = e
    }
    get layerX() {
        return this.layer.x
    }
    get layerY() {
        return this.layer.y
    }
    get pageX() {
        return this.page.x
    }
    get pageY() {
        return this.page.y
    }
    get data() {
        return this
    }
    composedPath() {
        return this.manager && (!this.path || this.path[this.path.length - 1] !== this.target) && (this.path = this.target ? this.manager.propagationPath(this.target) : []),
        this.path
    }
    initEvent(e, r, n) {
        throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")
    }
    initUIEvent(e, r, n, i, o) {
        throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")
    }
    preventDefault() {
        this.nativeEvent instanceof Event && this.nativeEvent.cancelable && this.nativeEvent.preventDefault(),
        this.defaultPrevented = !0
    }
    stopImmediatePropagation() {
        this.propagationImmediatelyStopped = !0
    }
    stopPropagation() {
        this.propagationStopped = !0
    }
}
var Ig = /iPhone/i
  , fw = /iPod/i
  , dw = /iPad/i
  , hw = /\biOS-universal(?:.+)Mac\b/i
  , Og = /\bAndroid(?:.+)Mobile\b/i
  , xw = /Android/i
  , ic = /(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i
  , lh = /Silk/i
  , Ro = /Windows Phone/i
  , pw = /\bWindows(?:.+)ARM\b/i
  , gw = /BlackBerry/i
  , mw = /BB10/i
  , vw = /Opera Mini/i
  , yw = /\b(CriOS|Chrome)(?:.+)Mobile/i
  , Ew = /Mobile(?:.+)Firefox\b/i
  , _w = function(t) {
    return typeof t < "u" && t.platform === "MacIntel" && typeof t.maxTouchPoints == "number" && t.maxTouchPoints > 1 && typeof MSStream > "u"
};
function $ae(t) {
    return function(e) {
        return e.test(t)
    }
}
function bw(t) {
    var e = {
        userAgent: "",
        platform: "",
        maxTouchPoints: 0
    };
    !t && typeof navigator < "u" ? e = {
        userAgent: navigator.userAgent,
        platform: navigator.platform,
        maxTouchPoints: navigator.maxTouchPoints || 0
    } : typeof t == "string" ? e.userAgent = t : t && t.userAgent && (e = {
        userAgent: t.userAgent,
        platform: t.platform,
        maxTouchPoints: t.maxTouchPoints || 0
    });
    var r = e.userAgent
      , n = r.split("[FBAN");
    typeof n[1] < "u" && (r = n[0]),
    n = r.split("Twitter"),
    typeof n[1] < "u" && (r = n[0]);
    var i = $ae(r)
      , o = {
        apple: {
            phone: i(Ig) && !i(Ro),
            ipod: i(fw),
            tablet: !i(Ig) && (i(dw) || _w(e)) && !i(Ro),
            universal: i(hw),
            device: (i(Ig) || i(fw) || i(dw) || i(hw) || _w(e)) && !i(Ro)
        },
        amazon: {
            phone: i(ic),
            tablet: !i(ic) && i(lh),
            device: i(ic) || i(lh)
        },
        android: {
            phone: !i(Ro) && i(ic) || !i(Ro) && i(Og),
            tablet: !i(Ro) && !i(ic) && !i(Og) && (i(lh) || i(xw)),
            device: !i(Ro) && (i(ic) || i(lh) || i(Og) || i(xw)) || i(/\bokhttp\b/i)
        },
        windows: {
            phone: i(Ro),
            tablet: i(pw),
            device: i(Ro) || i(pw)
        },
        other: {
            blackberry: i(gw),
            blackberry10: i(mw),
            opera: i(vw),
            firefox: i(Ew),
            chrome: i(yw),
            device: i(gw) || i(mw) || i(vw) || i(Ew) || i(yw)
        },
        any: !1,
        phone: !1,
        tablet: !1
    };
    return o.any = o.apple.device || o.android.device || o.windows.device || o.other.device,
    o.phone = o.apple.phone || o.android.phone || o.windows.phone,
    o.tablet = o.apple.tablet || o.android.tablet || o.windows.tablet,
    o
}
const Uae = bw.default ?? bw
  , Gae = Uae(globalThis.navigator)
  , Hae = 9
  , Cw = 100
  , Vae = 0
  , zae = 0
  , Aw = 2
  , ww = 1
  , jae = -1e3
  , Wae = -1e3
  , Yae = 2
  , sb = class oP {
    constructor(e, r=Gae) {
        this._mobileInfo = r,
        this.debug = !1,
        this._activateOnTab = !0,
        this._deactivateOnMouseMove = !0,
        this._isActive = !1,
        this._isMobileAccessibility = !1,
        this._div = null,
        this._pools = {},
        this._renderId = 0,
        this._children = [],
        this._androidUpdateCount = 0,
        this._androidUpdateFrequency = 500,
        this._isRunningTests = !1,
        this._boundOnKeyDown = this._onKeyDown.bind(this),
        this._boundOnMouseMove = this._onMouseMove.bind(this),
        this._hookDiv = null,
        (r.tablet || r.phone) && this._createTouchHook(),
        this._renderer = e
    }
    get isActive() {
        return this._isActive
    }
    get isMobileAccessibility() {
        return this._isMobileAccessibility
    }
    get hookDiv() {
        return this._hookDiv
    }
    get div() {
        return this._div
    }
    _createTouchHook() {
        const e = document.createElement("button");
        e.style.width = `${ww}px`,
        e.style.height = `${ww}px`,
        e.style.position = "absolute",
        e.style.top = `${jae}px`,
        e.style.left = `${Wae}px`,
        e.style.zIndex = Yae.toString(),
        e.style.backgroundColor = "#FF0000",
        e.title = "select to enable accessibility for this content",
        e.addEventListener("focus", () => {
            this._isMobileAccessibility = !0,
            this._activate(),
            this._destroyTouchHook()
        }
        ),
        document.body.appendChild(e),
        this._hookDiv = e
    }
    _destroyTouchHook() {
        this._hookDiv && (document.body.removeChild(this._hookDiv),
        this._hookDiv = null)
    }
    _activate() {
        if (this._isActive)
            return;
        this._isActive = !0,
        this._div || (this._div = document.createElement("div"),
        this._div.style.position = "absolute",
        this._div.style.top = `${Vae}px`,
        this._div.style.left = `${zae}px`,
        this._div.style.pointerEvents = "none",
        this._div.style.zIndex = Aw.toString(),
        this._canvasObserver = new iP({
            domElement: this._div,
            renderer: this._renderer
        })),
        this._activateOnTab && globalThis.addEventListener("keydown", this._boundOnKeyDown, !1),
        this._deactivateOnMouseMove && globalThis.document.addEventListener("mousemove", this._boundOnMouseMove, !0);
        const e = this._renderer.view.canvas;
        if (e.parentNode)
            this._canvasObserver.ensureAttached(),
            this._initAccessibilitySetup();
        else {
            const r = new MutationObserver( () => {
                e.parentNode && (r.disconnect(),
                this._canvasObserver.ensureAttached(),
                this._initAccessibilitySetup())
            }
            );
            r.observe(document.body, {
                childList: !0,
                subtree: !0
            })
        }
    }
    _initAccessibilitySetup() {
        this._renderer.runners.postrender.add(this),
        this._renderer.lastObjectRendered && this._updateAccessibleObjects(this._renderer.lastObjectRendered)
    }
    _deactivate() {
        var e, r;
        if (!(!this._isActive || this._isMobileAccessibility)) {
            this._isActive = !1,
            globalThis.document.removeEventListener("mousemove", this._boundOnMouseMove, !0),
            this._activateOnTab && globalThis.addEventListener("keydown", this._boundOnKeyDown, !1),
            this._renderer.runners.postrender.remove(this);
            for (const n of this._children)
                (e = n._accessibleDiv) != null && e.parentNode && (n._accessibleDiv.parentNode.removeChild(n._accessibleDiv),
                n._accessibleDiv = null),
                n._accessibleActive = !1;
            for (const n in this._pools)
                this._pools[n].forEach(o => {
                    o.parentNode && o.parentNode.removeChild(o)
                }
                ),
                delete this._pools[n];
            (r = this._div) != null && r.parentNode && this._div.parentNode.removeChild(this._div),
            this._pools = {},
            this._children = []
        }
    }
    _updateAccessibleObjects(e) {
        if (!e.visible || !e.accessibleChildren)
            return;
        e.accessible && (e._accessibleActive || this._addChild(e),
        e._renderId = this._renderId);
        const r = e.children;
        if (r)
            for (let n = 0; n < r.length; n++)
                this._updateAccessibleObjects(r[n])
    }
    init(e) {
        const n = {
            accessibilityOptions: {
                ...oP.defaultOptions,
                ...(e == null ? void 0 : e.accessibilityOptions) || {}
            }
        };
        this.debug = n.accessibilityOptions.debug,
        this._activateOnTab = n.accessibilityOptions.activateOnTab,
        this._deactivateOnMouseMove = n.accessibilityOptions.deactivateOnMouseMove,
        n.accessibilityOptions.enabledByDefault && this._activate(),
        this._renderer.runners.postrender.remove(this)
    }
    postrender() {
        const e = performance.now();
        if (this._mobileInfo.android.device && e < this._androidUpdateCount || (this._androidUpdateCount = e + this._androidUpdateFrequency,
        (!this._renderer.renderingToScreen || !this._renderer.view.canvas) && !this._isRunningTests))
            return;
        const r = new Set;
        if (this._renderer.lastObjectRendered) {
            this._updateAccessibleObjects(this._renderer.lastObjectRendered);
            for (const n of this._children)
                n._renderId === this._renderId && r.add(this._children.indexOf(n))
        }
        for (let n = this._children.length - 1; n >= 0; n--) {
            const i = this._children[n];
            r.has(n) || (i._accessibleDiv && i._accessibleDiv.parentNode && (i._accessibleDiv.parentNode.removeChild(i._accessibleDiv),
            this._getPool(i.accessibleType).push(i._accessibleDiv),
            i._accessibleDiv = null),
            i._accessibleActive = !1,
            $F(this._children, n, 1))
        }
        this._renderer.renderingToScreen && this._canvasObserver.ensureAttached();
        for (let n = 0; n < this._children.length; n++) {
            const i = this._children[n];
            if (!i._accessibleActive || !i._accessibleDiv)
                continue;
            const o = i._accessibleDiv
              , s = i.hitArea || i.getBounds().rectangle;
            if (i.hitArea) {
                const a = i.worldTransform;
                o.style.left = `${a.tx + s.x * a.a}px`,
                o.style.top = `${a.ty + s.y * a.d}px`,
                o.style.width = `${s.width * a.a}px`,
                o.style.height = `${s.height * a.d}px`
            } else
                this._capHitArea(s),
                o.style.left = `${s.x}px`,
                o.style.top = `${s.y}px`,
                o.style.width = `${s.width}px`,
                o.style.height = `${s.height}px`
        }
        this._renderId++
    }
    _updateDebugHTML(e) {
        e.innerHTML = `type: ${e.type}</br> title : ${e.title}</br> tabIndex: ${e.tabIndex}`
    }
    _capHitArea(e) {
        e.x < 0 && (e.width += e.x,
        e.x = 0),
        e.y < 0 && (e.height += e.y,
        e.y = 0);
        const {width: r, height: n} = this._renderer;
        e.x + e.width > r && (e.width = r - e.x),
        e.y + e.height > n && (e.height = n - e.y)
    }
    _addChild(e) {
        let n = this._getPool(e.accessibleType).pop();
        n ? (n.innerHTML = "",
        n.removeAttribute("title"),
        n.removeAttribute("aria-label"),
        n.tabIndex = 0) : (e.accessibleType === "button" ? n = document.createElement("button") : (n = document.createElement(e.accessibleType),
        n.style.cssText = `
                        color: transparent;
                        pointer-events: none;
                        padding: 0;
                        margin: 0;
                        border: 0;
                        outline: 0;
                        background: transparent;
                        box-sizing: border-box;
                        user-select: none;
                        -webkit-user-select: none;
                        -moz-user-select: none;
                        -ms-user-select: none;
                    `,
        e.accessibleText && (n.innerText = e.accessibleText)),
        n.style.width = `${Cw}px`,
        n.style.height = `${Cw}px`,
        n.style.backgroundColor = this.debug ? "rgba(255,255,255,0.5)" : "transparent",
        n.style.position = "absolute",
        n.style.zIndex = Aw.toString(),
        n.style.borderStyle = "none",
        navigator.userAgent.toLowerCase().includes("chrome") ? n.setAttribute("aria-live", "off") : n.setAttribute("aria-live", "polite"),
        navigator.userAgent.match(/rv:.*Gecko\//) ? n.setAttribute("aria-relevant", "additions") : n.setAttribute("aria-relevant", "text"),
        n.addEventListener("click", this._onClick.bind(this)),
        n.addEventListener("focus", this._onFocus.bind(this)),
        n.addEventListener("focusout", this._onFocusOut.bind(this))),
        n.style.pointerEvents = e.accessiblePointerEvents,
        n.type = e.accessibleType,
        e.accessibleTitle && e.accessibleTitle !== null ? n.title = e.accessibleTitle : (!e.accessibleHint || e.accessibleHint === null) && (n.title = `container ${e.tabIndex}`),
        e.accessibleHint && e.accessibleHint !== null && n.setAttribute("aria-label", e.accessibleHint),
        e.interactive ? n.tabIndex = e.tabIndex : n.tabIndex = 0,
        this.debug && this._updateDebugHTML(n),
        e._accessibleActive = !0,
        e._accessibleDiv = n,
        n.container = e,
        this._children.push(e),
        this._div.appendChild(e._accessibleDiv)
    }
    _dispatchEvent(e, r) {
        const {container: n} = e.target
          , i = this._renderer.events.rootBoundary
          , o = Object.assign(new nd(i), {
            target: n
        });
        i.rootTarget = this._renderer.lastObjectRendered,
        r.forEach(s => i.dispatchEvent(o, s))
    }
    _onClick(e) {
        this._dispatchEvent(e, ["click", "pointertap", "tap"])
    }
    _onFocus(e) {
        e.target.getAttribute("aria-live") || e.target.setAttribute("aria-live", "assertive"),
        this._dispatchEvent(e, ["mouseover"])
    }
    _onFocusOut(e) {
        e.target.getAttribute("aria-live") || e.target.setAttribute("aria-live", "polite"),
        this._dispatchEvent(e, ["mouseout"])
    }
    _onKeyDown(e) {
        e.keyCode !== Hae || !this._activateOnTab || this._activate()
    }
    _onMouseMove(e) {
        e.movementX === 0 && e.movementY === 0 || this._deactivate()
    }
    destroy() {
        var e;
        this._deactivate(),
        this._destroyTouchHook(),
        (e = this._canvasObserver) == null || e.destroy(),
        this._canvasObserver = null,
        this._div = null,
        this._pools = null,
        this._children = null,
        this._renderer = null,
        this._hookDiv = null,
        globalThis.removeEventListener("keydown", this._boundOnKeyDown),
        this._boundOnKeyDown = null,
        globalThis.document.removeEventListener("mousemove", this._boundOnMouseMove, !0),
        this._boundOnMouseMove = null
    }
    setAccessibilityEnabled(e) {
        e ? this._activate() : this._deactivate()
    }
    _getPool(e) {
        return this._pools[e] || (this._pools[e] = []),
        this._pools[e]
    }
}
;
sb.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem],
    name: "accessibility"
};
sb.defaultOptions = {
    enabledByDefault: !1,
    debug: !1,
    activateOnTab: !0,
    deactivateOnMouseMove: !0
};
let Xae = sb;
const Kae = {
    accessible: !1,
    accessibleTitle: null,
    accessibleHint: null,
    tabIndex: 0,
    accessibleType: "button",
    accessibleText: null,
    accessiblePointerEvents: "auto",
    accessibleChildren: !0,
    _accessibleActive: !1,
    _accessibleDiv: null,
    _renderId: -1
}
  , kg = Object.create(null)
  , Bw = Object.create(null);
function yf(t, e) {
    let r = Bw[t];
    return r === void 0 && (kg[e] === void 0 && (kg[e] = 1),
    Bw[t] = r = kg[e]++),
    r
}
let oc;
function sP() {
    return (!oc || oc != null && oc.isContextLost()) && (oc = je.get().createCanvas().getContext("webgl", {})),
    oc
}
let ch;
function qae() {
    if (!ch) {
        ch = "mediump";
        const t = sP();
        t && t.getShaderPrecisionFormat && (ch = t.getShaderPrecisionFormat(t.FRAGMENT_SHADER, t.HIGH_FLOAT).precision ? "highp" : "mediump")
    }
    return ch
}
function Zae(t, e, r) {
    return e ? t : r ? (t = t.replace("out vec4 finalColor;", ""),
    `

        #ifdef GL_ES // This checks if it is WebGL1
        #define in varying
        #define finalColor gl_FragColor
        #define texture texture2D
        #endif
        ${t}
        `) : `

        #ifdef GL_ES // This checks if it is WebGL1
        #define in attribute
        #define out varying
        #endif
        ${t}
        `
}
function Jae(t, e, r) {
    const n = r ? e.maxSupportedFragmentPrecision : e.maxSupportedVertexPrecision;
    if (t.substring(0, 9) !== "precision") {
        let i = r ? e.requestedFragmentPrecision : e.requestedVertexPrecision;
        return i === "highp" && n !== "highp" && (i = "mediump"),
        `precision ${i} float;
${t}`
    } else if (n !== "highp" && t.substring(0, 15) === "precision highp")
        return t.replace("precision highp", "precision mediump");
    return t
}
function Qae(t, e) {
    return e ? `#version 300 es
${t}` : t
}
const ele = {}
  , tle = {};
function rle(t, {name: e="pixi-program"}, r=!0) {
    e = e.replace(/\s+/g, "-"),
    e += r ? "-fragment" : "-vertex";
    const n = r ? ele : tle;
    return n[e] ? (n[e]++,
    e += `-${n[e]}`) : n[e] = 1,
    t.indexOf("#define SHADER_NAME") !== -1 ? t : `${`#define SHADER_NAME ${e}`}
${t}`
}
function nle(t, e) {
    return e ? t.replace("#version 300 es", "") : t
}
const Rg = {
    stripVersion: nle,
    ensurePrecision: Jae,
    addProgramDefines: Zae,
    setProgramName: rle,
    insertVersion: Qae
}
  , Xu = Object.create(null)
  , aP = class Ky {
    constructor(e) {
        e = {
            ...Ky.defaultOptions,
            ...e
        };
        const r = e.fragment.indexOf("#version 300 es") !== -1
          , n = {
            stripVersion: r,
            ensurePrecision: {
                requestedFragmentPrecision: e.preferredFragmentPrecision,
                requestedVertexPrecision: e.preferredVertexPrecision,
                maxSupportedVertexPrecision: "highp",
                maxSupportedFragmentPrecision: qae()
            },
            setProgramName: {
                name: e.name
            },
            addProgramDefines: r,
            insertVersion: r
        };
        let i = e.fragment
          , o = e.vertex;
        Object.keys(Rg).forEach(s => {
            const a = n[s];
            i = Rg[s](i, a, !0),
            o = Rg[s](o, a, !1)
        }
        ),
        this.fragment = i,
        this.vertex = o,
        this.transformFeedbackVaryings = e.transformFeedbackVaryings,
        this._key = yf(`${this.vertex}:${this.fragment}`, "gl-program")
    }
    destroy() {
        this.fragment = null,
        this.vertex = null,
        this._attributeData = null,
        this._uniformData = null,
        this._uniformBlockData = null,
        this.transformFeedbackVaryings = null,
        Xu[this._cacheKey] = null
    }
    static from(e) {
        const r = `${e.vertex}:${e.fragment}`;
        return Xu[r] || (Xu[r] = new Ky(e),
        Xu[r]._cacheKey = r),
        Xu[r]
    }
}
;
aP.defaultOptions = {
    preferredVertexPrecision: "highp",
    preferredFragmentPrecision: "mediump"
};
let ya = aP;
const Sw = {
    uint8x2: {
        size: 2,
        stride: 2,
        normalised: !1
    },
    uint8x4: {
        size: 4,
        stride: 4,
        normalised: !1
    },
    sint8x2: {
        size: 2,
        stride: 2,
        normalised: !1
    },
    sint8x4: {
        size: 4,
        stride: 4,
        normalised: !1
    },
    unorm8x2: {
        size: 2,
        stride: 2,
        normalised: !0
    },
    unorm8x4: {
        size: 4,
        stride: 4,
        normalised: !0
    },
    snorm8x2: {
        size: 2,
        stride: 2,
        normalised: !0
    },
    snorm8x4: {
        size: 4,
        stride: 4,
        normalised: !0
    },
    uint16x2: {
        size: 2,
        stride: 4,
        normalised: !1
    },
    uint16x4: {
        size: 4,
        stride: 8,
        normalised: !1
    },
    sint16x2: {
        size: 2,
        stride: 4,
        normalised: !1
    },
    sint16x4: {
        size: 4,
        stride: 8,
        normalised: !1
    },
    unorm16x2: {
        size: 2,
        stride: 4,
        normalised: !0
    },
    unorm16x4: {
        size: 4,
        stride: 8,
        normalised: !0
    },
    snorm16x2: {
        size: 2,
        stride: 4,
        normalised: !0
    },
    snorm16x4: {
        size: 4,
        stride: 8,
        normalised: !0
    },
    float16x2: {
        size: 2,
        stride: 4,
        normalised: !1
    },
    float16x4: {
        size: 4,
        stride: 8,
        normalised: !1
    },
    float32: {
        size: 1,
        stride: 4,
        normalised: !1
    },
    float32x2: {
        size: 2,
        stride: 8,
        normalised: !1
    },
    float32x3: {
        size: 3,
        stride: 12,
        normalised: !1
    },
    float32x4: {
        size: 4,
        stride: 16,
        normalised: !1
    },
    uint32: {
        size: 1,
        stride: 4,
        normalised: !1
    },
    uint32x2: {
        size: 2,
        stride: 8,
        normalised: !1
    },
    uint32x3: {
        size: 3,
        stride: 12,
        normalised: !1
    },
    uint32x4: {
        size: 4,
        stride: 16,
        normalised: !1
    },
    sint32: {
        size: 1,
        stride: 4,
        normalised: !1
    },
    sint32x2: {
        size: 2,
        stride: 8,
        normalised: !1
    },
    sint32x3: {
        size: 3,
        stride: 12,
        normalised: !1
    },
    sint32x4: {
        size: 4,
        stride: 16,
        normalised: !1
    }
};
function fa(t) {
    return Sw[t] ?? Sw.float32
}
const ile = {
    f32: "float32",
    "vec2<f32>": "float32x2",
    "vec3<f32>": "float32x3",
    "vec4<f32>": "float32x4",
    vec2f: "float32x2",
    vec3f: "float32x3",
    vec4f: "float32x4",
    i32: "sint32",
    "vec2<i32>": "sint32x2",
    "vec3<i32>": "sint32x3",
    "vec4<i32>": "sint32x4",
    u32: "uint32",
    "vec2<u32>": "uint32x2",
    "vec3<u32>": "uint32x3",
    "vec4<u32>": "uint32x4",
    bool: "uint32",
    "vec2<bool>": "uint32x2",
    "vec3<bool>": "uint32x3",
    "vec4<bool>": "uint32x4"
};
function ole({source: t, entryPoint: e}) {
    const r = {}
      , n = t.indexOf(`fn ${e}`);
    if (n !== -1) {
        const i = t.indexOf("->", n);
        if (i !== -1) {
            const o = t.substring(n, i)
              , s = /@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|$)/g;
            let a;
            for (; (a = s.exec(o)) !== null; ) {
                const l = ile[a[3]] ?? "float32";
                r[a[2]] = {
                    location: parseInt(a[1], 10),
                    format: l,
                    stride: fa(l).stride,
                    offset: 0,
                    instance: !1,
                    start: 0
                }
            }
        }
    }
    return r
}
function Mg(t) {
    var f, d;
    const e = /(^|[^/])@(group|binding)\(\d+\)[^;]+;/g
      , r = /@group\((\d+)\)/
      , n = /@binding\((\d+)\)/
      , i = /var(<[^>]+>)? (\w+)/
      , o = /:\s*(\w+)/
      , s = /struct\s+(\w+)\s*{([^}]+)}/g
      , a = /(\w+)\s*:\s*([\w\<\>]+)/g
      , l = /struct\s+(\w+)/
      , c = (f = t.match(e)) == null ? void 0 : f.map(h => ({
        group: parseInt(h.match(r)[1], 10),
        binding: parseInt(h.match(n)[1], 10),
        name: h.match(i)[2],
        isUniform: h.match(i)[1] === "<uniform>",
        type: h.match(o)[1]
    }));
    if (!c)
        return {
            groups: [],
            structs: []
        };
    const u = ((d = t.match(s)) == null ? void 0 : d.map(h => {
        const x = h.match(l)[1]
          , y = h.match(a).reduce( (m, E) => {
            const [g,p] = E.split(":");
            return m[g.trim()] = p.trim(),
            m
        }
        , {});
        return y ? {
            name: x,
            members: y
        } : null
    }
    ).filter( ({name: h}) => c.some(x => x.type === h))) ?? [];
    return {
        groups: c,
        structs: u
    }
}
var d0 = (t => (t[t.VERTEX = 1] = "VERTEX",
t[t.FRAGMENT = 2] = "FRAGMENT",
t[t.COMPUTE = 4] = "COMPUTE",
t))(d0 || {});
function sle({groups: t}) {
    const e = [];
    for (let r = 0; r < t.length; r++) {
        const n = t[r];
        e[n.group] || (e[n.group] = []),
        n.isUniform ? e[n.group].push({
            binding: n.binding,
            visibility: d0.VERTEX | d0.FRAGMENT,
            buffer: {
                type: "uniform"
            }
        }) : n.type === "sampler" ? e[n.group].push({
            binding: n.binding,
            visibility: d0.FRAGMENT,
            sampler: {
                type: "filtering"
            }
        }) : n.type === "texture_2d" && e[n.group].push({
            binding: n.binding,
            visibility: d0.FRAGMENT,
            texture: {
                sampleType: "float",
                viewDimension: "2d",
                multisampled: !1
            }
        })
    }
    return e
}
function ale({groups: t}) {
    const e = [];
    for (let r = 0; r < t.length; r++) {
        const n = t[r];
        e[n.group] || (e[n.group] = {}),
        e[n.group][n.name] = n.binding
    }
    return e
}
function lle(t, e) {
    const r = new Set
      , n = new Set
      , i = [...t.structs, ...e.structs].filter(s => r.has(s.name) ? !1 : (r.add(s.name),
    !0))
      , o = [...t.groups, ...e.groups].filter(s => {
        const a = `${s.name}-${s.binding}`;
        return n.has(a) ? !1 : (n.add(a),
        !0)
    }
    );
    return {
        structs: i,
        groups: o
    }
}
const Ku = Object.create(null);
class Es {
    constructor(e) {
        var a, l;
        this._layoutKey = 0,
        this._attributeLocationsKey = 0;
        const {fragment: r, vertex: n, layout: i, gpuLayout: o, name: s} = e;
        if (this.name = s,
        this.fragment = r,
        this.vertex = n,
        r.source === n.source) {
            const c = Mg(r.source);
            this.structsAndGroups = c
        } else {
            const c = Mg(n.source)
              , u = Mg(r.source);
            this.structsAndGroups = lle(c, u)
        }
        this.layout = i ?? ale(this.structsAndGroups),
        this.gpuLayout = o ?? sle(this.structsAndGroups),
        this.autoAssignGlobalUniforms = ((a = this.layout[0]) == null ? void 0 : a.globalUniforms) !== void 0,
        this.autoAssignLocalUniforms = ((l = this.layout[1]) == null ? void 0 : l.localUniforms) !== void 0,
        this._generateProgramKey()
    }
    _generateProgramKey() {
        const {vertex: e, fragment: r} = this
          , n = e.source + r.source + e.entryPoint + r.entryPoint;
        this._layoutKey = yf(n, "program")
    }
    get attributeData() {
        return this._attributeData ?? (this._attributeData = ole(this.vertex)),
        this._attributeData
    }
    destroy() {
        this.gpuLayout = null,
        this.layout = null,
        this.structsAndGroups = null,
        this.fragment = null,
        this.vertex = null,
        Ku[this._cacheKey] = null
    }
    static from(e) {
        const r = `${e.vertex.source}:${e.fragment.source}:${e.fragment.entryPoint}:${e.vertex.entryPoint}`;
        return Ku[r] || (Ku[r] = new Es(e),
        Ku[r]._cacheKey = r),
        Ku[r]
    }
}
const lP = ["f32", "i32", "vec2<f32>", "vec3<f32>", "vec4<f32>", "mat2x2<f32>", "mat3x3<f32>", "mat4x4<f32>", "mat3x2<f32>", "mat4x2<f32>", "mat2x3<f32>", "mat4x3<f32>", "mat2x4<f32>", "mat3x4<f32>", "vec2<i32>", "vec3<i32>", "vec4<i32>"]
  , cle = lP.reduce( (t, e) => (t[e] = !0,
t), {});
function ule(t, e) {
    switch (t) {
    case "f32":
        return 0;
    case "vec2<f32>":
        return new Float32Array(2 * e);
    case "vec3<f32>":
        return new Float32Array(3 * e);
    case "vec4<f32>":
        return new Float32Array(4 * e);
    case "mat2x2<f32>":
        return new Float32Array([1, 0, 0, 1]);
    case "mat3x3<f32>":
        return new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]);
    case "mat4x4<f32>":
        return new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1])
    }
    return null
}
const cP = class uP {
    constructor(e, r) {
        this._touched = 0,
        this.uid = Tt("uniform"),
        this._resourceType = "uniformGroup",
        this._resourceId = Tt("resource"),
        this.isUniformGroup = !0,
        this._dirtyId = 0,
        this.destroyed = !1,
        r = {
            ...uP.defaultOptions,
            ...r
        },
        this.uniformStructures = e;
        const n = {};
        for (const i in e) {
            const o = e[i];
            if (o.name = i,
            o.size = o.size ?? 1,
            !cle[o.type]) {
                const s = o.type.match(/^array<(\w+(?:<\w+>)?),\s*(\d+)>$/);
                if (s) {
                    const [,a,l] = s;
                    throw new Error(`Uniform type ${o.type} is not supported. Use type: '${a}', size: ${l} instead.`)
                }
                throw new Error(`Uniform type ${o.type} is not supported. Supported uniform types are: ${lP.join(", ")}`)
            }
            o.value ?? (o.value = ule(o.type, o.size)),
            n[i] = o.value
        }
        this.uniforms = n,
        this._dirtyId = 1,
        this.ubo = r.ubo,
        this.isStatic = r.isStatic,
        this._signature = yf(Object.keys(n).map(i => `${i}-${e[i].type}`).join("-"), "uniform-group")
    }
    update() {
        this._dirtyId++
    }
}
;
cP.defaultOptions = {
    ubo: !1,
    isStatic: !1
};
let gn = cP;
class es {
    constructor(e) {
        this.resources = Object.create(null),
        this._dirty = !0;
        let r = 0;
        for (const n in e) {
            const i = e[n];
            this.setResource(i, r++)
        }
        this._updateKey()
    }
    _updateKey() {
        if (!this._dirty)
            return;
        this._dirty = !1;
        const e = [];
        let r = 0;
        for (const n in this.resources)
            e[r++] = this.resources[n]._resourceId;
        this._key = e.join("|")
    }
    setResource(e, r) {
        var i, o;
        const n = this.resources[r];
        e !== n && (n && ((i = e.off) == null || i.call(e, "change", this.onResourceChange, this)),
        (o = e.on) == null || o.call(e, "change", this.onResourceChange, this),
        this.resources[r] = e,
        this._dirty = !0)
    }
    getResource(e) {
        return this.resources[e]
    }
    _touch(e) {
        const r = this.resources;
        for (const n in r)
            r[n]._touched = e
    }
    destroy() {
        var r;
        const e = this.resources;
        for (const n in e) {
            const i = e[n];
            (r = i == null ? void 0 : i.off) == null || r.call(i, "change", this.onResourceChange, this)
        }
        this.resources = null
    }
    onResourceChange(e) {
        if (this._dirty = !0,
        e.destroyed) {
            const r = this.resources;
            for (const n in r)
                r[n] === e && (r[n] = null)
        } else
            this._updateKey()
    }
}
var qn = (t => (t[t.WEBGL = 1] = "WEBGL",
t[t.WEBGPU = 2] = "WEBGPU",
t[t.BOTH = 3] = "BOTH",
t))(qn || {});
class yi extends Qn {
    constructor(e) {
        super(),
        this.uid = Tt("shader"),
        this._uniformBindMap = Object.create(null),
        this._ownedBindGroups = [],
        this._destroyed = !1;
        let {gpuProgram: r, glProgram: n, groups: i, resources: o, compatibleRenderers: s, groupMap: a} = e;
        this.gpuProgram = r,
        this.glProgram = n,
        s === void 0 && (s = 0,
        r && (s |= qn.WEBGPU),
        n && (s |= qn.WEBGL)),
        this.compatibleRenderers = s;
        const l = {};
        if (!o && !i && (o = {}),
        o && i)
            throw new Error("[Shader] Cannot have both resources and groups");
        if (!r && i && !a)
            throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");
        if (!r && i && a)
            for (const c in a)
                for (const u in a[c]) {
                    const f = a[c][u];
                    l[f] = {
                        group: c,
                        binding: u,
                        name: f
                    }
                }
        else if (r && i && !a) {
            const c = r.structsAndGroups.groups;
            a = {},
            c.forEach(u => {
                a[u.group] = a[u.group] || {},
                a[u.group][u.binding] = u.name,
                l[u.name] = u
            }
            )
        } else if (o) {
            i = {},
            a = {},
            r && r.structsAndGroups.groups.forEach(f => {
                a[f.group] = a[f.group] || {},
                a[f.group][f.binding] = f.name,
                l[f.name] = f
            }
            );
            let c = 0;
            for (const u in o)
                l[u] || (i[99] || (i[99] = new es,
                this._ownedBindGroups.push(i[99])),
                l[u] = {
                    group: 99,
                    binding: c,
                    name: u
                },
                a[99] = a[99] || {},
                a[99][c] = u,
                c++);
            for (const u in o) {
                const f = u;
                let d = o[u];
                !d.source && !d._resourceType && (d = new gn(d));
                const h = l[f];
                h && (i[h.group] || (i[h.group] = new es,
                this._ownedBindGroups.push(i[h.group])),
                i[h.group].setResource(d, h.binding))
            }
        }
        this.groups = i,
        this._uniformBindMap = a,
        this.resources = this._buildResourceAccessor(i, l)
    }
    addResource(e, r, n) {
        var i, o;
        (i = this._uniformBindMap)[r] || (i[r] = {}),
        (o = this._uniformBindMap[r])[n] || (o[n] = e),
        this.groups[r] || (this.groups[r] = new es,
        this._ownedBindGroups.push(this.groups[r]))
    }
    _buildResourceAccessor(e, r) {
        const n = {};
        for (const i in r) {
            const o = r[i];
            Object.defineProperty(n, o.name, {
                get() {
                    return e[o.group].getResource(o.binding)
                },
                set(s) {
                    e[o.group].setResource(s, o.binding)
                }
            })
        }
        return n
    }
    destroy(e=!1) {
        var r, n;
        this._destroyed || (this._destroyed = !0,
        this.emit("destroy", this),
        e && ((r = this.gpuProgram) == null || r.destroy(),
        (n = this.glProgram) == null || n.destroy()),
        this.gpuProgram = null,
        this.glProgram = null,
        this.removeAllListeners(),
        this._uniformBindMap = null,
        this._ownedBindGroups.forEach(i => {
            i.destroy()
        }
        ),
        this._ownedBindGroups = null,
        this.resources = null,
        this.groups = null)
    }
    static from(e) {
        const {gpu: r, gl: n, ...i} = e;
        let o, s;
        return r && (o = Es.from(r)),
        n && (s = ya.from(n)),
        new yi({
            gpuProgram: o,
            glProgram: s,
            ...i
        })
    }
}
const fle = {
    normal: 0,
    add: 1,
    multiply: 2,
    screen: 3,
    overlay: 4,
    erase: 5,
    "normal-npm": 6,
    "add-npm": 7,
    "screen-npm": 8,
    min: 9,
    max: 10
}
  , Ng = 0
  , Lg = 1
  , $g = 2
  , Ug = 3
  , Gg = 4
  , Hg = 5
  , qy = class fP {
    constructor() {
        this.data = 0,
        this.blendMode = "normal",
        this.polygonOffset = 0,
        this.blend = !0,
        this.depthMask = !0
    }
    get blend() {
        return !!(this.data & 1 << Ng)
    }
    set blend(e) {
        !!(this.data & 1 << Ng) !== e && (this.data ^= 1 << Ng)
    }
    get offsets() {
        return !!(this.data & 1 << Lg)
    }
    set offsets(e) {
        !!(this.data & 1 << Lg) !== e && (this.data ^= 1 << Lg)
    }
    set cullMode(e) {
        if (e === "none") {
            this.culling = !1;
            return
        }
        this.culling = !0,
        this.clockwiseFrontFace = e === "front"
    }
    get cullMode() {
        return this.culling ? this.clockwiseFrontFace ? "front" : "back" : "none"
    }
    get culling() {
        return !!(this.data & 1 << $g)
    }
    set culling(e) {
        !!(this.data & 1 << $g) !== e && (this.data ^= 1 << $g)
    }
    get depthTest() {
        return !!(this.data & 1 << Ug)
    }
    set depthTest(e) {
        !!(this.data & 1 << Ug) !== e && (this.data ^= 1 << Ug)
    }
    get depthMask() {
        return !!(this.data & 1 << Hg)
    }
    set depthMask(e) {
        !!(this.data & 1 << Hg) !== e && (this.data ^= 1 << Hg)
    }
    get clockwiseFrontFace() {
        return !!(this.data & 1 << Gg)
    }
    set clockwiseFrontFace(e) {
        !!(this.data & 1 << Gg) !== e && (this.data ^= 1 << Gg)
    }
    get blendMode() {
        return this._blendMode
    }
    set blendMode(e) {
        this.blend = e !== "none",
        this._blendMode = e,
        this._blendModeId = fle[e] || 0
    }
    get polygonOffset() {
        return this._polygonOffset
    }
    set polygonOffset(e) {
        this.offsets = !!e,
        this._polygonOffset = e
    }
    toString() {
        return `[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`
    }
    static for2d() {
        const e = new fP;
        return e.depthTest = !1,
        e.blend = !0,
        e
    }
}
;
qy.default2d = qy.for2d();
let Ui = qy;
const dP = class Zy extends yi {
    constructor(e) {
        e = {
            ...Zy.defaultOptions,
            ...e
        },
        super(e),
        this.enabled = !0,
        this._state = Ui.for2d(),
        this.blendMode = e.blendMode,
        this.padding = e.padding,
        typeof e.antialias == "boolean" ? this.antialias = e.antialias ? "on" : "off" : this.antialias = e.antialias,
        this.resolution = e.resolution,
        this.blendRequired = e.blendRequired,
        this.clipToViewport = e.clipToViewport,
        this.addResource("uTexture", 0, 1),
        e.blendRequired && this.addResource("uBackTexture", 0, 3)
    }
    apply(e, r, n, i) {
        e.applyFilter(this, r, n, i)
    }
    get blendMode() {
        return this._state.blendMode
    }
    set blendMode(e) {
        this._state.blendMode = e
    }
    static from(e) {
        const {gpu: r, gl: n, ...i} = e;
        let o, s;
        return r && (o = Es.from(r)),
        n && (s = ya.from(n)),
        new Zy({
            gpuProgram: o,
            glProgram: s,
            ...i
        })
    }
}
;
dP.defaultOptions = {
    blendMode: "normal",
    resolution: 1,
    padding: 0,
    antialias: "off",
    blendRequired: !1,
    clipToViewport: !0
};
let l1 = dP;
const Jy = [];
$e.handleByNamedList(X.Environment, Jy);
async function dle(t) {
    if (!t)
        for (let e = 0; e < Jy.length; e++) {
            const r = Jy[e];
            if (r.value.test()) {
                await r.value.load();
                return
            }
        }
}
let qu;
function hP() {
    if (typeof qu == "boolean")
        return qu;
    try {
        qu = new Function("param1","param2","param3","return param1[param2] === param3;")({
            a: "b"
        }, "a", "b") === !0
    } catch {
        qu = !1
    }
    return qu
}
function Tw(t, e, r=2) {
    const n = e && e.length
      , i = n ? e[0] * r : t.length;
    let o = xP(t, 0, i, r, !0);
    const s = [];
    if (!o || o.next === o.prev)
        return s;
    let a, l, c;
    if (n && (o = mle(t, e, o, r)),
    t.length > 80 * r) {
        a = t[0],
        l = t[1];
        let u = a
          , f = l;
        for (let d = r; d < i; d += r) {
            const h = t[d]
              , x = t[d + 1];
            h < a && (a = h),
            x < l && (l = x),
            h > u && (u = h),
            x > f && (f = x)
        }
        c = Math.max(u - a, f - l),
        c = c !== 0 ? 32767 / c : 0
    }
    return Ef(o, s, r, a, l, c, 0),
    s
}
function xP(t, e, r, n, i) {
    let o;
    if (i === Tle(t, e, r, n) > 0)
        for (let s = e; s < r; s += n)
            o = Dw(s / n | 0, t[s], t[s + 1], o);
    else
        for (let s = r - n; s >= e; s -= n)
            o = Dw(s / n | 0, t[s], t[s + 1], o);
    return o && ru(o, o.next) && (bf(o),
    o = o.next),
    o
}
function Al(t, e) {
    if (!t)
        return t;
    e || (e = t);
    let r = t, n;
    do
        if (n = !1,
        !r.steiner && (ru(r, r.next) || Yt(r.prev, r, r.next) === 0)) {
            if (bf(r),
            r = e = r.prev,
            r === r.next)
                break;
            n = !0
        } else
            r = r.next;
    while (n || r !== e);
    return e
}
function Ef(t, e, r, n, i, o, s) {
    if (!t)
        return;
    !s && o && ble(t, n, i, o);
    let a = t;
    for (; t.prev !== t.next; ) {
        const l = t.prev
          , c = t.next;
        if (o ? xle(t, n, i, o) : hle(t)) {
            e.push(l.i, t.i, c.i),
            bf(t),
            t = c.next,
            a = c.next;
            continue
        }
        if (t = c,
        t === a) {
            s ? s === 1 ? (t = ple(Al(t), e),
            Ef(t, e, r, n, i, o, 2)) : s === 2 && gle(t, e, r, n, i, o) : Ef(Al(t), e, r, n, i, o, 1);
            break
        }
    }
}
function hle(t) {
    const e = t.prev
      , r = t
      , n = t.next;
    if (Yt(e, r, n) >= 0)
        return !1;
    const i = e.x
      , o = r.x
      , s = n.x
      , a = e.y
      , l = r.y
      , c = n.y
      , u = Math.min(i, o, s)
      , f = Math.min(a, l, c)
      , d = Math.max(i, o, s)
      , h = Math.max(a, l, c);
    let x = n.next;
    for (; x !== e; ) {
        if (x.x >= u && x.x <= d && x.y >= f && x.y <= h && h0(i, a, o, l, s, c, x.x, x.y) && Yt(x.prev, x, x.next) >= 0)
            return !1;
        x = x.next
    }
    return !0
}
function xle(t, e, r, n) {
    const i = t.prev
      , o = t
      , s = t.next;
    if (Yt(i, o, s) >= 0)
        return !1;
    const a = i.x
      , l = o.x
      , c = s.x
      , u = i.y
      , f = o.y
      , d = s.y
      , h = Math.min(a, l, c)
      , x = Math.min(u, f, d)
      , y = Math.max(a, l, c)
      , m = Math.max(u, f, d)
      , E = Qy(h, x, e, r, n)
      , g = Qy(y, m, e, r, n);
    let p = t.prevZ
      , v = t.nextZ;
    for (; p && p.z >= E && v && v.z <= g; ) {
        if (p.x >= h && p.x <= y && p.y >= x && p.y <= m && p !== i && p !== s && h0(a, u, l, f, c, d, p.x, p.y) && Yt(p.prev, p, p.next) >= 0 || (p = p.prevZ,
        v.x >= h && v.x <= y && v.y >= x && v.y <= m && v !== i && v !== s && h0(a, u, l, f, c, d, v.x, v.y) && Yt(v.prev, v, v.next) >= 0))
            return !1;
        v = v.nextZ
    }
    for (; p && p.z >= E; ) {
        if (p.x >= h && p.x <= y && p.y >= x && p.y <= m && p !== i && p !== s && h0(a, u, l, f, c, d, p.x, p.y) && Yt(p.prev, p, p.next) >= 0)
            return !1;
        p = p.prevZ
    }
    for (; v && v.z <= g; ) {
        if (v.x >= h && v.x <= y && v.y >= x && v.y <= m && v !== i && v !== s && h0(a, u, l, f, c, d, v.x, v.y) && Yt(v.prev, v, v.next) >= 0)
            return !1;
        v = v.nextZ
    }
    return !0
}
function ple(t, e) {
    let r = t;
    do {
        const n = r.prev
          , i = r.next.next;
        !ru(n, i) && gP(n, r, r.next, i) && _f(n, i) && _f(i, n) && (e.push(n.i, r.i, i.i),
        bf(r),
        bf(r.next),
        r = t = i),
        r = r.next
    } while (r !== t);
    return Al(r)
}
function gle(t, e, r, n, i, o) {
    let s = t;
    do {
        let a = s.next.next;
        for (; a !== s.prev; ) {
            if (s.i !== a.i && wle(s, a)) {
                let l = mP(s, a);
                s = Al(s, s.next),
                l = Al(l, l.next),
                Ef(s, e, r, n, i, o, 0),
                Ef(l, e, r, n, i, o, 0);
                return
            }
            a = a.next
        }
        s = s.next
    } while (s !== t)
}
function mle(t, e, r, n) {
    const i = [];
    for (let o = 0, s = e.length; o < s; o++) {
        const a = e[o] * n
          , l = o < s - 1 ? e[o + 1] * n : t.length
          , c = xP(t, a, l, n, !1);
        c === c.next && (c.steiner = !0),
        i.push(Ale(c))
    }
    i.sort(vle);
    for (let o = 0; o < i.length; o++)
        r = yle(i[o], r);
    return r
}
function vle(t, e) {
    let r = t.x - e.x;
    if (r === 0 && (r = t.y - e.y,
    r === 0)) {
        const n = (t.next.y - t.y) / (t.next.x - t.x)
          , i = (e.next.y - e.y) / (e.next.x - e.x);
        r = n - i
    }
    return r
}
function yle(t, e) {
    const r = Ele(t, e);
    if (!r)
        return e;
    const n = mP(r, t);
    return Al(n, n.next),
    Al(r, r.next)
}
function Ele(t, e) {
    let r = e;
    const n = t.x
      , i = t.y;
    let o = -1 / 0, s;
    if (ru(t, r))
        return r;
    do {
        if (ru(t, r.next))
            return r.next;
        if (i <= r.y && i >= r.next.y && r.next.y !== r.y) {
            const f = r.x + (i - r.y) * (r.next.x - r.x) / (r.next.y - r.y);
            if (f <= n && f > o && (o = f,
            s = r.x < r.next.x ? r : r.next,
            f === n))
                return s
        }
        r = r.next
    } while (r !== e);
    if (!s)
        return null;
    const a = s
      , l = s.x
      , c = s.y;
    let u = 1 / 0;
    r = s;
    do {
        if (n >= r.x && r.x >= l && n !== r.x && pP(i < c ? n : o, i, l, c, i < c ? o : n, i, r.x, r.y)) {
            const f = Math.abs(i - r.y) / (n - r.x);
            _f(r, t) && (f < u || f === u && (r.x > s.x || r.x === s.x && _le(s, r))) && (s = r,
            u = f)
        }
        r = r.next
    } while (r !== a);
    return s
}
function _le(t, e) {
    return Yt(t.prev, t, e.prev) < 0 && Yt(e.next, t, t.next) < 0
}
function ble(t, e, r, n) {
    let i = t;
    do
        i.z === 0 && (i.z = Qy(i.x, i.y, e, r, n)),
        i.prevZ = i.prev,
        i.nextZ = i.next,
        i = i.next;
    while (i !== t);
    i.prevZ.nextZ = null,
    i.prevZ = null,
    Cle(i)
}
function Cle(t) {
    let e, r = 1;
    do {
        let n = t, i;
        t = null;
        let o = null;
        for (e = 0; n; ) {
            e++;
            let s = n
              , a = 0;
            for (let c = 0; c < r && (a++,
            s = s.nextZ,
            !!s); c++)
                ;
            let l = r;
            for (; a > 0 || l > 0 && s; )
                a !== 0 && (l === 0 || !s || n.z <= s.z) ? (i = n,
                n = n.nextZ,
                a--) : (i = s,
                s = s.nextZ,
                l--),
                o ? o.nextZ = i : t = i,
                i.prevZ = o,
                o = i;
            n = s
        }
        o.nextZ = null,
        r *= 2
    } while (e > 1);
    return t
}
function Qy(t, e, r, n, i) {
    return t = (t - r) * i | 0,
    e = (e - n) * i | 0,
    t = (t | t << 8) & 16711935,
    t = (t | t << 4) & 252645135,
    t = (t | t << 2) & 858993459,
    t = (t | t << 1) & 1431655765,
    e = (e | e << 8) & 16711935,
    e = (e | e << 4) & 252645135,
    e = (e | e << 2) & 858993459,
    e = (e | e << 1) & 1431655765,
    t | e << 1
}
function Ale(t) {
    let e = t
      , r = t;
    do
        (e.x < r.x || e.x === r.x && e.y < r.y) && (r = e),
        e = e.next;
    while (e !== t);
    return r
}
function pP(t, e, r, n, i, o, s, a) {
    return (i - s) * (e - a) >= (t - s) * (o - a) && (t - s) * (n - a) >= (r - s) * (e - a) && (r - s) * (o - a) >= (i - s) * (n - a)
}
function h0(t, e, r, n, i, o, s, a) {
    return !(t === s && e === a) && pP(t, e, r, n, i, o, s, a)
}
function wle(t, e) {
    return t.next.i !== e.i && t.prev.i !== e.i && !Ble(t, e) && (_f(t, e) && _f(e, t) && Sle(t, e) && (Yt(t.prev, t, e.prev) || Yt(t, e.prev, e)) || ru(t, e) && Yt(t.prev, t, t.next) > 0 && Yt(e.prev, e, e.next) > 0)
}
function Yt(t, e, r) {
    return (e.y - t.y) * (r.x - e.x) - (e.x - t.x) * (r.y - e.y)
}
function ru(t, e) {
    return t.x === e.x && t.y === e.y
}
function gP(t, e, r, n) {
    const i = fh(Yt(t, e, r))
      , o = fh(Yt(t, e, n))
      , s = fh(Yt(r, n, t))
      , a = fh(Yt(r, n, e));
    return !!(i !== o && s !== a || i === 0 && uh(t, r, e) || o === 0 && uh(t, n, e) || s === 0 && uh(r, t, n) || a === 0 && uh(r, e, n))
}
function uh(t, e, r) {
    return e.x <= Math.max(t.x, r.x) && e.x >= Math.min(t.x, r.x) && e.y <= Math.max(t.y, r.y) && e.y >= Math.min(t.y, r.y)
}
function fh(t) {
    return t > 0 ? 1 : t < 0 ? -1 : 0
}
function Ble(t, e) {
    let r = t;
    do {
        if (r.i !== t.i && r.next.i !== t.i && r.i !== e.i && r.next.i !== e.i && gP(r, r.next, t, e))
            return !0;
        r = r.next
    } while (r !== t);
    return !1
}
function _f(t, e) {
    return Yt(t.prev, t, t.next) < 0 ? Yt(t, e, t.next) >= 0 && Yt(t, t.prev, e) >= 0 : Yt(t, e, t.prev) < 0 || Yt(t, t.next, e) < 0
}
function Sle(t, e) {
    let r = t
      , n = !1;
    const i = (t.x + e.x) / 2
      , o = (t.y + e.y) / 2;
    do
        r.y > o != r.next.y > o && r.next.y !== r.y && i < (r.next.x - r.x) * (o - r.y) / (r.next.y - r.y) + r.x && (n = !n),
        r = r.next;
    while (r !== t);
    return n
}
function mP(t, e) {
    const r = eE(t.i, t.x, t.y)
      , n = eE(e.i, e.x, e.y)
      , i = t.next
      , o = e.prev;
    return t.next = e,
    e.prev = t,
    r.next = i,
    i.prev = r,
    n.next = r,
    r.prev = n,
    o.next = n,
    n.prev = o,
    n
}
function Dw(t, e, r, n) {
    const i = eE(t, e, r);
    return n ? (i.next = n.next,
    i.prev = n,
    n.next.prev = i,
    n.next = i) : (i.prev = i,
    i.next = i),
    i
}
function bf(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 eE(t, e, r) {
    return {
        i: t,
        x: e,
        y: r,
        prev: null,
        next: null,
        z: 0,
        prevZ: null,
        nextZ: null,
        steiner: !1
    }
}
function Tle(t, e, r, n) {
    let i = 0;
    for (let o = e, s = r - n; o < r; o += n)
        i += (t[s] - t[o]) * (t[o + 1] + t[s + 1]),
        s = o;
    return i
}
const Dle = Tw.default || Tw;
var Hn = (t => (t[t.NONE = 0] = "NONE",
t[t.COLOR = 16384] = "COLOR",
t[t.STENCIL = 1024] = "STENCIL",
t[t.DEPTH = 256] = "DEPTH",
t[t.COLOR_DEPTH = 16640] = "COLOR_DEPTH",
t[t.COLOR_STENCIL = 17408] = "COLOR_STENCIL",
t[t.DEPTH_STENCIL = 1280] = "DEPTH_STENCIL",
t[t.ALL = 17664] = "ALL",
t))(Hn || {});
class vP {
    constructor(e) {
        this.items = [],
        this._name = e
    }
    emit(e, r, n, i, o, s, a, l) {
        const {name: c, items: u} = this;
        for (let f = 0, d = u.length; f < d; f++)
            u[f][c](e, r, n, i, o, s, a, l);
        return this
    }
    add(e) {
        return e[this._name] && (this.remove(e),
        this.items.push(e)),
        this
    }
    remove(e) {
        const r = this.items.indexOf(e);
        return r !== -1 && this.items.splice(r, 1),
        this
    }
    contains(e) {
        return this.items.indexOf(e) !== -1
    }
    removeAll() {
        return this.items.length = 0,
        this
    }
    destroy() {
        this.removeAll(),
        this.items = null,
        this._name = null
    }
    get empty() {
        return this.items.length === 0
    }
    get name() {
        return this._name
    }
}
const Fle = ["init", "destroy", "contextChange", "resolutionChange", "resetState", "renderEnd", "renderStart", "render", "update", "postrender", "prerender"]
  , yP = class EP extends Qn {
    constructor(e) {
        super(),
        this.uid = Tt("renderer"),
        this.runners = Object.create(null),
        this.renderPipes = Object.create(null),
        this._initOptions = {},
        this._systemsHash = Object.create(null),
        this.type = e.type,
        this.name = e.name,
        this.config = e;
        const r = [...Fle, ...this.config.runners ?? []];
        this._addRunners(...r),
        this._unsafeEvalCheck()
    }
    async init(e={}) {
        const r = e.skipExtensionImports === !0 ? !0 : e.manageImports === !1;
        await dle(r),
        this._addSystems(this.config.systems),
        this._addPipes(this.config.renderPipes, this.config.renderPipeAdaptors);
        for (const n in this._systemsHash)
            e = {
                ...this._systemsHash[n].constructor.defaultOptions,
                ...e
            };
        e = {
            ...EP.defaultOptions,
            ...e
        },
        this._roundPixels = e.roundPixels ? 1 : 0;
        for (let n = 0; n < this.runners.init.items.length; n++)
            await this.runners.init.items[n].init(e);
        this._initOptions = e
    }
    render(e, r) {
        let n = e;
        if (n instanceof kn && (n = {
            container: n
        },
        r && (Re(tt, "passing a second argument is deprecated, please use render options instead"),
        n.target = r.renderTexture)),
        n.target || (n.target = this.view.renderTarget),
        n.target === this.view.renderTarget && (this._lastObjectRendered = n.container,
        n.clearColor ?? (n.clearColor = this.background.colorRgba),
        n.clear ?? (n.clear = this.background.clearBeforeRender)),
        n.clearColor) {
            const i = Array.isArray(n.clearColor) && n.clearColor.length === 4;
            n.clearColor = i ? n.clearColor : Ut.shared.setValue(n.clearColor).toArray()
        }
        n.transform || (n.container.updateLocalTransform(),
        n.transform = n.container.localTransform),
        n.container.visible && (n.container.enableRenderGroup(),
        this.runners.prerender.emit(n),
        this.runners.renderStart.emit(n),
        this.runners.render.emit(n),
        this.runners.renderEnd.emit(n),
        this.runners.postrender.emit(n))
    }
    resize(e, r, n) {
        const i = this.view.resolution;
        this.view.resize(e, r, n),
        this.emit("resize", this.view.screen.width, this.view.screen.height, this.view.resolution),
        n !== void 0 && n !== i && this.runners.resolutionChange.emit(n)
    }
    clear(e={}) {
        const r = this;
        e.target || (e.target = r.renderTarget.renderTarget),
        e.clearColor || (e.clearColor = this.background.colorRgba),
        e.clear ?? (e.clear = Hn.ALL);
        const {clear: n, clearColor: i, target: o} = e;
        Ut.shared.setValue(i ?? this.background.colorRgba),
        r.renderTarget.clear(o, n, Ut.shared.toArray())
    }
    get resolution() {
        return this.view.resolution
    }
    set resolution(e) {
        this.view.resolution = e,
        this.runners.resolutionChange.emit(e)
    }
    get width() {
        return this.view.texture.frame.width
    }
    get height() {
        return this.view.texture.frame.height
    }
    get canvas() {
        return this.view.canvas
    }
    get lastObjectRendered() {
        return this._lastObjectRendered
    }
    get renderingToScreen() {
        return this.renderTarget.renderingToScreen
    }
    get screen() {
        return this.view.screen
    }
    _addRunners(...e) {
        e.forEach(r => {
            this.runners[r] = new vP(r)
        }
        )
    }
    _addSystems(e) {
        let r;
        for (r in e) {
            const n = e[r];
            this._addSystem(n.value, n.name)
        }
    }
    _addSystem(e, r) {
        const n = new e(this);
        if (this[r])
            throw new Error(`Whoops! The name "${r}" is already in use`);
        this[r] = n,
        this._systemsHash[r] = n;
        for (const i in this.runners)
            this.runners[i].add(n);
        return this
    }
    _addPipes(e, r) {
        const n = r.reduce( (i, o) => (i[o.name] = o.value,
        i), {});
        e.forEach(i => {
            const o = i.value
              , s = i.name
              , a = n[s];
            this.renderPipes[s] = new o(this,a ? new a : null),
            this.runners.destroy.add(this.renderPipes[s])
        }
        )
    }
    destroy(e=!1) {
        this.runners.destroy.items.reverse(),
        this.runners.destroy.emit(e),
        (e === !0 || typeof e == "object" && e.releaseGlobalResources) && Cu.release(),
        Object.values(this.runners).forEach(r => {
            r.destroy()
        }
        ),
        this._systemsHash = null,
        this.renderPipes = null
    }
    generateTexture(e) {
        return this.textureGenerator.generateTexture(e)
    }
    get roundPixels() {
        return !!this._roundPixels
    }
    _unsafeEvalCheck() {
        if (!hP())
            throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")
    }
    resetState() {
        this.runners.resetState.emit()
    }
}
;
yP.defaultOptions = {
    resolution: 1,
    failIfMajorPerformanceCaveat: !1,
    roundPixels: !1
};
let c1 = yP, dh;
function Ple(t) {
    return dh !== void 0 || (dh = ( () => {
        var r;
        const e = {
            stencil: !0,
            failIfMajorPerformanceCaveat: t ?? c1.defaultOptions.failIfMajorPerformanceCaveat
        };
        try {
            if (!je.get().getWebGLRenderingContext())
                return !1;
            let i = je.get().createCanvas().getContext("webgl", e);
            const o = !!((r = i == null ? void 0 : i.getContextAttributes()) != null && r.stencil);
            if (i) {
                const s = i.getExtension("WEBGL_lose_context");
                s && s.loseContext()
            }
            return i = null,
            o
        } catch {
            return !1
        }
    }
    )()),
    dh
}
let hh;
async function Ile(t={}) {
    return hh !== void 0 || (hh = await (async () => {
        const e = je.get().getNavigator().gpu;
        if (!e)
            return !1;
        try {
            return await (await e.requestAdapter(t)).requestDevice(),
            !0
        } catch {
            return !1
        }
    }
    )()),
    hh
}
const Fw = ["webgl", "webgpu", "canvas"];
async function Ole(t) {
    let e = [];
    t.preference ? (e.push(t.preference),
    Fw.forEach(o => {
        o !== t.preference && e.push(o)
    }
    )) : e = Fw.slice();
    let r, n = {};
    for (let o = 0; o < e.length; o++) {
        const s = e[o];
        if (s === "webgpu" && await Ile()) {
            const {WebGPURenderer: a} = await X0( () => Promise.resolve().then( () => Rde), void 0);
            r = a,
            n = {
                ...t,
                ...t.webgpu
            };
            break
        } else if (s === "webgl" && Ple(t.failIfMajorPerformanceCaveat ?? c1.defaultOptions.failIfMajorPerformanceCaveat)) {
            const {WebGLRenderer: a} = await X0( () => Promise.resolve().then( () => gde), void 0);
            r = a,
            n = {
                ...t,
                ...t.webgl
            };
            break
        } else if (s === "canvas")
            throw n = {
                ...t
            },
            new Error("CanvasRenderer is not yet implemented")
    }
    if (delete n.webgpu,
    delete n.webgl,
    !r)
        throw new Error("No available renderer for the current environment");
    const i = new r;
    return await i.init(n),
    i
}
const kx = "8.14.3";
class _P {
    static init() {
        var e;
        (e = globalThis.__PIXI_APP_INIT__) == null || e.call(globalThis, this, kx)
    }
    static destroy() {}
}
_P.extension = X.Application;
class bP {
    constructor(e) {
        this._renderer = e
    }
    init() {
        var e;
        (e = globalThis.__PIXI_RENDERER_INIT__) == null || e.call(globalThis, this._renderer, kx)
    }
    destroy() {
        this._renderer = null
    }
}
bP.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem],
    name: "initHook",
    priority: -10
};
const CP = class tE {
    constructor(...e) {
        this.stage = new kn,
        e[0] !== void 0 && Re(tt, "Application constructor options are deprecated, please use Application.init() instead.")
    }
    async init(e) {
        e = {
            ...e
        },
        this.stage || (this.stage = new kn),
        this.renderer = await Ole(e),
        tE._plugins.forEach(r => {
            r.init.call(this, e)
        }
        )
    }
    render() {
        this.renderer.render({
            container: this.stage
        })
    }
    get canvas() {
        return this.renderer.canvas
    }
    get view() {
        return Re(tt, "Application.view is deprecated, please use Application.canvas instead."),
        this.renderer.canvas
    }
    get screen() {
        return this.renderer.screen
    }
    destroy(e=!1, r=!1) {
        const n = tE._plugins.slice(0);
        n.reverse(),
        n.forEach(i => {
            i.destroy.call(this)
        }
        ),
        this.stage.destroy(r),
        this.stage = null,
        this.renderer.destroy(e),
        this.renderer = null
    }
}
;
CP._plugins = [];
let kle = CP;
$e.handleByList(X.Application, kle._plugins);
$e.add(_P);
class AP {
    static init(e) {
        Object.defineProperty(this, "resizeTo", {
            configurable: !0,
            set(r) {
                globalThis.removeEventListener("resize", this.queueResize),
                this._resizeTo = r,
                r && (globalThis.addEventListener("resize", this.queueResize),
                this.resize())
            },
            get() {
                return this._resizeTo
            }
        }),
        this.queueResize = () => {
            this._resizeTo && (this._cancelResize(),
            this._resizeId = requestAnimationFrame( () => this.resize()))
        }
        ,
        this._cancelResize = () => {
            this._resizeId && (cancelAnimationFrame(this._resizeId),
            this._resizeId = null)
        }
        ,
        this.resize = () => {
            if (!this._resizeTo)
                return;
            this._cancelResize();
            let r, n;
            if (this._resizeTo === globalThis.window)
                r = globalThis.innerWidth,
                n = globalThis.innerHeight;
            else {
                const {clientWidth: i, clientHeight: o} = this._resizeTo;
                r = i,
                n = o
            }
            this.renderer.resize(r, n),
            this.render()
        }
        ,
        this._resizeId = null,
        this._resizeTo = null,
        this.resizeTo = e.resizeTo || null
    }
    static destroy() {
        globalThis.removeEventListener("resize", this.queueResize),
        this._cancelResize(),
        this._cancelResize = null,
        this.queueResize = null,
        this.resizeTo = null,
        this.resize = null
    }
}
AP.extension = X.Application;
class wP {
    static init(e) {
        e = Object.assign({
            autoStart: !0,
            sharedTicker: !1
        }, e),
        Object.defineProperty(this, "ticker", {
            configurable: !0,
            set(r) {
                this._ticker && this._ticker.remove(this.render, this),
                this._ticker = r,
                r && r.add(this.render, this, Cl.LOW)
            },
            get() {
                return this._ticker
            }
        }),
        this.stop = () => {
            this._ticker.stop()
        }
        ,
        this.start = () => {
            this._ticker.start()
        }
        ,
        this._ticker = null,
        this.ticker = e.sharedTicker ? Gr.shared : new Gr,
        e.autoStart && this.start()
    }
    static destroy() {
        if (this._ticker) {
            const e = this._ticker;
            this.ticker = null,
            e.destroy()
        }
    }
}
wP.extension = X.Application;
class BP extends Qn {
    constructor() {
        super(...arguments),
        this.chars = Object.create(null),
        this.lineHeight = 0,
        this.fontFamily = "",
        this.fontMetrics = {
            fontSize: 0,
            ascent: 0,
            descent: 0
        },
        this.baseLineOffset = 0,
        this.distanceField = {
            type: "none",
            range: 0
        },
        this.pages = [],
        this.applyFillAsTint = !0,
        this.baseMeasurementFontSize = 100,
        this.baseRenderedFontSize = 100
    }
    get font() {
        return Re(tt, "BitmapFont.font is deprecated, please use BitmapFont.fontFamily instead."),
        this.fontFamily
    }
    get pageTextures() {
        return Re(tt, "BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),
        this.pages
    }
    get size() {
        return Re(tt, "BitmapFont.size is deprecated, please use BitmapFont.fontMetrics.fontSize instead."),
        this.fontMetrics.fontSize
    }
    get distanceFieldRange() {
        return Re(tt, "BitmapFont.distanceFieldRange is deprecated, please use BitmapFont.distanceField.range instead."),
        this.distanceField.range
    }
    get distanceFieldType() {
        return Re(tt, "BitmapFont.distanceFieldType is deprecated, please use BitmapFont.distanceField.type instead."),
        this.distanceField.type
    }
    destroy(e=!1) {
        var r;
        this.emit("destroy", this),
        this.removeAllListeners();
        for (const n in this.chars)
            (r = this.chars[n].texture) == null || r.destroy();
        this.chars = null,
        e && (this.pages.forEach(n => n.texture.destroy(!0)),
        this.pages = null)
    }
}
/**
 * tiny-lru
 *
 * @copyright 2025 Jason Mulligan <jason.mulligan@avoidwork.com>
 * @license BSD-3-Clause
 * @version 11.4.5
 */
class Rle {
    constructor(e=0, r=0, n=!1) {
        this.first = null,
        this.items = Object.create(null),
        this.last = null,
        this.max = e,
        this.resetTtl = n,
        this.size = 0,
        this.ttl = r
    }
    clear() {
        return this.first = null,
        this.items = Object.create(null),
        this.last = null,
        this.size = 0,
        this
    }
    delete(e) {
        if (this.has(e)) {
            const r = this.items[e];
            delete this.items[e],
            this.size--,
            r.prev !== null && (r.prev.next = r.next),
            r.next !== null && (r.next.prev = r.prev),
            this.first === r && (this.first = r.next),
            this.last === r && (this.last = r.prev)
        }
        return this
    }
    entries(e=this.keys()) {
        return e.map(r => [r, this.get(r)])
    }
    evict(e=!1) {
        if (e || this.size > 0) {
            const r = this.first;
            delete this.items[r.key],
            --this.size === 0 ? (this.first = null,
            this.last = null) : (this.first = r.next,
            this.first.prev = null)
        }
        return this
    }
    expiresAt(e) {
        let r;
        return this.has(e) && (r = this.items[e].expiry),
        r
    }
    get(e) {
        const r = this.items[e];
        if (r !== void 0) {
            if (this.ttl > 0 && r.expiry <= Date.now()) {
                this.delete(e);
                return
            }
            return this.moveToEnd(r),
            r.value
        }
    }
    has(e) {
        return e in this.items
    }
    moveToEnd(e) {
        this.last !== e && (e.prev !== null && (e.prev.next = e.next),
        e.next !== null && (e.next.prev = e.prev),
        this.first === e && (this.first = e.next),
        e.prev = this.last,
        e.next = null,
        this.last !== null && (this.last.next = e),
        this.last = e,
        this.first === null && (this.first = e))
    }
    keys() {
        const e = [];
        let r = this.first;
        for (; r !== null; )
            e.push(r.key),
            r = r.next;
        return e
    }
    setWithEvicted(e, r, n=this.resetTtl) {
        let i = null;
        if (this.has(e))
            this.set(e, r, !0, n);
        else {
            this.max > 0 && this.size === this.max && (i = {
                ...this.first
            },
            this.evict(!0));
            let o = this.items[e] = {
                expiry: this.ttl > 0 ? Date.now() + this.ttl : this.ttl,
                key: e,
                prev: this.last,
                next: null,
                value: r
            };
            ++this.size === 1 ? this.first = o : this.last.next = o,
            this.last = o
        }
        return i
    }
    set(e, r, n=!1, i=this.resetTtl) {
        let o = this.items[e];
        return n || o !== void 0 ? (o.value = r,
        n === !1 && i && (o.expiry = this.ttl > 0 ? Date.now() + this.ttl : this.ttl),
        this.moveToEnd(o)) : (this.max > 0 && this.size === this.max && this.evict(!0),
        o = this.items[e] = {
            expiry: this.ttl > 0 ? Date.now() + this.ttl : this.ttl,
            key: e,
            prev: this.last,
            next: null,
            value: r
        },
        ++this.size === 1 ? this.first = o : this.last.next = o,
        this.last = o),
        this
    }
    values(e=this.keys()) {
        return e.map(r => this.get(r))
    }
}
function SP(t=1e3, e=0, r=!1) {
    if (isNaN(t) || t < 0)
        throw new TypeError("Invalid max value");
    if (isNaN(e) || e < 0)
        throw new TypeError("Invalid ttl value");
    if (typeof r != "boolean")
        throw new TypeError("Invalid resetTtl value");
    return new Rle(t,e,r)
}
const Mle = ["serif", "sans-serif", "monospace", "cursive", "fantasy", "system-ui"];
function Rx(t) {
    const e = typeof t.fontSize == "number" ? `${t.fontSize}px` : t.fontSize;
    let r = t.fontFamily;
    Array.isArray(t.fontFamily) || (r = t.fontFamily.split(","));
    for (let n = r.length - 1; n >= 0; n--) {
        let i = r[n].trim();
        !/([\"\'])[^\'\"]+\1/.test(i) && !Mle.includes(i) && (i = `"${i}"`),
        r[n] = i
    }
    return `${t.fontStyle} ${t.fontVariant} ${t.fontWeight} ${e} ${r.join(",")}`
}
const Vg = {
    willReadFrequently: !0
}
  , zi = class Fe {
    static get experimentalLetterSpacingSupported() {
        let e = Fe._experimentalLetterSpacingSupported;
        if (e === void 0) {
            const r = je.get().getCanvasRenderingContext2D().prototype;
            e = Fe._experimentalLetterSpacingSupported = "letterSpacing"in r || "textLetterSpacing"in r
        }
        return e
    }
    constructor(e, r, n, i, o, s, a, l, c) {
        this.text = e,
        this.style = r,
        this.width = n,
        this.height = i,
        this.lines = o,
        this.lineWidths = s,
        this.lineHeight = a,
        this.maxLineWidth = l,
        this.fontProperties = c
    }
    static measureText(e=" ", r, n=Fe._canvas, i=r.wordWrap) {
        var g;
        const o = `${e}-${r.styleKey}-wordWrap-${i}`;
        if (Fe._measurementCache.has(o))
            return Fe._measurementCache.get(o);
        const s = Rx(r)
          , a = Fe.measureFont(s);
        a.fontSize === 0 && (a.fontSize = r.fontSize,
        a.ascent = r.fontSize);
        const l = Fe.__context;
        l.font = s;
        const u = (i ? Fe._wordWrap(e, r, n) : e).split(/(?:\r\n|\r|\n)/)
          , f = new Array(u.length);
        let d = 0;
        for (let p = 0; p < u.length; p++) {
            const v = Fe._measureText(u[p], r.letterSpacing, l);
            f[p] = v,
            d = Math.max(d, v)
        }
        const h = ((g = r._stroke) == null ? void 0 : g.width) || 0;
        let x = d + h;
        r.dropShadow && (x += r.dropShadow.distance);
        const y = r.lineHeight || a.fontSize;
        let m = Math.max(y, a.fontSize + h) + (u.length - 1) * (y + r.leading);
        r.dropShadow && (m += r.dropShadow.distance);
        const E = new Fe(e,r,x,m,u,f,y + r.leading,d,a);
        return Fe._measurementCache.set(o, E),
        E
    }
    static _measureText(e, r, n) {
        let i = !1;
        Fe.experimentalLetterSpacingSupported && (Fe.experimentalLetterSpacing ? (n.letterSpacing = `${r}px`,
        n.textLetterSpacing = `${r}px`,
        i = !0) : (n.letterSpacing = "0px",
        n.textLetterSpacing = "0px"));
        const o = n.measureText(e);
        let s = o.width;
        const a = -o.actualBoundingBoxLeft;
        let c = o.actualBoundingBoxRight - a;
        if (s > 0)
            if (i)
                s -= r,
                c -= r;
            else {
                const u = (Fe.graphemeSegmenter(e).length - 1) * r;
                s += u,
                c += u
            }
        return Math.max(s, c)
    }
    static _wordWrap(e, r, n=Fe._canvas) {
        const i = n.getContext("2d", Vg);
        let o = 0
          , s = ""
          , a = "";
        const l = Object.create(null)
          , {letterSpacing: c, whiteSpace: u} = r
          , f = Fe._collapseSpaces(u)
          , d = Fe._collapseNewlines(u);
        let h = !f;
        const x = r.wordWrapWidth + c
          , y = Fe._tokenize(e);
        for (let m = 0; m < y.length; m++) {
            let E = y[m];
            if (Fe._isNewline(E)) {
                if (!d) {
                    a += Fe._addLine(s),
                    h = !f,
                    s = "",
                    o = 0;
                    continue
                }
                E = " "
            }
            if (f) {
                const p = Fe.isBreakingSpace(E)
                  , v = Fe.isBreakingSpace(s[s.length - 1]);
                if (p && v)
                    continue
            }
            const g = Fe._getFromCache(E, c, l, i);
            if (g > x)
                if (s !== "" && (a += Fe._addLine(s),
                s = "",
                o = 0),
                Fe.canBreakWords(E, r.breakWords)) {
                    const p = Fe.wordWrapSplit(E);
                    for (let v = 0; v < p.length; v++) {
                        let _ = p[v]
                          , b = _
                          , C = 1;
                        for (; p[v + C]; ) {
                            const T = p[v + C];
                            if (!Fe.canBreakChars(b, T, E, v, r.breakWords))
                                _ += T;
                            else
                                break;
                            b = T,
                            C++
                        }
                        v += C - 1;
                        const B = Fe._getFromCache(_, c, l, i);
                        B + o > x && (a += Fe._addLine(s),
                        h = !1,
                        s = "",
                        o = 0),
                        s += _,
                        o += B
                    }
                } else {
                    s.length > 0 && (a += Fe._addLine(s),
                    s = "",
                    o = 0);
                    const p = m === y.length - 1;
                    a += Fe._addLine(E, !p),
                    h = !1,
                    s = "",
                    o = 0
                }
            else
                g + o > x && (h = !1,
                a += Fe._addLine(s),
                s = "",
                o = 0),
                (s.length > 0 || !Fe.isBreakingSpace(E) || h) && (s += E,
                o += g)
        }
        return a += Fe._addLine(s, !1),
        a
    }
    static _addLine(e, r=!0) {
        return e = Fe._trimRight(e),
        e = r ? `${e}
` : e,
        e
    }
    static _getFromCache(e, r, n, i) {
        let o = n[e];
        return typeof o != "number" && (o = Fe._measureText(e, r, i) + r,
        n[e] = o),
        o
    }
    static _collapseSpaces(e) {
        return e === "normal" || e === "pre-line"
    }
    static _collapseNewlines(e) {
        return e === "normal"
    }
    static _trimRight(e) {
        if (typeof e != "string")
            return "";
        for (let r = e.length - 1; r >= 0; r--) {
            const n = e[r];
            if (!Fe.isBreakingSpace(n))
                break;
            e = e.slice(0, -1)
        }
        return e
    }
    static _isNewline(e) {
        return typeof e != "string" ? !1 : Fe._newlines.includes(e.charCodeAt(0))
    }
    static isBreakingSpace(e, r) {
        return typeof e != "string" ? !1 : Fe._breakingSpaces.includes(e.charCodeAt(0))
    }
    static _tokenize(e) {
        const r = [];
        let n = "";
        if (typeof e != "string")
            return r;
        for (let i = 0; i < e.length; i++) {
            const o = e[i]
              , s = e[i + 1];
            if (Fe.isBreakingSpace(o, s) || Fe._isNewline(o)) {
                n !== "" && (r.push(n),
                n = ""),
                o === "\r" && s === `
` ? (r.push(`\r
`),
                i++) : r.push(o);
                continue
            }
            n += o
        }
        return n !== "" && r.push(n),
        r
    }
    static canBreakWords(e, r) {
        return r
    }
    static canBreakChars(e, r, n, i, o) {
        return !0
    }
    static wordWrapSplit(e) {
        return Fe.graphemeSegmenter(e)
    }
    static measureFont(e) {
        if (Fe._fonts[e])
            return Fe._fonts[e];
        const r = Fe._context;
        r.font = e;
        const n = r.measureText(Fe.METRICS_STRING + Fe.BASELINE_SYMBOL)
          , i = {
            ascent: n.actualBoundingBoxAscent,
            descent: n.actualBoundingBoxDescent,
            fontSize: n.actualBoundingBoxAscent + n.actualBoundingBoxDescent
        };
        return Fe._fonts[e] = i,
        i
    }
    static clearMetrics(e="") {
        e ? delete Fe._fonts[e] : Fe._fonts = {}
    }
    static get _canvas() {
        if (!Fe.__canvas) {
            let e;
            try {
                const r = new OffscreenCanvas(0,0)
                  , n = r.getContext("2d", Vg);
                if (n != null && n.measureText)
                    return Fe.__canvas = r,
                    r;
                e = je.get().createCanvas()
            } catch {
                e = je.get().createCanvas()
            }
            e.width = e.height = 10,
            Fe.__canvas = e
        }
        return Fe.__canvas
    }
    static get _context() {
        return Fe.__context || (Fe.__context = Fe._canvas.getContext("2d", Vg)),
        Fe.__context
    }
}
;
zi.METRICS_STRING = "|ÉqÅ";
zi.BASELINE_SYMBOL = "M";
zi.BASELINE_MULTIPLIER = 1.4;
zi.HEIGHT_MULTIPLIER = 2;
zi.graphemeSegmenter = ( () => {
    if (typeof (Intl == null ? void 0 : Intl.Segmenter) == "function") {
        const t = new Intl.Segmenter;
        return e => {
            const r = t.segment(e)
              , n = [];
            let i = 0;
            for (const o of r)
                n[i++] = o.segment;
            return n
        }
    }
    return t => [...t]
}
)();
zi.experimentalLetterSpacing = !1;
zi._fonts = {};
zi._newlines = [10, 13];
zi._breakingSpaces = [9, 32, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8200, 8201, 8202, 8287, 12288];
zi._measurementCache = SP(1e3);
let Fi = zi;
const Pw = [{
    offset: 0,
    color: "white"
}, {
    offset: 1,
    color: "black"
}]
  , ab = class rE {
    constructor(...e) {
        this.uid = Tt("fillGradient"),
        this._tick = 0,
        this.type = "linear",
        this.colorStops = [];
        let r = Nle(e);
        r = {
            ...r.type === "radial" ? rE.defaultRadialOptions : rE.defaultLinearOptions,
            ...DF(r)
        },
        this._textureSize = r.textureSize,
        this._wrapMode = r.wrapMode,
        r.type === "radial" ? (this.center = r.center,
        this.outerCenter = r.outerCenter ?? this.center,
        this.innerRadius = r.innerRadius,
        this.outerRadius = r.outerRadius,
        this.scale = r.scale,
        this.rotation = r.rotation) : (this.start = r.start,
        this.end = r.end),
        this.textureSpace = r.textureSpace,
        this.type = r.type,
        r.colorStops.forEach(i => {
            this.addColorStop(i.offset, i.color)
        }
        )
    }
    addColorStop(e, r) {
        return this.colorStops.push({
            offset: e,
            color: Ut.shared.setValue(r).toHexa()
        }),
        this
    }
    buildLinearGradient() {
        if (this.texture)
            return;
        let {x: e, y: r} = this.start
          , {x: n, y: i} = this.end
          , o = n - e
          , s = i - r;
        const a = o < 0 || s < 0;
        if (this._wrapMode === "clamp-to-edge") {
            if (o < 0) {
                const m = e;
                e = n,
                n = m,
                o *= -1
            }
            if (s < 0) {
                const m = r;
                r = i,
                i = m,
                s *= -1
            }
        }
        const l = this.colorStops.length ? this.colorStops : Pw
          , c = this._textureSize
          , {canvas: u, context: f} = Ow(c, 1)
          , d = a ? f.createLinearGradient(this._textureSize, 0, 0, 0) : f.createLinearGradient(0, 0, this._textureSize, 0);
        Iw(d, l),
        f.fillStyle = d,
        f.fillRect(0, 0, c, 1),
        this.texture = new Be({
            source: new bl({
                resource: u,
                addressMode: this._wrapMode
            })
        });
        const h = Math.sqrt(o * o + s * s)
          , x = Math.atan2(s, o)
          , y = new Pe;
        y.scale(h / c, 1),
        y.rotate(x),
        y.translate(e, r),
        this.textureSpace === "local" && y.scale(c, c),
        this.transform = y
    }
    buildGradient() {
        this.texture || this._tick++,
        this.type === "linear" ? this.buildLinearGradient() : this.buildRadialGradient()
    }
    buildRadialGradient() {
        if (this.texture)
            return;
        const e = this.colorStops.length ? this.colorStops : Pw
          , r = this._textureSize
          , {canvas: n, context: i} = Ow(r, r)
          , {x: o, y: s} = this.center
          , {x: a, y: l} = this.outerCenter
          , c = this.innerRadius
          , u = this.outerRadius
          , f = a - u
          , d = l - u
          , h = r / (u * 2)
          , x = (o - f) * h
          , y = (s - d) * h
          , m = i.createRadialGradient(x, y, c * h, (a - f) * h, (l - d) * h, u * h);
        Iw(m, e),
        i.fillStyle = e[e.length - 1].color,
        i.fillRect(0, 0, r, r),
        i.fillStyle = m,
        i.translate(x, y),
        i.rotate(this.rotation),
        i.scale(1, this.scale),
        i.translate(-x, -y),
        i.fillRect(0, 0, r, r),
        this.texture = new Be({
            source: new bl({
                resource: n,
                addressMode: this._wrapMode
            })
        });
        const E = new Pe;
        E.scale(1 / h, 1 / h),
        E.translate(f, d),
        this.textureSpace === "local" && E.scale(r, r),
        this.transform = E
    }
    destroy() {
        var e;
        (e = this.texture) == null || e.destroy(!0),
        this.texture = null,
        this.transform = null,
        this.colorStops = [],
        this.start = null,
        this.end = null,
        this.center = null,
        this.outerCenter = null
    }
    get styleKey() {
        return `fill-gradient-${this.uid}-${this._tick}`
    }
}
;
ab.defaultLinearOptions = {
    start: {
        x: 0,
        y: 0
    },
    end: {
        x: 0,
        y: 1
    },
    colorStops: [],
    textureSpace: "local",
    type: "linear",
    textureSize: 256,
    wrapMode: "clamp-to-edge"
};
ab.defaultRadialOptions = {
    center: {
        x: .5,
        y: .5
    },
    innerRadius: 0,
    outerRadius: .5,
    colorStops: [],
    scale: 1,
    textureSpace: "local",
    type: "radial",
    textureSize: 256,
    wrapMode: "clamp-to-edge"
};
let ds = ab;
function Iw(t, e) {
    for (let r = 0; r < e.length; r++) {
        const n = e[r];
        t.addColorStop(n.offset, n.color)
    }
}
function Ow(t, e) {
    const r = je.get().createCanvas(t, e)
      , n = r.getContext("2d");
    return {
        canvas: r,
        context: n
    }
}
function Nle(t) {
    let e = t[0] ?? {};
    return (typeof e == "number" || t[1]) && (Re("8.5.2", "use options object instead"),
    e = {
        type: "linear",
        start: {
            x: t[0],
            y: t[1]
        },
        end: {
            x: t[2],
            y: t[3]
        },
        textureSpace: t[4],
        textureSize: t[5] ?? ds.defaultLinearOptions.textureSize
    }),
    e
}
const kw = {
    repeat: {
        addressModeU: "repeat",
        addressModeV: "repeat"
    },
    "repeat-x": {
        addressModeU: "repeat",
        addressModeV: "clamp-to-edge"
    },
    "repeat-y": {
        addressModeU: "clamp-to-edge",
        addressModeV: "repeat"
    },
    "no-repeat": {
        addressModeU: "clamp-to-edge",
        addressModeV: "clamp-to-edge"
    }
};
class u1 {
    constructor(e, r) {
        this.uid = Tt("fillPattern"),
        this._tick = 0,
        this.transform = new Pe,
        this.texture = e,
        this.transform.scale(1 / e.frame.width, 1 / e.frame.height),
        r && (e.source.style.addressModeU = kw[r].addressModeU,
        e.source.style.addressModeV = kw[r].addressModeV)
    }
    setTransform(e) {
        const r = this.texture;
        this.transform.copyFrom(e),
        this.transform.invert(),
        this.transform.scale(1 / r.frame.width, 1 / r.frame.height),
        this._tick++
    }
    get texture() {
        return this._texture
    }
    set texture(e) {
        this._texture !== e && (this._texture = e,
        this._tick++)
    }
    get styleKey() {
        return `fill-pattern-${this.uid}-${this._tick}`
    }
    destroy() {
        this.texture.destroy(!0),
        this.texture = null
    }
}
var Lle = Ule
  , zg = {
    a: 7,
    c: 6,
    h: 1,
    l: 2,
    m: 2,
    q: 4,
    s: 4,
    t: 2,
    v: 1,
    z: 0
}
  , $le = /([astvzqmhlc])([^astvzqmhlc]*)/ig;
function Ule(t) {
    var e = [];
    return t.replace($le, function(r, n, i) {
        var o = n.toLowerCase();
        for (i = Hle(i),
        o == "m" && i.length > 2 && (e.push([n].concat(i.splice(0, 2))),
        o = "l",
        n = n == "m" ? "l" : "L"); ; ) {
            if (i.length == zg[o])
                return i.unshift(n),
                e.push(i);
            if (i.length < zg[o])
                throw new Error("malformed path data");
            e.push([n].concat(i.splice(0, zg[o])))
        }
    }),
    e
}
var Gle = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;
function Hle(t) {
    var e = t.match(Gle);
    return e ? e.map(Number) : []
}
const Vle = Gi(Lle);
function zle(t, e) {
    const r = Vle(t)
      , n = [];
    let i = null
      , o = 0
      , s = 0;
    for (let a = 0; a < r.length; a++) {
        const l = r[a]
          , c = l[0]
          , u = l;
        switch (c) {
        case "M":
            o = u[1],
            s = u[2],
            e.moveTo(o, s);
            break;
        case "m":
            o += u[1],
            s += u[2],
            e.moveTo(o, s);
            break;
        case "H":
            o = u[1],
            e.lineTo(o, s);
            break;
        case "h":
            o += u[1],
            e.lineTo(o, s);
            break;
        case "V":
            s = u[1],
            e.lineTo(o, s);
            break;
        case "v":
            s += u[1],
            e.lineTo(o, s);
            break;
        case "L":
            o = u[1],
            s = u[2],
            e.lineTo(o, s);
            break;
        case "l":
            o += u[1],
            s += u[2],
            e.lineTo(o, s);
            break;
        case "C":
            o = u[5],
            s = u[6],
            e.bezierCurveTo(u[1], u[2], u[3], u[4], o, s);
            break;
        case "c":
            e.bezierCurveTo(o + u[1], s + u[2], o + u[3], s + u[4], o + u[5], s + u[6]),
            o += u[5],
            s += u[6];
            break;
        case "S":
            o = u[3],
            s = u[4],
            e.bezierCurveToShort(u[1], u[2], o, s);
            break;
        case "s":
            e.bezierCurveToShort(o + u[1], s + u[2], o + u[3], s + u[4]),
            o += u[3],
            s += u[4];
            break;
        case "Q":
            o = u[3],
            s = u[4],
            e.quadraticCurveTo(u[1], u[2], o, s);
            break;
        case "q":
            e.quadraticCurveTo(o + u[1], s + u[2], o + u[3], s + u[4]),
            o += u[3],
            s += u[4];
            break;
        case "T":
            o = u[1],
            s = u[2],
            e.quadraticCurveToShort(o, s);
            break;
        case "t":
            o += u[1],
            s += u[2],
            e.quadraticCurveToShort(o, s);
            break;
        case "A":
            o = u[6],
            s = u[7],
            e.arcToSvg(u[1], u[2], u[3], u[4], u[5], o, s);
            break;
        case "a":
            o += u[6],
            s += u[7],
            e.arcToSvg(u[1], u[2], u[3], u[4], u[5], o, s);
            break;
        case "Z":
        case "z":
            e.closePath(),
            n.length > 0 && (i = n.pop(),
            i ? (o = i.startX,
            s = i.startY) : (o = 0,
            s = 0)),
            i = null;
            break;
        default:
            Ne(`Unknown SVG path command: ${c}`)
        }
        c !== "Z" && c !== "z" && i === null && (i = {
            startX: o,
            startY: s
        },
        n.push(i))
    }
    return e
}
class lb {
    constructor(e=0, r=0, n=0) {
        this.type = "circle",
        this.x = e,
        this.y = r,
        this.radius = n
    }
    clone() {
        return new lb(this.x,this.y,this.radius)
    }
    contains(e, r) {
        if (this.radius <= 0)
            return !1;
        const n = this.radius * this.radius;
        let i = this.x - e
          , o = this.y - r;
        return i *= i,
        o *= o,
        i + o <= n
    }
    strokeContains(e, r, n, i=.5) {
        if (this.radius === 0)
            return !1;
        const o = this.x - e
          , s = this.y - r
          , a = this.radius
          , l = (1 - i) * n
          , c = Math.sqrt(o * o + s * s);
        return c <= a + l && c > a - (n - l)
    }
    getBounds(e) {
        return e || (e = new mt),
        e.x = this.x - this.radius,
        e.y = this.y - this.radius,
        e.width = this.radius * 2,
        e.height = this.radius * 2,
        e
    }
    copyFrom(e) {
        return this.x = e.x,
        this.y = e.y,
        this.radius = e.radius,
        this
    }
    copyTo(e) {
        return e.copyFrom(this),
        e
    }
    toString() {
        return `[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`
    }
}
class cb {
    constructor(e=0, r=0, n=0, i=0) {
        this.type = "ellipse",
        this.x = e,
        this.y = r,
        this.halfWidth = n,
        this.halfHeight = i
    }
    clone() {
        return new cb(this.x,this.y,this.halfWidth,this.halfHeight)
    }
    contains(e, r) {
        if (this.halfWidth <= 0 || this.halfHeight <= 0)
            return !1;
        let n = (e - this.x) / this.halfWidth
          , i = (r - this.y) / this.halfHeight;
        return n *= n,
        i *= i,
        n + i <= 1
    }
    strokeContains(e, r, n, i=.5) {
        const {halfWidth: o, halfHeight: s} = this;
        if (o <= 0 || s <= 0)
            return !1;
        const a = n * (1 - i)
          , l = n - a
          , c = o - l
          , u = s - l
          , f = o + a
          , d = s + a
          , h = e - this.x
          , x = r - this.y
          , y = h * h / (c * c) + x * x / (u * u)
          , m = h * h / (f * f) + x * x / (d * d);
        return y > 1 && m <= 1
    }
    getBounds(e) {
        return e || (e = new mt),
        e.x = this.x - this.halfWidth,
        e.y = this.y - this.halfHeight,
        e.width = this.halfWidth * 2,
        e.height = this.halfHeight * 2,
        e
    }
    copyFrom(e) {
        return this.x = e.x,
        this.y = e.y,
        this.halfWidth = e.halfWidth,
        this.halfHeight = e.halfHeight,
        this
    }
    copyTo(e) {
        return e.copyFrom(this),
        e
    }
    toString() {
        return `[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`
    }
}
function jle(t, e, r, n, i, o) {
    const s = t - r
      , a = e - n
      , l = i - r
      , c = o - n
      , u = s * l + a * c
      , f = l * l + c * c;
    let d = -1;
    f !== 0 && (d = u / f);
    let h, x;
    d < 0 ? (h = r,
    x = n) : d > 1 ? (h = i,
    x = o) : (h = r + d * l,
    x = n + d * c);
    const y = t - h
      , m = e - x;
    return y * y + m * m
}
let Wle, Yle;
class M0 {
    constructor(...e) {
        this.type = "polygon";
        let r = Array.isArray(e[0]) ? e[0] : e;
        if (typeof r[0] != "number") {
            const n = [];
            for (let i = 0, o = r.length; i < o; i++)
                n.push(r[i].x, r[i].y);
            r = n
        }
        this.points = r,
        this.closePath = !0
    }
    isClockwise() {
        let e = 0;
        const r = this.points
          , n = r.length;
        for (let i = 0; i < n; i += 2) {
            const o = r[i]
              , s = r[i + 1]
              , a = r[(i + 2) % n]
              , l = r[(i + 3) % n];
            e += (a - o) * (l + s)
        }
        return e < 0
    }
    containsPolygon(e) {
        const r = this.getBounds(Wle)
          , n = e.getBounds(Yle);
        if (!r.containsRect(n))
            return !1;
        const i = e.points;
        for (let o = 0; o < i.length; o += 2) {
            const s = i[o]
              , a = i[o + 1];
            if (!this.contains(s, a))
                return !1
        }
        return !0
    }
    clone() {
        const e = this.points.slice()
          , r = new M0(e);
        return r.closePath = this.closePath,
        r
    }
    contains(e, r) {
        let n = !1;
        const i = this.points.length / 2;
        for (let o = 0, s = i - 1; o < i; s = o++) {
            const a = this.points[o * 2]
              , l = this.points[o * 2 + 1]
              , c = this.points[s * 2]
              , u = this.points[s * 2 + 1];
            l > r != u > r && e < (c - a) * ((r - l) / (u - l)) + a && (n = !n)
        }
        return n
    }
    strokeContains(e, r, n, i=.5) {
        const o = n * n
          , s = o * (1 - i)
          , a = o - s
          , {points: l} = this
          , c = l.length - (this.closePath ? 0 : 2);
        for (let u = 0; u < c; u += 2) {
            const f = l[u]
              , d = l[u + 1]
              , h = l[(u + 2) % l.length]
              , x = l[(u + 3) % l.length]
              , y = jle(e, r, f, d, h, x)
              , m = Math.sign((h - f) * (r - d) - (x - d) * (e - f));
            if (y <= (m < 0 ? a : s))
                return !0
        }
        return !1
    }
    getBounds(e) {
        e || (e = new mt);
        const r = this.points;
        let n = 1 / 0
          , i = -1 / 0
          , o = 1 / 0
          , s = -1 / 0;
        for (let a = 0, l = r.length; a < l; a += 2) {
            const c = r[a]
              , u = r[a + 1];
            n = c < n ? c : n,
            i = c > i ? c : i,
            o = u < o ? u : o,
            s = u > s ? u : s
        }
        return e.x = n,
        e.width = i - n,
        e.y = o,
        e.height = s - o,
        e
    }
    copyFrom(e) {
        return this.points = e.points.slice(),
        this.closePath = e.closePath,
        this
    }
    copyTo(e) {
        return e.copyFrom(this),
        e
    }
    toString() {
        return `[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce( (e, r) => `${e}, ${r}`, "")}]`
    }
    get lastX() {
        return this.points[this.points.length - 2]
    }
    get lastY() {
        return this.points[this.points.length - 1]
    }
    get x() {
        return Re("8.11.0", "Polygon.lastX is deprecated, please use Polygon.lastX instead."),
        this.points[this.points.length - 2]
    }
    get y() {
        return Re("8.11.0", "Polygon.y is deprecated, please use Polygon.lastY instead."),
        this.points[this.points.length - 1]
    }
    get startX() {
        return this.points[0]
    }
    get startY() {
        return this.points[1]
    }
}
const xh = (t, e, r, n, i, o, s) => {
    const a = t - r
      , l = e - n
      , c = Math.sqrt(a * a + l * l);
    return c >= i - o && c <= i + s
}
;
class ub {
    constructor(e=0, r=0, n=0, i=0, o=20) {
        this.type = "roundedRectangle",
        this.x = e,
        this.y = r,
        this.width = n,
        this.height = i,
        this.radius = o
    }
    getBounds(e) {
        return e || (e = new mt),
        e.x = this.x,
        e.y = this.y,
        e.width = this.width,
        e.height = this.height,
        e
    }
    clone() {
        return new ub(this.x,this.y,this.width,this.height,this.radius)
    }
    copyFrom(e) {
        return this.x = e.x,
        this.y = e.y,
        this.width = e.width,
        this.height = e.height,
        this
    }
    copyTo(e) {
        return e.copyFrom(this),
        e
    }
    contains(e, r) {
        if (this.width <= 0 || this.height <= 0)
            return !1;
        if (e >= this.x && e <= this.x + this.width && r >= this.y && r <= this.y + this.height) {
            const n = Math.max(0, Math.min(this.radius, Math.min(this.width, this.height) / 2));
            if (r >= this.y + n && r <= this.y + this.height - n || e >= this.x + n && e <= this.x + this.width - n)
                return !0;
            let i = e - (this.x + n)
              , o = r - (this.y + n);
            const s = n * n;
            if (i * i + o * o <= s || (i = e - (this.x + this.width - n),
            i * i + o * o <= s) || (o = r - (this.y + this.height - n),
            i * i + o * o <= s) || (i = e - (this.x + n),
            i * i + o * o <= s))
                return !0
        }
        return !1
    }
    strokeContains(e, r, n, i=.5) {
        const {x: o, y: s, width: a, height: l, radius: c} = this
          , u = n * (1 - i)
          , f = n - u
          , d = o + c
          , h = s + c
          , x = a - c * 2
          , y = l - c * 2
          , m = o + a
          , E = s + l;
        return (e >= o - u && e <= o + f || e >= m - f && e <= m + u) && r >= h && r <= h + y || (r >= s - u && r <= s + f || r >= E - f && r <= E + u) && e >= d && e <= d + x ? !0 : e < d && r < h && xh(e, r, d, h, c, f, u) || e > m - c && r < h && xh(e, r, m - c, h, c, f, u) || e > m - c && r > E - c && xh(e, r, m - c, E - c, c, f, u) || e < d && r > E - c && xh(e, r, d, E - c, c, f, u)
    }
    toString() {
        return `[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`
    }
}
const TP = {};
function fb(t, e, r) {
    let n = 2166136261;
    for (let i = 0; i < e; i++)
        n ^= t[i].uid,
        n = Math.imul(n, 16777619),
        n >>>= 0;
    return TP[n] || Xle(t, e, n, r)
}
function Xle(t, e, r, n) {
    const i = {};
    let o = 0;
    for (let a = 0; a < n; a++) {
        const l = a < e ? t[a] : Be.EMPTY.source;
        i[o++] = l.source,
        i[o++] = l.style
    }
    const s = new es(i);
    return TP[r] = s,
    s
}
class Cc {
    constructor(e) {
        typeof e == "number" ? this.rawBinaryData = new ArrayBuffer(e) : e instanceof Uint8Array ? this.rawBinaryData = e.buffer : this.rawBinaryData = e,
        this.uint32View = new Uint32Array(this.rawBinaryData),
        this.float32View = new Float32Array(this.rawBinaryData),
        this.size = this.rawBinaryData.byteLength
    }
    get int8View() {
        return this._int8View || (this._int8View = new Int8Array(this.rawBinaryData)),
        this._int8View
    }
    get uint8View() {
        return this._uint8View || (this._uint8View = new Uint8Array(this.rawBinaryData)),
        this._uint8View
    }
    get int16View() {
        return this._int16View || (this._int16View = new Int16Array(this.rawBinaryData)),
        this._int16View
    }
    get int32View() {
        return this._int32View || (this._int32View = new Int32Array(this.rawBinaryData)),
        this._int32View
    }
    get float64View() {
        return this._float64Array || (this._float64Array = new Float64Array(this.rawBinaryData)),
        this._float64Array
    }
    get bigUint64View() {
        return this._bigUint64Array || (this._bigUint64Array = new BigUint64Array(this.rawBinaryData)),
        this._bigUint64Array
    }
    view(e) {
        return this[`${e}View`]
    }
    destroy() {
        this.rawBinaryData = null,
        this.uint32View = null,
        this.float32View = null,
        this.uint16View = null,
        this._int8View = null,
        this._uint8View = null,
        this._int16View = null,
        this._int32View = null,
        this._float64Array = null,
        this._bigUint64Array = null
    }
    static sizeOf(e) {
        switch (e) {
        case "int8":
        case "uint8":
            return 1;
        case "int16":
        case "uint16":
            return 2;
        case "int32":
        case "uint32":
        case "float32":
            return 4;
        default:
            throw new Error(`${e} isn't a valid view type`)
        }
    }
}
function nE(t, e) {
    const r = t.byteLength / 8 | 0
      , n = new Float64Array(t,0,r);
    new Float64Array(e,0,r).set(n);
    const o = t.byteLength - r * 8;
    if (o > 0) {
        const s = new Uint8Array(t,r * 8,o);
        new Uint8Array(e,r * 8,o).set(s)
    }
}
const Kle = {
    normal: "normal-npm",
    add: "add-npm",
    screen: "screen-npm"
};
var ar = (t => (t[t.DISABLED = 0] = "DISABLED",
t[t.RENDERING_MASK_ADD = 1] = "RENDERING_MASK_ADD",
t[t.MASK_ACTIVE = 2] = "MASK_ACTIVE",
t[t.INVERSE_MASK_ACTIVE = 3] = "INVERSE_MASK_ACTIVE",
t[t.RENDERING_MASK_REMOVE = 4] = "RENDERING_MASK_REMOVE",
t[t.NONE = 5] = "NONE",
t))(ar || {});
function Cf(t, e) {
    return e.alphaMode === "no-premultiply-alpha" && Kle[t] || t
}
const qle = ["precision mediump float;", "void main(void){", "float test = 0.1;", "%forloop%", "gl_FragColor = vec4(0.0);", "}"].join(`
`);
function Zle(t) {
    let e = "";
    for (let r = 0; r < t; ++r)
        r > 0 && (e += `
else `),
        r < t - 1 && (e += `if(test == ${r}.0){}`);
    return e
}
function DP(t, e) {
    if (t === 0)
        throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");
    const r = e.createShader(e.FRAGMENT_SHADER);
    try {
        for (; ; ) {
            const n = qle.replace(/%forloop%/gi, Zle(t));
            if (e.shaderSource(r, n),
            e.compileShader(r),
            !e.getShaderParameter(r, e.COMPILE_STATUS))
                t = t / 2 | 0;
            else
                break
        }
    } finally {
        e.deleteShader(r)
    }
    return t
}
let sc = null;
function Jle() {
    var e;
    if (sc)
        return sc;
    const t = sP();
    return sc = t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),
    sc = DP(sc, t),
    (e = t.getExtension("WEBGL_lose_context")) == null || e.loseContext(),
    sc
}
class Qle {
    constructor() {
        this.ids = Object.create(null),
        this.textures = [],
        this.count = 0
    }
    clear() {
        for (let e = 0; e < this.count; e++) {
            const r = this.textures[e];
            this.textures[e] = null,
            this.ids[r.uid] = null
        }
        this.count = 0
    }
}
class ece {
    constructor() {
        this.renderPipeId = "batch",
        this.action = "startBatch",
        this.start = 0,
        this.size = 0,
        this.textures = new Qle,
        this.blendMode = "normal",
        this.topology = "triangle-strip",
        this.canBundle = !0
    }
    destroy() {
        this.textures = null,
        this.gpuBindGroup = null,
        this.bindGroup = null,
        this.batcher = null
    }
}
const N0 = [];
let Mx = 0;
Cu.register({
    clear: () => {
        if (N0.length > 0)
            for (const t of N0)
                t && t.destroy();
        N0.length = 0,
        Mx = 0
    }
});
function Rw() {
    return Mx > 0 ? N0[--Mx] : new ece
}
function Mw(t) {
    N0[Mx++] = t
}
let Zu = 0;
const FP = class PP {
    constructor(e) {
        this.uid = Tt("batcher"),
        this.dirty = !0,
        this.batchIndex = 0,
        this.batches = [],
        this._elements = [],
        e = {
            ...PP.defaultOptions,
            ...e
        },
        e.maxTextures || (Re("v8.8.0", "maxTextures is a required option for Batcher now, please pass it in the options"),
        e.maxTextures = Jle());
        const {maxTextures: r, attributesInitialSize: n, indicesInitialSize: i} = e;
        this.attributeBuffer = new Cc(n * 4),
        this.indexBuffer = new Uint16Array(i),
        this.maxTextures = r
    }
    begin() {
        this.elementSize = 0,
        this.elementStart = 0,
        this.indexSize = 0,
        this.attributeSize = 0;
        for (let e = 0; e < this.batchIndex; e++)
            Mw(this.batches[e]);
        this.batchIndex = 0,
        this._batchIndexStart = 0,
        this._batchIndexSize = 0,
        this.dirty = !0
    }
    add(e) {
        this._elements[this.elementSize++] = e,
        e._indexStart = this.indexSize,
        e._attributeStart = this.attributeSize,
        e._batcher = this,
        this.indexSize += e.indexSize,
        this.attributeSize += e.attributeSize * this.vertexSize
    }
    checkAndUpdateTexture(e, r) {
        const n = e._batch.textures.ids[r._source.uid];
        return !n && n !== 0 ? !1 : (e._textureId = n,
        e.texture = r,
        !0)
    }
    updateElement(e) {
        this.dirty = !0;
        const r = this.attributeBuffer;
        e.packAsQuad ? this.packQuadAttributes(e, r.float32View, r.uint32View, e._attributeStart, e._textureId) : this.packAttributes(e, r.float32View, r.uint32View, e._attributeStart, e._textureId)
    }
    break(e) {
        const r = this._elements;
        if (!r[this.elementStart])
            return;
        let n = Rw()
          , i = n.textures;
        i.clear();
        const o = r[this.elementStart];
        let s = Cf(o.blendMode, o.texture._source)
          , a = o.topology;
        this.attributeSize * 4 > this.attributeBuffer.size && this._resizeAttributeBuffer(this.attributeSize * 4),
        this.indexSize > this.indexBuffer.length && this._resizeIndexBuffer(this.indexSize);
        const l = this.attributeBuffer.float32View
          , c = this.attributeBuffer.uint32View
          , u = this.indexBuffer;
        let f = this._batchIndexSize
          , d = this._batchIndexStart
          , h = "startBatch";
        const x = this.maxTextures;
        for (let y = this.elementStart; y < this.elementSize; ++y) {
            const m = r[y];
            r[y] = null;
            const g = m.texture._source
              , p = Cf(m.blendMode, g)
              , v = s !== p || a !== m.topology;
            if (g._batchTick === Zu && !v) {
                m._textureId = g._textureBindLocation,
                f += m.indexSize,
                m.packAsQuad ? (this.packQuadAttributes(m, l, c, m._attributeStart, m._textureId),
                this.packQuadIndex(u, m._indexStart, m._attributeStart / this.vertexSize)) : (this.packAttributes(m, l, c, m._attributeStart, m._textureId),
                this.packIndex(m, u, m._indexStart, m._attributeStart / this.vertexSize)),
                m._batch = n;
                continue
            }
            g._batchTick = Zu,
            (i.count >= x || v) && (this._finishBatch(n, d, f - d, i, s, a, e, h),
            h = "renderBatch",
            d = f,
            s = p,
            a = m.topology,
            n = Rw(),
            i = n.textures,
            i.clear(),
            ++Zu),
            m._textureId = g._textureBindLocation = i.count,
            i.ids[g.uid] = i.count,
            i.textures[i.count++] = g,
            m._batch = n,
            f += m.indexSize,
            m.packAsQuad ? (this.packQuadAttributes(m, l, c, m._attributeStart, m._textureId),
            this.packQuadIndex(u, m._indexStart, m._attributeStart / this.vertexSize)) : (this.packAttributes(m, l, c, m._attributeStart, m._textureId),
            this.packIndex(m, u, m._indexStart, m._attributeStart / this.vertexSize))
        }
        i.count > 0 && (this._finishBatch(n, d, f - d, i, s, a, e, h),
        d = f,
        ++Zu),
        this.elementStart = this.elementSize,
        this._batchIndexStart = d,
        this._batchIndexSize = f
    }
    _finishBatch(e, r, n, i, o, s, a, l) {
        e.gpuBindGroup = null,
        e.bindGroup = null,
        e.action = l,
        e.batcher = this,
        e.textures = i,
        e.blendMode = o,
        e.topology = s,
        e.start = r,
        e.size = n,
        ++Zu,
        this.batches[this.batchIndex++] = e,
        a.add(e)
    }
    finish(e) {
        this.break(e)
    }
    ensureAttributeBuffer(e) {
        e * 4 <= this.attributeBuffer.size || this._resizeAttributeBuffer(e * 4)
    }
    ensureIndexBuffer(e) {
        e <= this.indexBuffer.length || this._resizeIndexBuffer(e)
    }
    _resizeAttributeBuffer(e) {
        const r = Math.max(e, this.attributeBuffer.size * 2)
          , n = new Cc(r);
        nE(this.attributeBuffer.rawBinaryData, n.rawBinaryData),
        this.attributeBuffer = n
    }
    _resizeIndexBuffer(e) {
        const r = this.indexBuffer;
        let n = Math.max(e, r.length * 1.5);
        n += n % 2;
        const i = n > 65535 ? new Uint32Array(n) : new Uint16Array(n);
        if (i.BYTES_PER_ELEMENT !== r.BYTES_PER_ELEMENT)
            for (let o = 0; o < r.length; o++)
                i[o] = r[o];
        else
            nE(r.buffer, i.buffer);
        this.indexBuffer = i
    }
    packQuadIndex(e, r, n) {
        e[r] = n + 0,
        e[r + 1] = n + 1,
        e[r + 2] = n + 2,
        e[r + 3] = n + 0,
        e[r + 4] = n + 2,
        e[r + 5] = n + 3
    }
    packIndex(e, r, n, i) {
        const o = e.indices
          , s = e.indexSize
          , a = e.indexOffset
          , l = e.attributeOffset;
        for (let c = 0; c < s; c++)
            r[n++] = i + o[c + a] - l
    }
    destroy(e={}) {
        var r;
        if (this.batches !== null) {
            for (let n = 0; n < this.batches.length; n++)
                Mw(this.batches[n]);
            this.batches = null,
            this.geometry.destroy(!0),
            this.geometry = null,
            e.shader && ((r = this.shader) == null || r.destroy(),
            this.shader = null);
            for (let n = 0; n < this._elements.length; n++)
                this._elements[n] && (this._elements[n]._batch = null);
            this._elements = null,
            this.indexBuffer = null,
            this.attributeBuffer.destroy(),
            this.attributeBuffer = null
        }
    }
}
;
FP.defaultOptions = {
    maxTextures: null,
    attributesInitialSize: 4,
    indicesInitialSize: 6
};
let tce = FP;
var it = (t => (t[t.MAP_READ = 1] = "MAP_READ",
t[t.MAP_WRITE = 2] = "MAP_WRITE",
t[t.COPY_SRC = 4] = "COPY_SRC",
t[t.COPY_DST = 8] = "COPY_DST",
t[t.INDEX = 16] = "INDEX",
t[t.VERTEX = 32] = "VERTEX",
t[t.UNIFORM = 64] = "UNIFORM",
t[t.STORAGE = 128] = "STORAGE",
t[t.INDIRECT = 256] = "INDIRECT",
t[t.QUERY_RESOLVE = 512] = "QUERY_RESOLVE",
t[t.STATIC = 1024] = "STATIC",
t))(it || {});
let Wn = class extends Qn {
    constructor(e) {
        let {data: r, size: n} = e;
        const {usage: i, label: o, shrinkToFit: s} = e;
        super(),
        this.uid = Tt("buffer"),
        this._resourceType = "buffer",
        this._resourceId = Tt("resource"),
        this._touched = 0,
        this._updateID = 1,
        this._dataInt32 = null,
        this.shrinkToFit = !0,
        this.destroyed = !1,
        r instanceof Array && (r = new Float32Array(r)),
        this._data = r,
        n ?? (n = r == null ? void 0 : r.byteLength);
        const a = !!r;
        this.descriptor = {
            size: n,
            usage: i,
            mappedAtCreation: a,
            label: o
        },
        this.shrinkToFit = s ?? !0
    }
    get data() {
        return this._data
    }
    set data(e) {
        this.setDataWithSize(e, e.length, !0)
    }
    get dataInt32() {
        return this._dataInt32 || (this._dataInt32 = new Int32Array(this.data.buffer)),
        this._dataInt32
    }
    get static() {
        return !!(this.descriptor.usage & it.STATIC)
    }
    set static(e) {
        e ? this.descriptor.usage |= it.STATIC : this.descriptor.usage &= ~it.STATIC
    }
    setDataWithSize(e, r, n) {
        if (this._updateID++,
        this._updateSize = r * e.BYTES_PER_ELEMENT,
        this._data === e) {
            n && this.emit("update", this);
            return
        }
        const i = this._data;
        if (this._data = e,
        this._dataInt32 = null,
        !i || i.length !== e.length) {
            !this.shrinkToFit && i && e.byteLength < i.byteLength ? n && this.emit("update", this) : (this.descriptor.size = e.byteLength,
            this._resourceId = Tt("resource"),
            this.emit("change", this));
            return
        }
        n && this.emit("update", this)
    }
    update(e) {
        this._updateSize = e ?? this._updateSize,
        this._updateID++,
        this.emit("update", this)
    }
    destroy() {
        this.destroyed = !0,
        this.emit("destroy", this),
        this.emit("change", this),
        this._data = null,
        this.descriptor = null,
        this.removeAllListeners()
    }
}
;
function IP(t, e) {
    if (!(t instanceof Wn)) {
        let r = e ? it.INDEX : it.VERTEX;
        t instanceof Array && (e ? (t = new Uint32Array(t),
        r = it.INDEX | it.COPY_DST) : (t = new Float32Array(t),
        r = it.VERTEX | it.COPY_DST)),
        t = new Wn({
            data: t,
            label: e ? "index-mesh-buffer" : "vertex-mesh-buffer",
            usage: r
        })
    }
    return t
}
function rce(t, e, r) {
    const n = t.getAttribute(e);
    if (!n)
        return r.minX = 0,
        r.minY = 0,
        r.maxX = 0,
        r.maxY = 0,
        r;
    const i = n.buffer.data;
    let o = 1 / 0
      , s = 1 / 0
      , a = -1 / 0
      , l = -1 / 0;
    const c = i.BYTES_PER_ELEMENT
      , u = (n.offset || 0) / c
      , f = (n.stride || 2 * 4) / c;
    for (let d = u; d < i.length; d += f) {
        const h = i[d]
          , x = i[d + 1];
        h > a && (a = h),
        x > l && (l = x),
        h < o && (o = h),
        x < s && (s = x)
    }
    return r.minX = o,
    r.minY = s,
    r.maxX = a,
    r.maxY = l,
    r
}
function nce(t) {
    return (t instanceof Wn || Array.isArray(t) || t.BYTES_PER_ELEMENT) && (t = {
        buffer: t
    }),
    t.buffer = IP(t.buffer, !1),
    t
}
class id extends Qn {
    constructor(e={}) {
        super(),
        this.uid = Tt("geometry"),
        this._layoutKey = 0,
        this.instanceCount = 1,
        this._bounds = new Vr,
        this._boundsDirty = !0;
        const {attributes: r, indexBuffer: n, topology: i} = e;
        if (this.buffers = [],
        this.attributes = {},
        r)
            for (const o in r)
                this.addAttribute(o, r[o]);
        this.instanceCount = e.instanceCount ?? 1,
        n && this.addIndex(n),
        this.topology = i || "triangle-list"
    }
    onBufferUpdate() {
        this._boundsDirty = !0,
        this.emit("update", this)
    }
    getAttribute(e) {
        return this.attributes[e]
    }
    getIndex() {
        return this.indexBuffer
    }
    getBuffer(e) {
        return this.getAttribute(e).buffer
    }
    getSize() {
        for (const e in this.attributes) {
            const r = this.attributes[e];
            return r.buffer.data.length / (r.stride / 4 || r.size)
        }
        return 0
    }
    addAttribute(e, r) {
        const n = nce(r);
        this.buffers.indexOf(n.buffer) === -1 && (this.buffers.push(n.buffer),
        n.buffer.on("update", this.onBufferUpdate, this),
        n.buffer.on("change", this.onBufferUpdate, this)),
        this.attributes[e] = n
    }
    addIndex(e) {
        this.indexBuffer = IP(e, !0),
        this.buffers.push(this.indexBuffer)
    }
    get bounds() {
        return this._boundsDirty ? (this._boundsDirty = !1,
        rce(this, "aPosition", this._bounds)) : this._bounds
    }
    destroy(e=!1) {
        var r;
        this.emit("destroy", this),
        this.removeAllListeners(),
        e && this.buffers.forEach(n => n.destroy()),
        (r = this.indexBuffer) == null || r.destroy(),
        this.attributes = null,
        this.buffers = null,
        this.indexBuffer = null,
        this._bounds = null
    }
}
const ice = new Float32Array(1)
  , oce = new Uint32Array(1);
class sce extends id {
    constructor() {
        const r = new Wn({
            data: ice,
            label: "attribute-batch-buffer",
            usage: it.VERTEX | it.COPY_DST,
            shrinkToFit: !1
        })
          , n = new Wn({
            data: oce,
            label: "index-batch-buffer",
            usage: it.INDEX | it.COPY_DST,
            shrinkToFit: !1
        })
          , i = 6 * 4;
        super({
            attributes: {
                aPosition: {
                    buffer: r,
                    format: "float32x2",
                    stride: i,
                    offset: 0
                },
                aUV: {
                    buffer: r,
                    format: "float32x2",
                    stride: i,
                    offset: 2 * 4
                },
                aColor: {
                    buffer: r,
                    format: "unorm8x4",
                    stride: i,
                    offset: 4 * 4
                },
                aTextureIdAndRound: {
                    buffer: r,
                    format: "uint16x2",
                    stride: i,
                    offset: 5 * 4
                }
            },
            indexBuffer: n
        })
    }
}
function Nw(t, e, r) {
    if (t)
        for (const n in t) {
            const i = n.toLocaleLowerCase()
              , o = e[i];
            if (o) {
                let s = t[n];
                n === "header" && (s = s.replace(/@in\s+[^;]+;\s*/g, "").replace(/@out\s+[^;]+;\s*/g, "")),
                r && o.push(`//----${r}----//`),
                o.push(s)
            } else
                Ne(`${n} placement hook does not exist in shader`)
        }
}
const ace = /\{\{(.*?)\}\}/g;
function Lw(t) {
    var n;
    const e = {};
    return (((n = t.match(ace)) == null ? void 0 : n.map(i => i.replace(/[{()}]/g, ""))) ?? []).forEach(i => {
        e[i] = []
    }
    ),
    e
}
function $w(t, e) {
    let r;
    const n = /@in\s+([^;]+);/g;
    for (; (r = n.exec(t)) !== null; )
        e.push(r[1])
}
function Uw(t, e, r=!1) {
    const n = [];
    $w(e, n),
    t.forEach(a => {
        a.header && $w(a.header, n)
    }
    );
    const i = n;
    r && i.sort();
    const o = i.map( (a, l) => `       @location(${l}) ${a},`).join(`
`);
    let s = e.replace(/@in\s+[^;]+;\s*/g, "");
    return s = s.replace("{{in}}", `
${o}
`),
    s
}
function Gw(t, e) {
    let r;
    const n = /@out\s+([^;]+);/g;
    for (; (r = n.exec(t)) !== null; )
        e.push(r[1])
}
function lce(t) {
    const r = /\b(\w+)\s*:/g.exec(t);
    return r ? r[1] : ""
}
function cce(t) {
    const e = /@.*?\s+/g;
    return t.replace(e, "")
}
function uce(t, e) {
    const r = [];
    Gw(e, r),
    t.forEach(l => {
        l.header && Gw(l.header, r)
    }
    );
    let n = 0;
    const i = r.sort().map(l => l.indexOf("builtin") > -1 ? l : `@location(${n++}) ${l}`).join(`,
`)
      , o = r.sort().map(l => `       var ${cce(l)};`).join(`
`)
      , s = `return VSOutput(
            ${r.sort().map(l => ` ${lce(l)}`).join(`,
`)});`;
    let a = e.replace(/@out\s+[^;]+;\s*/g, "");
    return a = a.replace("{{struct}}", `
${i}
`),
    a = a.replace("{{start}}", `
${o}
`),
    a = a.replace("{{return}}", `
${s}
`),
    a
}
function Hw(t, e) {
    let r = t;
    for (const n in e) {
        const i = e[n];
        i.join(`
`).length ? r = r.replace(`{{${n}}}`, `//-----${n} START-----//
${i.join(`
`)}
//----${n} FINISH----//`) : r = r.replace(`{{${n}}}`, "")
    }
    return r
}
const Hs = Object.create(null)
  , jg = new Map;
let fce = 0;
function dce({template: t, bits: e}) {
    const r = OP(t, e);
    if (Hs[r])
        return Hs[r];
    const {vertex: n, fragment: i} = xce(t, e);
    return Hs[r] = kP(n, i, e),
    Hs[r]
}
function hce({template: t, bits: e}) {
    const r = OP(t, e);
    return Hs[r] || (Hs[r] = kP(t.vertex, t.fragment, e)),
    Hs[r]
}
function xce(t, e) {
    const r = e.map(s => s.vertex).filter(s => !!s)
      , n = e.map(s => s.fragment).filter(s => !!s);
    let i = Uw(r, t.vertex, !0);
    i = uce(r, i);
    const o = Uw(n, t.fragment, !0);
    return {
        vertex: i,
        fragment: o
    }
}
function OP(t, e) {
    return e.map(r => (jg.has(r) || jg.set(r, fce++),
    jg.get(r))).sort( (r, n) => r - n).join("-") + t.vertex + t.fragment
}
function kP(t, e, r) {
    const n = Lw(t)
      , i = Lw(e);
    return r.forEach(o => {
        Nw(o.vertex, n, o.name),
        Nw(o.fragment, i, o.name)
    }
    ),
    {
        vertex: Hw(t, n),
        fragment: Hw(e, i)
    }
}
const pce = `
    @in aPosition: vec2<f32>;
    @in aUV: vec2<f32>;

    @out @builtin(position) vPosition: vec4<f32>;
    @out vUV : vec2<f32>;
    @out vColor : vec4<f32>;

    {{header}}

    struct VSOutput {
        {{struct}}
    };

    @vertex
    fn main( {{in}} ) -> VSOutput {

        var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;
        var modelMatrix = mat3x3<f32>(
            1.0, 0.0, 0.0,
            0.0, 1.0, 0.0,
            0.0, 0.0, 1.0
          );
        var position = aPosition;
        var uv = aUV;

        {{start}}

        vColor = vec4<f32>(1., 1., 1., 1.);

        {{main}}

        vUV = uv;

        var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;

        vPosition =  vec4<f32>((modelViewProjectionMatrix *  vec3<f32>(position, 1.0)).xy, 0.0, 1.0);

        vColor *= globalUniforms.uWorldColorAlpha;

        {{end}}

        {{return}}
    };
`
  , gce = `
    @in vUV : vec2<f32>;
    @in vColor : vec4<f32>;

    {{header}}

    @fragment
    fn main(
        {{in}}
      ) -> @location(0) vec4<f32> {

        {{start}}

        var outColor:vec4<f32>;

        {{main}}

        var finalColor:vec4<f32> = outColor * vColor;

        {{end}}

        return finalColor;
      };
`
  , mce = `
    in vec2 aPosition;
    in vec2 aUV;

    out vec4 vColor;
    out vec2 vUV;

    {{header}}

    void main(void){

        mat3 worldTransformMatrix = uWorldTransformMatrix;
        mat3 modelMatrix = mat3(
            1.0, 0.0, 0.0,
            0.0, 1.0, 0.0,
            0.0, 0.0, 1.0
          );
        vec2 position = aPosition;
        vec2 uv = aUV;

        {{start}}

        vColor = vec4(1.);

        {{main}}

        vUV = uv;

        mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;

        gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);

        vColor *= uWorldColorAlpha;

        {{end}}
    }
`
  , vce = `

    in vec4 vColor;
    in vec2 vUV;

    out vec4 finalColor;

    {{header}}

    void main(void) {

        {{start}}

        vec4 outColor;

        {{main}}

        finalColor = outColor * vColor;

        {{end}}
    }
`
  , yce = {
    name: "global-uniforms-bit",
    vertex: {
        header: `
        struct GlobalUniforms {
            uProjectionMatrix:mat3x3<f32>,
            uWorldTransformMatrix:mat3x3<f32>,
            uWorldColorAlpha: vec4<f32>,
            uResolution: vec2<f32>,
        }

        @group(0) @binding(0) var<uniform> globalUniforms : GlobalUniforms;
        `
    }
}
  , Ece = {
    name: "global-uniforms-bit",
    vertex: {
        header: `
          uniform mat3 uProjectionMatrix;
          uniform mat3 uWorldTransformMatrix;
          uniform vec4 uWorldColorAlpha;
          uniform vec2 uResolution;
        `
    }
};
function od({bits: t, name: e}) {
    const r = dce({
        template: {
            fragment: gce,
            vertex: pce
        },
        bits: [yce, ...t]
    });
    return Es.from({
        name: e,
        vertex: {
            source: r.vertex,
            entryPoint: "main"
        },
        fragment: {
            source: r.fragment,
            entryPoint: "main"
        }
    })
}
function sd({bits: t, name: e}) {
    return new ya({
        name: e,
        ...hce({
            template: {
                vertex: mce,
                fragment: vce
            },
            bits: [Ece, ...t]
        })
    })
}
const db = {
    name: "color-bit",
    vertex: {
        header: `
            @in aColor: vec4<f32>;
        `,
        main: `
            vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);
        `
    }
}
  , hb = {
    name: "color-bit",
    vertex: {
        header: `
            in vec4 aColor;
        `,
        main: `
            vColor *= vec4(aColor.rgb * aColor.a, aColor.a);
        `
    }
}
  , Wg = {};
function _ce(t) {
    const e = [];
    if (t === 1)
        e.push("@group(1) @binding(0) var textureSource1: texture_2d<f32>;"),
        e.push("@group(1) @binding(1) var textureSampler1: sampler;");
    else {
        let r = 0;
        for (let n = 0; n < t; n++)
            e.push(`@group(1) @binding(${r++}) var textureSource${n + 1}: texture_2d<f32>;`),
            e.push(`@group(1) @binding(${r++}) var textureSampler${n + 1}: sampler;`)
    }
    return e.join(`
`)
}
function bce(t) {
    const e = [];
    if (t === 1)
        e.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");
    else {
        e.push("switch vTextureId {");
        for (let r = 0; r < t; r++)
            r === t - 1 ? e.push("  default:{") : e.push(`  case ${r}:{`),
            e.push(`      outColor = textureSampleGrad(textureSource${r + 1}, textureSampler${r + 1}, vUV, uvDx, uvDy);`),
            e.push("      break;}");
        e.push("}")
    }
    return e.join(`
`)
}
function xb(t) {
    return Wg[t] || (Wg[t] = {
        name: "texture-batch-bit",
        vertex: {
            header: `
                @in aTextureIdAndRound: vec2<u32>;
                @out @interpolate(flat) vTextureId : u32;
            `,
            main: `
                vTextureId = aTextureIdAndRound.y;
            `,
            end: `
                if(aTextureIdAndRound.x == 1)
                {
                    vPosition = vec4<f32>(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
                }
            `
        },
        fragment: {
            header: `
                @in @interpolate(flat) vTextureId: u32;

                ${_ce(t)}
            `,
            main: `
                var uvDx = dpdx(vUV);
                var uvDy = dpdy(vUV);

                ${bce(t)}
            `
        }
    }),
    Wg[t]
}
const Yg = {};
function Cce(t) {
    const e = [];
    for (let r = 0; r < t; r++)
        r > 0 && e.push("else"),
        r < t - 1 && e.push(`if(vTextureId < ${r}.5)`),
        e.push("{"),
        e.push(`	outColor = texture(uTextures[${r}], vUV);`),
        e.push("}");
    return e.join(`
`)
}
function pb(t) {
    return Yg[t] || (Yg[t] = {
        name: "texture-batch-bit",
        vertex: {
            header: `
                in vec2 aTextureIdAndRound;
                out float vTextureId;

            `,
            main: `
                vTextureId = aTextureIdAndRound.y;
            `,
            end: `
                if(aTextureIdAndRound.x == 1.)
                {
                    gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
                }
            `
        },
        fragment: {
            header: `
                in float vTextureId;

                uniform sampler2D uTextures[${t}];

            `,
            main: `

                ${Cce(t)}
            `
        }
    }),
    Yg[t]
}
const ad = {
    name: "round-pixels-bit",
    vertex: {
        header: `
            fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>
            {
                return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
            }
        `
    }
}
  , ld = {
    name: "round-pixels-bit",
    vertex: {
        header: `
            vec2 roundPixels(vec2 position, vec2 targetSize)
            {
                return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
            }
        `
    }
}
  , Vw = {};
function gb(t) {
    let e = Vw[t];
    if (e)
        return e;
    const r = new Int32Array(t);
    for (let n = 0; n < t; n++)
        r[n] = n;
    return e = Vw[t] = new gn({
        uTextures: {
            value: r,
            type: "i32",
            size: t
        }
    },{
        isStatic: !0
    }),
    e
}
class zw extends yi {
    constructor(e) {
        const r = sd({
            name: "batch",
            bits: [hb, pb(e), ld]
        })
          , n = od({
            name: "batch",
            bits: [db, xb(e), ad]
        });
        super({
            glProgram: r,
            gpuProgram: n,
            resources: {
                batchSamplers: gb(e)
            }
        }),
        this.maxTextures = e
    }
}
let Ju = null;
const RP = class MP extends tce {
    constructor(e) {
        super(e),
        this.geometry = new sce,
        this.name = MP.extension.name,
        this.vertexSize = 6,
        Ju ?? (Ju = new zw(e.maxTextures)),
        this.shader = Ju
    }
    packAttributes(e, r, n, i, o) {
        const s = o << 16 | e.roundPixels & 65535
          , a = e.transform
          , l = a.a
          , c = a.b
          , u = a.c
          , f = a.d
          , d = a.tx
          , h = a.ty
          , {positions: x, uvs: y} = e
          , m = e.color
          , E = e.attributeOffset
          , g = E + e.attributeSize;
        for (let p = E; p < g; p++) {
            const v = p * 2
              , _ = x[v]
              , b = x[v + 1];
            r[i++] = l * _ + u * b + d,
            r[i++] = f * b + c * _ + h,
            r[i++] = y[v],
            r[i++] = y[v + 1],
            n[i++] = m,
            n[i++] = s
        }
    }
    packQuadAttributes(e, r, n, i, o) {
        const s = e.texture
          , a = e.transform
          , l = a.a
          , c = a.b
          , u = a.c
          , f = a.d
          , d = a.tx
          , h = a.ty
          , x = e.bounds
          , y = x.maxX
          , m = x.minX
          , E = x.maxY
          , g = x.minY
          , p = s.uvs
          , v = e.color
          , _ = o << 16 | e.roundPixels & 65535;
        r[i + 0] = l * m + u * g + d,
        r[i + 1] = f * g + c * m + h,
        r[i + 2] = p.x0,
        r[i + 3] = p.y0,
        n[i + 4] = v,
        n[i + 5] = _,
        r[i + 6] = l * y + u * g + d,
        r[i + 7] = f * g + c * y + h,
        r[i + 8] = p.x1,
        r[i + 9] = p.y1,
        n[i + 10] = v,
        n[i + 11] = _,
        r[i + 12] = l * y + u * E + d,
        r[i + 13] = f * E + c * y + h,
        r[i + 14] = p.x2,
        r[i + 15] = p.y2,
        n[i + 16] = v,
        n[i + 17] = _,
        r[i + 18] = l * m + u * E + d,
        r[i + 19] = f * E + c * m + h,
        r[i + 20] = p.x3,
        r[i + 21] = p.y3,
        n[i + 22] = v,
        n[i + 23] = _
    }
    _updateMaxTextures(e) {
        this.shader.maxTextures !== e && (Ju = new zw(e),
        this.shader = Ju)
    }
    destroy() {
        this.shader = null,
        super.destroy()
    }
}
;
RP.extension = {
    type: [X.Batcher],
    name: "default"
};
let mb = RP;
function Ace(t, e, r, n, i, o, s, a=null) {
    let l = 0;
    r *= e,
    i *= o;
    const c = a.a
      , u = a.b
      , f = a.c
      , d = a.d
      , h = a.tx
      , x = a.ty;
    for (; l < s; ) {
        const y = t[r]
          , m = t[r + 1];
        n[i] = c * y + f * m + h,
        n[i + 1] = u * y + d * m + x,
        i += o,
        r += e,
        l++
    }
}
function wce(t, e, r, n) {
    let i = 0;
    for (e *= r; i < n; )
        t[e] = 0,
        t[e + 1] = 0,
        e += r,
        i++
}
function NP(t, e, r, n, i) {
    const o = e.a
      , s = e.b
      , a = e.c
      , l = e.d
      , c = e.tx
      , u = e.ty;
    r || (r = 0),
    n || (n = 2),
    i || (i = t.length / n - r);
    let f = r * n;
    for (let d = 0; d < i; d++) {
        const h = t[f]
          , x = t[f + 1];
        t[f] = o * h + a * x + c,
        t[f + 1] = s * h + l * x + u,
        f += n
    }
}
const Bce = new Pe;
class vb {
    constructor() {
        this.packAsQuad = !1,
        this.batcherName = "default",
        this.topology = "triangle-list",
        this.applyTransform = !0,
        this.roundPixels = 0,
        this._batcher = null,
        this._batch = null
    }
    get uvs() {
        return this.geometryData.uvs
    }
    get positions() {
        return this.geometryData.vertices
    }
    get indices() {
        return this.geometryData.indices
    }
    get blendMode() {
        return this.renderable && this.applyTransform ? this.renderable.groupBlendMode : "normal"
    }
    get color() {
        const e = this.baseColor
          , r = e >> 16 | e & 65280 | (e & 255) << 16
          , n = this.renderable;
        return n ? GF(r, n.groupColor) + (this.alpha * n.groupAlpha * 255 << 24) : r + (this.alpha * 255 << 24)
    }
    get transform() {
        var e;
        return ((e = this.renderable) == null ? void 0 : e.groupTransform) || Bce
    }
    copyTo(e) {
        e.indexOffset = this.indexOffset,
        e.indexSize = this.indexSize,
        e.attributeOffset = this.attributeOffset,
        e.attributeSize = this.attributeSize,
        e.baseColor = this.baseColor,
        e.alpha = this.alpha,
        e.texture = this.texture,
        e.geometryData = this.geometryData,
        e.topology = this.topology
    }
    reset() {
        this.applyTransform = !0,
        this.renderable = null,
        this.topology = "triangle-list"
    }
    destroy() {
        this.renderable = null,
        this.texture = null,
        this.geometryData = null,
        this._batcher = null,
        this._batch = null
    }
}
const Af = {
    extension: {
        type: X.ShapeBuilder,
        name: "circle"
    },
    build(t, e) {
        let r, n, i, o, s, a;
        if (t.type === "circle") {
            const v = t;
            if (s = a = v.radius,
            s <= 0)
                return !1;
            r = v.x,
            n = v.y,
            i = o = 0
        } else if (t.type === "ellipse") {
            const v = t;
            if (s = v.halfWidth,
            a = v.halfHeight,
            s <= 0 || a <= 0)
                return !1;
            r = v.x,
            n = v.y,
            i = o = 0
        } else {
            const v = t
              , _ = v.width / 2
              , b = v.height / 2;
            r = v.x + _,
            n = v.y + b,
            s = a = Math.max(0, Math.min(v.radius, Math.min(_, b))),
            i = _ - s,
            o = b - a
        }
        if (i < 0 || o < 0)
            return !1;
        const l = Math.ceil(2.3 * Math.sqrt(s + a))
          , c = l * 8 + (i ? 4 : 0) + (o ? 4 : 0);
        if (c === 0)
            return !1;
        if (l === 0)
            return e[0] = e[6] = r + i,
            e[1] = e[3] = n + o,
            e[2] = e[4] = r - i,
            e[5] = e[7] = n - o,
            !0;
        let u = 0
          , f = l * 4 + (i ? 2 : 0) + 2
          , d = f
          , h = c
          , x = i + s
          , y = o
          , m = r + x
          , E = r - x
          , g = n + y;
        if (e[u++] = m,
        e[u++] = g,
        e[--f] = g,
        e[--f] = E,
        o) {
            const v = n - y;
            e[d++] = E,
            e[d++] = v,
            e[--h] = v,
            e[--h] = m
        }
        for (let v = 1; v < l; v++) {
            const _ = Math.PI / 2 * (v / l)
              , b = i + Math.cos(_) * s
              , C = o + Math.sin(_) * a
              , B = r + b
              , T = r - b
              , A = n + C
              , w = n - C;
            e[u++] = B,
            e[u++] = A,
            e[--f] = A,
            e[--f] = T,
            e[d++] = T,
            e[d++] = w,
            e[--h] = w,
            e[--h] = B
        }
        x = i,
        y = o + a,
        m = r + x,
        E = r - x,
        g = n + y;
        const p = n - y;
        return e[u++] = m,
        e[u++] = g,
        e[--h] = p,
        e[--h] = m,
        i && (e[u++] = E,
        e[u++] = g,
        e[--h] = p,
        e[--h] = E),
        !0
    },
    triangulate(t, e, r, n, i, o) {
        if (t.length === 0)
            return;
        let s = 0
          , a = 0;
        for (let u = 0; u < t.length; u += 2)
            s += t[u],
            a += t[u + 1];
        s /= t.length / 2,
        a /= t.length / 2;
        let l = n;
        e[l * r] = s,
        e[l * r + 1] = a;
        const c = l++;
        for (let u = 0; u < t.length; u += 2)
            e[l * r] = t[u],
            e[l * r + 1] = t[u + 1],
            u > 0 && (i[o++] = l,
            i[o++] = c,
            i[o++] = l - 1),
            l++;
        i[o++] = c + 1,
        i[o++] = c,
        i[o++] = l - 1
    }
}
  , Sce = {
    ...Af,
    extension: {
        ...Af.extension,
        name: "ellipse"
    }
}
  , Tce = {
    ...Af,
    extension: {
        ...Af.extension,
        name: "roundedRectangle"
    }
}
  , LP = 1e-4
  , jw = 1e-4;
function Dce(t) {
    const e = t.length;
    if (e < 6)
        return 1;
    let r = 0;
    for (let n = 0, i = t[e - 2], o = t[e - 1]; n < e; n += 2) {
        const s = t[n]
          , a = t[n + 1];
        r += (s - i) * (a + o),
        i = s,
        o = a
    }
    return r < 0 ? -1 : 1
}
function Ww(t, e, r, n, i, o, s, a) {
    const l = t - r * i
      , c = e - n * i
      , u = t + r * o
      , f = e + n * o;
    let d, h;
    s ? (d = n,
    h = -r) : (d = -n,
    h = r);
    const x = l + d
      , y = c + h
      , m = u + d
      , E = f + h;
    return a.push(x, y),
    a.push(m, E),
    2
}
function Ta(t, e, r, n, i, o, s, a) {
    const l = r - t
      , c = n - e;
    let u = Math.atan2(l, c)
      , f = Math.atan2(i - t, o - e);
    a && u < f ? u += Math.PI * 2 : !a && u > f && (f += Math.PI * 2);
    let d = u;
    const h = f - u
      , x = Math.abs(h)
      , y = Math.sqrt(l * l + c * c)
      , m = (15 * x * Math.sqrt(y) / Math.PI >> 0) + 1
      , E = h / m;
    if (d += E,
    a) {
        s.push(t, e),
        s.push(r, n);
        for (let g = 1, p = d; g < m; g++,
        p += E)
            s.push(t, e),
            s.push(t + Math.sin(p) * y, e + Math.cos(p) * y);
        s.push(t, e),
        s.push(i, o)
    } else {
        s.push(r, n),
        s.push(t, e);
        for (let g = 1, p = d; g < m; g++,
        p += E)
            s.push(t + Math.sin(p) * y, e + Math.cos(p) * y),
            s.push(t, e);
        s.push(i, o),
        s.push(t, e)
    }
    return m * 2
}
function Fce(t, e, r, n, i, o) {
    const s = LP;
    if (t.length === 0)
        return;
    const a = e;
    let l = a.alignment;
    if (e.alignment !== .5) {
        let K = Dce(t);
        r && (K *= -1),
        l = (l - .5) * K + .5
    }
    const c = new Gt(t[0],t[1])
      , u = new Gt(t[t.length - 2],t[t.length - 1])
      , f = n
      , d = Math.abs(c.x - u.x) < s && Math.abs(c.y - u.y) < s;
    if (f) {
        t = t.slice(),
        d && (t.pop(),
        t.pop(),
        u.set(t[t.length - 2], t[t.length - 1]));
        const K = (c.x + u.x) * .5
          , oe = (u.y + c.y) * .5;
        t.unshift(K, oe),
        t.push(K, oe)
    }
    const h = i
      , x = t.length / 2;
    let y = t.length;
    const m = h.length / 2
      , E = a.width / 2
      , g = E * E
      , p = a.miterLimit * a.miterLimit;
    let v = t[0]
      , _ = t[1]
      , b = t[2]
      , C = t[3]
      , B = 0
      , T = 0
      , A = -(_ - C)
      , w = v - b
      , S = 0
      , D = 0
      , F = Math.sqrt(A * A + w * w);
    A /= F,
    w /= F,
    A *= E,
    w *= E;
    const R = l
      , P = (1 - R) * 2
      , N = R * 2;
    f || (a.cap === "round" ? y += Ta(v - A * (P - N) * .5, _ - w * (P - N) * .5, v - A * P, _ - w * P, v + A * N, _ + w * N, h, !0) + 2 : a.cap === "square" && (y += Ww(v, _, A, w, P, N, !0, h))),
    h.push(v - A * P, _ - w * P),
    h.push(v + A * N, _ + w * N);
    for (let K = 1; K < x - 1; ++K) {
        v = t[(K - 1) * 2],
        _ = t[(K - 1) * 2 + 1],
        b = t[K * 2],
        C = t[K * 2 + 1],
        B = t[(K + 1) * 2],
        T = t[(K + 1) * 2 + 1],
        A = -(_ - C),
        w = v - b,
        F = Math.sqrt(A * A + w * w),
        A /= F,
        w /= F,
        A *= E,
        w *= E,
        S = -(C - T),
        D = b - B,
        F = Math.sqrt(S * S + D * D),
        S /= F,
        D /= F,
        S *= E,
        D *= E;
        const oe = b - v
          , U = _ - C
          , $ = b - B
          , V = T - C
          , W = oe * $ + U * V
          , H = U * $ - V * oe
          , Q = H < 0;
        if (Math.abs(H) < .001 * Math.abs(W)) {
            h.push(b - A * P, C - w * P),
            h.push(b + A * N, C + w * N),
            W >= 0 && (a.join === "round" ? y += Ta(b, C, b - A * P, C - w * P, b - S * P, C - D * P, h, !1) + 4 : y += 2,
            h.push(b - S * N, C - D * N),
            h.push(b + S * P, C + D * P));
            continue
        }
        const G = (-A + v) * (-w + C) - (-A + b) * (-w + _)
          , re = (-S + B) * (-D + C) - (-S + b) * (-D + T)
          , te = (oe * re - $ * G) / H
          , he = (V * G - U * re) / H
          , xe = (te - b) * (te - b) + (he - C) * (he - C)
          , ve = b + (te - b) * P
          , I = C + (he - C) * P
          , z = b - (te - b) * N
          , q = C - (he - C) * N
          , ce = Math.min(oe * oe + U * U, $ * $ + V * V)
          , fe = Q ? P : N
          , k = ce + fe * fe * g;
        xe <= k ? a.join === "bevel" || xe / g > p ? (Q ? (h.push(ve, I),
        h.push(b + A * N, C + w * N),
        h.push(ve, I),
        h.push(b + S * N, C + D * N)) : (h.push(b - A * P, C - w * P),
        h.push(z, q),
        h.push(b - S * P, C - D * P),
        h.push(z, q)),
        y += 2) : a.join === "round" ? Q ? (h.push(ve, I),
        h.push(b + A * N, C + w * N),
        y += Ta(b, C, b + A * N, C + w * N, b + S * N, C + D * N, h, !0) + 4,
        h.push(ve, I),
        h.push(b + S * N, C + D * N)) : (h.push(b - A * P, C - w * P),
        h.push(z, q),
        y += Ta(b, C, b - A * P, C - w * P, b - S * P, C - D * P, h, !1) + 4,
        h.push(b - S * P, C - D * P),
        h.push(z, q)) : (h.push(ve, I),
        h.push(z, q)) : (h.push(b - A * P, C - w * P),
        h.push(b + A * N, C + w * N),
        a.join === "round" ? Q ? y += Ta(b, C, b + A * N, C + w * N, b + S * N, C + D * N, h, !0) + 2 : y += Ta(b, C, b - A * P, C - w * P, b - S * P, C - D * P, h, !1) + 2 : a.join === "miter" && xe / g <= p && (Q ? (h.push(z, q),
        h.push(z, q)) : (h.push(ve, I),
        h.push(ve, I)),
        y += 2),
        h.push(b - S * P, C - D * P),
        h.push(b + S * N, C + D * N),
        y += 2)
    }
    v = t[(x - 2) * 2],
    _ = t[(x - 2) * 2 + 1],
    b = t[(x - 1) * 2],
    C = t[(x - 1) * 2 + 1],
    A = -(_ - C),
    w = v - b,
    F = Math.sqrt(A * A + w * w),
    A /= F,
    w /= F,
    A *= E,
    w *= E,
    h.push(b - A * P, C - w * P),
    h.push(b + A * N, C + w * N),
    f || (a.cap === "round" ? y += Ta(b - A * (P - N) * .5, C - w * (P - N) * .5, b - A * P, C - w * P, b + A * N, C + w * N, h, !1) + 2 : a.cap === "square" && (y += Ww(b, C, A, w, P, N, !1, h)));
    const j = jw * jw;
    for (let K = m; K < y + m - 2; ++K)
        v = h[K * 2],
        _ = h[K * 2 + 1],
        b = h[(K + 1) * 2],
        C = h[(K + 1) * 2 + 1],
        B = h[(K + 2) * 2],
        T = h[(K + 2) * 2 + 1],
        !(Math.abs(v * (C - T) + b * (T - _) + B * (_ - C)) < j) && o.push(K, K + 1, K + 2)
}
function Pce(t, e, r, n) {
    const i = LP;
    if (t.length === 0)
        return;
    const o = t[0]
      , s = t[1]
      , a = t[t.length - 2]
      , l = t[t.length - 1]
      , c = e || Math.abs(o - a) < i && Math.abs(s - l) < i
      , u = r
      , f = t.length / 2
      , d = u.length / 2;
    for (let h = 0; h < f; h++)
        u.push(t[h * 2]),
        u.push(t[h * 2 + 1]);
    for (let h = 0; h < f - 1; h++)
        n.push(d + h, d + h + 1);
    c && n.push(d + f - 1, d)
}
function $P(t, e, r, n, i, o, s) {
    const a = Dle(t, e, 2);
    if (!a)
        return;
    for (let c = 0; c < a.length; c += 3)
        o[s++] = a[c] + i,
        o[s++] = a[c + 1] + i,
        o[s++] = a[c + 2] + i;
    let l = i * n;
    for (let c = 0; c < t.length; c += 2)
        r[l] = t[c],
        r[l + 1] = t[c + 1],
        l += n
}
const Ice = []
  , Oce = {
    extension: {
        type: X.ShapeBuilder,
        name: "polygon"
    },
    build(t, e) {
        for (let r = 0; r < t.points.length; r++)
            e[r] = t.points[r];
        return !0
    },
    triangulate(t, e, r, n, i, o) {
        $P(t, Ice, e, r, n, i, o)
    }
}
  , kce = {
    extension: {
        type: X.ShapeBuilder,
        name: "rectangle"
    },
    build(t, e) {
        const r = t
          , n = r.x
          , i = r.y
          , o = r.width
          , s = r.height;
        return o > 0 && s > 0 ? (e[0] = n,
        e[1] = i,
        e[2] = n + o,
        e[3] = i,
        e[4] = n + o,
        e[5] = i + s,
        e[6] = n,
        e[7] = i + s,
        !0) : !1
    },
    triangulate(t, e, r, n, i, o) {
        let s = 0;
        n *= r,
        e[n + s] = t[0],
        e[n + s + 1] = t[1],
        s += r,
        e[n + s] = t[2],
        e[n + s + 1] = t[3],
        s += r,
        e[n + s] = t[6],
        e[n + s + 1] = t[7],
        s += r,
        e[n + s] = t[4],
        e[n + s + 1] = t[5],
        s += r;
        const a = n / r;
        i[o++] = a,
        i[o++] = a + 1,
        i[o++] = a + 2,
        i[o++] = a + 1,
        i[o++] = a + 3,
        i[o++] = a + 2
    }
}
  , Rce = {
    extension: {
        type: X.ShapeBuilder,
        name: "triangle"
    },
    build(t, e) {
        return e[0] = t.x,
        e[1] = t.y,
        e[2] = t.x2,
        e[3] = t.y2,
        e[4] = t.x3,
        e[5] = t.y3,
        !0
    },
    triangulate(t, e, r, n, i, o) {
        let s = 0;
        n *= r,
        e[n + s] = t[0],
        e[n + s + 1] = t[1],
        s += r,
        e[n + s] = t[2],
        e[n + s + 1] = t[3],
        s += r,
        e[n + s] = t[4],
        e[n + s + 1] = t[5];
        const a = n / r;
        i[o++] = a,
        i[o++] = a + 1,
        i[o++] = a + 2
    }
}
  , Mce = new Pe
  , Nce = new mt;
function Lce(t, e, r, n) {
    const i = e.matrix ? t.copyFrom(e.matrix).invert() : t.identity();
    if (e.textureSpace === "local") {
        const s = r.getBounds(Nce);
        e.width && s.pad(e.width);
        const {x: a, y: l} = s
          , c = 1 / s.width
          , u = 1 / s.height
          , f = -a * c
          , d = -l * u
          , h = i.a
          , x = i.b
          , y = i.c
          , m = i.d;
        i.a *= c,
        i.b *= c,
        i.c *= u,
        i.d *= u,
        i.tx = f * h + d * y + i.tx,
        i.ty = f * x + d * m + i.ty
    } else
        i.translate(e.texture.frame.x, e.texture.frame.y),
        i.scale(1 / e.texture.source.width, 1 / e.texture.source.height);
    const o = e.texture.source.style;
    return !(e.fill instanceof ds) && o.addressMode === "clamp-to-edge" && (o.addressMode = "repeat",
    o.update()),
    n && i.append(Mce.copyFrom(n).invert()),
    i
}
const f1 = {};
$e.handleByMap(X.ShapeBuilder, f1);
$e.add(kce, Oce, Rce, Af, Sce, Tce);
const $ce = new mt
  , Uce = new Pe;
function Gce(t, e) {
    const {geometryData: r, batches: n} = e;
    n.length = 0,
    r.indices.length = 0,
    r.vertices.length = 0,
    r.uvs.length = 0;
    for (let i = 0; i < t.instructions.length; i++) {
        const o = t.instructions[i];
        if (o.action === "texture")
            Hce(o.data, n, r);
        else if (o.action === "fill" || o.action === "stroke") {
            const s = o.action === "stroke"
              , a = o.data.path.shapePath
              , l = o.data.style
              , c = o.data.hole;
            s && c && Yw(c.shapePath, l, !0, n, r),
            c && (a.shapePrimitives[a.shapePrimitives.length - 1].holes = c.shapePath.shapePrimitives),
            Yw(a, l, s, n, r)
        }
    }
}
function Hce(t, e, r) {
    const n = []
      , i = f1.rectangle
      , o = $ce;
    o.x = t.dx,
    o.y = t.dy,
    o.width = t.dw,
    o.height = t.dh;
    const s = t.transform;
    if (!i.build(o, n))
        return;
    const {vertices: a, uvs: l, indices: c} = r
      , u = c.length
      , f = a.length / 2;
    s && NP(n, s),
    i.triangulate(n, a, 2, f, c, u);
    const d = t.image
      , h = d.uvs;
    l.push(h.x0, h.y0, h.x1, h.y1, h.x3, h.y3, h.x2, h.y2);
    const x = xr.get(vb);
    x.indexOffset = u,
    x.indexSize = c.length - u,
    x.attributeOffset = f,
    x.attributeSize = a.length / 2 - f,
    x.baseColor = t.style,
    x.alpha = t.alpha,
    x.texture = d,
    x.geometryData = r,
    e.push(x)
}
function Yw(t, e, r, n, i) {
    const {vertices: o, uvs: s, indices: a} = i;
    t.shapePrimitives.forEach( ({shape: l, transform: c, holes: u}) => {
        const f = []
          , d = f1[l.type];
        if (!d.build(l, f))
            return;
        const h = a.length
          , x = o.length / 2;
        let y = "triangle-list";
        if (c && NP(f, c),
        r) {
            const p = l.closePath ?? !0
              , v = e;
            v.pixelLine ? (Pce(f, p, o, a),
            y = "line-list") : Fce(f, v, !1, p, o, a)
        } else if (u) {
            const p = []
              , v = f.slice();
            Vce(u).forEach(b => {
                p.push(v.length / 2),
                v.push(...b)
            }
            ),
            $P(v, p, o, 2, x, a, h)
        } else
            d.triangulate(f, o, 2, x, a, h);
        const m = s.length / 2
          , E = e.texture;
        if (E !== Be.WHITE) {
            const p = Lce(Uce, e, l, c);
            Ace(o, 2, x, s, m, 2, o.length / 2 - x, p)
        } else
            wce(s, m, 2, o.length / 2 - x);
        const g = xr.get(vb);
        g.indexOffset = h,
        g.indexSize = a.length - h,
        g.attributeOffset = x,
        g.attributeSize = o.length / 2 - x,
        g.baseColor = e.color,
        g.alpha = e.alpha,
        g.texture = E,
        g.geometryData = i,
        g.topology = y,
        n.push(g)
    }
    )
}
function Vce(t) {
    const e = [];
    for (let r = 0; r < t.length; r++) {
        const n = t[r].shape
          , i = [];
        f1[n.type].build(n, i) && e.push(i)
    }
    return e
}
class zce {
    constructor() {
        this.batches = [],
        this.geometryData = {
            vertices: [],
            uvs: [],
            indices: []
        }
    }
}
class jce {
    constructor() {
        this.instructions = new zF
    }
    init(e) {
        const r = e.maxTextures;
        this.batcher ? this.batcher._updateMaxTextures(r) : this.batcher = new mb({
            maxTextures: r
        }),
        this.instructions.reset()
    }
    get geometry() {
        return Re(qse, "GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead."),
        this.batcher.geometry
    }
    destroy() {
        this.batcher.destroy(),
        this.instructions.destroy(),
        this.batcher = null,
        this.instructions = null
    }
}
const yb = class iE {
    constructor(e) {
        this._gpuContextHash = {},
        this._graphicsDataContextHash = Object.create(null),
        this._renderer = e,
        e.renderableGC.addManagedHash(this, "_gpuContextHash"),
        e.renderableGC.addManagedHash(this, "_graphicsDataContextHash")
    }
    init(e) {
        iE.defaultOptions.bezierSmoothness = (e == null ? void 0 : e.bezierSmoothness) ?? iE.defaultOptions.bezierSmoothness
    }
    getContextRenderData(e) {
        return this._graphicsDataContextHash[e.uid] || this._initContextRenderData(e)
    }
    updateGpuContext(e) {
        let r = this._gpuContextHash[e.uid] || this._initContext(e);
        if (e.dirty) {
            r ? this._cleanGraphicsContextData(e) : r = this._initContext(e),
            Gce(e, r);
            const n = e.batchMode;
            e.customShader || n === "no-batch" ? r.isBatchable = !1 : n === "auto" ? r.isBatchable = r.geometryData.vertices.length < 400 : r.isBatchable = !0,
            e.dirty = !1
        }
        return r
    }
    getGpuContext(e) {
        return this._gpuContextHash[e.uid] || this._initContext(e)
    }
    _initContextRenderData(e) {
        const r = xr.get(jce, {
            maxTextures: this._renderer.limits.maxBatchableTextures
        })
          , {batches: n, geometryData: i} = this._gpuContextHash[e.uid]
          , o = i.vertices.length
          , s = i.indices.length;
        for (let u = 0; u < n.length; u++)
            n[u].applyTransform = !1;
        const a = r.batcher;
        a.ensureAttributeBuffer(o),
        a.ensureIndexBuffer(s),
        a.begin();
        for (let u = 0; u < n.length; u++) {
            const f = n[u];
            a.add(f)
        }
        a.finish(r.instructions);
        const l = a.geometry;
        l.indexBuffer.setDataWithSize(a.indexBuffer, a.indexSize, !0),
        l.buffers[0].setDataWithSize(a.attributeBuffer.float32View, a.attributeSize, !0);
        const c = a.batches;
        for (let u = 0; u < c.length; u++) {
            const f = c[u];
            f.bindGroup = fb(f.textures.textures, f.textures.count, this._renderer.limits.maxBatchableTextures)
        }
        return this._graphicsDataContextHash[e.uid] = r,
        r
    }
    _initContext(e) {
        const r = new zce;
        return r.context = e,
        this._gpuContextHash[e.uid] = r,
        e.on("destroy", this.onGraphicsContextDestroy, this),
        this._gpuContextHash[e.uid]
    }
    onGraphicsContextDestroy(e) {
        this._cleanGraphicsContextData(e),
        e.off("destroy", this.onGraphicsContextDestroy, this),
        this._gpuContextHash[e.uid] = null
    }
    _cleanGraphicsContextData(e) {
        const r = this._gpuContextHash[e.uid];
        r.isBatchable || this._graphicsDataContextHash[e.uid] && (xr.return(this.getContextRenderData(e)),
        this._graphicsDataContextHash[e.uid] = null),
        r.batches && r.batches.forEach(n => {
            xr.return(n)
        }
        )
    }
    destroy() {
        for (const e in this._gpuContextHash)
            this._gpuContextHash[e] && this.onGraphicsContextDestroy(this._gpuContextHash[e].context);
        this._gpuContextHash = {},
        this._graphicsDataContextHash = {},
        this._renderer = null
    }
}
;
yb.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "graphicsContext"
};
yb.defaultOptions = {
    bezierSmoothness: .5
};
let Eb = yb;
const Wce = 8
  , ph = 11920929e-14
  , Yce = 1;
function UP(t, e, r, n, i, o, s, a, l, c) {
    const f = Math.min(.99, Math.max(0, c ?? Eb.defaultOptions.bezierSmoothness));
    let d = (Yce - f) / 1;
    return d *= d,
    Xce(e, r, n, i, o, s, a, l, t, d),
    t
}
function Xce(t, e, r, n, i, o, s, a, l, c) {
    oE(t, e, r, n, i, o, s, a, l, c, 0),
    l.push(s, a)
}
function oE(t, e, r, n, i, o, s, a, l, c, u) {
    if (u > Wce)
        return;
    const f = (t + r) / 2
      , d = (e + n) / 2
      , h = (r + i) / 2
      , x = (n + o) / 2
      , y = (i + s) / 2
      , m = (o + a) / 2
      , E = (f + h) / 2
      , g = (d + x) / 2
      , p = (h + y) / 2
      , v = (x + m) / 2
      , _ = (E + p) / 2
      , b = (g + v) / 2;
    if (u > 0) {
        let C = s - t
          , B = a - e;
        const T = Math.abs((r - s) * B - (n - a) * C)
          , A = Math.abs((i - s) * B - (o - a) * C);
        if (T > ph && A > ph) {
            if ((T + A) * (T + A) <= c * (C * C + B * B)) {
                l.push(_, b);
                return
            }
        } else if (T > ph) {
            if (T * T <= c * (C * C + B * B)) {
                l.push(_, b);
                return
            }
        } else if (A > ph) {
            if (A * A <= c * (C * C + B * B)) {
                l.push(_, b);
                return
            }
        } else if (C = _ - (t + s) / 2,
        B = b - (e + a) / 2,
        C * C + B * B <= c) {
            l.push(_, b);
            return
        }
    }
    oE(t, e, f, d, E, g, _, b, l, c, u + 1),
    oE(_, b, p, v, y, m, s, a, l, c, u + 1)
}
const Kce = 8
  , qce = 11920929e-14
  , Zce = 1;
function Jce(t, e, r, n, i, o, s, a) {
    const c = Math.min(.99, Math.max(0, a ?? Eb.defaultOptions.bezierSmoothness));
    let u = (Zce - c) / 1;
    return u *= u,
    Qce(e, r, n, i, o, s, t, u),
    t
}
function Qce(t, e, r, n, i, o, s, a) {
    sE(s, t, e, r, n, i, o, a, 0),
    s.push(i, o)
}
function sE(t, e, r, n, i, o, s, a, l) {
    if (l > Kce)
        return;
    const c = (e + n) / 2
      , u = (r + i) / 2
      , f = (n + o) / 2
      , d = (i + s) / 2
      , h = (c + f) / 2
      , x = (u + d) / 2;
    let y = o - e
      , m = s - r;
    const E = Math.abs((n - o) * m - (i - s) * y);
    if (E > qce) {
        if (E * E <= a * (y * y + m * m)) {
            t.push(h, x);
            return
        }
    } else if (y = h - (e + o) / 2,
    m = x - (r + s) / 2,
    y * y + m * m <= a) {
        t.push(h, x);
        return
    }
    sE(t, e, r, c, u, h, x, a, l + 1),
    sE(t, h, x, f, d, o, s, a, l + 1)
}
function GP(t, e, r, n, i, o, s, a) {
    let l = Math.abs(i - o);
    (!s && i > o || s && o > i) && (l = 2 * Math.PI - l),
    a || (a = Math.max(6, Math.floor(6 * Math.pow(n, 1 / 3) * (l / Math.PI)))),
    a = Math.max(a, 3);
    let c = l / a
      , u = i;
    c *= s ? -1 : 1;
    for (let f = 0; f < a + 1; f++) {
        const d = Math.cos(u)
          , h = Math.sin(u)
          , x = e + d * n
          , y = r + h * n;
        t.push(x, y),
        u += c
    }
}
function eue(t, e, r, n, i, o) {
    const s = t[t.length - 2]
      , l = t[t.length - 1] - r
      , c = s - e
      , u = i - r
      , f = n - e
      , d = Math.abs(l * f - c * u);
    if (d < 1e-8 || o === 0) {
        (t[t.length - 2] !== e || t[t.length - 1] !== r) && t.push(e, r);
        return
    }
    const h = l * l + c * c
      , x = u * u + f * f
      , y = l * u + c * f
      , m = o * Math.sqrt(h) / d
      , E = o * Math.sqrt(x) / d
      , g = m * y / h
      , p = E * y / x
      , v = m * f + E * c
      , _ = m * u + E * l
      , b = c * (E + g)
      , C = l * (E + g)
      , B = f * (m + p)
      , T = u * (m + p)
      , A = Math.atan2(C - _, b - v)
      , w = Math.atan2(T - _, B - v);
    GP(t, v + e, _ + r, o, A, w, c * u > f * l)
}
const L0 = Math.PI * 2
  , Xg = {
    centerX: 0,
    centerY: 0,
    ang1: 0,
    ang2: 0
}
  , Kg = ({x: t, y: e}, r, n, i, o, s, a, l) => {
    t *= r,
    e *= n;
    const c = i * t - o * e
      , u = o * t + i * e;
    return l.x = c + s,
    l.y = u + a,
    l
}
;
function tue(t, e) {
    const r = e === -1.5707963267948966 ? -.551915024494 : 1.3333333333333333 * Math.tan(e / 4)
      , n = e === 1.5707963267948966 ? .551915024494 : r
      , i = Math.cos(t)
      , o = Math.sin(t)
      , s = Math.cos(t + e)
      , a = Math.sin(t + e);
    return [{
        x: i - o * n,
        y: o + i * n
    }, {
        x: s + a * n,
        y: a - s * n
    }, {
        x: s,
        y: a
    }]
}
const Xw = (t, e, r, n) => {
    const i = t * n - e * r < 0 ? -1 : 1;
    let o = t * r + e * n;
    return o > 1 && (o = 1),
    o < -1 && (o = -1),
    i * Math.acos(o)
}
  , rue = (t, e, r, n, i, o, s, a, l, c, u, f, d) => {
    const h = Math.pow(i, 2)
      , x = Math.pow(o, 2)
      , y = Math.pow(u, 2)
      , m = Math.pow(f, 2);
    let E = h * x - h * m - x * y;
    E < 0 && (E = 0),
    E /= h * m + x * y,
    E = Math.sqrt(E) * (s === a ? -1 : 1);
    const g = E * i / o * f
      , p = E * -o / i * u
      , v = c * g - l * p + (t + r) / 2
      , _ = l * g + c * p + (e + n) / 2
      , b = (u - g) / i
      , C = (f - p) / o
      , B = (-u - g) / i
      , T = (-f - p) / o
      , A = Xw(1, 0, b, C);
    let w = Xw(b, C, B, T);
    a === 0 && w > 0 && (w -= L0),
    a === 1 && w < 0 && (w += L0),
    d.centerX = v,
    d.centerY = _,
    d.ang1 = A,
    d.ang2 = w
}
;
function nue(t, e, r, n, i, o, s, a=0, l=0, c=0) {
    if (o === 0 || s === 0)
        return;
    const u = Math.sin(a * L0 / 360)
      , f = Math.cos(a * L0 / 360)
      , d = f * (e - n) / 2 + u * (r - i) / 2
      , h = -u * (e - n) / 2 + f * (r - i) / 2;
    if (d === 0 && h === 0)
        return;
    o = Math.abs(o),
    s = Math.abs(s);
    const x = Math.pow(d, 2) / Math.pow(o, 2) + Math.pow(h, 2) / Math.pow(s, 2);
    x > 1 && (o *= Math.sqrt(x),
    s *= Math.sqrt(x)),
    rue(e, r, n, i, o, s, l, c, u, f, d, h, Xg);
    let {ang1: y, ang2: m} = Xg;
    const {centerX: E, centerY: g} = Xg;
    let p = Math.abs(m) / (L0 / 4);
    Math.abs(1 - p) < 1e-7 && (p = 1);
    const v = Math.max(Math.ceil(p), 1);
    m /= v;
    let _ = t[t.length - 2]
      , b = t[t.length - 1];
    const C = {
        x: 0,
        y: 0
    };
    for (let B = 0; B < v; B++) {
        const T = tue(y, m)
          , {x: A, y: w} = Kg(T[0], o, s, f, u, E, g, C)
          , {x: S, y: D} = Kg(T[1], o, s, f, u, E, g, C)
          , {x: F, y: R} = Kg(T[2], o, s, f, u, E, g, C);
        UP(t, _, b, A, w, S, D, F, R),
        _ = F,
        b = R,
        y += m
    }
}
function iue(t, e, r) {
    const n = (s, a) => {
        const l = a.x - s.x
          , c = a.y - s.y
          , u = Math.sqrt(l * l + c * c)
          , f = l / u
          , d = c / u;
        return {
            len: u,
            nx: f,
            ny: d
        }
    }
      , i = (s, a) => {
        s === 0 ? t.moveTo(a.x, a.y) : t.lineTo(a.x, a.y)
    }
    ;
    let o = e[e.length - 1];
    for (let s = 0; s < e.length; s++) {
        const a = e[s % e.length]
          , l = a.radius ?? r;
        if (l <= 0) {
            i(s, a),
            o = a;
            continue
        }
        const c = e[(s + 1) % e.length]
          , u = n(a, o)
          , f = n(a, c);
        if (u.len < 1e-4 || f.len < 1e-4) {
            i(s, a),
            o = a;
            continue
        }
        let d = Math.asin(u.nx * f.ny - u.ny * f.nx)
          , h = 1
          , x = !1;
        u.nx * f.nx - u.ny * -f.ny < 0 ? d < 0 ? d = Math.PI + d : (d = Math.PI - d,
        h = -1,
        x = !0) : d > 0 && (h = -1,
        x = !0);
        const y = d / 2;
        let m, E = Math.abs(Math.cos(y) * l / Math.sin(y));
        E > Math.min(u.len / 2, f.len / 2) ? (E = Math.min(u.len / 2, f.len / 2),
        m = Math.abs(E * Math.sin(y) / Math.cos(y))) : m = l;
        const g = a.x + f.nx * E + -f.ny * m * h
          , p = a.y + f.ny * E + f.nx * m * h
          , v = Math.atan2(u.ny, u.nx) + Math.PI / 2 * h
          , _ = Math.atan2(f.ny, f.nx) - Math.PI / 2 * h;
        s === 0 && t.moveTo(g + Math.cos(v) * m, p + Math.sin(v) * m),
        t.arc(g, p, m, v, _, x),
        o = a
    }
}
function oue(t, e, r, n) {
    const i = (a, l) => Math.sqrt((a.x - l.x) ** 2 + (a.y - l.y) ** 2)
      , o = (a, l, c) => ({
        x: a.x + (l.x - a.x) * c,
        y: a.y + (l.y - a.y) * c
    })
      , s = e.length;
    for (let a = 0; a < s; a++) {
        const l = e[(a + 1) % s]
          , c = l.radius ?? r;
        if (c <= 0) {
            a === 0 ? t.moveTo(l.x, l.y) : t.lineTo(l.x, l.y);
            continue
        }
        const u = e[a]
          , f = e[(a + 2) % s]
          , d = i(u, l);
        let h;
        if (d < 1e-4)
            h = l;
        else {
            const m = Math.min(d / 2, c);
            h = o(l, u, m / d)
        }
        const x = i(f, l);
        let y;
        if (x < 1e-4)
            y = l;
        else {
            const m = Math.min(x / 2, c);
            y = o(l, f, m / x)
        }
        a === 0 ? t.moveTo(h.x, h.y) : t.lineTo(h.x, h.y),
        t.quadraticCurveTo(l.x, l.y, y.x, y.y, n)
    }
}
const sue = new mt;
class aue {
    constructor(e) {
        this.shapePrimitives = [],
        this._currentPoly = null,
        this._bounds = new Vr,
        this._graphicsPath2D = e,
        this.signed = e.checkForHoles
    }
    moveTo(e, r) {
        return this.startPoly(e, r),
        this
    }
    lineTo(e, r) {
        this._ensurePoly();
        const n = this._currentPoly.points
          , i = n[n.length - 2]
          , o = n[n.length - 1];
        return (i !== e || o !== r) && n.push(e, r),
        this
    }
    arc(e, r, n, i, o, s) {
        this._ensurePoly(!1);
        const a = this._currentPoly.points;
        return GP(a, e, r, n, i, o, s),
        this
    }
    arcTo(e, r, n, i, o) {
        this._ensurePoly();
        const s = this._currentPoly.points;
        return eue(s, e, r, n, i, o),
        this
    }
    arcToSvg(e, r, n, i, o, s, a) {
        const l = this._currentPoly.points;
        return nue(l, this._currentPoly.lastX, this._currentPoly.lastY, s, a, e, r, n, i, o),
        this
    }
    bezierCurveTo(e, r, n, i, o, s, a) {
        this._ensurePoly();
        const l = this._currentPoly;
        return UP(this._currentPoly.points, l.lastX, l.lastY, e, r, n, i, o, s, a),
        this
    }
    quadraticCurveTo(e, r, n, i, o) {
        this._ensurePoly();
        const s = this._currentPoly;
        return Jce(this._currentPoly.points, s.lastX, s.lastY, e, r, n, i, o),
        this
    }
    closePath() {
        return this.endPoly(!0),
        this
    }
    addPath(e, r) {
        this.endPoly(),
        r && !r.isIdentity() && (e = e.clone(!0),
        e.transform(r));
        const n = this.shapePrimitives
          , i = n.length;
        for (let o = 0; o < e.instructions.length; o++) {
            const s = e.instructions[o];
            this[s.action](...s.data)
        }
        if (e.checkForHoles && n.length - i > 1) {
            let o = null;
            for (let s = i; s < n.length; s++) {
                const a = n[s];
                if (a.shape.type === "polygon") {
                    const l = a.shape
                      , c = o == null ? void 0 : o.shape;
                    c && c.containsPolygon(l) ? (o.holes || (o.holes = []),
                    o.holes.push(a),
                    n.copyWithin(s, s + 1),
                    n.length--,
                    s--) : o = a
                }
            }
        }
        return this
    }
    finish(e=!1) {
        this.endPoly(e)
    }
    rect(e, r, n, i, o) {
        return this.drawShape(new mt(e,r,n,i), o),
        this
    }
    circle(e, r, n, i) {
        return this.drawShape(new lb(e,r,n), i),
        this
    }
    poly(e, r, n) {
        const i = new M0(e);
        return i.closePath = r,
        this.drawShape(i, n),
        this
    }
    regularPoly(e, r, n, i, o=0, s) {
        i = Math.max(i | 0, 3);
        const a = -1 * Math.PI / 2 + o
          , l = Math.PI * 2 / i
          , c = [];
        for (let u = 0; u < i; u++) {
            const f = a - u * l;
            c.push(e + n * Math.cos(f), r + n * Math.sin(f))
        }
        return this.poly(c, !0, s),
        this
    }
    roundPoly(e, r, n, i, o, s=0, a) {
        if (i = Math.max(i | 0, 3),
        o <= 0)
            return this.regularPoly(e, r, n, i, s);
        const l = n * Math.sin(Math.PI / i) - .001;
        o = Math.min(o, l);
        const c = -1 * Math.PI / 2 + s
          , u = Math.PI * 2 / i
          , f = (i - 2) * Math.PI / i / 2;
        for (let d = 0; d < i; d++) {
            const h = d * u + c
              , x = e + n * Math.cos(h)
              , y = r + n * Math.sin(h)
              , m = h + Math.PI + f
              , E = h - Math.PI - f
              , g = x + o * Math.cos(m)
              , p = y + o * Math.sin(m)
              , v = x + o * Math.cos(E)
              , _ = y + o * Math.sin(E);
            d === 0 ? this.moveTo(g, p) : this.lineTo(g, p),
            this.quadraticCurveTo(x, y, v, _, a)
        }
        return this.closePath()
    }
    roundShape(e, r, n=!1, i) {
        return e.length < 3 ? this : (n ? oue(this, e, r, i) : iue(this, e, r),
        this.closePath())
    }
    filletRect(e, r, n, i, o) {
        if (o === 0)
            return this.rect(e, r, n, i);
        const s = Math.min(n, i) / 2
          , a = Math.min(s, Math.max(-s, o))
          , l = e + n
          , c = r + i
          , u = a < 0 ? -a : 0
          , f = Math.abs(a);
        return this.moveTo(e, r + f).arcTo(e + u, r + u, e + f, r, f).lineTo(l - f, r).arcTo(l - u, r + u, l, r + f, f).lineTo(l, c - f).arcTo(l - u, c - u, e + n - f, c, f).lineTo(e + f, c).arcTo(e + u, c - u, e, c - f, f).closePath()
    }
    chamferRect(e, r, n, i, o, s) {
        if (o <= 0)
            return this.rect(e, r, n, i);
        const a = Math.min(o, Math.min(n, i) / 2)
          , l = e + n
          , c = r + i
          , u = [e + a, r, l - a, r, l, r + a, l, c - a, l - a, c, e + a, c, e, c - a, e, r + a];
        for (let f = u.length - 1; f >= 2; f -= 2)
            u[f] === u[f - 2] && u[f - 1] === u[f - 3] && u.splice(f - 1, 2);
        return this.poly(u, !0, s)
    }
    ellipse(e, r, n, i, o) {
        return this.drawShape(new cb(e,r,n,i), o),
        this
    }
    roundRect(e, r, n, i, o, s) {
        return this.drawShape(new ub(e,r,n,i,o), s),
        this
    }
    drawShape(e, r) {
        return this.endPoly(),
        this.shapePrimitives.push({
            shape: e,
            transform: r
        }),
        this
    }
    startPoly(e, r) {
        let n = this._currentPoly;
        return n && this.endPoly(),
        n = new M0,
        n.points.push(e, r),
        this._currentPoly = n,
        this
    }
    endPoly(e=!1) {
        const r = this._currentPoly;
        return r && r.points.length > 2 && (r.closePath = e,
        this.shapePrimitives.push({
            shape: r
        })),
        this._currentPoly = null,
        this
    }
    _ensurePoly(e=!0) {
        if (!this._currentPoly && (this._currentPoly = new M0,
        e)) {
            const r = this.shapePrimitives[this.shapePrimitives.length - 1];
            if (r) {
                let n = r.shape.x
                  , i = r.shape.y;
                if (r.transform && !r.transform.isIdentity()) {
                    const o = r.transform
                      , s = n;
                    n = o.a * n + o.c * i + o.tx,
                    i = o.b * s + o.d * i + o.ty
                }
                this._currentPoly.points.push(n, i)
            } else
                this._currentPoly.points.push(0, 0)
        }
    }
    buildPath() {
        const e = this._graphicsPath2D;
        this.shapePrimitives.length = 0,
        this._currentPoly = null;
        for (let r = 0; r < e.instructions.length; r++) {
            const n = e.instructions[r];
            this[n.action](...n.data)
        }
        this.finish()
    }
    get bounds() {
        const e = this._bounds;
        e.clear();
        const r = this.shapePrimitives;
        for (let n = 0; n < r.length; n++) {
            const i = r[n]
              , o = i.shape.getBounds(sue);
            i.transform ? e.addRect(o, i.transform) : e.addRect(o)
        }
        return e
    }
}
class ts {
    constructor(e, r=!1) {
        this.instructions = [],
        this.uid = Tt("graphicsPath"),
        this._dirty = !0,
        this.checkForHoles = r,
        typeof e == "string" ? zle(e, this) : this.instructions = (e == null ? void 0 : e.slice()) ?? []
    }
    get shapePath() {
        return this._shapePath || (this._shapePath = new aue(this)),
        this._dirty && (this._dirty = !1,
        this._shapePath.buildPath()),
        this._shapePath
    }
    addPath(e, r) {
        return e = e.clone(),
        this.instructions.push({
            action: "addPath",
            data: [e, r]
        }),
        this._dirty = !0,
        this
    }
    arc(...e) {
        return this.instructions.push({
            action: "arc",
            data: e
        }),
        this._dirty = !0,
        this
    }
    arcTo(...e) {
        return this.instructions.push({
            action: "arcTo",
            data: e
        }),
        this._dirty = !0,
        this
    }
    arcToSvg(...e) {
        return this.instructions.push({
            action: "arcToSvg",
            data: e
        }),
        this._dirty = !0,
        this
    }
    bezierCurveTo(...e) {
        return this.instructions.push({
            action: "bezierCurveTo",
            data: e
        }),
        this._dirty = !0,
        this
    }
    bezierCurveToShort(e, r, n, i, o) {
        const s = this.instructions[this.instructions.length - 1]
          , a = this.getLastPoint(Gt.shared);
        let l = 0
          , c = 0;
        if (!s || s.action !== "bezierCurveTo")
            l = a.x,
            c = a.y;
        else {
            l = s.data[2],
            c = s.data[3];
            const u = a.x
              , f = a.y;
            l = u + (u - l),
            c = f + (f - c)
        }
        return this.instructions.push({
            action: "bezierCurveTo",
            data: [l, c, e, r, n, i, o]
        }),
        this._dirty = !0,
        this
    }
    closePath() {
        return this.instructions.push({
            action: "closePath",
            data: []
        }),
        this._dirty = !0,
        this
    }
    ellipse(...e) {
        return this.instructions.push({
            action: "ellipse",
            data: e
        }),
        this._dirty = !0,
        this
    }
    lineTo(...e) {
        return this.instructions.push({
            action: "lineTo",
            data: e
        }),
        this._dirty = !0,
        this
    }
    moveTo(...e) {
        return this.instructions.push({
            action: "moveTo",
            data: e
        }),
        this
    }
    quadraticCurveTo(...e) {
        return this.instructions.push({
            action: "quadraticCurveTo",
            data: e
        }),
        this._dirty = !0,
        this
    }
    quadraticCurveToShort(e, r, n) {
        const i = this.instructions[this.instructions.length - 1]
          , o = this.getLastPoint(Gt.shared);
        let s = 0
          , a = 0;
        if (!i || i.action !== "quadraticCurveTo")
            s = o.x,
            a = o.y;
        else {
            s = i.data[0],
            a = i.data[1];
            const l = o.x
              , c = o.y;
            s = l + (l - s),
            a = c + (c - a)
        }
        return this.instructions.push({
            action: "quadraticCurveTo",
            data: [s, a, e, r, n]
        }),
        this._dirty = !0,
        this
    }
    rect(e, r, n, i, o) {
        return this.instructions.push({
            action: "rect",
            data: [e, r, n, i, o]
        }),
        this._dirty = !0,
        this
    }
    circle(e, r, n, i) {
        return this.instructions.push({
            action: "circle",
            data: [e, r, n, i]
        }),
        this._dirty = !0,
        this
    }
    roundRect(...e) {
        return this.instructions.push({
            action: "roundRect",
            data: e
        }),
        this._dirty = !0,
        this
    }
    poly(...e) {
        return this.instructions.push({
            action: "poly",
            data: e
        }),
        this._dirty = !0,
        this
    }
    regularPoly(...e) {
        return this.instructions.push({
            action: "regularPoly",
            data: e
        }),
        this._dirty = !0,
        this
    }
    roundPoly(...e) {
        return this.instructions.push({
            action: "roundPoly",
            data: e
        }),
        this._dirty = !0,
        this
    }
    roundShape(...e) {
        return this.instructions.push({
            action: "roundShape",
            data: e
        }),
        this._dirty = !0,
        this
    }
    filletRect(...e) {
        return this.instructions.push({
            action: "filletRect",
            data: e
        }),
        this._dirty = !0,
        this
    }
    chamferRect(...e) {
        return this.instructions.push({
            action: "chamferRect",
            data: e
        }),
        this._dirty = !0,
        this
    }
    star(e, r, n, i, o, s, a) {
        o || (o = i / 2);
        const l = -1 * Math.PI / 2 + s
          , c = n * 2
          , u = Math.PI * 2 / c
          , f = [];
        for (let d = 0; d < c; d++) {
            const h = d % 2 ? o : i
              , x = d * u + l;
            f.push(e + h * Math.cos(x), r + h * Math.sin(x))
        }
        return this.poly(f, !0, a),
        this
    }
    clone(e=!1) {
        const r = new ts;
        if (r.checkForHoles = this.checkForHoles,
        !e)
            r.instructions = this.instructions.slice();
        else
            for (let n = 0; n < this.instructions.length; n++) {
                const i = this.instructions[n];
                r.instructions.push({
                    action: i.action,
                    data: i.data.slice()
                })
            }
        return r
    }
    clear() {
        return this.instructions.length = 0,
        this._dirty = !0,
        this
    }
    transform(e) {
        if (e.isIdentity())
            return this;
        const r = e.a
          , n = e.b
          , i = e.c
          , o = e.d
          , s = e.tx
          , a = e.ty;
        let l = 0
          , c = 0
          , u = 0
          , f = 0
          , d = 0
          , h = 0
          , x = 0
          , y = 0;
        for (let m = 0; m < this.instructions.length; m++) {
            const E = this.instructions[m]
              , g = E.data;
            switch (E.action) {
            case "moveTo":
            case "lineTo":
                l = g[0],
                c = g[1],
                g[0] = r * l + i * c + s,
                g[1] = n * l + o * c + a;
                break;
            case "bezierCurveTo":
                u = g[0],
                f = g[1],
                d = g[2],
                h = g[3],
                l = g[4],
                c = g[5],
                g[0] = r * u + i * f + s,
                g[1] = n * u + o * f + a,
                g[2] = r * d + i * h + s,
                g[3] = n * d + o * h + a,
                g[4] = r * l + i * c + s,
                g[5] = n * l + o * c + a;
                break;
            case "quadraticCurveTo":
                u = g[0],
                f = g[1],
                l = g[2],
                c = g[3],
                g[0] = r * u + i * f + s,
                g[1] = n * u + o * f + a,
                g[2] = r * l + i * c + s,
                g[3] = n * l + o * c + a;
                break;
            case "arcToSvg":
                l = g[5],
                c = g[6],
                x = g[0],
                y = g[1],
                g[0] = r * x + i * y,
                g[1] = n * x + o * y,
                g[5] = r * l + i * c + s,
                g[6] = n * l + o * c + a;
                break;
            case "circle":
                g[4] = Qu(g[3], e);
                break;
            case "rect":
                g[4] = Qu(g[4], e);
                break;
            case "ellipse":
                g[8] = Qu(g[8], e);
                break;
            case "roundRect":
                g[5] = Qu(g[5], e);
                break;
            case "addPath":
                g[0].transform(e);
                break;
            case "poly":
                g[2] = Qu(g[2], e);
                break;
            default:
                Ne("unknown transform action", E.action);
                break
            }
        }
        return this._dirty = !0,
        this
    }
    get bounds() {
        return this.shapePath.bounds
    }
    getLastPoint(e) {
        let r = this.instructions.length - 1
          , n = this.instructions[r];
        if (!n)
            return e.x = 0,
            e.y = 0,
            e;
        for (; n.action === "closePath"; ) {
            if (r--,
            r < 0)
                return e.x = 0,
                e.y = 0,
                e;
            n = this.instructions[r]
        }
        switch (n.action) {
        case "moveTo":
        case "lineTo":
            e.x = n.data[0],
            e.y = n.data[1];
            break;
        case "quadraticCurveTo":
            e.x = n.data[2],
            e.y = n.data[3];
            break;
        case "bezierCurveTo":
            e.x = n.data[4],
            e.y = n.data[5];
            break;
        case "arc":
        case "arcToSvg":
            e.x = n.data[5],
            e.y = n.data[6];
            break;
        case "addPath":
            n.data[0].getLastPoint(e);
            break
        }
        return e
    }
}
function Qu(t, e) {
    return t ? t.prepend(e) : e.clone()
}
function Zt(t, e, r) {
    const n = t.getAttribute(e);
    return n ? Number(n) : r
}
function lue(t, e) {
    const r = t.querySelectorAll("defs");
    for (let n = 0; n < r.length; n++) {
        const i = r[n];
        for (let o = 0; o < i.children.length; o++) {
            const s = i.children[o];
            switch (s.nodeName.toLowerCase()) {
            case "lineargradient":
                e.defs[s.id] = cue(s);
                break;
            case "radialgradient":
                e.defs[s.id] = uue();
                break
            }
        }
    }
}
function cue(t) {
    const e = Zt(t, "x1", 0)
      , r = Zt(t, "y1", 0)
      , n = Zt(t, "x2", 1)
      , i = Zt(t, "y2", 0)
      , o = t.getAttribute("gradientUnits") || "objectBoundingBox"
      , s = new ds(e,r,n,i,o === "objectBoundingBox" ? "local" : "global");
    for (let a = 0; a < t.children.length; a++) {
        const l = t.children[a]
          , c = Zt(l, "offset", 0)
          , u = Ut.shared.setValue(l.getAttribute("stop-color")).toNumber();
        s.addColorStop(c, u)
    }
    return s
}
function uue(t) {
    return Ne("[SVG Parser] Radial gradients are not yet supported"),
    new ds(0,0,1,0)
}
function Kw(t) {
    const e = t.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);
    return e ? e[1] : ""
}
const qw = {
    fill: {
        type: "paint",
        default: 0
    },
    "fill-opacity": {
        type: "number",
        default: 1
    },
    stroke: {
        type: "paint",
        default: 0
    },
    "stroke-width": {
        type: "number",
        default: 1
    },
    "stroke-opacity": {
        type: "number",
        default: 1
    },
    "stroke-linecap": {
        type: "string",
        default: "butt"
    },
    "stroke-linejoin": {
        type: "string",
        default: "miter"
    },
    "stroke-miterlimit": {
        type: "number",
        default: 10
    },
    "stroke-dasharray": {
        type: "string",
        default: "none"
    },
    "stroke-dashoffset": {
        type: "number",
        default: 0
    },
    opacity: {
        type: "number",
        default: 1
    }
};
function HP(t, e) {
    const r = t.getAttribute("style")
      , n = {}
      , i = {}
      , o = {
        strokeStyle: n,
        fillStyle: i,
        useFill: !1,
        useStroke: !1
    };
    for (const s in qw) {
        const a = t.getAttribute(s);
        a && Zw(e, o, s, a.trim())
    }
    if (r) {
        const s = r.split(";");
        for (let a = 0; a < s.length; a++) {
            const l = s[a].trim()
              , [c,u] = l.split(":");
            qw[c] && Zw(e, o, c, u.trim())
        }
    }
    return {
        strokeStyle: o.useStroke ? n : null,
        fillStyle: o.useFill ? i : null,
        useFill: o.useFill,
        useStroke: o.useStroke
    }
}
function Zw(t, e, r, n) {
    switch (r) {
    case "stroke":
        if (n !== "none") {
            if (n.startsWith("url(")) {
                const i = Kw(n);
                e.strokeStyle.fill = t.defs[i]
            } else
                e.strokeStyle.color = Ut.shared.setValue(n).toNumber();
            e.useStroke = !0
        }
        break;
    case "stroke-width":
        e.strokeStyle.width = Number(n);
        break;
    case "fill":
        if (n !== "none") {
            if (n.startsWith("url(")) {
                const i = Kw(n);
                e.fillStyle.fill = t.defs[i]
            } else
                e.fillStyle.color = Ut.shared.setValue(n).toNumber();
            e.useFill = !0
        }
        break;
    case "fill-opacity":
        e.fillStyle.alpha = Number(n);
        break;
    case "stroke-opacity":
        e.strokeStyle.alpha = Number(n);
        break;
    case "opacity":
        e.fillStyle.alpha = Number(n),
        e.strokeStyle.alpha = Number(n);
        break
    }
}
function fue(t) {
    if (t.length <= 2)
        return !0;
    const e = t.map(a => a.area).sort( (a, l) => l - a)
      , [r,n] = e
      , i = e[e.length - 1]
      , o = r / n
      , s = n / i;
    return !(o > 3 && s < 2)
}
function due(t) {
    return t.split(/(?=[Mm])/).filter(n => n.trim().length > 0)
}
function hue(t) {
    const e = t.match(/[-+]?[0-9]*\.?[0-9]+/g);
    if (!e || e.length < 4)
        return 0;
    const r = e.map(Number)
      , n = []
      , i = [];
    for (let u = 0; u < r.length; u += 2)
        u + 1 < r.length && (n.push(r[u]),
        i.push(r[u + 1]));
    if (n.length === 0 || i.length === 0)
        return 0;
    const o = Math.min(...n)
      , s = Math.max(...n)
      , a = Math.min(...i)
      , l = Math.max(...i);
    return (s - o) * (l - a)
}
function Jw(t, e) {
    const r = new ts(t,!1);
    for (const n of r.instructions)
        e.instructions.push(n)
}
function xue(t, e) {
    if (typeof t == "string") {
        const s = document.createElement("div");
        s.innerHTML = t.trim(),
        t = s.querySelector("svg")
    }
    const r = {
        context: e,
        defs: {},
        path: new ts
    };
    lue(t, r);
    const n = t.children
      , {fillStyle: i, strokeStyle: o} = HP(t, r);
    for (let s = 0; s < n.length; s++) {
        const a = n[s];
        a.nodeName.toLowerCase() !== "defs" && VP(a, r, i, o)
    }
    return e
}
function VP(t, e, r, n) {
    const i = t.children
      , {fillStyle: o, strokeStyle: s} = HP(t, e);
    o && r ? r = {
        ...r,
        ...o
    } : o && (r = o),
    s && n ? n = {
        ...n,
        ...s
    } : s && (n = s);
    const a = !r && !n;
    a && (r = {
        color: 0
    });
    let l, c, u, f, d, h, x, y, m, E, g, p, v, _, b, C, B;
    switch (t.nodeName.toLowerCase()) {
    case "path":
        {
            _ = t.getAttribute("d");
            const T = t.getAttribute("fill-rule")
              , A = due(_)
              , w = T === "evenodd"
              , S = A.length > 1;
            if (w && S) {
                const F = A.map(P => ({
                    path: P,
                    area: hue(P)
                }));
                if (F.sort( (P, N) => N.area - P.area),
                A.length > 3 || !fue(F))
                    for (let P = 0; P < F.length; P++) {
                        const N = F[P]
                          , j = P === 0;
                        e.context.beginPath();
                        const K = new ts(void 0,!0);
                        Jw(N.path, K),
                        e.context.path(K),
                        j ? (r && e.context.fill(r),
                        n && e.context.stroke(n)) : e.context.cut()
                    }
                else
                    for (let P = 0; P < F.length; P++) {
                        const N = F[P]
                          , j = P % 2 === 1;
                        e.context.beginPath();
                        const K = new ts(void 0,!0);
                        Jw(N.path, K),
                        e.context.path(K),
                        j ? e.context.cut() : (r && e.context.fill(r),
                        n && e.context.stroke(n))
                    }
            } else {
                const F = T ? T === "evenodd" : !0;
                b = new ts(_,F),
                e.context.path(b),
                r && e.context.fill(r),
                n && e.context.stroke(n)
            }
            break
        }
    case "circle":
        x = Zt(t, "cx", 0),
        y = Zt(t, "cy", 0),
        m = Zt(t, "r", 0),
        e.context.ellipse(x, y, m, m),
        r && e.context.fill(r),
        n && e.context.stroke(n);
        break;
    case "rect":
        l = Zt(t, "x", 0),
        c = Zt(t, "y", 0),
        C = Zt(t, "width", 0),
        B = Zt(t, "height", 0),
        E = Zt(t, "rx", 0),
        g = Zt(t, "ry", 0),
        E || g ? e.context.roundRect(l, c, C, B, E || g) : e.context.rect(l, c, C, B),
        r && e.context.fill(r),
        n && e.context.stroke(n);
        break;
    case "ellipse":
        x = Zt(t, "cx", 0),
        y = Zt(t, "cy", 0),
        E = Zt(t, "rx", 0),
        g = Zt(t, "ry", 0),
        e.context.beginPath(),
        e.context.ellipse(x, y, E, g),
        r && e.context.fill(r),
        n && e.context.stroke(n);
        break;
    case "line":
        u = Zt(t, "x1", 0),
        f = Zt(t, "y1", 0),
        d = Zt(t, "x2", 0),
        h = Zt(t, "y2", 0),
        e.context.beginPath(),
        e.context.moveTo(u, f),
        e.context.lineTo(d, h),
        n && e.context.stroke(n);
        break;
    case "polygon":
        v = t.getAttribute("points"),
        p = v.match(/\d+/g).map(T => parseInt(T, 10)),
        e.context.poly(p, !0),
        r && e.context.fill(r),
        n && e.context.stroke(n);
        break;
    case "polyline":
        v = t.getAttribute("points"),
        p = v.match(/\d+/g).map(T => parseInt(T, 10)),
        e.context.poly(p, !1),
        n && e.context.stroke(n);
        break;
    case "g":
    case "svg":
        break;
    default:
        {
            Ne(`[SVG parser] <${t.nodeName}> elements unsupported`);
            break
        }
    }
    a && (r = null);
    for (let T = 0; T < i.length; T++)
        VP(i[T], e, r, n)
}
function pue(t) {
    return Ut.isColorLike(t)
}
function Qw(t) {
    return t instanceof u1
}
function e3(t) {
    return t instanceof ds
}
function gue(t) {
    return t instanceof Be
}
function mue(t, e, r) {
    const n = Ut.shared.setValue(e ?? 0);
    return t.color = n.toNumber(),
    t.alpha = n.alpha === 1 ? r.alpha : n.alpha,
    t.texture = Be.WHITE,
    {
        ...r,
        ...t
    }
}
function vue(t, e, r) {
    return t.texture = e,
    {
        ...r,
        ...t
    }
}
function t3(t, e, r) {
    return t.fill = e,
    t.color = 16777215,
    t.texture = e.texture,
    t.matrix = e.transform,
    {
        ...r,
        ...t
    }
}
function r3(t, e, r) {
    return e.buildGradient(),
    t.fill = e,
    t.color = 16777215,
    t.texture = e.texture,
    t.matrix = e.transform,
    t.textureSpace = e.textureSpace,
    {
        ...r,
        ...t
    }
}
function yue(t, e) {
    const r = {
        ...e,
        ...t
    }
      , n = Ut.shared.setValue(r.color);
    return r.alpha *= n.alpha,
    r.color = n.toNumber(),
    r
}
function Xa(t, e) {
    if (t == null)
        return null;
    const r = {}
      , n = t;
    return pue(t) ? mue(r, t, e) : gue(t) ? vue(r, t, e) : Qw(t) ? t3(r, t, e) : e3(t) ? r3(r, t, e) : n.fill && Qw(n.fill) ? t3(n, n.fill, e) : n.fill && e3(n.fill) ? r3(n, n.fill, e) : yue(n, e)
}
function Nx(t, e) {
    const {width: r, alignment: n, miterLimit: i, cap: o, join: s, pixelLine: a, ...l} = e
      , c = Xa(t, l);
    return c ? {
        width: r,
        alignment: n,
        miterLimit: i,
        cap: o,
        join: s,
        pixelLine: a,
        ...c
    } : null
}
const Eue = new Gt
  , n3 = new Pe
  , _b = class Qi extends Qn {
    constructor() {
        super(...arguments),
        this.uid = Tt("graphicsContext"),
        this.dirty = !0,
        this.batchMode = "auto",
        this.instructions = [],
        this._activePath = new ts,
        this._transform = new Pe,
        this._fillStyle = {
            ...Qi.defaultFillStyle
        },
        this._strokeStyle = {
            ...Qi.defaultStrokeStyle
        },
        this._stateStack = [],
        this._tick = 0,
        this._bounds = new Vr,
        this._boundsDirty = !0
    }
    clone() {
        const e = new Qi;
        return e.batchMode = this.batchMode,
        e.instructions = this.instructions.slice(),
        e._activePath = this._activePath.clone(),
        e._transform = this._transform.clone(),
        e._fillStyle = {
            ...this._fillStyle
        },
        e._strokeStyle = {
            ...this._strokeStyle
        },
        e._stateStack = this._stateStack.slice(),
        e._bounds = this._bounds.clone(),
        e._boundsDirty = !0,
        e
    }
    get fillStyle() {
        return this._fillStyle
    }
    set fillStyle(e) {
        this._fillStyle = Xa(e, Qi.defaultFillStyle)
    }
    get strokeStyle() {
        return this._strokeStyle
    }
    set strokeStyle(e) {
        this._strokeStyle = Nx(e, Qi.defaultStrokeStyle)
    }
    setFillStyle(e) {
        return this._fillStyle = Xa(e, Qi.defaultFillStyle),
        this
    }
    setStrokeStyle(e) {
        return this._strokeStyle = Xa(e, Qi.defaultStrokeStyle),
        this
    }
    texture(e, r, n, i, o, s) {
        return this.instructions.push({
            action: "texture",
            data: {
                image: e,
                dx: n || 0,
                dy: i || 0,
                dw: o || e.frame.width,
                dh: s || e.frame.height,
                transform: this._transform.clone(),
                alpha: this._fillStyle.alpha,
                style: r ? Ut.shared.setValue(r).toNumber() : 16777215
            }
        }),
        this.onUpdate(),
        this
    }
    beginPath() {
        return this._activePath = new ts,
        this
    }
    fill(e, r) {
        let n;
        const i = this.instructions[this.instructions.length - 1];
        return this._tick === 0 && (i == null ? void 0 : i.action) === "stroke" ? n = i.data.path : n = this._activePath.clone(),
        n ? (e != null && (r !== void 0 && typeof e == "number" && (Re(tt, "GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"),
        e = {
            color: e,
            alpha: r
        }),
        this._fillStyle = Xa(e, Qi.defaultFillStyle)),
        this.instructions.push({
            action: "fill",
            data: {
                style: this.fillStyle,
                path: n
            }
        }),
        this.onUpdate(),
        this._initNextPathLocation(),
        this._tick = 0,
        this) : this
    }
    _initNextPathLocation() {
        const {x: e, y: r} = this._activePath.getLastPoint(Gt.shared);
        this._activePath.clear(),
        this._activePath.moveTo(e, r)
    }
    stroke(e) {
        let r;
        const n = this.instructions[this.instructions.length - 1];
        return this._tick === 0 && (n == null ? void 0 : n.action) === "fill" ? r = n.data.path : r = this._activePath.clone(),
        r ? (e != null && (this._strokeStyle = Nx(e, Qi.defaultStrokeStyle)),
        this.instructions.push({
            action: "stroke",
            data: {
                style: this.strokeStyle,
                path: r
            }
        }),
        this.onUpdate(),
        this._initNextPathLocation(),
        this._tick = 0,
        this) : this
    }
    cut() {
        for (let e = 0; e < 2; e++) {
            const r = this.instructions[this.instructions.length - 1 - e]
              , n = this._activePath.clone();
            if (r && (r.action === "stroke" || r.action === "fill"))
                if (r.data.hole)
                    r.data.hole.addPath(n);
                else {
                    r.data.hole = n;
                    break
                }
        }
        return this._initNextPathLocation(),
        this
    }
    arc(e, r, n, i, o, s) {
        this._tick++;
        const a = this._transform;
        return this._activePath.arc(a.a * e + a.c * r + a.tx, a.b * e + a.d * r + a.ty, n, i, o, s),
        this
    }
    arcTo(e, r, n, i, o) {
        this._tick++;
        const s = this._transform;
        return this._activePath.arcTo(s.a * e + s.c * r + s.tx, s.b * e + s.d * r + s.ty, s.a * n + s.c * i + s.tx, s.b * n + s.d * i + s.ty, o),
        this
    }
    arcToSvg(e, r, n, i, o, s, a) {
        this._tick++;
        const l = this._transform;
        return this._activePath.arcToSvg(e, r, n, i, o, l.a * s + l.c * a + l.tx, l.b * s + l.d * a + l.ty),
        this
    }
    bezierCurveTo(e, r, n, i, o, s, a) {
        this._tick++;
        const l = this._transform;
        return this._activePath.bezierCurveTo(l.a * e + l.c * r + l.tx, l.b * e + l.d * r + l.ty, l.a * n + l.c * i + l.tx, l.b * n + l.d * i + l.ty, l.a * o + l.c * s + l.tx, l.b * o + l.d * s + l.ty, a),
        this
    }
    closePath() {
        var e;
        return this._tick++,
        (e = this._activePath) == null || e.closePath(),
        this
    }
    ellipse(e, r, n, i) {
        return this._tick++,
        this._activePath.ellipse(e, r, n, i, this._transform.clone()),
        this
    }
    circle(e, r, n) {
        return this._tick++,
        this._activePath.circle(e, r, n, this._transform.clone()),
        this
    }
    path(e) {
        return this._tick++,
        this._activePath.addPath(e, this._transform.clone()),
        this
    }
    lineTo(e, r) {
        this._tick++;
        const n = this._transform;
        return this._activePath.lineTo(n.a * e + n.c * r + n.tx, n.b * e + n.d * r + n.ty),
        this
    }
    moveTo(e, r) {
        this._tick++;
        const n = this._transform
          , i = this._activePath.instructions
          , o = n.a * e + n.c * r + n.tx
          , s = n.b * e + n.d * r + n.ty;
        return i.length === 1 && i[0].action === "moveTo" ? (i[0].data[0] = o,
        i[0].data[1] = s,
        this) : (this._activePath.moveTo(o, s),
        this)
    }
    quadraticCurveTo(e, r, n, i, o) {
        this._tick++;
        const s = this._transform;
        return this._activePath.quadraticCurveTo(s.a * e + s.c * r + s.tx, s.b * e + s.d * r + s.ty, s.a * n + s.c * i + s.tx, s.b * n + s.d * i + s.ty, o),
        this
    }
    rect(e, r, n, i) {
        return this._tick++,
        this._activePath.rect(e, r, n, i, this._transform.clone()),
        this
    }
    roundRect(e, r, n, i, o) {
        return this._tick++,
        this._activePath.roundRect(e, r, n, i, o, this._transform.clone()),
        this
    }
    poly(e, r) {
        return this._tick++,
        this._activePath.poly(e, r, this._transform.clone()),
        this
    }
    regularPoly(e, r, n, i, o=0, s) {
        return this._tick++,
        this._activePath.regularPoly(e, r, n, i, o, s),
        this
    }
    roundPoly(e, r, n, i, o, s) {
        return this._tick++,
        this._activePath.roundPoly(e, r, n, i, o, s),
        this
    }
    roundShape(e, r, n, i) {
        return this._tick++,
        this._activePath.roundShape(e, r, n, i),
        this
    }
    filletRect(e, r, n, i, o) {
        return this._tick++,
        this._activePath.filletRect(e, r, n, i, o),
        this
    }
    chamferRect(e, r, n, i, o, s) {
        return this._tick++,
        this._activePath.chamferRect(e, r, n, i, o, s),
        this
    }
    star(e, r, n, i, o=0, s=0) {
        return this._tick++,
        this._activePath.star(e, r, n, i, o, s, this._transform.clone()),
        this
    }
    svg(e) {
        return this._tick++,
        xue(e, this),
        this
    }
    restore() {
        const e = this._stateStack.pop();
        return e && (this._transform = e.transform,
        this._fillStyle = e.fillStyle,
        this._strokeStyle = e.strokeStyle),
        this
    }
    save() {
        return this._stateStack.push({
            transform: this._transform.clone(),
            fillStyle: {
                ...this._fillStyle
            },
            strokeStyle: {
                ...this._strokeStyle
            }
        }),
        this
    }
    getTransform() {
        return this._transform
    }
    resetTransform() {
        return this._transform.identity(),
        this
    }
    rotate(e) {
        return this._transform.rotate(e),
        this
    }
    scale(e, r=e) {
        return this._transform.scale(e, r),
        this
    }
    setTransform(e, r, n, i, o, s) {
        return e instanceof Pe ? (this._transform.set(e.a, e.b, e.c, e.d, e.tx, e.ty),
        this) : (this._transform.set(e, r, n, i, o, s),
        this)
    }
    transform(e, r, n, i, o, s) {
        return e instanceof Pe ? (this._transform.append(e),
        this) : (n3.set(e, r, n, i, o, s),
        this._transform.append(n3),
        this)
    }
    translate(e, r=e) {
        return this._transform.translate(e, r),
        this
    }
    clear() {
        return this._activePath.clear(),
        this.instructions.length = 0,
        this.resetTransform(),
        this.onUpdate(),
        this
    }
    onUpdate() {
        this._boundsDirty = !0,
        !this.dirty && (this.emit("update", this, 16),
        this.dirty = !0)
    }
    get bounds() {
        if (!this._boundsDirty)
            return this._bounds;
        this._boundsDirty = !1;
        const e = this._bounds;
        e.clear();
        for (let r = 0; r < this.instructions.length; r++) {
            const n = this.instructions[r]
              , i = n.action;
            if (i === "fill") {
                const o = n.data;
                e.addBounds(o.path.bounds)
            } else if (i === "texture") {
                const o = n.data;
                e.addFrame(o.dx, o.dy, o.dx + o.dw, o.dy + o.dh, o.transform)
            }
            if (i === "stroke") {
                const o = n.data
                  , s = o.style.alignment
                  , a = o.style.width * (1 - s)
                  , l = o.path.bounds;
                e.addFrame(l.minX - a, l.minY - a, l.maxX + a, l.maxY + a)
            }
        }
        return e
    }
    containsPoint(e) {
        var i;
        if (!this.bounds.containsPoint(e.x, e.y))
            return !1;
        const r = this.instructions;
        let n = !1;
        for (let o = 0; o < r.length; o++) {
            const s = r[o]
              , a = s.data
              , l = a.path;
            if (!s.action || !l)
                continue;
            const c = a.style
              , u = l.shapePath.shapePrimitives;
            for (let f = 0; f < u.length; f++) {
                const d = u[f].shape;
                if (!c || !d)
                    continue;
                const h = u[f].transform
                  , x = h ? h.applyInverse(e, Eue) : e;
                if (s.action === "fill")
                    n = d.contains(x.x, x.y);
                else {
                    const m = c;
                    n = d.strokeContains(x.x, x.y, m.width, m.alignment)
                }
                const y = a.hole;
                if (y) {
                    const m = (i = y.shapePath) == null ? void 0 : i.shapePrimitives;
                    if (m)
                        for (let E = 0; E < m.length; E++)
                            m[E].shape.contains(x.x, x.y) && (n = !1)
                }
                if (n)
                    return !0
            }
        }
        return n
    }
    destroy(e=!1) {
        if (this._stateStack.length = 0,
        this._transform = null,
        this.emit("destroy", this),
        this.removeAllListeners(),
        typeof e == "boolean" ? e : e == null ? void 0 : e.texture) {
            const n = typeof e == "boolean" ? e : e == null ? void 0 : e.textureSource;
            this._fillStyle.texture && (this._fillStyle.fill && "uid"in this._fillStyle.fill ? this._fillStyle.fill.destroy() : this._fillStyle.texture.destroy(n)),
            this._strokeStyle.texture && (this._strokeStyle.fill && "uid"in this._strokeStyle.fill ? this._strokeStyle.fill.destroy() : this._strokeStyle.texture.destroy(n))
        }
        this._fillStyle = null,
        this._strokeStyle = null,
        this.instructions = null,
        this._activePath = null,
        this._bounds = null,
        this._stateStack = null,
        this.customShader = null,
        this._transform = null
    }
}
;
_b.defaultFillStyle = {
    color: 16777215,
    alpha: 1,
    texture: Be.WHITE,
    matrix: null,
    fill: null,
    textureSpace: "local"
};
_b.defaultStrokeStyle = {
    width: 1,
    color: 16777215,
    alpha: 1,
    alignment: .5,
    miterLimit: 10,
    cap: "butt",
    join: "miter",
    texture: Be.WHITE,
    matrix: null,
    fill: null,
    textureSpace: "local",
    pixelLine: !1
};
let ui = _b;
const bb = class gc extends Qn {
    constructor(e={}) {
        super(),
        this.uid = Tt("textStyle"),
        this._tick = 0,
        _ue(e);
        const r = {
            ...gc.defaultTextStyle,
            ...e
        };
        for (const n in r) {
            const i = n;
            this[i] = r[n]
        }
        this.update(),
        this._tick = 0
    }
    get align() {
        return this._align
    }
    set align(e) {
        this._align !== e && (this._align = e,
        this.update())
    }
    get breakWords() {
        return this._breakWords
    }
    set breakWords(e) {
        this._breakWords !== e && (this._breakWords = e,
        this.update())
    }
    get dropShadow() {
        return this._dropShadow
    }
    set dropShadow(e) {
        this._dropShadow !== e && (e !== null && typeof e == "object" ? this._dropShadow = this._createProxy({
            ...gc.defaultDropShadow,
            ...e
        }) : this._dropShadow = e ? this._createProxy({
            ...gc.defaultDropShadow
        }) : null,
        this.update())
    }
    get fontFamily() {
        return this._fontFamily
    }
    set fontFamily(e) {
        this._fontFamily !== e && (this._fontFamily = e,
        this.update())
    }
    get fontSize() {
        return this._fontSize
    }
    set fontSize(e) {
        this._fontSize !== e && (typeof e == "string" ? this._fontSize = parseInt(e, 10) : this._fontSize = e,
        this.update())
    }
    get fontStyle() {
        return this._fontStyle
    }
    set fontStyle(e) {
        this._fontStyle !== e && (this._fontStyle = e.toLowerCase(),
        this.update())
    }
    get fontVariant() {
        return this._fontVariant
    }
    set fontVariant(e) {
        this._fontVariant !== e && (this._fontVariant = e,
        this.update())
    }
    get fontWeight() {
        return this._fontWeight
    }
    set fontWeight(e) {
        this._fontWeight !== e && (this._fontWeight = e,
        this.update())
    }
    get leading() {
        return this._leading
    }
    set leading(e) {
        this._leading !== e && (this._leading = e,
        this.update())
    }
    get letterSpacing() {
        return this._letterSpacing
    }
    set letterSpacing(e) {
        this._letterSpacing !== e && (this._letterSpacing = e,
        this.update())
    }
    get lineHeight() {
        return this._lineHeight
    }
    set lineHeight(e) {
        this._lineHeight !== e && (this._lineHeight = e,
        this.update())
    }
    get padding() {
        return this._padding
    }
    set padding(e) {
        this._padding !== e && (this._padding = e,
        this.update())
    }
    get filters() {
        return this._filters
    }
    set filters(e) {
        this._filters !== e && (this._filters = Object.freeze(e),
        this.update())
    }
    get trim() {
        return this._trim
    }
    set trim(e) {
        this._trim !== e && (this._trim = e,
        this.update())
    }
    get textBaseline() {
        return this._textBaseline
    }
    set textBaseline(e) {
        this._textBaseline !== e && (this._textBaseline = e,
        this.update())
    }
    get whiteSpace() {
        return this._whiteSpace
    }
    set whiteSpace(e) {
        this._whiteSpace !== e && (this._whiteSpace = e,
        this.update())
    }
    get wordWrap() {
        return this._wordWrap
    }
    set wordWrap(e) {
        this._wordWrap !== e && (this._wordWrap = e,
        this.update())
    }
    get wordWrapWidth() {
        return this._wordWrapWidth
    }
    set wordWrapWidth(e) {
        this._wordWrapWidth !== e && (this._wordWrapWidth = e,
        this.update())
    }
    get fill() {
        return this._originalFill
    }
    set fill(e) {
        e !== this._originalFill && (this._originalFill = e,
        this._isFillStyle(e) && (this._originalFill = this._createProxy({
            ...ui.defaultFillStyle,
            ...e
        }, () => {
            this._fill = Xa({
                ...this._originalFill
            }, ui.defaultFillStyle)
        }
        )),
        this._fill = Xa(e === 0 ? "black" : e, ui.defaultFillStyle),
        this.update())
    }
    get stroke() {
        return this._originalStroke
    }
    set stroke(e) {
        e !== this._originalStroke && (this._originalStroke = e,
        this._isFillStyle(e) && (this._originalStroke = this._createProxy({
            ...ui.defaultStrokeStyle,
            ...e
        }, () => {
            this._stroke = Nx({
                ...this._originalStroke
            }, ui.defaultStrokeStyle)
        }
        )),
        this._stroke = Nx(e, ui.defaultStrokeStyle),
        this.update())
    }
    update() {
        this._tick++,
        this.emit("update", this)
    }
    reset() {
        const e = gc.defaultTextStyle;
        for (const r in e)
            this[r] = e[r]
    }
    get styleKey() {
        return `${this.uid}-${this._tick}`
    }
    clone() {
        return new gc({
            align: this.align,
            breakWords: this.breakWords,
            dropShadow: this._dropShadow ? {
                ...this._dropShadow
            } : null,
            fill: this._fill,
            fontFamily: this.fontFamily,
            fontSize: this.fontSize,
            fontStyle: this.fontStyle,
            fontVariant: this.fontVariant,
            fontWeight: this.fontWeight,
            leading: this.leading,
            letterSpacing: this.letterSpacing,
            lineHeight: this.lineHeight,
            padding: this.padding,
            stroke: this._stroke,
            textBaseline: this.textBaseline,
            whiteSpace: this.whiteSpace,
            wordWrap: this.wordWrap,
            wordWrapWidth: this.wordWrapWidth,
            filters: this._filters ? [...this._filters] : void 0
        })
    }
    _getFinalPadding() {
        let e = 0;
        if (this._filters)
            for (let r = 0; r < this._filters.length; r++)
                e += this._filters[r].padding;
        return Math.max(this._padding, e)
    }
    destroy(e=!1) {
        var n, i, o, s;
        if (this.removeAllListeners(),
        typeof e == "boolean" ? e : e == null ? void 0 : e.texture) {
            const a = typeof e == "boolean" ? e : e == null ? void 0 : e.textureSource;
            (n = this._fill) != null && n.texture && this._fill.texture.destroy(a),
            (i = this._originalFill) != null && i.texture && this._originalFill.texture.destroy(a),
            (o = this._stroke) != null && o.texture && this._stroke.texture.destroy(a),
            (s = this._originalStroke) != null && s.texture && this._originalStroke.texture.destroy(a)
        }
        this._fill = null,
        this._stroke = null,
        this.dropShadow = null,
        this._originalStroke = null,
        this._originalFill = null
    }
    _createProxy(e, r) {
        return new Proxy(e,{
            set: (n, i, o) => (n[i] === o || (n[i] = o,
            r == null || r(i, o),
            this.update()),
            !0)
        })
    }
    _isFillStyle(e) {
        return (e ?? null) !== null && !(Ut.isColorLike(e) || e instanceof ds || e instanceof u1)
    }
}
;
bb.defaultDropShadow = {
    alpha: 1,
    angle: Math.PI / 6,
    blur: 0,
    color: "black",
    distance: 5
};
bb.defaultTextStyle = {
    align: "left",
    breakWords: !1,
    dropShadow: null,
    fill: "black",
    fontFamily: "Arial",
    fontSize: 26,
    fontStyle: "normal",
    fontVariant: "normal",
    fontWeight: "normal",
    leading: 0,
    letterSpacing: 0,
    lineHeight: 0,
    padding: 0,
    stroke: null,
    textBaseline: "alphabetic",
    trim: !1,
    whiteSpace: "pre",
    wordWrap: !1,
    wordWrapWidth: 100
};
let wl = bb;
function _ue(t) {
    const e = t;
    if (typeof e.dropShadow == "boolean" && e.dropShadow) {
        const r = wl.defaultDropShadow;
        t.dropShadow = {
            alpha: e.dropShadowAlpha ?? r.alpha,
            angle: e.dropShadowAngle ?? r.angle,
            blur: e.dropShadowBlur ?? r.blur,
            color: e.dropShadowColor ?? r.color,
            distance: e.dropShadowDistance ?? r.distance
        }
    }
    if (e.strokeThickness !== void 0) {
        Re(tt, "strokeThickness is now a part of stroke");
        const r = e.stroke;
        let n = {};
        if (Ut.isColorLike(r))
            n.color = r;
        else if (r instanceof ds || r instanceof u1)
            n.fill = r;
        else if (Object.hasOwnProperty.call(r, "color") || Object.hasOwnProperty.call(r, "fill"))
            n = r;
        else
            throw new Error("Invalid stroke value.");
        t.stroke = {
            ...n,
            width: e.strokeThickness
        }
    }
    if (Array.isArray(e.fillGradientStops)) {
        if (Re(tt, "gradient fill is now a fill pattern: `new FillGradient(...)`"),
        !Array.isArray(e.fill) || e.fill.length === 0)
            throw new Error("Invalid fill value. Expected an array of colors for gradient fill.");
        e.fill.length !== e.fillGradientStops.length && Ne("The number of fill colors must match the number of fill gradient stops.");
        const r = new ds({
            start: {
                x: 0,
                y: 0
            },
            end: {
                x: 0,
                y: 1
            },
            textureSpace: "local"
        })
          , n = e.fillGradientStops.slice()
          , i = e.fill.map(o => Ut.shared.setValue(o).toNumber());
        n.forEach( (o, s) => {
            r.addColorStop(o, i[s])
        }
        ),
        t.fill = {
            fill: r
        }
    }
}
class bue {
    constructor(e) {
        this._canvasPool = Object.create(null),
        this.canvasOptions = e || {},
        this.enableFullScreen = !1
    }
    _createCanvasAndContext(e, r) {
        const n = je.get().createCanvas();
        n.width = e,
        n.height = r;
        const i = n.getContext("2d");
        return {
            canvas: n,
            context: i
        }
    }
    getOptimalCanvasAndContext(e, r, n=1) {
        e = Math.ceil(e * n - 1e-6),
        r = Math.ceil(r * n - 1e-6),
        e = eu(e),
        r = eu(r);
        const i = (e << 17) + (r << 1);
        this._canvasPool[i] || (this._canvasPool[i] = []);
        let o = this._canvasPool[i].pop();
        return o || (o = this._createCanvasAndContext(e, r)),
        o
    }
    returnCanvasAndContext(e) {
        const r = e.canvas
          , {width: n, height: i} = r
          , o = (n << 17) + (i << 1);
        e.context.resetTransform(),
        e.context.clearRect(0, 0, n, i),
        this._canvasPool[o].push(e)
    }
    clear() {
        this._canvasPool = {}
    }
}
const hs = new bue;
Cu.register(hs);
const i3 = 1e5;
function Lx(t, e, r, n=0) {
    if (t.texture === Be.WHITE && !t.fill)
        return Ut.shared.setValue(t.color).setAlpha(t.alpha ?? 1).toHexa();
    if (t.fill) {
        if (t.fill instanceof u1) {
            const i = t.fill
              , o = e.createPattern(i.texture.source.resource, "repeat")
              , s = i.transform.copyTo(Pe.shared);
            return s.scale(i.texture.frame.width, i.texture.frame.height),
            o.setTransform(s),
            o
        } else if (t.fill instanceof ds) {
            const i = t.fill
              , o = i.type === "linear"
              , s = i.textureSpace === "local";
            let a = 1
              , l = 1;
            s && r && (a = r.width + n,
            l = r.height + n);
            let c, u = !1;
            if (o) {
                const {start: f, end: d} = i;
                c = e.createLinearGradient(f.x * a, f.y * l, d.x * a, d.y * l),
                u = Math.abs(d.x - f.x) < Math.abs((d.y - f.y) * .1)
            } else {
                const {center: f, innerRadius: d, outerCenter: h, outerRadius: x} = i;
                c = e.createRadialGradient(f.x * a, f.y * l, d * a, h.x * a, h.y * l, x * a)
            }
            if (u && s && r) {
                const f = r.lineHeight / l;
                for (let d = 0; d < r.lines.length; d++) {
                    const h = (d * r.lineHeight + n / 2) / l;
                    i.colorStops.forEach(x => {
                        const y = h + x.offset * f;
                        c.addColorStop(Math.floor(y * i3) / i3, Ut.shared.setValue(x.color).toHex())
                    }
                    )
                }
            } else
                i.colorStops.forEach(f => {
                    c.addColorStop(f.offset, Ut.shared.setValue(f.color).toHex())
                }
                );
            return c
        }
    } else {
        const i = e.createPattern(t.texture.source.resource, "repeat")
          , o = t.matrix.copyTo(Pe.shared);
        return o.scale(t.texture.frame.width, t.texture.frame.height),
        i.setTransform(o),
        i
    }
    return Ne("FillStyle not recognised", t),
    "red"
}
const zP = class jP extends BP {
    constructor(e) {
        super(),
        this.resolution = 1,
        this.pages = [],
        this._padding = 0,
        this._measureCache = Object.create(null),
        this._currentChars = [],
        this._currentX = 0,
        this._currentY = 0,
        this._currentMaxCharHeight = 0,
        this._currentPageIndex = -1,
        this._skipKerning = !1;
        const r = {
            ...jP.defaultOptions,
            ...e
        };
        this._textureSize = r.textureSize,
        this._mipmap = r.mipmap;
        const n = r.style.clone();
        r.overrideFill && (n._fill.color = 16777215,
        n._fill.alpha = 1,
        n._fill.texture = Be.WHITE,
        n._fill.fill = null),
        this.applyFillAsTint = r.overrideFill;
        const i = n.fontSize;
        n.fontSize = this.baseMeasurementFontSize;
        const o = Rx(n);
        r.overrideSize ? n._stroke && (n._stroke.width *= this.baseRenderedFontSize / i) : n.fontSize = this.baseRenderedFontSize = i,
        this._style = n,
        this._skipKerning = r.skipKerning ?? !1,
        this.resolution = r.resolution ?? 1,
        this._padding = r.padding ?? 4,
        r.textureStyle && (this._textureStyle = r.textureStyle instanceof bo ? r.textureStyle : new bo(r.textureStyle)),
        this.fontMetrics = Fi.measureFont(o),
        this.lineHeight = n.lineHeight || this.fontMetrics.fontSize || n.fontSize
    }
    ensureCharacters(e) {
        var m, E;
        const r = Fi.graphemeSegmenter(e).filter(g => !this._currentChars.includes(g)).filter( (g, p, v) => v.indexOf(g) === p);
        if (!r.length)
            return;
        this._currentChars = [...this._currentChars, ...r];
        let n;
        this._currentPageIndex === -1 ? n = this._nextPage() : n = this.pages[this._currentPageIndex];
        let {canvas: i, context: o} = n.canvasAndContext
          , s = n.texture.source;
        const a = this._style;
        let l = this._currentX
          , c = this._currentY
          , u = this._currentMaxCharHeight;
        const f = this.baseRenderedFontSize / this.baseMeasurementFontSize
          , d = this._padding * f;
        let h = !1;
        const x = i.width / this.resolution
          , y = i.height / this.resolution;
        for (let g = 0; g < r.length; g++) {
            const p = r[g]
              , v = Fi.measureText(p, a, i, !1);
            v.lineHeight = v.height;
            const _ = v.width * f
              , b = Math.ceil((a.fontStyle === "italic" ? 2 : 1) * _)
              , C = v.height * f
              , B = b + d * 2
              , T = C + d * 2;
            if (h = !1,
            p !== `
` && p !== "\r" && p !== "	" && p !== " " && (h = !0,
            u = Math.ceil(Math.max(T, u))),
            l + B > x && (c += u,
            u = T,
            l = 0,
            c + u > y)) {
                s.update();
                const w = this._nextPage();
                i = w.canvasAndContext.canvas,
                o = w.canvasAndContext.context,
                s = w.texture.source,
                l = 0,
                c = 0,
                u = 0
            }
            const A = _ / f - (((m = a.dropShadow) == null ? void 0 : m.distance) ?? 0) - (((E = a._stroke) == null ? void 0 : E.width) ?? 0);
            if (this.chars[p] = {
                id: p.codePointAt(0),
                xOffset: -this._padding,
                yOffset: -this._padding,
                xAdvance: A,
                kerning: {}
            },
            h) {
                this._drawGlyph(o, v, l + d, c + d, f, a);
                const w = s.width * f
                  , S = s.height * f
                  , D = new mt(l / w * s.width,c / S * s.height,B / w * s.width,T / S * s.height);
                this.chars[p].texture = new Be({
                    source: s,
                    frame: D
                }),
                l += Math.ceil(B)
            }
        }
        s.update(),
        this._currentX = l,
        this._currentY = c,
        this._currentMaxCharHeight = u,
        this._skipKerning && this._applyKerning(r, o)
    }
    get pageTextures() {
        return Re(tt, "BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),
        this.pages
    }
    _applyKerning(e, r) {
        const n = this._measureCache;
        for (let i = 0; i < e.length; i++) {
            const o = e[i];
            for (let s = 0; s < this._currentChars.length; s++) {
                const a = this._currentChars[s];
                let l = n[o];
                l || (l = n[o] = r.measureText(o).width);
                let c = n[a];
                c || (c = n[a] = r.measureText(a).width);
                let u = r.measureText(o + a).width
                  , f = u - (l + c);
                f && (this.chars[o].kerning[a] = f),
                u = r.measureText(o + a).width,
                f = u - (l + c),
                f && (this.chars[a].kerning[o] = f)
            }
        }
    }
    _nextPage() {
        this._currentPageIndex++;
        const e = this.resolution
          , r = hs.getOptimalCanvasAndContext(this._textureSize, this._textureSize, e);
        this._setupContext(r.context, this._style, e);
        const n = e * (this.baseRenderedFontSize / this.baseMeasurementFontSize)
          , i = new Be({
            source: new bl({
                resource: r.canvas,
                resolution: n,
                alphaMode: "premultiply-alpha-on-upload",
                autoGenerateMipmaps: this._mipmap
            })
        });
        this._textureStyle && (i.source.style = this._textureStyle);
        const o = {
            canvasAndContext: r,
            texture: i
        };
        return this.pages[this._currentPageIndex] = o,
        o
    }
    _setupContext(e, r, n) {
        r.fontSize = this.baseRenderedFontSize,
        e.scale(n, n),
        e.font = Rx(r),
        r.fontSize = this.baseMeasurementFontSize,
        e.textBaseline = r.textBaseline;
        const i = r._stroke
          , o = (i == null ? void 0 : i.width) ?? 0;
        if (i && (e.lineWidth = o,
        e.lineJoin = i.join,
        e.miterLimit = i.miterLimit,
        e.strokeStyle = Lx(i, e)),
        r._fill && (e.fillStyle = Lx(r._fill, e)),
        r.dropShadow) {
            const s = r.dropShadow
              , a = Ut.shared.setValue(s.color).toArray()
              , l = s.blur * n
              , c = s.distance * n;
            e.shadowColor = `rgba(${a[0] * 255},${a[1] * 255},${a[2] * 255},${s.alpha})`,
            e.shadowBlur = l,
            e.shadowOffsetX = Math.cos(s.angle) * c,
            e.shadowOffsetY = Math.sin(s.angle) * c
        } else
            e.shadowColor = "black",
            e.shadowBlur = 0,
            e.shadowOffsetX = 0,
            e.shadowOffsetY = 0
    }
    _drawGlyph(e, r, n, i, o, s) {
        const a = r.text
          , l = r.fontProperties
          , c = s._stroke
          , u = ((c == null ? void 0 : c.width) ?? 0) * o
          , f = n + u / 2
          , d = i - u / 2
          , h = l.descent * o
          , x = r.lineHeight * o;
        let y = !1;
        s.stroke && u && (y = !0,
        e.strokeText(a, f, d + x - h));
        const {shadowBlur: m, shadowOffsetX: E, shadowOffsetY: g} = e;
        s._fill && (y && (e.shadowBlur = 0,
        e.shadowOffsetX = 0,
        e.shadowOffsetY = 0),
        e.fillText(a, f, d + x - h)),
        y && (e.shadowBlur = m,
        e.shadowOffsetX = E,
        e.shadowOffsetY = g)
    }
    destroy() {
        super.destroy();
        for (let e = 0; e < this.pages.length; e++) {
            const {canvasAndContext: r, texture: n} = this.pages[e];
            hs.returnCanvasAndContext(r),
            n.destroy(!0)
        }
        this.pages = null
    }
}
;
zP.defaultOptions = {
    textureSize: 512,
    style: new wl,
    mipmap: !0
};
let o3 = zP;
function WP(t, e, r, n) {
    const i = {
        width: 0,
        height: 0,
        offsetY: 0,
        scale: e.fontSize / r.baseMeasurementFontSize,
        lines: [{
            width: 0,
            charPositions: [],
            spaceWidth: 0,
            spacesIndex: [],
            chars: []
        }]
    };
    i.offsetY = r.baseLineOffset;
    let o = i.lines[0]
      , s = null
      , a = !0;
    const l = {
        spaceWord: !1,
        width: 0,
        start: 0,
        index: 0,
        positions: [],
        chars: []
    }
      , c = r.baseMeasurementFontSize / e.fontSize
      , u = e.letterSpacing * c
      , f = e.wordWrapWidth * c
      , d = e.lineHeight ? e.lineHeight * c : r.lineHeight
      , h = e.wordWrap && e.breakWords
      , x = E => {
        const g = o.width;
        for (let p = 0; p < l.index; p++) {
            const v = E.positions[p];
            o.chars.push(E.chars[p]),
            o.charPositions.push(v + g)
        }
        o.width += E.width,
        a = !1,
        l.width = 0,
        l.index = 0,
        l.chars.length = 0
    }
      , y = () => {
        let E = o.chars.length - 1;
        if (n) {
            let g = o.chars[E];
            for (; g === " "; )
                o.width -= r.chars[g].xAdvance,
                g = o.chars[--E]
        }
        i.width = Math.max(i.width, o.width),
        o = {
            width: 0,
            charPositions: [],
            chars: [],
            spaceWidth: 0,
            spacesIndex: []
        },
        a = !0,
        i.lines.push(o),
        i.height += d
    }
      , m = E => E - u > f;
    for (let E = 0; E < t.length + 1; E++) {
        let g;
        const p = E === t.length;
        p || (g = t[E]);
        const v = r.chars[g] || r.chars[" "];
        if (/(?:\s)/.test(g) || g === "\r" || g === `
` || p) {
            if (!a && e.wordWrap && m(o.width + l.width) ? (y(),
            x(l),
            p || o.charPositions.push(0)) : (l.start = o.width,
            x(l),
            p || o.charPositions.push(0)),
            g === "\r" || g === `
`)
                y();
            else if (!p) {
                const B = v.xAdvance + (v.kerning[s] || 0) + u;
                o.width += B,
                o.spaceWidth = B,
                o.spacesIndex.push(o.charPositions.length),
                o.chars.push(g)
            }
        } else {
            const C = v.kerning[s] || 0
              , B = v.xAdvance + C + u;
            h && m(o.width + l.width + B) && (x(l),
            y()),
            l.positions[l.index++] = l.width + C,
            l.chars.push(g),
            l.width += B
        }
        s = g
    }
    return y(),
    e.align === "center" ? Cue(i) : e.align === "right" ? Aue(i) : e.align === "justify" && wue(i),
    i
}
function Cue(t) {
    for (let e = 0; e < t.lines.length; e++) {
        const r = t.lines[e]
          , n = t.width / 2 - r.width / 2;
        for (let i = 0; i < r.charPositions.length; i++)
            r.charPositions[i] += n
    }
}
function Aue(t) {
    for (let e = 0; e < t.lines.length; e++) {
        const r = t.lines[e]
          , n = t.width - r.width;
        for (let i = 0; i < r.charPositions.length; i++)
            r.charPositions[i] += n
    }
}
function wue(t) {
    const e = t.width;
    for (let r = 0; r < t.lines.length; r++) {
        const n = t.lines[r];
        let i = 0
          , o = n.spacesIndex[i++]
          , s = 0;
        const a = n.spacesIndex.length
          , c = (e - n.width) / a;
        for (let u = 0; u < n.charPositions.length; u++)
            u === o && (o = n.spacesIndex[i++],
            s += c),
            n.charPositions[u] += s
    }
}
function Bue(t) {
    if (t === "")
        return [];
    typeof t == "string" && (t = [t]);
    const e = [];
    for (let r = 0, n = t.length; r < n; r++) {
        const i = t[r];
        if (Array.isArray(i)) {
            if (i.length !== 2)
                throw new Error(`[BitmapFont]: Invalid character range length, expecting 2 got ${i.length}.`);
            if (i[0].length === 0 || i[1].length === 0)
                throw new Error("[BitmapFont]: Invalid character delimiter.");
            const o = i[0].charCodeAt(0)
              , s = i[1].charCodeAt(0);
            if (s < o)
                throw new Error("[BitmapFont]: Invalid character range.");
            for (let a = o, l = s; a <= l; a++)
                e.push(String.fromCharCode(a))
        } else
            e.push(...Array.from(i))
    }
    if (e.length === 0)
        throw new Error("[BitmapFont]: Empty set when resolving characters.");
    return e
}
let gh = 0;
class Sue {
    constructor() {
        this.ALPHA = [["a", "z"], ["A", "Z"], " "],
        this.NUMERIC = [["0", "9"]],
        this.ALPHANUMERIC = [["a", "z"], ["A", "Z"], ["0", "9"], " "],
        this.ASCII = [[" ", "~"]],
        this.defaultOptions = {
            chars: this.ALPHANUMERIC,
            resolution: 1,
            padding: 4,
            skipKerning: !1,
            textureStyle: null
        },
        this.measureCache = SP(1e3)
    }
    getFont(e, r) {
        var s;
        let n = `${r.fontFamily}-bitmap`
          , i = !0;
        if (r._fill.fill && !r._stroke ? (n += r._fill.fill.styleKey,
        i = !1) : (r._stroke || r.dropShadow) && (n = `${r.styleKey}-bitmap`,
        i = !1),
        !Et.has(n)) {
            const a = Object.create(r);
            a.lineHeight = 0;
            const l = new o3({
                style: a,
                overrideFill: i,
                overrideSize: !0,
                ...this.defaultOptions
            });
            gh++,
            gh > 50 && Ne("BitmapText", `You have dynamically created ${gh} bitmap fonts, this can be inefficient. Try pre installing your font styles using \`BitmapFont.install({name:"style1", style})\``),
            l.once("destroy", () => {
                gh--,
                Et.remove(n)
            }
            ),
            Et.set(n, l)
        }
        const o = Et.get(n);
        return (s = o.ensureCharacters) == null || s.call(o, e),
        o
    }
    getLayout(e, r, n=!0) {
        const i = this.getFont(e, r)
          , o = `${e}-${r.styleKey}-${n}`;
        if (this.measureCache.has(o))
            return this.measureCache.get(o);
        const s = Fi.graphemeSegmenter(e)
          , a = WP(s, r, i, n);
        return this.measureCache.set(o, a),
        a
    }
    measureText(e, r, n=!0) {
        return this.getLayout(e, r, n)
    }
    install(...e) {
        var c, u, f, d;
        let r = e[0];
        typeof r == "string" && (r = {
            name: r,
            style: e[1],
            chars: (c = e[2]) == null ? void 0 : c.chars,
            resolution: (u = e[2]) == null ? void 0 : u.resolution,
            padding: (f = e[2]) == null ? void 0 : f.padding,
            skipKerning: (d = e[2]) == null ? void 0 : d.skipKerning
        },
        Re(tt, "BitmapFontManager.install(name, style, options) is deprecated, use BitmapFontManager.install({name, style, ...options})"));
        const n = r == null ? void 0 : r.name;
        if (!n)
            throw new Error("[BitmapFontManager] Property `name` is required.");
        r = {
            ...this.defaultOptions,
            ...r
        };
        const i = r.style
          , o = i instanceof wl ? i : new wl(i)
          , s = r.dynamicFill ?? this._canUseTintForStyle(o)
          , a = new o3({
            style: o,
            overrideFill: s,
            skipKerning: r.skipKerning,
            padding: r.padding,
            resolution: r.resolution,
            overrideSize: !1,
            textureStyle: r.textureStyle
        })
          , l = Bue(r.chars);
        return a.ensureCharacters(l.join("")),
        Et.set(`${n}-bitmap`, a),
        a.once("destroy", () => Et.remove(`${n}-bitmap`)),
        a
    }
    uninstall(e) {
        const r = `${e}-bitmap`
          , n = Et.get(r);
        n && n.destroy()
    }
    _canUseTintForStyle(e) {
        return !e._stroke && (!e.dropShadow || e.dropShadow.color === 0) && !e._fill.fill && e._fill.color === 16777215
    }
}
const aE = new Sue;
class YP extends BP {
    constructor(e, r) {
        super();
        const {textures: n, data: i} = e;
        Object.keys(i.pages).forEach(o => {
            const s = i.pages[parseInt(o, 10)]
              , a = n[s.id];
            this.pages.push({
                texture: a
            })
        }
        ),
        Object.keys(i.chars).forEach(o => {
            const s = i.chars[o]
              , {frame: a, source: l, rotate: c} = n[s.page]
              , u = bt.transformRectCoords(s, a, c, new mt)
              , f = new Be({
                frame: u,
                orig: new mt(0,0,s.width,s.height),
                source: l,
                rotate: c
            });
            this.chars[o] = {
                id: o.codePointAt(0),
                xOffset: s.xOffset,
                yOffset: s.yOffset,
                xAdvance: s.xAdvance,
                kerning: s.kerning ?? {},
                texture: f
            }
        }
        ),
        this.baseRenderedFontSize = i.fontSize,
        this.baseMeasurementFontSize = i.fontSize,
        this.fontMetrics = {
            ascent: 0,
            descent: 0,
            fontSize: i.fontSize
        },
        this.baseLineOffset = i.baseLineOffset,
        this.lineHeight = i.lineHeight,
        this.fontFamily = i.fontFamily,
        this.distanceField = i.distanceField ?? {
            type: "none",
            range: 0
        },
        this.url = r
    }
    destroy() {
        super.destroy();
        for (let e = 0; e < this.pages.length; e++) {
            const {texture: r} = this.pages[e];
            r.destroy(!0)
        }
        this.pages = null
    }
    static install(e) {
        aE.install(e)
    }
    static uninstall(e) {
        aE.uninstall(e)
    }
}
const qg = {
    test(t) {
        return typeof t == "string" && t.startsWith("info face=")
    },
    parse(t) {
        const e = t.match(/^[a-z]+\s+.+$/gm)
          , r = {
            info: [],
            common: [],
            page: [],
            char: [],
            chars: [],
            kerning: [],
            kernings: [],
            distanceField: []
        };
        for (const f in e) {
            const d = e[f].match(/^[a-z]+/gm)[0]
              , h = e[f].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm)
              , x = {};
            for (const y in h) {
                const m = h[y].split("=")
                  , E = m[0]
                  , g = m[1].replace(/"/gm, "")
                  , p = parseFloat(g)
                  , v = isNaN(p) ? g : p;
                x[E] = v
            }
            r[d].push(x)
        }
        const n = {
            chars: {},
            pages: [],
            lineHeight: 0,
            fontSize: 0,
            fontFamily: "",
            distanceField: null,
            baseLineOffset: 0
        }
          , [i] = r.info
          , [o] = r.common
          , [s] = r.distanceField ?? [];
        s && (n.distanceField = {
            range: parseInt(s.distanceRange, 10),
            type: s.fieldType
        }),
        n.fontSize = parseInt(i.size, 10),
        n.fontFamily = i.face,
        n.lineHeight = parseInt(o.lineHeight, 10);
        const a = r.page;
        for (let f = 0; f < a.length; f++)
            n.pages.push({
                id: parseInt(a[f].id, 10) || 0,
                file: a[f].file
            });
        const l = {};
        n.baseLineOffset = n.lineHeight - parseInt(o.base, 10);
        const c = r.char;
        for (let f = 0; f < c.length; f++) {
            const d = c[f]
              , h = parseInt(d.id, 10);
            let x = d.letter ?? d.char ?? String.fromCharCode(h);
            x === "space" && (x = " "),
            l[h] = x,
            n.chars[x] = {
                id: h,
                page: parseInt(d.page, 10) || 0,
                x: parseInt(d.x, 10),
                y: parseInt(d.y, 10),
                width: parseInt(d.width, 10),
                height: parseInt(d.height, 10),
                xOffset: parseInt(d.xoffset, 10),
                yOffset: parseInt(d.yoffset, 10),
                xAdvance: parseInt(d.xadvance, 10),
                kerning: {}
            }
        }
        const u = r.kerning || [];
        for (let f = 0; f < u.length; f++) {
            const d = parseInt(u[f].first, 10)
              , h = parseInt(u[f].second, 10)
              , x = parseInt(u[f].amount, 10);
            n.chars[l[h]].kerning[l[d]] = x
        }
        return n
    }
}
  , s3 = {
    test(t) {
        const e = t;
        return typeof e != "string" && "getElementsByTagName"in e && e.getElementsByTagName("page").length && e.getElementsByTagName("info")[0].getAttribute("face") !== null
    },
    parse(t) {
        const e = {
            chars: {},
            pages: [],
            lineHeight: 0,
            fontSize: 0,
            fontFamily: "",
            distanceField: null,
            baseLineOffset: 0
        }
          , r = t.getElementsByTagName("info")[0]
          , n = t.getElementsByTagName("common")[0]
          , i = t.getElementsByTagName("distanceField")[0];
        i && (e.distanceField = {
            type: i.getAttribute("fieldType"),
            range: parseInt(i.getAttribute("distanceRange"), 10)
        });
        const o = t.getElementsByTagName("page")
          , s = t.getElementsByTagName("char")
          , a = t.getElementsByTagName("kerning");
        e.fontSize = parseInt(r.getAttribute("size"), 10),
        e.fontFamily = r.getAttribute("face"),
        e.lineHeight = parseInt(n.getAttribute("lineHeight"), 10);
        for (let c = 0; c < o.length; c++)
            e.pages.push({
                id: parseInt(o[c].getAttribute("id"), 10) || 0,
                file: o[c].getAttribute("file")
            });
        const l = {};
        e.baseLineOffset = e.lineHeight - parseInt(n.getAttribute("base"), 10);
        for (let c = 0; c < s.length; c++) {
            const u = s[c]
              , f = parseInt(u.getAttribute("id"), 10);
            let d = u.getAttribute("letter") ?? u.getAttribute("char") ?? String.fromCharCode(f);
            d === "space" && (d = " "),
            l[f] = d,
            e.chars[d] = {
                id: f,
                page: parseInt(u.getAttribute("page"), 10) || 0,
                x: parseInt(u.getAttribute("x"), 10),
                y: parseInt(u.getAttribute("y"), 10),
                width: parseInt(u.getAttribute("width"), 10),
                height: parseInt(u.getAttribute("height"), 10),
                xOffset: parseInt(u.getAttribute("xoffset"), 10),
                yOffset: parseInt(u.getAttribute("yoffset"), 10),
                xAdvance: parseInt(u.getAttribute("xadvance"), 10),
                kerning: {}
            }
        }
        for (let c = 0; c < a.length; c++) {
            const u = parseInt(a[c].getAttribute("first"), 10)
              , f = parseInt(a[c].getAttribute("second"), 10)
              , d = parseInt(a[c].getAttribute("amount"), 10);
            e.chars[l[f]].kerning[l[u]] = d
        }
        return e
    }
}
  , a3 = {
    test(t) {
        return typeof t == "string" && t.match(/<font(\s|>)/) ? s3.test(je.get().parseXML(t)) : !1
    },
    parse(t) {
        return s3.parse(je.get().parseXML(t))
    }
}
  , Tue = [".xml", ".fnt"]
  , Due = {
    extension: {
        type: X.CacheParser,
        name: "cacheBitmapFont"
    },
    test: t => t instanceof YP,
    getCacheableAssets(t, e) {
        const r = {};
        return t.forEach(n => {
            r[n] = e,
            r[`${n}-bitmap`] = e
        }
        ),
        r[`${e.fontFamily}-bitmap`] = e,
        r
    }
}
  , Fue = {
    extension: {
        type: X.LoadParser,
        priority: va.Normal
    },
    name: "loadBitmapFont",
    id: "bitmap-font",
    test(t) {
        return Tue.includes(Tn.extname(t).toLowerCase())
    },
    async testParse(t) {
        return qg.test(t) || a3.test(t)
    },
    async parse(t, e, r) {
        const n = qg.test(t) ? qg.parse(t) : a3.parse(t)
          , {src: i} = e
          , {pages: o} = n
          , s = []
          , a = n.distanceField ? {
            scaleMode: "linear",
            alphaMode: "premultiply-alpha-on-upload",
            autoGenerateMipmaps: !1,
            resolution: 1
        } : {};
        for (let f = 0; f < o.length; ++f) {
            const d = o[f].file;
            let h = Tn.join(Tn.dirname(i), d);
            h = Xy(h, i),
            s.push({
                src: h,
                data: a
            })
        }
        const l = await r.load(s)
          , c = s.map(f => l[f.src]);
        return new YP({
            data: n,
            textures: c
        },i)
    },
    async load(t, e) {
        return await (await je.get().fetch(t)).text()
    },
    async unload(t, e, r) {
        await Promise.all(t.pages.map(n => r.unload(n.texture.source._sourceOrigin))),
        t.destroy()
    }
};
class Pue {
    constructor(e, r=!1) {
        this._loader = e,
        this._assetList = [],
        this._isLoading = !1,
        this._maxConcurrent = 1,
        this.verbose = r
    }
    add(e) {
        e.forEach(r => {
            this._assetList.push(r)
        }
        ),
        this.verbose && console.log("[BackgroundLoader] assets: ", this._assetList),
        this._isActive && !this._isLoading && this._next()
    }
    async _next() {
        if (this._assetList.length && this._isActive) {
            this._isLoading = !0;
            const e = []
              , r = Math.min(this._assetList.length, this._maxConcurrent);
            for (let n = 0; n < r; n++)
                e.push(this._assetList.pop());
            await this._loader.load(e),
            this._isLoading = !1,
            this._next()
        }
    }
    get active() {
        return this._isActive
    }
    set active(e) {
        this._isActive !== e && (this._isActive = e,
        e && !this._isLoading && this._next())
    }
}
const Iue = {
    extension: {
        type: X.CacheParser,
        name: "cacheTextureArray"
    },
    test: t => Array.isArray(t) && t.every(e => e instanceof Be),
    getCacheableAssets: (t, e) => {
        const r = {};
        return t.forEach(n => {
            e.forEach( (i, o) => {
                r[n + (o === 0 ? "" : o + 1)] = i
            }
            )
        }
        ),
        r
    }
};
async function XP(t) {
    if ("Image"in globalThis)
        return new Promise(e => {
            const r = new Image;
            r.onload = () => {
                e(!0)
            }
            ,
            r.onerror = () => {
                e(!1)
            }
            ,
            r.src = t
        }
        );
    if ("createImageBitmap"in globalThis && "fetch"in globalThis) {
        try {
            const e = await (await fetch(t)).blob();
            await createImageBitmap(e)
        } catch {
            return !1
        }
        return !0
    }
    return !1
}
const Oue = {
    extension: {
        type: X.DetectionParser,
        priority: 1
    },
    test: async () => XP("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),
    add: async t => [...t, "avif"],
    remove: async t => t.filter(e => e !== "avif")
}
  , l3 = ["png", "jpg", "jpeg"]
  , kue = {
    extension: {
        type: X.DetectionParser,
        priority: -1
    },
    test: () => Promise.resolve(!0),
    add: async t => [...t, ...l3],
    remove: async t => t.filter(e => !l3.includes(e))
}
  , Rue = "WorkerGlobalScope"in globalThis && globalThis instanceof globalThis.WorkerGlobalScope;
function d1(t) {
    return Rue ? !1 : document.createElement("video").canPlayType(t) !== ""
}
const Mue = {
    extension: {
        type: X.DetectionParser,
        priority: 0
    },
    test: async () => d1("video/mp4"),
    add: async t => [...t, "mp4", "m4v"],
    remove: async t => t.filter(e => e !== "mp4" && e !== "m4v")
}
  , Nue = {
    extension: {
        type: X.DetectionParser,
        priority: 0
    },
    test: async () => d1("video/ogg"),
    add: async t => [...t, "ogv"],
    remove: async t => t.filter(e => e !== "ogv")
}
  , Lue = {
    extension: {
        type: X.DetectionParser,
        priority: 0
    },
    test: async () => d1("video/webm"),
    add: async t => [...t, "webm"],
    remove: async t => t.filter(e => e !== "webm")
}
  , $ue = {
    extension: {
        type: X.DetectionParser,
        priority: 0
    },
    test: async () => XP("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),
    add: async t => [...t, "webp"],
    remove: async t => t.filter(e => e !== "webp")
}
  , KP = class Wh {
    constructor() {
        this.loadOptions = {
            ...Wh.defaultOptions
        },
        this._parsers = [],
        this._parsersValidated = !1,
        this.parsers = new Proxy(this._parsers,{
            set: (e, r, n) => (this._parsersValidated = !1,
            e[r] = n,
            !0)
        }),
        this.promiseCache = {}
    }
    reset() {
        this._parsersValidated = !1,
        this.promiseCache = {}
    }
    _getLoadPromiseAndParser(e, r) {
        const n = {
            promise: null,
            parser: null
        };
        return n.promise = (async () => {
            var s, a;
            let i = null
              , o = null;
            if ((r.parser || r.loadParser) && (o = this._parserHash[r.parser || r.loadParser],
            r.loadParser && Ne(`[Assets] "loadParser" is deprecated, use "parser" instead for ${e}`),
            o || Ne(`[Assets] specified load parser "${r.parser || r.loadParser}" not found while loading ${e}`)),
            !o) {
                for (let l = 0; l < this.parsers.length; l++) {
                    const c = this.parsers[l];
                    if (c.load && ((s = c.test) != null && s.call(c, e, r, this))) {
                        o = c;
                        break
                    }
                }
                if (!o)
                    return Ne(`[Assets] ${e} could not be loaded as we don't know how to parse it, ensure the correct parser has been added`),
                    null
            }
            i = await o.load(e, r, this),
            n.parser = o;
            for (let l = 0; l < this.parsers.length; l++) {
                const c = this.parsers[l];
                c.parse && c.parse && await ((a = c.testParse) == null ? void 0 : a.call(c, i, r, this)) && (i = await c.parse(i, r, this) || i,
                n.parser = c)
            }
            return i
        }
        )(),
        n
    }
    async load(e, r) {
        this._parsersValidated || this._validateParsers();
        const n = typeof r == "function" ? {
            ...Wh.defaultOptions,
            ...this.loadOptions,
            onProgress: r
        } : {
            ...Wh.defaultOptions,
            ...this.loadOptions,
            ...r || {}
        }
          , {onProgress: i, onError: o, strategy: s, retryCount: a, retryDelay: l} = n;
        let c = 0;
        const u = {}
          , f = Ox(e)
          , d = Di(e, y => ({
            alias: [y],
            src: y,
            data: {}
        }))
          , h = d.reduce( (y, m) => y + (m.progressSize || 1), 0)
          , x = d.map(async y => {
            const m = Tn.toAbsolute(y.src);
            u[y.src] || (await this._loadAssetWithRetry(m, y, {
                onProgress: i,
                onError: o,
                strategy: s,
                retryCount: a,
                retryDelay: l
            }, u),
            c += y.progressSize || 1,
            i && i(c / h))
        }
        );
        return await Promise.all(x),
        f ? u[d[0].src] : u
    }
    async unload(e) {
        const n = Di(e, i => ({
            alias: [i],
            src: i
        })).map(async i => {
            var a, l;
            const o = Tn.toAbsolute(i.src)
              , s = this.promiseCache[o];
            if (s) {
                const c = await s.promise;
                delete this.promiseCache[o],
                await ((l = (a = s.parser) == null ? void 0 : a.unload) == null ? void 0 : l.call(a, c, i, this))
            }
        }
        );
        await Promise.all(n)
    }
    _validateParsers() {
        this._parsersValidated = !0,
        this._parserHash = this._parsers.filter(e => e.name || e.id).reduce( (e, r) => (!r.name && !r.id ? Ne("[Assets] parser should have an id") : (e[r.name] || e[r.id]) && Ne(`[Assets] parser id conflict "${r.id}"`),
        e[r.name] = r,
        r.id && (e[r.id] = r),
        e), {})
    }
    async _loadAssetWithRetry(e, r, n, i) {
        let o = 0;
        const {onError: s, strategy: a, retryCount: l, retryDelay: c} = n
          , u = f => new Promise(d => setTimeout(d, f));
        for (; ; )
            try {
                this.promiseCache[e] || (this.promiseCache[e] = this._getLoadPromiseAndParser(e, r)),
                i[r.src] = await this.promiseCache[e].promise;
                return
            } catch (f) {
                delete this.promiseCache[e],
                delete i[r.src],
                o++;
                const d = a !== "retry" || o > l;
                if (a === "retry" && !d) {
                    s && s(f, r),
                    await u(c);
                    continue
                }
                if (a === "skip") {
                    s && s(f, r);
                    return
                }
                throw s && s(f, r),
                new Error(`[Loader.load] Failed to load ${e}.
${f}`)
            }
    }
}
;
KP.defaultOptions = {
    onProgress: void 0,
    onError: void 0,
    strategy: "throw",
    retryCount: 3,
    retryDelay: 250
};
let Uue = KP;
function wu(t, e) {
    if (Array.isArray(e)) {
        for (const r of e)
            if (t.startsWith(`data:${r}`))
                return !0;
        return !1
    }
    return t.startsWith(`data:${e}`)
}
function Bu(t, e) {
    const r = t.split("?")[0]
      , n = Tn.extname(r).toLowerCase();
    return Array.isArray(e) ? e.includes(n) : n === e
}
const Gue = ".json"
  , Hue = "application/json"
  , Vue = {
    extension: {
        type: X.LoadParser,
        priority: va.Low
    },
    name: "loadJson",
    id: "json",
    test(t) {
        return wu(t, Hue) || Bu(t, Gue)
    },
    async load(t) {
        return await (await je.get().fetch(t)).json()
    }
}
  , zue = ".txt"
  , jue = "text/plain"
  , Wue = {
    name: "loadTxt",
    id: "text",
    extension: {
        type: X.LoadParser,
        priority: va.Low,
        name: "loadTxt"
    },
    test(t) {
        return wu(t, jue) || Bu(t, zue)
    },
    async load(t) {
        return await (await je.get().fetch(t)).text()
    }
}
  , Yue = ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"]
  , Xue = [".ttf", ".otf", ".woff", ".woff2"]
  , Kue = ["font/ttf", "font/otf", "font/woff", "font/woff2"]
  , que = /^(--|-?[A-Z_])[0-9A-Z_-]*$/i;
function Zue(t) {
    const e = Tn.extname(t)
      , i = Tn.basename(t, e).replace(/(-|_)/g, " ").toLowerCase().split(" ").map(a => a.charAt(0).toUpperCase() + a.slice(1));
    let o = i.length > 0;
    for (const a of i)
        if (!a.match(que)) {
            o = !1;
            break
        }
    let s = i.join(" ");
    return o || (s = `"${s.replace(/[\\"]/g, "\\$&")}"`),
    s
}
const Jue = /^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;
function Que(t) {
    return Jue.test(t) ? t : encodeURI(t)
}
const e0e = {
    extension: {
        type: X.LoadParser,
        priority: va.Low
    },
    name: "loadWebFont",
    id: "web-font",
    test(t) {
        return wu(t, Kue) || Bu(t, Xue)
    },
    async load(t, e) {
        var n, i, o;
        const r = je.get().getFontFaceSet();
        if (r) {
            const s = []
              , a = ((n = e.data) == null ? void 0 : n.family) ?? Zue(t)
              , l = ((o = (i = e.data) == null ? void 0 : i.weights) == null ? void 0 : o.filter(u => Yue.includes(u))) ?? ["normal"]
              , c = e.data ?? {};
            for (let u = 0; u < l.length; u++) {
                const f = l[u]
                  , d = new FontFace(a,`url(${Que(t)})`,{
                    ...c,
                    weight: f
                });
                await d.load(),
                r.add(d),
                s.push(d)
            }
            return Et.has(`${a}-and-url`) ? Et.get(`${a}-and-url`).entries.push({
                url: t,
                faces: s
            }) : Et.set(`${a}-and-url`, {
                entries: [{
                    url: t,
                    faces: s
                }]
            }),
            s.length === 1 ? s[0] : s
        }
        return Ne("[loadWebFont] FontFace API is not supported. Skipping loading font"),
        null
    },
    unload(t) {
        const e = Array.isArray(t) ? t : [t]
          , r = e[0].family
          , n = Et.get(`${r}-and-url`)
          , i = n.entries.find(o => o.faces.some(s => e.indexOf(s) !== -1));
        i.faces = i.faces.filter(o => e.indexOf(o) === -1),
        i.faces.length === 0 && (n.entries = n.entries.filter(o => o !== i)),
        e.forEach(o => {
            je.get().getFontFaceSet().delete(o)
        }
        ),
        n.entries.length === 0 && Et.remove(`${r}-and-url`)
    }
};
function Cb(t, e=1) {
    var n;
    const r = (n = Au.RETINA_PREFIX) == null ? void 0 : n.exec(t);
    return r ? parseFloat(r[1]) : e
}
function Ab(t, e, r) {
    t.label = r,
    t._sourceOrigin = r;
    const n = new Be({
        source: t,
        label: r
    })
      , i = () => {
        delete e.promiseCache[r],
        Et.has(r) && Et.remove(r)
    }
    ;
    return n.source.once("destroy", () => {
        e.promiseCache[r] && (Ne("[Assets] A TextureSource managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the TextureSource."),
        i())
    }
    ),
    n.once("destroy", () => {
        t.destroyed || (Ne("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),
        i())
    }
    ),
    n
}
const t0e = ".svg"
  , r0e = "image/svg+xml"
  , n0e = {
    extension: {
        type: X.LoadParser,
        priority: va.Low,
        name: "loadSVG"
    },
    name: "loadSVG",
    id: "svg",
    config: {
        crossOrigin: "anonymous",
        parseAsGraphicsContext: !1
    },
    test(t) {
        return wu(t, r0e) || Bu(t, t0e)
    },
    async load(t, e, r) {
        var n;
        return ((n = e.data) == null ? void 0 : n.parseAsGraphicsContext) ?? this.config.parseAsGraphicsContext ? o0e(t) : i0e(t, e, r, this.config.crossOrigin)
    },
    unload(t) {
        t.destroy(!0)
    }
};
async function i0e(t, e, r, n) {
    var m, E, g;
    const i = await je.get().fetch(t)
      , o = je.get().createImage();
    o.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(await i.text())}`,
    o.crossOrigin = n,
    await o.decode();
    const s = ((m = e.data) == null ? void 0 : m.width) ?? o.width
      , a = ((E = e.data) == null ? void 0 : E.height) ?? o.height
      , l = ((g = e.data) == null ? void 0 : g.resolution) || Cb(t)
      , c = Math.ceil(s * l)
      , u = Math.ceil(a * l)
      , f = je.get().createCanvas(c, u)
      , d = f.getContext("2d");
    d.imageSmoothingEnabled = !0,
    d.imageSmoothingQuality = "high",
    d.drawImage(o, 0, 0, s * l, a * l);
    const {parseAsGraphicsContext: h, ...x} = e.data ?? {}
      , y = new bl({
        resource: f,
        alphaMode: "premultiply-alpha-on-upload",
        resolution: l,
        ...x
    });
    return Ab(y, r, t)
}
async function o0e(t) {
    const r = await (await je.get().fetch(t)).text()
      , n = new ui;
    return n.svg(r),
    n
}
const s0e = `(function () {
    'use strict';

    const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";
    async function checkImageBitmap() {
      try {
        if (typeof createImageBitmap !== "function")
          return false;
        const response = await fetch(WHITE_PNG);
        const imageBlob = await response.blob();
        const imageBitmap = await createImageBitmap(imageBlob);
        return imageBitmap.width === 1 && imageBitmap.height === 1;
      } catch (_e) {
        return false;
      }
    }
    void checkImageBitmap().then((result) => {
      self.postMessage(result);
    });

})();
`;
let Nc = null
  , lE = class {
    constructor() {
        Nc || (Nc = URL.createObjectURL(new Blob([s0e],{
            type: "application/javascript"
        }))),
        this.worker = new Worker(Nc)
    }
}
;
lE.revokeObjectURL = function() {
    Nc && (URL.revokeObjectURL(Nc),
    Nc = null)
}
;
const a0e = `(function () {
    'use strict';

    async function loadImageBitmap(url, alphaMode) {
      const response = await fetch(url);
      if (!response.ok) {
        throw new Error(\`[WorkerManager.loadImageBitmap] Failed to fetch \${url}: \${response.status} \${response.statusText}\`);
      }
      const imageBlob = await response.blob();
      return alphaMode === "premultiplied-alpha" ? createImageBitmap(imageBlob, { premultiplyAlpha: "none" }) : createImageBitmap(imageBlob);
    }
    self.onmessage = async (event) => {
      try {
        const imageBitmap = await loadImageBitmap(event.data.data[0], event.data.data[1]);
        self.postMessage({
          data: imageBitmap,
          uuid: event.data.uuid,
          id: event.data.id
        }, [imageBitmap]);
      } catch (e) {
        self.postMessage({
          error: e,
          uuid: event.data.uuid,
          id: event.data.id
        });
      }
    };

})();
`;
let Lc = null;
class qP {
    constructor() {
        Lc || (Lc = URL.createObjectURL(new Blob([a0e],{
            type: "application/javascript"
        }))),
        this.worker = new Worker(Lc)
    }
}
qP.revokeObjectURL = function() {
    Lc && (URL.revokeObjectURL(Lc),
    Lc = null)
}
;
let c3 = 0, Zg;
class l0e {
    constructor() {
        this._initialized = !1,
        this._createdWorkers = 0,
        this._workerPool = [],
        this._queue = [],
        this._resolveHash = {}
    }
    isImageBitmapSupported() {
        return this._isImageBitmapSupported !== void 0 ? this._isImageBitmapSupported : (this._isImageBitmapSupported = new Promise(e => {
            const {worker: r} = new lE;
            r.addEventListener("message", n => {
                r.terminate(),
                lE.revokeObjectURL(),
                e(n.data)
            }
            )
        }
        ),
        this._isImageBitmapSupported)
    }
    loadImageBitmap(e, r) {
        var n;
        return this._run("loadImageBitmap", [e, (n = r == null ? void 0 : r.data) == null ? void 0 : n.alphaMode])
    }
    async _initWorkers() {
        this._initialized || (this._initialized = !0)
    }
    _getWorker() {
        Zg === void 0 && (Zg = navigator.hardwareConcurrency || 4);
        let e = this._workerPool.pop();
        return !e && this._createdWorkers < Zg && (this._createdWorkers++,
        e = new qP().worker,
        e.addEventListener("message", r => {
            this._complete(r.data),
            this._returnWorker(r.target),
            this._next()
        }
        )),
        e
    }
    _returnWorker(e) {
        this._workerPool.push(e)
    }
    _complete(e) {
        this._resolveHash[e.uuid] && (e.error !== void 0 ? this._resolveHash[e.uuid].reject(e.error) : this._resolveHash[e.uuid].resolve(e.data),
        delete this._resolveHash[e.uuid])
    }
    async _run(e, r) {
        await this._initWorkers();
        const n = new Promise( (i, o) => {
            this._queue.push({
                id: e,
                arguments: r,
                resolve: i,
                reject: o
            })
        }
        );
        return this._next(),
        n
    }
    _next() {
        if (!this._queue.length)
            return;
        const e = this._getWorker();
        if (!e)
            return;
        const r = this._queue.pop()
          , n = r.id;
        this._resolveHash[c3] = {
            resolve: r.resolve,
            reject: r.reject
        },
        e.postMessage({
            data: r.arguments,
            uuid: c3++,
            id: n
        })
    }
    reset() {
        this._workerPool.forEach(e => e.terminate()),
        this._workerPool.length = 0,
        Object.values(this._resolveHash).forEach( ({reject: e}) => {
            e == null || e(new Error("WorkerManager has been reset before completion"))
        }
        ),
        this._resolveHash = {},
        this._queue.length = 0,
        this._initialized = !1,
        this._createdWorkers = 0
    }
}
const u3 = new l0e
  , c0e = [".jpeg", ".jpg", ".png", ".webp", ".avif"]
  , u0e = ["image/jpeg", "image/png", "image/webp", "image/avif"];
async function f0e(t, e) {
    var i;
    const r = await je.get().fetch(t);
    if (!r.ok)
        throw new Error(`[loadImageBitmap] Failed to fetch ${t}: ${r.status} ${r.statusText}`);
    const n = await r.blob();
    return ((i = e == null ? void 0 : e.data) == null ? void 0 : i.alphaMode) === "premultiplied-alpha" ? createImageBitmap(n, {
        premultiplyAlpha: "none"
    }) : createImageBitmap(n)
}
const ZP = {
    name: "loadTextures",
    id: "texture",
    extension: {
        type: X.LoadParser,
        priority: va.High,
        name: "loadTextures"
    },
    config: {
        preferWorkers: !0,
        preferCreateImageBitmap: !0,
        crossOrigin: "anonymous"
    },
    test(t) {
        return wu(t, u0e) || Bu(t, c0e)
    },
    async load(t, e, r) {
        var o;
        let n = null;
        globalThis.createImageBitmap && this.config.preferCreateImageBitmap ? this.config.preferWorkers && await u3.isImageBitmapSupported() ? n = await u3.loadImageBitmap(t, e) : n = await f0e(t, e) : n = await new Promise( (s, a) => {
            n = je.get().createImage(),
            n.crossOrigin = this.config.crossOrigin,
            n.src = t,
            n.complete ? s(n) : (n.onload = () => {
                s(n)
            }
            ,
            n.onerror = a)
        }
        );
        const i = new bl({
            resource: n,
            alphaMode: "premultiply-alpha-on-upload",
            resolution: ((o = e.data) == null ? void 0 : o.resolution) || Cb(t),
            ...e.data
        });
        return Ab(i, r, t)
    },
    unload(t) {
        t.destroy(!0)
    }
}
  , d0e = [".mp4", ".m4v", ".webm", ".ogg", ".ogv", ".h264", ".avi", ".mov"];
let Jg, Qg;
function h0e(t, e, r) {
    r === void 0 && !e.startsWith("data:") ? t.crossOrigin = p0e(e) : r !== !1 && (t.crossOrigin = typeof r == "string" ? r : "anonymous")
}
function x0e(t) {
    return new Promise( (e, r) => {
        t.addEventListener("canplaythrough", n),
        t.addEventListener("error", i),
        t.load();
        function n() {
            o(),
            e()
        }
        function i(s) {
            o(),
            r(s)
        }
        function o() {
            t.removeEventListener("canplaythrough", n),
            t.removeEventListener("error", i)
        }
    }
    )
}
function p0e(t, e=globalThis.location) {
    if (t.startsWith("data:"))
        return "";
    e || (e = globalThis.location);
    const r = new URL(t,document.baseURI);
    return r.hostname !== e.hostname || r.port !== e.port || r.protocol !== e.protocol ? "anonymous" : ""
}
function g0e() {
    const t = []
      , e = [];
    for (const r of d0e) {
        const n = R0.MIME_TYPES[r.substring(1)] || `video/${r.substring(1)}`;
        d1(n) && (t.push(r),
        e.includes(n) || e.push(n))
    }
    return {
        validVideoExtensions: t,
        validVideoMime: e
    }
}
const m0e = {
    name: "loadVideo",
    id: "video",
    extension: {
        type: X.LoadParser,
        name: "loadVideo"
    },
    test(t) {
        if (!Jg || !Qg) {
            const {validVideoExtensions: n, validVideoMime: i} = g0e();
            Jg = n,
            Qg = i
        }
        const e = wu(t, Qg)
          , r = Bu(t, Jg);
        return e || r
    },
    async load(t, e, r) {
        var l, c;
        const n = {
            ...R0.defaultOptions,
            resolution: ((l = e.data) == null ? void 0 : l.resolution) || Cb(t),
            alphaMode: ((c = e.data) == null ? void 0 : c.alphaMode) || await JF(),
            ...e.data
        }
          , i = document.createElement("video")
          , o = {
            preload: n.autoLoad !== !1 ? "auto" : void 0,
            "webkit-playsinline": n.playsinline !== !1 ? "" : void 0,
            playsinline: n.playsinline !== !1 ? "" : void 0,
            muted: n.muted === !0 ? "" : void 0,
            loop: n.loop === !0 ? "" : void 0,
            autoplay: n.autoPlay !== !1 ? "" : void 0
        };
        Object.keys(o).forEach(u => {
            const f = o[u];
            f !== void 0 && i.setAttribute(u, f)
        }
        ),
        n.muted === !0 && (i.muted = !0),
        h0e(i, t, n.crossorigin);
        const s = document.createElement("source");
        let a;
        if (n.mime)
            a = n.mime;
        else if (t.startsWith("data:"))
            a = t.slice(5, t.indexOf(";"));
        else if (!t.startsWith("blob:")) {
            const u = t.split("?")[0].slice(t.lastIndexOf(".") + 1).toLowerCase();
            a = R0.MIME_TYPES[u] || `video/${u}`
        }
        return s.src = t,
        a && (s.type = a),
        new Promise(u => {
            const f = async () => {
                const d = new R0({
                    ...n,
                    resource: i
                });
                i.removeEventListener("canplay", f),
                e.data.preload && await x0e(i),
                u(Ab(d, r, t))
            }
            ;
            n.preload && !n.autoPlay && i.load(),
            i.addEventListener("canplay", f),
            i.appendChild(s)
        }
        )
    },
    unload(t) {
        t.destroy(!0)
    }
}
  , JP = {
    extension: {
        type: X.ResolveParser,
        name: "resolveTexture"
    },
    test: ZP.test,
    parse: t => {
        var e;
        return {
            resolution: parseFloat(((e = Au.RETINA_PREFIX.exec(t)) == null ? void 0 : e[1]) ?? "1"),
            format: t.split(".").pop(),
            src: t
        }
    }
}
  , v0e = {
    extension: {
        type: X.ResolveParser,
        priority: -2,
        name: "resolveJson"
    },
    test: t => Au.RETINA_PREFIX.test(t) && t.endsWith(".json"),
    parse: JP.parse
};
class y0e {
    constructor() {
        this._detections = [],
        this._initialized = !1,
        this.resolver = new Au,
        this.loader = new Uue,
        this.cache = Et,
        this._backgroundLoader = new Pue(this.loader),
        this._backgroundLoader.active = !0,
        this.reset()
    }
    async init(e={}) {
        var o, s;
        if (this._initialized) {
            Ne("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");
            return
        }
        if (this._initialized = !0,
        e.defaultSearchParams && this.resolver.setDefaultSearchParams(e.defaultSearchParams),
        e.basePath && (this.resolver.basePath = e.basePath),
        e.bundleIdentifier && this.resolver.setBundleIdentifier(e.bundleIdentifier),
        e.manifest) {
            let a = e.manifest;
            typeof a == "string" && (a = await this.load(a)),
            this.resolver.addManifest(a)
        }
        const r = ((o = e.texturePreference) == null ? void 0 : o.resolution) ?? 1
          , n = typeof r == "number" ? [r] : r
          , i = await this._detectFormats({
            preferredFormats: (s = e.texturePreference) == null ? void 0 : s.format,
            skipDetections: e.skipDetections,
            detections: this._detections
        });
        this.resolver.prefer({
            params: {
                format: i,
                resolution: n
            }
        }),
        e.preferences && this.setPreferences(e.preferences),
        e.loadOptions && (this.loader.loadOptions = {
            ...this.loader.loadOptions,
            ...e.loadOptions
        })
    }
    add(e) {
        this.resolver.add(e)
    }
    async load(e, r) {
        this._initialized || await this.init();
        const n = Ox(e)
          , i = Di(e).map(a => {
            if (typeof a != "string") {
                const l = this.resolver.getAlias(a);
                return l.some(c => !this.resolver.hasKey(c)) && this.add(a),
                Array.isArray(l) ? l[0] : l
            }
            return this.resolver.hasKey(a) || this.add({
                alias: a,
                src: a
            }),
            a
        }
        )
          , o = this.resolver.resolve(i)
          , s = await this._mapLoadToResolve(o, r);
        return n ? s[i[0]] : s
    }
    addBundle(e, r) {
        this.resolver.addBundle(e, r)
    }
    async loadBundle(e, r) {
        this._initialized || await this.init();
        let n = !1;
        typeof e == "string" && (n = !0,
        e = [e]);
        const i = this.resolver.resolveBundle(e)
          , o = {}
          , s = Object.keys(i);
        let a = 0;
        const l = []
          , c = () => {
            r == null || r(l.reduce( (f, d) => f + d, 0) / a)
        }
          , u = s.map( (f, d) => {
            const h = i[f]
              , x = Object.values(h)
              , m = [...new Set(x.flat())].reduce( (E, g) => E + (g.progressSize || 1), 0);
            return l.push(0),
            a += m,
            this._mapLoadToResolve(h, E => {
                l[d] = E * m,
                c()
            }
            ).then(E => {
                o[f] = E
            }
            )
        }
        );
        return await Promise.all(u),
        n ? o[e[0]] : o
    }
    async backgroundLoad(e) {
        this._initialized || await this.init(),
        typeof e == "string" && (e = [e]);
        const r = this.resolver.resolve(e);
        this._backgroundLoader.add(Object.values(r))
    }
    async backgroundLoadBundle(e) {
        this._initialized || await this.init(),
        typeof e == "string" && (e = [e]);
        const r = this.resolver.resolveBundle(e);
        Object.values(r).forEach(n => {
            this._backgroundLoader.add(Object.values(n))
        }
        )
    }
    reset() {
        this.resolver.reset(),
        this.loader.reset(),
        this.cache.reset(),
        this._initialized = !1
    }
    get(e) {
        if (typeof e == "string")
            return Et.get(e);
        const r = {};
        for (let n = 0; n < e.length; n++)
            r[n] = Et.get(e[n]);
        return r
    }
    async _mapLoadToResolve(e, r) {
        const n = [...new Set(Object.values(e))];
        this._backgroundLoader.active = !1;
        const i = await this.loader.load(n, r);
        this._backgroundLoader.active = !0;
        const o = {};
        return n.forEach(s => {
            const a = i[s.src]
              , l = [s.src];
            s.alias && l.push(...s.alias),
            l.forEach(c => {
                o[c] = a
            }
            ),
            Et.set(l, a)
        }
        ),
        o
    }
    async unload(e) {
        this._initialized || await this.init();
        const r = Di(e).map(i => typeof i != "string" ? i.src : i)
          , n = this.resolver.resolve(r);
        await this._unloadFromResolved(n)
    }
    async unloadBundle(e) {
        this._initialized || await this.init(),
        e = Di(e);
        const r = this.resolver.resolveBundle(e)
          , n = Object.keys(r).map(i => this._unloadFromResolved(r[i]));
        await Promise.all(n)
    }
    async _unloadFromResolved(e) {
        const r = Object.values(e);
        r.forEach(n => {
            Et.remove(n.src)
        }
        ),
        await this.loader.unload(r)
    }
    async _detectFormats(e) {
        let r = [];
        e.preferredFormats && (r = Array.isArray(e.preferredFormats) ? e.preferredFormats : [e.preferredFormats]);
        for (const n of e.detections)
            e.skipDetections || await n.test() ? r = await n.add(r) : e.skipDetections || (r = await n.remove(r));
        return r = r.filter( (n, i) => r.indexOf(n) === i),
        r
    }
    get detections() {
        return this._detections
    }
    setPreferences(e) {
        this.loader.parsers.forEach(r => {
            r.config && Object.keys(r.config).filter(n => n in e).forEach(n => {
                r.config[n] = e[n]
            }
            )
        }
        )
    }
}
const mh = new y0e;
$e.handleByList(X.LoadParser, mh.loader.parsers).handleByList(X.ResolveParser, mh.resolver.parsers).handleByList(X.CacheParser, mh.cache.parsers).handleByList(X.DetectionParser, mh.detections);
$e.add(Iue, kue, Oue, $ue, Mue, Nue, Lue, Vue, Wue, e0e, n0e, ZP, m0e, Fue, Due, JP, v0e);
const f3 = {
    loader: X.LoadParser,
    resolver: X.ResolveParser,
    cache: X.CacheParser,
    detection: X.DetectionParser
};
$e.handle(X.Asset, t => {
    const e = t.ref;
    Object.entries(f3).filter( ([r]) => !!e[r]).forEach( ([r,n]) => $e.add(Object.assign(e[r], {
        extension: e[r].extension ?? n
    })))
}
, t => {
    const e = t.ref;
    Object.keys(f3).filter(r => !!e[r]).forEach(r => $e.remove(e[r]))
}
);
class QP {
    constructor(e) {
        this._attachedDomElements = [],
        this._renderer = e,
        this._renderer.runners.postrender.add(this),
        this._renderer.runners.init.add(this),
        this._domElement = document.createElement("div"),
        this._domElement.style.position = "absolute",
        this._domElement.style.top = "0",
        this._domElement.style.left = "0",
        this._domElement.style.pointerEvents = "none",
        this._domElement.style.zIndex = "1000"
    }
    init() {
        this._canvasObserver = new iP({
            domElement: this._domElement,
            renderer: this._renderer
        })
    }
    addRenderable(e, r) {
        this._attachedDomElements.includes(e) || this._attachedDomElements.push(e)
    }
    updateRenderable(e) {}
    validateRenderable(e) {
        return !0
    }
    postrender() {
        const e = this._attachedDomElements;
        if (e.length === 0) {
            this._domElement.remove();
            return
        }
        this._canvasObserver.ensureAttached();
        for (let r = 0; r < e.length; r++) {
            const n = e[r]
              , i = n.element;
            if (!n.parent || n.globalDisplayStatus < 7)
                i == null || i.remove(),
                e.splice(r, 1),
                r--;
            else {
                this._domElement.contains(i) || (i.style.position = "absolute",
                i.style.pointerEvents = "auto",
                this._domElement.appendChild(i));
                const o = n.worldTransform
                  , s = n._anchor
                  , a = n.width * s.x
                  , l = n.height * s.y;
                i.style.transformOrigin = `${a}px ${l}px`,
                i.style.transform = `matrix(${o.a}, ${o.b}, ${o.c}, ${o.d}, ${o.tx - a}, ${o.ty - l})`,
                i.style.opacity = n.groupAlpha.toString()
            }
        }
    }
    destroy() {
        var e;
        this._renderer.runners.postrender.remove(this);
        for (let r = 0; r < this._attachedDomElements.length; r++)
            (e = this._attachedDomElements[r].element) == null || e.remove();
        this._attachedDomElements.length = 0,
        this._domElement.remove(),
        this._canvasObserver.destroy(),
        this._renderer = null
    }
}
QP.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "dom"
};
class E0e {
    constructor() {
        this.interactionFrequency = 10,
        this._deltaTime = 0,
        this._didMove = !1,
        this._tickerAdded = !1,
        this._pauseUpdate = !0
    }
    init(e) {
        this.removeTickerListener(),
        this.events = e,
        this.interactionFrequency = 10,
        this._deltaTime = 0,
        this._didMove = !1,
        this._tickerAdded = !1,
        this._pauseUpdate = !0
    }
    get pauseUpdate() {
        return this._pauseUpdate
    }
    set pauseUpdate(e) {
        this._pauseUpdate = e
    }
    addTickerListener() {
        this._tickerAdded || !this.domElement || (Gr.system.add(this._tickerUpdate, this, Cl.INTERACTION),
        this._tickerAdded = !0)
    }
    removeTickerListener() {
        this._tickerAdded && (Gr.system.remove(this._tickerUpdate, this),
        this._tickerAdded = !1)
    }
    pointerMoved() {
        this._didMove = !0
    }
    _update() {
        if (!this.domElement || this._pauseUpdate)
            return;
        if (this._didMove) {
            this._didMove = !1;
            return
        }
        const e = this.events._rootPointerEvent;
        this.events.supportsTouchEvents && e.pointerType === "touch" || globalThis.document.dispatchEvent(this.events.supportsPointerEvents ? new PointerEvent("pointermove",{
            clientX: e.clientX,
            clientY: e.clientY,
            pointerType: e.pointerType,
            pointerId: e.pointerId
        }) : new MouseEvent("mousemove",{
            clientX: e.clientX,
            clientY: e.clientY
        }))
    }
    _tickerUpdate(e) {
        this._deltaTime += e.deltaTime,
        !(this._deltaTime < this.interactionFrequency) && (this._deltaTime = 0,
        this._update())
    }
    destroy() {
        this.removeTickerListener(),
        this.events = null,
        this.domElement = null,
        this._deltaTime = 0,
        this._didMove = !1,
        this._tickerAdded = !1,
        this._pauseUpdate = !0
    }
}
const zo = new E0e;
class $x extends nd {
    constructor() {
        super(...arguments),
        this.client = new Gt,
        this.movement = new Gt,
        this.offset = new Gt,
        this.global = new Gt,
        this.screen = new Gt
    }
    get clientX() {
        return this.client.x
    }
    get clientY() {
        return this.client.y
    }
    get x() {
        return this.clientX
    }
    get y() {
        return this.clientY
    }
    get movementX() {
        return this.movement.x
    }
    get movementY() {
        return this.movement.y
    }
    get offsetX() {
        return this.offset.x
    }
    get offsetY() {
        return this.offset.y
    }
    get globalX() {
        return this.global.x
    }
    get globalY() {
        return this.global.y
    }
    get screenX() {
        return this.screen.x
    }
    get screenY() {
        return this.screen.y
    }
    getLocalPosition(e, r, n) {
        return e.worldTransform.applyInverse(n || this.global, r)
    }
    getModifierState(e) {
        return "getModifierState"in this.nativeEvent && this.nativeEvent.getModifierState(e)
    }
    initMouseEvent(e, r, n, i, o, s, a, l, c, u, f, d, h, x, y) {
        throw new Error("Method not implemented.")
    }
}
class Ai extends $x {
    constructor() {
        super(...arguments),
        this.width = 0,
        this.height = 0,
        this.isPrimary = !1
    }
    getCoalescedEvents() {
        return this.type === "pointermove" || this.type === "mousemove" || this.type === "touchmove" ? [this] : []
    }
    getPredictedEvents() {
        throw new Error("getPredictedEvents is not supported!")
    }
}
class nu extends $x {
    constructor() {
        super(...arguments),
        this.DOM_DELTA_PIXEL = 0,
        this.DOM_DELTA_LINE = 1,
        this.DOM_DELTA_PAGE = 2
    }
}
nu.DOM_DELTA_PIXEL = 0;
nu.DOM_DELTA_LINE = 1;
nu.DOM_DELTA_PAGE = 2;
const _0e = 2048
  , b0e = new Gt
  , e0 = new Gt;
class C0e {
    constructor(e) {
        this.dispatch = new Qn,
        this.moveOnAll = !1,
        this.enableGlobalMoveEvents = !0,
        this.mappingState = {
            trackingData: {}
        },
        this.eventPool = new Map,
        this._allInteractiveElements = [],
        this._hitElements = [],
        this._isPointerMoveEvent = !1,
        this.rootTarget = e,
        this.hitPruneFn = this.hitPruneFn.bind(this),
        this.hitTestFn = this.hitTestFn.bind(this),
        this.mapPointerDown = this.mapPointerDown.bind(this),
        this.mapPointerMove = this.mapPointerMove.bind(this),
        this.mapPointerOut = this.mapPointerOut.bind(this),
        this.mapPointerOver = this.mapPointerOver.bind(this),
        this.mapPointerUp = this.mapPointerUp.bind(this),
        this.mapPointerUpOutside = this.mapPointerUpOutside.bind(this),
        this.mapWheel = this.mapWheel.bind(this),
        this.mappingTable = {},
        this.addEventMapping("pointerdown", this.mapPointerDown),
        this.addEventMapping("pointermove", this.mapPointerMove),
        this.addEventMapping("pointerout", this.mapPointerOut),
        this.addEventMapping("pointerleave", this.mapPointerOut),
        this.addEventMapping("pointerover", this.mapPointerOver),
        this.addEventMapping("pointerup", this.mapPointerUp),
        this.addEventMapping("pointerupoutside", this.mapPointerUpOutside),
        this.addEventMapping("wheel", this.mapWheel)
    }
    addEventMapping(e, r) {
        this.mappingTable[e] || (this.mappingTable[e] = []),
        this.mappingTable[e].push({
            fn: r,
            priority: 0
        }),
        this.mappingTable[e].sort( (n, i) => n.priority - i.priority)
    }
    dispatchEvent(e, r) {
        e.propagationStopped = !1,
        e.propagationImmediatelyStopped = !1,
        this.propagate(e, r),
        this.dispatch.emit(r || e.type, e)
    }
    mapEvent(e) {
        if (!this.rootTarget)
            return;
        const r = this.mappingTable[e.type];
        if (r)
            for (let n = 0, i = r.length; n < i; n++)
                r[n].fn(e);
        else
            Ne(`[EventBoundary]: Event mapping not defined for ${e.type}`)
    }
    hitTest(e, r) {
        zo.pauseUpdate = !0;
        const i = this._isPointerMoveEvent && this.enableGlobalMoveEvents ? "hitTestMoveRecursive" : "hitTestRecursive"
          , o = this[i](this.rootTarget, this.rootTarget.eventMode, b0e.set(e, r), this.hitTestFn, this.hitPruneFn);
        return o && o[0]
    }
    propagate(e, r) {
        if (!e.target)
            return;
        const n = e.composedPath();
        e.eventPhase = e.CAPTURING_PHASE;
        for (let i = 0, o = n.length - 1; i < o; i++)
            if (e.currentTarget = n[i],
            this.notifyTarget(e, r),
            e.propagationStopped || e.propagationImmediatelyStopped)
                return;
        if (e.eventPhase = e.AT_TARGET,
        e.currentTarget = e.target,
        this.notifyTarget(e, r),
        !(e.propagationStopped || e.propagationImmediatelyStopped)) {
            e.eventPhase = e.BUBBLING_PHASE;
            for (let i = n.length - 2; i >= 0; i--)
                if (e.currentTarget = n[i],
                this.notifyTarget(e, r),
                e.propagationStopped || e.propagationImmediatelyStopped)
                    return
        }
    }
    all(e, r, n=this._allInteractiveElements) {
        if (n.length === 0)
            return;
        e.eventPhase = e.BUBBLING_PHASE;
        const i = Array.isArray(r) ? r : [r];
        for (let o = n.length - 1; o >= 0; o--)
            i.forEach(s => {
                e.currentTarget = n[o],
                this.notifyTarget(e, s)
            }
            )
    }
    propagationPath(e) {
        const r = [e];
        for (let n = 0; n < _0e && e !== this.rootTarget && e.parent; n++) {
            if (!e.parent)
                throw new Error("Cannot find propagation path to disconnected target");
            r.push(e.parent),
            e = e.parent
        }
        return r.reverse(),
        r
    }
    hitTestMoveRecursive(e, r, n, i, o, s=!1) {
        let a = !1;
        if (this._interactivePrune(e))
            return null;
        if ((e.eventMode === "dynamic" || r === "dynamic") && (zo.pauseUpdate = !1),
        e.interactiveChildren && e.children) {
            const u = e.children;
            for (let f = u.length - 1; f >= 0; f--) {
                const d = u[f]
                  , h = this.hitTestMoveRecursive(d, this._isInteractive(r) ? r : d.eventMode, n, i, o, s || o(e, n));
                if (h) {
                    if (h.length > 0 && !h[h.length - 1].parent)
                        continue;
                    const x = e.isInteractive();
                    (h.length > 0 || x) && (x && this._allInteractiveElements.push(e),
                    h.push(e)),
                    this._hitElements.length === 0 && (this._hitElements = h),
                    a = !0
                }
            }
        }
        const l = this._isInteractive(r)
          , c = e.isInteractive();
        return c && c && this._allInteractiveElements.push(e),
        s || this._hitElements.length > 0 ? null : a ? this._hitElements : l && !o(e, n) && i(e, n) ? c ? [e] : [] : null
    }
    hitTestRecursive(e, r, n, i, o) {
        if (this._interactivePrune(e) || o(e, n))
            return null;
        if ((e.eventMode === "dynamic" || r === "dynamic") && (zo.pauseUpdate = !1),
        e.interactiveChildren && e.children) {
            const l = e.children
              , c = n;
            for (let u = l.length - 1; u >= 0; u--) {
                const f = l[u]
                  , d = this.hitTestRecursive(f, this._isInteractive(r) ? r : f.eventMode, c, i, o);
                if (d) {
                    if (d.length > 0 && !d[d.length - 1].parent)
                        continue;
                    const h = e.isInteractive();
                    return (d.length > 0 || h) && d.push(e),
                    d
                }
            }
        }
        const s = this._isInteractive(r)
          , a = e.isInteractive();
        return s && i(e, n) ? a ? [e] : [] : null
    }
    _isInteractive(e) {
        return e === "static" || e === "dynamic"
    }
    _interactivePrune(e) {
        return !e || !e.visible || !e.renderable || !e.measurable || e.eventMode === "none" || e.eventMode === "passive" && !e.interactiveChildren
    }
    hitPruneFn(e, r) {
        if (e.hitArea && (e.worldTransform.applyInverse(r, e0),
        !e.hitArea.contains(e0.x, e0.y)))
            return !0;
        if (e.effects && e.effects.length)
            for (let n = 0; n < e.effects.length; n++) {
                const i = e.effects[n];
                if (i.containsPoint && !i.containsPoint(r, this.hitTestFn))
                    return !0
            }
        return !1
    }
    hitTestFn(e, r) {
        return e.hitArea ? !0 : e != null && e.containsPoint ? (e.worldTransform.applyInverse(r, e0),
        e.containsPoint(e0)) : !1
    }
    notifyTarget(e, r) {
        var o, s;
        if (!e.currentTarget.isInteractive())
            return;
        r ?? (r = e.type);
        const n = `on${r}`;
        (s = (o = e.currentTarget)[n]) == null || s.call(o, e);
        const i = e.eventPhase === e.CAPTURING_PHASE || e.eventPhase === e.AT_TARGET ? `${r}capture` : r;
        this._notifyListeners(e, i),
        e.eventPhase === e.AT_TARGET && this._notifyListeners(e, r)
    }
    mapPointerDown(e) {
        if (!(e instanceof Ai)) {
            Ne("EventBoundary cannot map a non-pointer event as a pointer event");
            return
        }
        const r = this.createPointerEvent(e);
        if (this.dispatchEvent(r, "pointerdown"),
        r.pointerType === "touch")
            this.dispatchEvent(r, "touchstart");
        else if (r.pointerType === "mouse" || r.pointerType === "pen") {
            const i = r.button === 2;
            this.dispatchEvent(r, i ? "rightdown" : "mousedown")
        }
        const n = this.trackingData(e.pointerId);
        n.pressTargetsByButton[e.button] = r.composedPath(),
        this.freeEvent(r)
    }
    mapPointerMove(e) {
        var l, c;
        if (!(e instanceof Ai)) {
            Ne("EventBoundary cannot map a non-pointer event as a pointer event");
            return
        }
        this._allInteractiveElements.length = 0,
        this._hitElements.length = 0,
        this._isPointerMoveEvent = !0;
        const r = this.createPointerEvent(e);
        this._isPointerMoveEvent = !1;
        const n = r.pointerType === "mouse" || r.pointerType === "pen"
          , i = this.trackingData(e.pointerId)
          , o = this.findMountedTarget(i.overTargets);
        if (((l = i.overTargets) == null ? void 0 : l.length) > 0 && o !== r.target) {
            const u = e.type === "mousemove" ? "mouseout" : "pointerout"
              , f = this.createPointerEvent(e, u, o);
            if (this.dispatchEvent(f, "pointerout"),
            n && this.dispatchEvent(f, "mouseout"),
            !r.composedPath().includes(o)) {
                const d = this.createPointerEvent(e, "pointerleave", o);
                for (d.eventPhase = d.AT_TARGET; d.target && !r.composedPath().includes(d.target); )
                    d.currentTarget = d.target,
                    this.notifyTarget(d),
                    n && this.notifyTarget(d, "mouseleave"),
                    d.target = d.target.parent;
                this.freeEvent(d)
            }
            this.freeEvent(f)
        }
        if (o !== r.target) {
            const u = e.type === "mousemove" ? "mouseover" : "pointerover"
              , f = this.clonePointerEvent(r, u);
            this.dispatchEvent(f, "pointerover"),
            n && this.dispatchEvent(f, "mouseover");
            let d = o == null ? void 0 : o.parent;
            for (; d && d !== this.rootTarget.parent && d !== r.target; )
                d = d.parent;
            if (!d || d === this.rootTarget.parent) {
                const x = this.clonePointerEvent(r, "pointerenter");
                for (x.eventPhase = x.AT_TARGET; x.target && x.target !== o && x.target !== this.rootTarget.parent; )
                    x.currentTarget = x.target,
                    this.notifyTarget(x),
                    n && this.notifyTarget(x, "mouseenter"),
                    x.target = x.target.parent;
                this.freeEvent(x)
            }
            this.freeEvent(f)
        }
        const s = []
          , a = this.enableGlobalMoveEvents ?? !0;
        this.moveOnAll ? s.push("pointermove") : this.dispatchEvent(r, "pointermove"),
        a && s.push("globalpointermove"),
        r.pointerType === "touch" && (this.moveOnAll ? s.splice(1, 0, "touchmove") : this.dispatchEvent(r, "touchmove"),
        a && s.push("globaltouchmove")),
        n && (this.moveOnAll ? s.splice(1, 0, "mousemove") : this.dispatchEvent(r, "mousemove"),
        a && s.push("globalmousemove"),
        this.cursor = (c = r.target) == null ? void 0 : c.cursor),
        s.length > 0 && this.all(r, s),
        this._allInteractiveElements.length = 0,
        this._hitElements.length = 0,
        i.overTargets = r.composedPath(),
        this.freeEvent(r)
    }
    mapPointerOver(e) {
        var s;
        if (!(e instanceof Ai)) {
            Ne("EventBoundary cannot map a non-pointer event as a pointer event");
            return
        }
        const r = this.trackingData(e.pointerId)
          , n = this.createPointerEvent(e)
          , i = n.pointerType === "mouse" || n.pointerType === "pen";
        this.dispatchEvent(n, "pointerover"),
        i && this.dispatchEvent(n, "mouseover"),
        n.pointerType === "mouse" && (this.cursor = (s = n.target) == null ? void 0 : s.cursor);
        const o = this.clonePointerEvent(n, "pointerenter");
        for (o.eventPhase = o.AT_TARGET; o.target && o.target !== this.rootTarget.parent; )
            o.currentTarget = o.target,
            this.notifyTarget(o),
            i && this.notifyTarget(o, "mouseenter"),
            o.target = o.target.parent;
        r.overTargets = n.composedPath(),
        this.freeEvent(n),
        this.freeEvent(o)
    }
    mapPointerOut(e) {
        if (!(e instanceof Ai)) {
            Ne("EventBoundary cannot map a non-pointer event as a pointer event");
            return
        }
        const r = this.trackingData(e.pointerId);
        if (r.overTargets) {
            const n = e.pointerType === "mouse" || e.pointerType === "pen"
              , i = this.findMountedTarget(r.overTargets)
              , o = this.createPointerEvent(e, "pointerout", i);
            this.dispatchEvent(o),
            n && this.dispatchEvent(o, "mouseout");
            const s = this.createPointerEvent(e, "pointerleave", i);
            for (s.eventPhase = s.AT_TARGET; s.target && s.target !== this.rootTarget.parent; )
                s.currentTarget = s.target,
                this.notifyTarget(s),
                n && this.notifyTarget(s, "mouseleave"),
                s.target = s.target.parent;
            r.overTargets = null,
            this.freeEvent(o),
            this.freeEvent(s)
        }
        this.cursor = null
    }
    mapPointerUp(e) {
        if (!(e instanceof Ai)) {
            Ne("EventBoundary cannot map a non-pointer event as a pointer event");
            return
        }
        const r = performance.now()
          , n = this.createPointerEvent(e);
        if (this.dispatchEvent(n, "pointerup"),
        n.pointerType === "touch")
            this.dispatchEvent(n, "touchend");
        else if (n.pointerType === "mouse" || n.pointerType === "pen") {
            const a = n.button === 2;
            this.dispatchEvent(n, a ? "rightup" : "mouseup")
        }
        const i = this.trackingData(e.pointerId)
          , o = this.findMountedTarget(i.pressTargetsByButton[e.button]);
        let s = o;
        if (o && !n.composedPath().includes(o)) {
            let a = o;
            for (; a && !n.composedPath().includes(a); ) {
                if (n.currentTarget = a,
                this.notifyTarget(n, "pointerupoutside"),
                n.pointerType === "touch")
                    this.notifyTarget(n, "touchendoutside");
                else if (n.pointerType === "mouse" || n.pointerType === "pen") {
                    const l = n.button === 2;
                    this.notifyTarget(n, l ? "rightupoutside" : "mouseupoutside")
                }
                a = a.parent
            }
            delete i.pressTargetsByButton[e.button],
            s = a
        }
        if (s) {
            const a = this.clonePointerEvent(n, "click");
            a.target = s,
            a.path = null,
            i.clicksByButton[e.button] || (i.clicksByButton[e.button] = {
                clickCount: 0,
                target: a.target,
                timeStamp: r
            });
            const l = i.clicksByButton[e.button];
            if (l.target === a.target && r - l.timeStamp < 200 ? ++l.clickCount : l.clickCount = 1,
            l.target = a.target,
            l.timeStamp = r,
            a.detail = l.clickCount,
            a.pointerType === "mouse") {
                const c = a.button === 2;
                this.dispatchEvent(a, c ? "rightclick" : "click")
            } else
                a.pointerType === "touch" && this.dispatchEvent(a, "tap");
            this.dispatchEvent(a, "pointertap"),
            this.freeEvent(a)
        }
        this.freeEvent(n)
    }
    mapPointerUpOutside(e) {
        if (!(e instanceof Ai)) {
            Ne("EventBoundary cannot map a non-pointer event as a pointer event");
            return
        }
        const r = this.trackingData(e.pointerId)
          , n = this.findMountedTarget(r.pressTargetsByButton[e.button])
          , i = this.createPointerEvent(e);
        if (n) {
            let o = n;
            for (; o; )
                i.currentTarget = o,
                this.notifyTarget(i, "pointerupoutside"),
                i.pointerType === "touch" ? this.notifyTarget(i, "touchendoutside") : (i.pointerType === "mouse" || i.pointerType === "pen") && this.notifyTarget(i, i.button === 2 ? "rightupoutside" : "mouseupoutside"),
                o = o.parent;
            delete r.pressTargetsByButton[e.button]
        }
        this.freeEvent(i)
    }
    mapWheel(e) {
        if (!(e instanceof nu)) {
            Ne("EventBoundary cannot map a non-wheel event as a wheel event");
            return
        }
        const r = this.createWheelEvent(e);
        this.dispatchEvent(r),
        this.freeEvent(r)
    }
    findMountedTarget(e) {
        if (!e)
            return null;
        let r = e[0];
        for (let n = 1; n < e.length && e[n].parent === r; n++)
            r = e[n];
        return r
    }
    createPointerEvent(e, r, n) {
        const i = this.allocateEvent(Ai);
        return this.copyPointerData(e, i),
        this.copyMouseData(e, i),
        this.copyData(e, i),
        i.nativeEvent = e.nativeEvent,
        i.originalEvent = e,
        i.target = n ?? this.hitTest(i.global.x, i.global.y) ?? this._hitElements[0],
        typeof r == "string" && (i.type = r),
        i
    }
    createWheelEvent(e) {
        const r = this.allocateEvent(nu);
        return this.copyWheelData(e, r),
        this.copyMouseData(e, r),
        this.copyData(e, r),
        r.nativeEvent = e.nativeEvent,
        r.originalEvent = e,
        r.target = this.hitTest(r.global.x, r.global.y),
        r
    }
    clonePointerEvent(e, r) {
        const n = this.allocateEvent(Ai);
        return n.nativeEvent = e.nativeEvent,
        n.originalEvent = e.originalEvent,
        this.copyPointerData(e, n),
        this.copyMouseData(e, n),
        this.copyData(e, n),
        n.target = e.target,
        n.path = e.composedPath().slice(),
        n.type = r ?? n.type,
        n
    }
    copyWheelData(e, r) {
        r.deltaMode = e.deltaMode,
        r.deltaX = e.deltaX,
        r.deltaY = e.deltaY,
        r.deltaZ = e.deltaZ
    }
    copyPointerData(e, r) {
        e instanceof Ai && r instanceof Ai && (r.pointerId = e.pointerId,
        r.width = e.width,
        r.height = e.height,
        r.isPrimary = e.isPrimary,
        r.pointerType = e.pointerType,
        r.pressure = e.pressure,
        r.tangentialPressure = e.tangentialPressure,
        r.tiltX = e.tiltX,
        r.tiltY = e.tiltY,
        r.twist = e.twist)
    }
    copyMouseData(e, r) {
        e instanceof $x && r instanceof $x && (r.altKey = e.altKey,
        r.button = e.button,
        r.buttons = e.buttons,
        r.client.copyFrom(e.client),
        r.ctrlKey = e.ctrlKey,
        r.metaKey = e.metaKey,
        r.movement.copyFrom(e.movement),
        r.screen.copyFrom(e.screen),
        r.shiftKey = e.shiftKey,
        r.global.copyFrom(e.global))
    }
    copyData(e, r) {
        r.isTrusted = e.isTrusted,
        r.srcElement = e.srcElement,
        r.timeStamp = performance.now(),
        r.type = e.type,
        r.detail = e.detail,
        r.view = e.view,
        r.which = e.which,
        r.layer.copyFrom(e.layer),
        r.page.copyFrom(e.page)
    }
    trackingData(e) {
        return this.mappingState.trackingData[e] || (this.mappingState.trackingData[e] = {
            pressTargetsByButton: {},
            clicksByButton: {},
            overTarget: null
        }),
        this.mappingState.trackingData[e]
    }
    allocateEvent(e) {
        this.eventPool.has(e) || this.eventPool.set(e, []);
        const r = this.eventPool.get(e).pop() || new e(this);
        return r.eventPhase = r.NONE,
        r.currentTarget = null,
        r.defaultPrevented = !1,
        r.path = null,
        r.target = null,
        r
    }
    freeEvent(e) {
        if (e.manager !== this)
            throw new Error("It is illegal to free an event not managed by this EventBoundary!");
        const r = e.constructor;
        this.eventPool.has(r) || this.eventPool.set(r, []),
        this.eventPool.get(r).push(e)
    }
    _notifyListeners(e, r) {
        const n = e.currentTarget._events[r];
        if (n)
            if ("fn"in n)
                n.once && e.currentTarget.removeListener(r, n.fn, void 0, !0),
                n.fn.call(n.context, e);
            else
                for (let i = 0, o = n.length; i < o && !e.propagationImmediatelyStopped; i++)
                    n[i].once && e.currentTarget.removeListener(r, n[i].fn, void 0, !0),
                    n[i].fn.call(n[i].context, e)
    }
}
const A0e = 1
  , w0e = {
    touchstart: "pointerdown",
    touchend: "pointerup",
    touchendoutside: "pointerupoutside",
    touchmove: "pointermove",
    touchcancel: "pointercancel"
}
  , wb = class cE {
    constructor(e) {
        this.supportsTouchEvents = "ontouchstart"in globalThis,
        this.supportsPointerEvents = !!globalThis.PointerEvent,
        this.domElement = null,
        this.resolution = 1,
        this.renderer = e,
        this.rootBoundary = new C0e(null),
        zo.init(this),
        this.autoPreventDefault = !0,
        this._eventsAdded = !1,
        this._rootPointerEvent = new Ai(null),
        this._rootWheelEvent = new nu(null),
        this.cursorStyles = {
            default: "inherit",
            pointer: "pointer"
        },
        this.features = new Proxy({
            ...cE.defaultEventFeatures
        },{
            set: (r, n, i) => (n === "globalMove" && (this.rootBoundary.enableGlobalMoveEvents = i),
            r[n] = i,
            !0)
        }),
        this._onPointerDown = this._onPointerDown.bind(this),
        this._onPointerMove = this._onPointerMove.bind(this),
        this._onPointerUp = this._onPointerUp.bind(this),
        this._onPointerOverOut = this._onPointerOverOut.bind(this),
        this.onWheel = this.onWheel.bind(this)
    }
    static get defaultEventMode() {
        return this._defaultEventMode
    }
    init(e) {
        const {canvas: r, resolution: n} = this.renderer;
        this.setTargetElement(r),
        this.resolution = n,
        cE._defaultEventMode = e.eventMode ?? "passive",
        Object.assign(this.features, e.eventFeatures ?? {}),
        this.rootBoundary.enableGlobalMoveEvents = this.features.globalMove
    }
    resolutionChange(e) {
        this.resolution = e
    }
    destroy() {
        zo.destroy(),
        this.setTargetElement(null),
        this.renderer = null,
        this._currentCursor = null
    }
    setCursor(e) {
        e || (e = "default");
        let r = !0;
        if (globalThis.OffscreenCanvas && this.domElement instanceof OffscreenCanvas && (r = !1),
        this._currentCursor === e)
            return;
        this._currentCursor = e;
        const n = this.cursorStyles[e];
        if (n)
            switch (typeof n) {
            case "string":
                r && (this.domElement.style.cursor = n);
                break;
            case "function":
                n(e);
                break;
            case "object":
                r && Object.assign(this.domElement.style, n);
                break
            }
        else
            r && typeof e == "string" && !Object.prototype.hasOwnProperty.call(this.cursorStyles, e) && (this.domElement.style.cursor = e)
    }
    get pointer() {
        return this._rootPointerEvent
    }
    _onPointerDown(e) {
        if (!this.features.click)
            return;
        this.rootBoundary.rootTarget = this.renderer.lastObjectRendered;
        const r = this._normalizeToPointerData(e);
        this.autoPreventDefault && r[0].isNormalized && (e.cancelable || !("cancelable"in e)) && e.preventDefault();
        for (let n = 0, i = r.length; n < i; n++) {
            const o = r[n]
              , s = this._bootstrapEvent(this._rootPointerEvent, o);
            this.rootBoundary.mapEvent(s)
        }
        this.setCursor(this.rootBoundary.cursor)
    }
    _onPointerMove(e) {
        if (!this.features.move)
            return;
        this.rootBoundary.rootTarget = this.renderer.lastObjectRendered,
        zo.pointerMoved();
        const r = this._normalizeToPointerData(e);
        for (let n = 0, i = r.length; n < i; n++) {
            const o = this._bootstrapEvent(this._rootPointerEvent, r[n]);
            this.rootBoundary.mapEvent(o)
        }
        this.setCursor(this.rootBoundary.cursor)
    }
    _onPointerUp(e) {
        if (!this.features.click)
            return;
        this.rootBoundary.rootTarget = this.renderer.lastObjectRendered;
        let r = e.target;
        e.composedPath && e.composedPath().length > 0 && (r = e.composedPath()[0]);
        const n = r !== this.domElement ? "outside" : ""
          , i = this._normalizeToPointerData(e);
        for (let o = 0, s = i.length; o < s; o++) {
            const a = this._bootstrapEvent(this._rootPointerEvent, i[o]);
            a.type += n,
            this.rootBoundary.mapEvent(a)
        }
        this.setCursor(this.rootBoundary.cursor)
    }
    _onPointerOverOut(e) {
        if (!this.features.click)
            return;
        this.rootBoundary.rootTarget = this.renderer.lastObjectRendered;
        const r = this._normalizeToPointerData(e);
        for (let n = 0, i = r.length; n < i; n++) {
            const o = this._bootstrapEvent(this._rootPointerEvent, r[n]);
            this.rootBoundary.mapEvent(o)
        }
        this.setCursor(this.rootBoundary.cursor)
    }
    onWheel(e) {
        if (!this.features.wheel)
            return;
        const r = this.normalizeWheelEvent(e);
        this.rootBoundary.rootTarget = this.renderer.lastObjectRendered,
        this.rootBoundary.mapEvent(r)
    }
    setTargetElement(e) {
        this._removeEvents(),
        this.domElement = e,
        zo.domElement = e,
        this._addEvents()
    }
    _addEvents() {
        if (this._eventsAdded || !this.domElement)
            return;
        zo.addTickerListener();
        const e = this.domElement.style;
        e && (globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "none",
        e.msTouchAction = "none") : this.supportsPointerEvents && (e.touchAction = "none")),
        this.supportsPointerEvents ? (globalThis.document.addEventListener("pointermove", this._onPointerMove, !0),
        this.domElement.addEventListener("pointerdown", this._onPointerDown, !0),
        this.domElement.addEventListener("pointerleave", this._onPointerOverOut, !0),
        this.domElement.addEventListener("pointerover", this._onPointerOverOut, !0),
        globalThis.addEventListener("pointerup", this._onPointerUp, !0)) : (globalThis.document.addEventListener("mousemove", this._onPointerMove, !0),
        this.domElement.addEventListener("mousedown", this._onPointerDown, !0),
        this.domElement.addEventListener("mouseout", this._onPointerOverOut, !0),
        this.domElement.addEventListener("mouseover", this._onPointerOverOut, !0),
        globalThis.addEventListener("mouseup", this._onPointerUp, !0),
        this.supportsTouchEvents && (this.domElement.addEventListener("touchstart", this._onPointerDown, !0),
        this.domElement.addEventListener("touchend", this._onPointerUp, !0),
        this.domElement.addEventListener("touchmove", this._onPointerMove, !0))),
        this.domElement.addEventListener("wheel", this.onWheel, {
            passive: !0,
            capture: !0
        }),
        this._eventsAdded = !0
    }
    _removeEvents() {
        if (!this._eventsAdded || !this.domElement)
            return;
        zo.removeTickerListener();
        const e = this.domElement.style;
        e && (globalThis.navigator.msPointerEnabled ? (e.msContentZooming = "",
        e.msTouchAction = "") : this.supportsPointerEvents && (e.touchAction = "")),
        this.supportsPointerEvents ? (globalThis.document.removeEventListener("pointermove", this._onPointerMove, !0),
        this.domElement.removeEventListener("pointerdown", this._onPointerDown, !0),
        this.domElement.removeEventListener("pointerleave", this._onPointerOverOut, !0),
        this.domElement.removeEventListener("pointerover", this._onPointerOverOut, !0),
        globalThis.removeEventListener("pointerup", this._onPointerUp, !0)) : (globalThis.document.removeEventListener("mousemove", this._onPointerMove, !0),
        this.domElement.removeEventListener("mousedown", this._onPointerDown, !0),
        this.domElement.removeEventListener("mouseout", this._onPointerOverOut, !0),
        this.domElement.removeEventListener("mouseover", this._onPointerOverOut, !0),
        globalThis.removeEventListener("mouseup", this._onPointerUp, !0),
        this.supportsTouchEvents && (this.domElement.removeEventListener("touchstart", this._onPointerDown, !0),
        this.domElement.removeEventListener("touchend", this._onPointerUp, !0),
        this.domElement.removeEventListener("touchmove", this._onPointerMove, !0))),
        this.domElement.removeEventListener("wheel", this.onWheel, !0),
        this.domElement = null,
        this._eventsAdded = !1
    }
    mapPositionToPoint(e, r, n) {
        const i = this.domElement.isConnected ? this.domElement.getBoundingClientRect() : {
            x: 0,
            y: 0,
            width: this.domElement.width,
            height: this.domElement.height,
            left: 0,
            top: 0
        }
          , o = 1 / this.resolution;
        e.x = (r - i.left) * (this.domElement.width / i.width) * o,
        e.y = (n - i.top) * (this.domElement.height / i.height) * o
    }
    _normalizeToPointerData(e) {
        const r = [];
        if (this.supportsTouchEvents && e instanceof TouchEvent)
            for (let n = 0, i = e.changedTouches.length; n < i; n++) {
                const o = e.changedTouches[n];
                typeof o.button > "u" && (o.button = 0),
                typeof o.buttons > "u" && (o.buttons = 1),
                typeof o.isPrimary > "u" && (o.isPrimary = e.touches.length === 1 && e.type === "touchstart"),
                typeof o.width > "u" && (o.width = o.radiusX || 1),
                typeof o.height > "u" && (o.height = o.radiusY || 1),
                typeof o.tiltX > "u" && (o.tiltX = 0),
                typeof o.tiltY > "u" && (o.tiltY = 0),
                typeof o.pointerType > "u" && (o.pointerType = "touch"),
                typeof o.pointerId > "u" && (o.pointerId = o.identifier || 0),
                typeof o.pressure > "u" && (o.pressure = o.force || .5),
                typeof o.twist > "u" && (o.twist = 0),
                typeof o.tangentialPressure > "u" && (o.tangentialPressure = 0),
                typeof o.layerX > "u" && (o.layerX = o.offsetX = o.clientX),
                typeof o.layerY > "u" && (o.layerY = o.offsetY = o.clientY),
                o.isNormalized = !0,
                o.type = e.type,
                r.push(o)
            }
        else if (!globalThis.MouseEvent || e instanceof MouseEvent && (!this.supportsPointerEvents || !(e instanceof globalThis.PointerEvent))) {
            const n = e;
            typeof n.isPrimary > "u" && (n.isPrimary = !0),
            typeof n.width > "u" && (n.width = 1),
            typeof n.height > "u" && (n.height = 1),
            typeof n.tiltX > "u" && (n.tiltX = 0),
            typeof n.tiltY > "u" && (n.tiltY = 0),
            typeof n.pointerType > "u" && (n.pointerType = "mouse"),
            typeof n.pointerId > "u" && (n.pointerId = A0e),
            typeof n.pressure > "u" && (n.pressure = .5),
            typeof n.twist > "u" && (n.twist = 0),
            typeof n.tangentialPressure > "u" && (n.tangentialPressure = 0),
            n.isNormalized = !0,
            r.push(n)
        } else
            r.push(e);
        return r
    }
    normalizeWheelEvent(e) {
        const r = this._rootWheelEvent;
        return this._transferMouseData(r, e),
        r.deltaX = e.deltaX,
        r.deltaY = e.deltaY,
        r.deltaZ = e.deltaZ,
        r.deltaMode = e.deltaMode,
        this.mapPositionToPoint(r.screen, e.clientX, e.clientY),
        r.global.copyFrom(r.screen),
        r.offset.copyFrom(r.screen),
        r.nativeEvent = e,
        r.type = e.type,
        r
    }
    _bootstrapEvent(e, r) {
        return e.originalEvent = null,
        e.nativeEvent = r,
        e.pointerId = r.pointerId,
        e.width = r.width,
        e.height = r.height,
        e.isPrimary = r.isPrimary,
        e.pointerType = r.pointerType,
        e.pressure = r.pressure,
        e.tangentialPressure = r.tangentialPressure,
        e.tiltX = r.tiltX,
        e.tiltY = r.tiltY,
        e.twist = r.twist,
        this._transferMouseData(e, r),
        this.mapPositionToPoint(e.screen, r.clientX, r.clientY),
        e.global.copyFrom(e.screen),
        e.offset.copyFrom(e.screen),
        e.isTrusted = r.isTrusted,
        e.type === "pointerleave" && (e.type = "pointerout"),
        e.type.startsWith("mouse") && (e.type = e.type.replace("mouse", "pointer")),
        e.type.startsWith("touch") && (e.type = w0e[e.type] || e.type),
        e
    }
    _transferMouseData(e, r) {
        e.isTrusted = r.isTrusted,
        e.srcElement = r.srcElement,
        e.timeStamp = performance.now(),
        e.type = r.type,
        e.altKey = r.altKey,
        e.button = r.button,
        e.buttons = r.buttons,
        e.client.x = r.clientX,
        e.client.y = r.clientY,
        e.ctrlKey = r.ctrlKey,
        e.metaKey = r.metaKey,
        e.movement.x = r.movementX,
        e.movement.y = r.movementY,
        e.page.x = r.pageX,
        e.page.y = r.pageY,
        e.relatedTarget = null,
        e.shiftKey = r.shiftKey
    }
}
;
wb.extension = {
    name: "events",
    type: [X.WebGLSystem, X.CanvasSystem, X.WebGPUSystem],
    priority: -1
};
wb.defaultEventFeatures = {
    move: !0,
    globalMove: !0,
    click: !0,
    wheel: !0
};
let eI = wb;
const B0e = {
    onclick: null,
    onmousedown: null,
    onmouseenter: null,
    onmouseleave: null,
    onmousemove: null,
    onglobalmousemove: null,
    onmouseout: null,
    onmouseover: null,
    onmouseup: null,
    onmouseupoutside: null,
    onpointercancel: null,
    onpointerdown: null,
    onpointerenter: null,
    onpointerleave: null,
    onpointermove: null,
    onglobalpointermove: null,
    onpointerout: null,
    onpointerover: null,
    onpointertap: null,
    onpointerup: null,
    onpointerupoutside: null,
    onrightclick: null,
    onrightdown: null,
    onrightup: null,
    onrightupoutside: null,
    ontap: null,
    ontouchcancel: null,
    ontouchend: null,
    ontouchendoutside: null,
    ontouchmove: null,
    onglobaltouchmove: null,
    ontouchstart: null,
    onwheel: null,
    get interactive() {
        return this.eventMode === "dynamic" || this.eventMode === "static"
    },
    set interactive(t) {
        this.eventMode = t ? "static" : "passive"
    },
    _internalEventMode: void 0,
    get eventMode() {
        return this._internalEventMode ?? eI.defaultEventMode
    },
    set eventMode(t) {
        this._internalEventMode = t
    },
    isInteractive() {
        return this.eventMode === "static" || this.eventMode === "dynamic"
    },
    interactiveChildren: !0,
    hitArea: null,
    addEventListener(t, e, r) {
        const n = typeof r == "boolean" && r || typeof r == "object" && r.capture
          , i = typeof r == "object" ? r.signal : void 0
          , o = typeof r == "object" ? r.once === !0 : !1
          , s = typeof e == "function" ? void 0 : e;
        t = n ? `${t}capture` : t;
        const a = typeof e == "function" ? e : e.handleEvent
          , l = this;
        i && i.addEventListener("abort", () => {
            l.off(t, a, s)
        }
        ),
        o ? l.once(t, a, s) : l.on(t, a, s)
    },
    removeEventListener(t, e, r) {
        const n = typeof r == "boolean" && r || typeof r == "object" && r.capture
          , i = typeof e == "function" ? void 0 : e;
        t = n ? `${t}capture` : t,
        e = typeof e == "function" ? e : e.handleEvent,
        this.off(t, e, i)
    },
    dispatchEvent(t) {
        if (!(t instanceof nd))
            throw new Error("Container cannot propagate events outside of the Federated Events API");
        return t.defaultPrevented = !1,
        t.path = null,
        t.target = this,
        t.manager.dispatchEvent(t),
        !t.defaultPrevented
    }
};
var S0e = `in vec2 aPosition;
out vec2 vTextureCoord;

uniform vec4 uInputSize;
uniform vec4 uOutputFrame;
uniform vec4 uOutputTexture;

vec4 filterVertexPosition( void )
{
    vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;
    
    position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;
    position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;

    return vec4(position, 0.0, 1.0);
}

vec2 filterTextureCoord( void )
{
    return aPosition * (uOutputFrame.zw * uInputSize.zw);
}

void main(void)
{
    gl_Position = filterVertexPosition();
    vTextureCoord = filterTextureCoord();
}
`;
const tI = {
    5: [.153388, .221461, .250301],
    7: [.071303, .131514, .189879, .214607],
    9: [.028532, .067234, .124009, .179044, .20236],
    11: [.0093, .028002, .065984, .121703, .175713, .198596],
    13: [.002406, .009255, .027867, .065666, .121117, .174868, .197641],
    15: [489e-6, .002403, .009246, .02784, .065602, .120999, .174697, .197448]
}
  , T0e = ["in vec2 vBlurTexCoords[%size%];", "uniform sampler2D uTexture;", "out vec4 finalColor;", "void main(void)", "{", "    finalColor = vec4(0.0);", "    %blur%", "}"].join(`
`);
function D0e(t) {
    const e = tI[t]
      , r = e.length;
    let n = T0e
      , i = "";
    const o = "finalColor += texture(uTexture, vBlurTexCoords[%index%]) * %value%;";
    let s;
    for (let a = 0; a < t; a++) {
        let l = o.replace("%index%", a.toString());
        s = a,
        a >= r && (s = t - a - 1),
        l = l.replace("%value%", e[s].toString()),
        i += l,
        i += `
`
    }
    return n = n.replace("%blur%", i),
    n = n.replace("%size%", t.toString()),
    n
}
const F0e = `
    in vec2 aPosition;

    uniform float uStrength;

    out vec2 vBlurTexCoords[%size%];

    uniform vec4 uInputSize;
    uniform vec4 uOutputFrame;
    uniform vec4 uOutputTexture;

    vec4 filterVertexPosition( void )
{
    vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;

    position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;
    position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;

    return vec4(position, 0.0, 1.0);
}

    vec2 filterTextureCoord( void )
    {
        return aPosition * (uOutputFrame.zw * uInputSize.zw);
    }

    void main(void)
    {
        gl_Position = filterVertexPosition();

        float pixelStrength = uInputSize.%dimension% * uStrength;

        vec2 textureCoord = filterTextureCoord();
        %blur%
    }`;
function P0e(t, e) {
    const r = Math.ceil(t / 2);
    let n = F0e, i = "", o;
    e ? o = "vBlurTexCoords[%index%] =  textureCoord + vec2(%sampleIndex% * pixelStrength, 0.0);" : o = "vBlurTexCoords[%index%] =  textureCoord + vec2(0.0, %sampleIndex% * pixelStrength);";
    for (let s = 0; s < t; s++) {
        let a = o.replace("%index%", s.toString());
        a = a.replace("%sampleIndex%", `${s - (r - 1)}.0`),
        i += a,
        i += `
`
    }
    return n = n.replace("%blur%", i),
    n = n.replace("%size%", t.toString()),
    n = n.replace("%dimension%", e ? "z" : "w"),
    n
}
function I0e(t, e) {
    const r = P0e(e, t)
      , n = D0e(e);
    return ya.from({
        vertex: r,
        fragment: n,
        name: `blur-${t ? "horizontal" : "vertical"}-pass-filter`
    })
}
var O0e = `

struct GlobalFilterUniforms {
  uInputSize:vec4<f32>,
  uInputPixel:vec4<f32>,
  uInputClamp:vec4<f32>,
  uOutputFrame:vec4<f32>,
  uGlobalFrame:vec4<f32>,
  uOutputTexture:vec4<f32>,
};

struct BlurUniforms {
  uStrength:f32,
};

@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;
@group(0) @binding(1) var uTexture: texture_2d<f32>;
@group(0) @binding(2) var uSampler : sampler;

@group(1) @binding(0) var<uniform> blurUniforms : BlurUniforms;


struct VSOutput {
    @builtin(position) position: vec4<f32>,
    %blur-struct%
  };

fn filterVertexPosition(aPosition:vec2<f32>) -> vec4<f32>
{
    var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;

    position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;
    position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;

    return vec4(position, 0.0, 1.0);
}

fn filterTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>
{
    return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);
}

fn globalTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>
{
  return  (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw);  
}

fn getSize() -> vec2<f32>
{
  return gfu.uGlobalFrame.zw;
}


@vertex
fn mainVertex(
  @location(0) aPosition : vec2<f32>, 
) -> VSOutput {

  let filteredCord = filterTextureCoord(aPosition);

  let pixelStrength = gfu.uInputSize.%dimension% * blurUniforms.uStrength;

  return VSOutput(
   filterVertexPosition(aPosition),
    %blur-vertex-out%
  );
}

@fragment
fn mainFragment(
  @builtin(position) position: vec4<f32>,
  %blur-fragment-in%
) -> @location(0) vec4<f32> {

    var   finalColor = vec4(0.0);

    %blur-sampling%

    return finalColor;
}`;
function k0e(t, e) {
    const r = tI[e]
      , n = r.length
      , i = []
      , o = []
      , s = [];
    for (let f = 0; f < e; f++) {
        i[f] = `@location(${f}) offset${f}: vec2<f32>,`,
        t ? o[f] = `filteredCord + vec2(${f - n + 1} * pixelStrength, 0.0),` : o[f] = `filteredCord + vec2(0.0, ${f - n + 1} * pixelStrength),`;
        const d = f < n ? f : e - f - 1
          , h = r[d].toString();
        s[f] = `finalColor += textureSample(uTexture, uSampler, offset${f}) * ${h};`
    }
    const a = i.join(`
`)
      , l = o.join(`
`)
      , c = s.join(`
`)
      , u = O0e.replace("%blur-struct%", a).replace("%blur-vertex-out%", l).replace("%blur-fragment-in%", a).replace("%blur-sampling%", c).replace("%dimension%", t ? "z" : "w");
    return Es.from({
        vertex: {
            source: u,
            entryPoint: "mainVertex"
        },
        fragment: {
            source: u,
            entryPoint: "mainFragment"
        }
    })
}
const rI = class nI extends l1 {
    constructor(e) {
        e = {
            ...nI.defaultOptions,
            ...e
        };
        const r = I0e(e.horizontal, e.kernelSize)
          , n = k0e(e.horizontal, e.kernelSize);
        super({
            glProgram: r,
            gpuProgram: n,
            resources: {
                blurUniforms: {
                    uStrength: {
                        value: 0,
                        type: "f32"
                    }
                }
            },
            ...e
        }),
        this.horizontal = e.horizontal,
        this._quality = 0,
        this.quality = e.quality,
        this.blur = e.strength,
        this._uniforms = this.resources.blurUniforms.uniforms
    }
    apply(e, r, n, i) {
        if (this._uniforms.uStrength = this.strength / this.passes,
        this.passes === 1)
            e.applyFilter(this, r, n, i);
        else {
            const o = sr.getSameSizeTexture(r);
            let s = r
              , a = o;
            this._state.blend = !1;
            const l = e.renderer.type === qn.WEBGPU;
            for (let c = 0; c < this.passes - 1; c++) {
                e.applyFilter(this, s, a, c === 0 ? !0 : l);
                const u = a;
                a = s,
                s = u
            }
            this._state.blend = !0,
            e.applyFilter(this, s, n, i),
            sr.returnTexture(o)
        }
    }
    get blur() {
        return this.strength
    }
    set blur(e) {
        this.padding = 1 + Math.abs(e) * 2,
        this.strength = e
    }
    get quality() {
        return this._quality
    }
    set quality(e) {
        this._quality = e,
        this.passes = e
    }
}
;
rI.defaultOptions = {
    strength: 8,
    quality: 4,
    kernelSize: 5
};
let em = rI;
class R0e extends l1 {
    constructor(...e) {
        let r = e[0] ?? {};
        typeof r == "number" && (Re(tt, "BlurFilter constructor params are now options object. See params: { strength, quality, resolution, kernelSize }"),
        r = {
            strength: r
        },
        e[1] !== void 0 && (r.quality = e[1]),
        e[2] !== void 0 && (r.resolution = e[2] || "inherit"),
        e[3] !== void 0 && (r.kernelSize = e[3])),
        r = {
            ...em.defaultOptions,
            ...r
        };
        const {strength: n, strengthX: i, strengthY: o, quality: s, ...a} = r;
        super({
            ...a,
            compatibleRenderers: qn.BOTH,
            resources: {}
        }),
        this._repeatEdgePixels = !1,
        this.blurXFilter = new em({
            horizontal: !0,
            ...r
        }),
        this.blurYFilter = new em({
            horizontal: !1,
            ...r
        }),
        this.quality = s,
        this.strengthX = i ?? n,
        this.strengthY = o ?? n,
        this.repeatEdgePixels = !1
    }
    apply(e, r, n, i) {
        const o = Math.abs(this.blurXFilter.strength)
          , s = Math.abs(this.blurYFilter.strength);
        if (o && s) {
            const a = sr.getSameSizeTexture(r);
            this.blurXFilter.blendMode = "normal",
            this.blurXFilter.apply(e, r, a, !0),
            this.blurYFilter.blendMode = this.blendMode,
            this.blurYFilter.apply(e, a, n, i),
            sr.returnTexture(a)
        } else
            s ? (this.blurYFilter.blendMode = this.blendMode,
            this.blurYFilter.apply(e, r, n, i)) : (this.blurXFilter.blendMode = this.blendMode,
            this.blurXFilter.apply(e, r, n, i))
    }
    updatePadding() {
        this._repeatEdgePixels ? this.padding = 0 : this.padding = Math.max(Math.abs(this.blurXFilter.blur), Math.abs(this.blurYFilter.blur)) * 2
    }
    get strength() {
        if (this.strengthX !== this.strengthY)
            throw new Error("BlurFilter's strengthX and strengthY are different");
        return this.strengthX
    }
    set strength(e) {
        this.blurXFilter.blur = this.blurYFilter.blur = e,
        this.updatePadding()
    }
    get quality() {
        return this.blurXFilter.quality
    }
    set quality(e) {
        this.blurXFilter.quality = this.blurYFilter.quality = e
    }
    get strengthX() {
        return this.blurXFilter.blur
    }
    set strengthX(e) {
        this.blurXFilter.blur = e,
        this.updatePadding()
    }
    get strengthY() {
        return this.blurYFilter.blur
    }
    set strengthY(e) {
        this.blurYFilter.blur = e,
        this.updatePadding()
    }
    get blur() {
        return Re("8.3.0", "BlurFilter.blur is deprecated, please use BlurFilter.strength instead."),
        this.strength
    }
    set blur(e) {
        Re("8.3.0", "BlurFilter.blur is deprecated, please use BlurFilter.strength instead."),
        this.strength = e
    }
    get blurX() {
        return Re("8.3.0", "BlurFilter.blurX is deprecated, please use BlurFilter.strengthX instead."),
        this.strengthX
    }
    set blurX(e) {
        Re("8.3.0", "BlurFilter.blurX is deprecated, please use BlurFilter.strengthX instead."),
        this.strengthX = e
    }
    get blurY() {
        return Re("8.3.0", "BlurFilter.blurY is deprecated, please use BlurFilter.strengthY instead."),
        this.strengthY
    }
    set blurY(e) {
        Re("8.3.0", "BlurFilter.blurY is deprecated, please use BlurFilter.strengthY instead."),
        this.strengthY = e
    }
    get repeatEdgePixels() {
        return this._repeatEdgePixels
    }
    set repeatEdgePixels(e) {
        this._repeatEdgePixels = e,
        this.updatePadding()
    }
}
R0e.defaultOptions = {
    strength: 8,
    quality: 4,
    kernelSize: 5
};
var M0e = `in vec2 vTextureCoord;
out vec4 finalColor;
uniform sampler2D uTexture;
void main() {
    finalColor = texture(uTexture, vTextureCoord);
}
`
  , d3 = `struct GlobalFilterUniforms {
  uInputSize: vec4<f32>,
  uInputPixel: vec4<f32>,
  uInputClamp: vec4<f32>,
  uOutputFrame: vec4<f32>,
  uGlobalFrame: vec4<f32>,
  uOutputTexture: vec4<f32>,
};

@group(0) @binding(0) var <uniform> gfu: GlobalFilterUniforms;
@group(0) @binding(1) var uTexture: texture_2d<f32>;
@group(0) @binding(2) var uSampler: sampler;

struct VSOutput {
  @builtin(position) position: vec4<f32>,
  @location(0) uv: vec2<f32>
};

fn filterVertexPosition(aPosition: vec2<f32>) -> vec4<f32>
{
    var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;

    position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;
    position.y = position.y * (2.0 * gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;

    return vec4(position, 0.0, 1.0);
}

fn filterTextureCoord(aPosition: vec2<f32>) -> vec2<f32>
{
    return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);
}

@vertex
fn mainVertex(
  @location(0) aPosition: vec2<f32>,
) -> VSOutput {
  return VSOutput(
   filterVertexPosition(aPosition),
   filterTextureCoord(aPosition)
  );
}

@fragment
fn mainFragment(
  @location(0) uv: vec2<f32>,
) -> @location(0) vec4<f32> {
    return textureSample(uTexture, uSampler, uv);
}
`;
class N0e extends l1 {
    constructor() {
        const e = Es.from({
            vertex: {
                source: d3,
                entryPoint: "mainVertex"
            },
            fragment: {
                source: d3,
                entryPoint: "mainFragment"
            },
            name: "passthrough-filter"
        })
          , r = ya.from({
            vertex: S0e,
            fragment: M0e,
            name: "passthrough-filter"
        });
        super({
            gpuProgram: e,
            glProgram: r
        })
    }
}
class iI {
    constructor(e) {
        this._renderer = e
    }
    push(e, r, n) {
        this._renderer.renderPipes.batch.break(n),
        n.add({
            renderPipeId: "filter",
            canBundle: !1,
            action: "pushFilter",
            container: r,
            filterEffect: e
        })
    }
    pop(e, r, n) {
        this._renderer.renderPipes.batch.break(n),
        n.add({
            renderPipeId: "filter",
            action: "popFilter",
            canBundle: !1
        })
    }
    execute(e) {
        e.action === "pushFilter" ? this._renderer.filter.push(e) : e.action === "popFilter" && this._renderer.filter.pop()
    }
    destroy() {
        this._renderer = null
    }
}
iI.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "filter"
};
const h3 = new Pe;
function L0e(t, e) {
    e.clear();
    const r = e.matrix;
    for (let n = 0; n < t.length; n++) {
        const i = t[n];
        if (i.globalDisplayStatus < 7)
            continue;
        const o = i.renderGroup ?? i.parentRenderGroup;
        o != null && o.isCachedAsTexture ? e.matrix = h3.copyFrom(o.textureOffsetInverseTransform).append(i.worldTransform) : o != null && o._parentCacheAsTextureRenderGroup ? e.matrix = h3.copyFrom(o._parentCacheAsTextureRenderGroup.inverseWorldTransform).append(i.groupTransform) : e.matrix = i.worldTransform,
        e.addBounds(i.bounds)
    }
    return e.matrix = r,
    e
}
const $0e = new id({
    attributes: {
        aPosition: {
            buffer: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]),
            format: "float32x2",
            stride: 2 * 4,
            offset: 0
        }
    },
    indexBuffer: new Uint32Array([0, 1, 2, 0, 2, 3])
});
class U0e {
    constructor() {
        this.skip = !1,
        this.inputTexture = null,
        this.backTexture = null,
        this.filters = null,
        this.bounds = new Vr,
        this.container = null,
        this.blendRequired = !1,
        this.outputRenderSurface = null,
        this.globalFrame = {
            x: 0,
            y: 0,
            width: 0,
            height: 0
        },
        this.firstEnabledIndex = -1,
        this.lastEnabledIndex = -1
    }
}
class oI {
    constructor(e) {
        this._filterStackIndex = 0,
        this._filterStack = [],
        this._filterGlobalUniforms = new gn({
            uInputSize: {
                value: new Float32Array(4),
                type: "vec4<f32>"
            },
            uInputPixel: {
                value: new Float32Array(4),
                type: "vec4<f32>"
            },
            uInputClamp: {
                value: new Float32Array(4),
                type: "vec4<f32>"
            },
            uOutputFrame: {
                value: new Float32Array(4),
                type: "vec4<f32>"
            },
            uGlobalFrame: {
                value: new Float32Array(4),
                type: "vec4<f32>"
            },
            uOutputTexture: {
                value: new Float32Array(4),
                type: "vec4<f32>"
            }
        }),
        this._globalFilterBindGroup = new es({}),
        this.renderer = e
    }
    get activeBackTexture() {
        var e;
        return (e = this._activeFilterData) == null ? void 0 : e.backTexture
    }
    push(e) {
        const r = this.renderer
          , n = e.filterEffect.filters
          , i = this._pushFilterData();
        i.skip = !1,
        i.filters = n,
        i.container = e.container,
        i.outputRenderSurface = r.renderTarget.renderSurface;
        const o = r.renderTarget.renderTarget.colorTexture.source
          , s = o.resolution
          , a = o.antialias;
        if (n.every(h => !h.enabled)) {
            i.skip = !0;
            return
        }
        const l = i.bounds;
        if (this._calculateFilterArea(e, l),
        this._calculateFilterBounds(i, r.renderTarget.rootViewPort, a, s, 1),
        i.skip)
            return;
        const c = this._getPreviousFilterData()
          , u = this._findFilterResolution(s);
        let f = 0
          , d = 0;
        c && (f = c.bounds.minX,
        d = c.bounds.minY),
        this._calculateGlobalFrame(i, f, d, u, o.width, o.height),
        this._setupFilterTextures(i, l, r, c)
    }
    generateFilteredTexture({texture: e, filters: r}) {
        const n = this._pushFilterData();
        this._activeFilterData = n,
        n.skip = !1,
        n.filters = r;
        const i = e.source
          , o = i.resolution
          , s = i.antialias;
        if (r.every(h => !h.enabled))
            return n.skip = !0,
            e;
        const a = n.bounds;
        if (a.addRect(e.frame),
        this._calculateFilterBounds(n, a.rectangle, s, o, 0),
        n.skip)
            return e;
        const l = o
          , c = 0
          , u = 0;
        this._calculateGlobalFrame(n, c, u, l, i.width, i.height),
        n.outputRenderSurface = sr.getOptimalTexture(a.width, a.height, n.resolution, n.antialias),
        n.backTexture = Be.EMPTY,
        n.inputTexture = e,
        this.renderer.renderTarget.finishRenderPass(),
        this._applyFiltersToTexture(n, !0);
        const d = n.outputRenderSurface;
        return d.source.alphaMode = "premultiplied-alpha",
        d
    }
    pop() {
        const e = this.renderer
          , r = this._popFilterData();
        r.skip || (e.globalUniforms.pop(),
        e.renderTarget.finishRenderPass(),
        this._activeFilterData = r,
        this._applyFiltersToTexture(r, !1),
        r.blendRequired && sr.returnTexture(r.backTexture),
        sr.returnTexture(r.inputTexture))
    }
    getBackTexture(e, r, n) {
        const i = e.colorTexture.source._resolution
          , o = sr.getOptimalTexture(r.width, r.height, i, !1);
        let s = r.minX
          , a = r.minY;
        n && (s -= n.minX,
        a -= n.minY),
        s = Math.floor(s * i),
        a = Math.floor(a * i);
        const l = Math.ceil(r.width * i)
          , c = Math.ceil(r.height * i);
        return this.renderer.renderTarget.copyToTexture(e, o, {
            x: s,
            y: a
        }, {
            width: l,
            height: c
        }, {
            x: 0,
            y: 0
        }),
        o
    }
    applyFilter(e, r, n, i) {
        const o = this.renderer
          , s = this._activeFilterData
          , l = s.outputRenderSurface === n
          , c = o.renderTarget.rootRenderTarget.colorTexture.source._resolution
          , u = this._findFilterResolution(c);
        let f = 0
          , d = 0;
        if (l) {
            const x = this._findPreviousFilterOffset();
            f = x.x,
            d = x.y
        }
        this._updateFilterUniforms(r, n, s, f, d, u, l, i);
        const h = e.enabled ? e : this._getPassthroughFilter();
        this._setupBindGroupsAndRender(h, r, o)
    }
    calculateSpriteMatrix(e, r) {
        const n = this._activeFilterData
          , i = e.set(n.inputTexture._source.width, 0, 0, n.inputTexture._source.height, n.bounds.minX, n.bounds.minY)
          , o = r.worldTransform.copyTo(Pe.shared)
          , s = r.renderGroup || r.parentRenderGroup;
        return s && s.cacheToLocalTransform && o.prepend(s.cacheToLocalTransform),
        o.invert(),
        i.prepend(o),
        i.scale(1 / r.texture.orig.width, 1 / r.texture.orig.height),
        i.translate(r.anchor.x, r.anchor.y),
        i
    }
    destroy() {
        var e;
        (e = this._passthroughFilter) == null || e.destroy(!0),
        this._passthroughFilter = null
    }
    _getPassthroughFilter() {
        return this._passthroughFilter ?? (this._passthroughFilter = new N0e),
        this._passthroughFilter
    }
    _setupBindGroupsAndRender(e, r, n) {
        if (n.renderPipes.uniformBatch) {
            const i = n.renderPipes.uniformBatch.getUboResource(this._filterGlobalUniforms);
            this._globalFilterBindGroup.setResource(i, 0)
        } else
            this._globalFilterBindGroup.setResource(this._filterGlobalUniforms, 0);
        this._globalFilterBindGroup.setResource(r.source, 1),
        this._globalFilterBindGroup.setResource(r.source.style, 2),
        e.groups[0] = this._globalFilterBindGroup,
        n.encoder.draw({
            geometry: $0e,
            shader: e,
            state: e._state,
            topology: "triangle-list"
        }),
        n.type === qn.WEBGL && n.renderTarget.finishRenderPass()
    }
    _setupFilterTextures(e, r, n, i) {
        if (e.backTexture = Be.EMPTY,
        e.inputTexture = sr.getOptimalTexture(r.width, r.height, e.resolution, e.antialias),
        e.blendRequired) {
            n.renderTarget.finishRenderPass();
            const o = n.renderTarget.getRenderTarget(e.outputRenderSurface);
            e.backTexture = this.getBackTexture(o, r, i == null ? void 0 : i.bounds)
        }
        n.renderTarget.bind(e.inputTexture, !0),
        n.globalUniforms.push({
            offset: r
        })
    }
    _calculateGlobalFrame(e, r, n, i, o, s) {
        const a = e.globalFrame;
        a.x = r * i,
        a.y = n * i,
        a.width = o * i,
        a.height = s * i
    }
    _updateFilterUniforms(e, r, n, i, o, s, a, l) {
        const c = this._filterGlobalUniforms.uniforms
          , u = c.uOutputFrame
          , f = c.uInputSize
          , d = c.uInputPixel
          , h = c.uInputClamp
          , x = c.uGlobalFrame
          , y = c.uOutputTexture;
        a ? (u[0] = n.bounds.minX - i,
        u[1] = n.bounds.minY - o) : (u[0] = 0,
        u[1] = 0),
        u[2] = e.frame.width,
        u[3] = e.frame.height,
        f[0] = e.source.width,
        f[1] = e.source.height,
        f[2] = 1 / f[0],
        f[3] = 1 / f[1],
        d[0] = e.source.pixelWidth,
        d[1] = e.source.pixelHeight,
        d[2] = 1 / d[0],
        d[3] = 1 / d[1],
        h[0] = .5 * d[2],
        h[1] = .5 * d[3],
        h[2] = e.frame.width * f[2] - .5 * d[2],
        h[3] = e.frame.height * f[3] - .5 * d[3];
        const m = this.renderer.renderTarget.rootRenderTarget.colorTexture;
        x[0] = i * s,
        x[1] = o * s,
        x[2] = m.source.width * s,
        x[3] = m.source.height * s,
        r instanceof Be && (r.source.resource = null);
        const E = this.renderer.renderTarget.getRenderTarget(r);
        this.renderer.renderTarget.bind(r, !!l),
        r instanceof Be ? (y[0] = r.frame.width,
        y[1] = r.frame.height) : (y[0] = E.width,
        y[1] = E.height),
        y[2] = E.isRoot ? -1 : 1,
        this._filterGlobalUniforms.update()
    }
    _findFilterResolution(e) {
        let r = this._filterStackIndex - 1;
        for (; r > 0 && this._filterStack[r].skip; )
            --r;
        return r > 0 && this._filterStack[r].inputTexture ? this._filterStack[r].inputTexture.source._resolution : e
    }
    _findPreviousFilterOffset() {
        let e = 0
          , r = 0
          , n = this._filterStackIndex;
        for (; n > 0; ) {
            n--;
            const i = this._filterStack[n];
            if (!i.skip) {
                e = i.bounds.minX,
                r = i.bounds.minY;
                break
            }
        }
        return {
            x: e,
            y: r
        }
    }
    _calculateFilterArea(e, r) {
        if (e.renderables ? L0e(e.renderables, r) : e.filterEffect.filterArea ? (r.clear(),
        r.addRect(e.filterEffect.filterArea),
        r.applyMatrix(e.container.worldTransform)) : e.container.getFastGlobalBounds(!0, r),
        e.container) {
            const i = (e.container.renderGroup || e.container.parentRenderGroup).cacheToLocalTransform;
            i && r.applyMatrix(i)
        }
    }
    _applyFiltersToTexture(e, r) {
        const n = e.inputTexture
          , i = e.bounds
          , o = e.filters
          , s = e.firstEnabledIndex
          , a = e.lastEnabledIndex;
        if (this._globalFilterBindGroup.setResource(n.source.style, 2),
        this._globalFilterBindGroup.setResource(e.backTexture.source, 3),
        s === a)
            o[s].apply(this, n, e.outputRenderSurface, r);
        else {
            let l = e.inputTexture;
            const c = sr.getOptimalTexture(i.width, i.height, l.source._resolution, !1);
            let u = c;
            for (let f = s; f < a; f++) {
                const d = o[f];
                if (!d.enabled)
                    continue;
                d.apply(this, l, u, !0);
                const h = l;
                l = u,
                u = h
            }
            o[a].apply(this, l, e.outputRenderSurface, r),
            sr.returnTexture(c)
        }
    }
    _calculateFilterBounds(e, r, n, i, o) {
        var E;
        const s = this.renderer
          , a = e.bounds
          , l = e.filters;
        let c = 1 / 0
          , u = 0
          , f = !0
          , d = !1
          , h = !1
          , x = !0
          , y = -1
          , m = -1;
        for (let g = 0; g < l.length; g++) {
            const p = l[g];
            if (!p.enabled)
                continue;
            if (y === -1 && (y = g),
            m = g,
            c = Math.min(c, p.resolution === "inherit" ? i : p.resolution),
            u += p.padding,
            p.antialias === "off" ? f = !1 : p.antialias === "inherit" && f && (f = n),
            p.clipToViewport || (x = !1),
            !!!(p.compatibleRenderers & s.type)) {
                h = !1;
                break
            }
            if (p.blendRequired && !(((E = s.backBuffer) == null ? void 0 : E.useBackBuffer) ?? !0)) {
                Ne("Blend filter requires backBuffer on WebGL renderer to be enabled. Set `useBackBuffer: true` in the renderer options."),
                h = !1;
                break
            }
            h = !0,
            d || (d = p.blendRequired)
        }
        if (!h) {
            e.skip = !0;
            return
        }
        if (x && a.fitBounds(0, r.width / i, 0, r.height / i),
        a.scale(c).ceil().scale(1 / c).pad((u | 0) * o),
        !a.isPositive) {
            e.skip = !0;
            return
        }
        e.antialias = f,
        e.resolution = c,
        e.blendRequired = d,
        e.firstEnabledIndex = y,
        e.lastEnabledIndex = m
    }
    _popFilterData() {
        return this._filterStackIndex--,
        this._filterStack[this._filterStackIndex]
    }
    _getPreviousFilterData() {
        let e, r = this._filterStackIndex - 1;
        for (; r > 0 && (r--,
        e = this._filterStack[r],
        !!e.skip); )
            ;
        return e
    }
    _pushFilterData() {
        let e = this._filterStack[this._filterStackIndex];
        return e || (e = this._filterStack[this._filterStackIndex] = new U0e),
        this._filterStackIndex++,
        e
    }
}
oI.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem],
    name: "filter"
};
var G0e = `in vec2 vMaskCoord;
in vec2 vTextureCoord;

uniform sampler2D uTexture;
uniform sampler2D uMaskTexture;

uniform float uAlpha;
uniform vec4 uMaskClamp;
uniform float uInverse;

out vec4 finalColor;

void main(void)
{
    float clip = step(3.5,
        step(uMaskClamp.x, vMaskCoord.x) +
        step(uMaskClamp.y, vMaskCoord.y) +
        step(vMaskCoord.x, uMaskClamp.z) +
        step(vMaskCoord.y, uMaskClamp.w));

    // TODO look into why this is needed
    float npmAlpha = uAlpha;
    vec4 original = texture(uTexture, vTextureCoord);
    vec4 masky = texture(uMaskTexture, vMaskCoord);
    float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);

    float a = alphaMul * masky.r * npmAlpha * clip;

    if (uInverse == 1.0) {
        a = 1.0 - a;
    }

    finalColor = original * a;
}
`
  , H0e = `in vec2 aPosition;

out vec2 vTextureCoord;
out vec2 vMaskCoord;


uniform vec4 uInputSize;
uniform vec4 uOutputFrame;
uniform vec4 uOutputTexture;
uniform mat3 uFilterMatrix;

vec4 filterVertexPosition(  vec2 aPosition )
{
    vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;
       
    position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;
    position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;

    return vec4(position, 0.0, 1.0);
}

vec2 filterTextureCoord(  vec2 aPosition )
{
    return aPosition * (uOutputFrame.zw * uInputSize.zw);
}

vec2 getFilterCoord( vec2 aPosition )
{
    return  ( uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0)  ).xy;
}   

void main(void)
{
    gl_Position = filterVertexPosition(aPosition);
    vTextureCoord = filterTextureCoord(aPosition);
    vMaskCoord = getFilterCoord(aPosition);
}
`
  , x3 = `struct GlobalFilterUniforms {
  uInputSize:vec4<f32>,
  uInputPixel:vec4<f32>,
  uInputClamp:vec4<f32>,
  uOutputFrame:vec4<f32>,
  uGlobalFrame:vec4<f32>,
  uOutputTexture:vec4<f32>,
};

struct MaskUniforms {
  uFilterMatrix:mat3x3<f32>,
  uMaskClamp:vec4<f32>,
  uAlpha:f32,
  uInverse:f32,
};

@group(0) @binding(0) var<uniform> gfu: GlobalFilterUniforms;
@group(0) @binding(1) var uTexture: texture_2d<f32>;
@group(0) @binding(2) var uSampler : sampler;

@group(1) @binding(0) var<uniform> filterUniforms : MaskUniforms;
@group(1) @binding(1) var uMaskTexture: texture_2d<f32>;

struct VSOutput {
    @builtin(position) position: vec4<f32>,
    @location(0) uv : vec2<f32>,
    @location(1) filterUv : vec2<f32>,
};

fn filterVertexPosition(aPosition:vec2<f32>) -> vec4<f32>
{
    var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;

    position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;
    position.y = position.y * (2.0*gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;

    return vec4(position, 0.0, 1.0);
}

fn filterTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>
{
    return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);
}

fn globalTextureCoord( aPosition:vec2<f32> ) -> vec2<f32>
{
  return  (aPosition.xy / gfu.uGlobalFrame.zw) + (gfu.uGlobalFrame.xy / gfu.uGlobalFrame.zw);
}

fn getFilterCoord(aPosition:vec2<f32> ) -> vec2<f32>
{
  return ( filterUniforms.uFilterMatrix * vec3( filterTextureCoord(aPosition), 1.0)  ).xy;
}

fn getSize() -> vec2<f32>
{
  return gfu.uGlobalFrame.zw;
}

@vertex
fn mainVertex(
  @location(0) aPosition : vec2<f32>,
) -> VSOutput {
  return VSOutput(
   filterVertexPosition(aPosition),
   filterTextureCoord(aPosition),
   getFilterCoord(aPosition)
  );
}

@fragment
fn mainFragment(
  @location(0) uv: vec2<f32>,
  @location(1) filterUv: vec2<f32>,
  @builtin(position) position: vec4<f32>
) -> @location(0) vec4<f32> {

    var maskClamp = filterUniforms.uMaskClamp;
    var uAlpha = filterUniforms.uAlpha;

    var clip = step(3.5,
      step(maskClamp.x, filterUv.x) +
      step(maskClamp.y, filterUv.y) +
      step(filterUv.x, maskClamp.z) +
      step(filterUv.y, maskClamp.w));

    var mask = textureSample(uMaskTexture, uSampler, filterUv);
    var source = textureSample(uTexture, uSampler, uv);
    var alphaMul = 1.0 - uAlpha * (1.0 - mask.a);

    var a: f32 = alphaMul * mask.r * uAlpha * clip;

    if (filterUniforms.uInverse == 1.0) {
        a = 1.0 - a;
    }

    return source * a;
}
`;
class V0e extends l1 {
    constructor(e) {
        const {sprite: r, ...n} = e
          , i = new kF(r.texture)
          , o = new gn({
            uFilterMatrix: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uMaskClamp: {
                value: i.uClampFrame,
                type: "vec4<f32>"
            },
            uAlpha: {
                value: 1,
                type: "f32"
            },
            uInverse: {
                value: e.inverse ? 1 : 0,
                type: "f32"
            }
        })
          , s = Es.from({
            vertex: {
                source: x3,
                entryPoint: "mainVertex"
            },
            fragment: {
                source: x3,
                entryPoint: "mainFragment"
            }
        })
          , a = ya.from({
            vertex: H0e,
            fragment: G0e,
            name: "mask-filter"
        });
        super({
            ...n,
            gpuProgram: s,
            glProgram: a,
            clipToViewport: !1,
            resources: {
                filterUniforms: o,
                uMaskTexture: r.texture.source
            }
        }),
        this.sprite = r,
        this._textureMatrix = i
    }
    set inverse(e) {
        this.resources.filterUniforms.uniforms.uInverse = e ? 1 : 0
    }
    get inverse() {
        return this.resources.filterUniforms.uniforms.uInverse === 1
    }
    apply(e, r, n, i) {
        this._textureMatrix.texture = this.sprite.texture,
        e.calculateSpriteMatrix(this.resources.filterUniforms.uniforms.uFilterMatrix, this.sprite).prepend(this._textureMatrix.mapCoord),
        this.resources.uMaskTexture = this.sprite.texture.source,
        e.applyFilter(this, r, n, i)
    }
}
class Ux extends rd {
    constructor(e) {
        e instanceof ui && (e = {
            context: e
        });
        const {context: r, roundPixels: n, ...i} = e || {};
        super({
            label: "Graphics",
            ...i
        }),
        this.renderPipeId = "graphics",
        r ? this._context = r : this._context = this._ownedContext = new ui,
        this._context.on("update", this.onViewUpdate, this),
        this.didViewUpdate = !0,
        this.allowChildren = !1,
        this.roundPixels = n ?? !1
    }
    set context(e) {
        e !== this._context && (this._context.off("update", this.onViewUpdate, this),
        this._context = e,
        this._context.on("update", this.onViewUpdate, this),
        this.onViewUpdate())
    }
    get context() {
        return this._context
    }
    get bounds() {
        return this._context.bounds
    }
    updateBounds() {}
    containsPoint(e) {
        return this._context.containsPoint(e)
    }
    destroy(e) {
        this._ownedContext && !e ? this._ownedContext.destroy(e) : (e === !0 || (e == null ? void 0 : e.context) === !0) && this._context.destroy(e),
        this._ownedContext = null,
        this._context = null,
        super.destroy(e)
    }
    _callContextMethod(e, r) {
        return this.context[e](...r),
        this
    }
    setFillStyle(...e) {
        return this._callContextMethod("setFillStyle", e)
    }
    setStrokeStyle(...e) {
        return this._callContextMethod("setStrokeStyle", e)
    }
    fill(...e) {
        return this._callContextMethod("fill", e)
    }
    stroke(...e) {
        return this._callContextMethod("stroke", e)
    }
    texture(...e) {
        return this._callContextMethod("texture", e)
    }
    beginPath() {
        return this._callContextMethod("beginPath", [])
    }
    cut() {
        return this._callContextMethod("cut", [])
    }
    arc(...e) {
        return this._callContextMethod("arc", e)
    }
    arcTo(...e) {
        return this._callContextMethod("arcTo", e)
    }
    arcToSvg(...e) {
        return this._callContextMethod("arcToSvg", e)
    }
    bezierCurveTo(...e) {
        return this._callContextMethod("bezierCurveTo", e)
    }
    closePath() {
        return this._callContextMethod("closePath", [])
    }
    ellipse(...e) {
        return this._callContextMethod("ellipse", e)
    }
    circle(...e) {
        return this._callContextMethod("circle", e)
    }
    path(...e) {
        return this._callContextMethod("path", e)
    }
    lineTo(...e) {
        return this._callContextMethod("lineTo", e)
    }
    moveTo(...e) {
        return this._callContextMethod("moveTo", e)
    }
    quadraticCurveTo(...e) {
        return this._callContextMethod("quadraticCurveTo", e)
    }
    rect(...e) {
        return this._callContextMethod("rect", e)
    }
    roundRect(...e) {
        return this._callContextMethod("roundRect", e)
    }
    poly(...e) {
        return this._callContextMethod("poly", e)
    }
    regularPoly(...e) {
        return this._callContextMethod("regularPoly", e)
    }
    roundPoly(...e) {
        return this._callContextMethod("roundPoly", e)
    }
    roundShape(...e) {
        return this._callContextMethod("roundShape", e)
    }
    filletRect(...e) {
        return this._callContextMethod("filletRect", e)
    }
    chamferRect(...e) {
        return this._callContextMethod("chamferRect", e)
    }
    star(...e) {
        return this._callContextMethod("star", e)
    }
    svg(...e) {
        return this._callContextMethod("svg", e)
    }
    restore(...e) {
        return this._callContextMethod("restore", e)
    }
    save() {
        return this._callContextMethod("save", [])
    }
    getTransform() {
        return this.context.getTransform()
    }
    resetTransform() {
        return this._callContextMethod("resetTransform", [])
    }
    rotateTransform(...e) {
        return this._callContextMethod("rotate", e)
    }
    scaleTransform(...e) {
        return this._callContextMethod("scale", e)
    }
    setTransform(...e) {
        return this._callContextMethod("setTransform", e)
    }
    transform(...e) {
        return this._callContextMethod("transform", e)
    }
    translateTransform(...e) {
        return this._callContextMethod("translate", e)
    }
    clear() {
        return this._callContextMethod("clear", [])
    }
    get fillStyle() {
        return this._context.fillStyle
    }
    set fillStyle(e) {
        this._context.fillStyle = e
    }
    get strokeStyle() {
        return this._context.strokeStyle
    }
    set strokeStyle(e) {
        this._context.strokeStyle = e
    }
    clone(e=!1) {
        return e ? new Ux(this._context.clone()) : (this._ownedContext = null,
        new Ux(this._context))
    }
    lineStyle(e, r, n) {
        Re(tt, "Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.");
        const i = {};
        return e && (i.width = e),
        r && (i.color = r),
        n && (i.alpha = n),
        this.context.strokeStyle = i,
        this
    }
    beginFill(e, r) {
        Re(tt, "Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");
        const n = {};
        return e !== void 0 && (n.color = e),
        r !== void 0 && (n.alpha = r),
        this.context.fillStyle = n,
        this
    }
    endFill() {
        Re(tt, "Graphics#endFill is no longer needed. Use Graphics#fill to fill the shape with the desired style."),
        this.context.fill();
        const e = this.context.strokeStyle;
        return (e.width !== ui.defaultStrokeStyle.width || e.color !== ui.defaultStrokeStyle.color || e.alpha !== ui.defaultStrokeStyle.alpha) && this.context.stroke(),
        this
    }
    drawCircle(...e) {
        return Re(tt, "Graphics#drawCircle has been renamed to Graphics#circle"),
        this._callContextMethod("circle", e)
    }
    drawEllipse(...e) {
        return Re(tt, "Graphics#drawEllipse has been renamed to Graphics#ellipse"),
        this._callContextMethod("ellipse", e)
    }
    drawPolygon(...e) {
        return Re(tt, "Graphics#drawPolygon has been renamed to Graphics#poly"),
        this._callContextMethod("poly", e)
    }
    drawRect(...e) {
        return Re(tt, "Graphics#drawRect has been renamed to Graphics#rect"),
        this._callContextMethod("rect", e)
    }
    drawRoundedRect(...e) {
        return Re(tt, "Graphics#drawRoundedRect has been renamed to Graphics#roundRect"),
        this._callContextMethod("roundRect", e)
    }
    drawStar(...e) {
        return Re(tt, "Graphics#drawStar has been renamed to Graphics#star"),
        this._callContextMethod("star", e)
    }
}
const sI = class aI extends id {
    constructor(...e) {
        let r = e[0] ?? {};
        r instanceof Float32Array && (Re(tt, "use new MeshGeometry({ positions, uvs, indices }) instead"),
        r = {
            positions: r,
            uvs: e[1],
            indices: e[2]
        }),
        r = {
            ...aI.defaultOptions,
            ...r
        };
        const n = r.positions || new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]);
        let i = r.uvs;
        i || (r.positions ? i = new Float32Array(n.length) : i = new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]));
        const o = r.indices || new Uint32Array([0, 1, 2, 0, 2, 3])
          , s = r.shrinkBuffersToFit
          , a = new Wn({
            data: n,
            label: "attribute-mesh-positions",
            shrinkToFit: s,
            usage: it.VERTEX | it.COPY_DST
        })
          , l = new Wn({
            data: i,
            label: "attribute-mesh-uvs",
            shrinkToFit: s,
            usage: it.VERTEX | it.COPY_DST
        })
          , c = new Wn({
            data: o,
            label: "index-mesh-buffer",
            shrinkToFit: s,
            usage: it.INDEX | it.COPY_DST
        });
        super({
            attributes: {
                aPosition: {
                    buffer: a,
                    format: "float32x2",
                    stride: 2 * 4,
                    offset: 0
                },
                aUV: {
                    buffer: l,
                    format: "float32x2",
                    stride: 2 * 4,
                    offset: 0
                }
            },
            indexBuffer: c,
            topology: r.topology
        }),
        this.batchMode = "auto"
    }
    get positions() {
        return this.attributes.aPosition.buffer.data
    }
    set positions(e) {
        this.attributes.aPosition.buffer.data = e
    }
    get uvs() {
        return this.attributes.aUV.buffer.data
    }
    set uvs(e) {
        this.attributes.aUV.buffer.data = e
    }
    get indices() {
        return this.indexBuffer.data
    }
    set indices(e) {
        this.indexBuffer.data = e
    }
}
;
sI.defaultOptions = {
    topology: "triangle-list",
    shrinkBuffersToFit: !1
};
let Bb = sI;
class z0e {
    constructor({matrix: e, observer: r}={}) {
        this.dirty = !0,
        this._matrix = e ?? new Pe,
        this.observer = r,
        this.position = new Jt(this,0,0),
        this.scale = new Jt(this,1,1),
        this.pivot = new Jt(this,0,0),
        this.skew = new Jt(this,0,0),
        this._rotation = 0,
        this._cx = 1,
        this._sx = 0,
        this._cy = 0,
        this._sy = 1
    }
    get matrix() {
        const e = this._matrix;
        return this.dirty && (e.a = this._cx * this.scale.x,
        e.b = this._sx * this.scale.x,
        e.c = this._cy * this.scale.y,
        e.d = this._sy * this.scale.y,
        e.tx = this.position.x - (this.pivot.x * e.a + this.pivot.y * e.c),
        e.ty = this.position.y - (this.pivot.x * e.b + this.pivot.y * e.d),
        this.dirty = !1),
        e
    }
    _onUpdate(e) {
        var r;
        this.dirty = !0,
        e === this.skew && this.updateSkew(),
        (r = this.observer) == null || r._onUpdate(this)
    }
    updateSkew() {
        this._cx = Math.cos(this._rotation + this.skew.y),
        this._sx = Math.sin(this._rotation + this.skew.y),
        this._cy = -Math.sin(this._rotation - this.skew.x),
        this._sy = Math.cos(this._rotation - this.skew.x),
        this.dirty = !0
    }
    toString() {
        return `[pixi.js/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`
    }
    setFromMatrix(e) {
        e.decompose(this),
        this.dirty = !0
    }
    get rotation() {
        return this._rotation
    }
    set rotation(e) {
        this._rotation !== e && (this._rotation = e,
        this._onUpdate(this.skew))
    }
}
const lI = class Yh extends rd {
    constructor(...e) {
        let r = e[0] || {};
        r instanceof Be && (r = {
            texture: r
        }),
        e.length > 1 && (Re(tt, "use new TilingSprite({ texture, width:100, height:100 }) instead"),
        r.width = e[1],
        r.height = e[2]),
        r = {
            ...Yh.defaultOptions,
            ...r
        };
        const {texture: n, anchor: i, tilePosition: o, tileScale: s, tileRotation: a, width: l, height: c, applyAnchorToTexture: u, roundPixels: f, ...d} = r ?? {};
        super({
            label: "TilingSprite",
            ...d
        }),
        this.renderPipeId = "tilingSprite",
        this.batched = !0,
        this.allowChildren = !1,
        this._anchor = new Jt({
            _onUpdate: () => {
                this.onViewUpdate()
            }
        }),
        this.applyAnchorToTexture = u,
        this.texture = n,
        this._width = l ?? n.width,
        this._height = c ?? n.height,
        this._tileTransform = new z0e({
            observer: {
                _onUpdate: () => this.onViewUpdate()
            }
        }),
        i && (this.anchor = i),
        this.tilePosition = o,
        this.tileScale = s,
        this.tileRotation = a,
        this.roundPixels = f ?? !1
    }
    static from(e, r={}) {
        return typeof e == "string" ? new Yh({
            texture: Et.get(e),
            ...r
        }) : new Yh({
            texture: e,
            ...r
        })
    }
    get uvRespectAnchor() {
        return Re(tt, "uvRespectAnchor is deprecated, please use applyAnchorToTexture instead"),
        this.applyAnchorToTexture
    }
    set uvRespectAnchor(e) {
        Re(tt, "uvRespectAnchor is deprecated, please use applyAnchorToTexture instead"),
        this.applyAnchorToTexture = e
    }
    get clampMargin() {
        return this._texture.textureMatrix.clampMargin
    }
    set clampMargin(e) {
        this._texture.textureMatrix.clampMargin = e
    }
    get anchor() {
        return this._anchor
    }
    set anchor(e) {
        typeof e == "number" ? this._anchor.set(e) : this._anchor.copyFrom(e)
    }
    get tilePosition() {
        return this._tileTransform.position
    }
    set tilePosition(e) {
        this._tileTransform.position.copyFrom(e)
    }
    get tileScale() {
        return this._tileTransform.scale
    }
    set tileScale(e) {
        typeof e == "number" ? this._tileTransform.scale.set(e) : this._tileTransform.scale.copyFrom(e)
    }
    set tileRotation(e) {
        this._tileTransform.rotation = e
    }
    get tileRotation() {
        return this._tileTransform.rotation
    }
    get tileTransform() {
        return this._tileTransform
    }
    set texture(e) {
        e || (e = Be.EMPTY);
        const r = this._texture;
        r !== e && (r && r.dynamic && r.off("update", this.onViewUpdate, this),
        e.dynamic && e.on("update", this.onViewUpdate, this),
        this._texture = e,
        this.onViewUpdate())
    }
    get texture() {
        return this._texture
    }
    set width(e) {
        this._width = e,
        this.onViewUpdate()
    }
    get width() {
        return this._width
    }
    set height(e) {
        this._height = e,
        this.onViewUpdate()
    }
    get height() {
        return this._height
    }
    setSize(e, r) {
        typeof e == "object" && (r = e.height ?? e.width,
        e = e.width),
        this._width = e,
        this._height = r ?? e,
        this.onViewUpdate()
    }
    getSize(e) {
        return e || (e = {}),
        e.width = this._width,
        e.height = this._height,
        e
    }
    updateBounds() {
        const e = this._bounds
          , r = this._anchor
          , n = this._width
          , i = this._height;
        e.minX = -r._x * n,
        e.maxX = e.minX + n,
        e.minY = -r._y * i,
        e.maxY = e.minY + i
    }
    containsPoint(e) {
        const r = this._width
          , n = this._height
          , i = -r * this._anchor._x;
        let o = 0;
        return e.x >= i && e.x <= i + r && (o = -n * this._anchor._y,
        e.y >= o && e.y <= o + n)
    }
    destroy(e=!1) {
        if (super.destroy(e),
        this._anchor = null,
        this._tileTransform = null,
        this._bounds = null,
        typeof e == "boolean" ? e : e == null ? void 0 : e.texture) {
            const n = typeof e == "boolean" ? e : e == null ? void 0 : e.textureSource;
            this._texture.destroy(n)
        }
        this._texture = null
    }
}
;
lI.defaultOptions = {
    texture: Be.EMPTY,
    anchor: {
        x: 0,
        y: 0
    },
    tilePosition: {
        x: 0,
        y: 0
    },
    tileScale: {
        x: 1,
        y: 1
    },
    tileRotation: 0,
    applyAnchorToTexture: !1
};
let g6e = lI;
class j0e extends rd {
    constructor(e, r) {
        const {text: n, resolution: i, style: o, anchor: s, width: a, height: l, roundPixels: c, ...u} = e;
        super({
            ...u
        }),
        this.batched = !0,
        this._resolution = null,
        this._autoResolution = !0,
        this._didTextUpdate = !0,
        this._styleClass = r,
        this.text = n ?? "",
        this.style = o,
        this.resolution = i ?? null,
        this.allowChildren = !1,
        this._anchor = new Jt({
            _onUpdate: () => {
                this.onViewUpdate()
            }
        }),
        s && (this.anchor = s),
        this.roundPixels = c ?? !1,
        a !== void 0 && (this.width = a),
        l !== void 0 && (this.height = l)
    }
    get anchor() {
        return this._anchor
    }
    set anchor(e) {
        typeof e == "number" ? this._anchor.set(e) : this._anchor.copyFrom(e)
    }
    set text(e) {
        e = e.toString(),
        this._text !== e && (this._text = e,
        this.onViewUpdate())
    }
    get text() {
        return this._text
    }
    set resolution(e) {
        this._autoResolution = e === null,
        this._resolution = e,
        this.onViewUpdate()
    }
    get resolution() {
        return this._resolution
    }
    get style() {
        return this._style
    }
    set style(e) {
        var r;
        e || (e = {}),
        (r = this._style) == null || r.off("update", this.onViewUpdate, this),
        e instanceof this._styleClass ? this._style = e : this._style = new this._styleClass(e),
        this._style.on("update", this.onViewUpdate, this),
        this.onViewUpdate()
    }
    get width() {
        return Math.abs(this.scale.x) * this.bounds.width
    }
    set width(e) {
        this._setWidth(e, this.bounds.width)
    }
    get height() {
        return Math.abs(this.scale.y) * this.bounds.height
    }
    set height(e) {
        this._setHeight(e, this.bounds.height)
    }
    getSize(e) {
        return e || (e = {}),
        e.width = Math.abs(this.scale.x) * this.bounds.width,
        e.height = Math.abs(this.scale.y) * this.bounds.height,
        e
    }
    setSize(e, r) {
        typeof e == "object" ? (r = e.height ?? e.width,
        e = e.width) : r ?? (r = e),
        e !== void 0 && this._setWidth(e, this.bounds.width),
        r !== void 0 && this._setHeight(r, this.bounds.height)
    }
    containsPoint(e) {
        const r = this.bounds.width
          , n = this.bounds.height
          , i = -r * this.anchor.x;
        let o = 0;
        return e.x >= i && e.x <= i + r && (o = -n * this.anchor.y,
        e.y >= o && e.y <= o + n)
    }
    onViewUpdate() {
        this.didViewUpdate || (this._didTextUpdate = !0),
        super.onViewUpdate()
    }
    destroy(e=!1) {
        super.destroy(e),
        this.owner = null,
        this._bounds = null,
        this._anchor = null,
        (typeof e == "boolean" ? e : e != null && e.style) && this._style.destroy(e),
        this._style = null,
        this._text = null
    }
    get styleKey() {
        return `${this._text}:${this._style.styleKey}:${this._resolution}`
    }
}
function W0e(t, e) {
    let r = t[0] ?? {};
    return (typeof r == "string" || t[1]) && (Re(tt, `use new ${e}({ text: "hi!", style }) instead`),
    r = {
        text: r,
        style: t[1]
    }),
    r
}
let Da = null
  , jo = null;
function Y0e(t, e) {
    Da || (Da = je.get().createCanvas(256, 128),
    jo = Da.getContext("2d", {
        willReadFrequently: !0
    }),
    jo.globalCompositeOperation = "copy",
    jo.globalAlpha = 1),
    (Da.width < t || Da.height < e) && (Da.width = eu(t),
    Da.height = eu(e))
}
function p3(t, e, r) {
    for (let n = 0, i = 4 * r * e; n < e; ++n,
    i += 4)
        if (t[i + 3] !== 0)
            return !1;
    return !0
}
function g3(t, e, r, n, i) {
    const o = 4 * e;
    for (let s = n, a = n * o + 4 * r; s <= i; ++s,
    a += o)
        if (t[a + 3] !== 0)
            return !1;
    return !0
}
function X0e(...t) {
    let e = t[0];
    e.canvas || (e = {
        canvas: t[0],
        resolution: t[1]
    });
    const {canvas: r} = e
      , n = Math.min(e.resolution ?? 1, 1)
      , i = e.width ?? r.width
      , o = e.height ?? r.height;
    let s = e.output;
    if (Y0e(i, o),
    !jo)
        throw new TypeError("Failed to get canvas 2D context");
    jo.drawImage(r, 0, 0, i, o, 0, 0, i * n, o * n);
    const l = jo.getImageData(0, 0, i, o).data;
    let c = 0
      , u = 0
      , f = i - 1
      , d = o - 1;
    for (; u < o && p3(l, i, u); )
        ++u;
    if (u === o)
        return mt.EMPTY;
    for (; p3(l, i, d); )
        --d;
    for (; g3(l, i, c, u, d); )
        ++c;
    for (; g3(l, i, f, u, d); )
        --f;
    return ++f,
    ++d,
    jo.globalCompositeOperation = "source-over",
    jo.strokeRect(c, u, f - c, d - u),
    jo.globalCompositeOperation = "copy",
    s ?? (s = new mt),
    s.set(c / n, u / n, (f - c) / n, (d - u) / n),
    s
}
const m3 = new mt;
class K0e {
    getCanvasAndContext(e) {
        const {text: r, style: n, resolution: i=1} = e
          , o = n._getFinalPadding()
          , s = Fi.measureText(r || " ", n)
          , a = Math.ceil(Math.ceil(Math.max(1, s.width) + o * 2) * i)
          , l = Math.ceil(Math.ceil(Math.max(1, s.height) + o * 2) * i)
          , c = hs.getOptimalCanvasAndContext(a, l);
        this._renderTextToCanvas(r, n, o, i, c);
        const u = n.trim ? X0e({
            canvas: c.canvas,
            width: a,
            height: l,
            resolution: 1,
            output: m3
        }) : m3.set(0, 0, a, l);
        return {
            canvasAndContext: c,
            frame: u
        }
    }
    returnCanvasAndContext(e) {
        hs.returnCanvasAndContext(e)
    }
    _renderTextToCanvas(e, r, n, i, o) {
        var p, v, _, b;
        const {canvas: s, context: a} = o
          , l = Rx(r)
          , c = Fi.measureText(e || " ", r)
          , u = c.lines
          , f = c.lineHeight
          , d = c.lineWidths
          , h = c.maxLineWidth
          , x = c.fontProperties
          , y = s.height;
        if (a.resetTransform(),
        a.scale(i, i),
        a.textBaseline = r.textBaseline,
        (p = r._stroke) != null && p.width) {
            const C = r._stroke;
            a.lineWidth = C.width,
            a.miterLimit = C.miterLimit,
            a.lineJoin = C.join,
            a.lineCap = C.cap
        }
        a.font = l;
        let m, E;
        const g = r.dropShadow ? 2 : 1;
        for (let C = 0; C < g; ++C) {
            const B = r.dropShadow && C === 0
              , T = B ? Math.ceil(Math.max(1, y) + n * 2) : 0
              , A = T * i;
            if (B) {
                a.fillStyle = "black",
                a.strokeStyle = "black";
                const D = r.dropShadow
                  , F = D.color
                  , R = D.alpha;
                a.shadowColor = Ut.shared.setValue(F).setAlpha(R).toRgbaString();
                const P = D.blur * i
                  , N = D.distance * i;
                a.shadowBlur = P,
                a.shadowOffsetX = Math.cos(D.angle) * N,
                a.shadowOffsetY = Math.sin(D.angle) * N + A
            } else {
                if (a.fillStyle = r._fill ? Lx(r._fill, a, c, n * 2) : null,
                (v = r._stroke) != null && v.width) {
                    const D = r._stroke.width * .5 + n * 2;
                    a.strokeStyle = Lx(r._stroke, a, c, D)
                }
                a.shadowColor = "black"
            }
            let w = (f - x.fontSize) / 2;
            f - x.fontSize < 0 && (w = 0);
            const S = ((_ = r._stroke) == null ? void 0 : _.width) ?? 0;
            for (let D = 0; D < u.length; D++)
                m = S / 2,
                E = S / 2 + D * f + x.ascent + w,
                r.align === "right" ? m += h - d[D] : r.align === "center" && (m += (h - d[D]) / 2),
                (b = r._stroke) != null && b.width && this._drawLetterSpacing(u[D], r, o, m + n, E + n - T, !0),
                r._fill !== void 0 && this._drawLetterSpacing(u[D], r, o, m + n, E + n - T)
        }
    }
    _drawLetterSpacing(e, r, n, i, o, s=!1) {
        const {context: a} = n
          , l = r.letterSpacing;
        let c = !1;
        if (Fi.experimentalLetterSpacingSupported && (Fi.experimentalLetterSpacing ? (a.letterSpacing = `${l}px`,
        a.textLetterSpacing = `${l}px`,
        c = !0) : (a.letterSpacing = "0px",
        a.textLetterSpacing = "0px")),
        l === 0 || c) {
            s ? a.strokeText(e, i, o) : a.fillText(e, i, o);
            return
        }
        let u = i;
        const f = Fi.graphemeSegmenter(e);
        let d = a.measureText(e).width
          , h = 0;
        for (let x = 0; x < f.length; ++x) {
            const y = f[x];
            s ? a.strokeText(y, u, o) : a.fillText(y, u, o);
            let m = "";
            for (let E = x + 1; E < f.length; ++E)
                m += f[E];
            h = a.measureText(m).width,
            u += d - h + l,
            d = h
        }
    }
}
const $0 = new K0e;
class m6e extends j0e {
    constructor(...e) {
        const r = W0e(e, "Text");
        super(r, wl),
        this.renderPipeId = "text",
        r.textureStyle && (this.textureStyle = r.textureStyle instanceof bo ? r.textureStyle : new bo(r.textureStyle))
    }
    updateBounds() {
        const e = this._bounds
          , r = this._anchor;
        let n = 0
          , i = 0;
        if (this._style.trim) {
            const {frame: o, canvasAndContext: s} = $0.getCanvasAndContext({
                text: this.text,
                style: this._style,
                resolution: 1
            });
            $0.returnCanvasAndContext(s),
            n = o.width,
            i = o.height
        } else {
            const o = Fi.measureText(this._text, this._style);
            n = o.width,
            i = o.height
        }
        e.minX = -r._x * n,
        e.maxX = e.minX + n,
        e.minY = -r._y * i,
        e.maxY = e.minY + i
    }
}
const v3 = "http://www.w3.org/2000/svg"
  , y3 = "http://www.w3.org/1999/xhtml";
class cI {
    constructor() {
        this.svgRoot = document.createElementNS(v3, "svg"),
        this.foreignObject = document.createElementNS(v3, "foreignObject"),
        this.domElement = document.createElementNS(y3, "div"),
        this.styleElement = document.createElementNS(y3, "style");
        const {foreignObject: e, svgRoot: r, styleElement: n, domElement: i} = this;
        e.setAttribute("width", "10000"),
        e.setAttribute("height", "10000"),
        e.style.overflow = "hidden",
        r.appendChild(e),
        e.appendChild(n),
        e.appendChild(i),
        this.image = je.get().createImage()
    }
    destroy() {
        this.svgRoot.remove(),
        this.foreignObject.remove(),
        this.styleElement.remove(),
        this.domElement.remove(),
        this.image.src = "",
        this.image.remove(),
        this.svgRoot = null,
        this.foreignObject = null,
        this.styleElement = null,
        this.domElement = null,
        this.image = null,
        this.canvasAndContext = null
    }
}
let E3;
function q0e(t, e, r, n) {
    n || (n = E3 || (E3 = new cI));
    const {domElement: i, styleElement: o, svgRoot: s} = n;
    i.innerHTML = `<style>${e.cssStyle};</style><div style='padding:0'>${t}</div>`,
    i.setAttribute("style", "transform-origin: top left; display: inline-block"),
    r && (o.textContent = r),
    document.body.appendChild(s);
    const a = i.getBoundingClientRect();
    s.remove();
    const l = e.padding * 2;
    return {
        width: a.width - l,
        height: a.height - l
    }
}
class uI {
    constructor() {
        this._tempState = Ui.for2d(),
        this._didUploadHash = {}
    }
    init(e) {
        e.renderer.runners.contextChange.add(this)
    }
    contextChange() {
        this._didUploadHash = {}
    }
    start(e, r, n) {
        const i = e.renderer
          , o = this._didUploadHash[n.uid];
        i.shader.bind(n, o),
        o || (this._didUploadHash[n.uid] = !0),
        i.shader.updateUniformGroup(i.globalUniforms.uniformGroup),
        i.geometry.bind(r, n.glProgram)
    }
    execute(e, r) {
        const n = e.renderer;
        this._tempState.blendMode = r.blendMode,
        n.state.set(this._tempState);
        const i = r.textures.textures;
        for (let o = 0; o < r.textures.count; o++)
            n.texture.bind(i[o], o);
        n.geometry.draw(r.topology, r.size, r.start)
    }
}
uI.extension = {
    type: [X.WebGLPipesAdaptor],
    name: "batch"
};
const vh = Ui.for2d();
class fI {
    start(e, r, n) {
        const i = e.renderer
          , o = i.encoder
          , s = n.gpuProgram;
        this._shader = n,
        this._geometry = r,
        o.setGeometry(r, s),
        vh.blendMode = "normal",
        i.pipeline.getPipeline(r, s, vh);
        const a = i.globalUniforms.bindGroup;
        o.resetBindGroup(1),
        o.setBindGroup(0, a, s)
    }
    execute(e, r) {
        const n = this._shader.gpuProgram
          , i = e.renderer
          , o = i.encoder;
        if (!r.bindGroup) {
            const l = r.textures;
            r.bindGroup = fb(l.textures, l.count, i.limits.maxBatchableTextures)
        }
        vh.blendMode = r.blendMode;
        const s = i.bindGroup.getBindGroup(r.bindGroup, n, 1)
          , a = i.pipeline.getPipeline(this._geometry, n, vh, r.topology);
        r.bindGroup._touch(i.textureGC.count),
        o.setPipeline(a),
        o.renderPassEncoder.setBindGroup(1, s),
        o.renderPassEncoder.drawIndexed(r.size, 1, r.start)
    }
}
fI.extension = {
    type: [X.WebGPUPipesAdaptor],
    name: "batch"
};
const Sb = class dI {
    constructor(e, r) {
        var n, i;
        this.state = Ui.for2d(),
        this._batchersByInstructionSet = Object.create(null),
        this._activeBatches = Object.create(null),
        this.renderer = e,
        this._adaptor = r,
        (i = (n = this._adaptor).init) == null || i.call(n, this)
    }
    static getBatcher(e) {
        return new this._availableBatchers[e]
    }
    buildStart(e) {
        let r = this._batchersByInstructionSet[e.uid];
        r || (r = this._batchersByInstructionSet[e.uid] = Object.create(null),
        r.default || (r.default = new mb({
            maxTextures: this.renderer.limits.maxBatchableTextures
        }))),
        this._activeBatches = r,
        this._activeBatch = this._activeBatches.default;
        for (const n in this._activeBatches)
            this._activeBatches[n].begin()
    }
    addToBatch(e, r) {
        if (this._activeBatch.name !== e.batcherName) {
            this._activeBatch.break(r);
            let n = this._activeBatches[e.batcherName];
            n || (n = this._activeBatches[e.batcherName] = dI.getBatcher(e.batcherName),
            n.begin()),
            this._activeBatch = n
        }
        this._activeBatch.add(e)
    }
    break(e) {
        this._activeBatch.break(e)
    }
    buildEnd(e) {
        this._activeBatch.break(e);
        const r = this._activeBatches;
        for (const n in r) {
            const i = r[n]
              , o = i.geometry;
            o.indexBuffer.setDataWithSize(i.indexBuffer, i.indexSize, !0),
            o.buffers[0].setDataWithSize(i.attributeBuffer.float32View, i.attributeSize, !1)
        }
    }
    upload(e) {
        const r = this._batchersByInstructionSet[e.uid];
        for (const n in r) {
            const i = r[n]
              , o = i.geometry;
            i.dirty && (i.dirty = !1,
            o.buffers[0].update(i.attributeSize * 4))
        }
    }
    execute(e) {
        if (e.action === "startBatch") {
            const r = e.batcher
              , n = r.geometry
              , i = r.shader;
            this._adaptor.start(this, n, i)
        }
        this._adaptor.execute(this, e)
    }
    destroy() {
        this.state = null,
        this.renderer = null,
        this._adaptor = null;
        for (const e in this._activeBatches)
            this._activeBatches[e].destroy();
        this._activeBatches = null
    }
}
;
Sb.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "batch"
};
Sb._availableBatchers = Object.create(null);
let hI = Sb;
$e.handleByMap(X.Batcher, hI._availableBatchers);
$e.add(mb);
const U0 = {
    name: "local-uniform-bit",
    vertex: {
        header: `

            struct LocalUniforms {
                uTransformMatrix:mat3x3<f32>,
                uColor:vec4<f32>,
                uRound:f32,
            }

            @group(1) @binding(0) var<uniform> localUniforms : LocalUniforms;
        `,
        main: `
            vColor *= localUniforms.uColor;
            modelMatrix *= localUniforms.uTransformMatrix;
        `,
        end: `
            if(localUniforms.uRound == 1)
            {
                vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
            }
        `
    }
}
  , Z0e = {
    ...U0,
    vertex: {
        ...U0.vertex,
        header: U0.vertex.header.replace("group(1)", "group(2)")
    }
}
  , Tb = {
    name: "local-uniform-bit",
    vertex: {
        header: `

            uniform mat3 uTransformMatrix;
            uniform vec4 uColor;
            uniform float uRound;
        `,
        main: `
            vColor *= uColor;
            modelMatrix = uTransformMatrix;
        `,
        end: `
            if(uRound == 1.)
            {
                gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
            }
        `
    }
}
  , J0e = {
    name: "texture-bit",
    vertex: {
        header: `

        struct TextureUniforms {
            uTextureMatrix:mat3x3<f32>,
        }

        @group(2) @binding(2) var<uniform> textureUniforms : TextureUniforms;
        `,
        main: `
            uv = (textureUniforms.uTextureMatrix * vec3(uv, 1.0)).xy;
        `
    },
    fragment: {
        header: `
            @group(2) @binding(0) var uTexture: texture_2d<f32>;
            @group(2) @binding(1) var uSampler: sampler;


        `,
        main: `
            outColor = textureSample(uTexture, uSampler, vUV);
        `
    }
}
  , Q0e = {
    name: "texture-bit",
    vertex: {
        header: `
            uniform mat3 uTextureMatrix;
        `,
        main: `
            uv = (uTextureMatrix * vec3(uv, 1.0)).xy;
        `
    },
    fragment: {
        header: `
        uniform sampler2D uTexture;


        `,
        main: `
            outColor = texture(uTexture, vUV);
        `
    }
}
  , efe = new Vr;
class tfe extends Fx {
    constructor() {
        super(),
        this.filters = [new V0e({
            sprite: new _l(Be.EMPTY),
            inverse: !1,
            resolution: "inherit",
            antialias: "inherit"
        })]
    }
    get sprite() {
        return this.filters[0].sprite
    }
    set sprite(e) {
        this.filters[0].sprite = e
    }
    get inverse() {
        return this.filters[0].inverse
    }
    set inverse(e) {
        this.filters[0].inverse = e
    }
}
class xI {
    constructor(e) {
        this._activeMaskStage = [],
        this._renderer = e
    }
    push(e, r, n) {
        const i = this._renderer;
        if (i.renderPipes.batch.break(n),
        n.add({
            renderPipeId: "alphaMask",
            action: "pushMaskBegin",
            mask: e,
            inverse: r._maskOptions.inverse,
            canBundle: !1,
            maskedContainer: r
        }),
        e.inverse = r._maskOptions.inverse,
        e.renderMaskToTexture) {
            const o = e.mask;
            o.includeInBuild = !0,
            o.collectRenderables(n, i, null),
            o.includeInBuild = !1
        }
        i.renderPipes.batch.break(n),
        n.add({
            renderPipeId: "alphaMask",
            action: "pushMaskEnd",
            mask: e,
            maskedContainer: r,
            inverse: r._maskOptions.inverse,
            canBundle: !1
        })
    }
    pop(e, r, n) {
        this._renderer.renderPipes.batch.break(n),
        n.add({
            renderPipeId: "alphaMask",
            action: "popMaskEnd",
            mask: e,
            inverse: r._maskOptions.inverse,
            canBundle: !1
        })
    }
    execute(e) {
        const r = this._renderer
          , n = e.mask.renderMaskToTexture;
        if (e.action === "pushMaskBegin") {
            const i = xr.get(tfe);
            if (i.inverse = e.inverse,
            n) {
                e.mask.mask.measurable = !0;
                const o = rb(e.mask.mask, !0, efe);
                e.mask.mask.measurable = !1,
                o.ceil();
                const s = r.renderTarget.renderTarget.colorTexture.source
                  , a = sr.getOptimalTexture(o.width, o.height, s._resolution, s.antialias);
                r.renderTarget.push(a, !0),
                r.globalUniforms.push({
                    offset: o,
                    worldColor: 4294967295
                });
                const l = i.sprite;
                l.texture = a,
                l.worldTransform.tx = o.minX,
                l.worldTransform.ty = o.minY,
                this._activeMaskStage.push({
                    filterEffect: i,
                    maskedContainer: e.maskedContainer,
                    filterTexture: a
                })
            } else
                i.sprite = e.mask.mask,
                this._activeMaskStage.push({
                    filterEffect: i,
                    maskedContainer: e.maskedContainer
                })
        } else if (e.action === "pushMaskEnd") {
            const i = this._activeMaskStage[this._activeMaskStage.length - 1];
            n && (r.type === qn.WEBGL && r.renderTarget.finishRenderPass(),
            r.renderTarget.pop(),
            r.globalUniforms.pop()),
            r.filter.push({
                renderPipeId: "filter",
                action: "pushFilter",
                container: i.maskedContainer,
                filterEffect: i.filterEffect,
                canBundle: !1
            })
        } else if (e.action === "popMaskEnd") {
            r.filter.pop();
            const i = this._activeMaskStage.pop();
            n && sr.returnTexture(i.filterTexture),
            xr.return(i.filterEffect)
        }
    }
    destroy() {
        this._renderer = null,
        this._activeMaskStage = null
    }
}
xI.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "alphaMask"
};
class pI {
    constructor(e) {
        this._colorStack = [],
        this._colorStackIndex = 0,
        this._currentColor = 0,
        this._renderer = e
    }
    buildStart() {
        this._colorStack[0] = 15,
        this._colorStackIndex = 1,
        this._currentColor = 15
    }
    push(e, r, n) {
        this._renderer.renderPipes.batch.break(n);
        const o = this._colorStack;
        o[this._colorStackIndex] = o[this._colorStackIndex - 1] & e.mask;
        const s = this._colorStack[this._colorStackIndex];
        s !== this._currentColor && (this._currentColor = s,
        n.add({
            renderPipeId: "colorMask",
            colorMask: s,
            canBundle: !1
        })),
        this._colorStackIndex++
    }
    pop(e, r, n) {
        this._renderer.renderPipes.batch.break(n);
        const o = this._colorStack;
        this._colorStackIndex--;
        const s = o[this._colorStackIndex - 1];
        s !== this._currentColor && (this._currentColor = s,
        n.add({
            renderPipeId: "colorMask",
            colorMask: s,
            canBundle: !1
        }))
    }
    execute(e) {
        this._renderer.colorMask.setMask(e.colorMask)
    }
    destroy() {
        this._renderer = null,
        this._colorStack = null
    }
}
pI.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "colorMask"
};
class gI {
    constructor(e) {
        this._maskStackHash = {},
        this._maskHash = new WeakMap,
        this._renderer = e
    }
    push(e, r, n) {
        var i;
        const o = e
          , s = this._renderer;
        s.renderPipes.batch.break(n),
        s.renderPipes.blendMode.setBlendMode(o.mask, "none", n),
        n.add({
            renderPipeId: "stencilMask",
            action: "pushMaskBegin",
            mask: e,
            inverse: r._maskOptions.inverse,
            canBundle: !1
        });
        const a = o.mask;
        a.includeInBuild = !0,
        this._maskHash.has(o) || this._maskHash.set(o, {
            instructionsStart: 0,
            instructionsLength: 0
        });
        const l = this._maskHash.get(o);
        l.instructionsStart = n.instructionSize,
        a.collectRenderables(n, s, null),
        a.includeInBuild = !1,
        s.renderPipes.batch.break(n),
        n.add({
            renderPipeId: "stencilMask",
            action: "pushMaskEnd",
            mask: e,
            inverse: r._maskOptions.inverse,
            canBundle: !1
        });
        const c = n.instructionSize - l.instructionsStart - 1;
        l.instructionsLength = c;
        const u = s.renderTarget.renderTarget.uid;
        (i = this._maskStackHash)[u] ?? (i[u] = 0)
    }
    pop(e, r, n) {
        const i = e
          , o = this._renderer;
        o.renderPipes.batch.break(n),
        o.renderPipes.blendMode.setBlendMode(i.mask, "none", n),
        n.add({
            renderPipeId: "stencilMask",
            action: "popMaskBegin",
            inverse: r._maskOptions.inverse,
            canBundle: !1
        });
        const s = this._maskHash.get(e);
        for (let a = 0; a < s.instructionsLength; a++)
            n.instructions[n.instructionSize++] = n.instructions[s.instructionsStart++];
        n.add({
            renderPipeId: "stencilMask",
            action: "popMaskEnd",
            canBundle: !1
        })
    }
    execute(e) {
        var r;
        const n = this._renderer
          , i = n.renderTarget.renderTarget.uid;
        let o = (r = this._maskStackHash)[i] ?? (r[i] = 0);
        e.action === "pushMaskBegin" ? (n.renderTarget.ensureDepthStencil(),
        n.stencil.setStencilMode(ar.RENDERING_MASK_ADD, o),
        o++,
        n.colorMask.setMask(0)) : e.action === "pushMaskEnd" ? (e.inverse ? n.stencil.setStencilMode(ar.INVERSE_MASK_ACTIVE, o) : n.stencil.setStencilMode(ar.MASK_ACTIVE, o),
        n.colorMask.setMask(15)) : e.action === "popMaskBegin" ? (n.colorMask.setMask(0),
        o !== 0 ? n.stencil.setStencilMode(ar.RENDERING_MASK_REMOVE, o) : (n.renderTarget.clear(null, Hn.STENCIL),
        n.stencil.setStencilMode(ar.DISABLED, o)),
        o--) : e.action === "popMaskEnd" && (e.inverse ? n.stencil.setStencilMode(ar.INVERSE_MASK_ACTIVE, o) : n.stencil.setStencilMode(ar.MASK_ACTIVE, o),
        n.colorMask.setMask(15)),
        this._maskStackHash[i] = o
    }
    destroy() {
        this._renderer = null,
        this._maskStackHash = null,
        this._maskHash = null
    }
}
gI.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "stencilMask"
};
var Xh = (t => (t[t.ELEMENT_ARRAY_BUFFER = 34963] = "ELEMENT_ARRAY_BUFFER",
t[t.ARRAY_BUFFER = 34962] = "ARRAY_BUFFER",
t[t.UNIFORM_BUFFER = 35345] = "UNIFORM_BUFFER",
t))(Xh || {});
class rfe {
    constructor(e, r) {
        this._lastBindBaseLocation = -1,
        this._lastBindCallId = -1,
        this.buffer = e || null,
        this.updateID = -1,
        this.byteLength = -1,
        this.type = r
    }
}
class mI {
    constructor(e) {
        this._gpuBuffers = Object.create(null),
        this._boundBufferBases = Object.create(null),
        this._minBaseLocation = 0,
        this._nextBindBaseIndex = this._minBaseLocation,
        this._bindCallId = 0,
        this._renderer = e,
        this._renderer.renderableGC.addManagedHash(this, "_gpuBuffers")
    }
    destroy() {
        this.destroyAll(),
        this._renderer = null,
        this._gl = null,
        this._gpuBuffers = {},
        this._boundBufferBases = {}
    }
    contextChange() {
        this._gl = this._renderer.gl,
        this._gpuBuffers = Object.create(null),
        this._maxBindings = this._renderer.limits.maxUniformBindings
    }
    getGlBuffer(e) {
        return this._gpuBuffers[e.uid] || this.createGLBuffer(e)
    }
    bind(e) {
        const {_gl: r} = this
          , n = this.getGlBuffer(e);
        r.bindBuffer(n.type, n.buffer)
    }
    bindBufferBase(e, r) {
        const {_gl: n} = this;
        this._boundBufferBases[r] !== e && (this._boundBufferBases[r] = e,
        e._lastBindBaseLocation = r,
        n.bindBufferBase(n.UNIFORM_BUFFER, r, e.buffer))
    }
    nextBindBase(e) {
        this._bindCallId++,
        this._minBaseLocation = 0,
        e && (this._boundBufferBases[0] = null,
        this._minBaseLocation = 1,
        this._nextBindBaseIndex < 1 && (this._nextBindBaseIndex = 1))
    }
    freeLocationForBufferBase(e) {
        let r = this.getLastBindBaseLocation(e);
        if (r >= this._minBaseLocation)
            return e._lastBindCallId = this._bindCallId,
            r;
        let n = 0
          , i = this._nextBindBaseIndex;
        for (; n < 2; ) {
            i >= this._maxBindings && (i = this._minBaseLocation,
            n++);
            const o = this._boundBufferBases[i];
            if (o && o._lastBindCallId === this._bindCallId) {
                i++;
                continue
            }
            break
        }
        return r = i,
        this._nextBindBaseIndex = i + 1,
        n >= 2 ? -1 : (e._lastBindCallId = this._bindCallId,
        this._boundBufferBases[r] = null,
        r)
    }
    getLastBindBaseLocation(e) {
        const r = e._lastBindBaseLocation;
        return this._boundBufferBases[r] === e ? r : -1
    }
    bindBufferRange(e, r, n, i) {
        const {_gl: o} = this;
        n || (n = 0),
        r || (r = 0),
        this._boundBufferBases[r] = null,
        o.bindBufferRange(o.UNIFORM_BUFFER, r || 0, e.buffer, n * 256, i || 256)
    }
    updateBuffer(e) {
        const {_gl: r} = this
          , n = this.getGlBuffer(e);
        if (e._updateID === n.updateID)
            return n;
        n.updateID = e._updateID,
        r.bindBuffer(n.type, n.buffer);
        const i = e.data
          , o = e.descriptor.usage & it.STATIC ? r.STATIC_DRAW : r.DYNAMIC_DRAW;
        return i ? n.byteLength >= i.byteLength ? r.bufferSubData(n.type, 0, i, 0, e._updateSize / i.BYTES_PER_ELEMENT) : (n.byteLength = i.byteLength,
        r.bufferData(n.type, i, o)) : (n.byteLength = e.descriptor.size,
        r.bufferData(n.type, n.byteLength, o)),
        n
    }
    destroyAll() {
        const e = this._gl;
        for (const r in this._gpuBuffers)
            this._gpuBuffers[r] && e.deleteBuffer(this._gpuBuffers[r].buffer);
        this._gpuBuffers = Object.create(null)
    }
    onBufferDestroy(e, r) {
        if (!this._gpuBuffers[e.uid])
            return;
        const n = this._gpuBuffers[e.uid]
          , i = this._gl;
        r || i.deleteBuffer(n.buffer),
        e.off("destroy", this.onBufferDestroy, this),
        this._gpuBuffers[e.uid] = null
    }
    createGLBuffer(e) {
        const {_gl: r} = this;
        let n = Xh.ARRAY_BUFFER;
        e.descriptor.usage & it.INDEX ? n = Xh.ELEMENT_ARRAY_BUFFER : e.descriptor.usage & it.UNIFORM && (n = Xh.UNIFORM_BUFFER);
        const i = new rfe(r.createBuffer(),n);
        return this._gpuBuffers[e.uid] = i,
        e.on("destroy", this.onBufferDestroy, this),
        i
    }
    resetState() {
        this._boundBufferBases = Object.create(null)
    }
}
mI.extension = {
    type: [X.WebGLSystem],
    name: "buffer"
};
const Db = class vI {
    constructor(e) {
        this.supports = {
            uint32Indices: !0,
            uniformBufferObject: !0,
            vertexArrayObject: !0,
            srgbTextures: !0,
            nonPowOf2wrapping: !0,
            msaa: !0,
            nonPowOf2mipmaps: !0
        },
        this._renderer = e,
        this.extensions = Object.create(null),
        this.handleContextLost = this.handleContextLost.bind(this),
        this.handleContextRestored = this.handleContextRestored.bind(this)
    }
    get isLost() {
        return !this.gl || this.gl.isContextLost()
    }
    contextChange(e) {
        this.gl = e,
        this._renderer.gl = e
    }
    init(e) {
        e = {
            ...vI.defaultOptions,
            ...e
        };
        let r = this.multiView = e.multiView;
        if (e.context && r && (Ne("Renderer created with both a context and multiview enabled. Disabling multiView as both cannot work together."),
        r = !1),
        r ? this.canvas = je.get().createCanvas(this._renderer.canvas.width, this._renderer.canvas.height) : this.canvas = this._renderer.view.canvas,
        e.context)
            this.initFromContext(e.context);
        else {
            const n = this._renderer.background.alpha < 1
              , i = e.premultipliedAlpha ?? !0
              , o = e.antialias && !this._renderer.backBuffer.useBackBuffer;
            this.createContext(e.preferWebGLVersion, {
                alpha: n,
                premultipliedAlpha: i,
                antialias: o,
                stencil: !0,
                preserveDrawingBuffer: e.preserveDrawingBuffer,
                powerPreference: e.powerPreference ?? "default"
            })
        }
    }
    ensureCanvasSize(e) {
        if (!this.multiView) {
            e !== this.canvas && Ne("multiView is disabled, but targetCanvas is not the main canvas");
            return
        }
        const {canvas: r} = this;
        (r.width < e.width || r.height < e.height) && (r.width = Math.max(e.width, e.width),
        r.height = Math.max(e.height, e.height))
    }
    initFromContext(e) {
        this.gl = e,
        this.webGLVersion = e instanceof je.get().getWebGLRenderingContext() ? 1 : 2,
        this.getExtensions(),
        this.validateContext(e),
        this._renderer.runners.contextChange.emit(e);
        const r = this._renderer.view.canvas;
        r.addEventListener("webglcontextlost", this.handleContextLost, !1),
        r.addEventListener("webglcontextrestored", this.handleContextRestored, !1)
    }
    createContext(e, r) {
        let n;
        const i = this.canvas;
        if (e === 2 && (n = i.getContext("webgl2", r)),
        !n && (n = i.getContext("webgl", r),
        !n))
            throw new Error("This browser does not support WebGL. Try using the canvas renderer");
        this.gl = n,
        this.initFromContext(this.gl)
    }
    getExtensions() {
        const {gl: e} = this
          , r = {
            anisotropicFiltering: e.getExtension("EXT_texture_filter_anisotropic"),
            floatTextureLinear: e.getExtension("OES_texture_float_linear"),
            s3tc: e.getExtension("WEBGL_compressed_texture_s3tc"),
            s3tc_sRGB: e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),
            etc: e.getExtension("WEBGL_compressed_texture_etc"),
            etc1: e.getExtension("WEBGL_compressed_texture_etc1"),
            pvrtc: e.getExtension("WEBGL_compressed_texture_pvrtc") || e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),
            atc: e.getExtension("WEBGL_compressed_texture_atc"),
            astc: e.getExtension("WEBGL_compressed_texture_astc"),
            bptc: e.getExtension("EXT_texture_compression_bptc"),
            rgtc: e.getExtension("EXT_texture_compression_rgtc"),
            loseContext: e.getExtension("WEBGL_lose_context")
        };
        if (this.webGLVersion === 1)
            this.extensions = {
                ...r,
                drawBuffers: e.getExtension("WEBGL_draw_buffers"),
                depthTexture: e.getExtension("WEBGL_depth_texture"),
                vertexArrayObject: e.getExtension("OES_vertex_array_object") || e.getExtension("MOZ_OES_vertex_array_object") || e.getExtension("WEBKIT_OES_vertex_array_object"),
                uint32ElementIndex: e.getExtension("OES_element_index_uint"),
                floatTexture: e.getExtension("OES_texture_float"),
                floatTextureLinear: e.getExtension("OES_texture_float_linear"),
                textureHalfFloat: e.getExtension("OES_texture_half_float"),
                textureHalfFloatLinear: e.getExtension("OES_texture_half_float_linear"),
                vertexAttribDivisorANGLE: e.getExtension("ANGLE_instanced_arrays"),
                srgb: e.getExtension("EXT_sRGB")
            };
        else {
            this.extensions = {
                ...r,
                colorBufferFloat: e.getExtension("EXT_color_buffer_float")
            };
            const n = e.getExtension("WEBGL_provoking_vertex");
            n && n.provokingVertexWEBGL(n.FIRST_VERTEX_CONVENTION_WEBGL)
        }
    }
    handleContextLost(e) {
        e.preventDefault(),
        this._contextLossForced && (this._contextLossForced = !1,
        setTimeout( () => {
            var r;
            this.gl.isContextLost() && ((r = this.extensions.loseContext) == null || r.restoreContext())
        }
        , 0))
    }
    handleContextRestored() {
        this.getExtensions(),
        this._renderer.runners.contextChange.emit(this.gl)
    }
    destroy() {
        var r;
        const e = this._renderer.view.canvas;
        this._renderer = null,
        e.removeEventListener("webglcontextlost", this.handleContextLost),
        e.removeEventListener("webglcontextrestored", this.handleContextRestored),
        this.gl.useProgram(null),
        (r = this.extensions.loseContext) == null || r.loseContext()
    }
    forceContextLoss() {
        var e;
        (e = this.extensions.loseContext) == null || e.loseContext(),
        this._contextLossForced = !0
    }
    validateContext(e) {
        const r = e.getContextAttributes();
        r && !r.stencil && Ne("Provided WebGL context does not have a stencil buffer, masks may not render correctly");
        const n = this.supports
          , i = this.webGLVersion === 2
          , o = this.extensions;
        n.uint32Indices = i || !!o.uint32ElementIndex,
        n.uniformBufferObject = i,
        n.vertexArrayObject = i || !!o.vertexArrayObject,
        n.srgbTextures = i || !!o.srgb,
        n.nonPowOf2wrapping = i,
        n.nonPowOf2mipmaps = i,
        n.msaa = i,
        n.uint32Indices || Ne("Provided WebGL context does not support 32 index buffer, large scenes may not render correctly")
    }
}
;
Db.extension = {
    type: [X.WebGLSystem],
    name: "context"
};
Db.defaultOptions = {
    context: null,
    premultipliedAlpha: !0,
    preserveDrawingBuffer: !1,
    powerPreference: void 0,
    preferWebGLVersion: 2,
    multiView: !1
};
let nfe = Db;
function yI(t, e) {
    for (const r in t.attributes) {
        const n = t.attributes[r]
          , i = e[r];
        i ? (n.format ?? (n.format = i.format),
        n.offset ?? (n.offset = i.offset),
        n.instance ?? (n.instance = i.instance)) : Ne(`Attribute ${r} is not present in the shader, but is present in the geometry. Unable to infer attribute details.`)
    }
    ife(t)
}
function ife(t) {
    const {buffers: e, attributes: r} = t
      , n = {}
      , i = {};
    for (const o in e) {
        const s = e[o];
        n[s.uid] = 0,
        i[s.uid] = 0
    }
    for (const o in r) {
        const s = r[o];
        n[s.buffer.uid] += fa(s.format).stride
    }
    for (const o in r) {
        const s = r[o];
        s.stride ?? (s.stride = n[s.buffer.uid]),
        s.start ?? (s.start = i[s.buffer.uid]),
        i[s.buffer.uid] += fa(s.format).stride
    }
}
var uE = (t => (t[t.RGBA = 6408] = "RGBA",
t[t.RGB = 6407] = "RGB",
t[t.RG = 33319] = "RG",
t[t.RED = 6403] = "RED",
t[t.RGBA_INTEGER = 36249] = "RGBA_INTEGER",
t[t.RGB_INTEGER = 36248] = "RGB_INTEGER",
t[t.RG_INTEGER = 33320] = "RG_INTEGER",
t[t.RED_INTEGER = 36244] = "RED_INTEGER",
t[t.ALPHA = 6406] = "ALPHA",
t[t.LUMINANCE = 6409] = "LUMINANCE",
t[t.LUMINANCE_ALPHA = 6410] = "LUMINANCE_ALPHA",
t[t.DEPTH_COMPONENT = 6402] = "DEPTH_COMPONENT",
t[t.DEPTH_STENCIL = 34041] = "DEPTH_STENCIL",
t))(uE || {})
  , EI = (t => (t[t.TEXTURE_2D = 3553] = "TEXTURE_2D",
t[t.TEXTURE_CUBE_MAP = 34067] = "TEXTURE_CUBE_MAP",
t[t.TEXTURE_2D_ARRAY = 35866] = "TEXTURE_2D_ARRAY",
t[t.TEXTURE_CUBE_MAP_POSITIVE_X = 34069] = "TEXTURE_CUBE_MAP_POSITIVE_X",
t[t.TEXTURE_CUBE_MAP_NEGATIVE_X = 34070] = "TEXTURE_CUBE_MAP_NEGATIVE_X",
t[t.TEXTURE_CUBE_MAP_POSITIVE_Y = 34071] = "TEXTURE_CUBE_MAP_POSITIVE_Y",
t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072] = "TEXTURE_CUBE_MAP_NEGATIVE_Y",
t[t.TEXTURE_CUBE_MAP_POSITIVE_Z = 34073] = "TEXTURE_CUBE_MAP_POSITIVE_Z",
t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074] = "TEXTURE_CUBE_MAP_NEGATIVE_Z",
t))(EI || {})
  , ut = (t => (t[t.UNSIGNED_BYTE = 5121] = "UNSIGNED_BYTE",
t[t.UNSIGNED_SHORT = 5123] = "UNSIGNED_SHORT",
t[t.UNSIGNED_SHORT_5_6_5 = 33635] = "UNSIGNED_SHORT_5_6_5",
t[t.UNSIGNED_SHORT_4_4_4_4 = 32819] = "UNSIGNED_SHORT_4_4_4_4",
t[t.UNSIGNED_SHORT_5_5_5_1 = 32820] = "UNSIGNED_SHORT_5_5_5_1",
t[t.UNSIGNED_INT = 5125] = "UNSIGNED_INT",
t[t.UNSIGNED_INT_10F_11F_11F_REV = 35899] = "UNSIGNED_INT_10F_11F_11F_REV",
t[t.UNSIGNED_INT_2_10_10_10_REV = 33640] = "UNSIGNED_INT_2_10_10_10_REV",
t[t.UNSIGNED_INT_24_8 = 34042] = "UNSIGNED_INT_24_8",
t[t.UNSIGNED_INT_5_9_9_9_REV = 35902] = "UNSIGNED_INT_5_9_9_9_REV",
t[t.BYTE = 5120] = "BYTE",
t[t.SHORT = 5122] = "SHORT",
t[t.INT = 5124] = "INT",
t[t.FLOAT = 5126] = "FLOAT",
t[t.FLOAT_32_UNSIGNED_INT_24_8_REV = 36269] = "FLOAT_32_UNSIGNED_INT_24_8_REV",
t[t.HALF_FLOAT = 36193] = "HALF_FLOAT",
t))(ut || {});
const _3 = {
    uint8x2: ut.UNSIGNED_BYTE,
    uint8x4: ut.UNSIGNED_BYTE,
    sint8x2: ut.BYTE,
    sint8x4: ut.BYTE,
    unorm8x2: ut.UNSIGNED_BYTE,
    unorm8x4: ut.UNSIGNED_BYTE,
    snorm8x2: ut.BYTE,
    snorm8x4: ut.BYTE,
    uint16x2: ut.UNSIGNED_SHORT,
    uint16x4: ut.UNSIGNED_SHORT,
    sint16x2: ut.SHORT,
    sint16x4: ut.SHORT,
    unorm16x2: ut.UNSIGNED_SHORT,
    unorm16x4: ut.UNSIGNED_SHORT,
    snorm16x2: ut.SHORT,
    snorm16x4: ut.SHORT,
    float16x2: ut.HALF_FLOAT,
    float16x4: ut.HALF_FLOAT,
    float32: ut.FLOAT,
    float32x2: ut.FLOAT,
    float32x3: ut.FLOAT,
    float32x4: ut.FLOAT,
    uint32: ut.UNSIGNED_INT,
    uint32x2: ut.UNSIGNED_INT,
    uint32x3: ut.UNSIGNED_INT,
    uint32x4: ut.UNSIGNED_INT,
    sint32: ut.INT,
    sint32x2: ut.INT,
    sint32x3: ut.INT,
    sint32x4: ut.INT
};
function ofe(t) {
    return _3[t] ?? _3.float32
}
const sfe = {
    "point-list": 0,
    "line-list": 1,
    "line-strip": 3,
    "triangle-list": 4,
    "triangle-strip": 5
};
class _I {
    constructor(e) {
        this._geometryVaoHash = Object.create(null),
        this._renderer = e,
        this._activeGeometry = null,
        this._activeVao = null,
        this.hasVao = !0,
        this.hasInstance = !0,
        this._renderer.renderableGC.addManagedHash(this, "_geometryVaoHash")
    }
    contextChange() {
        const e = this.gl = this._renderer.gl;
        if (!this._renderer.context.supports.vertexArrayObject)
            throw new Error("[PixiJS] Vertex Array Objects are not supported on this device");
        const r = this._renderer.context.extensions.vertexArrayObject;
        r && (e.createVertexArray = () => r.createVertexArrayOES(),
        e.bindVertexArray = i => r.bindVertexArrayOES(i),
        e.deleteVertexArray = i => r.deleteVertexArrayOES(i));
        const n = this._renderer.context.extensions.vertexAttribDivisorANGLE;
        n && (e.drawArraysInstanced = (i, o, s, a) => {
            n.drawArraysInstancedANGLE(i, o, s, a)
        }
        ,
        e.drawElementsInstanced = (i, o, s, a, l) => {
            n.drawElementsInstancedANGLE(i, o, s, a, l)
        }
        ,
        e.vertexAttribDivisor = (i, o) => n.vertexAttribDivisorANGLE(i, o)),
        this._activeGeometry = null,
        this._activeVao = null,
        this._geometryVaoHash = Object.create(null)
    }
    bind(e, r) {
        const n = this.gl;
        this._activeGeometry = e;
        const i = this.getVao(e, r);
        this._activeVao !== i && (this._activeVao = i,
        n.bindVertexArray(i)),
        this.updateBuffers()
    }
    resetState() {
        this.unbind()
    }
    updateBuffers() {
        const e = this._activeGeometry
          , r = this._renderer.buffer;
        for (let n = 0; n < e.buffers.length; n++) {
            const i = e.buffers[n];
            r.updateBuffer(i)
        }
    }
    checkCompatibility(e, r) {
        const n = e.attributes
          , i = r._attributeData;
        for (const o in i)
            if (!n[o])
                throw new Error(`shader and geometry incompatible, geometry missing the "${o}" attribute`)
    }
    getSignature(e, r) {
        const n = e.attributes
          , i = r._attributeData
          , o = ["g", e.uid];
        for (const s in n)
            i[s] && o.push(s, i[s].location);
        return o.join("-")
    }
    getVao(e, r) {
        var n;
        return ((n = this._geometryVaoHash[e.uid]) == null ? void 0 : n[r._key]) || this.initGeometryVao(e, r)
    }
    initGeometryVao(e, r, n=!0) {
        const i = this._renderer.gl
          , o = this._renderer.buffer;
        this._renderer.shader._getProgramData(r),
        this.checkCompatibility(e, r);
        const s = this.getSignature(e, r);
        this._geometryVaoHash[e.uid] || (this._geometryVaoHash[e.uid] = Object.create(null),
        e.on("destroy", this.onGeometryDestroy, this));
        const a = this._geometryVaoHash[e.uid];
        let l = a[s];
        if (l)
            return a[r._key] = l,
            l;
        yI(e, r._attributeData);
        const c = e.buffers;
        l = i.createVertexArray(),
        i.bindVertexArray(l);
        for (let u = 0; u < c.length; u++) {
            const f = c[u];
            o.bind(f)
        }
        return this.activateVao(e, r),
        a[r._key] = l,
        a[s] = l,
        i.bindVertexArray(null),
        l
    }
    onGeometryDestroy(e, r) {
        const n = this._geometryVaoHash[e.uid]
          , i = this.gl;
        if (n) {
            if (r)
                for (const o in n)
                    this._activeVao !== n[o] && this.unbind(),
                    i.deleteVertexArray(n[o]);
            this._geometryVaoHash[e.uid] = null
        }
    }
    destroyAll(e=!1) {
        const r = this.gl;
        for (const n in this._geometryVaoHash) {
            if (e)
                for (const i in this._geometryVaoHash[n]) {
                    const o = this._geometryVaoHash[n];
                    this._activeVao !== o && this.unbind(),
                    r.deleteVertexArray(o[i])
                }
            this._geometryVaoHash[n] = null
        }
    }
    activateVao(e, r) {
        var a;
        const n = this._renderer.gl
          , i = this._renderer.buffer
          , o = e.attributes;
        e.indexBuffer && i.bind(e.indexBuffer);
        let s = null;
        for (const l in o) {
            const c = o[l]
              , u = c.buffer
              , f = i.getGlBuffer(u)
              , d = r._attributeData[l];
            if (d) {
                s !== f && (i.bind(u),
                s = f);
                const h = d.location;
                n.enableVertexAttribArray(h);
                const x = fa(c.format)
                  , y = ofe(c.format);
                if (((a = d.format) == null ? void 0 : a.substring(1, 4)) === "int" ? n.vertexAttribIPointer(h, x.size, y, c.stride, c.offset) : n.vertexAttribPointer(h, x.size, y, x.normalised, c.stride, c.offset),
                c.instance)
                    if (this.hasInstance) {
                        const m = c.divisor ?? 1;
                        n.vertexAttribDivisor(h, m)
                    } else
                        throw new Error("geometry error, GPU Instancing is not supported on this device")
            }
        }
    }
    draw(e, r, n, i) {
        const {gl: o} = this._renderer
          , s = this._activeGeometry
          , a = sfe[e || s.topology];
        if (i ?? (i = s.instanceCount),
        s.indexBuffer) {
            const l = s.indexBuffer.data.BYTES_PER_ELEMENT
              , c = l === 2 ? o.UNSIGNED_SHORT : o.UNSIGNED_INT;
            i !== 1 ? o.drawElementsInstanced(a, r || s.indexBuffer.data.length, c, (n || 0) * l, i) : o.drawElements(a, r || s.indexBuffer.data.length, c, (n || 0) * l)
        } else
            i !== 1 ? o.drawArraysInstanced(a, n || 0, r || s.getSize(), i) : o.drawArrays(a, n || 0, r || s.getSize());
        return this
    }
    unbind() {
        this.gl.bindVertexArray(null),
        this._activeVao = null,
        this._activeGeometry = null
    }
    destroy() {
        this._renderer = null,
        this.gl = null,
        this._activeVao = null,
        this._activeGeometry = null,
        this._geometryVaoHash = {}
    }
}
_I.extension = {
    type: [X.WebGLSystem],
    name: "geometry"
};
const afe = new id({
    attributes: {
        aPosition: [-1, -1, 3, -1, -1, 3]
    }
})
  , Fb = class bI {
    constructor(e) {
        this.useBackBuffer = !1,
        this._useBackBufferThisRender = !1,
        this._renderer = e
    }
    init(e={}) {
        const {useBackBuffer: r, antialias: n} = {
            ...bI.defaultOptions,
            ...e
        };
        this.useBackBuffer = r,
        this._antialias = n,
        this._renderer.context.supports.msaa || (Ne("antialiasing, is not supported on when using the back buffer"),
        this._antialias = !1),
        this._state = Ui.for2d();
        const i = new ya({
            vertex: `
                attribute vec2 aPosition;
                out vec2 vUv;

                void main() {
                    gl_Position = vec4(aPosition, 0.0, 1.0);

                    vUv = (aPosition + 1.0) / 2.0;

                    // flip dem UVs
                    vUv.y = 1.0 - vUv.y;
                }`,
            fragment: `
                in vec2 vUv;
                out vec4 finalColor;

                uniform sampler2D uTexture;

                void main() {
                    finalColor = texture(uTexture, vUv);
                }`,
            name: "big-triangle"
        });
        this._bigTriangleShader = new yi({
            glProgram: i,
            resources: {
                uTexture: Be.WHITE.source
            }
        })
    }
    renderStart(e) {
        const r = this._renderer.renderTarget.getRenderTarget(e.target);
        if (this._useBackBufferThisRender = this.useBackBuffer && !!r.isRoot,
        this._useBackBufferThisRender) {
            const n = this._renderer.renderTarget.getRenderTarget(e.target);
            this._targetTexture = n.colorTexture,
            e.target = this._getBackBufferTexture(n.colorTexture)
        }
    }
    renderEnd() {
        this._presentBackBuffer()
    }
    _presentBackBuffer() {
        const e = this._renderer;
        e.renderTarget.finishRenderPass(),
        this._useBackBufferThisRender && (e.renderTarget.bind(this._targetTexture, !1),
        this._bigTriangleShader.resources.uTexture = this._backBufferTexture.source,
        e.encoder.draw({
            geometry: afe,
            shader: this._bigTriangleShader,
            state: this._state
        }))
    }
    _getBackBufferTexture(e) {
        return this._backBufferTexture = this._backBufferTexture || new Be({
            source: new Br({
                width: e.width,
                height: e.height,
                resolution: e._resolution,
                antialias: this._antialias
            })
        }),
        this._backBufferTexture.source.resize(e.width, e.height, e._resolution),
        this._backBufferTexture
    }
    destroy() {
        this._backBufferTexture && (this._backBufferTexture.destroy(),
        this._backBufferTexture = null)
    }
}
;
Fb.extension = {
    type: [X.WebGLSystem],
    name: "backBuffer",
    priority: 1
};
Fb.defaultOptions = {
    useBackBuffer: !1
};
let lfe = Fb;
class CI {
    constructor(e) {
        this._colorMaskCache = 15,
        this._renderer = e
    }
    setMask(e) {
        this._colorMaskCache !== e && (this._colorMaskCache = e,
        this._renderer.gl.colorMask(!!(e & 8), !!(e & 4), !!(e & 2), !!(e & 1)))
    }
}
CI.extension = {
    type: [X.WebGLSystem],
    name: "colorMask"
};
class AI {
    constructor(e) {
        this.commandFinished = Promise.resolve(),
        this._renderer = e
    }
    setGeometry(e, r) {
        this._renderer.geometry.bind(e, r.glProgram)
    }
    finishRenderPass() {}
    draw(e) {
        const r = this._renderer
          , {geometry: n, shader: i, state: o, skipSync: s, topology: a, size: l, start: c, instanceCount: u} = e;
        r.shader.bind(i, s),
        r.geometry.bind(n, r.shader._activeProgram),
        o && r.state.set(o),
        r.geometry.draw(a, l, c, u ?? n.instanceCount)
    }
    destroy() {
        this._renderer = null
    }
}
AI.extension = {
    type: [X.WebGLSystem],
    name: "encoder"
};
class wI {
    constructor(e) {
        this._renderer = e
    }
    contextChange() {
        const e = this._renderer.gl;
        this.maxTextures = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),
        this.maxBatchableTextures = DP(this.maxTextures, e);
        const r = this._renderer.context.webGLVersion === 2;
        this.maxUniformBindings = r ? e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS) : 0
    }
    destroy() {}
}
wI.extension = {
    type: [X.WebGLSystem],
    name: "limits"
};
class cfe {
    constructor() {
        this.width = -1,
        this.height = -1,
        this.msaa = !1,
        this.msaaRenderBuffer = []
    }
}
const Ea = [];
Ea[ar.NONE] = void 0;
Ea[ar.DISABLED] = {
    stencilWriteMask: 0,
    stencilReadMask: 0
};
Ea[ar.RENDERING_MASK_ADD] = {
    stencilFront: {
        compare: "equal",
        passOp: "increment-clamp"
    },
    stencilBack: {
        compare: "equal",
        passOp: "increment-clamp"
    }
};
Ea[ar.RENDERING_MASK_REMOVE] = {
    stencilFront: {
        compare: "equal",
        passOp: "decrement-clamp"
    },
    stencilBack: {
        compare: "equal",
        passOp: "decrement-clamp"
    }
};
Ea[ar.MASK_ACTIVE] = {
    stencilWriteMask: 0,
    stencilFront: {
        compare: "equal",
        passOp: "keep"
    },
    stencilBack: {
        compare: "equal",
        passOp: "keep"
    }
};
Ea[ar.INVERSE_MASK_ACTIVE] = {
    stencilWriteMask: 0,
    stencilFront: {
        compare: "not-equal",
        passOp: "keep"
    },
    stencilBack: {
        compare: "not-equal",
        passOp: "keep"
    }
};
class BI {
    constructor(e) {
        this._stencilCache = {
            enabled: !1,
            stencilReference: 0,
            stencilMode: ar.NONE
        },
        this._renderTargetStencilState = Object.create(null),
        e.renderTarget.onRenderTargetChange.add(this)
    }
    contextChange(e) {
        this._gl = e,
        this._comparisonFuncMapping = {
            always: e.ALWAYS,
            never: e.NEVER,
            equal: e.EQUAL,
            "not-equal": e.NOTEQUAL,
            less: e.LESS,
            "less-equal": e.LEQUAL,
            greater: e.GREATER,
            "greater-equal": e.GEQUAL
        },
        this._stencilOpsMapping = {
            keep: e.KEEP,
            zero: e.ZERO,
            replace: e.REPLACE,
            invert: e.INVERT,
            "increment-clamp": e.INCR,
            "decrement-clamp": e.DECR,
            "increment-wrap": e.INCR_WRAP,
            "decrement-wrap": e.DECR_WRAP
        },
        this.resetState()
    }
    onRenderTargetChange(e) {
        if (this._activeRenderTarget === e)
            return;
        this._activeRenderTarget = e;
        let r = this._renderTargetStencilState[e.uid];
        r || (r = this._renderTargetStencilState[e.uid] = {
            stencilMode: ar.DISABLED,
            stencilReference: 0
        }),
        this.setStencilMode(r.stencilMode, r.stencilReference)
    }
    resetState() {
        this._stencilCache.enabled = !1,
        this._stencilCache.stencilMode = ar.NONE,
        this._stencilCache.stencilReference = 0
    }
    setStencilMode(e, r) {
        const n = this._renderTargetStencilState[this._activeRenderTarget.uid]
          , i = this._gl
          , o = Ea[e]
          , s = this._stencilCache;
        if (n.stencilMode = e,
        n.stencilReference = r,
        e === ar.DISABLED) {
            this._stencilCache.enabled && (this._stencilCache.enabled = !1,
            i.disable(i.STENCIL_TEST));
            return
        }
        this._stencilCache.enabled || (this._stencilCache.enabled = !0,
        i.enable(i.STENCIL_TEST)),
        (e !== s.stencilMode || s.stencilReference !== r) && (s.stencilMode = e,
        s.stencilReference = r,
        i.stencilFunc(this._comparisonFuncMapping[o.stencilBack.compare], r, 255),
        i.stencilOp(i.KEEP, i.KEEP, this._stencilOpsMapping[o.stencilBack.passOp]))
    }
}
BI.extension = {
    type: [X.WebGLSystem],
    name: "stencil"
};
class SI {
    constructor(e) {
        this._syncFunctionHash = Object.create(null),
        this._adaptor = e,
        this._systemCheck()
    }
    _systemCheck() {
        if (!hP())
            throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")
    }
    ensureUniformGroup(e) {
        const r = this.getUniformGroupData(e);
        e.buffer || (e.buffer = new Wn({
            data: new Float32Array(r.layout.size / 4),
            usage: it.UNIFORM | it.COPY_DST
        }))
    }
    getUniformGroupData(e) {
        return this._syncFunctionHash[e._signature] || this._initUniformGroup(e)
    }
    _initUniformGroup(e) {
        const r = e._signature;
        let n = this._syncFunctionHash[r];
        if (!n) {
            const i = Object.keys(e.uniformStructures).map(a => e.uniformStructures[a])
              , o = this._adaptor.createUboElements(i)
              , s = this._generateUboSync(o.uboElements);
            n = this._syncFunctionHash[r] = {
                layout: o,
                syncFunction: s
            }
        }
        return this._syncFunctionHash[r]
    }
    _generateUboSync(e) {
        return this._adaptor.generateUboSync(e)
    }
    syncUniformGroup(e, r, n) {
        const i = this.getUniformGroupData(e);
        e.buffer || (e.buffer = new Wn({
            data: new Float32Array(i.layout.size / 4),
            usage: it.UNIFORM | it.COPY_DST
        }));
        let o = null;
        return r || (r = e.buffer.data,
        o = e.buffer.dataInt32),
        n || (n = 0),
        i.syncFunction(e.uniforms, r, o, n),
        !0
    }
    updateUniformGroup(e) {
        if (e.isStatic && !e._dirtyId)
            return !1;
        e._dirtyId = 0;
        const r = this.syncUniformGroup(e);
        return e.buffer.update(),
        r
    }
    destroy() {
        this._syncFunctionHash = null
    }
}
const TI = {
    f32: 4,
    i32: 4,
    "vec2<f32>": 8,
    "vec3<f32>": 12,
    "vec4<f32>": 16,
    "vec2<i32>": 8,
    "vec3<i32>": 12,
    "vec4<i32>": 16,
    "mat2x2<f32>": 16 * 2,
    "mat3x3<f32>": 16 * 3,
    "mat4x4<f32>": 16 * 4
};
function ufe(t) {
    const e = t.map(o => ({
        data: o,
        offset: 0,
        size: 0
    }))
      , r = 16;
    let n = 0
      , i = 0;
    for (let o = 0; o < e.length; o++) {
        const s = e[o];
        if (n = TI[s.data.type],
        !n)
            throw new Error(`Unknown type ${s.data.type}`);
        s.data.size > 1 && (n = Math.max(n, r) * s.data.size);
        const a = n === 12 ? 16 : n;
        s.size = n;
        const l = i % r;
        l > 0 && r - l < a ? i += (r - l) % 16 : i += (n - l % n) % n,
        s.offset = i,
        i += n
    }
    return i = Math.ceil(i / 16) * 16,
    {
        uboElements: e,
        size: i
    }
}
const Ka = [{
    type: "mat3x3<f32>",
    test: t => t.value.a !== void 0,
    ubo: `
            var matrix = uv[name].toArray(true);
            data[offset] = matrix[0];
            data[offset + 1] = matrix[1];
            data[offset + 2] = matrix[2];
            data[offset + 4] = matrix[3];
            data[offset + 5] = matrix[4];
            data[offset + 6] = matrix[5];
            data[offset + 8] = matrix[6];
            data[offset + 9] = matrix[7];
            data[offset + 10] = matrix[8];
        `,
    uniform: `
            gl.uniformMatrix3fv(ud[name].location, false, uv[name].toArray(true));
        `
}, {
    type: "vec4<f32>",
    test: t => t.type === "vec4<f32>" && t.size === 1 && t.value.width !== void 0,
    ubo: `
            v = uv[name];
            data[offset] = v.x;
            data[offset + 1] = v.y;
            data[offset + 2] = v.width;
            data[offset + 3] = v.height;
        `,
    uniform: `
            cv = ud[name].value;
            v = uv[name];
            if (cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height) {
                cv[0] = v.x;
                cv[1] = v.y;
                cv[2] = v.width;
                cv[3] = v.height;
                gl.uniform4f(ud[name].location, v.x, v.y, v.width, v.height);
            }
        `
}, {
    type: "vec2<f32>",
    test: t => t.type === "vec2<f32>" && t.size === 1 && t.value.x !== void 0,
    ubo: `
            v = uv[name];
            data[offset] = v.x;
            data[offset + 1] = v.y;
        `,
    uniform: `
            cv = ud[name].value;
            v = uv[name];
            if (cv[0] !== v.x || cv[1] !== v.y) {
                cv[0] = v.x;
                cv[1] = v.y;
                gl.uniform2f(ud[name].location, v.x, v.y);
            }
        `
}, {
    type: "vec4<f32>",
    test: t => t.type === "vec4<f32>" && t.size === 1 && t.value.red !== void 0,
    ubo: `
            v = uv[name];
            data[offset] = v.red;
            data[offset + 1] = v.green;
            data[offset + 2] = v.blue;
            data[offset + 3] = v.alpha;
        `,
    uniform: `
            cv = ud[name].value;
            v = uv[name];
            if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha) {
                cv[0] = v.red;
                cv[1] = v.green;
                cv[2] = v.blue;
                cv[3] = v.alpha;
                gl.uniform4f(ud[name].location, v.red, v.green, v.blue, v.alpha);
            }
        `
}, {
    type: "vec3<f32>",
    test: t => t.type === "vec3<f32>" && t.size === 1 && t.value.red !== void 0,
    ubo: `
            v = uv[name];
            data[offset] = v.red;
            data[offset + 1] = v.green;
            data[offset + 2] = v.blue;
        `,
    uniform: `
            cv = ud[name].value;
            v = uv[name];
            if (cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue) {
                cv[0] = v.red;
                cv[1] = v.green;
                cv[2] = v.blue;
                gl.uniform3f(ud[name].location, v.red, v.green, v.blue);
            }
        `
}];
function DI(t, e, r, n) {
    const i = [`
        var v = null;
        var v2 = null;
        var t = 0;
        var index = 0;
        var name = null;
        var arrayOffset = null;
    `];
    let o = 0;
    for (let a = 0; a < t.length; a++) {
        const l = t[a]
          , c = l.data.name;
        let u = !1
          , f = 0;
        for (let d = 0; d < Ka.length; d++)
            if (Ka[d].test(l.data)) {
                f = l.offset / 4,
                i.push(`name = "${c}";`, `offset += ${f - o};`, Ka[d][e] || Ka[d].ubo),
                u = !0;
                break
            }
        if (!u)
            if (l.data.size > 1)
                f = l.offset / 4,
                i.push(r(l, f - o));
            else {
                const d = n[l.data.type];
                f = l.offset / 4,
                i.push(`
                    v = uv.${c};
                    offset += ${f - o};
                    ${d};
                `)
            }
        o = f
    }
    const s = i.join(`
`);
    return new Function("uv","data","dataInt32","offset",s)
}
function ac(t, e) {
    return `
        for (let i = 0; i < ${t * e}; i++) {
            data[offset + (((i / ${t})|0) * 4) + (i % ${t})] = v[i];
        }
    `
}
const FI = {
    f32: `
        data[offset] = v;`,
    i32: `
        dataInt32[offset] = v;`,
    "vec2<f32>": `
        data[offset] = v[0];
        data[offset + 1] = v[1];`,
    "vec3<f32>": `
        data[offset] = v[0];
        data[offset + 1] = v[1];
        data[offset + 2] = v[2];`,
    "vec4<f32>": `
        data[offset] = v[0];
        data[offset + 1] = v[1];
        data[offset + 2] = v[2];
        data[offset + 3] = v[3];`,
    "vec2<i32>": `
        dataInt32[offset] = v[0];
        dataInt32[offset + 1] = v[1];`,
    "vec3<i32>": `
        dataInt32[offset] = v[0];
        dataInt32[offset + 1] = v[1];
        dataInt32[offset + 2] = v[2];`,
    "vec4<i32>": `
        dataInt32[offset] = v[0];
        dataInt32[offset + 1] = v[1];
        dataInt32[offset + 2] = v[2];
        dataInt32[offset + 3] = v[3];`,
    "mat2x2<f32>": `
        data[offset] = v[0];
        data[offset + 1] = v[1];
        data[offset + 4] = v[2];
        data[offset + 5] = v[3];`,
    "mat3x3<f32>": `
        data[offset] = v[0];
        data[offset + 1] = v[1];
        data[offset + 2] = v[2];
        data[offset + 4] = v[3];
        data[offset + 5] = v[4];
        data[offset + 6] = v[5];
        data[offset + 8] = v[6];
        data[offset + 9] = v[7];
        data[offset + 10] = v[8];`,
    "mat4x4<f32>": `
        for (let i = 0; i < 16; i++) {
            data[offset + i] = v[i];
        }`,
    "mat3x2<f32>": ac(3, 2),
    "mat4x2<f32>": ac(4, 2),
    "mat2x3<f32>": ac(2, 3),
    "mat4x3<f32>": ac(4, 3),
    "mat2x4<f32>": ac(2, 4),
    "mat3x4<f32>": ac(3, 4)
}
  , ffe = {
    ...FI,
    "mat2x2<f32>": `
        data[offset] = v[0];
        data[offset + 1] = v[1];
        data[offset + 2] = v[2];
        data[offset + 3] = v[3];
    `
};
function dfe(t, e) {
    const r = Math.max(TI[t.data.type] / 16, 1)
      , n = t.data.value.length / t.data.size
      , i = (4 - n % 4) % 4
      , o = t.data.type.indexOf("i32") >= 0 ? "dataInt32" : "data";
    return `
        v = uv.${t.data.name};
        offset += ${e};

        arrayOffset = offset;

        t = 0;

        for(var i=0; i < ${t.data.size * r}; i++)
        {
            for(var j = 0; j < ${n}; j++)
            {
                ${o}[arrayOffset++] = v[t++];
            }
            ${i !== 0 ? `arrayOffset += ${i};` : ""}
        }
    `
}
function hfe(t) {
    return DI(t, "uboStd40", dfe, FI)
}
class PI extends SI {
    constructor() {
        super({
            createUboElements: ufe,
            generateUboSync: hfe
        })
    }
}
PI.extension = {
    type: [X.WebGLSystem],
    name: "ubo"
};
class xfe {
    constructor() {
        this._clearColorCache = [0, 0, 0, 0],
        this._viewPortCache = new mt
    }
    init(e, r) {
        this._renderer = e,
        this._renderTargetSystem = r,
        e.runners.contextChange.add(this)
    }
    contextChange() {
        this._clearColorCache = [0, 0, 0, 0],
        this._viewPortCache = new mt
    }
    copyToTexture(e, r, n, i, o) {
        const s = this._renderTargetSystem
          , a = this._renderer
          , l = s.getGpuRenderTarget(e)
          , c = a.gl;
        return this.finishRenderPass(e),
        c.bindFramebuffer(c.FRAMEBUFFER, l.resolveTargetFramebuffer),
        a.texture.bind(r, 0),
        c.copyTexSubImage2D(c.TEXTURE_2D, 0, o.x, o.y, n.x, n.y, i.width, i.height),
        r
    }
    startRenderPass(e, r=!0, n, i) {
        const o = this._renderTargetSystem
          , s = e.colorTexture
          , a = o.getGpuRenderTarget(e);
        let l = i.y;
        e.isRoot && (l = s.pixelHeight - i.height),
        e.colorTextures.forEach(f => {
            this._renderer.texture.unbind(f)
        }
        );
        const c = this._renderer.gl;
        c.bindFramebuffer(c.FRAMEBUFFER, a.framebuffer);
        const u = this._viewPortCache;
        (u.x !== i.x || u.y !== l || u.width !== i.width || u.height !== i.height) && (u.x = i.x,
        u.y = l,
        u.width = i.width,
        u.height = i.height,
        c.viewport(i.x, l, i.width, i.height)),
        !a.depthStencilRenderBuffer && (e.stencil || e.depth) && this._initStencil(a),
        this.clear(e, r, n)
    }
    finishRenderPass(e) {
        const n = this._renderTargetSystem.getGpuRenderTarget(e);
        if (!n.msaa)
            return;
        const i = this._renderer.gl;
        i.bindFramebuffer(i.FRAMEBUFFER, n.resolveTargetFramebuffer),
        i.bindFramebuffer(i.READ_FRAMEBUFFER, n.framebuffer),
        i.blitFramebuffer(0, 0, n.width, n.height, 0, 0, n.width, n.height, i.COLOR_BUFFER_BIT, i.NEAREST),
        i.bindFramebuffer(i.FRAMEBUFFER, n.framebuffer)
    }
    initGpuRenderTarget(e) {
        const n = this._renderer.gl
          , i = new cfe;
        return e.colorTexture instanceof ho ? (this._renderer.context.ensureCanvasSize(e.colorTexture.resource),
        i.framebuffer = null,
        i) : (this._initColor(e, i),
        n.bindFramebuffer(n.FRAMEBUFFER, null),
        i)
    }
    destroyGpuRenderTarget(e) {
        const r = this._renderer.gl;
        e.framebuffer && (r.deleteFramebuffer(e.framebuffer),
        e.framebuffer = null),
        e.resolveTargetFramebuffer && (r.deleteFramebuffer(e.resolveTargetFramebuffer),
        e.resolveTargetFramebuffer = null),
        e.depthStencilRenderBuffer && (r.deleteRenderbuffer(e.depthStencilRenderBuffer),
        e.depthStencilRenderBuffer = null),
        e.msaaRenderBuffer.forEach(n => {
            r.deleteRenderbuffer(n)
        }
        ),
        e.msaaRenderBuffer = null
    }
    clear(e, r, n) {
        if (!r)
            return;
        const i = this._renderTargetSystem;
        typeof r == "boolean" && (r = r ? Hn.ALL : Hn.NONE);
        const o = this._renderer.gl;
        if (r & Hn.COLOR) {
            n ?? (n = i.defaultClearColor);
            const s = this._clearColorCache
              , a = n;
            (s[0] !== a[0] || s[1] !== a[1] || s[2] !== a[2] || s[3] !== a[3]) && (s[0] = a[0],
            s[1] = a[1],
            s[2] = a[2],
            s[3] = a[3],
            o.clearColor(a[0], a[1], a[2], a[3]))
        }
        o.clear(r)
    }
    resizeGpuRenderTarget(e) {
        if (e.isRoot)
            return;
        const n = this._renderTargetSystem.getGpuRenderTarget(e);
        this._resizeColor(e, n),
        (e.stencil || e.depth) && this._resizeStencil(n)
    }
    _initColor(e, r) {
        const n = this._renderer
          , i = n.gl
          , o = i.createFramebuffer();
        if (r.resolveTargetFramebuffer = o,
        i.bindFramebuffer(i.FRAMEBUFFER, o),
        r.width = e.colorTexture.source.pixelWidth,
        r.height = e.colorTexture.source.pixelHeight,
        e.colorTextures.forEach( (s, a) => {
            const l = s.source;
            l.antialias && (n.context.supports.msaa ? r.msaa = !0 : Ne("[RenderTexture] Antialiasing on textures is not supported in WebGL1")),
            n.texture.bindSource(l, 0);
            const u = n.texture.getGlSource(l).texture;
            i.framebufferTexture2D(i.FRAMEBUFFER, i.COLOR_ATTACHMENT0 + a, 3553, u, 0)
        }
        ),
        r.msaa) {
            const s = i.createFramebuffer();
            r.framebuffer = s,
            i.bindFramebuffer(i.FRAMEBUFFER, s),
            e.colorTextures.forEach( (a, l) => {
                const c = i.createRenderbuffer();
                r.msaaRenderBuffer[l] = c
            }
            )
        } else
            r.framebuffer = o;
        this._resizeColor(e, r)
    }
    _resizeColor(e, r) {
        const n = e.colorTexture.source;
        if (r.width = n.pixelWidth,
        r.height = n.pixelHeight,
        e.colorTextures.forEach( (i, o) => {
            o !== 0 && i.source.resize(n.width, n.height, n._resolution)
        }
        ),
        r.msaa) {
            const i = this._renderer
              , o = i.gl
              , s = r.framebuffer;
            o.bindFramebuffer(o.FRAMEBUFFER, s),
            e.colorTextures.forEach( (a, l) => {
                const c = a.source;
                i.texture.bindSource(c, 0);
                const f = i.texture.getGlSource(c).internalFormat
                  , d = r.msaaRenderBuffer[l];
                o.bindRenderbuffer(o.RENDERBUFFER, d),
                o.renderbufferStorageMultisample(o.RENDERBUFFER, 4, f, c.pixelWidth, c.pixelHeight),
                o.framebufferRenderbuffer(o.FRAMEBUFFER, o.COLOR_ATTACHMENT0 + l, o.RENDERBUFFER, d)
            }
            )
        }
    }
    _initStencil(e) {
        if (e.framebuffer === null)
            return;
        const r = this._renderer.gl
          , n = r.createRenderbuffer();
        e.depthStencilRenderBuffer = n,
        r.bindRenderbuffer(r.RENDERBUFFER, n),
        r.framebufferRenderbuffer(r.FRAMEBUFFER, r.DEPTH_STENCIL_ATTACHMENT, r.RENDERBUFFER, n),
        this._resizeStencil(e)
    }
    _resizeStencil(e) {
        const r = this._renderer.gl;
        r.bindRenderbuffer(r.RENDERBUFFER, e.depthStencilRenderBuffer),
        e.msaa ? r.renderbufferStorageMultisample(r.RENDERBUFFER, 4, r.DEPTH24_STENCIL8, e.width, e.height) : r.renderbufferStorage(r.RENDERBUFFER, this._renderer.context.webGLVersion === 2 ? r.DEPTH24_STENCIL8 : r.DEPTH_STENCIL, e.width, e.height)
    }
    prerender(e) {
        const r = e.colorTexture.resource;
        this._renderer.context.multiView && ho.test(r) && this._renderer.context.ensureCanvasSize(r)
    }
    postrender(e) {
        if (this._renderer.context.multiView && ho.test(e.colorTexture.resource)) {
            const r = this._renderer.context.canvas
              , n = e.colorTexture;
            n.context2D.drawImage(r, 0, n.pixelHeight - r.height)
        }
    }
}
function pfe(t, e, r, n, i, o) {
    const s = o ? 1 : -1;
    return t.identity(),
    t.a = 1 / n * 2,
    t.d = s * (1 / i * 2),
    t.tx = -1 - e * t.a,
    t.ty = -s - r * t.d,
    t
}
const mc = new Map;
Cu.register(mc);
function II(t, e) {
    if (!mc.has(t)) {
        const r = new Be({
            source: new ho({
                resource: t,
                ...e
            })
        })
          , n = () => {
            mc.get(t) === r && mc.delete(t)
        }
        ;
        r.once("destroy", n),
        r.source.once("destroy", n),
        mc.set(t, r)
    }
    return mc.get(t)
}
function gfe(t) {
    const e = t.colorTexture.source.resource;
    return globalThis.HTMLCanvasElement && e instanceof HTMLCanvasElement && document.body.contains(e)
}
const OI = class kI {
    constructor(e={}) {
        if (this.uid = Tt("renderTarget"),
        this.colorTextures = [],
        this.dirtyId = 0,
        this.isRoot = !1,
        this._size = new Float32Array(2),
        this._managedColorTextures = !1,
        e = {
            ...kI.defaultOptions,
            ...e
        },
        this.stencil = e.stencil,
        this.depth = e.depth,
        this.isRoot = e.isRoot,
        typeof e.colorTextures == "number") {
            this._managedColorTextures = !0;
            for (let r = 0; r < e.colorTextures; r++)
                this.colorTextures.push(new Br({
                    width: e.width,
                    height: e.height,
                    resolution: e.resolution,
                    antialias: e.antialias
                }))
        } else {
            this.colorTextures = [...e.colorTextures.map(n => n.source)];
            const r = this.colorTexture.source;
            this.resize(r.width, r.height, r._resolution)
        }
        this.colorTexture.source.on("resize", this.onSourceResize, this),
        (e.depthStencilTexture || this.stencil) && (e.depthStencilTexture instanceof Be || e.depthStencilTexture instanceof Br ? this.depthStencilTexture = e.depthStencilTexture.source : this.ensureDepthStencilTexture())
    }
    get size() {
        const e = this._size;
        return e[0] = this.pixelWidth,
        e[1] = this.pixelHeight,
        e
    }
    get width() {
        return this.colorTexture.source.width
    }
    get height() {
        return this.colorTexture.source.height
    }
    get pixelWidth() {
        return this.colorTexture.source.pixelWidth
    }
    get pixelHeight() {
        return this.colorTexture.source.pixelHeight
    }
    get resolution() {
        return this.colorTexture.source._resolution
    }
    get colorTexture() {
        return this.colorTextures[0]
    }
    onSourceResize(e) {
        this.resize(e.width, e.height, e._resolution, !0)
    }
    ensureDepthStencilTexture() {
        this.depthStencilTexture || (this.depthStencilTexture = new Br({
            width: this.width,
            height: this.height,
            resolution: this.resolution,
            format: "depth24plus-stencil8",
            autoGenerateMipmaps: !1,
            antialias: !1,
            mipLevelCount: 1
        }))
    }
    resize(e, r, n=this.resolution, i=!1) {
        this.dirtyId++,
        this.colorTextures.forEach( (o, s) => {
            i && s === 0 || o.source.resize(e, r, n)
        }
        ),
        this.depthStencilTexture && this.depthStencilTexture.source.resize(e, r, n)
    }
    destroy() {
        this.colorTexture.source.off("resize", this.onSourceResize, this),
        this._managedColorTextures && this.colorTextures.forEach(e => {
            e.destroy()
        }
        ),
        this.depthStencilTexture && (this.depthStencilTexture.destroy(),
        delete this.depthStencilTexture)
    }
}
;
OI.defaultOptions = {
    width: 0,
    height: 0,
    resolution: 1,
    colorTextures: 1,
    stencil: !1,
    depth: !1,
    antialias: !1,
    isRoot: !1
};
let fE = OI;
class RI {
    constructor(e) {
        this.rootViewPort = new mt,
        this.viewport = new mt,
        this.onRenderTargetChange = new vP("onRenderTargetChange"),
        this.projectionMatrix = new Pe,
        this.defaultClearColor = [0, 0, 0, 0],
        this._renderSurfaceToRenderTargetHash = new Map,
        this._gpuRenderTargetHash = Object.create(null),
        this._renderTargetStack = [],
        this._renderer = e,
        e.renderableGC.addManagedHash(this, "_gpuRenderTargetHash")
    }
    finishRenderPass() {
        this.adaptor.finishRenderPass(this.renderTarget)
    }
    renderStart({target: e, clear: r, clearColor: n, frame: i}) {
        var o, s;
        this._renderTargetStack.length = 0,
        this.push(e, r, n, i),
        this.rootViewPort.copyFrom(this.viewport),
        this.rootRenderTarget = this.renderTarget,
        this.renderingToScreen = gfe(this.rootRenderTarget),
        (s = (o = this.adaptor).prerender) == null || s.call(o, this.rootRenderTarget)
    }
    postrender() {
        var e, r;
        (r = (e = this.adaptor).postrender) == null || r.call(e, this.rootRenderTarget)
    }
    bind(e, r=!0, n, i) {
        const o = this.getRenderTarget(e)
          , s = this.renderTarget !== o;
        this.renderTarget = o,
        this.renderSurface = e;
        const a = this.getGpuRenderTarget(o);
        (o.pixelWidth !== a.width || o.pixelHeight !== a.height) && (this.adaptor.resizeGpuRenderTarget(o),
        a.width = o.pixelWidth,
        a.height = o.pixelHeight);
        const l = o.colorTexture
          , c = this.viewport
          , u = l.pixelWidth
          , f = l.pixelHeight;
        if (!i && e instanceof Be && (i = e.frame),
        i) {
            const d = l._resolution;
            c.x = i.x * d + .5 | 0,
            c.y = i.y * d + .5 | 0,
            c.width = i.width * d + .5 | 0,
            c.height = i.height * d + .5 | 0
        } else
            c.x = 0,
            c.y = 0,
            c.width = u,
            c.height = f;
        return pfe(this.projectionMatrix, 0, 0, c.width / l.resolution, c.height / l.resolution, !o.isRoot),
        this.adaptor.startRenderPass(o, r, n, c),
        s && this.onRenderTargetChange.emit(o),
        o
    }
    clear(e, r=Hn.ALL, n) {
        r && (e && (e = this.getRenderTarget(e)),
        this.adaptor.clear(e || this.renderTarget, r, n, this.viewport))
    }
    contextChange() {
        this._gpuRenderTargetHash = Object.create(null)
    }
    push(e, r=Hn.ALL, n, i) {
        const o = this.bind(e, r, n, i);
        return this._renderTargetStack.push({
            renderTarget: o,
            frame: i
        }),
        o
    }
    pop() {
        this._renderTargetStack.pop();
        const e = this._renderTargetStack[this._renderTargetStack.length - 1];
        this.bind(e.renderTarget, !1, null, e.frame)
    }
    getRenderTarget(e) {
        return e.isTexture && (e = e.source),
        this._renderSurfaceToRenderTargetHash.get(e) ?? this._initRenderTarget(e)
    }
    copyToTexture(e, r, n, i, o) {
        n.x < 0 && (i.width += n.x,
        o.x -= n.x,
        n.x = 0),
        n.y < 0 && (i.height += n.y,
        o.y -= n.y,
        n.y = 0);
        const {pixelWidth: s, pixelHeight: a} = e;
        return i.width = Math.min(i.width, s - n.x),
        i.height = Math.min(i.height, a - n.y),
        this.adaptor.copyToTexture(e, r, n, i, o)
    }
    ensureDepthStencil() {
        this.renderTarget.stencil || (this.renderTarget.stencil = !0,
        this.adaptor.startRenderPass(this.renderTarget, !1, null, this.viewport))
    }
    destroy() {
        this._renderer = null,
        this._renderSurfaceToRenderTargetHash.forEach( (e, r) => {
            e !== r && e.destroy()
        }
        ),
        this._renderSurfaceToRenderTargetHash.clear(),
        this._gpuRenderTargetHash = Object.create(null)
    }
    _initRenderTarget(e) {
        let r = null;
        return ho.test(e) && (e = II(e).source),
        e instanceof fE ? r = e : e instanceof Br && (r = new fE({
            colorTextures: [e]
        }),
        e.source instanceof ho && (r.isRoot = !0),
        e.once("destroy", () => {
            r.destroy(),
            this._renderSurfaceToRenderTargetHash.delete(e);
            const n = this._gpuRenderTargetHash[r.uid];
            n && (this._gpuRenderTargetHash[r.uid] = null,
            this.adaptor.destroyGpuRenderTarget(n))
        }
        )),
        this._renderSurfaceToRenderTargetHash.set(e, r),
        r
    }
    getGpuRenderTarget(e) {
        return this._gpuRenderTargetHash[e.uid] || (this._gpuRenderTargetHash[e.uid] = this.adaptor.initGpuRenderTarget(e))
    }
    resetState() {
        this.renderTarget = null,
        this.renderSurface = null
    }
}
class MI extends RI {
    constructor(e) {
        super(e),
        this.adaptor = new xfe,
        this.adaptor.init(e, this)
    }
}
MI.extension = {
    type: [X.WebGLSystem],
    name: "renderTarget"
};
class Pb extends Qn {
    constructor({buffer: e, offset: r, size: n}) {
        super(),
        this.uid = Tt("buffer"),
        this._resourceType = "bufferResource",
        this._touched = 0,
        this._resourceId = Tt("resource"),
        this._bufferResource = !0,
        this.destroyed = !1,
        this.buffer = e,
        this.offset = r | 0,
        this.size = n,
        this.buffer.on("change", this.onBufferChange, this)
    }
    onBufferChange() {
        this._resourceId = Tt("resource"),
        this.emit("change", this)
    }
    destroy(e=!1) {
        this.destroyed = !0,
        e && this.buffer.destroy(),
        this.emit("change", this),
        this.buffer = null,
        this.removeAllListeners()
    }
}
function mfe(t, e) {
    const r = []
      , n = [`
        var g = s.groups;
        var sS = r.shader;
        var p = s.glProgram;
        var ugS = r.uniformGroup;
        var resources;
    `];
    let i = !1
      , o = 0;
    const s = e._getProgramData(t.glProgram);
    for (const l in t.groups) {
        const c = t.groups[l];
        r.push(`
            resources = g[${l}].resources;
        `);
        for (const u in c.resources) {
            const f = c.resources[u];
            if (f instanceof gn)
                if (f.ubo) {
                    const d = t._uniformBindMap[l][Number(u)];
                    r.push(`
                        sS.bindUniformBlock(
                            resources[${u}],
                            '${d}',
                            ${t.glProgram._uniformBlockData[d].index}
                        );
                    `)
                } else
                    r.push(`
                        ugS.updateUniformGroup(resources[${u}], p, sD);
                    `);
            else if (f instanceof Pb) {
                const d = t._uniformBindMap[l][Number(u)];
                r.push(`
                    sS.bindUniformBlock(
                        resources[${u}],
                        '${d}',
                        ${t.glProgram._uniformBlockData[d].index}
                    );
                `)
            } else if (f instanceof Br) {
                const d = t._uniformBindMap[l][u]
                  , h = s.uniformData[d];
                h && (i || (i = !0,
                n.push(`
                        var tS = r.texture;
                        `)),
                e._gl.uniform1i(h.location, o),
                r.push(`
                        tS.bind(resources[${u}], ${o});
                    `),
                o++)
            }
        }
    }
    const a = [...n, ...r].join(`
`);
    return new Function("r","s","sD",a)
}
class vfe {
    constructor(e, r) {
        this.program = e,
        this.uniformData = r,
        this.uniformGroups = {},
        this.uniformDirtyGroups = {},
        this.uniformBlockBindings = {}
    }
    destroy() {
        this.uniformData = null,
        this.uniformGroups = null,
        this.uniformDirtyGroups = null,
        this.uniformBlockBindings = null,
        this.program = null
    }
}
function b3(t, e, r) {
    const n = t.createShader(e);
    return t.shaderSource(n, r),
    t.compileShader(n),
    n
}
function tm(t) {
    const e = new Array(t);
    for (let r = 0; r < e.length; r++)
        e[r] = !1;
    return e
}
function NI(t, e) {
    switch (t) {
    case "float":
        return 0;
    case "vec2":
        return new Float32Array(2 * e);
    case "vec3":
        return new Float32Array(3 * e);
    case "vec4":
        return new Float32Array(4 * e);
    case "int":
    case "uint":
    case "sampler2D":
    case "sampler2DArray":
        return 0;
    case "ivec2":
        return new Int32Array(2 * e);
    case "ivec3":
        return new Int32Array(3 * e);
    case "ivec4":
        return new Int32Array(4 * e);
    case "uvec2":
        return new Uint32Array(2 * e);
    case "uvec3":
        return new Uint32Array(3 * e);
    case "uvec4":
        return new Uint32Array(4 * e);
    case "bool":
        return !1;
    case "bvec2":
        return tm(2 * e);
    case "bvec3":
        return tm(3 * e);
    case "bvec4":
        return tm(4 * e);
    case "mat2":
        return new Float32Array([1, 0, 0, 1]);
    case "mat3":
        return new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]);
    case "mat4":
        return new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1])
    }
    return null
}
let yh = null;
const C3 = {
    FLOAT: "float",
    FLOAT_VEC2: "vec2",
    FLOAT_VEC3: "vec3",
    FLOAT_VEC4: "vec4",
    INT: "int",
    INT_VEC2: "ivec2",
    INT_VEC3: "ivec3",
    INT_VEC4: "ivec4",
    UNSIGNED_INT: "uint",
    UNSIGNED_INT_VEC2: "uvec2",
    UNSIGNED_INT_VEC3: "uvec3",
    UNSIGNED_INT_VEC4: "uvec4",
    BOOL: "bool",
    BOOL_VEC2: "bvec2",
    BOOL_VEC3: "bvec3",
    BOOL_VEC4: "bvec4",
    FLOAT_MAT2: "mat2",
    FLOAT_MAT3: "mat3",
    FLOAT_MAT4: "mat4",
    SAMPLER_2D: "sampler2D",
    INT_SAMPLER_2D: "sampler2D",
    UNSIGNED_INT_SAMPLER_2D: "sampler2D",
    SAMPLER_CUBE: "samplerCube",
    INT_SAMPLER_CUBE: "samplerCube",
    UNSIGNED_INT_SAMPLER_CUBE: "samplerCube",
    SAMPLER_2D_ARRAY: "sampler2DArray",
    INT_SAMPLER_2D_ARRAY: "sampler2DArray",
    UNSIGNED_INT_SAMPLER_2D_ARRAY: "sampler2DArray"
}
  , yfe = {
    float: "float32",
    vec2: "float32x2",
    vec3: "float32x3",
    vec4: "float32x4",
    int: "sint32",
    ivec2: "sint32x2",
    ivec3: "sint32x3",
    ivec4: "sint32x4",
    uint: "uint32",
    uvec2: "uint32x2",
    uvec3: "uint32x3",
    uvec4: "uint32x4",
    bool: "uint32",
    bvec2: "uint32x2",
    bvec3: "uint32x3",
    bvec4: "uint32x4"
};
function LI(t, e) {
    if (!yh) {
        const r = Object.keys(C3);
        yh = {};
        for (let n = 0; n < r.length; ++n) {
            const i = r[n];
            yh[t[i]] = C3[i]
        }
    }
    return yh[e]
}
function Efe(t, e) {
    const r = LI(t, e);
    return yfe[r] || "float32"
}
function _fe(t, e, r=!1) {
    const n = {}
      , i = e.getProgramParameter(t, e.ACTIVE_ATTRIBUTES);
    for (let s = 0; s < i; s++) {
        const a = e.getActiveAttrib(t, s);
        if (a.name.startsWith("gl_"))
            continue;
        const l = Efe(e, a.type);
        n[a.name] = {
            location: 0,
            format: l,
            stride: fa(l).stride,
            offset: 0,
            instance: !1,
            start: 0
        }
    }
    const o = Object.keys(n);
    if (r) {
        o.sort( (s, a) => s > a ? 1 : -1);
        for (let s = 0; s < o.length; s++)
            n[o[s]].location = s,
            e.bindAttribLocation(t, s, o[s]);
        e.linkProgram(t)
    } else
        for (let s = 0; s < o.length; s++)
            n[o[s]].location = e.getAttribLocation(t, o[s]);
    return n
}
function bfe(t, e) {
    if (!e.ACTIVE_UNIFORM_BLOCKS)
        return {};
    const r = {}
      , n = e.getProgramParameter(t, e.ACTIVE_UNIFORM_BLOCKS);
    for (let i = 0; i < n; i++) {
        const o = e.getActiveUniformBlockName(t, i)
          , s = e.getUniformBlockIndex(t, o)
          , a = e.getActiveUniformBlockParameter(t, i, e.UNIFORM_BLOCK_DATA_SIZE);
        r[o] = {
            name: o,
            index: s,
            size: a
        }
    }
    return r
}
function Cfe(t, e) {
    const r = {}
      , n = e.getProgramParameter(t, e.ACTIVE_UNIFORMS);
    for (let i = 0; i < n; i++) {
        const o = e.getActiveUniform(t, i)
          , s = o.name.replace(/\[.*?\]$/, "")
          , a = !!o.name.match(/\[.*?\]$/)
          , l = LI(e, o.type);
        r[s] = {
            name: s,
            index: i,
            type: l,
            size: o.size,
            isArray: a,
            value: NI(l, o.size)
        }
    }
    return r
}
function A3(t, e) {
    const r = t.getShaderSource(e).split(`
`).map( (c, u) => `${u}: ${c}`)
      , n = t.getShaderInfoLog(e)
      , i = n.split(`
`)
      , o = {}
      , s = i.map(c => parseFloat(c.replace(/^ERROR\: 0\:([\d]+)\:.*$/, "$1"))).filter(c => c && !o[c] ? (o[c] = !0,
    !0) : !1)
      , a = [""];
    s.forEach(c => {
        r[c - 1] = `%c${r[c - 1]}%c`,
        a.push("background: #FF0000; color:#FFFFFF; font-size: 10px", "font-size: 10px")
    }
    );
    const l = r.join(`
`);
    a[0] = l,
    console.error(n),
    console.groupCollapsed("click to view full shader code"),
    console.warn(...a),
    console.groupEnd()
}
function Afe(t, e, r, n) {
    t.getProgramParameter(e, t.LINK_STATUS) || (t.getShaderParameter(r, t.COMPILE_STATUS) || A3(t, r),
    t.getShaderParameter(n, t.COMPILE_STATUS) || A3(t, n),
    console.error("PixiJS Error: Could not initialize shader."),
    t.getProgramInfoLog(e) !== "" && console.warn("PixiJS Warning: gl.getProgramInfoLog()", t.getProgramInfoLog(e)))
}
function wfe(t, e) {
    const r = b3(t, t.VERTEX_SHADER, e.vertex)
      , n = b3(t, t.FRAGMENT_SHADER, e.fragment)
      , i = t.createProgram();
    t.attachShader(i, r),
    t.attachShader(i, n);
    const o = e.transformFeedbackVaryings;
    o && (typeof t.transformFeedbackVaryings != "function" ? Ne("TransformFeedback is not supported but TransformFeedbackVaryings are given.") : t.transformFeedbackVaryings(i, o.names, o.bufferMode === "separate" ? t.SEPARATE_ATTRIBS : t.INTERLEAVED_ATTRIBS)),
    t.linkProgram(i),
    t.getProgramParameter(i, t.LINK_STATUS) || Afe(t, i, r, n),
    e._attributeData = _fe(i, t, !/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertex)),
    e._uniformData = Cfe(i, t),
    e._uniformBlockData = bfe(i, t),
    t.deleteShader(r),
    t.deleteShader(n);
    const s = {};
    for (const l in e._uniformData) {
        const c = e._uniformData[l];
        s[l] = {
            location: t.getUniformLocation(i, l),
            value: NI(c.type, c.size)
        }
    }
    return new vfe(i,s)
}
const Eh = {
    textureCount: 0,
    blockIndex: 0
};
class $I {
    constructor(e) {
        this._activeProgram = null,
        this._programDataHash = Object.create(null),
        this._shaderSyncFunctions = Object.create(null),
        this._renderer = e,
        this._renderer.renderableGC.addManagedHash(this, "_programDataHash")
    }
    contextChange(e) {
        this._gl = e,
        this._programDataHash = Object.create(null),
        this._shaderSyncFunctions = Object.create(null),
        this._activeProgram = null
    }
    bind(e, r) {
        if (this._setProgram(e.glProgram),
        r)
            return;
        Eh.textureCount = 0,
        Eh.blockIndex = 0;
        let n = this._shaderSyncFunctions[e.glProgram._key];
        n || (n = this._shaderSyncFunctions[e.glProgram._key] = this._generateShaderSync(e, this)),
        this._renderer.buffer.nextBindBase(!!e.glProgram.transformFeedbackVaryings),
        n(this._renderer, e, Eh)
    }
    updateUniformGroup(e) {
        this._renderer.uniformGroup.updateUniformGroup(e, this._activeProgram, Eh)
    }
    bindUniformBlock(e, r, n=0) {
        const i = this._renderer.buffer
          , o = this._getProgramData(this._activeProgram)
          , s = e._bufferResource;
        s || this._renderer.ubo.updateUniformGroup(e);
        const a = e.buffer
          , l = i.updateBuffer(a)
          , c = i.freeLocationForBufferBase(l);
        if (s) {
            const {offset: f, size: d} = e;
            f === 0 && d === a.data.byteLength ? i.bindBufferBase(l, c) : i.bindBufferRange(l, c, f)
        } else
            i.getLastBindBaseLocation(l) !== c && i.bindBufferBase(l, c);
        const u = this._activeProgram._uniformBlockData[r].index;
        o.uniformBlockBindings[n] !== c && (o.uniformBlockBindings[n] = c,
        this._renderer.gl.uniformBlockBinding(o.program, u, c))
    }
    _setProgram(e) {
        if (this._activeProgram === e)
            return;
        this._activeProgram = e;
        const r = this._getProgramData(e);
        this._gl.useProgram(r.program)
    }
    _getProgramData(e) {
        return this._programDataHash[e._key] || this._createProgramData(e)
    }
    _createProgramData(e) {
        const r = e._key;
        return this._programDataHash[r] = wfe(this._gl, e),
        this._programDataHash[r]
    }
    destroy() {
        for (const e of Object.keys(this._programDataHash))
            this._programDataHash[e].destroy(),
            this._programDataHash[e] = null;
        this._programDataHash = null,
        this._shaderSyncFunctions = null,
        this._activeProgram = null,
        this._renderer = null,
        this._gl = null
    }
    _generateShaderSync(e, r) {
        return mfe(e, r)
    }
    resetState() {
        this._activeProgram = null
    }
}
$I.extension = {
    type: [X.WebGLSystem],
    name: "shader"
};
const Bfe = {
    f32: `if (cv !== v) {
            cu.value = v;
            gl.uniform1f(location, v);
        }`,
    "vec2<f32>": `if (cv[0] !== v[0] || cv[1] !== v[1]) {
            cv[0] = v[0];
            cv[1] = v[1];
            gl.uniform2f(location, v[0], v[1]);
        }`,
    "vec3<f32>": `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
            cv[0] = v[0];
            cv[1] = v[1];
            cv[2] = v[2];
            gl.uniform3f(location, v[0], v[1], v[2]);
        }`,
    "vec4<f32>": `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
            cv[0] = v[0];
            cv[1] = v[1];
            cv[2] = v[2];
            cv[3] = v[3];
            gl.uniform4f(location, v[0], v[1], v[2], v[3]);
        }`,
    i32: `if (cv !== v) {
            cu.value = v;
            gl.uniform1i(location, v);
        }`,
    "vec2<i32>": `if (cv[0] !== v[0] || cv[1] !== v[1]) {
            cv[0] = v[0];
            cv[1] = v[1];
            gl.uniform2i(location, v[0], v[1]);
        }`,
    "vec3<i32>": `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
            cv[0] = v[0];
            cv[1] = v[1];
            cv[2] = v[2];
            gl.uniform3i(location, v[0], v[1], v[2]);
        }`,
    "vec4<i32>": `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
            cv[0] = v[0];
            cv[1] = v[1];
            cv[2] = v[2];
            cv[3] = v[3];
            gl.uniform4i(location, v[0], v[1], v[2], v[3]);
        }`,
    u32: `if (cv !== v) {
            cu.value = v;
            gl.uniform1ui(location, v);
        }`,
    "vec2<u32>": `if (cv[0] !== v[0] || cv[1] !== v[1]) {
            cv[0] = v[0];
            cv[1] = v[1];
            gl.uniform2ui(location, v[0], v[1]);
        }`,
    "vec3<u32>": `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
            cv[0] = v[0];
            cv[1] = v[1];
            cv[2] = v[2];
            gl.uniform3ui(location, v[0], v[1], v[2]);
        }`,
    "vec4<u32>": `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
            cv[0] = v[0];
            cv[1] = v[1];
            cv[2] = v[2];
            cv[3] = v[3];
            gl.uniform4ui(location, v[0], v[1], v[2], v[3]);
        }`,
    bool: `if (cv !== v) {
            cu.value = v;
            gl.uniform1i(location, v);
        }`,
    "vec2<bool>": `if (cv[0] !== v[0] || cv[1] !== v[1]) {
            cv[0] = v[0];
            cv[1] = v[1];
            gl.uniform2i(location, v[0], v[1]);
        }`,
    "vec3<bool>": `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
            cv[0] = v[0];
            cv[1] = v[1];
            cv[2] = v[2];
            gl.uniform3i(location, v[0], v[1], v[2]);
        }`,
    "vec4<bool>": `if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
            cv[0] = v[0];
            cv[1] = v[1];
            cv[2] = v[2];
            cv[3] = v[3];
            gl.uniform4i(location, v[0], v[1], v[2], v[3]);
        }`,
    "mat2x2<f32>": "gl.uniformMatrix2fv(location, false, v);",
    "mat3x3<f32>": "gl.uniformMatrix3fv(location, false, v);",
    "mat4x4<f32>": "gl.uniformMatrix4fv(location, false, v);"
}
  , Sfe = {
    f32: "gl.uniform1fv(location, v);",
    "vec2<f32>": "gl.uniform2fv(location, v);",
    "vec3<f32>": "gl.uniform3fv(location, v);",
    "vec4<f32>": "gl.uniform4fv(location, v);",
    "mat2x2<f32>": "gl.uniformMatrix2fv(location, false, v);",
    "mat3x3<f32>": "gl.uniformMatrix3fv(location, false, v);",
    "mat4x4<f32>": "gl.uniformMatrix4fv(location, false, v);",
    i32: "gl.uniform1iv(location, v);",
    "vec2<i32>": "gl.uniform2iv(location, v);",
    "vec3<i32>": "gl.uniform3iv(location, v);",
    "vec4<i32>": "gl.uniform4iv(location, v);",
    u32: "gl.uniform1iv(location, v);",
    "vec2<u32>": "gl.uniform2iv(location, v);",
    "vec3<u32>": "gl.uniform3iv(location, v);",
    "vec4<u32>": "gl.uniform4iv(location, v);",
    bool: "gl.uniform1iv(location, v);",
    "vec2<bool>": "gl.uniform2iv(location, v);",
    "vec3<bool>": "gl.uniform3iv(location, v);",
    "vec4<bool>": "gl.uniform4iv(location, v);"
};
function Tfe(t, e) {
    const r = [`
        var v = null;
        var cv = null;
        var cu = null;
        var t = 0;
        var gl = renderer.gl;
        var name = null;
    `];
    for (const n in t.uniforms) {
        if (!e[n]) {
            t.uniforms[n]instanceof gn ? t.uniforms[n].ubo ? r.push(`
                        renderer.shader.bindUniformBlock(uv.${n}, "${n}");
                    `) : r.push(`
                        renderer.shader.updateUniformGroup(uv.${n});
                    `) : t.uniforms[n]instanceof Pb && r.push(`
                        renderer.shader.bindBufferResource(uv.${n}, "${n}");
                    `);
            continue
        }
        const i = t.uniformStructures[n];
        let o = !1;
        for (let s = 0; s < Ka.length; s++) {
            const a = Ka[s];
            if (i.type === a.type && a.test(i)) {
                r.push(`name = "${n}";`, Ka[s].uniform),
                o = !0;
                break
            }
        }
        if (!o) {
            const a = (i.size === 1 ? Bfe : Sfe)[i.type].replace("location", `ud["${n}"].location`);
            r.push(`
            cu = ud["${n}"];
            cv = cu.value;
            v = uv["${n}"];
            ${a};`)
        }
    }
    return new Function("ud","uv","renderer","syncData",r.join(`
`))
}
class UI {
    constructor(e) {
        this._cache = {},
        this._uniformGroupSyncHash = {},
        this._renderer = e,
        this.gl = null,
        this._cache = {}
    }
    contextChange(e) {
        this.gl = e
    }
    updateUniformGroup(e, r, n) {
        const i = this._renderer.shader._getProgramData(r);
        (!e.isStatic || e._dirtyId !== i.uniformDirtyGroups[e.uid]) && (i.uniformDirtyGroups[e.uid] = e._dirtyId,
        this._getUniformSyncFunction(e, r)(i.uniformData, e.uniforms, this._renderer, n))
    }
    _getUniformSyncFunction(e, r) {
        var n;
        return ((n = this._uniformGroupSyncHash[e._signature]) == null ? void 0 : n[r._key]) || this._createUniformSyncFunction(e, r)
    }
    _createUniformSyncFunction(e, r) {
        const n = this._uniformGroupSyncHash[e._signature] || (this._uniformGroupSyncHash[e._signature] = {})
          , i = this._getSignature(e, r._uniformData, "u");
        return this._cache[i] || (this._cache[i] = this._generateUniformsSync(e, r._uniformData)),
        n[r._key] = this._cache[i],
        n[r._key]
    }
    _generateUniformsSync(e, r) {
        return Tfe(e, r)
    }
    _getSignature(e, r, n) {
        const i = e.uniforms
          , o = [`${n}-`];
        for (const s in i)
            o.push(s),
            r[s] && o.push(r[s].type);
        return o.join("-")
    }
    destroy() {
        this._renderer = null,
        this._cache = null
    }
}
UI.extension = {
    type: [X.WebGLSystem],
    name: "uniformGroup"
};
function Dfe(t) {
    const e = {};
    if (e.normal = [t.ONE, t.ONE_MINUS_SRC_ALPHA],
    e.add = [t.ONE, t.ONE],
    e.multiply = [t.DST_COLOR, t.ONE_MINUS_SRC_ALPHA, t.ONE, t.ONE_MINUS_SRC_ALPHA],
    e.screen = [t.ONE, t.ONE_MINUS_SRC_COLOR, t.ONE, t.ONE_MINUS_SRC_ALPHA],
    e.none = [0, 0],
    e["normal-npm"] = [t.SRC_ALPHA, t.ONE_MINUS_SRC_ALPHA, t.ONE, t.ONE_MINUS_SRC_ALPHA],
    e["add-npm"] = [t.SRC_ALPHA, t.ONE, t.ONE, t.ONE],
    e["screen-npm"] = [t.SRC_ALPHA, t.ONE_MINUS_SRC_COLOR, t.ONE, t.ONE_MINUS_SRC_ALPHA],
    e.erase = [t.ZERO, t.ONE_MINUS_SRC_ALPHA],
    !(t instanceof je.get().getWebGLRenderingContext()))
        e.min = [t.ONE, t.ONE, t.ONE, t.ONE, t.MIN, t.MIN],
        e.max = [t.ONE, t.ONE, t.ONE, t.ONE, t.MAX, t.MAX];
    else {
        const n = t.getExtension("EXT_blend_minmax");
        n && (e.min = [t.ONE, t.ONE, t.ONE, t.ONE, n.MIN_EXT, n.MIN_EXT],
        e.max = [t.ONE, t.ONE, t.ONE, t.ONE, n.MAX_EXT, n.MAX_EXT])
    }
    return e
}
const Ffe = 0
  , Pfe = 1
  , Ife = 2
  , Ofe = 3
  , kfe = 4
  , Rfe = 5
  , GI = class dE {
    constructor(e) {
        this._invertFrontFace = !1,
        this.gl = null,
        this.stateId = 0,
        this.polygonOffset = 0,
        this.blendMode = "none",
        this._blendEq = !1,
        this.map = [],
        this.map[Ffe] = this.setBlend,
        this.map[Pfe] = this.setOffset,
        this.map[Ife] = this.setCullFace,
        this.map[Ofe] = this.setDepthTest,
        this.map[kfe] = this.setFrontFace,
        this.map[Rfe] = this.setDepthMask,
        this.checks = [],
        this.defaultState = Ui.for2d(),
        e.renderTarget.onRenderTargetChange.add(this)
    }
    onRenderTargetChange(e) {
        this._invertFrontFace = !e.isRoot,
        this._cullFace ? this.setFrontFace(this._frontFace) : this._frontFaceDirty = !0
    }
    contextChange(e) {
        this.gl = e,
        this.blendModesMap = Dfe(e),
        this.resetState()
    }
    set(e) {
        if (e || (e = this.defaultState),
        this.stateId !== e.data) {
            let r = this.stateId ^ e.data
              , n = 0;
            for (; r; )
                r & 1 && this.map[n].call(this, !!(e.data & 1 << n)),
                r >>= 1,
                n++;
            this.stateId = e.data
        }
        for (let r = 0; r < this.checks.length; r++)
            this.checks[r](this, e)
    }
    forceState(e) {
        e || (e = this.defaultState);
        for (let r = 0; r < this.map.length; r++)
            this.map[r].call(this, !!(e.data & 1 << r));
        for (let r = 0; r < this.checks.length; r++)
            this.checks[r](this, e);
        this.stateId = e.data
    }
    setBlend(e) {
        this._updateCheck(dE._checkBlendMode, e),
        this.gl[e ? "enable" : "disable"](this.gl.BLEND)
    }
    setOffset(e) {
        this._updateCheck(dE._checkPolygonOffset, e),
        this.gl[e ? "enable" : "disable"](this.gl.POLYGON_OFFSET_FILL)
    }
    setDepthTest(e) {
        this.gl[e ? "enable" : "disable"](this.gl.DEPTH_TEST)
    }
    setDepthMask(e) {
        this.gl.depthMask(e)
    }
    setCullFace(e) {
        this._cullFace = e,
        this.gl[e ? "enable" : "disable"](this.gl.CULL_FACE),
        this._cullFace && this._frontFaceDirty && this.setFrontFace(this._frontFace)
    }
    setFrontFace(e) {
        this._frontFace = e,
        this._frontFaceDirty = !1;
        const r = this._invertFrontFace ? !e : e;
        this._glFrontFace !== r && (this._glFrontFace = r,
        this.gl.frontFace(this.gl[r ? "CW" : "CCW"]))
    }
    setBlendMode(e) {
        if (this.blendModesMap[e] || (e = "normal"),
        e === this.blendMode)
            return;
        this.blendMode = e;
        const r = this.blendModesMap[e]
          , n = this.gl;
        r.length === 2 ? n.blendFunc(r[0], r[1]) : n.blendFuncSeparate(r[0], r[1], r[2], r[3]),
        r.length === 6 ? (this._blendEq = !0,
        n.blendEquationSeparate(r[4], r[5])) : this._blendEq && (this._blendEq = !1,
        n.blendEquationSeparate(n.FUNC_ADD, n.FUNC_ADD))
    }
    setPolygonOffset(e, r) {
        this.gl.polygonOffset(e, r)
    }
    resetState() {
        this._glFrontFace = !1,
        this._frontFace = !1,
        this._cullFace = !1,
        this._frontFaceDirty = !1,
        this._invertFrontFace = !1,
        this.gl.frontFace(this.gl.CCW),
        this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL, !1),
        this.forceState(this.defaultState),
        this._blendEq = !0,
        this.blendMode = "",
        this.setBlendMode("normal")
    }
    _updateCheck(e, r) {
        const n = this.checks.indexOf(e);
        r && n === -1 ? this.checks.push(e) : !r && n !== -1 && this.checks.splice(n, 1)
    }
    static _checkBlendMode(e, r) {
        e.setBlendMode(r.blendMode)
    }
    static _checkPolygonOffset(e, r) {
        e.setPolygonOffset(1, r.polygonOffset)
    }
    destroy() {
        this.gl = null,
        this.checks.length = 0
    }
}
;
GI.extension = {
    type: [X.WebGLSystem],
    name: "state"
};
let Mfe = GI;
class Nfe {
    constructor(e) {
        this.target = EI.TEXTURE_2D,
        this.texture = e,
        this.width = -1,
        this.height = -1,
        this.type = ut.UNSIGNED_BYTE,
        this.internalFormat = uE.RGBA,
        this.format = uE.RGBA,
        this.samplerType = 0
    }
}
const Lfe = {
    id: "buffer",
    upload(t, e, r) {
        e.width === t.width || e.height === t.height ? r.texSubImage2D(r.TEXTURE_2D, 0, 0, 0, t.width, t.height, e.format, e.type, t.resource) : r.texImage2D(e.target, 0, e.internalFormat, t.width, t.height, 0, e.format, e.type, t.resource),
        e.width = t.width,
        e.height = t.height
    }
}
  , $fe = {
    "bc1-rgba-unorm": !0,
    "bc1-rgba-unorm-srgb": !0,
    "bc2-rgba-unorm": !0,
    "bc2-rgba-unorm-srgb": !0,
    "bc3-rgba-unorm": !0,
    "bc3-rgba-unorm-srgb": !0,
    "bc4-r-unorm": !0,
    "bc4-r-snorm": !0,
    "bc5-rg-unorm": !0,
    "bc5-rg-snorm": !0,
    "bc6h-rgb-ufloat": !0,
    "bc6h-rgb-float": !0,
    "bc7-rgba-unorm": !0,
    "bc7-rgba-unorm-srgb": !0,
    "etc2-rgb8unorm": !0,
    "etc2-rgb8unorm-srgb": !0,
    "etc2-rgb8a1unorm": !0,
    "etc2-rgb8a1unorm-srgb": !0,
    "etc2-rgba8unorm": !0,
    "etc2-rgba8unorm-srgb": !0,
    "eac-r11unorm": !0,
    "eac-r11snorm": !0,
    "eac-rg11unorm": !0,
    "eac-rg11snorm": !0,
    "astc-4x4-unorm": !0,
    "astc-4x4-unorm-srgb": !0,
    "astc-5x4-unorm": !0,
    "astc-5x4-unorm-srgb": !0,
    "astc-5x5-unorm": !0,
    "astc-5x5-unorm-srgb": !0,
    "astc-6x5-unorm": !0,
    "astc-6x5-unorm-srgb": !0,
    "astc-6x6-unorm": !0,
    "astc-6x6-unorm-srgb": !0,
    "astc-8x5-unorm": !0,
    "astc-8x5-unorm-srgb": !0,
    "astc-8x6-unorm": !0,
    "astc-8x6-unorm-srgb": !0,
    "astc-8x8-unorm": !0,
    "astc-8x8-unorm-srgb": !0,
    "astc-10x5-unorm": !0,
    "astc-10x5-unorm-srgb": !0,
    "astc-10x6-unorm": !0,
    "astc-10x6-unorm-srgb": !0,
    "astc-10x8-unorm": !0,
    "astc-10x8-unorm-srgb": !0,
    "astc-10x10-unorm": !0,
    "astc-10x10-unorm-srgb": !0,
    "astc-12x10-unorm": !0,
    "astc-12x10-unorm-srgb": !0,
    "astc-12x12-unorm": !0,
    "astc-12x12-unorm-srgb": !0
}
  , Ufe = {
    id: "compressed",
    upload(t, e, r) {
        r.pixelStorei(r.UNPACK_ALIGNMENT, 4);
        let n = t.pixelWidth
          , i = t.pixelHeight;
        const o = !!$fe[t.format];
        for (let s = 0; s < t.resource.length; s++) {
            const a = t.resource[s];
            o ? r.compressedTexImage2D(r.TEXTURE_2D, s, e.internalFormat, n, i, 0, a) : r.texImage2D(r.TEXTURE_2D, s, e.internalFormat, n, i, 0, e.format, e.type, a),
            n = Math.max(n >> 1, 1),
            i = Math.max(i >> 1, 1)
        }
    }
}
  , HI = {
    id: "image",
    upload(t, e, r, n) {
        const i = e.width
          , o = e.height
          , s = t.pixelWidth
          , a = t.pixelHeight
          , l = t.resourceWidth
          , c = t.resourceHeight;
        l < s || c < a ? ((i !== s || o !== a) && r.texImage2D(e.target, 0, e.internalFormat, s, a, 0, e.format, e.type, null),
        n === 2 ? r.texSubImage2D(r.TEXTURE_2D, 0, 0, 0, l, c, e.format, e.type, t.resource) : r.texSubImage2D(r.TEXTURE_2D, 0, 0, 0, e.format, e.type, t.resource)) : i === s && o === a ? r.texSubImage2D(r.TEXTURE_2D, 0, 0, 0, e.format, e.type, t.resource) : n === 2 ? r.texImage2D(e.target, 0, e.internalFormat, s, a, 0, e.format, e.type, t.resource) : r.texImage2D(e.target, 0, e.internalFormat, e.format, e.type, t.resource),
        e.width = s,
        e.height = a
    }
}
  , Gfe = {
    id: "video",
    upload(t, e, r, n) {
        if (!t.isValid) {
            r.texImage2D(e.target, 0, e.internalFormat, 1, 1, 0, e.format, e.type, null);
            return
        }
        HI.upload(t, e, r, n)
    }
}
  , w3 = {
    linear: 9729,
    nearest: 9728
}
  , Hfe = {
    linear: {
        linear: 9987,
        nearest: 9985
    },
    nearest: {
        linear: 9986,
        nearest: 9984
    }
}
  , rm = {
    "clamp-to-edge": 33071,
    repeat: 10497,
    "mirror-repeat": 33648
}
  , Vfe = {
    never: 512,
    less: 513,
    equal: 514,
    "less-equal": 515,
    greater: 516,
    "not-equal": 517,
    "greater-equal": 518,
    always: 519
};
function B3(t, e, r, n, i, o, s, a) {
    const l = o;
    if (!a || t.addressModeU !== "repeat" || t.addressModeV !== "repeat" || t.addressModeW !== "repeat") {
        const c = rm[s ? "clamp-to-edge" : t.addressModeU]
          , u = rm[s ? "clamp-to-edge" : t.addressModeV]
          , f = rm[s ? "clamp-to-edge" : t.addressModeW];
        e[i](l, e.TEXTURE_WRAP_S, c),
        e[i](l, e.TEXTURE_WRAP_T, u),
        e.TEXTURE_WRAP_R && e[i](l, e.TEXTURE_WRAP_R, f)
    }
    if ((!a || t.magFilter !== "linear") && e[i](l, e.TEXTURE_MAG_FILTER, w3[t.magFilter]),
    r) {
        if (!a || t.mipmapFilter !== "linear") {
            const c = Hfe[t.minFilter][t.mipmapFilter];
            e[i](l, e.TEXTURE_MIN_FILTER, c)
        }
    } else
        e[i](l, e.TEXTURE_MIN_FILTER, w3[t.minFilter]);
    if (n && t.maxAnisotropy > 1) {
        const c = Math.min(t.maxAnisotropy, e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT));
        e[i](l, n.TEXTURE_MAX_ANISOTROPY_EXT, c)
    }
    t.compare && e[i](l, e.TEXTURE_COMPARE_FUNC, Vfe[t.compare])
}
function zfe(t) {
    return {
        r8unorm: t.RED,
        r8snorm: t.RED,
        r8uint: t.RED,
        r8sint: t.RED,
        r16uint: t.RED,
        r16sint: t.RED,
        r16float: t.RED,
        rg8unorm: t.RG,
        rg8snorm: t.RG,
        rg8uint: t.RG,
        rg8sint: t.RG,
        r32uint: t.RED,
        r32sint: t.RED,
        r32float: t.RED,
        rg16uint: t.RG,
        rg16sint: t.RG,
        rg16float: t.RG,
        rgba8unorm: t.RGBA,
        "rgba8unorm-srgb": t.RGBA,
        rgba8snorm: t.RGBA,
        rgba8uint: t.RGBA,
        rgba8sint: t.RGBA,
        bgra8unorm: t.RGBA,
        "bgra8unorm-srgb": t.RGBA,
        rgb9e5ufloat: t.RGB,
        rgb10a2unorm: t.RGBA,
        rg11b10ufloat: t.RGB,
        rg32uint: t.RG,
        rg32sint: t.RG,
        rg32float: t.RG,
        rgba16uint: t.RGBA,
        rgba16sint: t.RGBA,
        rgba16float: t.RGBA,
        rgba32uint: t.RGBA,
        rgba32sint: t.RGBA,
        rgba32float: t.RGBA,
        stencil8: t.STENCIL_INDEX8,
        depth16unorm: t.DEPTH_COMPONENT,
        depth24plus: t.DEPTH_COMPONENT,
        "depth24plus-stencil8": t.DEPTH_STENCIL,
        depth32float: t.DEPTH_COMPONENT,
        "depth32float-stencil8": t.DEPTH_STENCIL
    }
}
function jfe(t, e) {
    let r = {}
      , n = t.RGBA;
    return t instanceof je.get().getWebGLRenderingContext() ? e.srgb && (r = {
        "rgba8unorm-srgb": e.srgb.SRGB8_ALPHA8_EXT,
        "bgra8unorm-srgb": e.srgb.SRGB8_ALPHA8_EXT
    }) : (r = {
        "rgba8unorm-srgb": t.SRGB8_ALPHA8,
        "bgra8unorm-srgb": t.SRGB8_ALPHA8
    },
    n = t.RGBA8),
    {
        r8unorm: t.R8,
        r8snorm: t.R8_SNORM,
        r8uint: t.R8UI,
        r8sint: t.R8I,
        r16uint: t.R16UI,
        r16sint: t.R16I,
        r16float: t.R16F,
        rg8unorm: t.RG8,
        rg8snorm: t.RG8_SNORM,
        rg8uint: t.RG8UI,
        rg8sint: t.RG8I,
        r32uint: t.R32UI,
        r32sint: t.R32I,
        r32float: t.R32F,
        rg16uint: t.RG16UI,
        rg16sint: t.RG16I,
        rg16float: t.RG16F,
        rgba8unorm: t.RGBA,
        ...r,
        rgba8snorm: t.RGBA8_SNORM,
        rgba8uint: t.RGBA8UI,
        rgba8sint: t.RGBA8I,
        bgra8unorm: n,
        rgb9e5ufloat: t.RGB9_E5,
        rgb10a2unorm: t.RGB10_A2,
        rg11b10ufloat: t.R11F_G11F_B10F,
        rg32uint: t.RG32UI,
        rg32sint: t.RG32I,
        rg32float: t.RG32F,
        rgba16uint: t.RGBA16UI,
        rgba16sint: t.RGBA16I,
        rgba16float: t.RGBA16F,
        rgba32uint: t.RGBA32UI,
        rgba32sint: t.RGBA32I,
        rgba32float: t.RGBA32F,
        stencil8: t.STENCIL_INDEX8,
        depth16unorm: t.DEPTH_COMPONENT16,
        depth24plus: t.DEPTH_COMPONENT24,
        "depth24plus-stencil8": t.DEPTH24_STENCIL8,
        depth32float: t.DEPTH_COMPONENT32F,
        "depth32float-stencil8": t.DEPTH32F_STENCIL8,
        ...e.s3tc ? {
            "bc1-rgba-unorm": e.s3tc.COMPRESSED_RGBA_S3TC_DXT1_EXT,
            "bc2-rgba-unorm": e.s3tc.COMPRESSED_RGBA_S3TC_DXT3_EXT,
            "bc3-rgba-unorm": e.s3tc.COMPRESSED_RGBA_S3TC_DXT5_EXT
        } : {},
        ...e.s3tc_sRGB ? {
            "bc1-rgba-unorm-srgb": e.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,
            "bc2-rgba-unorm-srgb": e.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,
            "bc3-rgba-unorm-srgb": e.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT
        } : {},
        ...e.rgtc ? {
            "bc4-r-unorm": e.rgtc.COMPRESSED_RED_RGTC1_EXT,
            "bc4-r-snorm": e.rgtc.COMPRESSED_SIGNED_RED_RGTC1_EXT,
            "bc5-rg-unorm": e.rgtc.COMPRESSED_RED_GREEN_RGTC2_EXT,
            "bc5-rg-snorm": e.rgtc.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT
        } : {},
        ...e.bptc ? {
            "bc6h-rgb-float": e.bptc.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,
            "bc6h-rgb-ufloat": e.bptc.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,
            "bc7-rgba-unorm": e.bptc.COMPRESSED_RGBA_BPTC_UNORM_EXT,
            "bc7-rgba-unorm-srgb": e.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT
        } : {},
        ...e.etc ? {
            "etc2-rgb8unorm": e.etc.COMPRESSED_RGB8_ETC2,
            "etc2-rgb8unorm-srgb": e.etc.COMPRESSED_SRGB8_ETC2,
            "etc2-rgb8a1unorm": e.etc.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,
            "etc2-rgb8a1unorm-srgb": e.etc.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,
            "etc2-rgba8unorm": e.etc.COMPRESSED_RGBA8_ETC2_EAC,
            "etc2-rgba8unorm-srgb": e.etc.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,
            "eac-r11unorm": e.etc.COMPRESSED_R11_EAC,
            "eac-rg11unorm": e.etc.COMPRESSED_SIGNED_RG11_EAC
        } : {},
        ...e.astc ? {
            "astc-4x4-unorm": e.astc.COMPRESSED_RGBA_ASTC_4x4_KHR,
            "astc-4x4-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,
            "astc-5x4-unorm": e.astc.COMPRESSED_RGBA_ASTC_5x4_KHR,
            "astc-5x4-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,
            "astc-5x5-unorm": e.astc.COMPRESSED_RGBA_ASTC_5x5_KHR,
            "astc-5x5-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,
            "astc-6x5-unorm": e.astc.COMPRESSED_RGBA_ASTC_6x5_KHR,
            "astc-6x5-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,
            "astc-6x6-unorm": e.astc.COMPRESSED_RGBA_ASTC_6x6_KHR,
            "astc-6x6-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,
            "astc-8x5-unorm": e.astc.COMPRESSED_RGBA_ASTC_8x5_KHR,
            "astc-8x5-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,
            "astc-8x6-unorm": e.astc.COMPRESSED_RGBA_ASTC_8x6_KHR,
            "astc-8x6-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,
            "astc-8x8-unorm": e.astc.COMPRESSED_RGBA_ASTC_8x8_KHR,
            "astc-8x8-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,
            "astc-10x5-unorm": e.astc.COMPRESSED_RGBA_ASTC_10x5_KHR,
            "astc-10x5-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,
            "astc-10x6-unorm": e.astc.COMPRESSED_RGBA_ASTC_10x6_KHR,
            "astc-10x6-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,
            "astc-10x8-unorm": e.astc.COMPRESSED_RGBA_ASTC_10x8_KHR,
            "astc-10x8-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,
            "astc-10x10-unorm": e.astc.COMPRESSED_RGBA_ASTC_10x10_KHR,
            "astc-10x10-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,
            "astc-12x10-unorm": e.astc.COMPRESSED_RGBA_ASTC_12x10_KHR,
            "astc-12x10-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,
            "astc-12x12-unorm": e.astc.COMPRESSED_RGBA_ASTC_12x12_KHR,
            "astc-12x12-unorm-srgb": e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR
        } : {}
    }
}
function Wfe(t) {
    return {
        r8unorm: t.UNSIGNED_BYTE,
        r8snorm: t.BYTE,
        r8uint: t.UNSIGNED_BYTE,
        r8sint: t.BYTE,
        r16uint: t.UNSIGNED_SHORT,
        r16sint: t.SHORT,
        r16float: t.HALF_FLOAT,
        rg8unorm: t.UNSIGNED_BYTE,
        rg8snorm: t.BYTE,
        rg8uint: t.UNSIGNED_BYTE,
        rg8sint: t.BYTE,
        r32uint: t.UNSIGNED_INT,
        r32sint: t.INT,
        r32float: t.FLOAT,
        rg16uint: t.UNSIGNED_SHORT,
        rg16sint: t.SHORT,
        rg16float: t.HALF_FLOAT,
        rgba8unorm: t.UNSIGNED_BYTE,
        "rgba8unorm-srgb": t.UNSIGNED_BYTE,
        rgba8snorm: t.BYTE,
        rgba8uint: t.UNSIGNED_BYTE,
        rgba8sint: t.BYTE,
        bgra8unorm: t.UNSIGNED_BYTE,
        "bgra8unorm-srgb": t.UNSIGNED_BYTE,
        rgb9e5ufloat: t.UNSIGNED_INT_5_9_9_9_REV,
        rgb10a2unorm: t.UNSIGNED_INT_2_10_10_10_REV,
        rg11b10ufloat: t.UNSIGNED_INT_10F_11F_11F_REV,
        rg32uint: t.UNSIGNED_INT,
        rg32sint: t.INT,
        rg32float: t.FLOAT,
        rgba16uint: t.UNSIGNED_SHORT,
        rgba16sint: t.SHORT,
        rgba16float: t.HALF_FLOAT,
        rgba32uint: t.UNSIGNED_INT,
        rgba32sint: t.INT,
        rgba32float: t.FLOAT,
        stencil8: t.UNSIGNED_BYTE,
        depth16unorm: t.UNSIGNED_SHORT,
        depth24plus: t.UNSIGNED_INT,
        "depth24plus-stencil8": t.UNSIGNED_INT_24_8,
        depth32float: t.FLOAT,
        "depth32float-stencil8": t.FLOAT_32_UNSIGNED_INT_24_8_REV
    }
}
const Yfe = 4;
class VI {
    constructor(e) {
        this.managedTextures = [],
        this._glTextures = Object.create(null),
        this._glSamplers = Object.create(null),
        this._boundTextures = [],
        this._activeTextureLocation = -1,
        this._boundSamplers = Object.create(null),
        this._uploads = {
            image: HI,
            buffer: Lfe,
            video: Gfe,
            compressed: Ufe
        },
        this._premultiplyAlpha = !1,
        this._useSeparateSamplers = !1,
        this._renderer = e,
        this._renderer.renderableGC.addManagedHash(this, "_glTextures"),
        this._renderer.renderableGC.addManagedHash(this, "_glSamplers")
    }
    contextChange(e) {
        this._gl = e,
        this._mapFormatToInternalFormat || (this._mapFormatToInternalFormat = jfe(e, this._renderer.context.extensions),
        this._mapFormatToType = Wfe(e),
        this._mapFormatToFormat = zfe(e)),
        this._glTextures = Object.create(null),
        this._glSamplers = Object.create(null),
        this._boundSamplers = Object.create(null),
        this._premultiplyAlpha = !1;
        for (let r = 0; r < 16; r++)
            this.bind(Be.EMPTY, r)
    }
    initSource(e) {
        this.bind(e)
    }
    bind(e, r=0) {
        const n = e.source;
        e ? (this.bindSource(n, r),
        this._useSeparateSamplers && this._bindSampler(n.style, r)) : (this.bindSource(null, r),
        this._useSeparateSamplers && this._bindSampler(null, r))
    }
    bindSource(e, r=0) {
        const n = this._gl;
        if (e._touched = this._renderer.textureGC.count,
        this._boundTextures[r] !== e) {
            this._boundTextures[r] = e,
            this._activateLocation(r),
            e || (e = Be.EMPTY.source);
            const i = this.getGlSource(e);
            n.bindTexture(i.target, i.texture)
        }
    }
    _bindSampler(e, r=0) {
        const n = this._gl;
        if (!e) {
            this._boundSamplers[r] = null,
            n.bindSampler(r, null);
            return
        }
        const i = this._getGlSampler(e);
        this._boundSamplers[r] !== i && (this._boundSamplers[r] = i,
        n.bindSampler(r, i))
    }
    unbind(e) {
        const r = e.source
          , n = this._boundTextures
          , i = this._gl;
        for (let o = 0; o < n.length; o++)
            if (n[o] === r) {
                this._activateLocation(o);
                const s = this.getGlSource(r);
                i.bindTexture(s.target, null),
                n[o] = null
            }
    }
    _activateLocation(e) {
        this._activeTextureLocation !== e && (this._activeTextureLocation = e,
        this._gl.activeTexture(this._gl.TEXTURE0 + e))
    }
    _initSource(e) {
        const r = this._gl
          , n = new Nfe(r.createTexture());
        if (n.type = this._mapFormatToType[e.format],
        n.internalFormat = this._mapFormatToInternalFormat[e.format],
        n.format = this._mapFormatToFormat[e.format],
        e.autoGenerateMipmaps && (this._renderer.context.supports.nonPowOf2mipmaps || e.isPowerOfTwo)) {
            const i = Math.max(e.width, e.height);
            e.mipLevelCount = Math.floor(Math.log2(i)) + 1
        }
        return this._glTextures[e.uid] = n,
        this.managedTextures.includes(e) || (e.on("update", this.onSourceUpdate, this),
        e.on("resize", this.onSourceUpdate, this),
        e.on("styleChange", this.onStyleChange, this),
        e.on("destroy", this.onSourceDestroy, this),
        e.on("unload", this.onSourceUnload, this),
        e.on("updateMipmaps", this.onUpdateMipmaps, this),
        this.managedTextures.push(e)),
        this.onSourceUpdate(e),
        this.updateStyle(e, !1),
        n
    }
    onStyleChange(e) {
        this.updateStyle(e, !1)
    }
    updateStyle(e, r) {
        const n = this._gl
          , i = this.getGlSource(e);
        n.bindTexture(n.TEXTURE_2D, i.texture),
        this._boundTextures[this._activeTextureLocation] = e,
        B3(e.style, n, e.mipLevelCount > 1, this._renderer.context.extensions.anisotropicFiltering, "texParameteri", n.TEXTURE_2D, !this._renderer.context.supports.nonPowOf2wrapping && !e.isPowerOfTwo, r)
    }
    onSourceUnload(e) {
        const r = this._glTextures[e.uid];
        r && (this.unbind(e),
        this._glTextures[e.uid] = null,
        this._gl.deleteTexture(r.texture))
    }
    onSourceUpdate(e) {
        const r = this._gl
          , n = this.getGlSource(e);
        r.bindTexture(r.TEXTURE_2D, n.texture),
        this._boundTextures[this._activeTextureLocation] = e;
        const i = e.alphaMode === "premultiply-alpha-on-upload";
        this._premultiplyAlpha !== i && (this._premultiplyAlpha = i,
        r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL, i)),
        this._uploads[e.uploadMethodId] ? this._uploads[e.uploadMethodId].upload(e, n, r, this._renderer.context.webGLVersion) : r.texImage2D(r.TEXTURE_2D, 0, r.RGBA, e.pixelWidth, e.pixelHeight, 0, r.RGBA, r.UNSIGNED_BYTE, null),
        e.autoGenerateMipmaps && e.mipLevelCount > 1 && this.onUpdateMipmaps(e, !1)
    }
    onUpdateMipmaps(e, r=!0) {
        r && this.bindSource(e, 0);
        const n = this.getGlSource(e);
        this._gl.generateMipmap(n.target)
    }
    onSourceDestroy(e) {
        e.off("destroy", this.onSourceDestroy, this),
        e.off("update", this.onSourceUpdate, this),
        e.off("resize", this.onSourceUpdate, this),
        e.off("unload", this.onSourceUnload, this),
        e.off("styleChange", this.onStyleChange, this),
        e.off("updateMipmaps", this.onUpdateMipmaps, this),
        this.managedTextures.splice(this.managedTextures.indexOf(e), 1),
        this.onSourceUnload(e)
    }
    _initSampler(e) {
        const r = this._gl
          , n = this._gl.createSampler();
        return this._glSamplers[e._resourceId] = n,
        B3(e, r, this._boundTextures[this._activeTextureLocation].mipLevelCount > 1, this._renderer.context.extensions.anisotropicFiltering, "samplerParameteri", n, !1, !0),
        this._glSamplers[e._resourceId]
    }
    _getGlSampler(e) {
        return this._glSamplers[e._resourceId] || this._initSampler(e)
    }
    getGlSource(e) {
        return this._glTextures[e.uid] || this._initSource(e)
    }
    generateCanvas(e) {
        const {pixels: r, width: n, height: i} = this.getPixels(e)
          , o = je.get().createCanvas();
        o.width = n,
        o.height = i;
        const s = o.getContext("2d");
        if (s) {
            const a = s.createImageData(n, i);
            a.data.set(r),
            s.putImageData(a, 0, 0)
        }
        return o
    }
    getPixels(e) {
        const r = e.source.resolution
          , n = e.frame
          , i = Math.max(Math.round(n.width * r), 1)
          , o = Math.max(Math.round(n.height * r), 1)
          , s = new Uint8Array(Yfe * i * o)
          , a = this._renderer
          , l = a.renderTarget.getRenderTarget(e)
          , c = a.renderTarget.getGpuRenderTarget(l)
          , u = a.gl;
        return u.bindFramebuffer(u.FRAMEBUFFER, c.resolveTargetFramebuffer),
        u.readPixels(Math.round(n.x * r), Math.round(n.y * r), i, o, u.RGBA, u.UNSIGNED_BYTE, s),
        {
            pixels: new Uint8ClampedArray(s.buffer),
            width: i,
            height: o
        }
    }
    destroy() {
        this.managedTextures.slice().forEach(e => this.onSourceDestroy(e)),
        this.managedTextures = null,
        this._glTextures = null,
        this._glSamplers = null,
        this._boundTextures = null,
        this._boundSamplers = null,
        this._mapFormatToInternalFormat = null,
        this._mapFormatToType = null,
        this._mapFormatToFormat = null,
        this._uploads = null,
        this._renderer = null
    }
    resetState() {
        this._activeTextureLocation = -1,
        this._boundTextures.fill(Be.EMPTY.source),
        this._boundSamplers = Object.create(null);
        const e = this._gl;
        this._premultiplyAlpha = !1,
        e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, this._premultiplyAlpha)
    }
}
VI.extension = {
    type: [X.WebGLSystem],
    name: "texture"
};
class zI {
    contextChange(e) {
        const r = new gn({
            uColor: {
                value: new Float32Array([1, 1, 1, 1]),
                type: "vec4<f32>"
            },
            uTransformMatrix: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uRound: {
                value: 0,
                type: "f32"
            }
        })
          , n = e.limits.maxBatchableTextures
          , i = sd({
            name: "graphics",
            bits: [hb, pb(n), Tb, ld]
        });
        this.shader = new yi({
            glProgram: i,
            resources: {
                localUniforms: r,
                batchSamplers: gb(n)
            }
        })
    }
    execute(e, r) {
        const n = r.context
          , i = n.customShader || this.shader
          , o = e.renderer
          , s = o.graphicsContext
          , {batcher: a, instructions: l} = s.getContextRenderData(n);
        i.groups[0] = o.globalUniforms.bindGroup,
        o.state.set(e.state),
        o.shader.bind(i),
        o.geometry.bind(a.geometry, i.glProgram);
        const c = l.instructions;
        for (let u = 0; u < l.instructionSize; u++) {
            const f = c[u];
            if (f.size) {
                for (let d = 0; d < f.textures.count; d++)
                    o.texture.bind(f.textures.textures[d], d);
                o.geometry.draw(f.topology, f.size, f.start)
            }
        }
    }
    destroy() {
        this.shader.destroy(!0),
        this.shader = null
    }
}
zI.extension = {
    type: [X.WebGLPipesAdaptor],
    name: "graphics"
};
class jI {
    init() {
        const e = sd({
            name: "mesh",
            bits: [Tb, Q0e, ld]
        });
        this._shader = new yi({
            glProgram: e,
            resources: {
                uTexture: Be.EMPTY.source,
                textureUniforms: {
                    uTextureMatrix: {
                        type: "mat3x3<f32>",
                        value: new Pe
                    }
                }
            }
        })
    }
    execute(e, r) {
        const n = e.renderer;
        let i = r._shader;
        if (i) {
            if (!i.glProgram) {
                Ne("Mesh shader has no glProgram", r.shader);
                return
            }
        } else {
            i = this._shader;
            const o = r.texture
              , s = o.source;
            i.resources.uTexture = s,
            i.resources.uSampler = s.style,
            i.resources.textureUniforms.uniforms.uTextureMatrix = o.textureMatrix.mapCoord
        }
        i.groups[100] = n.globalUniforms.bindGroup,
        i.groups[101] = e.localUniformsBindGroup,
        n.encoder.draw({
            geometry: r._geometry,
            shader: i,
            state: r.state
        })
    }
    destroy() {
        this._shader.destroy(!0),
        this._shader = null
    }
}
jI.extension = {
    type: [X.WebGLPipesAdaptor],
    name: "mesh"
};
class WI {
    constructor(e) {
        this._renderer = e
    }
    updateRenderable() {}
    destroyRenderable() {}
    validateRenderable() {
        return !1
    }
    addRenderable(e, r) {
        this._renderer.renderPipes.batch.break(r),
        r.add(e)
    }
    execute(e) {
        e.isRenderable && e.render(this._renderer)
    }
    destroy() {
        this._renderer = null
    }
}
WI.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "customRender"
};
class h1 {
    constructor() {
        this.batcherName = "default",
        this.topology = "triangle-list",
        this.attributeSize = 4,
        this.indexSize = 6,
        this.packAsQuad = !0,
        this.roundPixels = 0,
        this._attributeStart = 0,
        this._batcher = null,
        this._batch = null
    }
    get blendMode() {
        return this.renderable.groupBlendMode
    }
    get color() {
        return this.renderable.groupColorAlpha
    }
    reset() {
        this.renderable = null,
        this.texture = null,
        this._batcher = null,
        this._batch = null,
        this.bounds = null
    }
    destroy() {}
}
function hE(t, e) {
    const r = t.instructionSet
      , n = r.instructions;
    for (let i = 0; i < r.instructionSize; i++) {
        const o = n[i];
        e[o.renderPipeId].execute(o)
    }
}
const Xfe = new Pe;
class YI {
    constructor(e) {
        this._renderer = e
    }
    addRenderGroup(e, r) {
        e.isCachedAsTexture ? this._addRenderableCacheAsTexture(e, r) : this._addRenderableDirect(e, r)
    }
    execute(e) {
        e.isRenderable && (e.isCachedAsTexture ? this._executeCacheAsTexture(e) : this._executeDirect(e))
    }
    destroy() {
        this._renderer = null
    }
    _addRenderableDirect(e, r) {
        this._renderer.renderPipes.batch.break(r),
        e._batchableRenderGroup && (xr.return(e._batchableRenderGroup),
        e._batchableRenderGroup = null),
        r.add(e)
    }
    _addRenderableCacheAsTexture(e, r) {
        const n = e._batchableRenderGroup ?? (e._batchableRenderGroup = xr.get(h1));
        n.renderable = e.root,
        n.transform = e.root.relativeGroupTransform,
        n.texture = e.texture,
        n.bounds = e._textureBounds,
        r.add(e),
        this._renderer.renderPipes.blendMode.pushBlendMode(e, e.root.groupBlendMode, r),
        this._renderer.renderPipes.batch.addToBatch(n, r),
        this._renderer.renderPipes.blendMode.popBlendMode(r)
    }
    _executeCacheAsTexture(e) {
        if (e.textureNeedsUpdate) {
            e.textureNeedsUpdate = !1;
            const r = Xfe.identity().translate(-e._textureBounds.x, -e._textureBounds.y);
            this._renderer.renderTarget.push(e.texture, !0, null, e.texture.frame),
            this._renderer.globalUniforms.push({
                worldTransformMatrix: r,
                worldColor: 4294967295,
                offset: {
                    x: 0,
                    y: 0
                }
            }),
            hE(e, this._renderer.renderPipes),
            this._renderer.renderTarget.finishRenderPass(),
            this._renderer.renderTarget.pop(),
            this._renderer.globalUniforms.pop()
        }
        e._batchableRenderGroup._batcher.updateElement(e._batchableRenderGroup),
        e._batchableRenderGroup._batcher.geometry.buffers[0].update()
    }
    _executeDirect(e) {
        this._renderer.globalUniforms.push({
            worldTransformMatrix: e.inverseParentTextureTransform,
            worldColor: e.worldColorAlpha
        }),
        hE(e, this._renderer.renderPipes),
        this._renderer.globalUniforms.pop()
    }
}
YI.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "renderGroup"
};
function xE(t, e) {
    e || (e = 0);
    for (let r = e; r < t.length && t[r]; r++)
        t[r] = null
}
const Kfe = new kn
  , S3 = k0 | Ix | ob;
function XI(t, e=!1) {
    qfe(t);
    const r = t.childrenToUpdate
      , n = t.updateTick++;
    for (const i in r) {
        const o = Number(i)
          , s = r[i]
          , a = s.list
          , l = s.index;
        for (let c = 0; c < l; c++) {
            const u = a[c];
            u.parentRenderGroup === t && u.relativeRenderGroupDepth === o && KI(u, n, 0)
        }
        xE(a, l),
        s.index = 0
    }
    if (e)
        for (let i = 0; i < t.renderGroupChildren.length; i++)
            XI(t.renderGroupChildren[i], e)
}
function qfe(t) {
    const e = t.root;
    let r;
    if (t.renderGroupParent) {
        const n = t.renderGroupParent;
        t.worldTransform.appendFrom(e.relativeGroupTransform, n.worldTransform),
        t.worldColor = Px(e.groupColor, n.worldColor),
        r = e.groupAlpha * n.worldAlpha
    } else
        t.worldTransform.copyFrom(e.localTransform),
        t.worldColor = e.localColor,
        r = e.localAlpha;
    r = r < 0 ? 0 : r > 1 ? 1 : r,
    t.worldAlpha = r,
    t.worldColorAlpha = t.worldColor + ((r * 255 | 0) << 24)
}
function KI(t, e, r) {
    if (e === t.updateTick)
        return;
    t.updateTick = e,
    t.didChange = !1;
    const n = t.localTransform;
    t.updateLocalTransform();
    const i = t.parent;
    if (i && !i.renderGroup ? (r |= t._updateFlags,
    t.relativeGroupTransform.appendFrom(n, i.relativeGroupTransform),
    r & S3 && T3(t, i, r)) : (r = t._updateFlags,
    t.relativeGroupTransform.copyFrom(n),
    r & S3 && T3(t, Kfe, r)),
    !t.renderGroup) {
        const o = t.children
          , s = o.length;
        for (let c = 0; c < s; c++)
            KI(o[c], e, r);
        const a = t.parentRenderGroup
          , l = t;
        l.renderPipeId && !a.structureDidChange && a.updateRenderable(l)
    }
}
function T3(t, e, r) {
    if (r & Ix) {
        t.groupColor = Px(t.localColor, e.groupColor);
        let n = t.localAlpha * e.groupAlpha;
        n = n < 0 ? 0 : n > 1 ? 1 : n,
        t.groupAlpha = n,
        t.groupColorAlpha = t.groupColor + ((n * 255 | 0) << 24)
    }
    r & ob && (t.groupBlendMode = t.localBlendMode === "inherit" ? e.groupBlendMode : t.localBlendMode),
    r & k0 && (t.globalDisplayStatus = t.localDisplayStatus & e.globalDisplayStatus),
    t._updateFlags = 0
}
function Zfe(t, e) {
    const {list: r} = t.childrenRenderablesToUpdate;
    let n = !1;
    for (let i = 0; i < t.childrenRenderablesToUpdate.index; i++) {
        const o = r[i];
        if (n = e[o.renderPipeId].validateRenderable(o),
        n)
            break
    }
    return t.structureDidChange = n,
    n
}
const Jfe = new Pe;
class qI {
    constructor(e) {
        this._renderer = e
    }
    render({container: e, transform: r}) {
        const n = e.parent
          , i = e.renderGroup.renderGroupParent;
        e.parent = null,
        e.renderGroup.renderGroupParent = null;
        const o = this._renderer
          , s = Jfe;
        r && (s.copyFrom(e.renderGroup.localTransform),
        e.renderGroup.localTransform.copyFrom(r));
        const a = o.renderPipes;
        this._updateCachedRenderGroups(e.renderGroup, null),
        this._updateRenderGroups(e.renderGroup),
        o.globalUniforms.start({
            worldTransformMatrix: r ? e.renderGroup.localTransform : e.renderGroup.worldTransform,
            worldColor: e.renderGroup.worldColorAlpha
        }),
        hE(e.renderGroup, a),
        a.uniformBatch && a.uniformBatch.renderEnd(),
        r && e.renderGroup.localTransform.copyFrom(s),
        e.parent = n,
        e.renderGroup.renderGroupParent = i
    }
    destroy() {
        this._renderer = null
    }
    _updateCachedRenderGroups(e, r) {
        if (e._parentCacheAsTextureRenderGroup = r,
        e.isCachedAsTexture) {
            if (!e.textureNeedsUpdate)
                return;
            r = e
        }
        for (let n = e.renderGroupChildren.length - 1; n >= 0; n--)
            this._updateCachedRenderGroups(e.renderGroupChildren[n], r);
        if (e.invalidateMatrices(),
        e.isCachedAsTexture) {
            if (e.textureNeedsUpdate) {
                const n = e.root.getLocalBounds();
                n.ceil();
                const i = e.texture;
                e.texture && sr.returnTexture(e.texture, !0);
                const o = this._renderer
                  , s = e.textureOptions.resolution || o.view.resolution
                  , a = e.textureOptions.antialias ?? o.view.antialias
                  , l = e.textureOptions.scaleMode ?? "linear"
                  , c = sr.getOptimalTexture(n.width, n.height, s, a);
                c._source.style = new bo({
                    scaleMode: l
                }),
                e.texture = c,
                e._textureBounds || (e._textureBounds = new Vr),
                e._textureBounds.copyFrom(n),
                i !== e.texture && e.renderGroupParent && (e.renderGroupParent.structureDidChange = !0)
            }
        } else
            e.texture && (sr.returnTexture(e.texture, !0),
            e.texture = null)
    }
    _updateRenderGroups(e) {
        const r = this._renderer
          , n = r.renderPipes;
        if (e.runOnRender(r),
        e.instructionSet.renderPipes = n,
        e.structureDidChange ? xE(e.childrenRenderablesToUpdate.list, 0) : Zfe(e, n),
        XI(e),
        e.structureDidChange ? (e.structureDidChange = !1,
        this._buildInstructions(e, r)) : this._updateRenderables(e),
        e.childrenRenderablesToUpdate.index = 0,
        r.renderPipes.batch.upload(e.instructionSet),
        !(e.isCachedAsTexture && !e.textureNeedsUpdate))
            for (let i = 0; i < e.renderGroupChildren.length; i++)
                this._updateRenderGroups(e.renderGroupChildren[i])
    }
    _updateRenderables(e) {
        const {list: r, index: n} = e.childrenRenderablesToUpdate;
        for (let i = 0; i < n; i++) {
            const o = r[i];
            o.didViewUpdate && e.updateRenderable(o)
        }
        xE(r, n)
    }
    _buildInstructions(e, r) {
        const n = e.root
          , i = e.instructionSet;
        i.reset();
        const o = r.renderPipes ? r : r.batch.renderer
          , s = o.renderPipes;
        s.batch.buildStart(i),
        s.blendMode.buildStart(),
        s.colorMask.buildStart(),
        n.sortableChildren && n.sortChildren(),
        n.collectRenderablesWithEffects(i, o, null),
        s.batch.buildEnd(i),
        s.blendMode.buildEnd(i)
    }
}
qI.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "renderGroup"
};
class ZI {
    constructor(e) {
        this._renderer = e
    }
    addRenderable(e, r) {
        const n = this._getGpuSprite(e);
        e.didViewUpdate && this._updateBatchableSprite(e, n),
        this._renderer.renderPipes.batch.addToBatch(n, r)
    }
    updateRenderable(e) {
        const r = this._getGpuSprite(e);
        e.didViewUpdate && this._updateBatchableSprite(e, r),
        r._batcher.updateElement(r)
    }
    validateRenderable(e) {
        const r = this._getGpuSprite(e);
        return !r._batcher.checkAndUpdateTexture(r, e._texture)
    }
    _updateBatchableSprite(e, r) {
        r.bounds = e.visualBounds,
        r.texture = e._texture
    }
    _getGpuSprite(e) {
        return e._gpuData[this._renderer.uid] || this._initGPUSprite(e)
    }
    _initGPUSprite(e) {
        const r = new h1;
        return r.renderable = e,
        r.transform = e.groupTransform,
        r.texture = e._texture,
        r.bounds = e.visualBounds,
        r.roundPixels = this._renderer._roundPixels | e._roundPixels,
        e._gpuData[this._renderer.uid] = r,
        r
    }
    destroy() {
        this._renderer = null
    }
}
ZI.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "sprite"
};
const Ib = class JI {
    constructor() {
        this.clearBeforeRender = !0,
        this._backgroundColor = new Ut(0),
        this.color = this._backgroundColor,
        this.alpha = 1
    }
    init(e) {
        e = {
            ...JI.defaultOptions,
            ...e
        },
        this.clearBeforeRender = e.clearBeforeRender,
        this.color = e.background || e.backgroundColor || this._backgroundColor,
        this.alpha = e.backgroundAlpha,
        this._backgroundColor.setAlpha(e.backgroundAlpha)
    }
    get color() {
        return this._backgroundColor
    }
    set color(e) {
        Ut.shared.setValue(e).alpha < 1 && this._backgroundColor.alpha === 1 && Ne("Cannot set a transparent background on an opaque canvas. To enable transparency, set backgroundAlpha < 1 when initializing your Application."),
        this._backgroundColor.setValue(e)
    }
    get alpha() {
        return this._backgroundColor.alpha
    }
    set alpha(e) {
        this._backgroundColor.setAlpha(e)
    }
    get colorRgba() {
        return this._backgroundColor.toArray()
    }
    destroy() {}
}
;
Ib.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "background",
    priority: 0
};
Ib.defaultOptions = {
    backgroundAlpha: 1,
    backgroundColor: 0,
    clearBeforeRender: !0
};
let Qfe = Ib;
const G0 = {};
$e.handle(X.BlendMode, t => {
    if (!t.name)
        throw new Error("BlendMode extension must have a name property");
    G0[t.name] = t.ref
}
, t => {
    delete G0[t.name]
}
);
class QI {
    constructor(e) {
        this._blendModeStack = [],
        this._isAdvanced = !1,
        this._filterHash = Object.create(null),
        this._renderer = e,
        this._renderer.runners.prerender.add(this)
    }
    prerender() {
        this._activeBlendMode = "normal",
        this._isAdvanced = !1
    }
    pushBlendMode(e, r, n) {
        this._blendModeStack.push(r),
        this.setBlendMode(e, r, n)
    }
    popBlendMode(e) {
        this._blendModeStack.pop();
        const r = this._blendModeStack[this._activeBlendMode.length - 1] ?? "normal";
        this.setBlendMode(null, r, e)
    }
    setBlendMode(e, r, n) {
        var o;
        const i = e instanceof jy;
        if (this._activeBlendMode === r) {
            this._isAdvanced && e && !i && ((o = this._renderableList) == null || o.push(e));
            return
        }
        this._isAdvanced && this._endAdvancedBlendMode(n),
        this._activeBlendMode = r,
        e && (this._isAdvanced = !!G0[r],
        this._isAdvanced && this._beginAdvancedBlendMode(e, n))
    }
    _beginAdvancedBlendMode(e, r) {
        this._renderer.renderPipes.batch.break(r);
        const n = this._activeBlendMode;
        if (!G0[n]) {
            Ne(`Unable to assign BlendMode: '${n}'. You may want to include: import 'pixi.js/advanced-blend-modes'`);
            return
        }
        const i = this._ensureFilterEffect(n)
          , o = e instanceof jy
          , s = {
            renderPipeId: "filter",
            action: "pushFilter",
            filterEffect: i,
            renderables: o ? null : [e],
            container: o ? e.root : null,
            canBundle: !1
        };
        this._renderableList = s.renderables,
        r.add(s)
    }
    _ensureFilterEffect(e) {
        let r = this._filterHash[e];
        return r || (r = this._filterHash[e] = new Fx,
        r.filters = [new G0[e]]),
        r
    }
    _endAdvancedBlendMode(e) {
        this._isAdvanced = !1,
        this._renderableList = null,
        this._renderer.renderPipes.batch.break(e),
        e.add({
            renderPipeId: "filter",
            action: "popFilter",
            canBundle: !1
        })
    }
    buildStart() {
        this._isAdvanced = !1
    }
    buildEnd(e) {
        this._isAdvanced && this._endAdvancedBlendMode(e)
    }
    destroy() {
        this._renderer = null,
        this._renderableList = null;
        for (const e in this._filterHash)
            this._filterHash[e].destroy();
        this._filterHash = null
    }
}
QI.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "blendMode"
};
const nm = {
    png: "image/png",
    jpg: "image/jpeg",
    webp: "image/webp"
}
  , Ob = class eO {
    constructor(e) {
        this._renderer = e
    }
    _normalizeOptions(e, r={}) {
        return e instanceof kn || e instanceof Be ? {
            target: e,
            ...r
        } : {
            ...r,
            ...e
        }
    }
    async image(e) {
        const r = je.get().createImage();
        return r.src = await this.base64(e),
        r
    }
    async base64(e) {
        e = this._normalizeOptions(e, eO.defaultImageOptions);
        const {format: r, quality: n} = e
          , i = this.canvas(e);
        if (i.toBlob !== void 0)
            return new Promise( (o, s) => {
                i.toBlob(a => {
                    if (!a) {
                        s(new Error("ICanvas.toBlob failed!"));
                        return
                    }
                    const l = new FileReader;
                    l.onload = () => o(l.result),
                    l.onerror = s,
                    l.readAsDataURL(a)
                }
                , nm[r], n)
            }
            );
        if (i.toDataURL !== void 0)
            return i.toDataURL(nm[r], n);
        if (i.convertToBlob !== void 0) {
            const o = await i.convertToBlob({
                type: nm[r],
                quality: n
            });
            return new Promise( (s, a) => {
                const l = new FileReader;
                l.onload = () => s(l.result),
                l.onerror = a,
                l.readAsDataURL(o)
            }
            )
        }
        throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")
    }
    canvas(e) {
        e = this._normalizeOptions(e);
        const r = e.target
          , n = this._renderer;
        if (r instanceof Be)
            return n.texture.generateCanvas(r);
        const i = n.textureGenerator.generateTexture(e)
          , o = n.texture.generateCanvas(i);
        return i.destroy(!0),
        o
    }
    pixels(e) {
        e = this._normalizeOptions(e);
        const r = e.target
          , n = this._renderer
          , i = r instanceof Be ? r : n.textureGenerator.generateTexture(e)
          , o = n.texture.getPixels(i);
        return r instanceof kn && i.destroy(!0),
        o
    }
    texture(e) {
        return e = this._normalizeOptions(e),
        e.target instanceof Be ? e.target : this._renderer.textureGenerator.generateTexture(e)
    }
    download(e) {
        e = this._normalizeOptions(e);
        const r = this.canvas(e)
          , n = document.createElement("a");
        n.download = e.filename ?? "image.png",
        n.href = r.toDataURL("image/png"),
        document.body.appendChild(n),
        n.click(),
        document.body.removeChild(n)
    }
    log(e) {
        const r = e.width ?? 200;
        e = this._normalizeOptions(e);
        const n = this.canvas(e)
          , i = n.toDataURL();
        console.log(`[Pixi Texture] ${n.width}px ${n.height}px`);
        const o = ["font-size: 1px;", `padding: ${r}px 300px;`, `background: url(${i}) no-repeat;`, "background-size: contain;"].join(" ");
        console.log("%c ", o)
    }
    destroy() {
        this._renderer = null
    }
}
;
Ob.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem],
    name: "extract"
};
Ob.defaultImageOptions = {
    format: "png",
    quality: 1
};
let ede = Ob;
class kb extends Be {
    static create(e) {
        return new kb({
            source: new Br(e)
        })
    }
    resize(e, r, n) {
        return this.source.resize(e, r, n),
        this
    }
}
const tde = new mt
  , rde = new Vr
  , nde = [0, 0, 0, 0];
class tO {
    constructor(e) {
        this._renderer = e
    }
    generateTexture(e) {
        var c;
        e instanceof kn && (e = {
            target: e,
            frame: void 0,
            textureSourceOptions: {},
            resolution: void 0
        });
        const r = e.resolution || this._renderer.resolution
          , n = e.antialias || this._renderer.view.antialias
          , i = e.target;
        let o = e.clearColor;
        o ? o = Array.isArray(o) && o.length === 4 ? o : Ut.shared.setValue(o).toArray() : o = nde;
        const s = ((c = e.frame) == null ? void 0 : c.copyTo(tde)) || ib(i, rde).rectangle;
        s.width = Math.max(s.width, 1 / r) | 0,
        s.height = Math.max(s.height, 1 / r) | 0;
        const a = kb.create({
            ...e.textureSourceOptions,
            width: s.width,
            height: s.height,
            resolution: r,
            antialias: n
        })
          , l = Pe.shared.translate(-s.x, -s.y);
        return this._renderer.render({
            container: i,
            transform: l,
            target: a,
            clearColor: o
        }),
        a.source.updateMipmaps(),
        a
    }
    destroy() {
        this._renderer = null
    }
}
tO.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem],
    name: "textureGenerator"
};
function cd(t, e, r) {
    const n = (t >> 24 & 255) / 255;
    e[r++] = (t & 255) / 255 * n,
    e[r++] = (t >> 8 & 255) / 255 * n,
    e[r++] = (t >> 16 & 255) / 255 * n,
    e[r++] = n
}
class rO {
    constructor(e) {
        this._stackIndex = 0,
        this._globalUniformDataStack = [],
        this._uniformsPool = [],
        this._activeUniforms = [],
        this._bindGroupPool = [],
        this._activeBindGroups = [],
        this._renderer = e
    }
    reset() {
        this._stackIndex = 0;
        for (let e = 0; e < this._activeUniforms.length; e++)
            this._uniformsPool.push(this._activeUniforms[e]);
        for (let e = 0; e < this._activeBindGroups.length; e++)
            this._bindGroupPool.push(this._activeBindGroups[e]);
        this._activeUniforms.length = 0,
        this._activeBindGroups.length = 0
    }
    start(e) {
        this.reset(),
        this.push(e)
    }
    bind({size: e, projectionMatrix: r, worldTransformMatrix: n, worldColor: i, offset: o}) {
        const s = this._renderer.renderTarget.renderTarget
          , a = this._stackIndex ? this._globalUniformDataStack[this._stackIndex - 1] : {
            projectionData: s,
            worldTransformMatrix: new Pe,
            worldColor: 4294967295,
            offset: new Gt
        }
          , l = {
            projectionMatrix: r || this._renderer.renderTarget.projectionMatrix,
            resolution: e || s.size,
            worldTransformMatrix: n || a.worldTransformMatrix,
            worldColor: i || a.worldColor,
            offset: o || a.offset,
            bindGroup: null
        }
          , c = this._uniformsPool.pop() || this._createUniforms();
        this._activeUniforms.push(c);
        const u = c.uniforms;
        u.uProjectionMatrix = l.projectionMatrix,
        u.uResolution = l.resolution,
        u.uWorldTransformMatrix.copyFrom(l.worldTransformMatrix),
        u.uWorldTransformMatrix.tx -= l.offset.x,
        u.uWorldTransformMatrix.ty -= l.offset.y,
        cd(l.worldColor, u.uWorldColorAlpha, 0),
        c.update();
        let f;
        this._renderer.renderPipes.uniformBatch ? f = this._renderer.renderPipes.uniformBatch.getUniformBindGroup(c, !1) : (f = this._bindGroupPool.pop() || new es,
        this._activeBindGroups.push(f),
        f.setResource(c, 0)),
        l.bindGroup = f,
        this._currentGlobalUniformData = l
    }
    push(e) {
        this.bind(e),
        this._globalUniformDataStack[this._stackIndex++] = this._currentGlobalUniformData
    }
    pop() {
        this._currentGlobalUniformData = this._globalUniformDataStack[--this._stackIndex - 1],
        this._renderer.type === qn.WEBGL && this._currentGlobalUniformData.bindGroup.resources[0].update()
    }
    get bindGroup() {
        return this._currentGlobalUniformData.bindGroup
    }
    get globalUniformData() {
        return this._currentGlobalUniformData
    }
    get uniformGroup() {
        return this._currentGlobalUniformData.bindGroup.resources[0]
    }
    _createUniforms() {
        return new gn({
            uProjectionMatrix: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uWorldTransformMatrix: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uWorldColorAlpha: {
                value: new Float32Array(4),
                type: "vec4<f32>"
            },
            uResolution: {
                value: [0, 0],
                type: "vec2<f32>"
            }
        },{
            isStatic: !0
        })
    }
    destroy() {
        this._renderer = null,
        this._globalUniformDataStack.length = 0,
        this._uniformsPool.length = 0,
        this._activeUniforms.length = 0,
        this._bindGroupPool.length = 0,
        this._activeBindGroups.length = 0,
        this._currentGlobalUniformData = null
    }
}
rO.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "globalUniforms"
};
let ide = 1;
class nO {
    constructor() {
        this._tasks = [],
        this._offset = 0
    }
    init() {
        Gr.system.add(this._update, this)
    }
    repeat(e, r, n=!0) {
        const i = ide++;
        let o = 0;
        return n && (this._offset += 1e3,
        o = this._offset),
        this._tasks.push({
            func: e,
            duration: r,
            start: performance.now(),
            offset: o,
            last: performance.now(),
            repeat: !0,
            id: i
        }),
        i
    }
    cancel(e) {
        for (let r = 0; r < this._tasks.length; r++)
            if (this._tasks[r].id === e) {
                this._tasks.splice(r, 1);
                return
            }
    }
    _update() {
        const e = performance.now();
        for (let r = 0; r < this._tasks.length; r++) {
            const n = this._tasks[r];
            if (e - n.offset - n.last >= n.duration) {
                const i = e - n.start;
                n.func(i),
                n.last = e
            }
        }
    }
    destroy() {
        Gr.system.remove(this._update, this),
        this._tasks.length = 0
    }
}
nO.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "scheduler",
    priority: 0
};
let D3 = !1;
function ode(t) {
    if (!D3) {
        if (je.get().getNavigator().userAgent.toLowerCase().indexOf("chrome") > -1) {
            const e = [`%c  %c  %c  %c  %c PixiJS %c v${kx} (${t}) http://www.pixijs.com/

`, "background: #E72264; padding:5px 0;", "background: #6CA2EA; padding:5px 0;", "background: #B5D33D; padding:5px 0;", "background: #FED23F; padding:5px 0;", "color: #FFFFFF; background: #E72264; padding:5px 0;", "color: #E72264; background: #FFFFFF; padding:5px 0;"];
            globalThis.console.log(...e)
        } else
            globalThis.console && globalThis.console.log(`PixiJS ${kx} - ${t} - http://www.pixijs.com/`);
        D3 = !0
    }
}
class Rb {
    constructor(e) {
        this._renderer = e
    }
    init(e) {
        if (e.hello) {
            let r = this._renderer.name;
            this._renderer.type === qn.WEBGL && (r += ` ${this._renderer.context.webGLVersion}`),
            ode(r)
        }
    }
}
Rb.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "hello",
    priority: -2
};
Rb.defaultOptions = {
    hello: !1
};
function sde(t) {
    let e = !1;
    for (const n in t)
        if (t[n] == null) {
            e = !0;
            break
        }
    if (!e)
        return t;
    const r = Object.create(null);
    for (const n in t) {
        const i = t[n];
        i && (r[n] = i)
    }
    return r
}
function ade(t) {
    let e = 0;
    for (let r = 0; r < t.length; r++)
        t[r] == null ? e++ : t[r - e] = t[r];
    return t.length -= e,
    t
}
let lde = 0;
const Mb = class iO {
    constructor(e) {
        this._managedRenderables = [],
        this._managedHashes = [],
        this._managedArrays = [],
        this._renderer = e
    }
    init(e) {
        e = {
            ...iO.defaultOptions,
            ...e
        },
        this.maxUnusedTime = e.renderableGCMaxUnusedTime,
        this._frequency = e.renderableGCFrequency,
        this.enabled = e.renderableGCActive
    }
    get enabled() {
        return !!this._handler
    }
    set enabled(e) {
        this.enabled !== e && (e ? (this._handler = this._renderer.scheduler.repeat( () => this.run(), this._frequency, !1),
        this._hashHandler = this._renderer.scheduler.repeat( () => {
            for (const r of this._managedHashes)
                r.context[r.hash] = sde(r.context[r.hash])
        }
        , this._frequency),
        this._arrayHandler = this._renderer.scheduler.repeat( () => {
            for (const r of this._managedArrays)
                ade(r.context[r.hash])
        }
        , this._frequency)) : (this._renderer.scheduler.cancel(this._handler),
        this._renderer.scheduler.cancel(this._hashHandler),
        this._renderer.scheduler.cancel(this._arrayHandler)))
    }
    addManagedHash(e, r) {
        this._managedHashes.push({
            context: e,
            hash: r
        })
    }
    addManagedArray(e, r) {
        this._managedArrays.push({
            context: e,
            hash: r
        })
    }
    prerender({container: e}) {
        this._now = performance.now(),
        e.renderGroup.gcTick = lde++,
        this._updateInstructionGCTick(e.renderGroup, e.renderGroup.gcTick)
    }
    addRenderable(e) {
        this.enabled && (e._lastUsed === -1 && (this._managedRenderables.push(e),
        e.once("destroyed", this._removeRenderable, this)),
        e._lastUsed = this._now)
    }
    run() {
        var o;
        const e = this._now
          , r = this._managedRenderables
          , n = this._renderer.renderPipes;
        let i = 0;
        for (let s = 0; s < r.length; s++) {
            const a = r[s];
            if (a === null) {
                i++;
                continue
            }
            const l = a.renderGroup ?? a.parentRenderGroup
              , c = ((o = l == null ? void 0 : l.instructionSet) == null ? void 0 : o.gcTick) ?? -1;
            if (((l == null ? void 0 : l.gcTick) ?? 0) === c && (a._lastUsed = e),
            e - a._lastUsed > this.maxUnusedTime) {
                if (!a.destroyed) {
                    const u = n;
                    l && (l.structureDidChange = !0),
                    u[a.renderPipeId].destroyRenderable(a)
                }
                a._lastUsed = -1,
                i++,
                a.off("destroyed", this._removeRenderable, this)
            } else
                r[s - i] = a
        }
        r.length -= i
    }
    destroy() {
        this.enabled = !1,
        this._renderer = null,
        this._managedRenderables.length = 0,
        this._managedHashes.length = 0,
        this._managedArrays.length = 0
    }
    _removeRenderable(e) {
        const r = this._managedRenderables.indexOf(e);
        r >= 0 && (e.off("destroyed", this._removeRenderable, this),
        this._managedRenderables[r] = null)
    }
    _updateInstructionGCTick(e, r) {
        e.instructionSet.gcTick = r;
        for (const n of e.renderGroupChildren)
            this._updateInstructionGCTick(n, r)
    }
}
;
Mb.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem],
    name: "renderableGC",
    priority: 0
};
Mb.defaultOptions = {
    renderableGCActive: !0,
    renderableGCMaxUnusedTime: 6e4,
    renderableGCFrequency: 3e4
};
let cde = Mb;
const Nb = class oO {
    constructor(e) {
        this._renderer = e,
        this.count = 0,
        this.checkCount = 0
    }
    init(e) {
        e = {
            ...oO.defaultOptions,
            ...e
        },
        this.checkCountMax = e.textureGCCheckCountMax,
        this.maxIdle = e.textureGCAMaxIdle ?? e.textureGCMaxIdle,
        this.active = e.textureGCActive
    }
    postrender() {
        this._renderer.renderingToScreen && (this.count++,
        this.active && (this.checkCount++,
        this.checkCount > this.checkCountMax && (this.checkCount = 0,
        this.run())))
    }
    run() {
        const e = this._renderer.texture.managedTextures;
        for (let r = 0; r < e.length; r++) {
            const n = e[r];
            n.autoGarbageCollect && n.resource && n._touched > -1 && this.count - n._touched > this.maxIdle && (n._touched = -1,
            n.unload())
        }
    }
    destroy() {
        this._renderer = null
    }
}
;
Nb.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem],
    name: "textureGC"
};
Nb.defaultOptions = {
    textureGCActive: !0,
    textureGCAMaxIdle: null,
    textureGCMaxIdle: 60 * 60,
    textureGCCheckCountMax: 600
};
let ude = Nb;
const Lb = class sO {
    get autoDensity() {
        return this.texture.source.autoDensity
    }
    set autoDensity(e) {
        this.texture.source.autoDensity = e
    }
    get resolution() {
        return this.texture.source._resolution
    }
    set resolution(e) {
        this.texture.source.resize(this.texture.source.width, this.texture.source.height, e)
    }
    init(e) {
        e = {
            ...sO.defaultOptions,
            ...e
        },
        e.view && (Re(tt, "ViewSystem.view has been renamed to ViewSystem.canvas"),
        e.canvas = e.view),
        this.screen = new mt(0,0,e.width,e.height),
        this.canvas = e.canvas || je.get().createCanvas(),
        this.antialias = !!e.antialias,
        this.texture = II(this.canvas, e),
        this.renderTarget = new fE({
            colorTextures: [this.texture],
            depth: !!e.depth,
            isRoot: !0
        }),
        this.texture.source.transparent = e.backgroundAlpha < 1,
        this.resolution = e.resolution
    }
    resize(e, r, n) {
        this.texture.source.resize(e, r, n),
        this.screen.width = this.texture.frame.width,
        this.screen.height = this.texture.frame.height
    }
    destroy(e=!1) {
        (typeof e == "boolean" ? e : !!(e != null && e.removeView)) && this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas),
        this.texture.destroy()
    }
}
;
Lb.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "view",
    priority: 0
};
Lb.defaultOptions = {
    width: 800,
    height: 600,
    autoDensity: !1,
    antialias: !1
};
let fde = Lb;
const aO = [Qfe, rO, Rb, fde, qI, ude, tO, ede, bP, cde, nO]
  , lO = [QI, hI, ZI, YI, xI, gI, pI, WI]
  , dde = [...aO, PI, lfe, nfe, wI, mI, VI, MI, _I, UI, $I, AI, Mfe, BI, CI]
  , hde = [...lO]
  , xde = [uI, jI, zI]
  , cO = []
  , uO = []
  , fO = [];
$e.handleByNamedList(X.WebGLSystem, cO);
$e.handleByNamedList(X.WebGLPipes, uO);
$e.handleByNamedList(X.WebGLPipesAdaptor, fO);
$e.add(...dde, ...hde, ...xde);
class pde extends c1 {
    constructor() {
        const e = {
            name: "webgl",
            type: qn.WEBGL,
            systems: cO,
            renderPipes: uO,
            renderPipeAdaptors: fO
        };
        super(e)
    }
}
const gde = Object.freeze(Object.defineProperty({
    __proto__: null,
    WebGLRenderer: pde
}, Symbol.toStringTag, {
    value: "Module"
}));
class dO {
    constructor(e) {
        this._hash = Object.create(null),
        this._renderer = e,
        this._renderer.renderableGC.addManagedHash(this, "_hash")
    }
    contextChange(e) {
        this._gpu = e
    }
    getBindGroup(e, r, n) {
        return e._updateKey(),
        this._hash[e._key] || this._createBindGroup(e, r, n)
    }
    _createBindGroup(e, r, n) {
        const i = this._gpu.device
          , o = r.layout[n]
          , s = []
          , a = this._renderer;
        for (const u in o) {
            const f = e.resources[u] ?? e.resources[o[u]];
            let d;
            if (f._resourceType === "uniformGroup") {
                const h = f;
                a.ubo.updateUniformGroup(h);
                const x = h.buffer;
                d = {
                    buffer: a.buffer.getGPUBuffer(x),
                    offset: 0,
                    size: x.descriptor.size
                }
            } else if (f._resourceType === "buffer") {
                const h = f;
                d = {
                    buffer: a.buffer.getGPUBuffer(h),
                    offset: 0,
                    size: h.descriptor.size
                }
            } else if (f._resourceType === "bufferResource") {
                const h = f;
                d = {
                    buffer: a.buffer.getGPUBuffer(h.buffer),
                    offset: h.offset,
                    size: h.size
                }
            } else if (f._resourceType === "textureSampler") {
                const h = f;
                d = a.texture.getGpuSampler(h)
            } else if (f._resourceType === "textureSource") {
                const h = f;
                d = a.texture.getGpuSource(h).createView({})
            }
            s.push({
                binding: o[u],
                resource: d
            })
        }
        const l = a.shader.getProgramData(r).bindGroups[n]
          , c = i.createBindGroup({
            layout: l,
            entries: s
        });
        return this._hash[e._key] = c,
        c
    }
    destroy() {
        for (const e of Object.keys(this._hash))
            this._hash[e] = null;
        this._hash = null,
        this._renderer = null
    }
}
dO.extension = {
    type: [X.WebGPUSystem],
    name: "bindGroup"
};
class hO {
    constructor(e) {
        this._gpuBuffers = Object.create(null),
        e.renderableGC.addManagedHash(this, "_gpuBuffers")
    }
    contextChange(e) {
        this._gpu = e
    }
    getGPUBuffer(e) {
        return this._gpuBuffers[e.uid] || this.createGPUBuffer(e)
    }
    updateBuffer(e) {
        const r = this._gpuBuffers[e.uid] || this.createGPUBuffer(e)
          , n = e.data;
        return e._updateID && n && (e._updateID = 0,
        this._gpu.device.queue.writeBuffer(r, 0, n.buffer, 0, (e._updateSize || n.byteLength) + 3 & -4)),
        r
    }
    destroyAll() {
        var e;
        for (const r in this._gpuBuffers)
            (e = this._gpuBuffers[r]) == null || e.destroy();
        this._gpuBuffers = {}
    }
    createGPUBuffer(e) {
        this._gpuBuffers[e.uid] || (e.on("update", this.updateBuffer, this),
        e.on("change", this.onBufferChange, this),
        e.on("destroy", this.onBufferDestroy, this));
        const r = this._gpu.device.createBuffer(e.descriptor);
        return e._updateID = 0,
        e.data && (nE(e.data.buffer, r.getMappedRange()),
        r.unmap()),
        this._gpuBuffers[e.uid] = r,
        r
    }
    onBufferChange(e) {
        this._gpuBuffers[e.uid].destroy(),
        e._updateID = 0,
        this._gpuBuffers[e.uid] = this.createGPUBuffer(e)
    }
    onBufferDestroy(e) {
        this._destroyBuffer(e)
    }
    destroy() {
        this.destroyAll(),
        this._gpuBuffers = {}
    }
    _destroyBuffer(e) {
        if (e.off("update", this.updateBuffer, this),
        e.off("change", this.onBufferChange, this),
        e.off("destroy", this.onBufferDestroy, this),
        !this._gpuBuffers[e.uid])
            return;
        this._gpuBuffers[e.uid].destroy(),
        this._gpuBuffers[e.uid] = null
    }
}
hO.extension = {
    type: [X.WebGPUSystem],
    name: "buffer"
};
class mde {
    constructor({minUniformOffsetAlignment: e}) {
        this._minUniformOffsetAlignment = 256,
        this.byteIndex = 0,
        this._minUniformOffsetAlignment = e,
        this.data = new Float32Array(65535)
    }
    clear() {
        this.byteIndex = 0
    }
    addEmptyGroup(e) {
        if (e > this._minUniformOffsetAlignment / 4)
            throw new Error(`UniformBufferBatch: array is too large: ${e * 4}`);
        const r = this.byteIndex;
        let n = r + e * 4;
        if (n = Math.ceil(n / this._minUniformOffsetAlignment) * this._minUniformOffsetAlignment,
        n > this.data.length * 4)
            throw new Error("UniformBufferBatch: ubo batch got too big");
        return this.byteIndex = n,
        r
    }
    addGroup(e) {
        const r = this.addEmptyGroup(e.length);
        for (let n = 0; n < e.length; n++)
            this.data[r / 4 + n] = e[n];
        return r
    }
    destroy() {
        this.data = null
    }
}
class xO {
    constructor(e) {
        this._colorMaskCache = 15,
        this._renderer = e
    }
    setMask(e) {
        this._colorMaskCache !== e && (this._colorMaskCache = e,
        this._renderer.pipeline.setColorMask(e))
    }
    destroy() {
        this._renderer = null,
        this._colorMaskCache = null
    }
}
xO.extension = {
    type: [X.WebGPUSystem],
    name: "colorMask"
};
class $b {
    constructor(e) {
        this._renderer = e
    }
    async init(e) {
        return this._initPromise ? this._initPromise : (this._initPromise = (e.gpu ? Promise.resolve(e.gpu) : this._createDeviceAndAdaptor(e)).then(r => {
            this.gpu = r,
            this._renderer.runners.contextChange.emit(this.gpu)
        }
        ),
        this._initPromise)
    }
    contextChange(e) {
        this._renderer.gpu = e
    }
    async _createDeviceAndAdaptor(e) {
        const r = await je.get().getNavigator().gpu.requestAdapter({
            powerPreference: e.powerPreference,
            forceFallbackAdapter: e.forceFallbackAdapter
        })
          , n = ["texture-compression-bc", "texture-compression-astc", "texture-compression-etc2"].filter(o => r.features.has(o))
          , i = await r.requestDevice({
            requiredFeatures: n
        });
        return {
            adapter: r,
            device: i
        }
    }
    destroy() {
        this.gpu = null,
        this._renderer = null
    }
}
$b.extension = {
    type: [X.WebGPUSystem],
    name: "device"
};
$b.defaultOptions = {
    powerPreference: void 0,
    forceFallbackAdapter: !1
};
class pO {
    constructor(e) {
        this._boundBindGroup = Object.create(null),
        this._boundVertexBuffer = Object.create(null),
        this._renderer = e
    }
    renderStart() {
        this.commandFinished = new Promise(e => {
            this._resolveCommandFinished = e
        }
        ),
        this.commandEncoder = this._renderer.gpu.device.createCommandEncoder()
    }
    beginRenderPass(e) {
        this.endRenderPass(),
        this._clearCache(),
        this.renderPassEncoder = this.commandEncoder.beginRenderPass(e.descriptor)
    }
    endRenderPass() {
        this.renderPassEncoder && this.renderPassEncoder.end(),
        this.renderPassEncoder = null
    }
    setViewport(e) {
        this.renderPassEncoder.setViewport(e.x, e.y, e.width, e.height, 0, 1)
    }
    setPipelineFromGeometryProgramAndState(e, r, n, i) {
        const o = this._renderer.pipeline.getPipeline(e, r, n, i);
        this.setPipeline(o)
    }
    setPipeline(e) {
        this._boundPipeline !== e && (this._boundPipeline = e,
        this.renderPassEncoder.setPipeline(e))
    }
    _setVertexBuffer(e, r) {
        this._boundVertexBuffer[e] !== r && (this._boundVertexBuffer[e] = r,
        this.renderPassEncoder.setVertexBuffer(e, this._renderer.buffer.updateBuffer(r)))
    }
    _setIndexBuffer(e) {
        if (this._boundIndexBuffer === e)
            return;
        this._boundIndexBuffer = e;
        const r = e.data.BYTES_PER_ELEMENT === 2 ? "uint16" : "uint32";
        this.renderPassEncoder.setIndexBuffer(this._renderer.buffer.updateBuffer(e), r)
    }
    resetBindGroup(e) {
        this._boundBindGroup[e] = null
    }
    setBindGroup(e, r, n) {
        if (this._boundBindGroup[e] === r)
            return;
        this._boundBindGroup[e] = r,
        r._touch(this._renderer.textureGC.count);
        const i = this._renderer.bindGroup.getBindGroup(r, n, e);
        this.renderPassEncoder.setBindGroup(e, i)
    }
    setGeometry(e, r) {
        const n = this._renderer.pipeline.getBufferNamesToBind(e, r);
        for (const i in n)
            this._setVertexBuffer(parseInt(i, 10), e.attributes[n[i]].buffer);
        e.indexBuffer && this._setIndexBuffer(e.indexBuffer)
    }
    _setShaderBindGroups(e, r) {
        for (const n in e.groups) {
            const i = e.groups[n];
            r || this._syncBindGroup(i),
            this.setBindGroup(n, i, e.gpuProgram)
        }
    }
    _syncBindGroup(e) {
        for (const r in e.resources) {
            const n = e.resources[r];
            n.isUniformGroup && this._renderer.ubo.updateUniformGroup(n)
        }
    }
    draw(e) {
        const {geometry: r, shader: n, state: i, topology: o, size: s, start: a, instanceCount: l, skipSync: c} = e;
        this.setPipelineFromGeometryProgramAndState(r, n.gpuProgram, i, o),
        this.setGeometry(r, n.gpuProgram),
        this._setShaderBindGroups(n, c),
        r.indexBuffer ? this.renderPassEncoder.drawIndexed(s || r.indexBuffer.data.length, l ?? r.instanceCount, a || 0) : this.renderPassEncoder.draw(s || r.getSize(), l ?? r.instanceCount, a || 0)
    }
    finishRenderPass() {
        this.renderPassEncoder && (this.renderPassEncoder.end(),
        this.renderPassEncoder = null)
    }
    postrender() {
        this.finishRenderPass(),
        this._gpu.device.queue.submit([this.commandEncoder.finish()]),
        this._resolveCommandFinished(),
        this.commandEncoder = null
    }
    restoreRenderPass() {
        const e = this._renderer.renderTarget.adaptor.getDescriptor(this._renderer.renderTarget.renderTarget, !1, [0, 0, 0, 1]);
        this.renderPassEncoder = this.commandEncoder.beginRenderPass(e);
        const r = this._boundPipeline
          , n = {
            ...this._boundVertexBuffer
        }
          , i = this._boundIndexBuffer
          , o = {
            ...this._boundBindGroup
        };
        this._clearCache();
        const s = this._renderer.renderTarget.viewport;
        this.renderPassEncoder.setViewport(s.x, s.y, s.width, s.height, 0, 1),
        this.setPipeline(r);
        for (const a in n)
            this._setVertexBuffer(a, n[a]);
        for (const a in o)
            this.setBindGroup(a, o[a], null);
        this._setIndexBuffer(i)
    }
    _clearCache() {
        for (let e = 0; e < 16; e++)
            this._boundBindGroup[e] = null,
            this._boundVertexBuffer[e] = null;
        this._boundIndexBuffer = null,
        this._boundPipeline = null
    }
    destroy() {
        this._renderer = null,
        this._gpu = null,
        this._boundBindGroup = null,
        this._boundVertexBuffer = null,
        this._boundIndexBuffer = null,
        this._boundPipeline = null
    }
    contextChange(e) {
        this._gpu = e
    }
}
pO.extension = {
    type: [X.WebGPUSystem],
    name: "encoder",
    priority: 1
};
class gO {
    constructor(e) {
        this._renderer = e
    }
    contextChange() {
        this.maxTextures = this._renderer.device.gpu.device.limits.maxSampledTexturesPerShaderStage,
        this.maxBatchableTextures = this.maxTextures
    }
    destroy() {}
}
gO.extension = {
    type: [X.WebGPUSystem],
    name: "limits"
};
class mO {
    constructor(e) {
        this._renderTargetStencilState = Object.create(null),
        this._renderer = e,
        e.renderTarget.onRenderTargetChange.add(this)
    }
    onRenderTargetChange(e) {
        let r = this._renderTargetStencilState[e.uid];
        r || (r = this._renderTargetStencilState[e.uid] = {
            stencilMode: ar.DISABLED,
            stencilReference: 0
        }),
        this._activeRenderTarget = e,
        this.setStencilMode(r.stencilMode, r.stencilReference)
    }
    setStencilMode(e, r) {
        const n = this._renderTargetStencilState[this._activeRenderTarget.uid];
        n.stencilMode = e,
        n.stencilReference = r;
        const i = this._renderer;
        i.pipeline.setStencilMode(e),
        i.encoder.renderPassEncoder.setStencilReference(r)
    }
    destroy() {
        this._renderer.renderTarget.onRenderTargetChange.remove(this),
        this._renderer = null,
        this._activeRenderTarget = null,
        this._renderTargetStencilState = null
    }
}
mO.extension = {
    type: [X.WebGPUSystem],
    name: "stencil"
};
const Kh = {
    i32: {
        align: 4,
        size: 4
    },
    u32: {
        align: 4,
        size: 4
    },
    f32: {
        align: 4,
        size: 4
    },
    f16: {
        align: 2,
        size: 2
    },
    "vec2<i32>": {
        align: 8,
        size: 8
    },
    "vec2<u32>": {
        align: 8,
        size: 8
    },
    "vec2<f32>": {
        align: 8,
        size: 8
    },
    "vec2<f16>": {
        align: 4,
        size: 4
    },
    "vec3<i32>": {
        align: 16,
        size: 12
    },
    "vec3<u32>": {
        align: 16,
        size: 12
    },
    "vec3<f32>": {
        align: 16,
        size: 12
    },
    "vec3<f16>": {
        align: 8,
        size: 6
    },
    "vec4<i32>": {
        align: 16,
        size: 16
    },
    "vec4<u32>": {
        align: 16,
        size: 16
    },
    "vec4<f32>": {
        align: 16,
        size: 16
    },
    "vec4<f16>": {
        align: 8,
        size: 8
    },
    "mat2x2<f32>": {
        align: 8,
        size: 16
    },
    "mat2x2<f16>": {
        align: 4,
        size: 8
    },
    "mat3x2<f32>": {
        align: 8,
        size: 24
    },
    "mat3x2<f16>": {
        align: 4,
        size: 12
    },
    "mat4x2<f32>": {
        align: 8,
        size: 32
    },
    "mat4x2<f16>": {
        align: 4,
        size: 16
    },
    "mat2x3<f32>": {
        align: 16,
        size: 32
    },
    "mat2x3<f16>": {
        align: 8,
        size: 16
    },
    "mat3x3<f32>": {
        align: 16,
        size: 48
    },
    "mat3x3<f16>": {
        align: 8,
        size: 24
    },
    "mat4x3<f32>": {
        align: 16,
        size: 64
    },
    "mat4x3<f16>": {
        align: 8,
        size: 32
    },
    "mat2x4<f32>": {
        align: 16,
        size: 32
    },
    "mat2x4<f16>": {
        align: 8,
        size: 16
    },
    "mat3x4<f32>": {
        align: 16,
        size: 48
    },
    "mat3x4<f16>": {
        align: 8,
        size: 24
    },
    "mat4x4<f32>": {
        align: 16,
        size: 64
    },
    "mat4x4<f16>": {
        align: 8,
        size: 32
    }
};
function vde(t) {
    const e = t.map(n => ({
        data: n,
        offset: 0,
        size: 0
    }));
    let r = 0;
    for (let n = 0; n < e.length; n++) {
        const i = e[n];
        let o = Kh[i.data.type].size;
        const s = Kh[i.data.type].align;
        if (!Kh[i.data.type])
            throw new Error(`[Pixi.js] WebGPU UniformBuffer: Unknown type ${i.data.type}`);
        i.data.size > 1 && (o = Math.max(o, s) * i.data.size),
        r = Math.ceil(r / s) * s,
        i.size = o,
        i.offset = r,
        r += o
    }
    return r = Math.ceil(r / 16) * 16,
    {
        uboElements: e,
        size: r
    }
}
function yde(t, e) {
    const {size: r, align: n} = Kh[t.data.type]
      , i = (n - r) / 4
      , o = t.data.type.indexOf("i32") >= 0 ? "dataInt32" : "data";
    return `
         v = uv.${t.data.name};
         ${e !== 0 ? `offset += ${e};` : ""}

         arrayOffset = offset;

         t = 0;

         for(var i=0; i < ${t.data.size * (r / 4)}; i++)
         {
             for(var j = 0; j < ${r / 4}; j++)
             {
                 ${o}[arrayOffset++] = v[t++];
             }
             ${i !== 0 ? `arrayOffset += ${i};` : ""}
         }
     `
}
function Ede(t) {
    return DI(t, "uboWgsl", yde, ffe)
}
class vO extends SI {
    constructor() {
        super({
            createUboElements: vde,
            generateUboSync: Ede
        })
    }
}
vO.extension = {
    type: [X.WebGPUSystem],
    name: "ubo"
};
const Ts = 128;
class yO {
    constructor(e) {
        this._bindGroupHash = Object.create(null),
        this._buffers = [],
        this._bindGroups = [],
        this._bufferResources = [],
        this._renderer = e,
        this._renderer.renderableGC.addManagedHash(this, "_bindGroupHash"),
        this._batchBuffer = new mde({
            minUniformOffsetAlignment: Ts
        });
        const r = 256 / Ts;
        for (let n = 0; n < r; n++) {
            let i = it.UNIFORM | it.COPY_DST;
            n === 0 && (i |= it.COPY_SRC),
            this._buffers.push(new Wn({
                data: this._batchBuffer.data,
                usage: i
            }))
        }
    }
    renderEnd() {
        this._uploadBindGroups(),
        this._resetBindGroups()
    }
    _resetBindGroups() {
        for (const e in this._bindGroupHash)
            this._bindGroupHash[e] = null;
        this._batchBuffer.clear()
    }
    getUniformBindGroup(e, r) {
        if (!r && this._bindGroupHash[e.uid])
            return this._bindGroupHash[e.uid];
        this._renderer.ubo.ensureUniformGroup(e);
        const n = e.buffer.data
          , i = this._batchBuffer.addEmptyGroup(n.length);
        return this._renderer.ubo.syncUniformGroup(e, this._batchBuffer.data, i / 4),
        this._bindGroupHash[e.uid] = this._getBindGroup(i / Ts),
        this._bindGroupHash[e.uid]
    }
    getUboResource(e) {
        this._renderer.ubo.updateUniformGroup(e);
        const r = e.buffer.data
          , n = this._batchBuffer.addGroup(r);
        return this._getBufferResource(n / Ts)
    }
    getArrayBindGroup(e) {
        const r = this._batchBuffer.addGroup(e);
        return this._getBindGroup(r / Ts)
    }
    getArrayBufferResource(e) {
        const n = this._batchBuffer.addGroup(e) / Ts;
        return this._getBufferResource(n)
    }
    _getBufferResource(e) {
        if (!this._bufferResources[e]) {
            const r = this._buffers[e % 2];
            this._bufferResources[e] = new Pb({
                buffer: r,
                offset: (e / 2 | 0) * 256,
                size: Ts
            })
        }
        return this._bufferResources[e]
    }
    _getBindGroup(e) {
        if (!this._bindGroups[e]) {
            const r = new es({
                0: this._getBufferResource(e)
            });
            this._bindGroups[e] = r
        }
        return this._bindGroups[e]
    }
    _uploadBindGroups() {
        const e = this._renderer.buffer
          , r = this._buffers[0];
        r.update(this._batchBuffer.byteIndex),
        e.updateBuffer(r);
        const n = this._renderer.gpu.device.createCommandEncoder();
        for (let i = 1; i < this._buffers.length; i++) {
            const o = this._buffers[i];
            n.copyBufferToBuffer(e.getGPUBuffer(r), Ts, e.getGPUBuffer(o), 0, this._batchBuffer.byteIndex)
        }
        this._renderer.gpu.device.queue.submit([n.finish()])
    }
    destroy() {
        var e;
        for (let r = 0; r < this._bindGroups.length; r++)
            (e = this._bindGroups[r]) == null || e.destroy();
        this._bindGroups = null,
        this._bindGroupHash = null;
        for (let r = 0; r < this._buffers.length; r++)
            this._buffers[r].destroy();
        this._buffers = null;
        for (let r = 0; r < this._bufferResources.length; r++)
            this._bufferResources[r].destroy();
        this._bufferResources = null,
        this._batchBuffer.destroy(),
        this._bindGroupHash = null,
        this._renderer = null
    }
}
yO.extension = {
    type: [X.WebGPUPipes],
    name: "uniformBatch"
};
const _de = {
    "point-list": 0,
    "line-list": 1,
    "line-strip": 2,
    "triangle-list": 3,
    "triangle-strip": 4
};
function bde(t, e, r, n, i) {
    return t << 24 | e << 16 | r << 10 | n << 5 | i
}
function Cde(t, e, r, n) {
    return r << 6 | t << 3 | n << 1 | e
}
class EO {
    constructor(e) {
        this._moduleCache = Object.create(null),
        this._bufferLayoutsCache = Object.create(null),
        this._bindingNamesCache = Object.create(null),
        this._pipeCache = Object.create(null),
        this._pipeStateCaches = Object.create(null),
        this._colorMask = 15,
        this._multisampleCount = 1,
        this._renderer = e
    }
    contextChange(e) {
        this._gpu = e,
        this.setStencilMode(ar.DISABLED),
        this._updatePipeHash()
    }
    setMultisampleCount(e) {
        this._multisampleCount !== e && (this._multisampleCount = e,
        this._updatePipeHash())
    }
    setRenderTarget(e) {
        this._multisampleCount = e.msaaSamples,
        this._depthStencilAttachment = e.descriptor.depthStencilAttachment ? 1 : 0,
        this._updatePipeHash()
    }
    setColorMask(e) {
        this._colorMask !== e && (this._colorMask = e,
        this._updatePipeHash())
    }
    setStencilMode(e) {
        this._stencilMode !== e && (this._stencilMode = e,
        this._stencilState = Ea[e],
        this._updatePipeHash())
    }
    setPipeline(e, r, n, i) {
        const o = this.getPipeline(e, r, n);
        i.setPipeline(o)
    }
    getPipeline(e, r, n, i) {
        e._layoutKey || (yI(e, r.attributeData),
        this._generateBufferKey(e)),
        i || (i = e.topology);
        const o = bde(e._layoutKey, r._layoutKey, n.data, n._blendModeId, _de[i]);
        return this._pipeCache[o] ? this._pipeCache[o] : (this._pipeCache[o] = this._createPipeline(e, r, n, i),
        this._pipeCache[o])
    }
    _createPipeline(e, r, n, i) {
        const o = this._gpu.device
          , s = this._createVertexBufferLayouts(e, r)
          , a = this._renderer.state.getColorTargets(n);
        a[0].writeMask = this._stencilMode === ar.RENDERING_MASK_ADD ? 0 : this._colorMask;
        const l = this._renderer.shader.getProgramData(r).pipeline
          , c = {
            vertex: {
                module: this._getModule(r.vertex.source),
                entryPoint: r.vertex.entryPoint,
                buffers: s
            },
            fragment: {
                module: this._getModule(r.fragment.source),
                entryPoint: r.fragment.entryPoint,
                targets: a
            },
            primitive: {
                topology: i,
                cullMode: n.cullMode
            },
            layout: l,
            multisample: {
                count: this._multisampleCount
            },
            label: "PIXI Pipeline"
        };
        return this._depthStencilAttachment && (c.depthStencil = {
            ...this._stencilState,
            format: "depth24plus-stencil8",
            depthWriteEnabled: n.depthTest,
            depthCompare: n.depthTest ? "less" : "always"
        }),
        o.createRenderPipeline(c)
    }
    _getModule(e) {
        return this._moduleCache[e] || this._createModule(e)
    }
    _createModule(e) {
        const r = this._gpu.device;
        return this._moduleCache[e] = r.createShaderModule({
            code: e
        }),
        this._moduleCache[e]
    }
    _generateBufferKey(e) {
        const r = [];
        let n = 0;
        const i = Object.keys(e.attributes).sort();
        for (let s = 0; s < i.length; s++) {
            const a = e.attributes[i[s]];
            r[n++] = a.offset,
            r[n++] = a.format,
            r[n++] = a.stride,
            r[n++] = a.instance
        }
        const o = r.join("|");
        return e._layoutKey = yf(o, "geometry"),
        e._layoutKey
    }
    _generateAttributeLocationsKey(e) {
        const r = [];
        let n = 0;
        const i = Object.keys(e.attributeData).sort();
        for (let s = 0; s < i.length; s++) {
            const a = e.attributeData[i[s]];
            r[n++] = a.location
        }
        const o = r.join("|");
        return e._attributeLocationsKey = yf(o, "programAttributes"),
        e._attributeLocationsKey
    }
    getBufferNamesToBind(e, r) {
        const n = e._layoutKey << 16 | r._attributeLocationsKey;
        if (this._bindingNamesCache[n])
            return this._bindingNamesCache[n];
        const i = this._createVertexBufferLayouts(e, r)
          , o = Object.create(null)
          , s = r.attributeData;
        for (let a = 0; a < i.length; a++) {
            const c = Object.values(i[a].attributes)[0].shaderLocation;
            for (const u in s)
                if (s[u].location === c) {
                    o[a] = u;
                    break
                }
        }
        return this._bindingNamesCache[n] = o,
        o
    }
    _createVertexBufferLayouts(e, r) {
        r._attributeLocationsKey || this._generateAttributeLocationsKey(r);
        const n = e._layoutKey << 16 | r._attributeLocationsKey;
        if (this._bufferLayoutsCache[n])
            return this._bufferLayoutsCache[n];
        const i = [];
        return e.buffers.forEach(o => {
            const s = {
                arrayStride: 0,
                stepMode: "vertex",
                attributes: []
            }
              , a = s.attributes;
            for (const l in r.attributeData) {
                const c = e.attributes[l];
                (c.divisor ?? 1) !== 1 && Ne(`Attribute ${l} has an invalid divisor value of '${c.divisor}'. WebGPU only supports a divisor value of 1`),
                c.buffer === o && (s.arrayStride = c.stride,
                s.stepMode = c.instance ? "instance" : "vertex",
                a.push({
                    shaderLocation: r.attributeData[l].location,
                    offset: c.offset,
                    format: c.format
                }))
            }
            a.length && i.push(s)
        }
        ),
        this._bufferLayoutsCache[n] = i,
        i
    }
    _updatePipeHash() {
        const e = Cde(this._stencilMode, this._multisampleCount, this._colorMask, this._depthStencilAttachment);
        this._pipeStateCaches[e] || (this._pipeStateCaches[e] = Object.create(null)),
        this._pipeCache = this._pipeStateCaches[e]
    }
    destroy() {
        this._renderer = null,
        this._bufferLayoutsCache = null
    }
}
EO.extension = {
    type: [X.WebGPUSystem],
    name: "pipeline"
};
class Ade {
    constructor() {
        this.contexts = [],
        this.msaaTextures = [],
        this.msaaSamples = 1
    }
}
class wde {
    init(e, r) {
        this._renderer = e,
        this._renderTargetSystem = r
    }
    copyToTexture(e, r, n, i, o) {
        const s = this._renderer
          , a = this._getGpuColorTexture(e)
          , l = s.texture.getGpuSource(r.source);
        return s.encoder.commandEncoder.copyTextureToTexture({
            texture: a,
            origin: n
        }, {
            texture: l,
            origin: o
        }, i),
        r
    }
    startRenderPass(e, r=!0, n, i) {
        const s = this._renderTargetSystem.getGpuRenderTarget(e)
          , a = this.getDescriptor(e, r, n);
        s.descriptor = a,
        this._renderer.pipeline.setRenderTarget(s),
        this._renderer.encoder.beginRenderPass(s),
        this._renderer.encoder.setViewport(i)
    }
    finishRenderPass() {
        this._renderer.encoder.endRenderPass()
    }
    _getGpuColorTexture(e) {
        const r = this._renderTargetSystem.getGpuRenderTarget(e);
        return r.contexts[0] ? r.contexts[0].getCurrentTexture() : this._renderer.texture.getGpuSource(e.colorTextures[0].source)
    }
    getDescriptor(e, r, n) {
        typeof r == "boolean" && (r = r ? Hn.ALL : Hn.NONE);
        const i = this._renderTargetSystem
          , o = i.getGpuRenderTarget(e)
          , s = e.colorTextures.map( (c, u) => {
            const f = o.contexts[u];
            let d, h;
            f ? d = f.getCurrentTexture().createView() : d = this._renderer.texture.getGpuSource(c).createView({
                mipLevelCount: 1
            }),
            o.msaaTextures[u] && (h = d,
            d = this._renderer.texture.getTextureView(o.msaaTextures[u]));
            const x = r & Hn.COLOR ? "clear" : "load";
            return n ?? (n = i.defaultClearColor),
            {
                view: d,
                resolveTarget: h,
                clearValue: n,
                storeOp: "store",
                loadOp: x
            }
        }
        );
        let a;
        if ((e.stencil || e.depth) && !e.depthStencilTexture && (e.ensureDepthStencilTexture(),
        e.depthStencilTexture.source.sampleCount = o.msaa ? 4 : 1),
        e.depthStencilTexture) {
            const c = r & Hn.STENCIL ? "clear" : "load"
              , u = r & Hn.DEPTH ? "clear" : "load";
            a = {
                view: this._renderer.texture.getGpuSource(e.depthStencilTexture.source).createView(),
                stencilStoreOp: "store",
                stencilLoadOp: c,
                depthClearValue: 1,
                depthLoadOp: u,
                depthStoreOp: "store"
            }
        }
        return {
            colorAttachments: s,
            depthStencilAttachment: a
        }
    }
    clear(e, r=!0, n, i) {
        if (!r)
            return;
        const {gpu: o, encoder: s} = this._renderer
          , a = o.device;
        if (s.commandEncoder === null) {
            const c = a.createCommandEncoder()
              , u = this.getDescriptor(e, r, n)
              , f = c.beginRenderPass(u);
            f.setViewport(i.x, i.y, i.width, i.height, 0, 1),
            f.end();
            const d = c.finish();
            a.queue.submit([d])
        } else
            this.startRenderPass(e, r, n, i)
    }
    initGpuRenderTarget(e) {
        e.isRoot = !0;
        const r = new Ade;
        return e.colorTextures.forEach( (n, i) => {
            if (n instanceof ho) {
                const o = n.resource.getContext("webgpu")
                  , s = n.transparent ? "premultiplied" : "opaque";
                try {
                    o.configure({
                        device: this._renderer.gpu.device,
                        usage: GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_DST | GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.COPY_SRC,
                        format: "bgra8unorm",
                        alphaMode: s
                    })
                } catch (a) {
                    console.error(a)
                }
                r.contexts[i] = o
            }
            if (r.msaa = n.source.antialias,
            n.source.antialias) {
                const o = new Br({
                    width: 0,
                    height: 0,
                    sampleCount: 4
                });
                r.msaaTextures[i] = o
            }
        }
        ),
        r.msaa && (r.msaaSamples = 4,
        e.depthStencilTexture && (e.depthStencilTexture.source.sampleCount = 4)),
        r
    }
    destroyGpuRenderTarget(e) {
        e.contexts.forEach(r => {
            r.unconfigure()
        }
        ),
        e.msaaTextures.forEach(r => {
            r.destroy()
        }
        ),
        e.msaaTextures.length = 0,
        e.contexts.length = 0
    }
    ensureDepthStencilTexture(e) {
        const r = this._renderTargetSystem.getGpuRenderTarget(e);
        e.depthStencilTexture && r.msaa && (e.depthStencilTexture.source.sampleCount = 4)
    }
    resizeGpuRenderTarget(e) {
        const r = this._renderTargetSystem.getGpuRenderTarget(e);
        r.width = e.width,
        r.height = e.height,
        r.msaa && e.colorTextures.forEach( (n, i) => {
            const o = r.msaaTextures[i];
            o == null || o.resize(n.source.width, n.source.height, n.source._resolution)
        }
        )
    }
}
class _O extends RI {
    constructor(e) {
        super(e),
        this.adaptor = new wde,
        this.adaptor.init(e, this)
    }
}
_O.extension = {
    type: [X.WebGPUSystem],
    name: "renderTarget"
};
class bO {
    constructor() {
        this._gpuProgramData = Object.create(null)
    }
    contextChange(e) {
        this._gpu = e
    }
    getProgramData(e) {
        return this._gpuProgramData[e._layoutKey] || this._createGPUProgramData(e)
    }
    _createGPUProgramData(e) {
        const r = this._gpu.device
          , n = e.gpuLayout.map(o => r.createBindGroupLayout({
            entries: o
        }))
          , i = {
            bindGroupLayouts: n
        };
        return this._gpuProgramData[e._layoutKey] = {
            bindGroups: n,
            pipeline: r.createPipelineLayout(i)
        },
        this._gpuProgramData[e._layoutKey]
    }
    destroy() {
        this._gpu = null,
        this._gpuProgramData = null
    }
}
bO.extension = {
    type: [X.WebGPUSystem],
    name: "shader"
};
const Rn = {};
Rn.normal = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "one",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    }
};
Rn.add = {
    alpha: {
        srcFactor: "src-alpha",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "one",
        dstFactor: "one",
        operation: "add"
    }
};
Rn.multiply = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "dst",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    }
};
Rn.screen = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "one",
        dstFactor: "one-minus-src",
        operation: "add"
    }
};
Rn.overlay = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "one",
        dstFactor: "one-minus-src",
        operation: "add"
    }
};
Rn.none = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "zero",
        dstFactor: "zero",
        operation: "add"
    }
};
Rn["normal-npm"] = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "src-alpha",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    }
};
Rn["add-npm"] = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one",
        operation: "add"
    },
    color: {
        srcFactor: "src-alpha",
        dstFactor: "one",
        operation: "add"
    }
};
Rn["screen-npm"] = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "src-alpha",
        dstFactor: "one-minus-src",
        operation: "add"
    }
};
Rn.erase = {
    alpha: {
        srcFactor: "zero",
        dstFactor: "one-minus-src-alpha",
        operation: "add"
    },
    color: {
        srcFactor: "zero",
        dstFactor: "one-minus-src",
        operation: "add"
    }
};
Rn.min = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one",
        operation: "min"
    },
    color: {
        srcFactor: "one",
        dstFactor: "one",
        operation: "min"
    }
};
Rn.max = {
    alpha: {
        srcFactor: "one",
        dstFactor: "one",
        operation: "max"
    },
    color: {
        srcFactor: "one",
        dstFactor: "one",
        operation: "max"
    }
};
class CO {
    constructor() {
        this.defaultState = new Ui,
        this.defaultState.blend = !0
    }
    contextChange(e) {
        this.gpu = e
    }
    getColorTargets(e) {
        return [{
            format: "bgra8unorm",
            writeMask: 0,
            blend: Rn[e.blendMode] || Rn.normal
        }]
    }
    destroy() {
        this.gpu = null
    }
}
CO.extension = {
    type: [X.WebGPUSystem],
    name: "state"
};
const Bde = {
    type: "image",
    upload(t, e, r) {
        const n = t.resource
          , i = (t.pixelWidth | 0) * (t.pixelHeight | 0)
          , o = n.byteLength / i;
        r.device.queue.writeTexture({
            texture: e
        }, n, {
            offset: 0,
            rowsPerImage: t.pixelHeight,
            bytesPerRow: t.pixelWidth * o
        }, {
            width: t.pixelWidth,
            height: t.pixelHeight,
            depthOrArrayLayers: 1
        })
    }
}
  , AO = {
    "bc1-rgba-unorm": {
        blockBytes: 8,
        blockWidth: 4,
        blockHeight: 4
    },
    "bc2-rgba-unorm": {
        blockBytes: 16,
        blockWidth: 4,
        blockHeight: 4
    },
    "bc3-rgba-unorm": {
        blockBytes: 16,
        blockWidth: 4,
        blockHeight: 4
    },
    "bc7-rgba-unorm": {
        blockBytes: 16,
        blockWidth: 4,
        blockHeight: 4
    },
    "etc1-rgb-unorm": {
        blockBytes: 8,
        blockWidth: 4,
        blockHeight: 4
    },
    "etc2-rgba8unorm": {
        blockBytes: 16,
        blockWidth: 4,
        blockHeight: 4
    },
    "astc-4x4-unorm": {
        blockBytes: 16,
        blockWidth: 4,
        blockHeight: 4
    }
}
  , Sde = {
    blockBytes: 4,
    blockWidth: 1,
    blockHeight: 1
}
  , Tde = {
    type: "compressed",
    upload(t, e, r) {
        let n = t.pixelWidth
          , i = t.pixelHeight;
        const o = AO[t.format] || Sde;
        for (let s = 0; s < t.resource.length; s++) {
            const a = t.resource[s]
              , l = Math.ceil(n / o.blockWidth) * o.blockBytes;
            r.device.queue.writeTexture({
                texture: e,
                mipLevel: s
            }, a, {
                offset: 0,
                bytesPerRow: l
            }, {
                width: Math.ceil(n / o.blockWidth) * o.blockWidth,
                height: Math.ceil(i / o.blockHeight) * o.blockHeight,
                depthOrArrayLayers: 1
            }),
            n = Math.max(n >> 1, 1),
            i = Math.max(i >> 1, 1)
        }
    }
}
  , wO = {
    type: "image",
    upload(t, e, r) {
        const n = t.resource;
        if (!n)
            return;
        if (globalThis.HTMLImageElement && n instanceof HTMLImageElement) {
            const a = je.get().createCanvas(n.width, n.height);
            a.getContext("2d").drawImage(n, 0, 0, n.width, n.height),
            t.resource = a,
            Ne("ImageSource: Image element passed, converting to canvas and replacing resource.")
        }
        const i = Math.min(e.width, t.resourceWidth || t.pixelWidth)
          , o = Math.min(e.height, t.resourceHeight || t.pixelHeight)
          , s = t.alphaMode === "premultiply-alpha-on-upload";
        r.device.queue.copyExternalImageToTexture({
            source: n
        }, {
            texture: e,
            premultipliedAlpha: s
        }, {
            width: i,
            height: o
        })
    }
}
  , Dde = {
    type: "video",
    upload(t, e, r) {
        wO.upload(t, e, r)
    }
};
class Fde {
    constructor(e) {
        this.device = e,
        this.sampler = e.createSampler({
            minFilter: "linear"
        }),
        this.pipelines = {}
    }
    _getMipmapPipeline(e) {
        let r = this.pipelines[e];
        return r || (this.mipmapShaderModule || (this.mipmapShaderModule = this.device.createShaderModule({
            code: `
                        var<private> pos : array<vec2<f32>, 3> = array<vec2<f32>, 3>(
                        vec2<f32>(-1.0, -1.0), vec2<f32>(-1.0, 3.0), vec2<f32>(3.0, -1.0));

                        struct VertexOutput {
                        @builtin(position) position : vec4<f32>,
                        @location(0) texCoord : vec2<f32>,
                        };

                        @vertex
                        fn vertexMain(@builtin(vertex_index) vertexIndex : u32) -> VertexOutput {
                        var output : VertexOutput;
                        output.texCoord = pos[vertexIndex] * vec2<f32>(0.5, -0.5) + vec2<f32>(0.5);
                        output.position = vec4<f32>(pos[vertexIndex], 0.0, 1.0);
                        return output;
                        }

                        @group(0) @binding(0) var imgSampler : sampler;
                        @group(0) @binding(1) var img : texture_2d<f32>;

                        @fragment
                        fn fragmentMain(@location(0) texCoord : vec2<f32>) -> @location(0) vec4<f32> {
                        return textureSample(img, imgSampler, texCoord);
                        }
                    `
        })),
        r = this.device.createRenderPipeline({
            layout: "auto",
            vertex: {
                module: this.mipmapShaderModule,
                entryPoint: "vertexMain"
            },
            fragment: {
                module: this.mipmapShaderModule,
                entryPoint: "fragmentMain",
                targets: [{
                    format: e
                }]
            }
        }),
        this.pipelines[e] = r),
        r
    }
    generateMipmap(e) {
        const r = this._getMipmapPipeline(e.format);
        if (e.dimension === "3d" || e.dimension === "1d")
            throw new Error("Generating mipmaps for non-2d textures is currently unsupported!");
        let n = e;
        const i = e.depthOrArrayLayers || 1
          , o = e.usage & GPUTextureUsage.RENDER_ATTACHMENT;
        if (!o) {
            const l = {
                size: {
                    width: Math.ceil(e.width / 2),
                    height: Math.ceil(e.height / 2),
                    depthOrArrayLayers: i
                },
                format: e.format,
                usage: GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_SRC | GPUTextureUsage.RENDER_ATTACHMENT,
                mipLevelCount: e.mipLevelCount - 1
            };
            n = this.device.createTexture(l)
        }
        const s = this.device.createCommandEncoder({})
          , a = r.getBindGroupLayout(0);
        for (let l = 0; l < i; ++l) {
            let c = e.createView({
                baseMipLevel: 0,
                mipLevelCount: 1,
                dimension: "2d",
                baseArrayLayer: l,
                arrayLayerCount: 1
            })
              , u = o ? 1 : 0;
            for (let f = 1; f < e.mipLevelCount; ++f) {
                const d = n.createView({
                    baseMipLevel: u++,
                    mipLevelCount: 1,
                    dimension: "2d",
                    baseArrayLayer: l,
                    arrayLayerCount: 1
                })
                  , h = s.beginRenderPass({
                    colorAttachments: [{
                        view: d,
                        storeOp: "store",
                        loadOp: "clear",
                        clearValue: {
                            r: 0,
                            g: 0,
                            b: 0,
                            a: 0
                        }
                    }]
                })
                  , x = this.device.createBindGroup({
                    layout: a,
                    entries: [{
                        binding: 0,
                        resource: this.sampler
                    }, {
                        binding: 1,
                        resource: c
                    }]
                });
                h.setPipeline(r),
                h.setBindGroup(0, x),
                h.draw(3, 1, 0, 0),
                h.end(),
                c = d
            }
        }
        if (!o) {
            const l = {
                width: Math.ceil(e.width / 2),
                height: Math.ceil(e.height / 2),
                depthOrArrayLayers: i
            };
            for (let c = 1; c < e.mipLevelCount; ++c)
                s.copyTextureToTexture({
                    texture: n,
                    mipLevel: c - 1
                }, {
                    texture: e,
                    mipLevel: c
                }, l),
                l.width = Math.ceil(l.width / 2),
                l.height = Math.ceil(l.height / 2)
        }
        return this.device.queue.submit([s.finish()]),
        o || n.destroy(),
        e
    }
}
class BO {
    constructor(e) {
        this.managedTextures = [],
        this._gpuSources = Object.create(null),
        this._gpuSamplers = Object.create(null),
        this._bindGroupHash = Object.create(null),
        this._textureViewHash = Object.create(null),
        this._uploads = {
            image: wO,
            buffer: Bde,
            video: Dde,
            compressed: Tde
        },
        this._renderer = e,
        e.renderableGC.addManagedHash(this, "_gpuSources"),
        e.renderableGC.addManagedHash(this, "_gpuSamplers"),
        e.renderableGC.addManagedHash(this, "_bindGroupHash"),
        e.renderableGC.addManagedHash(this, "_textureViewHash")
    }
    contextChange(e) {
        this._gpu = e
    }
    initSource(e) {
        return this._gpuSources[e.uid] ? this._gpuSources[e.uid] : this._initSource(e)
    }
    _initSource(e) {
        if (e.autoGenerateMipmaps) {
            const l = Math.max(e.pixelWidth, e.pixelHeight);
            e.mipLevelCount = Math.floor(Math.log2(l)) + 1
        }
        let r = GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_DST;
        e.uploadMethodId !== "compressed" && (r |= GPUTextureUsage.RENDER_ATTACHMENT,
        r |= GPUTextureUsage.COPY_SRC);
        const n = AO[e.format] || {
            blockBytes: 4,
            blockWidth: 1,
            blockHeight: 1
        }
          , i = Math.ceil(e.pixelWidth / n.blockWidth) * n.blockWidth
          , o = Math.ceil(e.pixelHeight / n.blockHeight) * n.blockHeight
          , s = {
            label: e.label,
            size: {
                width: i,
                height: o
            },
            format: e.format,
            sampleCount: e.sampleCount,
            mipLevelCount: e.mipLevelCount,
            dimension: e.dimension,
            usage: r
        }
          , a = this._gpuSources[e.uid] = this._gpu.device.createTexture(s);
        return this.managedTextures.includes(e) || (e.on("update", this.onSourceUpdate, this),
        e.on("resize", this.onSourceResize, this),
        e.on("destroy", this.onSourceDestroy, this),
        e.on("unload", this.onSourceUnload, this),
        e.on("updateMipmaps", this.onUpdateMipmaps, this),
        this.managedTextures.push(e)),
        this.onSourceUpdate(e),
        a
    }
    onSourceUpdate(e) {
        const r = this.getGpuSource(e);
        r && (this._uploads[e.uploadMethodId] && this._uploads[e.uploadMethodId].upload(e, r, this._gpu),
        e.autoGenerateMipmaps && e.mipLevelCount > 1 && this.onUpdateMipmaps(e))
    }
    onSourceUnload(e) {
        const r = this._gpuSources[e.uid];
        r && (this._gpuSources[e.uid] = null,
        r.destroy())
    }
    onUpdateMipmaps(e) {
        this._mipmapGenerator || (this._mipmapGenerator = new Fde(this._gpu.device));
        const r = this.getGpuSource(e);
        this._mipmapGenerator.generateMipmap(r)
    }
    onSourceDestroy(e) {
        e.off("update", this.onSourceUpdate, this),
        e.off("unload", this.onSourceUnload, this),
        e.off("destroy", this.onSourceDestroy, this),
        e.off("resize", this.onSourceResize, this),
        e.off("updateMipmaps", this.onUpdateMipmaps, this),
        this.managedTextures.splice(this.managedTextures.indexOf(e), 1),
        this.onSourceUnload(e)
    }
    onSourceResize(e) {
        const r = this._gpuSources[e.uid];
        r ? (r.width !== e.pixelWidth || r.height !== e.pixelHeight) && (this._textureViewHash[e.uid] = null,
        this._bindGroupHash[e.uid] = null,
        this.onSourceUnload(e),
        this.initSource(e)) : this.initSource(e)
    }
    _initSampler(e) {
        return this._gpuSamplers[e._resourceId] = this._gpu.device.createSampler(e),
        this._gpuSamplers[e._resourceId]
    }
    getGpuSampler(e) {
        return this._gpuSamplers[e._resourceId] || this._initSampler(e)
    }
    getGpuSource(e) {
        return this._gpuSources[e.uid] || this.initSource(e)
    }
    getTextureBindGroup(e) {
        return this._bindGroupHash[e.uid] ?? this._createTextureBindGroup(e)
    }
    _createTextureBindGroup(e) {
        const r = e.source;
        return this._bindGroupHash[e.uid] = new es({
            0: r,
            1: r.style,
            2: new gn({
                uTextureMatrix: {
                    type: "mat3x3<f32>",
                    value: e.textureMatrix.mapCoord
                }
            })
        }),
        this._bindGroupHash[e.uid]
    }
    getTextureView(e) {
        const r = e.source;
        return this._textureViewHash[r.uid] ?? this._createTextureView(r)
    }
    _createTextureView(e) {
        return this._textureViewHash[e.uid] = this.getGpuSource(e).createView(),
        this._textureViewHash[e.uid]
    }
    generateCanvas(e) {
        const r = this._renderer
          , n = r.gpu.device.createCommandEncoder()
          , i = je.get().createCanvas();
        i.width = e.source.pixelWidth,
        i.height = e.source.pixelHeight;
        const o = i.getContext("webgpu");
        return o.configure({
            device: r.gpu.device,
            usage: GPUTextureUsage.COPY_DST | GPUTextureUsage.COPY_SRC,
            format: je.get().getNavigator().gpu.getPreferredCanvasFormat(),
            alphaMode: "premultiplied"
        }),
        n.copyTextureToTexture({
            texture: r.texture.getGpuSource(e.source),
            origin: {
                x: 0,
                y: 0
            }
        }, {
            texture: o.getCurrentTexture()
        }, {
            width: i.width,
            height: i.height
        }),
        r.gpu.device.queue.submit([n.finish()]),
        i
    }
    getPixels(e) {
        const r = this.generateCanvas(e)
          , n = hs.getOptimalCanvasAndContext(r.width, r.height)
          , i = n.context;
        i.drawImage(r, 0, 0);
        const {width: o, height: s} = r
          , a = i.getImageData(0, 0, o, s)
          , l = new Uint8ClampedArray(a.data.buffer);
        return hs.returnCanvasAndContext(n),
        {
            pixels: l,
            width: o,
            height: s
        }
    }
    destroy() {
        this.managedTextures.slice().forEach(e => this.onSourceDestroy(e)),
        this.managedTextures = null;
        for (const e of Object.keys(this._bindGroupHash)) {
            const r = Number(e)
              , n = this._bindGroupHash[r];
            n == null || n.destroy(),
            this._bindGroupHash[r] = null
        }
        this._renderer = null,
        this._gpu = null,
        this._mipmapGenerator = null,
        this._gpuSources = null,
        this._bindGroupHash = null,
        this._textureViewHash = null,
        this._gpuSamplers = null
    }
}
BO.extension = {
    type: [X.WebGPUSystem],
    name: "texture"
};
class SO {
    constructor() {
        this._maxTextures = 0
    }
    contextChange(e) {
        const r = new gn({
            uTransformMatrix: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uColor: {
                value: new Float32Array([1, 1, 1, 1]),
                type: "vec4<f32>"
            },
            uRound: {
                value: 0,
                type: "f32"
            }
        });
        this._maxTextures = e.limits.maxBatchableTextures;
        const n = od({
            name: "graphics",
            bits: [db, xb(this._maxTextures), Z0e, ad]
        });
        this.shader = new yi({
            gpuProgram: n,
            resources: {
                localUniforms: r
            }
        })
    }
    execute(e, r) {
        const n = r.context
          , i = n.customShader || this.shader
          , o = e.renderer
          , s = o.graphicsContext
          , {batcher: a, instructions: l} = s.getContextRenderData(n)
          , c = o.encoder;
        c.setGeometry(a.geometry, i.gpuProgram);
        const u = o.globalUniforms.bindGroup;
        c.setBindGroup(0, u, i.gpuProgram);
        const f = o.renderPipes.uniformBatch.getUniformBindGroup(i.resources.localUniforms, !0);
        c.setBindGroup(2, f, i.gpuProgram);
        const d = l.instructions;
        let h = null;
        for (let x = 0; x < l.instructionSize; x++) {
            const y = d[x];
            if (y.topology !== h && (h = y.topology,
            c.setPipelineFromGeometryProgramAndState(a.geometry, i.gpuProgram, e.state, y.topology)),
            i.groups[1] = y.bindGroup,
            !y.gpuBindGroup) {
                const m = y.textures;
                y.bindGroup = fb(m.textures, m.count, this._maxTextures),
                y.gpuBindGroup = o.bindGroup.getBindGroup(y.bindGroup, i.gpuProgram, 1)
            }
            c.setBindGroup(1, y.bindGroup, i.gpuProgram),
            c.renderPassEncoder.drawIndexed(y.size, 1, y.start)
        }
    }
    destroy() {
        this.shader.destroy(!0),
        this.shader = null
    }
}
SO.extension = {
    type: [X.WebGPUPipesAdaptor],
    name: "graphics"
};
class TO {
    init() {
        const e = od({
            name: "mesh",
            bits: [U0, J0e, ad]
        });
        this._shader = new yi({
            gpuProgram: e,
            resources: {
                uTexture: Be.EMPTY._source,
                uSampler: Be.EMPTY._source.style,
                textureUniforms: {
                    uTextureMatrix: {
                        type: "mat3x3<f32>",
                        value: new Pe
                    }
                }
            }
        })
    }
    execute(e, r) {
        const n = e.renderer;
        let i = r._shader;
        if (!i)
            i = this._shader,
            i.groups[2] = n.texture.getTextureBindGroup(r.texture);
        else if (!i.gpuProgram) {
            Ne("Mesh shader has no gpuProgram", r.shader);
            return
        }
        const o = i.gpuProgram;
        if (o.autoAssignGlobalUniforms && (i.groups[0] = n.globalUniforms.bindGroup),
        o.autoAssignLocalUniforms) {
            const s = e.localUniforms;
            i.groups[1] = n.renderPipes.uniformBatch.getUniformBindGroup(s, !0)
        }
        n.encoder.draw({
            geometry: r._geometry,
            shader: i,
            state: r.state
        })
    }
    destroy() {
        this._shader.destroy(!0),
        this._shader = null
    }
}
TO.extension = {
    type: [X.WebGPUPipesAdaptor],
    name: "mesh"
};
const Pde = [...aO, vO, pO, $b, gO, hO, BO, _O, bO, CO, EO, xO, mO, dO]
  , Ide = [...lO, yO]
  , Ode = [fI, TO, SO]
  , DO = []
  , FO = []
  , PO = [];
$e.handleByNamedList(X.WebGPUSystem, DO);
$e.handleByNamedList(X.WebGPUPipes, FO);
$e.handleByNamedList(X.WebGPUPipesAdaptor, PO);
$e.add(...Pde, ...Ide, ...Ode);
class kde extends c1 {
    constructor() {
        const e = {
            name: "webgpu",
            type: qn.WEBGPU,
            systems: DO,
            renderPipes: FO,
            renderPipeAdaptors: PO
        };
        super(e)
    }
}
const Rde = Object.freeze(Object.defineProperty({
    __proto__: null,
    WebGPURenderer: kde
}, Symbol.toStringTag, {
    value: "Module"
}));
class Mde {
    constructor() {
        this.batches = [],
        this.batched = !1
    }
    destroy() {
        this.batches.forEach(e => {
            xr.return(e)
        }
        ),
        this.batches.length = 0
    }
}
class IO {
    constructor(e, r) {
        this.state = Ui.for2d(),
        this.renderer = e,
        this._adaptor = r,
        this.renderer.runners.contextChange.add(this)
    }
    contextChange() {
        this._adaptor.contextChange(this.renderer)
    }
    validateRenderable(e) {
        const r = e.context
          , n = !!e._gpuData
          , i = this.renderer.graphicsContext.updateGpuContext(r);
        return !!(i.isBatchable || n !== i.isBatchable)
    }
    addRenderable(e, r) {
        const n = this.renderer.graphicsContext.updateGpuContext(e.context);
        e.didViewUpdate && this._rebuild(e),
        n.isBatchable ? this._addToBatcher(e, r) : (this.renderer.renderPipes.batch.break(r),
        r.add(e))
    }
    updateRenderable(e) {
        const n = this._getGpuDataForRenderable(e).batches;
        for (let i = 0; i < n.length; i++) {
            const o = n[i];
            o._batcher.updateElement(o)
        }
    }
    execute(e) {
        if (!e.isRenderable)
            return;
        const r = this.renderer
          , n = e.context;
        if (!r.graphicsContext.getGpuContext(n).batches.length)
            return;
        const o = n.customShader || this._adaptor.shader;
        this.state.blendMode = e.groupBlendMode;
        const s = o.resources.localUniforms.uniforms;
        s.uTransformMatrix = e.groupTransform,
        s.uRound = r._roundPixels | e._roundPixels,
        cd(e.groupColorAlpha, s.uColor, 0),
        this._adaptor.execute(this, e)
    }
    _rebuild(e) {
        const r = this._getGpuDataForRenderable(e)
          , n = this.renderer.graphicsContext.updateGpuContext(e.context);
        r.destroy(),
        n.isBatchable && this._updateBatchesForRenderable(e, r)
    }
    _addToBatcher(e, r) {
        const n = this.renderer.renderPipes.batch
          , i = this._getGpuDataForRenderable(e).batches;
        for (let o = 0; o < i.length; o++) {
            const s = i[o];
            n.addToBatch(s, r)
        }
    }
    _getGpuDataForRenderable(e) {
        return e._gpuData[this.renderer.uid] || this._initGpuDataForRenderable(e)
    }
    _initGpuDataForRenderable(e) {
        const r = new Mde;
        return e._gpuData[this.renderer.uid] = r,
        r
    }
    _updateBatchesForRenderable(e, r) {
        const n = e.context
          , i = this.renderer.graphicsContext.getGpuContext(n)
          , o = this.renderer._roundPixels | e._roundPixels;
        r.batches = i.batches.map(s => {
            const a = xr.get(vb);
            return s.copyTo(a),
            a.renderable = e,
            a.roundPixels = o,
            a
        }
        )
    }
    destroy() {
        this.renderer = null,
        this._adaptor.destroy(),
        this._adaptor = null,
        this.state = null
    }
}
IO.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "graphics"
};
const OO = class kO extends Bb {
    constructor(...e) {
        super({});
        let r = e[0] ?? {};
        typeof r == "number" && (Re(tt, "PlaneGeometry constructor changed please use { width, height, verticesX, verticesY } instead"),
        r = {
            width: r,
            height: e[1],
            verticesX: e[2],
            verticesY: e[3]
        }),
        this.build(r)
    }
    build(e) {
        e = {
            ...kO.defaultOptions,
            ...e
        },
        this.verticesX = this.verticesX ?? e.verticesX,
        this.verticesY = this.verticesY ?? e.verticesY,
        this.width = this.width ?? e.width,
        this.height = this.height ?? e.height;
        const r = this.verticesX * this.verticesY
          , n = []
          , i = []
          , o = []
          , s = this.verticesX - 1
          , a = this.verticesY - 1
          , l = this.width / s
          , c = this.height / a;
        for (let f = 0; f < r; f++) {
            const d = f % this.verticesX
              , h = f / this.verticesX | 0;
            n.push(d * l, h * c),
            i.push(d / s, h / a)
        }
        const u = s * a;
        for (let f = 0; f < u; f++) {
            const d = f % s
              , h = f / s | 0
              , x = h * this.verticesX + d
              , y = h * this.verticesX + d + 1
              , m = (h + 1) * this.verticesX + d
              , E = (h + 1) * this.verticesX + d + 1;
            o.push(x, y, m, y, E, m)
        }
        this.buffers[0].data = new Float32Array(n),
        this.buffers[1].data = new Float32Array(i),
        this.indexBuffer.data = new Uint32Array(o),
        this.buffers[0].update(),
        this.buffers[1].update(),
        this.indexBuffer.update()
    }
}
;
OO.defaultOptions = {
    width: 100,
    height: 100,
    verticesX: 10,
    verticesY: 10
};
let Nde = OO;
class Ub {
    constructor() {
        this.batcherName = "default",
        this.packAsQuad = !1,
        this.indexOffset = 0,
        this.attributeOffset = 0,
        this.roundPixels = 0,
        this._batcher = null,
        this._batch = null,
        this._textureMatrixUpdateId = -1,
        this._uvUpdateId = -1
    }
    get blendMode() {
        return this.renderable.groupBlendMode
    }
    get topology() {
        return this._topology || this.geometry.topology
    }
    set topology(e) {
        this._topology = e
    }
    reset() {
        this.renderable = null,
        this.texture = null,
        this._batcher = null,
        this._batch = null,
        this.geometry = null,
        this._uvUpdateId = -1,
        this._textureMatrixUpdateId = -1
    }
    setTexture(e) {
        this.texture !== e && (this.texture = e,
        this._textureMatrixUpdateId = -1)
    }
    get uvs() {
        const r = this.geometry.getBuffer("aUV")
          , n = r.data;
        let i = n;
        const o = this.texture.textureMatrix;
        return o.isSimple || (i = this._transformedUvs,
        (this._textureMatrixUpdateId !== o._updateID || this._uvUpdateId !== r._updateID) && ((!i || i.length < n.length) && (i = this._transformedUvs = new Float32Array(n.length)),
        this._textureMatrixUpdateId = o._updateID,
        this._uvUpdateId = r._updateID,
        o.multiplyUvs(n, i))),
        i
    }
    get positions() {
        return this.geometry.positions
    }
    get indices() {
        return this.geometry.indices
    }
    get color() {
        return this.renderable.groupColorAlpha
    }
    get groupTransform() {
        return this.renderable.groupTransform
    }
    get attributeSize() {
        return this.geometry.positions.length / 2
    }
    get indexSize() {
        return this.geometry.indices.length
    }
}
class F3 {
    destroy() {}
}
class RO {
    constructor(e, r) {
        this.localUniforms = new gn({
            uTransformMatrix: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uColor: {
                value: new Float32Array([1, 1, 1, 1]),
                type: "vec4<f32>"
            },
            uRound: {
                value: 0,
                type: "f32"
            }
        }),
        this.localUniformsBindGroup = new es({
            0: this.localUniforms
        }),
        this.renderer = e,
        this._adaptor = r,
        this._adaptor.init()
    }
    validateRenderable(e) {
        const r = this._getMeshData(e)
          , n = r.batched
          , i = e.batched;
        if (r.batched = i,
        n !== i)
            return !0;
        if (i) {
            const o = e._geometry;
            if (o.indices.length !== r.indexSize || o.positions.length !== r.vertexSize)
                return r.indexSize = o.indices.length,
                r.vertexSize = o.positions.length,
                !0;
            const s = this._getBatchableMesh(e);
            return s.texture.uid !== e._texture.uid && (s._textureMatrixUpdateId = -1),
            !s._batcher.checkAndUpdateTexture(s, e._texture)
        }
        return !1
    }
    addRenderable(e, r) {
        var o, s;
        const n = this.renderer.renderPipes.batch
          , i = this._getMeshData(e);
        if (e.didViewUpdate && (i.indexSize = (o = e._geometry.indices) == null ? void 0 : o.length,
        i.vertexSize = (s = e._geometry.positions) == null ? void 0 : s.length),
        i.batched) {
            const a = this._getBatchableMesh(e);
            a.setTexture(e._texture),
            a.geometry = e._geometry,
            n.addToBatch(a, r)
        } else
            n.break(r),
            r.add(e)
    }
    updateRenderable(e) {
        if (e.batched) {
            const r = this._getBatchableMesh(e);
            r.setTexture(e._texture),
            r.geometry = e._geometry,
            r._batcher.updateElement(r)
        }
    }
    execute(e) {
        if (!e.isRenderable)
            return;
        e.state.blendMode = Cf(e.groupBlendMode, e.texture._source);
        const r = this.localUniforms;
        r.uniforms.uTransformMatrix = e.groupTransform,
        r.uniforms.uRound = this.renderer._roundPixels | e._roundPixels,
        r.update(),
        cd(e.groupColorAlpha, r.uniforms.uColor, 0),
        this._adaptor.execute(this, e)
    }
    _getMeshData(e) {
        var r, n;
        return (r = e._gpuData)[n = this.renderer.uid] || (r[n] = new F3),
        e._gpuData[this.renderer.uid].meshData || this._initMeshData(e)
    }
    _initMeshData(e) {
        return e._gpuData[this.renderer.uid].meshData = {
            batched: e.batched,
            indexSize: 0,
            vertexSize: 0
        },
        e._gpuData[this.renderer.uid].meshData
    }
    _getBatchableMesh(e) {
        var r, n;
        return (r = e._gpuData)[n = this.renderer.uid] || (r[n] = new F3),
        e._gpuData[this.renderer.uid].batchableMesh || this._initBatchableMesh(e)
    }
    _initBatchableMesh(e) {
        const r = new Ub;
        return r.renderable = e,
        r.setTexture(e._texture),
        r.transform = e.groupTransform,
        r.roundPixels = this.renderer._roundPixels | e._roundPixels,
        e._gpuData[this.renderer.uid].batchableMesh = r,
        r
    }
    destroy() {
        this.localUniforms = null,
        this.localUniformsBindGroup = null,
        this._adaptor.destroy(),
        this._adaptor = null,
        this.renderer = null
    }
}
RO.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "mesh"
};
class Lde {
    execute(e, r) {
        const n = e.state
          , i = e.renderer
          , o = r.shader || e.defaultShader;
        o.resources.uTexture = r.texture._source,
        o.resources.uniforms = e.localUniforms;
        const s = i.gl
          , a = e.getBuffers(r);
        i.shader.bind(o),
        i.state.set(n),
        i.geometry.bind(a.geometry, o.glProgram);
        const c = a.geometry.indexBuffer.data.BYTES_PER_ELEMENT === 2 ? s.UNSIGNED_SHORT : s.UNSIGNED_INT;
        s.drawElements(s.TRIANGLES, r.particleChildren.length * 6, c, 0)
    }
}
class $de {
    execute(e, r) {
        const n = e.renderer
          , i = r.shader || e.defaultShader;
        i.groups[0] = n.renderPipes.uniformBatch.getUniformBindGroup(e.localUniforms, !0),
        i.groups[1] = n.texture.getTextureBindGroup(r.texture);
        const o = e.state
          , s = e.getBuffers(r);
        n.encoder.draw({
            geometry: s.geometry,
            shader: r.shader || e.defaultShader,
            state: o,
            size: r.particleChildren.length * 6
        })
    }
}
function P3(t, e=null) {
    const r = t * 6;
    if (r > 65535 ? e || (e = new Uint32Array(r)) : e || (e = new Uint16Array(r)),
    e.length !== r)
        throw new Error(`Out buffer length is incorrect, got ${e.length} and expected ${r}`);
    for (let n = 0, i = 0; n < r; n += 6,
    i += 4)
        e[n + 0] = i + 0,
        e[n + 1] = i + 1,
        e[n + 2] = i + 2,
        e[n + 3] = i + 0,
        e[n + 4] = i + 2,
        e[n + 5] = i + 3;
    return e
}
function Ude(t) {
    return {
        dynamicUpdate: I3(t, !0),
        staticUpdate: I3(t, !1)
    }
}
function I3(t, e) {
    const r = [];
    r.push(`

        var index = 0;

        for (let i = 0; i < ps.length; ++i)
        {
            const p = ps[i];

            `);
    let n = 0;
    for (const o in t) {
        const s = t[o];
        if (e !== s.dynamic)
            continue;
        r.push(`offset = index + ${n}`),
        r.push(s.code);
        const a = fa(s.format);
        n += a.stride / 4
    }
    r.push(`
            index += stride * 4;
        }
    `),
    r.unshift(`
        var stride = ${n};
    `);
    const i = r.join(`
`);
    return new Function("ps","f32v","u32v",i)
}
class Gde {
    constructor(e) {
        this._size = 0,
        this._generateParticleUpdateCache = {};
        const r = this._size = e.size ?? 1e3
          , n = e.properties;
        let i = 0
          , o = 0;
        for (const u in n) {
            const f = n[u]
              , d = fa(f.format);
            f.dynamic ? o += d.stride : i += d.stride
        }
        this._dynamicStride = o / 4,
        this._staticStride = i / 4,
        this.staticAttributeBuffer = new Cc(r * 4 * i),
        this.dynamicAttributeBuffer = new Cc(r * 4 * o),
        this.indexBuffer = P3(r);
        const s = new id;
        let a = 0
          , l = 0;
        this._staticBuffer = new Wn({
            data: new Float32Array(1),
            label: "static-particle-buffer",
            shrinkToFit: !1,
            usage: it.VERTEX | it.COPY_DST
        }),
        this._dynamicBuffer = new Wn({
            data: new Float32Array(1),
            label: "dynamic-particle-buffer",
            shrinkToFit: !1,
            usage: it.VERTEX | it.COPY_DST
        });
        for (const u in n) {
            const f = n[u]
              , d = fa(f.format);
            f.dynamic ? (s.addAttribute(f.attributeName, {
                buffer: this._dynamicBuffer,
                stride: this._dynamicStride * 4,
                offset: a * 4,
                format: f.format
            }),
            a += d.size) : (s.addAttribute(f.attributeName, {
                buffer: this._staticBuffer,
                stride: this._staticStride * 4,
                offset: l * 4,
                format: f.format
            }),
            l += d.size)
        }
        s.addIndex(this.indexBuffer);
        const c = this.getParticleUpdate(n);
        this._dynamicUpload = c.dynamicUpdate,
        this._staticUpload = c.staticUpdate,
        this.geometry = s
    }
    getParticleUpdate(e) {
        const r = Hde(e);
        return this._generateParticleUpdateCache[r] ? this._generateParticleUpdateCache[r] : (this._generateParticleUpdateCache[r] = this.generateParticleUpdate(e),
        this._generateParticleUpdateCache[r])
    }
    generateParticleUpdate(e) {
        return Ude(e)
    }
    update(e, r) {
        e.length > this._size && (r = !0,
        this._size = Math.max(e.length, this._size * 1.5 | 0),
        this.staticAttributeBuffer = new Cc(this._size * this._staticStride * 4 * 4),
        this.dynamicAttributeBuffer = new Cc(this._size * this._dynamicStride * 4 * 4),
        this.indexBuffer = P3(this._size),
        this.geometry.indexBuffer.setDataWithSize(this.indexBuffer, this.indexBuffer.byteLength, !0));
        const n = this.dynamicAttributeBuffer;
        if (this._dynamicUpload(e, n.float32View, n.uint32View),
        this._dynamicBuffer.setDataWithSize(this.dynamicAttributeBuffer.float32View, e.length * this._dynamicStride * 4, !0),
        r) {
            const i = this.staticAttributeBuffer;
            this._staticUpload(e, i.float32View, i.uint32View),
            this._staticBuffer.setDataWithSize(i.float32View, e.length * this._staticStride * 4, !0)
        }
    }
    destroy() {
        this._staticBuffer.destroy(),
        this._dynamicBuffer.destroy(),
        this.geometry.destroy()
    }
}
function Hde(t) {
    const e = [];
    for (const r in t) {
        const n = t[r];
        e.push(r, n.code, n.dynamic ? "d" : "s")
    }
    return e.join("_")
}
var Vde = `varying vec2 vUV;
varying vec4 vColor;

uniform sampler2D uTexture;

void main(void){
    vec4 color = texture2D(uTexture, vUV) * vColor;
    gl_FragColor = color;
}`
  , zde = `attribute vec2 aVertex;
attribute vec2 aUV;
attribute vec4 aColor;

attribute vec2 aPosition;
attribute float aRotation;

uniform mat3 uTranslationMatrix;
uniform float uRound;
uniform vec2 uResolution;
uniform vec4 uColor;

varying vec2 vUV;
varying vec4 vColor;

vec2 roundPixels(vec2 position, vec2 targetSize)
{       
    return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
}

void main(void){
    float cosRotation = cos(aRotation);
    float sinRotation = sin(aRotation);
    float x = aVertex.x * cosRotation - aVertex.y * sinRotation;
    float y = aVertex.x * sinRotation + aVertex.y * cosRotation;

    vec2 v = vec2(x, y);
    v = v + aPosition;

    gl_Position = vec4((uTranslationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);

    if(uRound == 1.0)
    {
        gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
    }

    vUV = aUV;
    vColor = vec4(aColor.rgb * aColor.a, aColor.a) * uColor;
}
`
  , O3 = `
struct ParticleUniforms {
  uTranslationMatrix:mat3x3<f32>,
  uColor:vec4<f32>,
  uRound:f32,
  uResolution:vec2<f32>,
};

fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>
{
  return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
}

@group(0) @binding(0) var<uniform> uniforms: ParticleUniforms;

@group(1) @binding(0) var uTexture: texture_2d<f32>;
@group(1) @binding(1) var uSampler : sampler;

struct VSOutput {
    @builtin(position) position: vec4<f32>,
    @location(0) uv : vec2<f32>,
    @location(1) color : vec4<f32>,
  };
@vertex
fn mainVertex(
  @location(0) aVertex: vec2<f32>,
  @location(1) aPosition: vec2<f32>,
  @location(2) aUV: vec2<f32>,
  @location(3) aColor: vec4<f32>,
  @location(4) aRotation: f32,
) -> VSOutput {
  
   let v = vec2(
       aVertex.x * cos(aRotation) - aVertex.y * sin(aRotation),
       aVertex.x * sin(aRotation) + aVertex.y * cos(aRotation)
   ) + aPosition;

   var position = vec4((uniforms.uTranslationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);

   if(uniforms.uRound == 1.0) {
       position = vec4(roundPixels(position.xy, uniforms.uResolution), position.zw);
   }

    let vColor = vec4(aColor.rgb * aColor.a, aColor.a) * uniforms.uColor;

  return VSOutput(
   position,
   aUV,
   vColor,
  );
}

@fragment
fn mainFragment(
  @location(0) uv: vec2<f32>,
  @location(1) color: vec4<f32>,
  @builtin(position) position: vec4<f32>,
) -> @location(0) vec4<f32> {

    var sample = textureSample(uTexture, uSampler, uv) * color;
   
    return sample;
}`;
class jde extends yi {
    constructor() {
        const e = ya.from({
            vertex: zde,
            fragment: Vde
        })
          , r = Es.from({
            fragment: {
                source: O3,
                entryPoint: "mainFragment"
            },
            vertex: {
                source: O3,
                entryPoint: "mainVertex"
            }
        });
        super({
            glProgram: e,
            gpuProgram: r,
            resources: {
                uTexture: Be.WHITE.source,
                uSampler: new bo({}),
                uniforms: {
                    uTranslationMatrix: {
                        value: new Pe,
                        type: "mat3x3<f32>"
                    },
                    uColor: {
                        value: new Ut(16777215),
                        type: "vec4<f32>"
                    },
                    uRound: {
                        value: 1,
                        type: "f32"
                    },
                    uResolution: {
                        value: [0, 0],
                        type: "vec2<f32>"
                    }
                }
            }
        })
    }
}
class MO {
    constructor(e, r) {
        this.state = Ui.for2d(),
        this.localUniforms = new gn({
            uTranslationMatrix: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uColor: {
                value: new Float32Array(4),
                type: "vec4<f32>"
            },
            uRound: {
                value: 1,
                type: "f32"
            },
            uResolution: {
                value: [0, 0],
                type: "vec2<f32>"
            }
        }),
        this.renderer = e,
        this.adaptor = r,
        this.defaultShader = new jde,
        this.state = Ui.for2d()
    }
    validateRenderable(e) {
        return !1
    }
    addRenderable(e, r) {
        this.renderer.renderPipes.batch.break(r),
        r.add(e)
    }
    getBuffers(e) {
        return e._gpuData[this.renderer.uid] || this._initBuffer(e)
    }
    _initBuffer(e) {
        return e._gpuData[this.renderer.uid] = new Gde({
            size: e.particleChildren.length,
            properties: e._properties
        }),
        e._gpuData[this.renderer.uid]
    }
    updateRenderable(e) {}
    execute(e) {
        const r = e.particleChildren;
        if (r.length === 0)
            return;
        const n = this.renderer
          , i = this.getBuffers(e);
        e.texture || (e.texture = r[0].texture);
        const o = this.state;
        i.update(r, e._childrenDirty),
        e._childrenDirty = !1,
        o.blendMode = Cf(e.blendMode, e.texture._source);
        const s = this.localUniforms.uniforms
          , a = s.uTranslationMatrix;
        e.worldTransform.copyTo(a),
        a.prepend(n.globalUniforms.globalUniformData.projectionMatrix),
        s.uResolution = n.globalUniforms.globalUniformData.resolution,
        s.uRound = n._roundPixels | e._roundPixels,
        cd(e.groupColorAlpha, s.uColor, 0),
        this.adaptor.execute(this, e)
    }
    destroy() {
        this.renderer = null,
        this.defaultShader && (this.defaultShader.destroy(),
        this.defaultShader = null)
    }
}
class NO extends MO {
    constructor(e) {
        super(e, new Lde)
    }
}
NO.extension = {
    type: [X.WebGLPipes],
    name: "particle"
};
class LO extends MO {
    constructor(e) {
        super(e, new $de)
    }
}
LO.extension = {
    type: [X.WebGPUPipes],
    name: "particle"
};
const $O = class pE {
    constructor(e) {
        if (e instanceof Be)
            this.texture = e,
            Wy(this, pE.defaultOptions, {});
        else {
            const r = {
                ...pE.defaultOptions,
                ...e
            };
            Wy(this, r, {})
        }
    }
    get alpha() {
        return this._alpha
    }
    set alpha(e) {
        this._alpha = Math.min(Math.max(e, 0), 1),
        this._updateColor()
    }
    get tint() {
        return O0(this._tint)
    }
    set tint(e) {
        this._tint = Ut.shared.setValue(e ?? 16777215).toBgrNumber(),
        this._updateColor()
    }
    _updateColor() {
        this.color = this._tint + ((this._alpha * 255 | 0) << 24)
    }
}
;
$O.defaultOptions = {
    anchorX: 0,
    anchorY: 0,
    x: 0,
    y: 0,
    scaleX: 1,
    scaleY: 1,
    rotation: 0,
    tint: 16777215,
    alpha: 1
};
let v6e = $O;
const k3 = {
    vertex: {
        attributeName: "aVertex",
        format: "float32x2",
        code: `
            const texture = p.texture;
            const sx = p.scaleX;
            const sy = p.scaleY;
            const ax = p.anchorX;
            const ay = p.anchorY;
            const trim = texture.trim;
            const orig = texture.orig;

            if (trim)
            {
                w1 = trim.x - (ax * orig.width);
                w0 = w1 + trim.width;

                h1 = trim.y - (ay * orig.height);
                h0 = h1 + trim.height;
            }
            else
            {
                w1 = -ax * (orig.width);
                w0 = w1 + orig.width;

                h1 = -ay * (orig.height);
                h0 = h1 + orig.height;
            }

            f32v[offset] = w1 * sx;
            f32v[offset + 1] = h1 * sy;

            f32v[offset + stride] = w0 * sx;
            f32v[offset + stride + 1] = h1 * sy;

            f32v[offset + (stride * 2)] = w0 * sx;
            f32v[offset + (stride * 2) + 1] = h0 * sy;

            f32v[offset + (stride * 3)] = w1 * sx;
            f32v[offset + (stride * 3) + 1] = h0 * sy;
        `,
        dynamic: !1
    },
    position: {
        attributeName: "aPosition",
        format: "float32x2",
        code: `
            var x = p.x;
            var y = p.y;

            f32v[offset] = x;
            f32v[offset + 1] = y;

            f32v[offset + stride] = x;
            f32v[offset + stride + 1] = y;

            f32v[offset + (stride * 2)] = x;
            f32v[offset + (stride * 2) + 1] = y;

            f32v[offset + (stride * 3)] = x;
            f32v[offset + (stride * 3) + 1] = y;
        `,
        dynamic: !0
    },
    rotation: {
        attributeName: "aRotation",
        format: "float32",
        code: `
            var rotation = p.rotation;

            f32v[offset] = rotation;
            f32v[offset + stride] = rotation;
            f32v[offset + (stride * 2)] = rotation;
            f32v[offset + (stride * 3)] = rotation;
        `,
        dynamic: !1
    },
    uvs: {
        attributeName: "aUV",
        format: "float32x2",
        code: `
            var uvs = p.texture.uvs;

            f32v[offset] = uvs.x0;
            f32v[offset + 1] = uvs.y0;

            f32v[offset + stride] = uvs.x1;
            f32v[offset + stride + 1] = uvs.y1;

            f32v[offset + (stride * 2)] = uvs.x2;
            f32v[offset + (stride * 2) + 1] = uvs.y2;

            f32v[offset + (stride * 3)] = uvs.x3;
            f32v[offset + (stride * 3) + 1] = uvs.y3;
        `,
        dynamic: !1
    },
    color: {
        attributeName: "aColor",
        format: "unorm8x4",
        code: `
            const c = p.color;

            u32v[offset] = c;
            u32v[offset + stride] = c;
            u32v[offset + (stride * 2)] = c;
            u32v[offset + (stride * 3)] = c;
        `,
        dynamic: !1
    }
}
  , Wde = new Vr(0,0,0,0)
  , UO = class gE extends rd {
    constructor(e={}) {
        e = {
            ...gE.defaultOptions,
            ...e,
            dynamicProperties: {
                ...gE.defaultOptions.dynamicProperties,
                ...e == null ? void 0 : e.dynamicProperties
            }
        };
        const {dynamicProperties: r, shader: n, roundPixels: i, texture: o, particles: s, ...a} = e;
        super({
            label: "ParticleContainer",
            ...a
        }),
        this.renderPipeId = "particle",
        this.batched = !1,
        this._childrenDirty = !1,
        this.texture = o || null,
        this.shader = n,
        this._properties = {};
        for (const l in k3) {
            const c = k3[l]
              , u = r[l];
            this._properties[l] = {
                ...c,
                dynamic: u
            }
        }
        this.allowChildren = !0,
        this.roundPixels = i ?? !1,
        this.particleChildren = s ?? []
    }
    addParticle(...e) {
        for (let r = 0; r < e.length; r++)
            this.particleChildren.push(e[r]);
        return this.onViewUpdate(),
        e[0]
    }
    removeParticle(...e) {
        let r = !1;
        for (let n = 0; n < e.length; n++) {
            const i = this.particleChildren.indexOf(e[n]);
            i > -1 && (this.particleChildren.splice(i, 1),
            r = !0)
        }
        return r && this.onViewUpdate(),
        e[0]
    }
    update() {
        this._childrenDirty = !0
    }
    onViewUpdate() {
        this._childrenDirty = !0,
        super.onViewUpdate()
    }
    get bounds() {
        return Wde
    }
    updateBounds() {}
    destroy(e=!1) {
        var n, i;
        if (super.destroy(e),
        typeof e == "boolean" ? e : e == null ? void 0 : e.texture) {
            const o = typeof e == "boolean" ? e : e == null ? void 0 : e.textureSource
              , s = this.texture ?? ((n = this.particleChildren[0]) == null ? void 0 : n.texture);
            s && s.destroy(o)
        }
        this.texture = null,
        (i = this.shader) == null || i.destroy()
    }
    removeParticles(e, r) {
        e ?? (e = 0),
        r ?? (r = this.particleChildren.length);
        const n = this.particleChildren.splice(e, r - e);
        return this.onViewUpdate(),
        n
    }
    removeParticleAt(e) {
        const r = this.particleChildren.splice(e, 1);
        return this.onViewUpdate(),
        r[0]
    }
    addParticleAt(e, r) {
        return this.particleChildren.splice(r, 0, e),
        this.onViewUpdate(),
        e
    }
    addChild(...e) {
        throw new Error("ParticleContainer.addChild() is not available. Please use ParticleContainer.addParticle()")
    }
    removeChild(...e) {
        throw new Error("ParticleContainer.removeChild() is not available. Please use ParticleContainer.removeParticle()")
    }
    removeChildren(e, r) {
        throw new Error("ParticleContainer.removeChildren() is not available. Please use ParticleContainer.removeParticles()")
    }
    removeChildAt(e) {
        throw new Error("ParticleContainer.removeChildAt() is not available. Please use ParticleContainer.removeParticleAt()")
    }
    getChildAt(e) {
        throw new Error("ParticleContainer.getChildAt() is not available. Please use ParticleContainer.getParticleAt()")
    }
    setChildIndex(e, r) {
        throw new Error("ParticleContainer.setChildIndex() is not available. Please use ParticleContainer.setParticleIndex()")
    }
    getChildIndex(e) {
        throw new Error("ParticleContainer.getChildIndex() is not available. Please use ParticleContainer.getParticleIndex()")
    }
    addChildAt(e, r) {
        throw new Error("ParticleContainer.addChildAt() is not available. Please use ParticleContainer.addParticleAt()")
    }
    swapChildren(e, r) {
        throw new Error("ParticleContainer.swapChildren() is not available. Please use ParticleContainer.swapParticles()")
    }
    reparentChild(...e) {
        throw new Error("ParticleContainer.reparentChild() is not available with the particle container")
    }
    reparentChildAt(e, r) {
        throw new Error("ParticleContainer.reparentChildAt() is not available with the particle container")
    }
}
;
UO.defaultOptions = {
    dynamicProperties: {
        vertex: !1,
        position: !0,
        rotation: !1,
        uvs: !1,
        color: !1
    },
    roundPixels: !1
};
let y6e = UO;
const GO = class HO extends Nde {
    constructor(e={}) {
        e = {
            ...HO.defaultOptions,
            ...e
        },
        super({
            width: e.width,
            height: e.height,
            verticesX: 4,
            verticesY: 4
        }),
        this.update(e)
    }
    update(e) {
        var r, n;
        this.width = e.width ?? this.width,
        this.height = e.height ?? this.height,
        this._originalWidth = e.originalWidth ?? this._originalWidth,
        this._originalHeight = e.originalHeight ?? this._originalHeight,
        this._leftWidth = e.leftWidth ?? this._leftWidth,
        this._rightWidth = e.rightWidth ?? this._rightWidth,
        this._topHeight = e.topHeight ?? this._topHeight,
        this._bottomHeight = e.bottomHeight ?? this._bottomHeight,
        this._anchorX = (r = e.anchor) == null ? void 0 : r.x,
        this._anchorY = (n = e.anchor) == null ? void 0 : n.y,
        this.updateUvs(),
        this.updatePositions()
    }
    updatePositions() {
        const e = this.positions
          , {width: r, height: n, _leftWidth: i, _rightWidth: o, _topHeight: s, _bottomHeight: a, _anchorX: l, _anchorY: c} = this
          , u = i + o
          , f = r > u ? 1 : r / u
          , d = s + a
          , h = n > d ? 1 : n / d
          , x = Math.min(f, h)
          , y = l * r
          , m = c * n;
        e[0] = e[8] = e[16] = e[24] = -y,
        e[2] = e[10] = e[18] = e[26] = i * x - y,
        e[4] = e[12] = e[20] = e[28] = r - o * x - y,
        e[6] = e[14] = e[22] = e[30] = r - y,
        e[1] = e[3] = e[5] = e[7] = -m,
        e[9] = e[11] = e[13] = e[15] = s * x - m,
        e[17] = e[19] = e[21] = e[23] = n - a * x - m,
        e[25] = e[27] = e[29] = e[31] = n - m,
        this.getBuffer("aPosition").update()
    }
    updateUvs() {
        const e = this.uvs;
        e[0] = e[8] = e[16] = e[24] = 0,
        e[1] = e[3] = e[5] = e[7] = 0,
        e[6] = e[14] = e[22] = e[30] = 1,
        e[25] = e[27] = e[29] = e[31] = 1;
        const r = 1 / this._originalWidth
          , n = 1 / this._originalHeight;
        e[2] = e[10] = e[18] = e[26] = r * this._leftWidth,
        e[9] = e[11] = e[13] = e[15] = n * this._topHeight,
        e[4] = e[12] = e[20] = e[28] = 1 - r * this._rightWidth,
        e[17] = e[19] = e[21] = e[23] = 1 - n * this._bottomHeight,
        this.getBuffer("aUV").update()
    }
}
;
GO.defaultOptions = {
    width: 100,
    height: 100,
    leftWidth: 10,
    topHeight: 10,
    rightWidth: 10,
    bottomHeight: 10,
    originalWidth: 100,
    originalHeight: 100
};
let Yde = GO;
class Xde extends Ub {
    constructor() {
        super(),
        this.geometry = new Yde
    }
    destroy() {
        this.geometry.destroy()
    }
}
class VO {
    constructor(e) {
        this._renderer = e
    }
    addRenderable(e, r) {
        const n = this._getGpuSprite(e);
        e.didViewUpdate && this._updateBatchableSprite(e, n),
        this._renderer.renderPipes.batch.addToBatch(n, r)
    }
    updateRenderable(e) {
        const r = this._getGpuSprite(e);
        e.didViewUpdate && this._updateBatchableSprite(e, r),
        r._batcher.updateElement(r)
    }
    validateRenderable(e) {
        const r = this._getGpuSprite(e);
        return !r._batcher.checkAndUpdateTexture(r, e._texture)
    }
    _updateBatchableSprite(e, r) {
        r.geometry.update(e),
        r.setTexture(e._texture)
    }
    _getGpuSprite(e) {
        return e._gpuData[this._renderer.uid] || this._initGPUSprite(e)
    }
    _initGPUSprite(e) {
        const r = e._gpuData[this._renderer.uid] = new Xde
          , n = r;
        return n.renderable = e,
        n.transform = e.groupTransform,
        n.texture = e._texture,
        n.roundPixels = this._renderer._roundPixels | e._roundPixels,
        e.didViewUpdate || this._updateBatchableSprite(e, n),
        r
    }
    destroy() {
        this._renderer = null
    }
}
VO.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "nineSliceSprite"
};
const Kde = {
    name: "tiling-bit",
    vertex: {
        header: `
            struct TilingUniforms {
                uMapCoord:mat3x3<f32>,
                uClampFrame:vec4<f32>,
                uClampOffset:vec2<f32>,
                uTextureTransform:mat3x3<f32>,
                uSizeAnchor:vec4<f32>
            };

            @group(2) @binding(0) var<uniform> tilingUniforms: TilingUniforms;
            @group(2) @binding(1) var uTexture: texture_2d<f32>;
            @group(2) @binding(2) var uSampler: sampler;
        `,
        main: `
            uv = (tilingUniforms.uTextureTransform * vec3(uv, 1.0)).xy;

            position = (position - tilingUniforms.uSizeAnchor.zw) * tilingUniforms.uSizeAnchor.xy;
        `
    },
    fragment: {
        header: `
            struct TilingUniforms {
                uMapCoord:mat3x3<f32>,
                uClampFrame:vec4<f32>,
                uClampOffset:vec2<f32>,
                uTextureTransform:mat3x3<f32>,
                uSizeAnchor:vec4<f32>
            };

            @group(2) @binding(0) var<uniform> tilingUniforms: TilingUniforms;
            @group(2) @binding(1) var uTexture: texture_2d<f32>;
            @group(2) @binding(2) var uSampler: sampler;
        `,
        main: `

            var coord = vUV + ceil(tilingUniforms.uClampOffset - vUV);
            coord = (tilingUniforms.uMapCoord * vec3(coord, 1.0)).xy;
            var unclamped = coord;
            coord = clamp(coord, tilingUniforms.uClampFrame.xy, tilingUniforms.uClampFrame.zw);

            var bias = 0.;

            if(unclamped.x == coord.x && unclamped.y == coord.y)
            {
                bias = -32.;
            }

            outColor = textureSampleBias(uTexture, uSampler, coord, bias);
        `
    }
}
  , qde = {
    name: "tiling-bit",
    vertex: {
        header: `
            uniform mat3 uTextureTransform;
            uniform vec4 uSizeAnchor;

        `,
        main: `
            uv = (uTextureTransform * vec3(aUV, 1.0)).xy;

            position = (position - uSizeAnchor.zw) * uSizeAnchor.xy;
        `
    },
    fragment: {
        header: `
            uniform sampler2D uTexture;
            uniform mat3 uMapCoord;
            uniform vec4 uClampFrame;
            uniform vec2 uClampOffset;
        `,
        main: `

        vec2 coord = vUV + ceil(uClampOffset - vUV);
        coord = (uMapCoord * vec3(coord, 1.0)).xy;
        vec2 unclamped = coord;
        coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);

        outColor = texture(uTexture, coord, unclamped == coord ? 0.0 : -32.0);// lod-bias very negative to force lod 0

        `
    }
};
let im, om;
class Zde extends yi {
    constructor() {
        im ?? (im = od({
            name: "tiling-sprite-shader",
            bits: [U0, Kde, ad]
        })),
        om ?? (om = sd({
            name: "tiling-sprite-shader",
            bits: [Tb, qde, ld]
        }));
        const e = new gn({
            uMapCoord: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uClampFrame: {
                value: new Float32Array([0, 0, 1, 1]),
                type: "vec4<f32>"
            },
            uClampOffset: {
                value: new Float32Array([0, 0]),
                type: "vec2<f32>"
            },
            uTextureTransform: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uSizeAnchor: {
                value: new Float32Array([100, 100, .5, .5]),
                type: "vec4<f32>"
            }
        });
        super({
            glProgram: om,
            gpuProgram: im,
            resources: {
                localUniforms: new gn({
                    uTransformMatrix: {
                        value: new Pe,
                        type: "mat3x3<f32>"
                    },
                    uColor: {
                        value: new Float32Array([1, 1, 1, 1]),
                        type: "vec4<f32>"
                    },
                    uRound: {
                        value: 0,
                        type: "f32"
                    }
                }),
                tilingUniforms: e,
                uTexture: Be.EMPTY.source,
                uSampler: Be.EMPTY.source.style
            }
        })
    }
    updateUniforms(e, r, n, i, o, s) {
        const a = this.resources.tilingUniforms
          , l = s.width
          , c = s.height
          , u = s.textureMatrix
          , f = a.uniforms.uTextureTransform;
        f.set(n.a * l / e, n.b * l / r, n.c * c / e, n.d * c / r, n.tx / e, n.ty / r),
        f.invert(),
        a.uniforms.uMapCoord = u.mapCoord,
        a.uniforms.uClampFrame = u.uClampFrame,
        a.uniforms.uClampOffset = u.uClampOffset,
        a.uniforms.uTextureTransform = f,
        a.uniforms.uSizeAnchor[0] = e,
        a.uniforms.uSizeAnchor[1] = r,
        a.uniforms.uSizeAnchor[2] = i,
        a.uniforms.uSizeAnchor[3] = o,
        s && (this.resources.uTexture = s.source,
        this.resources.uSampler = s.source.style)
    }
}
class Jde extends Bb {
    constructor() {
        super({
            positions: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]),
            uvs: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]),
            indices: new Uint32Array([0, 1, 2, 0, 2, 3])
        })
    }
}
function Qde(t, e) {
    const r = t.anchor.x
      , n = t.anchor.y;
    e[0] = -r * t.width,
    e[1] = -n * t.height,
    e[2] = (1 - r) * t.width,
    e[3] = -n * t.height,
    e[4] = (1 - r) * t.width,
    e[5] = (1 - n) * t.height,
    e[6] = -r * t.width,
    e[7] = (1 - n) * t.height
}
function ehe(t, e, r, n) {
    let i = 0;
    const o = t.length / (e || 2)
      , s = n.a
      , a = n.b
      , l = n.c
      , c = n.d
      , u = n.tx
      , f = n.ty;
    for (r *= e; i < o; ) {
        const d = t[r]
          , h = t[r + 1];
        t[r] = s * d + l * h + u,
        t[r + 1] = a * d + c * h + f,
        r += e,
        i++
    }
}
function the(t, e) {
    const r = t.texture
      , n = r.frame.width
      , i = r.frame.height;
    let o = 0
      , s = 0;
    t.applyAnchorToTexture && (o = t.anchor.x,
    s = t.anchor.y),
    e[0] = e[6] = -o,
    e[2] = e[4] = 1 - o,
    e[1] = e[3] = -s,
    e[5] = e[7] = 1 - s;
    const a = Pe.shared;
    a.copyFrom(t._tileTransform.matrix),
    a.tx /= t.width,
    a.ty /= t.height,
    a.invert(),
    a.scale(t.width / n, t.height / i),
    ehe(e, 2, 0, a)
}
const qh = new Jde;
class rhe {
    constructor() {
        this.canBatch = !0,
        this.geometry = new Bb({
            indices: qh.indices.slice(),
            positions: qh.positions.slice(),
            uvs: qh.uvs.slice()
        })
    }
    destroy() {
        var e;
        this.geometry.destroy(),
        (e = this.shader) == null || e.destroy()
    }
}
class zO {
    constructor(e) {
        this._state = Ui.default2d,
        this._renderer = e
    }
    validateRenderable(e) {
        const r = this._getTilingSpriteData(e)
          , n = r.canBatch;
        this._updateCanBatch(e);
        const i = r.canBatch;
        if (i && i === n) {
            const {batchableMesh: o} = r;
            return !o._batcher.checkAndUpdateTexture(o, e.texture)
        }
        return n !== i
    }
    addRenderable(e, r) {
        const n = this._renderer.renderPipes.batch;
        this._updateCanBatch(e);
        const i = this._getTilingSpriteData(e)
          , {geometry: o, canBatch: s} = i;
        if (s) {
            i.batchableMesh || (i.batchableMesh = new Ub);
            const a = i.batchableMesh;
            e.didViewUpdate && (this._updateBatchableMesh(e),
            a.geometry = o,
            a.renderable = e,
            a.transform = e.groupTransform,
            a.setTexture(e._texture)),
            a.roundPixels = this._renderer._roundPixels | e._roundPixels,
            n.addToBatch(a, r)
        } else
            n.break(r),
            i.shader || (i.shader = new Zde),
            this.updateRenderable(e),
            r.add(e)
    }
    execute(e) {
        const {shader: r} = this._getTilingSpriteData(e);
        r.groups[0] = this._renderer.globalUniforms.bindGroup;
        const n = r.resources.localUniforms.uniforms;
        n.uTransformMatrix = e.groupTransform,
        n.uRound = this._renderer._roundPixels | e._roundPixels,
        cd(e.groupColorAlpha, n.uColor, 0),
        this._state.blendMode = Cf(e.groupBlendMode, e.texture._source),
        this._renderer.encoder.draw({
            geometry: qh,
            shader: r,
            state: this._state
        })
    }
    updateRenderable(e) {
        const r = this._getTilingSpriteData(e)
          , {canBatch: n} = r;
        if (n) {
            const {batchableMesh: i} = r;
            e.didViewUpdate && this._updateBatchableMesh(e),
            i._batcher.updateElement(i)
        } else if (e.didViewUpdate) {
            const {shader: i} = r;
            i.updateUniforms(e.width, e.height, e._tileTransform.matrix, e.anchor.x, e.anchor.y, e.texture)
        }
    }
    _getTilingSpriteData(e) {
        return e._gpuData[this._renderer.uid] || this._initTilingSpriteData(e)
    }
    _initTilingSpriteData(e) {
        const r = new rhe;
        return r.renderable = e,
        e._gpuData[this._renderer.uid] = r,
        r
    }
    _updateBatchableMesh(e) {
        const r = this._getTilingSpriteData(e)
          , {geometry: n} = r
          , i = e.texture.source.style;
        i.addressMode !== "repeat" && (i.addressMode = "repeat",
        i.update()),
        the(e, n.uvs),
        Qde(e, n.positions)
    }
    destroy() {
        this._renderer = null
    }
    _updateCanBatch(e) {
        const r = this._getTilingSpriteData(e)
          , n = e.texture;
        let i = !0;
        return this._renderer.type === qn.WEBGL && (i = this._renderer.context.supports.nonPowOf2wrapping),
        r.canBatch = n.textureMatrix.isSimple && (i || n.source.isPowerOfTwo),
        r.canBatch
    }
}
zO.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "tilingSprite"
};
const nhe = {
    name: "local-uniform-msdf-bit",
    vertex: {
        header: `
            struct LocalUniforms {
                uColor:vec4<f32>,
                uTransformMatrix:mat3x3<f32>,
                uDistance: f32,
                uRound:f32,
            }

            @group(2) @binding(0) var<uniform> localUniforms : LocalUniforms;
        `,
        main: `
            vColor *= localUniforms.uColor;
            modelMatrix *= localUniforms.uTransformMatrix;
        `,
        end: `
            if(localUniforms.uRound == 1)
            {
                vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
            }
        `
    },
    fragment: {
        header: `
            struct LocalUniforms {
                uColor:vec4<f32>,
                uTransformMatrix:mat3x3<f32>,
                uDistance: f32
            }

            @group(2) @binding(0) var<uniform> localUniforms : LocalUniforms;
         `,
        main: `
            outColor = vec4<f32>(calculateMSDFAlpha(outColor, localUniforms.uColor, localUniforms.uDistance));
        `
    }
}
  , ihe = {
    name: "local-uniform-msdf-bit",
    vertex: {
        header: `
            uniform mat3 uTransformMatrix;
            uniform vec4 uColor;
            uniform float uRound;
        `,
        main: `
            vColor *= uColor;
            modelMatrix *= uTransformMatrix;
        `,
        end: `
            if(uRound == 1.)
            {
                gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
            }
        `
    },
    fragment: {
        header: `
            uniform float uDistance;
         `,
        main: `
            outColor = vec4(calculateMSDFAlpha(outColor, vColor, uDistance));
        `
    }
}
  , ohe = {
    name: "msdf-bit",
    fragment: {
        header: `
            fn calculateMSDFAlpha(msdfColor:vec4<f32>, shapeColor:vec4<f32>, distance:f32) -> f32 {

                // MSDF
                var median = msdfColor.r + msdfColor.g + msdfColor.b -
                    min(msdfColor.r, min(msdfColor.g, msdfColor.b)) -
                    max(msdfColor.r, max(msdfColor.g, msdfColor.b));

                // SDF
                median = min(median, msdfColor.a);

                var screenPxDistance = distance * (median - 0.5);
                var alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);
                if (median < 0.01) {
                    alpha = 0.0;
                } else if (median > 0.99) {
                    alpha = 1.0;
                }

                // Gamma correction for coverage-like alpha
                var luma: f32 = dot(shapeColor.rgb, vec3<f32>(0.299, 0.587, 0.114));
                var gamma: f32 = mix(1.0, 1.0 / 2.2, luma);
                var coverage: f32 = pow(shapeColor.a * alpha, gamma);

                return coverage;

            }
        `
    }
}
  , she = {
    name: "msdf-bit",
    fragment: {
        header: `
            float calculateMSDFAlpha(vec4 msdfColor, vec4 shapeColor, float distance) {

                // MSDF
                float median = msdfColor.r + msdfColor.g + msdfColor.b -
                                min(msdfColor.r, min(msdfColor.g, msdfColor.b)) -
                                max(msdfColor.r, max(msdfColor.g, msdfColor.b));

                // SDF
                median = min(median, msdfColor.a);

                float screenPxDistance = distance * (median - 0.5);
                float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);

                if (median < 0.01) {
                    alpha = 0.0;
                } else if (median > 0.99) {
                    alpha = 1.0;
                }

                // Gamma correction for coverage-like alpha
                float luma = dot(shapeColor.rgb, vec3(0.299, 0.587, 0.114));
                float gamma = mix(1.0, 1.0 / 2.2, luma);
                float coverage = pow(shapeColor.a * alpha, gamma);

                return coverage;
            }
        `
    }
};
let sm, am;
class ahe extends yi {
    constructor(e) {
        const r = new gn({
            uColor: {
                value: new Float32Array([1, 1, 1, 1]),
                type: "vec4<f32>"
            },
            uTransformMatrix: {
                value: new Pe,
                type: "mat3x3<f32>"
            },
            uDistance: {
                value: 4,
                type: "f32"
            },
            uRound: {
                value: 0,
                type: "f32"
            }
        });
        sm ?? (sm = od({
            name: "sdf-shader",
            bits: [db, xb(e), nhe, ohe, ad]
        })),
        am ?? (am = sd({
            name: "sdf-shader",
            bits: [hb, pb(e), ihe, she, ld]
        })),
        super({
            glProgram: am,
            gpuProgram: sm,
            resources: {
                localUniforms: r,
                batchSamplers: gb(e)
            }
        })
    }
}
class lhe extends Ux {
    destroy() {
        this.context.customShader && this.context.customShader.destroy(),
        super.destroy()
    }
}
class jO {
    constructor(e) {
        this._renderer = e
    }
    validateRenderable(e) {
        const r = this._getGpuBitmapText(e);
        return this._renderer.renderPipes.graphics.validateRenderable(r)
    }
    addRenderable(e, r) {
        const n = this._getGpuBitmapText(e);
        R3(e, n),
        e._didTextUpdate && (e._didTextUpdate = !1,
        this._updateContext(e, n)),
        this._renderer.renderPipes.graphics.addRenderable(n, r),
        n.context.customShader && this._updateDistanceField(e)
    }
    updateRenderable(e) {
        const r = this._getGpuBitmapText(e);
        R3(e, r),
        this._renderer.renderPipes.graphics.updateRenderable(r),
        r.context.customShader && this._updateDistanceField(e)
    }
    _updateContext(e, r) {
        const {context: n} = r
          , i = aE.getFont(e.text, e._style);
        n.clear(),
        i.distanceField.type !== "none" && (n.customShader || (n.customShader = new ahe(this._renderer.limits.maxBatchableTextures)));
        const o = Fi.graphemeSegmenter(e.text)
          , s = e._style;
        let a = i.baseLineOffset;
        const l = WP(o, s, i, !0)
          , c = s.padding
          , u = l.scale;
        let f = l.width
          , d = l.height + l.offsetY;
        s._stroke && (f += s._stroke.width / u,
        d += s._stroke.width / u),
        n.translate(-e._anchor._x * f - c, -e._anchor._y * d - c).scale(u, u);
        const h = i.applyFillAsTint ? s._fill.color : 16777215;
        let x = i.fontMetrics.fontSize
          , y = i.lineHeight;
        s.lineHeight && (x = s.fontSize / u,
        y = s.lineHeight / u);
        let m = (y - x) / 2;
        m - i.baseLineOffset < 0 && (m = 0);
        for (let E = 0; E < l.lines.length; E++) {
            const g = l.lines[E];
            for (let p = 0; p < g.charPositions.length; p++) {
                const v = g.chars[p]
                  , _ = i.chars[v];
                if (_ != null && _.texture) {
                    const b = _.texture;
                    n.texture(b, h || "black", Math.round(g.charPositions[p] + _.xOffset), Math.round(a + _.yOffset + m), b.orig.width, b.orig.height)
                }
            }
            a += y
        }
    }
    _getGpuBitmapText(e) {
        return e._gpuData[this._renderer.uid] || this.initGpuText(e)
    }
    initGpuText(e) {
        const r = new lhe;
        return e._gpuData[this._renderer.uid] = r,
        this._updateContext(e, r),
        r
    }
    _updateDistanceField(e) {
        const r = this._getGpuBitmapText(e).context
          , n = e._style.fontFamily
          , i = Et.get(`${n}-bitmap`)
          , {a: o, b: s, c: a, d: l} = e.groupTransform
          , c = Math.sqrt(o * o + s * s)
          , u = Math.sqrt(a * a + l * l)
          , f = (Math.abs(c) + Math.abs(u)) / 2
          , d = i.baseRenderedFontSize / e._style.fontSize
          , h = f * i.distanceField.range * (1 / d);
        r.customShader.resources.localUniforms.uniforms.uDistance = h
    }
    destroy() {
        this._renderer = null
    }
}
jO.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "bitmapText"
};
function R3(t, e) {
    e.groupTransform = t.groupTransform,
    e.groupColorAlpha = t.groupColorAlpha,
    e.groupColor = t.groupColor,
    e.groupBlendMode = t.groupBlendMode,
    e.globalDisplayStatus = t.globalDisplayStatus,
    e.groupTransform = t.groupTransform,
    e.localDisplayStatus = t.localDisplayStatus,
    e.groupAlpha = t.groupAlpha,
    e._roundPixels = t._roundPixels
}
class che extends h1 {
    constructor(e) {
        super(),
        this.generatingTexture = !1,
        this.currentKey = "--",
        this._renderer = e,
        e.runners.resolutionChange.add(this)
    }
    resolutionChange() {
        const e = this.renderable;
        e._autoResolution && e.onViewUpdate()
    }
    destroy() {
        const {htmlText: e} = this._renderer;
        e.getReferenceCount(this.currentKey) === null ? e.returnTexturePromise(this.texturePromise) : e.decreaseReferenceCount(this.currentKey),
        this._renderer.runners.resolutionChange.remove(this),
        this.texturePromise = null,
        this._renderer = null
    }
}
function mE(t, e) {
    const {texture: r, bounds: n} = t
      , i = e._style._getFinalPadding();
    RF(n, e._anchor, r);
    const o = e._anchor._x * i * 2
      , s = e._anchor._y * i * 2;
    n.minX -= i - o,
    n.minY -= i - s,
    n.maxX -= i - o,
    n.maxY -= i - s
}
class WO {
    constructor(e) {
        this._renderer = e
    }
    validateRenderable(e) {
        const r = this._getGpuText(e)
          , n = e.styleKey;
        return r.currentKey !== n
    }
    addRenderable(e, r) {
        const n = this._getGpuText(e);
        if (e._didTextUpdate) {
            const i = e._autoResolution ? this._renderer.resolution : e.resolution;
            (n.currentKey !== e.styleKey || e.resolution !== i) && this._updateGpuText(e).catch(o => {
                console.error(o)
            }
            ),
            e._didTextUpdate = !1,
            mE(n, e)
        }
        this._renderer.renderPipes.batch.addToBatch(n, r)
    }
    updateRenderable(e) {
        const r = this._getGpuText(e);
        r._batcher.updateElement(r)
    }
    async _updateGpuText(e) {
        e._didTextUpdate = !1;
        const r = this._getGpuText(e);
        if (r.generatingTexture)
            return;
        const n = r.texturePromise;
        r.texturePromise = null,
        r.generatingTexture = !0,
        e._resolution = e._autoResolution ? this._renderer.resolution : e.resolution;
        let i = this._renderer.htmlText.getTexturePromise(e);
        n && (i = i.finally( () => {
            this._renderer.htmlText.decreaseReferenceCount(r.currentKey),
            this._renderer.htmlText.returnTexturePromise(n)
        }
        )),
        r.texturePromise = i,
        r.currentKey = e.styleKey,
        r.texture = await i;
        const o = e.renderGroup || e.parentRenderGroup;
        o && (o.structureDidChange = !0),
        r.generatingTexture = !1,
        mE(r, e)
    }
    _getGpuText(e) {
        return e._gpuData[this._renderer.uid] || this.initGpuText(e)
    }
    initGpuText(e) {
        const r = new che(this._renderer);
        return r.renderable = e,
        r.transform = e.groupTransform,
        r.texture = Be.EMPTY,
        r.bounds = {
            minX: 0,
            maxX: 1,
            minY: 0,
            maxY: 0
        },
        r.roundPixels = this._renderer._roundPixels | e._roundPixels,
        e._resolution = e._autoResolution ? this._renderer.resolution : e.resolution,
        e._gpuData[this._renderer.uid] = r,
        r
    }
    destroy() {
        this._renderer = null
    }
}
WO.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "htmlText"
};
function uhe() {
    const {userAgent: t} = je.get().getNavigator();
    return /^((?!chrome|android).)*safari/i.test(t)
}
const fhe = new Vr;
function YO(t, e, r, n) {
    const i = fhe;
    i.minX = 0,
    i.minY = 0,
    i.maxX = t.width / n | 0,
    i.maxY = t.height / n | 0;
    const o = sr.getOptimalTexture(i.width, i.height, n, !1);
    return o.source.uploadMethodId = "image",
    o.source.resource = t,
    o.source.alphaMode = "premultiply-alpha-on-upload",
    o.frame.width = e / n,
    o.frame.height = r / n,
    o.source.emit("update", o.source),
    o.updateUvs(),
    o
}
function dhe(t, e) {
    const r = e.fontFamily
      , n = []
      , i = {}
      , o = /font-family:([^;"\s]+)/g
      , s = t.match(o);
    function a(l) {
        i[l] || (n.push(l),
        i[l] = !0)
    }
    if (Array.isArray(r))
        for (let l = 0; l < r.length; l++)
            a(r[l]);
    else
        a(r);
    s && s.forEach(l => {
        const c = l.split(":")[1].trim();
        a(c)
    }
    );
    for (const l in e.tagStyles) {
        const c = e.tagStyles[l].fontFamily;
        a(c)
    }
    return n
}
async function hhe(t) {
    const r = await (await je.get().fetch(t)).blob()
      , n = new FileReader;
    return await new Promise( (o, s) => {
        n.onloadend = () => o(n.result),
        n.onerror = s,
        n.readAsDataURL(r)
    }
    )
}
async function xhe(t, e) {
    const r = await hhe(e);
    return `@font-face {
        font-family: "${t.fontFamily}";
        font-weight: ${t.fontWeight};
        font-style: ${t.fontStyle};
        src: url('${r}');
    }`
}
const lm = new Map;
async function phe(t) {
    const e = t.filter(r => Et.has(`${r}-and-url`)).map(r => {
        if (!lm.has(r)) {
            const {entries: n} = Et.get(`${r}-and-url`)
              , i = [];
            n.forEach(o => {
                const s = o.url
                  , l = o.faces.map(c => ({
                    weight: c.weight,
                    style: c.style
                }));
                i.push(...l.map(c => xhe({
                    fontWeight: c.weight,
                    fontStyle: c.style,
                    fontFamily: r
                }, s)))
            }
            ),
            lm.set(r, Promise.all(i).then(o => o.join(`
`)))
        }
        return lm.get(r)
    }
    );
    return (await Promise.all(e)).join(`
`)
}
function ghe(t, e, r, n, i) {
    const {domElement: o, styleElement: s, svgRoot: a} = i;
    o.innerHTML = `<style>${e.cssStyle}</style><div style='padding:0;'>${t}</div>`,
    o.setAttribute("style", `transform: scale(${r});transform-origin: top left; display: inline-block`),
    s.textContent = n;
    const {width: l, height: c} = i.image;
    return a.setAttribute("width", l.toString()),
    a.setAttribute("height", c.toString()),
    new XMLSerializer().serializeToString(a)
}
function mhe(t, e) {
    const r = hs.getOptimalCanvasAndContext(t.width, t.height, e)
      , {context: n} = r;
    return n.clearRect(0, 0, t.width, t.height),
    n.drawImage(t, 0, 0),
    r
}
function vhe(t, e, r) {
    return new Promise(async n => {
        r && await new Promise(i => setTimeout(i, 100)),
        t.onload = () => {
            n()
        }
        ,
        t.src = `data:image/svg+xml;charset=utf8,${encodeURIComponent(e)}`,
        t.crossOrigin = "anonymous"
    }
    )
}
class XO {
    constructor(e) {
        this._activeTextures = {},
        this._renderer = e,
        this._createCanvas = e.type === qn.WEBGPU
    }
    getTexture(e) {
        return this.getTexturePromise(e)
    }
    getManagedTexture(e) {
        const r = e.styleKey;
        if (this._activeTextures[r])
            return this._increaseReferenceCount(r),
            this._activeTextures[r].promise;
        const n = this._buildTexturePromise(e).then(i => (this._activeTextures[r].texture = i,
        i));
        return this._activeTextures[r] = {
            texture: null,
            promise: n,
            usageCount: 1
        },
        n
    }
    getReferenceCount(e) {
        var r;
        return ((r = this._activeTextures[e]) == null ? void 0 : r.usageCount) ?? null
    }
    _increaseReferenceCount(e) {
        this._activeTextures[e].usageCount++
    }
    decreaseReferenceCount(e) {
        const r = this._activeTextures[e];
        r && (r.usageCount--,
        r.usageCount === 0 && (r.texture ? this._cleanUp(r.texture) : r.promise.then(n => {
            r.texture = n,
            this._cleanUp(r.texture)
        }
        ).catch( () => {
            Ne("HTMLTextSystem: Failed to clean texture")
        }
        ),
        this._activeTextures[e] = null))
    }
    getTexturePromise(e) {
        return this._buildTexturePromise(e)
    }
    async _buildTexturePromise(e) {
        const {text: r, style: n, resolution: i, textureStyle: o} = e
          , s = xr.get(cI)
          , a = dhe(r, n)
          , l = await phe(a)
          , c = q0e(r, n, l, s)
          , u = Math.ceil(Math.ceil(Math.max(1, c.width) + n.padding * 2) * i)
          , f = Math.ceil(Math.ceil(Math.max(1, c.height) + n.padding * 2) * i)
          , d = s.image
          , h = 2;
        d.width = (u | 0) + h,
        d.height = (f | 0) + h;
        const x = ghe(r, n, i, l, s);
        await vhe(d, x, uhe() && a.length > 0);
        const y = d;
        let m;
        this._createCanvas && (m = mhe(d, i));
        const E = YO(m ? m.canvas : y, d.width - h, d.height - h, i);
        return o && (E.source.style = o),
        this._createCanvas && (this._renderer.texture.initSource(E.source),
        hs.returnCanvasAndContext(m)),
        xr.return(s),
        E
    }
    returnTexturePromise(e) {
        e.then(r => {
            this._cleanUp(r)
        }
        ).catch( () => {
            Ne("HTMLTextSystem: Failed to clean texture")
        }
        )
    }
    _cleanUp(e) {
        sr.returnTexture(e, !0),
        e.source.resource = null,
        e.source.uploadMethodId = "unknown"
    }
    destroy() {
        this._renderer = null;
        for (const e in this._activeTextures)
            this._activeTextures[e] && this.returnTexturePromise(this._activeTextures[e].promise);
        this._activeTextures = null
    }
}
XO.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "htmlText"
};
class yhe extends h1 {
    constructor(e) {
        super(),
        this._renderer = e,
        e.runners.resolutionChange.add(this)
    }
    resolutionChange() {
        const e = this.renderable;
        e._autoResolution && e.onViewUpdate()
    }
    destroy() {
        const {canvasText: e} = this._renderer;
        e.getReferenceCount(this.currentKey) > 0 ? e.decreaseReferenceCount(this.currentKey) : this.texture && e.returnTexture(this.texture),
        this._renderer.runners.resolutionChange.remove(this),
        this._renderer = null
    }
}
class KO {
    constructor(e) {
        this._renderer = e
    }
    validateRenderable(e) {
        const r = this._getGpuText(e)
          , n = e.styleKey;
        return r.currentKey !== n ? !0 : e._didTextUpdate
    }
    addRenderable(e, r) {
        const n = this._getGpuText(e);
        if (e._didTextUpdate) {
            const i = e._autoResolution ? this._renderer.resolution : e.resolution;
            (n.currentKey !== e.styleKey || e.resolution !== i) && this._updateGpuText(e),
            e._didTextUpdate = !1,
            mE(n, e)
        }
        this._renderer.renderPipes.batch.addToBatch(n, r)
    }
    updateRenderable(e) {
        const r = this._getGpuText(e);
        r._batcher.updateElement(r)
    }
    _updateGpuText(e) {
        const r = this._getGpuText(e);
        r.texture && this._renderer.canvasText.decreaseReferenceCount(r.currentKey),
        e._resolution = e._autoResolution ? this._renderer.resolution : e.resolution,
        r.texture = this._renderer.canvasText.getManagedTexture(e),
        r.currentKey = e.styleKey
    }
    _getGpuText(e) {
        return e._gpuData[this._renderer.uid] || this.initGpuText(e)
    }
    initGpuText(e) {
        const r = new yhe(this._renderer);
        return r.currentKey = "--",
        r.renderable = e,
        r.transform = e.groupTransform,
        r.bounds = {
            minX: 0,
            maxX: 1,
            minY: 0,
            maxY: 0
        },
        r.roundPixels = this._renderer._roundPixels | e._roundPixels,
        e._gpuData[this._renderer.uid] = r,
        r
    }
    destroy() {
        this._renderer = null
    }
}
KO.extension = {
    type: [X.WebGLPipes, X.WebGPUPipes, X.CanvasPipes],
    name: "text"
};
class qO {
    constructor(e) {
        this._activeTextures = {},
        this._renderer = e
    }
    getTexture(e, r, n, i) {
        typeof e == "string" && (Re("8.0.0", "CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),
        e = {
            text: e,
            style: n,
            resolution: r
        }),
        e.style instanceof wl || (e.style = new wl(e.style)),
        e.textureStyle instanceof bo || (e.textureStyle = new bo(e.textureStyle)),
        typeof e.text != "string" && (e.text = e.text.toString());
        const {text: o, style: s, textureStyle: a} = e
          , l = e.resolution ?? this._renderer.resolution
          , {frame: c, canvasAndContext: u} = $0.getCanvasAndContext({
            text: o,
            style: s,
            resolution: l
        })
          , f = YO(u.canvas, c.width, c.height, l);
        if (a && (f.source.style = a),
        s.trim && (c.pad(s.padding),
        f.frame.copyFrom(c),
        f.frame.scale(1 / l),
        f.updateUvs()),
        s.filters) {
            const d = this._applyFilters(f, s.filters);
            return this.returnTexture(f),
            $0.returnCanvasAndContext(u),
            d
        }
        return this._renderer.texture.initSource(f._source),
        $0.returnCanvasAndContext(u),
        f
    }
    returnTexture(e) {
        const r = e.source;
        r.resource = null,
        r.uploadMethodId = "unknown",
        r.alphaMode = "no-premultiply-alpha",
        sr.returnTexture(e, !0)
    }
    renderTextToCanvas() {
        Re("8.10.0", "CanvasTextSystem.renderTextToCanvas: no longer supported, use CanvasTextSystem.getTexture instead")
    }
    getManagedTexture(e) {
        e._resolution = e._autoResolution ? this._renderer.resolution : e.resolution;
        const r = e.styleKey;
        if (this._activeTextures[r])
            return this._increaseReferenceCount(r),
            this._activeTextures[r].texture;
        const n = this.getTexture({
            text: e.text,
            style: e.style,
            resolution: e._resolution,
            textureStyle: e.textureStyle
        });
        return this._activeTextures[r] = {
            texture: n,
            usageCount: 1
        },
        n
    }
    decreaseReferenceCount(e) {
        const r = this._activeTextures[e];
        r.usageCount--,
        r.usageCount === 0 && (this.returnTexture(r.texture),
        this._activeTextures[e] = null)
    }
    getReferenceCount(e) {
        var r;
        return ((r = this._activeTextures[e]) == null ? void 0 : r.usageCount) ?? 0
    }
    _increaseReferenceCount(e) {
        this._activeTextures[e].usageCount++
    }
    _applyFilters(e, r) {
        const n = this._renderer.renderTarget.renderTarget
          , i = this._renderer.filter.generateFilteredTexture({
            texture: e,
            filters: r
        });
        return this._renderer.renderTarget.bind(n, !1),
        i
    }
    destroy() {
        this._renderer = null;
        for (const e in this._activeTextures)
            this._activeTextures[e] && this.returnTexture(this._activeTextures[e].texture);
        this._activeTextures = null
    }
}
qO.extension = {
    type: [X.WebGLSystem, X.WebGPUSystem, X.CanvasSystem],
    name: "canvasText"
};
$e.add(Gse, Hse);
var cl = {}
  , ZO = {}
  , rs = {};
Object.defineProperty(rs, "__esModule", {
    value: !0
});
rs.loop = rs.conditional = rs.parse = void 0;
var Ehe = function t(e, r) {
    var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}
      , i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : n;
    if (Array.isArray(r))
        r.forEach(function(s) {
            return t(e, s, n, i)
        });
    else if (typeof r == "function")
        r(e, n, i, t);
    else {
        var o = Object.keys(r)[0];
        Array.isArray(r[o]) ? (i[o] = {},
        t(e, r[o], n, i[o])) : i[o] = r[o](e, n, i, t)
    }
    return n
};
rs.parse = Ehe;
var _he = function(e, r) {
    return function(n, i, o, s) {
        r(n, i, o) && s(n, e, i, o)
    }
};
rs.conditional = _he;
var bhe = function(e, r) {
    return function(n, i, o, s) {
        for (var a = [], l = n.pos; r(n, i, o); ) {
            var c = {};
            if (s(n, e, i, c),
            n.pos === l)
                break;
            l = n.pos,
            a.push(c)
        }
        return a
    }
};
rs.loop = bhe;
var or = {};
Object.defineProperty(or, "__esModule", {
    value: !0
});
or.readBits = or.readArray = or.readUnsigned = or.readString = or.peekBytes = or.readBytes = or.peekByte = or.readByte = or.buildStream = void 0;
var Che = function(e) {
    return {
        data: e,
        pos: 0
    }
};
or.buildStream = Che;
var JO = function() {
    return function(e) {
        return e.data[e.pos++]
    }
};
or.readByte = JO;
var Ahe = function() {
    var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
    return function(r) {
        return r.data[r.pos + e]
    }
};
or.peekByte = Ahe;
var x1 = function(e) {
    return function(r) {
        return r.data.subarray(r.pos, r.pos += e)
    }
};
or.readBytes = x1;
var whe = function(e) {
    return function(r) {
        return r.data.subarray(r.pos, r.pos + e)
    }
};
or.peekBytes = whe;
var Bhe = function(e) {
    return function(r) {
        return Array.from(x1(e)(r)).map(function(n) {
            return String.fromCharCode(n)
        }).join("")
    }
};
or.readString = Bhe;
var She = function(e) {
    return function(r) {
        var n = x1(2)(r);
        return e ? (n[1] << 8) + n[0] : (n[0] << 8) + n[1]
    }
};
or.readUnsigned = She;
var The = function(e, r) {
    return function(n, i, o) {
        for (var s = typeof r == "function" ? r(n, i, o) : r, a = x1(e), l = new Array(s), c = 0; c < s; c++)
            l[c] = a(n);
        return l
    }
};
or.readArray = The;
var Dhe = function(e, r, n) {
    for (var i = 0, o = 0; o < n; o++)
        i += e[r + o] && Math.pow(2, n - o - 1);
    return i
}
  , Fhe = function(e) {
    return function(r) {
        for (var n = JO()(r), i = new Array(8), o = 0; o < 8; o++)
            i[7 - o] = !!(n & 1 << o);
        return Object.keys(e).reduce(function(s, a) {
            var l = e[a];
            return l.length ? s[a] = Dhe(i, l.index, l.length) : s[a] = i[l.index],
            s
        }, {})
    }
};
or.readBits = Fhe;
(function(t) {
    Object.defineProperty(t, "__esModule", {
        value: !0
    }),
    t.default = void 0;
    var e = rs
      , r = or
      , n = {
        blocks: function(d) {
            for (var h = 0, x = [], y = d.data.length, m = 0, E = (0,
            r.readByte)()(d); E !== h && E; E = (0,
            r.readByte)()(d)) {
                if (d.pos + E >= y) {
                    var g = y - d.pos;
                    x.push((0,
                    r.readBytes)(g)(d)),
                    m += g;
                    break
                }
                x.push((0,
                r.readBytes)(E)(d)),
                m += E
            }
            for (var p = new Uint8Array(m), v = 0, _ = 0; _ < x.length; _++)
                p.set(x[_], v),
                v += x[_].length;
            return p
        }
    }
      , i = (0,
    e.conditional)({
        gce: [{
            codes: (0,
            r.readBytes)(2)
        }, {
            byteSize: (0,
            r.readByte)()
        }, {
            extras: (0,
            r.readBits)({
                future: {
                    index: 0,
                    length: 3
                },
                disposal: {
                    index: 3,
                    length: 3
                },
                userInput: {
                    index: 6
                },
                transparentColorGiven: {
                    index: 7
                }
            })
        }, {
            delay: (0,
            r.readUnsigned)(!0)
        }, {
            transparentColorIndex: (0,
            r.readByte)()
        }, {
            terminator: (0,
            r.readByte)()
        }]
    }, function(f) {
        var d = (0,
        r.peekBytes)(2)(f);
        return d[0] === 33 && d[1] === 249
    })
      , o = (0,
    e.conditional)({
        image: [{
            code: (0,
            r.readByte)()
        }, {
            descriptor: [{
                left: (0,
                r.readUnsigned)(!0)
            }, {
                top: (0,
                r.readUnsigned)(!0)
            }, {
                width: (0,
                r.readUnsigned)(!0)
            }, {
                height: (0,
                r.readUnsigned)(!0)
            }, {
                lct: (0,
                r.readBits)({
                    exists: {
                        index: 0
                    },
                    interlaced: {
                        index: 1
                    },
                    sort: {
                        index: 2
                    },
                    future: {
                        index: 3,
                        length: 2
                    },
                    size: {
                        index: 5,
                        length: 3
                    }
                })
            }]
        }, (0,
        e.conditional)({
            lct: (0,
            r.readArray)(3, function(f, d, h) {
                return Math.pow(2, h.descriptor.lct.size + 1)
            })
        }, function(f, d, h) {
            return h.descriptor.lct.exists
        }), {
            data: [{
                minCodeSize: (0,
                r.readByte)()
            }, n]
        }]
    }, function(f) {
        return (0,
        r.peekByte)()(f) === 44
    })
      , s = (0,
    e.conditional)({
        text: [{
            codes: (0,
            r.readBytes)(2)
        }, {
            blockSize: (0,
            r.readByte)()
        }, {
            preData: function(d, h, x) {
                return (0,
                r.readBytes)(x.text.blockSize)(d)
            }
        }, n]
    }, function(f) {
        var d = (0,
        r.peekBytes)(2)(f);
        return d[0] === 33 && d[1] === 1
    })
      , a = (0,
    e.conditional)({
        application: [{
            codes: (0,
            r.readBytes)(2)
        }, {
            blockSize: (0,
            r.readByte)()
        }, {
            id: function(d, h, x) {
                return (0,
                r.readString)(x.blockSize)(d)
            }
        }, n]
    }, function(f) {
        var d = (0,
        r.peekBytes)(2)(f);
        return d[0] === 33 && d[1] === 255
    })
      , l = (0,
    e.conditional)({
        comment: [{
            codes: (0,
            r.readBytes)(2)
        }, n]
    }, function(f) {
        var d = (0,
        r.peekBytes)(2)(f);
        return d[0] === 33 && d[1] === 254
    })
      , c = [{
        header: [{
            signature: (0,
            r.readString)(3)
        }, {
            version: (0,
            r.readString)(3)
        }]
    }, {
        lsd: [{
            width: (0,
            r.readUnsigned)(!0)
        }, {
            height: (0,
            r.readUnsigned)(!0)
        }, {
            gct: (0,
            r.readBits)({
                exists: {
                    index: 0
                },
                resolution: {
                    index: 1,
                    length: 3
                },
                sort: {
                    index: 4
                },
                size: {
                    index: 5,
                    length: 3
                }
            })
        }, {
            backgroundColorIndex: (0,
            r.readByte)()
        }, {
            pixelAspectRatio: (0,
            r.readByte)()
        }]
    }, (0,
    e.conditional)({
        gct: (0,
        r.readArray)(3, function(f, d) {
            return Math.pow(2, d.lsd.gct.size + 1)
        })
    }, function(f, d) {
        return d.lsd.gct.exists
    }), {
        frames: (0,
        e.loop)([i, a, l, o, s], function(f) {
            var d = (0,
            r.peekByte)()(f);
            return d === 33 || d === 44
        })
    }]
      , u = c;
    t.default = u
}
)(ZO);
var p1 = {};
Object.defineProperty(p1, "__esModule", {
    value: !0
});
p1.deinterlace = void 0;
var Phe = function(e, r) {
    for (var n = new Array(e.length), i = e.length / r, o = function(d, h) {
        var x = e.slice(h * r, (h + 1) * r);
        n.splice.apply(n, [d * r, r].concat(x))
    }, s = [0, 4, 2, 1], a = [8, 8, 4, 2], l = 0, c = 0; c < 4; c++)
        for (var u = s[c]; u < i; u += a[c])
            o(u, l),
            l++;
    return n
};
p1.deinterlace = Phe;
var g1 = {};
Object.defineProperty(g1, "__esModule", {
    value: !0
});
g1.lzw = void 0;
var Ihe = function(e, r, n) {
    var i = 4096, o = -1, s = n, a, l, c, u, f, d, h, b, x, y, _, m, C, B, A, T, E = new Array(n), g = new Array(i), p = new Array(i), v = new Array(i + 1);
    for (m = e,
    l = 1 << m,
    f = l + 1,
    a = l + 2,
    h = o,
    u = m + 1,
    c = (1 << u) - 1,
    x = 0; x < l; x++)
        g[x] = 0,
        p[x] = x;
    var _, b, C, B, T, A;
    for (_ = b = C = B = T = A = 0,
    y = 0; y < s; ) {
        if (B === 0) {
            if (b < u) {
                _ += r[A] << b,
                b += 8,
                A++;
                continue
            }
            if (x = _ & c,
            _ >>= u,
            b -= u,
            x > a || x == f)
                break;
            if (x == l) {
                u = m + 1,
                c = (1 << u) - 1,
                a = l + 2,
                h = o;
                continue
            }
            if (h == o) {
                v[B++] = p[x],
                h = x,
                C = x;
                continue
            }
            for (d = x,
            x == a && (v[B++] = C,
            x = h); x > l; )
                v[B++] = p[x],
                x = g[x];
            C = p[x] & 255,
            v[B++] = C,
            a < i && (g[a] = h,
            p[a] = C,
            a++,
            !(a & c) && a < i && (u++,
            c += a)),
            h = d
        }
        B--,
        E[T++] = v[B],
        y++
    }
    for (y = T; y < s; y++)
        E[y] = 0;
    return E
};
g1.lzw = Ihe;
Object.defineProperty(cl, "__esModule", {
    value: !0
});
var QO = cl.decompressFrames = cl.decompressFrame = ek = cl.parseGIF = void 0
  , Ohe = Lhe(ZO)
  , khe = rs
  , Rhe = or
  , Mhe = p1
  , Nhe = g1;
function Lhe(t) {
    return t && t.__esModule ? t : {
        default: t
    }
}
var $he = function(e) {
    var r = new Uint8Array(e);
    return (0,
    khe.parse)((0,
    Rhe.buildStream)(r), Ohe.default)
}
  , ek = cl.parseGIF = $he
  , Uhe = function(e) {
    for (var r = e.pixels.length, n = new Uint8ClampedArray(r * 4), i = 0; i < r; i++) {
        var o = i * 4
          , s = e.pixels[i]
          , a = e.colorTable[s] || [0, 0, 0];
        n[o] = a[0],
        n[o + 1] = a[1],
        n[o + 2] = a[2],
        n[o + 3] = s !== e.transparentIndex ? 255 : 0
    }
    return n
}
  , tk = function(e, r, n) {
    if (!e.image) {
        console.warn("gif frame does not have associated image.");
        return
    }
    var i = e.image
      , o = i.descriptor.width * i.descriptor.height
      , s = (0,
    Nhe.lzw)(i.data.minCodeSize, i.data.blocks, o);
    i.descriptor.lct.interlaced && (s = (0,
    Mhe.deinterlace)(s, i.descriptor.width));
    var a = {
        pixels: s,
        dims: {
            top: e.image.descriptor.top,
            left: e.image.descriptor.left,
            width: e.image.descriptor.width,
            height: e.image.descriptor.height
        }
    };
    return i.descriptor.lct && i.descriptor.lct.exists ? a.colorTable = i.lct : a.colorTable = r,
    e.gce && (a.delay = (e.gce.delay || 10) * 10,
    a.disposalType = e.gce.extras.disposal,
    e.gce.extras.transparentColorGiven && (a.transparentIndex = e.gce.transparentColorIndex)),
    n && (a.patch = Uhe(a)),
    a
};
cl.decompressFrame = tk;
var Ghe = function(e, r) {
    return e.frames.filter(function(n) {
        return n.image
    }).map(function(n) {
        return tk(n, e.gct, r)
    })
};
QO = cl.decompressFrames = Ghe;
class m1 {
    constructor(e) {
        if (!e || !e.length)
            throw new Error("Invalid frames");
        const [{texture: {width: r, height: n}}] = e;
        this.width = r,
        this.height = n,
        this.frames = e,
        this.textures = this.frames.map(i => i.texture),
        this.totalFrames = this.frames.length,
        this.duration = this.frames[this.totalFrames - 1].end
    }
    destroy() {
        for (const e of this.textures)
            e.destroy(!0);
        for (const e of this.frames)
            e.texture = null;
        this.frames.length = 0,
        this.textures.length = 0,
        Object.assign(this, {
            frames: null,
            textures: null,
            width: 0,
            height: 0,
            duration: 0,
            totalFrames: 0
        })
    }
    static from(e, r) {
        if (!e || e.byteLength === 0)
            throw new Error("Invalid buffer");
        const n = g => {
            let p = null;
            for (const v of g.frames)
                p = v.gce ?? p,
                "image"in v && !("gce"in v) && (v.gce = p)
        }
          , i = ek(e);
        n(i);
        const o = QO(i, !0)
          , s = []
          , a = i.lsd.width
          , l = i.lsd.height
          , c = je.get().createCanvas(a, l)
          , u = c.getContext("2d", {
            willReadFrequently: !0
        })
          , f = je.get().createCanvas()
          , d = f.getContext("2d");
        let h = 0
          , x = null;
        const {fps: y=30, ...m} = r ?? {}
          , E = 1e3 / y;
        for (let g = 0; g < o.length; g++) {
            const {disposalType: p=2, delay: v=E, patch: _, dims: {width: b, height: C, left: B, top: T}} = o[g];
            f.width = b,
            f.height = C,
            d.clearRect(0, 0, b, C);
            const A = d.createImageData(b, C);
            A.data.set(_),
            d.putImageData(A, 0, 0),
            p === 3 && (x = u.getImageData(0, 0, a, l)),
            u.drawImage(f, B, T);
            const w = u.getImageData(0, 0, a, l);
            p === 2 ? u.clearRect(0, 0, a, l) : p === 3 && u.putImageData(x, 0, 0);
            const S = je.get().createCanvas(w.width, w.height);
            S.getContext("2d").putImageData(w, 0, 0),
            s.push({
                start: h,
                end: h + v,
                texture: new Be({
                    source: new ho({
                        resource: S,
                        ...m
                    })
                })
            }),
            h += v
        }
        return c.width = c.height = 0,
        f.width = f.height = 0,
        new m1(s)
    }
}
const Hhe = {
    extension: X.Asset,
    detection: {
        test: async () => !0,
        add: async t => [...t, "gif"],
        remove: async t => t.filter(e => e !== "gif")
    },
    loader: {
        name: "gifLoader",
        id: "gif",
        test: t => Tn.extname(t) === ".gif" || t.startsWith("data:image/gif"),
        load: async (t, e) => {
            const n = await (await je.get().fetch(t)).arrayBuffer();
            return m1.from(n, e == null ? void 0 : e.data)
        }
        ,
        unload: async t => {
            t.destroy()
        }
    }
}
  , rk = class vE extends _l {
    constructor(...e) {
        const r = e[0]instanceof m1 ? {
            source: e[0]
        } : e[0]
          , {source: n, fps: i, loop: o, animationSpeed: s, autoPlay: a, autoUpdate: l, onComplete: c, onFrameChange: u, onLoop: f, ...d} = Object.assign({}, vE.defaultOptions, r);
        super({
            texture: Be.EMPTY,
            ...d
        }),
        this.animationSpeed = 1,
        this.loop = !0,
        this.duration = 0,
        this.autoPlay = !0,
        this.dirty = !1,
        this._currentFrame = 0,
        this._autoUpdate = !1,
        this._isConnectedToTicker = !1,
        this._playing = !1,
        this._currentTime = 0,
        this.onRender = () => this._updateFrame(),
        this.texture = n.textures[0],
        this.duration = n.frames[n.frames.length - 1].end,
        this._source = n,
        this._playing = !1,
        this._currentTime = 0,
        this._isConnectedToTicker = !1,
        Object.assign(this, {
            fps: i,
            loop: o,
            animationSpeed: s,
            autoPlay: a,
            autoUpdate: l,
            onComplete: c,
            onFrameChange: u,
            onLoop: f
        }),
        this.currentFrame = 0,
        a && this.play()
    }
    stop() {
        this._playing && (this._playing = !1,
        this._autoUpdate && this._isConnectedToTicker && (Gr.shared.remove(this.update, this),
        this._isConnectedToTicker = !1))
    }
    play() {
        this._playing || (this._playing = !0,
        this._autoUpdate && !this._isConnectedToTicker && (Gr.shared.add(this.update, this, Cl.HIGH),
        this._isConnectedToTicker = !0),
        !this.loop && this.currentFrame === this._source.frames.length - 1 && (this._currentTime = 0))
    }
    get progress() {
        return this._currentTime / this.duration
    }
    get playing() {
        return this._playing
    }
    update(e) {
        var s, a;
        if (!this._playing)
            return;
        const r = this.animationSpeed * e.deltaTime / Gr.targetFPMS
          , n = this._currentTime + r
          , i = n % this.duration
          , o = this._source.frames.findIndex(l => l.start <= i && l.end > i);
        n >= this.duration ? this.loop ? (this._currentTime = i,
        this._updateFrameIndex(o),
        (s = this.onLoop) == null || s.call(this)) : (this._currentTime = this.duration,
        this._updateFrameIndex(this.totalFrames - 1),
        (a = this.onComplete) == null || a.call(this),
        this.stop()) : (this._currentTime = i,
        this._updateFrameIndex(o))
    }
    _updateFrame() {
        this.dirty && (this.texture = this._source.frames[this._currentFrame].texture,
        this.dirty = !1)
    }
    get autoUpdate() {
        return this._autoUpdate
    }
    set autoUpdate(e) {
        e !== this._autoUpdate && (this._autoUpdate = e,
        !this._autoUpdate && this._isConnectedToTicker ? (Gr.shared.remove(this.update, this),
        this._isConnectedToTicker = !1) : this._autoUpdate && !this._isConnectedToTicker && this._playing && (Gr.shared.add(this.update, this),
        this._isConnectedToTicker = !0))
    }
    get currentFrame() {
        return this._currentFrame
    }
    set currentFrame(e) {
        this._updateFrameIndex(e),
        this._currentTime = this._source.frames[e].start
    }
    get source() {
        return this._source
    }
    _updateFrameIndex(e) {
        var r;
        if (e < 0 || e >= this.totalFrames)
            throw new Error(`Frame index out of range, expecting 0 to ${this.totalFrames}, got ${e}`);
        this._currentFrame !== e && (this._currentFrame = e,
        this.dirty = !0,
        (r = this.onFrameChange) == null || r.call(this, e))
    }
    get totalFrames() {
        return this._source.totalFrames
    }
    destroy(e=!1) {
        this.stop(),
        super.destroy(),
        e && this._source.destroy();
        const r = null;
        this._source = r,
        this.onComplete = r,
        this.onFrameChange = r,
        this.onLoop = r
    }
    clone() {
        const e = new vE({
            source: this._source,
            autoUpdate: this._autoUpdate,
            loop: this.loop,
            autoPlay: this.autoPlay,
            animationSpeed: this.animationSpeed,
            onComplete: this.onComplete,
            onFrameChange: this.onFrameChange,
            onLoop: this.onLoop
        });
        return e.dirty = !0,
        e
    }
}
;
rk.defaultOptions = {
    fps: 30,
    loop: !0,
    animationSpeed: 1,
    autoPlay: !0,
    autoUpdate: !0,
    onComplete: null,
    onFrameChange: null,
    onLoop: null
};
let E6e = rk;
$e.add(Hhe);
function nk(t, e) {
    return function() {
        return t.apply(e, arguments)
    }
}
const {toString: Vhe} = Object.prototype
  , {getPrototypeOf: Gb} = Object
  , {iterator: v1, toStringTag: ik} = Symbol
  , y1 = (t => e => {
    const r = Vhe.call(e);
    return t[r] || (t[r] = r.slice(8, -1).toLowerCase())
}
)(Object.create(null))
  , ji = t => (t = t.toLowerCase(),
e => y1(e) === t)
  , E1 = t => e => typeof e === t
  , {isArray: Su} = Array
  , iu = E1("undefined");
function ud(t) {
    return t !== null && !iu(t) && t.constructor !== null && !iu(t.constructor) && Dn(t.constructor.isBuffer) && t.constructor.isBuffer(t)
}
const ok = ji("ArrayBuffer");
function zhe(t) {
    let e;
    return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && ok(t.buffer),
    e
}
const jhe = E1("string")
  , Dn = E1("function")
  , sk = E1("number")
  , fd = t => t !== null && typeof t == "object"
  , Whe = t => t === !0 || t === !1
  , Zh = t => {
    if (y1(t) !== "object")
        return !1;
    const e = Gb(t);
    return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(ik in t) && !(v1 in t)
}
  , Yhe = t => {
    if (!fd(t) || ud(t))
        return !1;
    try {
        return Object.keys(t).length === 0 && Object.getPrototypeOf(t) === Object.prototype
    } catch {
        return !1
    }
}
  , Xhe = ji("Date")
  , Khe = ji("File")
  , qhe = ji("Blob")
  , Zhe = ji("FileList")
  , Jhe = t => fd(t) && Dn(t.pipe)
  , Qhe = t => {
    let e;
    return t && (typeof FormData == "function" && t instanceof FormData || Dn(t.append) && ((e = y1(t)) === "formdata" || e === "object" && Dn(t.toString) && t.toString() === "[object FormData]"))
}
  , exe = ji("URLSearchParams")
  , [txe,rxe,nxe,ixe] = ["ReadableStream", "Request", "Response", "Headers"].map(ji)
  , oxe = t => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function dd(t, e, {allOwnKeys: r=!1}={}) {
    if (t === null || typeof t > "u")
        return;
    let n, i;
    if (typeof t != "object" && (t = [t]),
    Su(t))
        for (n = 0,
        i = t.length; n < i; n++)
            e.call(null, t[n], n, t);
    else {
        if (ud(t))
            return;
        const o = r ? Object.getOwnPropertyNames(t) : Object.keys(t)
          , s = o.length;
        let a;
        for (n = 0; n < s; n++)
            a = o[n],
            e.call(null, t[a], a, t)
    }
}
function ak(t, e) {
    if (ud(t))
        return null;
    e = e.toLowerCase();
    const r = Object.keys(t);
    let n = r.length, i;
    for (; n-- > 0; )
        if (i = r[n],
        e === i.toLowerCase())
            return i;
    return null
}
const qa = ( () => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)()
  , lk = t => !iu(t) && t !== qa;
function yE() {
    const {caseless: t, skipUndefined: e} = lk(this) && this || {}
      , r = {}
      , n = (i, o) => {
        const s = t && ak(r, o) || o;
        Zh(r[s]) && Zh(i) ? r[s] = yE(r[s], i) : Zh(i) ? r[s] = yE({}, i) : Su(i) ? r[s] = i.slice() : (!e || !iu(i)) && (r[s] = i)
    }
    ;
    for (let i = 0, o = arguments.length; i < o; i++)
        arguments[i] && dd(arguments[i], n);
    return r
}
const sxe = (t, e, r, {allOwnKeys: n}={}) => (dd(e, (i, o) => {
    r && Dn(i) ? t[o] = nk(i, r) : t[o] = i
}
, {
    allOwnKeys: n
}),
t)
  , axe = t => (t.charCodeAt(0) === 65279 && (t = t.slice(1)),
t)
  , lxe = (t, e, r, n) => {
    t.prototype = Object.create(e.prototype, n),
    t.prototype.constructor = t,
    Object.defineProperty(t, "super", {
        value: e.prototype
    }),
    r && Object.assign(t.prototype, r)
}
  , cxe = (t, e, r, n) => {
    let i, o, s;
    const a = {};
    if (e = e || {},
    t == null)
        return e;
    do {
        for (i = Object.getOwnPropertyNames(t),
        o = i.length; o-- > 0; )
            s = i[o],
            (!n || n(s, t, e)) && !a[s] && (e[s] = t[s],
            a[s] = !0);
        t = r !== !1 && Gb(t)
    } while (t && (!r || r(t, e)) && t !== Object.prototype);
    return e
}
  , uxe = (t, e, r) => {
    t = String(t),
    (r === void 0 || r > t.length) && (r = t.length),
    r -= e.length;
    const n = t.indexOf(e, r);
    return n !== -1 && n === r
}
  , fxe = t => {
    if (!t)
        return null;
    if (Su(t))
        return t;
    let e = t.length;
    if (!sk(e))
        return null;
    const r = new Array(e);
    for (; e-- > 0; )
        r[e] = t[e];
    return r
}
  , dxe = (t => e => t && e instanceof t)(typeof Uint8Array < "u" && Gb(Uint8Array))
  , hxe = (t, e) => {
    const n = (t && t[v1]).call(t);
    let i;
    for (; (i = n.next()) && !i.done; ) {
        const o = i.value;
        e.call(t, o[0], o[1])
    }
}
  , xxe = (t, e) => {
    let r;
    const n = [];
    for (; (r = t.exec(e)) !== null; )
        n.push(r);
    return n
}
  , pxe = ji("HTMLFormElement")
  , gxe = t => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(r, n, i) {
    return n.toUpperCase() + i
})
  , M3 = ( ({hasOwnProperty: t}) => (e, r) => t.call(e, r))(Object.prototype)
  , mxe = ji("RegExp")
  , ck = (t, e) => {
    const r = Object.getOwnPropertyDescriptors(t)
      , n = {};
    dd(r, (i, o) => {
        let s;
        (s = e(i, o, t)) !== !1 && (n[o] = s || i)
    }
    ),
    Object.defineProperties(t, n)
}
  , vxe = t => {
    ck(t, (e, r) => {
        if (Dn(t) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
            return !1;
        const n = t[r];
        if (Dn(n)) {
            if (e.enumerable = !1,
            "writable"in e) {
                e.writable = !1;
                return
            }
            e.set || (e.set = () => {
                throw Error("Can not rewrite read-only method '" + r + "'")
            }
            )
        }
    }
    )
}
  , yxe = (t, e) => {
    const r = {}
      , n = i => {
        i.forEach(o => {
            r[o] = !0
        }
        )
    }
    ;
    return Su(t) ? n(t) : n(String(t).split(e)),
    r
}
  , Exe = () => {}
  , _xe = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
function bxe(t) {
    return !!(t && Dn(t.append) && t[ik] === "FormData" && t[v1])
}
const Cxe = t => {
    const e = new Array(10)
      , r = (n, i) => {
        if (fd(n)) {
            if (e.indexOf(n) >= 0)
                return;
            if (ud(n))
                return n;
            if (!("toJSON"in n)) {
                e[i] = n;
                const o = Su(n) ? [] : {};
                return dd(n, (s, a) => {
                    const l = r(s, i + 1);
                    !iu(l) && (o[a] = l)
                }
                ),
                e[i] = void 0,
                o
            }
        }
        return n
    }
    ;
    return r(t, 0)
}
  , Axe = ji("AsyncFunction")
  , wxe = t => t && (fd(t) || Dn(t)) && Dn(t.then) && Dn(t.catch)
  , uk = ( (t, e) => t ? setImmediate : e ? ( (r, n) => (qa.addEventListener("message", ({source: i, data: o}) => {
    i === qa && o === r && n.length && n.shift()()
}
, !1),
i => {
    n.push(i),
    qa.postMessage(r, "*")
}
))(`axios@${Math.random()}`, []) : r => setTimeout(r))(typeof setImmediate == "function", Dn(qa.postMessage))
  , Bxe = typeof queueMicrotask < "u" ? queueMicrotask.bind(qa) : typeof process < "u" && process.nextTick || uk
  , Sxe = t => t != null && Dn(t[v1])
  , ne = {
    isArray: Su,
    isArrayBuffer: ok,
    isBuffer: ud,
    isFormData: Qhe,
    isArrayBufferView: zhe,
    isString: jhe,
    isNumber: sk,
    isBoolean: Whe,
    isObject: fd,
    isPlainObject: Zh,
    isEmptyObject: Yhe,
    isReadableStream: txe,
    isRequest: rxe,
    isResponse: nxe,
    isHeaders: ixe,
    isUndefined: iu,
    isDate: Xhe,
    isFile: Khe,
    isBlob: qhe,
    isRegExp: mxe,
    isFunction: Dn,
    isStream: Jhe,
    isURLSearchParams: exe,
    isTypedArray: dxe,
    isFileList: Zhe,
    forEach: dd,
    merge: yE,
    extend: sxe,
    trim: oxe,
    stripBOM: axe,
    inherits: lxe,
    toFlatObject: cxe,
    kindOf: y1,
    kindOfTest: ji,
    endsWith: uxe,
    toArray: fxe,
    forEachEntry: hxe,
    matchAll: xxe,
    isHTMLForm: pxe,
    hasOwnProperty: M3,
    hasOwnProp: M3,
    reduceDescriptors: ck,
    freezeMethods: vxe,
    toObjectSet: yxe,
    toCamelCase: gxe,
    noop: Exe,
    toFiniteNumber: _xe,
    findKey: ak,
    global: qa,
    isContextDefined: lk,
    isSpecCompliantForm: bxe,
    toJSONObject: Cxe,
    isAsyncFn: Axe,
    isThenable: wxe,
    setImmediate: uk,
    asap: Bxe,
    isIterable: Sxe
};
function Ye(t, e, r, n, i) {
    Error.call(this),
    Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack,
    this.message = t,
    this.name = "AxiosError",
    e && (this.code = e),
    r && (this.config = r),
    n && (this.request = n),
    i && (this.response = i,
    this.status = i.status ? i.status : null)
}
ne.inherits(Ye, Error, {
    toJSON: function() {
        return {
            message: this.message,
            name: this.name,
            description: this.description,
            number: this.number,
            fileName: this.fileName,
            lineNumber: this.lineNumber,
            columnNumber: this.columnNumber,
            stack: this.stack,
            config: ne.toJSONObject(this.config),
            code: this.code,
            status: this.status
        }
    }
});
const fk = Ye.prototype
  , dk = {};
["ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL"].forEach(t => {
    dk[t] = {
        value: t
    }
}
);
Object.defineProperties(Ye, dk);
Object.defineProperty(fk, "isAxiosError", {
    value: !0
});
Ye.from = (t, e, r, n, i, o) => {
    const s = Object.create(fk);
    ne.toFlatObject(t, s, function(u) {
        return u !== Error.prototype
    }, c => c !== "isAxiosError");
    const a = t && t.message ? t.message : "Error"
      , l = e == null && t ? t.code : e;
    return Ye.call(s, a, l, r, n, i),
    t && s.cause == null && Object.defineProperty(s, "cause", {
        value: t,
        configurable: !0
    }),
    s.name = t && t.name || "Error",
    o && Object.assign(s, o),
    s
}
;
const Txe = null;
function EE(t) {
    return ne.isPlainObject(t) || ne.isArray(t)
}
function hk(t) {
    return ne.endsWith(t, "[]") ? t.slice(0, -2) : t
}
function N3(t, e, r) {
    return t ? t.concat(e).map(function(i, o) {
        return i = hk(i),
        !r && o ? "[" + i + "]" : i
    }).join(r ? "." : "") : e
}
function Dxe(t) {
    return ne.isArray(t) && !t.some(EE)
}
const Fxe = ne.toFlatObject(ne, {}, null, function(e) {
    return /^is[A-Z]/.test(e)
});
function _1(t, e, r) {
    if (!ne.isObject(t))
        throw new TypeError("target must be an object");
    e = e || new FormData,
    r = ne.toFlatObject(r, {
        metaTokens: !0,
        dots: !1,
        indexes: !1
    }, !1, function(y, m) {
        return !ne.isUndefined(m[y])
    });
    const n = r.metaTokens
      , i = r.visitor || u
      , o = r.dots
      , s = r.indexes
      , l = (r.Blob || typeof Blob < "u" && Blob) && ne.isSpecCompliantForm(e);
    if (!ne.isFunction(i))
        throw new TypeError("visitor must be a function");
    function c(x) {
        if (x === null)
            return "";
        if (ne.isDate(x))
            return x.toISOString();
        if (ne.isBoolean(x))
            return x.toString();
        if (!l && ne.isBlob(x))
            throw new Ye("Blob is not supported. Use a Buffer instead.");
        return ne.isArrayBuffer(x) || ne.isTypedArray(x) ? l && typeof Blob == "function" ? new Blob([x]) : Buffer.from(x) : x
    }
    function u(x, y, m) {
        let E = x;
        if (x && !m && typeof x == "object") {
            if (ne.endsWith(y, "{}"))
                y = n ? y : y.slice(0, -2),
                x = JSON.stringify(x);
            else if (ne.isArray(x) && Dxe(x) || (ne.isFileList(x) || ne.endsWith(y, "[]")) && (E = ne.toArray(x)))
                return y = hk(y),
                E.forEach(function(p, v) {
                    !(ne.isUndefined(p) || p === null) && e.append(s === !0 ? N3([y], v, o) : s === null ? y : y + "[]", c(p))
                }),
                !1
        }
        return EE(x) ? !0 : (e.append(N3(m, y, o), c(x)),
        !1)
    }
    const f = []
      , d = Object.assign(Fxe, {
        defaultVisitor: u,
        convertValue: c,
        isVisitable: EE
    });
    function h(x, y) {
        if (!ne.isUndefined(x)) {
            if (f.indexOf(x) !== -1)
                throw Error("Circular reference detected in " + y.join("."));
            f.push(x),
            ne.forEach(x, function(E, g) {
                (!(ne.isUndefined(E) || E === null) && i.call(e, E, ne.isString(g) ? g.trim() : g, y, d)) === !0 && h(E, y ? y.concat(g) : [g])
            }),
            f.pop()
        }
    }
    if (!ne.isObject(t))
        throw new TypeError("data must be an object");
    return h(t),
    e
}
function L3(t) {
    const e = {
        "!": "%21",
        "'": "%27",
        "(": "%28",
        ")": "%29",
        "~": "%7E",
        "%20": "+",
        "%00": "\0"
    };
    return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(n) {
        return e[n]
    })
}
function Hb(t, e) {
    this._pairs = [],
    t && _1(t, this, e)
}
const xk = Hb.prototype;
xk.append = function(e, r) {
    this._pairs.push([e, r])
}
;
xk.toString = function(e) {
    const r = e ? function(n) {
        return e.call(this, n, L3)
    }
    : L3;
    return this._pairs.map(function(i) {
        return r(i[0]) + "=" + r(i[1])
    }, "").join("&")
}
;
function Pxe(t) {
    return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+")
}
function pk(t, e, r) {
    if (!e)
        return t;
    const n = r && r.encode || Pxe;
    ne.isFunction(r) && (r = {
        serialize: r
    });
    const i = r && r.serialize;
    let o;
    if (i ? o = i(e, r) : o = ne.isURLSearchParams(e) ? e.toString() : new Hb(e,r).toString(n),
    o) {
        const s = t.indexOf("#");
        s !== -1 && (t = t.slice(0, s)),
        t += (t.indexOf("?") === -1 ? "?" : "&") + o
    }
    return t
}
class Ixe {
    constructor() {
        this.handlers = []
    }
    use(e, r, n) {
        return this.handlers.push({
            fulfilled: e,
            rejected: r,
            synchronous: n ? n.synchronous : !1,
            runWhen: n ? n.runWhen : null
        }),
        this.handlers.length - 1
    }
    eject(e) {
        this.handlers[e] && (this.handlers[e] = null)
    }
    clear() {
        this.handlers && (this.handlers = [])
    }
    forEach(e) {
        ne.forEach(this.handlers, function(n) {
            n !== null && e(n)
        })
    }
}
const $3 = Ixe
  , gk = {
    silentJSONParsing: !0,
    forcedJSONParsing: !0,
    clarifyTimeoutError: !1
}
  , Oxe = typeof URLSearchParams < "u" ? URLSearchParams : Hb
  , kxe = typeof FormData < "u" ? FormData : null
  , Rxe = typeof Blob < "u" ? Blob : null
  , Mxe = {
    isBrowser: !0,
    classes: {
        URLSearchParams: Oxe,
        FormData: kxe,
        Blob: Rxe
    },
    protocols: ["http", "https", "file", "blob", "url", "data"]
}
  , Vb = typeof window < "u" && typeof document < "u"
  , _E = typeof navigator == "object" && navigator || void 0
  , Nxe = Vb && (!_E || ["ReactNative", "NativeScript", "NS"].indexOf(_E.product) < 0)
  , Lxe = ( () => typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope && typeof self.importScripts == "function")()
  , $xe = Vb && window.location.href || "http://localhost"
  , Uxe = Object.freeze(Object.defineProperty({
    __proto__: null,
    hasBrowserEnv: Vb,
    hasStandardBrowserEnv: Nxe,
    hasStandardBrowserWebWorkerEnv: Lxe,
    navigator: _E,
    origin: $xe
}, Symbol.toStringTag, {
    value: "Module"
}))
  , Zr = {
    ...Uxe,
    ...Mxe
};
function Gxe(t, e) {
    return _1(t, new Zr.classes.URLSearchParams, {
        visitor: function(r, n, i, o) {
            return Zr.isNode && ne.isBuffer(r) ? (this.append(n, r.toString("base64")),
            !1) : o.defaultVisitor.apply(this, arguments)
        },
        ...e
    })
}
function Hxe(t) {
    return ne.matchAll(/\w+|\[(\w*)]/g, t).map(e => e[0] === "[]" ? "" : e[1] || e[0])
}
function Vxe(t) {
    const e = {}
      , r = Object.keys(t);
    let n;
    const i = r.length;
    let o;
    for (n = 0; n < i; n++)
        o = r[n],
        e[o] = t[o];
    return e
}
function mk(t) {
    function e(r, n, i, o) {
        let s = r[o++];
        if (s === "__proto__")
            return !0;
        const a = Number.isFinite(+s)
          , l = o >= r.length;
        return s = !s && ne.isArray(i) ? i.length : s,
        l ? (ne.hasOwnProp(i, s) ? i[s] = [i[s], n] : i[s] = n,
        !a) : ((!i[s] || !ne.isObject(i[s])) && (i[s] = []),
        e(r, n, i[s], o) && ne.isArray(i[s]) && (i[s] = Vxe(i[s])),
        !a)
    }
    if (ne.isFormData(t) && ne.isFunction(t.entries)) {
        const r = {};
        return ne.forEachEntry(t, (n, i) => {
            e(Hxe(n), i, r, 0)
        }
        ),
        r
    }
    return null
}
function zxe(t, e, r) {
    if (ne.isString(t))
        try {
            return (e || JSON.parse)(t),
            ne.trim(t)
        } catch (n) {
            if (n.name !== "SyntaxError")
                throw n
        }
    return (r || JSON.stringify)(t)
}
const zb = {
    transitional: gk,
    adapter: ["xhr", "http", "fetch"],
    transformRequest: [function(e, r) {
        const n = r.getContentType() || ""
          , i = n.indexOf("application/json") > -1
          , o = ne.isObject(e);
        if (o && ne.isHTMLForm(e) && (e = new FormData(e)),
        ne.isFormData(e))
            return i ? JSON.stringify(mk(e)) : e;
        if (ne.isArrayBuffer(e) || ne.isBuffer(e) || ne.isStream(e) || ne.isFile(e) || ne.isBlob(e) || ne.isReadableStream(e))
            return e;
        if (ne.isArrayBufferView(e))
            return e.buffer;
        if (ne.isURLSearchParams(e))
            return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1),
            e.toString();
        let a;
        if (o) {
            if (n.indexOf("application/x-www-form-urlencoded") > -1)
                return Gxe(e, this.formSerializer).toString();
            if ((a = ne.isFileList(e)) || n.indexOf("multipart/form-data") > -1) {
                const l = this.env && this.env.FormData;
                return _1(a ? {
                    "files[]": e
                } : e, l && new l, this.formSerializer)
            }
        }
        return o || i ? (r.setContentType("application/json", !1),
        zxe(e)) : e
    }
    ],
    transformResponse: [function(e) {
        const r = this.transitional || zb.transitional
          , n = r && r.forcedJSONParsing
          , i = this.responseType === "json";
        if (ne.isResponse(e) || ne.isReadableStream(e))
            return e;
        if (e && ne.isString(e) && (n && !this.responseType || i)) {
            const s = !(r && r.silentJSONParsing) && i;
            try {
                return JSON.parse(e, this.parseReviver)
            } catch (a) {
                if (s)
                    throw a.name === "SyntaxError" ? Ye.from(a, Ye.ERR_BAD_RESPONSE, this, null, this.response) : a
            }
        }
        return e
    }
    ],
    timeout: 0,
    xsrfCookieName: "XSRF-TOKEN",
    xsrfHeaderName: "X-XSRF-TOKEN",
    maxContentLength: -1,
    maxBodyLength: -1,
    env: {
        FormData: Zr.classes.FormData,
        Blob: Zr.classes.Blob
    },
    validateStatus: function(e) {
        return e >= 200 && e < 300
    },
    headers: {
        common: {
            Accept: "application/json, text/plain, */*",
            "Content-Type": void 0
        }
    }
};
ne.forEach(["delete", "get", "head", "post", "put", "patch"], t => {
    zb.headers[t] = {}
}
);
const jb = zb
  , jxe = ne.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"])
  , Wxe = t => {
    const e = {};
    let r, n, i;
    return t && t.split(`
`).forEach(function(s) {
        i = s.indexOf(":"),
        r = s.substring(0, i).trim().toLowerCase(),
        n = s.substring(i + 1).trim(),
        !(!r || e[r] && jxe[r]) && (r === "set-cookie" ? e[r] ? e[r].push(n) : e[r] = [n] : e[r] = e[r] ? e[r] + ", " + n : n)
    }),
    e
}
  , U3 = Symbol("internals");
function t0(t) {
    return t && String(t).trim().toLowerCase()
}
function Jh(t) {
    return t === !1 || t == null ? t : ne.isArray(t) ? t.map(Jh) : String(t)
}
function Yxe(t) {
    const e = Object.create(null)
      , r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
    let n;
    for (; n = r.exec(t); )
        e[n[1]] = n[2];
    return e
}
const Xxe = t => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
function cm(t, e, r, n, i) {
    if (ne.isFunction(n))
        return n.call(this, e, r);
    if (i && (e = r),
    !!ne.isString(e)) {
        if (ne.isString(n))
            return e.indexOf(n) !== -1;
        if (ne.isRegExp(n))
            return n.test(e)
    }
}
function Kxe(t) {
    return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, r, n) => r.toUpperCase() + n)
}
function qxe(t, e) {
    const r = ne.toCamelCase(" " + e);
    ["get", "set", "has"].forEach(n => {
        Object.defineProperty(t, n + r, {
            value: function(i, o, s) {
                return this[n].call(this, e, i, o, s)
            },
            configurable: !0
        })
    }
    )
}
class b1 {
    constructor(e) {
        e && this.set(e)
    }
    set(e, r, n) {
        const i = this;
        function o(a, l, c) {
            const u = t0(l);
            if (!u)
                throw new Error("header name must be a non-empty string");
            const f = ne.findKey(i, u);
            (!f || i[f] === void 0 || c === !0 || c === void 0 && i[f] !== !1) && (i[f || l] = Jh(a))
        }
        const s = (a, l) => ne.forEach(a, (c, u) => o(c, u, l));
        if (ne.isPlainObject(e) || e instanceof this.constructor)
            s(e, r);
        else if (ne.isString(e) && (e = e.trim()) && !Xxe(e))
            s(Wxe(e), r);
        else if (ne.isObject(e) && ne.isIterable(e)) {
            let a = {}, l, c;
            for (const u of e) {
                if (!ne.isArray(u))
                    throw TypeError("Object iterator must return a key-value pair");
                a[c = u[0]] = (l = a[c]) ? ne.isArray(l) ? [...l, u[1]] : [l, u[1]] : u[1]
            }
            s(a, r)
        } else
            e != null && o(r, e, n);
        return this
    }
    get(e, r) {
        if (e = t0(e),
        e) {
            const n = ne.findKey(this, e);
            if (n) {
                const i = this[n];
                if (!r)
                    return i;
                if (r === !0)
                    return Yxe(i);
                if (ne.isFunction(r))
                    return r.call(this, i, n);
                if (ne.isRegExp(r))
                    return r.exec(i);
                throw new TypeError("parser must be boolean|regexp|function")
            }
        }
    }
    has(e, r) {
        if (e = t0(e),
        e) {
            const n = ne.findKey(this, e);
            return !!(n && this[n] !== void 0 && (!r || cm(this, this[n], n, r)))
        }
        return !1
    }
    delete(e, r) {
        const n = this;
        let i = !1;
        function o(s) {
            if (s = t0(s),
            s) {
                const a = ne.findKey(n, s);
                a && (!r || cm(n, n[a], a, r)) && (delete n[a],
                i = !0)
            }
        }
        return ne.isArray(e) ? e.forEach(o) : o(e),
        i
    }
    clear(e) {
        const r = Object.keys(this);
        let n = r.length
          , i = !1;
        for (; n--; ) {
            const o = r[n];
            (!e || cm(this, this[o], o, e, !0)) && (delete this[o],
            i = !0)
        }
        return i
    }
    normalize(e) {
        const r = this
          , n = {};
        return ne.forEach(this, (i, o) => {
            const s = ne.findKey(n, o);
            if (s) {
                r[s] = Jh(i),
                delete r[o];
                return
            }
            const a = e ? Kxe(o) : String(o).trim();
            a !== o && delete r[o],
            r[a] = Jh(i),
            n[a] = !0
        }
        ),
        this
    }
    concat(...e) {
        return this.constructor.concat(this, ...e)
    }
    toJSON(e) {
        const r = Object.create(null);
        return ne.forEach(this, (n, i) => {
            n != null && n !== !1 && (r[i] = e && ne.isArray(n) ? n.join(", ") : n)
        }
        ),
        r
    }
    [Symbol.iterator]() {
        return Object.entries(this.toJSON())[Symbol.iterator]()
    }
    toString() {
        return Object.entries(this.toJSON()).map( ([e,r]) => e + ": " + r).join(`
`)
    }
    getSetCookie() {
        return this.get("set-cookie") || []
    }
    get[Symbol.toStringTag]() {
        return "AxiosHeaders"
    }
    static from(e) {
        return e instanceof this ? e : new this(e)
    }
    static concat(e, ...r) {
        const n = new this(e);
        return r.forEach(i => n.set(i)),
        n
    }
    static accessor(e) {
        const n = (this[U3] = this[U3] = {
            accessors: {}
        }).accessors
          , i = this.prototype;
        function o(s) {
            const a = t0(s);
            n[a] || (qxe(i, s),
            n[a] = !0)
        }
        return ne.isArray(e) ? e.forEach(o) : o(e),
        this
    }
}
b1.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
ne.reduceDescriptors(b1.prototype, ({value: t}, e) => {
    let r = e[0].toUpperCase() + e.slice(1);
    return {
        get: () => t,
        set(n) {
            this[r] = n
        }
    }
}
);
ne.freezeMethods(b1);
const Ni = b1;
function um(t, e) {
    const r = this || jb
      , n = e || r
      , i = Ni.from(n.headers);
    let o = n.data;
    return ne.forEach(t, function(a) {
        o = a.call(r, o, i.normalize(), e ? e.status : void 0)
    }),
    i.normalize(),
    o
}
function vk(t) {
    return !!(t && t.__CANCEL__)
}
function Tu(t, e, r) {
    Ye.call(this, t ?? "canceled", Ye.ERR_CANCELED, e, r),
    this.name = "CanceledError"
}
ne.inherits(Tu, Ye, {
    __CANCEL__: !0
});
function yk(t, e, r) {
    const n = r.config.validateStatus;
    !r.status || !n || n(r.status) ? t(r) : e(new Ye("Request failed with status code " + r.status,[Ye.ERR_BAD_REQUEST, Ye.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],r.config,r.request,r))
}
function Zxe(t) {
    const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
    return e && e[1] || ""
}
function Jxe(t, e) {
    t = t || 10;
    const r = new Array(t)
      , n = new Array(t);
    let i = 0, o = 0, s;
    return e = e !== void 0 ? e : 1e3,
    function(l) {
        const c = Date.now()
          , u = n[o];
        s || (s = c),
        r[i] = l,
        n[i] = c;
        let f = o
          , d = 0;
        for (; f !== i; )
            d += r[f++],
            f = f % t;
        if (i = (i + 1) % t,
        i === o && (o = (o + 1) % t),
        c - s < e)
            return;
        const h = u && c - u;
        return h ? Math.round(d * 1e3 / h) : void 0
    }
}
function Qxe(t, e) {
    let r = 0, n = 1e3 / e, i, o;
    const s = (c, u=Date.now()) => {
        r = u,
        i = null,
        o && (clearTimeout(o),
        o = null),
        t(...c)
    }
    ;
    return [ (...c) => {
        const u = Date.now()
          , f = u - r;
        f >= n ? s(c, u) : (i = c,
        o || (o = setTimeout( () => {
            o = null,
            s(i)
        }
        , n - f)))
    }
    , () => i && s(i)]
}
const Gx = (t, e, r=3) => {
    let n = 0;
    const i = Jxe(50, 250);
    return Qxe(o => {
        const s = o.loaded
          , a = o.lengthComputable ? o.total : void 0
          , l = s - n
          , c = i(l)
          , u = s <= a;
        n = s;
        const f = {
            loaded: s,
            total: a,
            progress: a ? s / a : void 0,
            bytes: l,
            rate: c || void 0,
            estimated: c && a && u ? (a - s) / c : void 0,
            event: o,
            lengthComputable: a != null,
            [e ? "download" : "upload"]: !0
        };
        t(f)
    }
    , r)
}
  , G3 = (t, e) => {
    const r = t != null;
    return [n => e[0]({
        lengthComputable: r,
        total: t,
        loaded: n
    }), e[1]]
}
  , H3 = t => (...e) => ne.asap( () => t(...e))
  , epe = Zr.hasStandardBrowserEnv ? ( (t, e) => r => (r = new URL(r,Zr.origin),
t.protocol === r.protocol && t.host === r.host && (e || t.port === r.port)))(new URL(Zr.origin), Zr.navigator && /(msie|trident)/i.test(Zr.navigator.userAgent)) : () => !0
  , tpe = Zr.hasStandardBrowserEnv ? {
    write(t, e, r, n, i, o, s) {
        if (typeof document > "u")
            return;
        const a = [`${t}=${encodeURIComponent(e)}`];
        ne.isNumber(r) && a.push(`expires=${new Date(r).toUTCString()}`),
        ne.isString(n) && a.push(`path=${n}`),
        ne.isString(i) && a.push(`domain=${i}`),
        o === !0 && a.push("secure"),
        ne.isString(s) && a.push(`SameSite=${s}`),
        document.cookie = a.join("; ")
    },
    read(t) {
        if (typeof document > "u")
            return null;
        const e = document.cookie.match(new RegExp("(?:^|; )" + t + "=([^;]*)"));
        return e ? decodeURIComponent(e[1]) : null
    },
    remove(t) {
        this.write(t, "", Date.now() - 864e5, "/")
    }
} : {
    write() {},
    read() {
        return null
    },
    remove() {}
};
function rpe(t) {
    return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)
}
function npe(t, e) {
    return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t
}
function Ek(t, e, r) {
    let n = !rpe(e);
    return t && (n || r == !1) ? npe(t, e) : e
}
const V3 = t => t instanceof Ni ? {
    ...t
} : t;
function Bl(t, e) {
    e = e || {};
    const r = {};
    function n(c, u, f, d) {
        return ne.isPlainObject(c) && ne.isPlainObject(u) ? ne.merge.call({
            caseless: d
        }, c, u) : ne.isPlainObject(u) ? ne.merge({}, u) : ne.isArray(u) ? u.slice() : u
    }
    function i(c, u, f, d) {
        if (ne.isUndefined(u)) {
            if (!ne.isUndefined(c))
                return n(void 0, c, f, d)
        } else
            return n(c, u, f, d)
    }
    function o(c, u) {
        if (!ne.isUndefined(u))
            return n(void 0, u)
    }
    function s(c, u) {
        if (ne.isUndefined(u)) {
            if (!ne.isUndefined(c))
                return n(void 0, c)
        } else
            return n(void 0, u)
    }
    function a(c, u, f) {
        if (f in e)
            return n(c, u);
        if (f in t)
            return n(void 0, c)
    }
    const l = {
        url: o,
        method: o,
        data: o,
        baseURL: s,
        transformRequest: s,
        transformResponse: s,
        paramsSerializer: s,
        timeout: s,
        timeoutMessage: s,
        withCredentials: s,
        withXSRFToken: s,
        adapter: s,
        responseType: s,
        xsrfCookieName: s,
        xsrfHeaderName: s,
        onUploadProgress: s,
        onDownloadProgress: s,
        decompress: s,
        maxContentLength: s,
        maxBodyLength: s,
        beforeRedirect: s,
        transport: s,
        httpAgent: s,
        httpsAgent: s,
        cancelToken: s,
        socketPath: s,
        responseEncoding: s,
        validateStatus: a,
        headers: (c, u, f) => i(V3(c), V3(u), f, !0)
    };
    return ne.forEach(Object.keys({
        ...t,
        ...e
    }), function(u) {
        const f = l[u] || i
          , d = f(t[u], e[u], u);
        ne.isUndefined(d) && f !== a || (r[u] = d)
    }),
    r
}
const _k = t => {
    const e = Bl({}, t);
    let {data: r, withXSRFToken: n, xsrfHeaderName: i, xsrfCookieName: o, headers: s, auth: a} = e;
    if (e.headers = s = Ni.from(s),
    e.url = pk(Ek(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer),
    a && s.set("Authorization", "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))),
    ne.isFormData(r)) {
        if (Zr.hasStandardBrowserEnv || Zr.hasStandardBrowserWebWorkerEnv)
            s.setContentType(void 0);
        else if (ne.isFunction(r.getHeaders)) {
            const l = r.getHeaders()
              , c = ["content-type", "content-length"];
            Object.entries(l).forEach( ([u,f]) => {
                c.includes(u.toLowerCase()) && s.set(u, f)
            }
            )
        }
    }
    if (Zr.hasStandardBrowserEnv && (n && ne.isFunction(n) && (n = n(e)),
    n || n !== !1 && epe(e.url))) {
        const l = i && o && tpe.read(o);
        l && s.set(i, l)
    }
    return e
}
  , ipe = typeof XMLHttpRequest < "u"
  , ope = ipe && function(t) {
    return new Promise(function(r, n) {
        const i = _k(t);
        let o = i.data;
        const s = Ni.from(i.headers).normalize();
        let {responseType: a, onUploadProgress: l, onDownloadProgress: c} = i, u, f, d, h, x;
        function y() {
            h && h(),
            x && x(),
            i.cancelToken && i.cancelToken.unsubscribe(u),
            i.signal && i.signal.removeEventListener("abort", u)
        }
        let m = new XMLHttpRequest;
        m.open(i.method.toUpperCase(), i.url, !0),
        m.timeout = i.timeout;
        function E() {
            if (!m)
                return;
            const p = Ni.from("getAllResponseHeaders"in m && m.getAllResponseHeaders())
              , _ = {
                data: !a || a === "text" || a === "json" ? m.responseText : m.response,
                status: m.status,
                statusText: m.statusText,
                headers: p,
                config: t,
                request: m
            };
            yk(function(C) {
                r(C),
                y()
            }, function(C) {
                n(C),
                y()
            }, _),
            m = null
        }
        "onloadend"in m ? m.onloadend = E : m.onreadystatechange = function() {
            !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(E)
        }
        ,
        m.onabort = function() {
            m && (n(new Ye("Request aborted",Ye.ECONNABORTED,t,m)),
            m = null)
        }
        ,
        m.onerror = function(v) {
            const _ = v && v.message ? v.message : "Network Error"
              , b = new Ye(_,Ye.ERR_NETWORK,t,m);
            b.event = v || null,
            n(b),
            m = null
        }
        ,
        m.ontimeout = function() {
            let v = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded";
            const _ = i.transitional || gk;
            i.timeoutErrorMessage && (v = i.timeoutErrorMessage),
            n(new Ye(v,_.clarifyTimeoutError ? Ye.ETIMEDOUT : Ye.ECONNABORTED,t,m)),
            m = null
        }
        ,
        o === void 0 && s.setContentType(null),
        "setRequestHeader"in m && ne.forEach(s.toJSON(), function(v, _) {
            m.setRequestHeader(_, v)
        }),
        ne.isUndefined(i.withCredentials) || (m.withCredentials = !!i.withCredentials),
        a && a !== "json" && (m.responseType = i.responseType),
        c && ([d,x] = Gx(c, !0),
        m.addEventListener("progress", d)),
        l && m.upload && ([f,h] = Gx(l),
        m.upload.addEventListener("progress", f),
        m.upload.addEventListener("loadend", h)),
        (i.cancelToken || i.signal) && (u = p => {
            m && (n(!p || p.type ? new Tu(null,t,m) : p),
            m.abort(),
            m = null)
        }
        ,
        i.cancelToken && i.cancelToken.subscribe(u),
        i.signal && (i.signal.aborted ? u() : i.signal.addEventListener("abort", u)));
        const g = Zxe(i.url);
        if (g && Zr.protocols.indexOf(g) === -1) {
            n(new Ye("Unsupported protocol " + g + ":",Ye.ERR_BAD_REQUEST,t));
            return
        }
        m.send(o || null)
    }
    )
}
  , spe = (t, e) => {
    const {length: r} = t = t ? t.filter(Boolean) : [];
    if (e || r) {
        let n = new AbortController, i;
        const o = function(c) {
            if (!i) {
                i = !0,
                a();
                const u = c instanceof Error ? c : this.reason;
                n.abort(u instanceof Ye ? u : new Tu(u instanceof Error ? u.message : u))
            }
        };
        let s = e && setTimeout( () => {
            s = null,
            o(new Ye(`timeout ${e} of ms exceeded`,Ye.ETIMEDOUT))
        }
        , e);
        const a = () => {
            t && (s && clearTimeout(s),
            s = null,
            t.forEach(c => {
                c.unsubscribe ? c.unsubscribe(o) : c.removeEventListener("abort", o)
            }
            ),
            t = null)
        }
        ;
        t.forEach(c => c.addEventListener("abort", o));
        const {signal: l} = n;
        return l.unsubscribe = () => ne.asap(a),
        l
    }
}
  , ape = spe
  , lpe = function*(t, e) {
    let r = t.byteLength;
    if (!e || r < e) {
        yield t;
        return
    }
    let n = 0, i;
    for (; n < r; )
        i = n + e,
        yield t.slice(n, i),
        n = i
}
  , cpe = async function*(t, e) {
    for await(const r of upe(t))
        yield*lpe(r, e)
}
  , upe = async function*(t) {
    if (t[Symbol.asyncIterator]) {
        yield*t;
        return
    }
    const e = t.getReader();
    try {
        for (; ; ) {
            const {done: r, value: n} = await e.read();
            if (r)
                break;
            yield n
        }
    } finally {
        await e.cancel()
    }
}
  , z3 = (t, e, r, n) => {
    const i = cpe(t, e);
    let o = 0, s, a = l => {
        s || (s = !0,
        n && n(l))
    }
    ;
    return new ReadableStream({
        async pull(l) {
            try {
                const {done: c, value: u} = await i.next();
                if (c) {
                    a(),
                    l.close();
                    return
                }
                let f = u.byteLength;
                if (r) {
                    let d = o += f;
                    r(d)
                }
                l.enqueue(new Uint8Array(u))
            } catch (c) {
                throw a(c),
                c
            }
        },
        cancel(l) {
            return a(l),
            i.return()
        }
    },{
        highWaterMark: 2
    })
}
  , j3 = 64 * 1024
  , {isFunction: _h} = ne
  , fpe = ( ({Request: t, Response: e}) => ({
    Request: t,
    Response: e
}))(ne.global)
  , {ReadableStream: W3, TextEncoder: Y3} = ne.global
  , X3 = (t, ...e) => {
    try {
        return !!t(...e)
    } catch {
        return !1
    }
}
  , dpe = t => {
    t = ne.merge.call({
        skipUndefined: !0
    }, fpe, t);
    const {fetch: e, Request: r, Response: n} = t
      , i = e ? _h(e) : typeof fetch == "function"
      , o = _h(r)
      , s = _h(n);
    if (!i)
        return !1;
    const a = i && _h(W3)
      , l = i && (typeof Y3 == "function" ? (x => y => x.encode(y))(new Y3) : async x => new Uint8Array(await new r(x).arrayBuffer()))
      , c = o && a && X3( () => {
        let x = !1;
        const y = new r(Zr.origin,{
            body: new W3,
            method: "POST",
            get duplex() {
                return x = !0,
                "half"
            }
        }).headers.has("Content-Type");
        return x && !y
    }
    )
      , u = s && a && X3( () => ne.isReadableStream(new n("").body))
      , f = {
        stream: u && (x => x.body)
    };
    i && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach(x => {
        !f[x] && (f[x] = (y, m) => {
            let E = y && y[x];
            if (E)
                return E.call(y);
            throw new Ye(`Response type '${x}' is not supported`,Ye.ERR_NOT_SUPPORT,m)
        }
        )
    }
    );
    const d = async x => {
        if (x == null)
            return 0;
        if (ne.isBlob(x))
            return x.size;
        if (ne.isSpecCompliantForm(x))
            return (await new r(Zr.origin,{
                method: "POST",
                body: x
            }).arrayBuffer()).byteLength;
        if (ne.isArrayBufferView(x) || ne.isArrayBuffer(x))
            return x.byteLength;
        if (ne.isURLSearchParams(x) && (x = x + ""),
        ne.isString(x))
            return (await l(x)).byteLength
    }
      , h = async (x, y) => {
        const m = ne.toFiniteNumber(x.getContentLength());
        return m ?? d(y)
    }
    ;
    return async x => {
        let {url: y, method: m, data: E, signal: g, cancelToken: p, timeout: v, onDownloadProgress: _, onUploadProgress: b, responseType: C, headers: B, withCredentials: T="same-origin", fetchOptions: A} = _k(x)
          , w = e || fetch;
        C = C ? (C + "").toLowerCase() : "text";
        let S = ape([g, p && p.toAbortSignal()], v)
          , D = null;
        const F = S && S.unsubscribe && ( () => {
            S.unsubscribe()
        }
        );
        let R;
        try {
            if (b && c && m !== "get" && m !== "head" && (R = await h(B, E)) !== 0) {
                let U = new r(y,{
                    method: "POST",
                    body: E,
                    duplex: "half"
                }), $;
                if (ne.isFormData(E) && ($ = U.headers.get("content-type")) && B.setContentType($),
                U.body) {
                    const [V,W] = G3(R, Gx(H3(b)));
                    E = z3(U.body, j3, V, W)
                }
            }
            ne.isString(T) || (T = T ? "include" : "omit");
            const P = o && "credentials"in r.prototype
              , N = {
                ...A,
                signal: S,
                method: m.toUpperCase(),
                headers: B.normalize().toJSON(),
                body: E,
                duplex: "half",
                credentials: P ? T : void 0
            };
            D = o && new r(y,N);
            let j = await (o ? w(D, A) : w(y, N));
            const K = u && (C === "stream" || C === "response");
            if (u && (_ || K && F)) {
                const U = {};
                ["status", "statusText", "headers"].forEach(H => {
                    U[H] = j[H]
                }
                );
                const $ = ne.toFiniteNumber(j.headers.get("content-length"))
                  , [V,W] = _ && G3($, Gx(H3(_), !0)) || [];
                j = new n(z3(j.body, j3, V, () => {
                    W && W(),
                    F && F()
                }
                ),U)
            }
            C = C || "text";
            let oe = await f[ne.findKey(f, C) || "text"](j, x);
            return !K && F && F(),
            await new Promise( (U, $) => {
                yk(U, $, {
                    data: oe,
                    headers: Ni.from(j.headers),
                    status: j.status,
                    statusText: j.statusText,
                    config: x,
                    request: D
                })
            }
            )
        } catch (P) {
            throw F && F(),
            P && P.name === "TypeError" && /Load failed|fetch/i.test(P.message) ? Object.assign(new Ye("Network Error",Ye.ERR_NETWORK,x,D), {
                cause: P.cause || P
            }) : Ye.from(P, P && P.code, x, D)
        }
    }
}
  , hpe = new Map
  , bk = t => {
    let e = t && t.env || {};
    const {fetch: r, Request: n, Response: i} = e
      , o = [n, i, r];
    let s = o.length, a = s, l, c, u = hpe;
    for (; a--; )
        l = o[a],
        c = u.get(l),
        c === void 0 && u.set(l, c = a ? new Map : dpe(e)),
        u = c;
    return c
}
;
bk();
const Wb = {
    http: Txe,
    xhr: ope,
    fetch: {
        get: bk
    }
};
ne.forEach(Wb, (t, e) => {
    if (t) {
        try {
            Object.defineProperty(t, "name", {
                value: e
            })
        } catch {}
        Object.defineProperty(t, "adapterName", {
            value: e
        })
    }
}
);
const K3 = t => `- ${t}`
  , xpe = t => ne.isFunction(t) || t === null || t === !1;
function ppe(t, e) {
    t = ne.isArray(t) ? t : [t];
    const {length: r} = t;
    let n, i;
    const o = {};
    for (let s = 0; s < r; s++) {
        n = t[s];
        let a;
        if (i = n,
        !xpe(n) && (i = Wb[(a = String(n)).toLowerCase()],
        i === void 0))
            throw new Ye(`Unknown adapter '${a}'`);
        if (i && (ne.isFunction(i) || (i = i.get(e))))
            break;
        o[a || "#" + s] = i
    }
    if (!i) {
        const s = Object.entries(o).map( ([l,c]) => `adapter ${l} ` + (c === !1 ? "is not supported by the environment" : "is not available in the build"));
        let a = r ? s.length > 1 ? `since :
` + s.map(K3).join(`
`) : " " + K3(s[0]) : "as no adapter specified";
        throw new Ye("There is no suitable adapter to dispatch the request " + a,"ERR_NOT_SUPPORT")
    }
    return i
}
const Ck = {
    getAdapter: ppe,
    adapters: Wb
};
function fm(t) {
    if (t.cancelToken && t.cancelToken.throwIfRequested(),
    t.signal && t.signal.aborted)
        throw new Tu(null,t)
}
function q3(t) {
    return fm(t),
    t.headers = Ni.from(t.headers),
    t.data = um.call(t, t.transformRequest),
    ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1),
    Ck.getAdapter(t.adapter || jb.adapter, t)(t).then(function(n) {
        return fm(t),
        n.data = um.call(t, t.transformResponse, n),
        n.headers = Ni.from(n.headers),
        n
    }, function(n) {
        return vk(n) || (fm(t),
        n && n.response && (n.response.data = um.call(t, t.transformResponse, n.response),
        n.response.headers = Ni.from(n.response.headers))),
        Promise.reject(n)
    })
}
const Ak = "1.13.2"
  , C1 = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach( (t, e) => {
    C1[t] = function(n) {
        return typeof n === t || "a" + (e < 1 ? "n " : " ") + t
    }
}
);
const Z3 = {};
C1.transitional = function(e, r, n) {
    function i(o, s) {
        return "[Axios v" + Ak + "] Transitional option '" + o + "'" + s + (n ? ". " + n : "")
    }
    return (o, s, a) => {
        if (e === !1)
            throw new Ye(i(s, " has been removed" + (r ? " in " + r : "")),Ye.ERR_DEPRECATED);
        return r && !Z3[s] && (Z3[s] = !0,
        console.warn(i(s, " has been deprecated since v" + r + " and will be removed in the near future"))),
        e ? e(o, s, a) : !0
    }
}
;
C1.spelling = function(e) {
    return (r, n) => (console.warn(`${n} is likely a misspelling of ${e}`),
    !0)
}
;
function gpe(t, e, r) {
    if (typeof t != "object")
        throw new Ye("options must be an object",Ye.ERR_BAD_OPTION_VALUE);
    const n = Object.keys(t);
    let i = n.length;
    for (; i-- > 0; ) {
        const o = n[i]
          , s = e[o];
        if (s) {
            const a = t[o]
              , l = a === void 0 || s(a, o, t);
            if (l !== !0)
                throw new Ye("option " + o + " must be " + l,Ye.ERR_BAD_OPTION_VALUE);
            continue
        }
        if (r !== !0)
            throw new Ye("Unknown option " + o,Ye.ERR_BAD_OPTION)
    }
}
const Qh = {
    assertOptions: gpe,
    validators: C1
}
  , qi = Qh.validators;
class Hx {
    constructor(e) {
        this.defaults = e || {},
        this.interceptors = {
            request: new $3,
            response: new $3
        }
    }
    async request(e, r) {
        try {
            return await this._request(e, r)
        } catch (n) {
            if (n instanceof Error) {
                let i = {};
                Error.captureStackTrace ? Error.captureStackTrace(i) : i = new Error;
                const o = i.stack ? i.stack.replace(/^.+\n/, "") : "";
                try {
                    n.stack ? o && !String(n.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (n.stack += `
` + o) : n.stack = o
                } catch {}
            }
            throw n
        }
    }
    _request(e, r) {
        typeof e == "string" ? (r = r || {},
        r.url = e) : r = e || {},
        r = Bl(this.defaults, r);
        const {transitional: n, paramsSerializer: i, headers: o} = r;
        n !== void 0 && Qh.assertOptions(n, {
            silentJSONParsing: qi.transitional(qi.boolean),
            forcedJSONParsing: qi.transitional(qi.boolean),
            clarifyTimeoutError: qi.transitional(qi.boolean)
        }, !1),
        i != null && (ne.isFunction(i) ? r.paramsSerializer = {
            serialize: i
        } : Qh.assertOptions(i, {
            encode: qi.function,
            serialize: qi.function
        }, !0)),
        r.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? r.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : r.allowAbsoluteUrls = !0),
        Qh.assertOptions(r, {
            baseUrl: qi.spelling("baseURL"),
            withXsrfToken: qi.spelling("withXSRFToken")
        }, !0),
        r.method = (r.method || this.defaults.method || "get").toLowerCase();
        let s = o && ne.merge(o.common, o[r.method]);
        o && ne.forEach(["delete", "get", "head", "post", "put", "patch", "common"], x => {
            delete o[x]
        }
        ),
        r.headers = Ni.concat(s, o);
        const a = [];
        let l = !0;
        this.interceptors.request.forEach(function(y) {
            typeof y.runWhen == "function" && y.runWhen(r) === !1 || (l = l && y.synchronous,
            a.unshift(y.fulfilled, y.rejected))
        });
        const c = [];
        this.interceptors.response.forEach(function(y) {
            c.push(y.fulfilled, y.rejected)
        });
        let u, f = 0, d;
        if (!l) {
            const x = [q3.bind(this), void 0];
            for (x.unshift(...a),
            x.push(...c),
            d = x.length,
            u = Promise.resolve(r); f < d; )
                u = u.then(x[f++], x[f++]);
            return u
        }
        d = a.length;
        let h = r;
        for (; f < d; ) {
            const x = a[f++]
              , y = a[f++];
            try {
                h = x(h)
            } catch (m) {
                y.call(this, m);
                break
            }
        }
        try {
            u = q3.call(this, h)
        } catch (x) {
            return Promise.reject(x)
        }
        for (f = 0,
        d = c.length; f < d; )
            u = u.then(c[f++], c[f++]);
        return u
    }
    getUri(e) {
        e = Bl(this.defaults, e);
        const r = Ek(e.baseURL, e.url, e.allowAbsoluteUrls);
        return pk(r, e.params, e.paramsSerializer)
    }
}
ne.forEach(["delete", "get", "head", "options"], function(e) {
    Hx.prototype[e] = function(r, n) {
        return this.request(Bl(n || {}, {
            method: e,
            url: r,
            data: (n || {}).data
        }))
    }
});
ne.forEach(["post", "put", "patch"], function(e) {
    function r(n) {
        return function(o, s, a) {
            return this.request(Bl(a || {}, {
                method: e,
                headers: n ? {
                    "Content-Type": "multipart/form-data"
                } : {},
                url: o,
                data: s
            }))
        }
    }
    Hx.prototype[e] = r(),
    Hx.prototype[e + "Form"] = r(!0)
});
const ex = Hx;
class Yb {
    constructor(e) {
        if (typeof e != "function")
            throw new TypeError("executor must be a function.");
        let r;
        this.promise = new Promise(function(o) {
            r = o
        }
        );
        const n = this;
        this.promise.then(i => {
            if (!n._listeners)
                return;
            let o = n._listeners.length;
            for (; o-- > 0; )
                n._listeners[o](i);
            n._listeners = null
        }
        ),
        this.promise.then = i => {
            let o;
            const s = new Promise(a => {
                n.subscribe(a),
                o = a
            }
            ).then(i);
            return s.cancel = function() {
                n.unsubscribe(o)
            }
            ,
            s
        }
        ,
        e(function(o, s, a) {
            n.reason || (n.reason = new Tu(o,s,a),
            r(n.reason))
        })
    }
    throwIfRequested() {
        if (this.reason)
            throw this.reason
    }
    subscribe(e) {
        if (this.reason) {
            e(this.reason);
            return
        }
        this._listeners ? this._listeners.push(e) : this._listeners = [e]
    }
    unsubscribe(e) {
        if (!this._listeners)
            return;
        const r = this._listeners.indexOf(e);
        r !== -1 && this._listeners.splice(r, 1)
    }
    toAbortSignal() {
        const e = new AbortController
          , r = n => {
            e.abort(n)
        }
        ;
        return this.subscribe(r),
        e.signal.unsubscribe = () => this.unsubscribe(r),
        e.signal
    }
    static source() {
        let e;
        return {
            token: new Yb(function(i) {
                e = i
            }
            ),
            cancel: e
        }
    }
}
const mpe = Yb;
function vpe(t) {
    return function(r) {
        return t.apply(null, r)
    }
}
function ype(t) {
    return ne.isObject(t) && t.isAxiosError === !0
}
const bE = {
    Continue: 100,
    SwitchingProtocols: 101,
    Processing: 102,
    EarlyHints: 103,
    Ok: 200,
    Created: 201,
    Accepted: 202,
    NonAuthoritativeInformation: 203,
    NoContent: 204,
    ResetContent: 205,
    PartialContent: 206,
    MultiStatus: 207,
    AlreadyReported: 208,
    ImUsed: 226,
    MultipleChoices: 300,
    MovedPermanently: 301,
    Found: 302,
    SeeOther: 303,
    NotModified: 304,
    UseProxy: 305,
    Unused: 306,
    TemporaryRedirect: 307,
    PermanentRedirect: 308,
    BadRequest: 400,
    Unauthorized: 401,
    PaymentRequired: 402,
    Forbidden: 403,
    NotFound: 404,
    MethodNotAllowed: 405,
    NotAcceptable: 406,
    ProxyAuthenticationRequired: 407,
    RequestTimeout: 408,
    Conflict: 409,
    Gone: 410,
    LengthRequired: 411,
    PreconditionFailed: 412,
    PayloadTooLarge: 413,
    UriTooLong: 414,
    UnsupportedMediaType: 415,
    RangeNotSatisfiable: 416,
    ExpectationFailed: 417,
    ImATeapot: 418,
    MisdirectedRequest: 421,
    UnprocessableEntity: 422,
    Locked: 423,
    FailedDependency: 424,
    TooEarly: 425,
    UpgradeRequired: 426,
    PreconditionRequired: 428,
    TooManyRequests: 429,
    RequestHeaderFieldsTooLarge: 431,
    UnavailableForLegalReasons: 451,
    InternalServerError: 500,
    NotImplemented: 501,
    BadGateway: 502,
    ServiceUnavailable: 503,
    GatewayTimeout: 504,
    HttpVersionNotSupported: 505,
    VariantAlsoNegotiates: 506,
    InsufficientStorage: 507,
    LoopDetected: 508,
    NotExtended: 510,
    NetworkAuthenticationRequired: 511,
    WebServerIsDown: 521,
    ConnectionTimedOut: 522,
    OriginIsUnreachable: 523,
    TimeoutOccurred: 524,
    SslHandshakeFailed: 525,
    InvalidSslCertificate: 526
};
Object.entries(bE).forEach( ([t,e]) => {
    bE[e] = t
}
);
const Epe = bE;
function wk(t) {
    const e = new ex(t)
      , r = nk(ex.prototype.request, e);
    return ne.extend(r, ex.prototype, e, {
        allOwnKeys: !0
    }),
    ne.extend(r, e, null, {
        allOwnKeys: !0
    }),
    r.create = function(i) {
        return wk(Bl(t, i))
    }
    ,
    r
}
const pr = wk(jb);
pr.Axios = ex;
pr.CanceledError = Tu;
pr.CancelToken = mpe;
pr.isCancel = vk;
pr.VERSION = Ak;
pr.toFormData = _1;
pr.AxiosError = Ye;
pr.Cancel = pr.CanceledError;
pr.all = function(e) {
    return Promise.all(e)
}
;
pr.spread = vpe;
pr.isAxiosError = ype;
pr.mergeConfig = Bl;
pr.AxiosHeaders = Ni;
pr.formToJSON = t => mk(ne.isHTMLForm(t) ? new FormData(t) : t);
pr.getAdapter = Ck.getAdapter;
pr.HttpStatusCode = Epe;
pr.default = pr;
const _6e = pr;
var Bk = {
    exports: {}
};
(function(t, e) {
    (function(r, n) {
        t.exports = n()
    }
    )(er, function() {
        return function(r, n, i) {
            r = r || {};
            var o = n.prototype
              , s = {
                future: "in %s",
                past: "%s ago",
                s: "a few seconds",
                m: "a minute",
                mm: "%d minutes",
                h: "an hour",
                hh: "%d hours",
                d: "a day",
                dd: "%d days",
                M: "a month",
                MM: "%d months",
                y: "a year",
                yy: "%d years"
            };
            function a(c, u, f, d) {
                return o.fromToBase(c, u, f, d)
            }
            i.en.relativeTime = s,
            o.fromToBase = function(c, u, f, d, h) {
                for (var x, y, m, E = f.$locale().relativeTime || s, g = r.thresholds || [{
                    l: "s",
                    r: 44,
                    d: "second"
                }, {
                    l: "m",
                    r: 89
                }, {
                    l: "mm",
                    r: 44,
                    d: "minute"
                }, {
                    l: "h",
                    r: 89
                }, {
                    l: "hh",
                    r: 21,
                    d: "hour"
                }, {
                    l: "d",
                    r: 35
                }, {
                    l: "dd",
                    r: 25,
                    d: "day"
                }, {
                    l: "M",
                    r: 45
                }, {
                    l: "MM",
                    r: 10,
                    d: "month"
                }, {
                    l: "y",
                    r: 17
                }, {
                    l: "yy",
                    d: "year"
                }], p = g.length, v = 0; v < p; v += 1) {
                    var _ = g[v];
                    _.d && (x = d ? i(c).diff(f, _.d, !0) : f.diff(c, _.d, !0));
                    var b = (r.rounding || Math.round)(Math.abs(x));
                    if (m = x > 0,
                    b <= _.r || !_.r) {
                        b <= 1 && v > 0 && (_ = g[v - 1]);
                        var C = E[_.l];
                        h && (b = h("" + b)),
                        y = typeof C == "string" ? C.replace("%d", b) : C(b, u, _.l, m);
                        break
                    }
                }
                if (u)
                    return y;
                var B = m ? E.future : E.past;
                return typeof B == "function" ? B(y) : B.replace("%s", y)
            }
            ,
            o.to = function(c, u) {
                return a(c, u, this, !0)
            }
            ,
            o.from = function(c, u) {
                return a(c, u, this)
            }
            ;
            var l = function(c) {
                return c.$u ? i.utc() : i()
            };
            o.toNow = function(c) {
                return this.to(l(this), c)
            }
            ,
            o.fromNow = function(c) {
                return this.from(l(this), c)
            }
        }
    })
}
)(Bk);
var _pe = Bk.exports;
const b6e = Gi(_pe);
var bpe = {
    exports: {}
};
(function(t, e) {
    (function(r, n) {
        t.exports = n(_2)
    }
    )(er, function(r) {
        function n(s) {
            return s && typeof s == "object" && "default"in s ? s : {
                default: s
            }
        }
        var i = n(r)
          , o = {
            name: "zh-cn",
            weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
            weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
            weekdaysMin: "日_一_二_三_四_五_六".split("_"),
            months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
            monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
            ordinal: function(s, a) {
                return a === "W" ? s + "周" : s + "日"
            },
            weekStart: 1,
            yearStart: 4,
            formats: {
                LT: "HH:mm",
                LTS: "HH:mm:ss",
                L: "YYYY/MM/DD",
                LL: "YYYY年M月D日",
                LLL: "YYYY年M月D日Ah点mm分",
                LLLL: "YYYY年M月D日ddddAh点mm分",
                l: "YYYY/M/D",
                ll: "YYYY年M月D日",
                lll: "YYYY年M月D日 HH:mm",
                llll: "YYYY年M月D日dddd HH:mm"
            },
            relativeTime: {
                future: "%s内",
                past: "%s前",
                s: "几秒",
                m: "1 分钟",
                mm: "%d 分钟",
                h: "1 小时",
                hh: "%d 小时",
                d: "1 天",
                dd: "%d 天",
                M: "1 个月",
                MM: "%d 个月",
                y: "1 年",
                yy: "%d 年"
            },
            meridiem: function(s, a) {
                var l = 100 * s + a;
                return l < 600 ? "凌晨" : l < 900 ? "早上" : l < 1100 ? "上午" : l < 1300 ? "中午" : l < 1800 ? "下午" : "晚上"
            }
        };
        return i.default.locale(o, null, !0),
        o
    })
}
)(bpe);
var Cpe = {
    exports: {}
};
(function(t, e) {
    (function(r, n) {
        t.exports = n(_2)
    }
    )(er, function(r) {
        function n(s) {
            return s && typeof s == "object" && "default"in s ? s : {
                default: s
            }
        }
        var i = n(r)
          , o = {
            name: "zh-tw",
            weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
            weekdaysShort: "週日_週一_週二_週三_週四_週五_週六".split("_"),
            weekdaysMin: "日_一_二_三_四_五_六".split("_"),
            months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
            monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
            ordinal: function(s, a) {
                return a === "W" ? s + "週" : s + "日"
            },
            formats: {
                LT: "HH:mm",
                LTS: "HH:mm:ss",
                L: "YYYY/MM/DD",
                LL: "YYYY年M月D日",
                LLL: "YYYY年M月D日 HH:mm",
                LLLL: "YYYY年M月D日dddd HH:mm",
                l: "YYYY/M/D",
                ll: "YYYY年M月D日",
                lll: "YYYY年M月D日 HH:mm",
                llll: "YYYY年M月D日dddd HH:mm"
            },
            relativeTime: {
                future: "%s內",
                past: "%s前",
                s: "幾秒",
                m: "1 分鐘",
                mm: "%d 分鐘",
                h: "1 小時",
                hh: "%d 小時",
                d: "1 天",
                dd: "%d 天",
                M: "1 個月",
                MM: "%d 個月",
                y: "1 年",
                yy: "%d 年"
            },
            meridiem: function(s, a) {
                var l = 100 * s + a;
                return l < 600 ? "凌晨" : l < 900 ? "早上" : l < 1100 ? "上午" : l < 1300 ? "中午" : l < 1800 ? "下午" : "晚上"
            }
        };
        return i.default.locale(o, null, !0),
        o
    })
}
)(Cpe);
var Ape = {
    exports: {}
};
(function(t, e) {
    (function(r, n) {
        t.exports = n()
    }
    )(er, function() {
        return {
            name: "en",
            weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
            months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
            ordinal: function(r) {
                var n = ["th", "st", "nd", "rd"]
                  , i = r % 100;
                return "[" + r + (n[(i - 20) % 10] || n[i] || n[0]) + "]"
            }
        }
    })
}
)(Ape);
const Sk = new Proxy({},{
    get(t, e) {
        throw new Error(`Module "" has been externalized for browser compatibility. Cannot access ".${e}" in client code.  See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`)
    }
})
  , wpe = Object.freeze(Object.defineProperty({
    __proto__: null,
    default: Sk
}, Symbol.toStringTag, {
    value: "Module"
}));
var CE = null;
function Bpe(t) {
    try {
        return crypto.getRandomValues(new Uint8Array(t))
    } catch {}
    try {
        return Sk.randomBytes(t)
    } catch {}
    if (!CE)
        throw Error("Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative");
    return CE(t)
}
function Spe(t) {
    CE = t
}
function Xb(t, e) {
    if (t = t || Kb,
    typeof t != "number")
        throw Error("Illegal arguments: " + typeof t + ", " + typeof e);
    t < 4 ? t = 4 : t > 31 && (t = 31);
    var r = [];
    return r.push("$2b$"),
    t < 10 && r.push("0"),
    r.push(t.toString()),
    r.push("$"),
    r.push(Vx(Bpe(wf), wf)),
    r.join("")
}
function Tk(t, e, r) {
    if (typeof e == "function" && (r = e,
    e = void 0),
    typeof t == "function" && (r = t,
    t = void 0),
    typeof t > "u")
        t = Kb;
    else if (typeof t != "number")
        throw Error("illegal arguments: " + typeof t);
    function n(i) {
        ki(function() {
            try {
                i(null, Xb(t))
            } catch (o) {
                i(o)
            }
        })
    }
    if (r) {
        if (typeof r != "function")
            throw Error("Illegal callback: " + typeof r);
        n(r)
    } else
        return new Promise(function(i, o) {
            n(function(s, a) {
                if (s) {
                    o(s);
                    return
                }
                i(a)
            })
        }
        )
}
function Dk(t, e) {
    if (typeof e > "u" && (e = Kb),
    typeof e == "number" && (e = Xb(e)),
    typeof t != "string" || typeof e != "string")
        throw Error("Illegal arguments: " + typeof t + ", " + typeof e);
    return AE(t, e)
}
function Fk(t, e, r, n) {
    function i(o) {
        typeof t == "string" && typeof e == "number" ? Tk(e, function(s, a) {
            AE(t, a, o, n)
        }) : typeof t == "string" && typeof e == "string" ? AE(t, e, o, n) : ki(o.bind(this, Error("Illegal arguments: " + typeof t + ", " + typeof e)))
    }
    if (r) {
        if (typeof r != "function")
            throw Error("Illegal callback: " + typeof r);
        i(r)
    } else
        return new Promise(function(o, s) {
            i(function(a, l) {
                if (a) {
                    s(a);
                    return
                }
                o(l)
            })
        }
        )
}
function Pk(t, e) {
    for (var r = t.length ^ e.length, n = 0; n < t.length; ++n)
        r |= t.charCodeAt(n) ^ e.charCodeAt(n);
    return r === 0
}
function Tpe(t, e) {
    if (typeof t != "string" || typeof e != "string")
        throw Error("Illegal arguments: " + typeof t + ", " + typeof e);
    return e.length !== 60 ? !1 : Pk(Dk(t, e.substring(0, e.length - 31)), e)
}
function Dpe(t, e, r, n) {
    function i(o) {
        if (typeof t != "string" || typeof e != "string") {
            ki(o.bind(this, Error("Illegal arguments: " + typeof t + ", " + typeof e)));
            return
        }
        if (e.length !== 60) {
            ki(o.bind(this, null, !1));
            return
        }
        Fk(t, e.substring(0, 29), function(s, a) {
            s ? o(s) : o(null, Pk(a, e))
        }, n)
    }
    if (r) {
        if (typeof r != "function")
            throw Error("Illegal callback: " + typeof r);
        i(r)
    } else
        return new Promise(function(o, s) {
            i(function(a, l) {
                if (a) {
                    s(a);
                    return
                }
                o(l)
            })
        }
        )
}
function Fpe(t) {
    if (typeof t != "string")
        throw Error("Illegal arguments: " + typeof t);
    return parseInt(t.split("$")[2], 10)
}
function Ppe(t) {
    if (typeof t != "string")
        throw Error("Illegal arguments: " + typeof t);
    if (t.length !== 60)
        throw Error("Illegal hash length: " + t.length + " != 60");
    return t.substring(0, 29)
}
function Ipe(t) {
    if (typeof t != "string")
        throw Error("Illegal arguments: " + typeof t);
    return Ik(t) > 72
}
var ki = typeof setImmediate == "function" ? setImmediate : typeof scheduler == "object" && typeof scheduler.postTask == "function" ? scheduler.postTask.bind(scheduler) : setTimeout;
function Ik(t) {
    for (var e = 0, r = 0, n = 0; n < t.length; ++n)
        r = t.charCodeAt(n),
        r < 128 ? e += 1 : r < 2048 ? e += 2 : (r & 64512) === 55296 && (t.charCodeAt(n + 1) & 64512) === 56320 ? (++n,
        e += 4) : e += 3;
    return e
}
function Ope(t) {
    for (var e = 0, r, n, i = new Array(Ik(t)), o = 0, s = t.length; o < s; ++o)
        r = t.charCodeAt(o),
        r < 128 ? i[e++] = r : r < 2048 ? (i[e++] = r >> 6 | 192,
        i[e++] = r & 63 | 128) : (r & 64512) === 55296 && ((n = t.charCodeAt(o + 1)) & 64512) === 56320 ? (r = 65536 + ((r & 1023) << 10) + (n & 1023),
        ++o,
        i[e++] = r >> 18 | 240,
        i[e++] = r >> 12 & 63 | 128,
        i[e++] = r >> 6 & 63 | 128,
        i[e++] = r & 63 | 128) : (i[e++] = r >> 12 | 224,
        i[e++] = r >> 6 & 63 | 128,
        i[e++] = r & 63 | 128);
    return i
}
var lc = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split("")
  , Ds = [-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, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, -1, -1, -1, -1, -1, -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, -1, -1, -1, -1, -1];
function Vx(t, e) {
    var r = 0, n = [], i, o;
    if (e <= 0 || e > t.length)
        throw Error("Illegal len: " + e);
    for (; r < e; ) {
        if (i = t[r++] & 255,
        n.push(lc[i >> 2 & 63]),
        i = (i & 3) << 4,
        r >= e) {
            n.push(lc[i & 63]);
            break
        }
        if (o = t[r++] & 255,
        i |= o >> 4 & 15,
        n.push(lc[i & 63]),
        i = (o & 15) << 2,
        r >= e) {
            n.push(lc[i & 63]);
            break
        }
        o = t[r++] & 255,
        i |= o >> 6 & 3,
        n.push(lc[i & 63]),
        n.push(lc[o & 63])
    }
    return n.join("")
}
function Ok(t, e) {
    var r = 0, n = t.length, i = 0, o = [], s, a, l, c, u, f;
    if (e <= 0)
        throw Error("Illegal len: " + e);
    for (; r < n - 1 && i < e && (f = t.charCodeAt(r++),
    s = f < Ds.length ? Ds[f] : -1,
    f = t.charCodeAt(r++),
    a = f < Ds.length ? Ds[f] : -1,
    !(s == -1 || a == -1 || (u = s << 2 >>> 0,
    u |= (a & 48) >> 4,
    o.push(String.fromCharCode(u)),
    ++i >= e || r >= n) || (f = t.charCodeAt(r++),
    l = f < Ds.length ? Ds[f] : -1,
    l == -1) || (u = (a & 15) << 4 >>> 0,
    u |= (l & 60) >> 2,
    o.push(String.fromCharCode(u)),
    ++i >= e || r >= n))); )
        f = t.charCodeAt(r++),
        c = f < Ds.length ? Ds[f] : -1,
        u = (l & 3) << 6 >>> 0,
        u |= c,
        o.push(String.fromCharCode(u)),
        ++i;
    var d = [];
    for (r = 0; r < i; r++)
        d.push(o[r].charCodeAt(0));
    return d
}
var wf = 16
  , Kb = 10
  , kpe = 16
  , Rpe = 100
  , J3 = [608135816, 2242054355, 320440878, 57701188, 2752067618, 698298832, 137296536, 3964562569, 1160258022, 953160567, 3193202383, 887688300, 3232508343, 3380367581, 1065670069, 3041331479, 2450970073, 2306472731]
  , Q3 = [3509652390, 2564797868, 805139163, 3491422135, 3101798381, 1780907670, 3128725573, 4046225305, 614570311, 3012652279, 134345442, 2240740374, 1667834072, 1901547113, 2757295779, 4103290238, 227898511, 1921955416, 1904987480, 2182433518, 2069144605, 3260701109, 2620446009, 720527379, 3318853667, 677414384, 3393288472, 3101374703, 2390351024, 1614419982, 1822297739, 2954791486, 3608508353, 3174124327, 2024746970, 1432378464, 3864339955, 2857741204, 1464375394, 1676153920, 1439316330, 715854006, 3033291828, 289532110, 2706671279, 2087905683, 3018724369, 1668267050, 732546397, 1947742710, 3462151702, 2609353502, 2950085171, 1814351708, 2050118529, 680887927, 999245976, 1800124847, 3300911131, 1713906067, 1641548236, 4213287313, 1216130144, 1575780402, 4018429277, 3917837745, 3693486850, 3949271944, 596196993, 3549867205, 258830323, 2213823033, 772490370, 2760122372, 1774776394, 2652871518, 566650946, 4142492826, 1728879713, 2882767088, 1783734482, 3629395816, 2517608232, 2874225571, 1861159788, 326777828, 3124490320, 2130389656, 2716951837, 967770486, 1724537150, 2185432712, 2364442137, 1164943284, 2105845187, 998989502, 3765401048, 2244026483, 1075463327, 1455516326, 1322494562, 910128902, 469688178, 1117454909, 936433444, 3490320968, 3675253459, 1240580251, 122909385, 2157517691, 634681816, 4142456567, 3825094682, 3061402683, 2540495037, 79693498, 3249098678, 1084186820, 1583128258, 426386531, 1761308591, 1047286709, 322548459, 995290223, 1845252383, 2603652396, 3431023940, 2942221577, 3202600964, 3727903485, 1712269319, 422464435, 3234572375, 1170764815, 3523960633, 3117677531, 1434042557, 442511882, 3600875718, 1076654713, 1738483198, 4213154764, 2393238008, 3677496056, 1014306527, 4251020053, 793779912, 2902807211, 842905082, 4246964064, 1395751752, 1040244610, 2656851899, 3396308128, 445077038, 3742853595, 3577915638, 679411651, 2892444358, 2354009459, 1767581616, 3150600392, 3791627101, 3102740896, 284835224, 4246832056, 1258075500, 768725851, 2589189241, 3069724005, 3532540348, 1274779536, 3789419226, 2764799539, 1660621633, 3471099624, 4011903706, 913787905, 3497959166, 737222580, 2514213453, 2928710040, 3937242737, 1804850592, 3499020752, 2949064160, 2386320175, 2390070455, 2415321851, 4061277028, 2290661394, 2416832540, 1336762016, 1754252060, 3520065937, 3014181293, 791618072, 3188594551, 3933548030, 2332172193, 3852520463, 3043980520, 413987798, 3465142937, 3030929376, 4245938359, 2093235073, 3534596313, 375366246, 2157278981, 2479649556, 555357303, 3870105701, 2008414854, 3344188149, 4221384143, 3956125452, 2067696032, 3594591187, 2921233993, 2428461, 544322398, 577241275, 1471733935, 610547355, 4027169054, 1432588573, 1507829418, 2025931657, 3646575487, 545086370, 48609733, 2200306550, 1653985193, 298326376, 1316178497, 3007786442, 2064951626, 458293330, 2589141269, 3591329599, 3164325604, 727753846, 2179363840, 146436021, 1461446943, 4069977195, 705550613, 3059967265, 3887724982, 4281599278, 3313849956, 1404054877, 2845806497, 146425753, 1854211946, 1266315497, 3048417604, 3681880366, 3289982499, 290971e4, 1235738493, 2632868024, 2414719590, 3970600049, 1771706367, 1449415276, 3266420449, 422970021, 1963543593, 2690192192, 3826793022, 1062508698, 1531092325, 1804592342, 2583117782, 2714934279, 4024971509, 1294809318, 4028980673, 1289560198, 2221992742, 1669523910, 35572830, 157838143, 1052438473, 1016535060, 1802137761, 1753167236, 1386275462, 3080475397, 2857371447, 1040679964, 2145300060, 2390574316, 1461121720, 2956646967, 4031777805, 4028374788, 33600511, 2920084762, 1018524850, 629373528, 3691585981, 3515945977, 2091462646, 2486323059, 586499841, 988145025, 935516892, 3367335476, 2599673255, 2839830854, 265290510, 3972581182, 2759138881, 3795373465, 1005194799, 847297441, 406762289, 1314163512, 1332590856, 1866599683, 4127851711, 750260880, 613907577, 1450815602, 3165620655, 3734664991, 3650291728, 3012275730, 3704569646, 1427272223, 778793252, 1343938022, 2676280711, 2052605720, 1946737175, 3164576444, 3914038668, 3967478842, 3682934266, 1661551462, 3294938066, 4011595847, 840292616, 3712170807, 616741398, 312560963, 711312465, 1351876610, 322626781, 1910503582, 271666773, 2175563734, 1594956187, 70604529, 3617834859, 1007753275, 1495573769, 4069517037, 2549218298, 2663038764, 504708206, 2263041392, 3941167025, 2249088522, 1514023603, 1998579484, 1312622330, 694541497, 2582060303, 2151582166, 1382467621, 776784248, 2618340202, 3323268794, 2497899128, 2784771155, 503983604, 4076293799, 907881277, 423175695, 432175456, 1378068232, 4145222326, 3954048622, 3938656102, 3820766613, 2793130115, 2977904593, 26017576, 3274890735, 3194772133, 1700274565, 1756076034, 4006520079, 3677328699, 720338349, 1533947780, 354530856, 688349552, 3973924725, 1637815568, 332179504, 3949051286, 53804574, 2852348879, 3044236432, 1282449977, 3583942155, 3416972820, 4006381244, 1617046695, 2628476075, 3002303598, 1686838959, 431878346, 2686675385, 1700445008, 1080580658, 1009431731, 832498133, 3223435511, 2605976345, 2271191193, 2516031870, 1648197032, 4164389018, 2548247927, 300782431, 375919233, 238389289, 3353747414, 2531188641, 2019080857, 1475708069, 455242339, 2609103871, 448939670, 3451063019, 1395535956, 2413381860, 1841049896, 1491858159, 885456874, 4264095073, 4001119347, 1565136089, 3898914787, 1108368660, 540939232, 1173283510, 2745871338, 3681308437, 4207628240, 3343053890, 4016749493, 1699691293, 1103962373, 3625875870, 2256883143, 3830138730, 1031889488, 3479347698, 1535977030, 4236805024, 3251091107, 2132092099, 1774941330, 1199868427, 1452454533, 157007616, 2904115357, 342012276, 595725824, 1480756522, 206960106, 497939518, 591360097, 863170706, 2375253569, 3596610801, 1814182875, 2094937945, 3421402208, 1082520231, 3463918190, 2785509508, 435703966, 3908032597, 1641649973, 2842273706, 3305899714, 1510255612, 2148256476, 2655287854, 3276092548, 4258621189, 236887753, 3681803219, 274041037, 1734335097, 3815195456, 3317970021, 1899903192, 1026095262, 4050517792, 356393447, 2410691914, 3873677099, 3682840055, 3913112168, 2491498743, 4132185628, 2489919796, 1091903735, 1979897079, 3170134830, 3567386728, 3557303409, 857797738, 1136121015, 1342202287, 507115054, 2535736646, 337727348, 3213592640, 1301675037, 2528481711, 1895095763, 1721773893, 3216771564, 62756741, 2142006736, 835421444, 2531993523, 1442658625, 3659876326, 2882144922, 676362277, 1392781812, 170690266, 3921047035, 1759253602, 3611846912, 1745797284, 664899054, 1329594018, 3901205900, 3045908486, 2062866102, 2865634940, 3543621612, 3464012697, 1080764994, 553557557, 3656615353, 3996768171, 991055499, 499776247, 1265440854, 648242737, 3940784050, 980351604, 3713745714, 1749149687, 3396870395, 4211799374, 3640570775, 1161844396, 3125318951, 1431517754, 545492359, 4268468663, 3499529547, 1437099964, 2702547544, 3433638243, 2581715763, 2787789398, 1060185593, 1593081372, 2418618748, 4260947970, 69676912, 2159744348, 86519011, 2512459080, 3838209314, 1220612927, 3339683548, 133810670, 1090789135, 1078426020, 1569222167, 845107691, 3583754449, 4072456591, 1091646820, 628848692, 1613405280, 3757631651, 526609435, 236106946, 48312990, 2942717905, 3402727701, 1797494240, 859738849, 992217954, 4005476642, 2243076622, 3870952857, 3732016268, 765654824, 3490871365, 2511836413, 1685915746, 3888969200, 1414112111, 2273134842, 3281911079, 4080962846, 172450625, 2569994100, 980381355, 4109958455, 2819808352, 2716589560, 2568741196, 3681446669, 3329971472, 1835478071, 660984891, 3704678404, 4045999559, 3422617507, 3040415634, 1762651403, 1719377915, 3470491036, 2693910283, 3642056355, 3138596744, 1364962596, 2073328063, 1983633131, 926494387, 3423689081, 2150032023, 4096667949, 1749200295, 3328846651, 309677260, 2016342300, 1779581495, 3079819751, 111262694, 1274766160, 443224088, 298511866, 1025883608, 3806446537, 1145181785, 168956806, 3641502830, 3584813610, 1689216846, 3666258015, 3200248200, 1692713982, 2646376535, 4042768518, 1618508792, 1610833997, 3523052358, 4130873264, 2001055236, 3610705100, 2202168115, 4028541809, 2961195399, 1006657119, 2006996926, 3186142756, 1430667929, 3210227297, 1314452623, 4074634658, 4101304120, 2273951170, 1399257539, 3367210612, 3027628629, 1190975929, 2062231137, 2333990788, 2221543033, 2438960610, 1181637006, 548689776, 2362791313, 3372408396, 3104550113, 3145860560, 296247880, 1970579870, 3078560182, 3769228297, 1714227617, 3291629107, 3898220290, 166772364, 1251581989, 493813264, 448347421, 195405023, 2709975567, 677966185, 3703036547, 1463355134, 2715995803, 1338867538, 1343315457, 2802222074, 2684532164, 233230375, 2599980071, 2000651841, 3277868038, 1638401717, 4028070440, 3237316320, 6314154, 819756386, 300326615, 590932579, 1405279636, 3267499572, 3150704214, 2428286686, 3959192993, 3461946742, 1862657033, 1266418056, 963775037, 2089974820, 2263052895, 1917689273, 448879540, 3550394620, 3981727096, 150775221, 3627908307, 1303187396, 508620638, 2975983352, 2726630617, 1817252668, 1876281319, 1457606340, 908771278, 3720792119, 3617206836, 2455994898, 1729034894, 1080033504, 976866871, 3556439503, 2881648439, 1522871579, 1555064734, 1336096578, 3548522304, 2579274686, 3574697629, 3205460757, 3593280638, 3338716283, 3079412587, 564236357, 2993598910, 1781952180, 1464380207, 3163844217, 3332601554, 1699332808, 1393555694, 1183702653, 3581086237, 1288719814, 691649499, 2847557200, 2895455976, 3193889540, 2717570544, 1781354906, 1676643554, 2592534050, 3230253752, 1126444790, 2770207658, 2633158820, 2210423226, 2615765581, 2414155088, 3127139286, 673620729, 2805611233, 1269405062, 4015350505, 3341807571, 4149409754, 1057255273, 2012875353, 2162469141, 2276492801, 2601117357, 993977747, 3918593370, 2654263191, 753973209, 36408145, 2530585658, 25011837, 3520020182, 2088578344, 530523599, 2918365339, 1524020338, 1518925132, 3760827505, 3759777254, 1202760957, 3985898139, 3906192525, 674977740, 4174734889, 2031300136, 2019492241, 3983892565, 4153806404, 3822280332, 352677332, 2297720250, 60907813, 90501309, 3286998549, 1016092578, 2535922412, 2839152426, 457141659, 509813237, 4120667899, 652014361, 1966332200, 2975202805, 55981186, 2327461051, 676427537, 3255491064, 2882294119, 3433927263, 1307055953, 942726286, 933058658, 2468411793, 3933900994, 4215176142, 1361170020, 2001714738, 2830558078, 3274259782, 1222529897, 1679025792, 2729314320, 3714953764, 1770335741, 151462246, 3013232138, 1682292957, 1483529935, 471910574, 1539241949, 458788160, 3436315007, 1807016891, 3718408830, 978976581, 1043663428, 3165965781, 1927990952, 4200891579, 2372276910, 3208408903, 3533431907, 1412390302, 2931980059, 4132332400, 1947078029, 3881505623, 4168226417, 2941484381, 1077988104, 1320477388, 886195818, 18198404, 3786409e3, 2509781533, 112762804, 3463356488, 1866414978, 891333506, 18488651, 661792760, 1628790961, 3885187036, 3141171499, 876946877, 2693282273, 1372485963, 791857591, 2686433993, 3759982718, 3167212022, 3472953795, 2716379847, 445679433, 3561995674, 3504004811, 3574258232, 54117162, 3331405415, 2381918588, 3769707343, 4154350007, 1140177722, 4074052095, 668550556, 3214352940, 367459370, 261225585, 2610173221, 4209349473, 3468074219, 3265815641, 314222801, 3066103646, 3808782860, 282218597, 3406013506, 3773591054, 379116347, 1285071038, 846784868, 2669647154, 3771962079, 3550491691, 2305946142, 453669953, 1268987020, 3317592352, 3279303384, 3744833421, 2610507566, 3859509063, 266596637, 3847019092, 517658769, 3462560207, 3443424879, 370717030, 4247526661, 2224018117, 4143653529, 4112773975, 2788324899, 2477274417, 1456262402, 2901442914, 1517677493, 1846949527, 2295493580, 3734397586, 2176403920, 1280348187, 1908823572, 3871786941, 846861322, 1172426758, 3287448474, 3383383037, 1655181056, 3139813346, 901632758, 1897031941, 2986607138, 3066810236, 3447102507, 1393639104, 373351379, 950779232, 625454576, 3124240540, 4148612726, 2007998917, 544563296, 2244738638, 2330496472, 2058025392, 1291430526, 424198748, 50039436, 29584100, 3605783033, 2429876329, 2791104160, 1057563949, 3255363231, 3075367218, 3463963227, 1469046755, 985887462]
  , kk = [1332899944, 1700884034, 1701343084, 1684370003, 1668446532, 1869963892];
function Bf(t, e, r, n) {
    var i, o = t[e], s = t[e + 1];
    return o ^= r[0],
    i = n[o >>> 24],
    i += n[256 | o >> 16 & 255],
    i ^= n[512 | o >> 8 & 255],
    i += n[768 | o & 255],
    s ^= i ^ r[1],
    i = n[s >>> 24],
    i += n[256 | s >> 16 & 255],
    i ^= n[512 | s >> 8 & 255],
    i += n[768 | s & 255],
    o ^= i ^ r[2],
    i = n[o >>> 24],
    i += n[256 | o >> 16 & 255],
    i ^= n[512 | o >> 8 & 255],
    i += n[768 | o & 255],
    s ^= i ^ r[3],
    i = n[s >>> 24],
    i += n[256 | s >> 16 & 255],
    i ^= n[512 | s >> 8 & 255],
    i += n[768 | s & 255],
    o ^= i ^ r[4],
    i = n[o >>> 24],
    i += n[256 | o >> 16 & 255],
    i ^= n[512 | o >> 8 & 255],
    i += n[768 | o & 255],
    s ^= i ^ r[5],
    i = n[s >>> 24],
    i += n[256 | s >> 16 & 255],
    i ^= n[512 | s >> 8 & 255],
    i += n[768 | s & 255],
    o ^= i ^ r[6],
    i = n[o >>> 24],
    i += n[256 | o >> 16 & 255],
    i ^= n[512 | o >> 8 & 255],
    i += n[768 | o & 255],
    s ^= i ^ r[7],
    i = n[s >>> 24],
    i += n[256 | s >> 16 & 255],
    i ^= n[512 | s >> 8 & 255],
    i += n[768 | s & 255],
    o ^= i ^ r[8],
    i = n[o >>> 24],
    i += n[256 | o >> 16 & 255],
    i ^= n[512 | o >> 8 & 255],
    i += n[768 | o & 255],
    s ^= i ^ r[9],
    i = n[s >>> 24],
    i += n[256 | s >> 16 & 255],
    i ^= n[512 | s >> 8 & 255],
    i += n[768 | s & 255],
    o ^= i ^ r[10],
    i = n[o >>> 24],
    i += n[256 | o >> 16 & 255],
    i ^= n[512 | o >> 8 & 255],
    i += n[768 | o & 255],
    s ^= i ^ r[11],
    i = n[s >>> 24],
    i += n[256 | s >> 16 & 255],
    i ^= n[512 | s >> 8 & 255],
    i += n[768 | s & 255],
    o ^= i ^ r[12],
    i = n[o >>> 24],
    i += n[256 | o >> 16 & 255],
    i ^= n[512 | o >> 8 & 255],
    i += n[768 | o & 255],
    s ^= i ^ r[13],
    i = n[s >>> 24],
    i += n[256 | s >> 16 & 255],
    i ^= n[512 | s >> 8 & 255],
    i += n[768 | s & 255],
    o ^= i ^ r[14],
    i = n[o >>> 24],
    i += n[256 | o >> 16 & 255],
    i ^= n[512 | o >> 8 & 255],
    i += n[768 | o & 255],
    s ^= i ^ r[15],
    i = n[s >>> 24],
    i += n[256 | s >> 16 & 255],
    i ^= n[512 | s >> 8 & 255],
    i += n[768 | s & 255],
    o ^= i ^ r[16],
    t[e] = s ^ r[kpe + 1],
    t[e + 1] = o,
    t
}
function vc(t, e) {
    for (var r = 0, n = 0; r < 4; ++r)
        n = n << 8 | t[e] & 255,
        e = (e + 1) % t.length;
    return {
        key: n,
        offp: e
    }
}
function e4(t, e, r) {
    for (var n = 0, i = [0, 0], o = e.length, s = r.length, a, l = 0; l < o; l++)
        a = vc(t, n),
        n = a.offp,
        e[l] = e[l] ^ a.key;
    for (l = 0; l < o; l += 2)
        i = Bf(i, 0, e, r),
        e[l] = i[0],
        e[l + 1] = i[1];
    for (l = 0; l < s; l += 2)
        i = Bf(i, 0, e, r),
        r[l] = i[0],
        r[l + 1] = i[1]
}
function Mpe(t, e, r, n) {
    for (var i = 0, o = [0, 0], s = r.length, a = n.length, l, c = 0; c < s; c++)
        l = vc(e, i),
        i = l.offp,
        r[c] = r[c] ^ l.key;
    for (i = 0,
    c = 0; c < s; c += 2)
        l = vc(t, i),
        i = l.offp,
        o[0] ^= l.key,
        l = vc(t, i),
        i = l.offp,
        o[1] ^= l.key,
        o = Bf(o, 0, r, n),
        r[c] = o[0],
        r[c + 1] = o[1];
    for (c = 0; c < a; c += 2)
        l = vc(t, i),
        i = l.offp,
        o[0] ^= l.key,
        l = vc(t, i),
        i = l.offp,
        o[1] ^= l.key,
        o = Bf(o, 0, r, n),
        n[c] = o[0],
        n[c + 1] = o[1]
}
function t4(t, e, r, n, i) {
    var o = kk.slice(), s = o.length, a;
    if (r < 4 || r > 31)
        if (a = Error("Illegal number of rounds (4-31): " + r),
        n) {
            ki(n.bind(this, a));
            return
        } else
            throw a;
    if (e.length !== wf)
        if (a = Error("Illegal salt length: " + e.length + " != " + wf),
        n) {
            ki(n.bind(this, a));
            return
        } else
            throw a;
    r = 1 << r >>> 0;
    var l, c, u = 0, f;
    typeof Int32Array == "function" ? (l = new Int32Array(J3),
    c = new Int32Array(Q3)) : (l = J3.slice(),
    c = Q3.slice()),
    Mpe(e, t, l, c);
    function d() {
        if (i && i(u / r),
        u < r)
            for (var x = Date.now(); u < r && (u = u + 1,
            e4(t, l, c),
            e4(e, l, c),
            !(Date.now() - x > Rpe)); )
                ;
        else {
            for (u = 0; u < 64; u++)
                for (f = 0; f < s >> 1; f++)
                    Bf(o, f << 1, l, c);
            var y = [];
            for (u = 0; u < s; u++)
                y.push((o[u] >> 24 & 255) >>> 0),
                y.push((o[u] >> 16 & 255) >>> 0),
                y.push((o[u] >> 8 & 255) >>> 0),
                y.push((o[u] & 255) >>> 0);
            if (n) {
                n(null, y);
                return
            } else
                return y
        }
        n && ki(d)
    }
    if (typeof n < "u")
        d();
    else
        for (var h; ; )
            if (typeof (h = d()) < "u")
                return h || []
}
function AE(t, e, r, n) {
    var i;
    if (typeof t != "string" || typeof e != "string")
        if (i = Error("Invalid string / salt: Not a string"),
        r) {
            ki(r.bind(this, i));
            return
        } else
            throw i;
    var o, s;
    if (e.charAt(0) !== "$" || e.charAt(1) !== "2")
        if (i = Error("Invalid salt version: " + e.substring(0, 2)),
        r) {
            ki(r.bind(this, i));
            return
        } else
            throw i;
    if (e.charAt(2) === "$")
        o = String.fromCharCode(0),
        s = 3;
    else {
        if (o = e.charAt(2),
        o !== "a" && o !== "b" && o !== "y" || e.charAt(3) !== "$")
            if (i = Error("Invalid salt revision: " + e.substring(2, 4)),
            r) {
                ki(r.bind(this, i));
                return
            } else
                throw i;
        s = 4
    }
    if (e.charAt(s + 2) > "$")
        if (i = Error("Missing salt rounds"),
        r) {
            ki(r.bind(this, i));
            return
        } else
            throw i;
    var a = parseInt(e.substring(s, s + 1), 10) * 10
      , l = parseInt(e.substring(s + 1, s + 2), 10)
      , c = a + l
      , u = e.substring(s + 3, s + 25);
    t += o >= "a" ? "\0" : "";
    var f = Ope(t)
      , d = Ok(u, wf);
    function h(x) {
        var y = [];
        return y.push("$2"),
        o >= "a" && y.push(o),
        y.push("$"),
        c < 10 && y.push("0"),
        y.push(c.toString()),
        y.push("$"),
        y.push(Vx(d, d.length)),
        y.push(Vx(x, kk.length * 4 - 1)),
        y.join("")
    }
    if (typeof r > "u")
        return h(t4(f, d, c));
    t4(f, d, c, function(x, y) {
        x ? r(x, null) : r(null, h(y))
    }, n)
}
function Npe(t, e) {
    return Vx(t, e)
}
function Lpe(t, e) {
    return Ok(t, e)
}
const C6e = {
    setRandomFallback: Spe,
    genSaltSync: Xb,
    genSalt: Tk,
    hashSync: Dk,
    hash: Fk,
    compareSync: Tpe,
    compare: Dpe,
    getRounds: Fpe,
    getSalt: Ppe,
    truncates: Ipe,
    encodeBase64: Npe,
    decodeBase64: Lpe
}
  , A6e = td("App", {
    web: () => X0( () => Promise.resolve().then( () => Uwe), void 0).then(t => new t.AppWeb)
});
const $pe = () => {}
;
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Rk = function(t) {
    const e = [];
    let r = 0;
    for (let n = 0; n < t.length; n++) {
        let i = t.charCodeAt(n);
        i < 128 ? e[r++] = i : i < 2048 ? (e[r++] = i >> 6 | 192,
        e[r++] = i & 63 | 128) : (i & 64512) === 55296 && n + 1 < t.length && (t.charCodeAt(n + 1) & 64512) === 56320 ? (i = 65536 + ((i & 1023) << 10) + (t.charCodeAt(++n) & 1023),
        e[r++] = i >> 18 | 240,
        e[r++] = i >> 12 & 63 | 128,
        e[r++] = i >> 6 & 63 | 128,
        e[r++] = i & 63 | 128) : (e[r++] = i >> 12 | 224,
        e[r++] = i >> 6 & 63 | 128,
        e[r++] = i & 63 | 128)
    }
    return e
}
  , Upe = function(t) {
    const e = [];
    let r = 0
      , n = 0;
    for (; r < t.length; ) {
        const i = t[r++];
        if (i < 128)
            e[n++] = String.fromCharCode(i);
        else if (i > 191 && i < 224) {
            const o = t[r++];
            e[n++] = String.fromCharCode((i & 31) << 6 | o & 63)
        } else if (i > 239 && i < 365) {
            const o = t[r++]
              , s = t[r++]
              , a = t[r++]
              , l = ((i & 7) << 18 | (o & 63) << 12 | (s & 63) << 6 | a & 63) - 65536;
            e[n++] = String.fromCharCode(55296 + (l >> 10)),
            e[n++] = String.fromCharCode(56320 + (l & 1023))
        } else {
            const o = t[r++]
              , s = t[r++];
            e[n++] = String.fromCharCode((i & 15) << 12 | (o & 63) << 6 | s & 63)
        }
    }
    return e.join("")
}
  , Mk = {
    byteToCharMap_: null,
    charToByteMap_: null,
    byteToCharMapWebSafe_: null,
    charToByteMapWebSafe_: null,
    ENCODED_VALS_BASE: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
    get ENCODED_VALS() {
        return this.ENCODED_VALS_BASE + "+/="
    },
    get ENCODED_VALS_WEBSAFE() {
        return this.ENCODED_VALS_BASE + "-_."
    },
    HAS_NATIVE_SUPPORT: typeof atob == "function",
    encodeByteArray(t, e) {
        if (!Array.isArray(t))
            throw Error("encodeByteArray takes an array as a parameter");
        this.init_();
        const r = e ? this.byteToCharMapWebSafe_ : this.byteToCharMap_
          , n = [];
        for (let i = 0; i < t.length; i += 3) {
            const o = t[i]
              , s = i + 1 < t.length
              , a = s ? t[i + 1] : 0
              , l = i + 2 < t.length
              , c = l ? t[i + 2] : 0
              , u = o >> 2
              , f = (o & 3) << 4 | a >> 4;
            let d = (a & 15) << 2 | c >> 6
              , h = c & 63;
            l || (h = 64,
            s || (d = 64)),
            n.push(r[u], r[f], r[d], r[h])
        }
        return n.join("")
    },
    encodeString(t, e) {
        return this.HAS_NATIVE_SUPPORT && !e ? btoa(t) : this.encodeByteArray(Rk(t), e)
    },
    decodeString(t, e) {
        return this.HAS_NATIVE_SUPPORT && !e ? atob(t) : Upe(this.decodeStringToByteArray(t, e))
    },
    decodeStringToByteArray(t, e) {
        this.init_();
        const r = e ? this.charToByteMapWebSafe_ : this.charToByteMap_
          , n = [];
        for (let i = 0; i < t.length; ) {
            const o = r[t.charAt(i++)]
              , a = i < t.length ? r[t.charAt(i)] : 0;
            ++i;
            const c = i < t.length ? r[t.charAt(i)] : 64;
            ++i;
            const f = i < t.length ? r[t.charAt(i)] : 64;
            if (++i,
            o == null || a == null || c == null || f == null)
                throw new Gpe;
            const d = o << 2 | a >> 4;
            if (n.push(d),
            c !== 64) {
                const h = a << 4 & 240 | c >> 2;
                if (n.push(h),
                f !== 64) {
                    const x = c << 6 & 192 | f;
                    n.push(x)
                }
            }
        }
        return n
    },
    init_() {
        if (!this.byteToCharMap_) {
            this.byteToCharMap_ = {},
            this.charToByteMap_ = {},
            this.byteToCharMapWebSafe_ = {},
            this.charToByteMapWebSafe_ = {};
            for (let t = 0; t < this.ENCODED_VALS.length; t++)
                this.byteToCharMap_[t] = this.ENCODED_VALS.charAt(t),
                this.charToByteMap_[this.byteToCharMap_[t]] = t,
                this.byteToCharMapWebSafe_[t] = this.ENCODED_VALS_WEBSAFE.charAt(t),
                this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]] = t,
                t >= this.ENCODED_VALS_BASE.length && (this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)] = t,
                this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)] = t)
        }
    }
};
class Gpe extends Error {
    constructor() {
        super(...arguments),
        this.name = "DecodeBase64StringError"
    }
}
const Hpe = function(t) {
    const e = Rk(t);
    return Mk.encodeByteArray(e, !0)
}
  , Nk = function(t) {
    return Hpe(t).replace(/\./g, "")
}
  , Vpe = function(t) {
    try {
        return Mk.decodeString(t, !0)
    } catch (e) {
        console.error("base64Decode failed: ", e)
    }
    return null
};
/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function zpe() {
    if (typeof self < "u")
        return self;
    if (typeof window < "u")
        return window;
    if (typeof global < "u")
        return global;
    throw new Error("Unable to locate global object.")
}
/**
 * @license
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const jpe = () => zpe().__FIREBASE_DEFAULTS__
  , Wpe = () => {
    if (typeof process > "u" || typeof process.env > "u")
        return;
    const t = {}.__FIREBASE_DEFAULTS__;
    if (t)
        return JSON.parse(t)
}
  , Ype = () => {
    if (typeof document > "u")
        return;
    let t;
    try {
        t = document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)
    } catch {
        return
    }
    const e = t && Vpe(t[1]);
    return e && JSON.parse(e)
}
  , Xpe = () => {
    try {
        return $pe() || jpe() || Wpe() || Ype()
    } catch (t) {
        console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);
        return
    }
}
  , Lk = () => {
    var t;
    return (t = Xpe()) === null || t === void 0 ? void 0 : t.config
}
;
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
class Kpe {
    constructor() {
        this.reject = () => {}
        ,
        this.resolve = () => {}
        ,
        this.promise = new Promise( (e, r) => {
            this.resolve = e,
            this.reject = r
        }
        )
    }
    wrapCallback(e) {
        return (r, n) => {
            r ? this.reject(r) : this.resolve(n),
            typeof e == "function" && (this.promise.catch( () => {}
            ),
            e.length === 1 ? e(r) : e(r, n))
        }
    }
}
function qpe() {
    const t = typeof chrome == "object" ? chrome.runtime : typeof browser == "object" ? browser.runtime : void 0;
    return typeof t == "object" && t.id !== void 0
}
function qb() {
    try {
        return typeof indexedDB == "object"
    } catch {
        return !1
    }
}
function Zb() {
    return new Promise( (t, e) => {
        try {
            let r = !0;
            const n = "validate-browser-context-for-indexeddb-analytics-module"
              , i = self.indexedDB.open(n);
            i.onsuccess = () => {
                i.result.close(),
                r || self.indexedDB.deleteDatabase(n),
                t(!0)
            }
            ,
            i.onupgradeneeded = () => {
                r = !1
            }
            ,
            i.onerror = () => {
                var o;
                e(((o = i.error) === null || o === void 0 ? void 0 : o.message) || "")
            }
        } catch (r) {
            e(r)
        }
    }
    )
}
function $k() {
    return !(typeof navigator > "u" || !navigator.cookieEnabled)
}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Zpe = "FirebaseError";
class Hl extends Error {
    constructor(e, r, n) {
        super(r),
        this.code = e,
        this.customData = n,
        this.name = Zpe,
        Object.setPrototypeOf(this, Hl.prototype),
        Error.captureStackTrace && Error.captureStackTrace(this, hd.prototype.create)
    }
}
class hd {
    constructor(e, r, n) {
        this.service = e,
        this.serviceName = r,
        this.errors = n
    }
    create(e, ...r) {
        const n = r[0] || {}
          , i = `${this.service}/${e}`
          , o = this.errors[e]
          , s = o ? Jpe(o, n) : "Error"
          , a = `${this.serviceName}: ${s} (${i}).`;
        return new Hl(i,a,n)
    }
}
function Jpe(t, e) {
    return t.replace(Qpe, (r, n) => {
        const i = e[n];
        return i != null ? String(i) : `<${n}?>`
    }
    )
}
const Qpe = /\{\$([^}]+)}/g;
function zx(t, e) {
    if (t === e)
        return !0;
    const r = Object.keys(t)
      , n = Object.keys(e);
    for (const i of r) {
        if (!n.includes(i))
            return !1;
        const o = t[i]
          , s = e[i];
        if (r4(o) && r4(s)) {
            if (!zx(o, s))
                return !1
        } else if (o !== s)
            return !1
    }
    for (const i of n)
        if (!r.includes(i))
            return !1;
    return !0
}
function r4(t) {
    return t !== null && typeof t == "object"
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const e1e = 1e3
  , t1e = 2
  , r1e = 4 * 60 * 60 * 1e3
  , n1e = .5;
function n4(t, e=e1e, r=t1e) {
    const n = e * Math.pow(r, t)
      , i = Math.round(n1e * n * (Math.random() - .5) * 2);
    return Math.min(r1e, n + i)
}
/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function xd(t) {
    return t && t._delegate ? t._delegate : t
}
class Co {
    constructor(e, r, n) {
        this.name = e,
        this.instanceFactory = r,
        this.type = n,
        this.multipleInstances = !1,
        this.serviceProps = {},
        this.instantiationMode = "LAZY",
        this.onInstanceCreated = null
    }
    setInstantiationMode(e) {
        return this.instantiationMode = e,
        this
    }
    setMultipleInstances(e) {
        return this.multipleInstances = e,
        this
    }
    setServiceProps(e) {
        return this.serviceProps = e,
        this
    }
    setInstanceCreatedCallback(e) {
        return this.onInstanceCreated = e,
        this
    }
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const La = "[DEFAULT]";
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
class i1e {
    constructor(e, r) {
        this.name = e,
        this.container = r,
        this.component = null,
        this.instances = new Map,
        this.instancesDeferred = new Map,
        this.instancesOptions = new Map,
        this.onInitCallbacks = new Map
    }
    get(e) {
        const r = this.normalizeInstanceIdentifier(e);
        if (!this.instancesDeferred.has(r)) {
            const n = new Kpe;
            if (this.instancesDeferred.set(r, n),
            this.isInitialized(r) || this.shouldAutoInitialize())
                try {
                    const i = this.getOrInitializeService({
                        instanceIdentifier: r
                    });
                    i && n.resolve(i)
                } catch {}
        }
        return this.instancesDeferred.get(r).promise
    }
    getImmediate(e) {
        var r;
        const n = this.normalizeInstanceIdentifier(e == null ? void 0 : e.identifier)
          , i = (r = e == null ? void 0 : e.optional) !== null && r !== void 0 ? r : !1;
        if (this.isInitialized(n) || this.shouldAutoInitialize())
            try {
                return this.getOrInitializeService({
                    instanceIdentifier: n
                })
            } catch (o) {
                if (i)
                    return null;
                throw o
            }
        else {
            if (i)
                return null;
            throw Error(`Service ${this.name} is not available`)
        }
    }
    getComponent() {
        return this.component
    }
    setComponent(e) {
        if (e.name !== this.name)
            throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);
        if (this.component)
            throw Error(`Component for ${this.name} has already been provided`);
        if (this.component = e,
        !!this.shouldAutoInitialize()) {
            if (s1e(e))
                try {
                    this.getOrInitializeService({
                        instanceIdentifier: La
                    })
                } catch {}
            for (const [r,n] of this.instancesDeferred.entries()) {
                const i = this.normalizeInstanceIdentifier(r);
                try {
                    const o = this.getOrInitializeService({
                        instanceIdentifier: i
                    });
                    n.resolve(o)
                } catch {}
            }
        }
    }
    clearInstance(e=La) {
        this.instancesDeferred.delete(e),
        this.instancesOptions.delete(e),
        this.instances.delete(e)
    }
    async delete() {
        const e = Array.from(this.instances.values());
        await Promise.all([...e.filter(r => "INTERNAL"in r).map(r => r.INTERNAL.delete()), ...e.filter(r => "_delete"in r).map(r => r._delete())])
    }
    isComponentSet() {
        return this.component != null
    }
    isInitialized(e=La) {
        return this.instances.has(e)
    }
    getOptions(e=La) {
        return this.instancesOptions.get(e) || {}
    }
    initialize(e={}) {
        const {options: r={}} = e
          , n = this.normalizeInstanceIdentifier(e.instanceIdentifier);
        if (this.isInitialized(n))
            throw Error(`${this.name}(${n}) has already been initialized`);
        if (!this.isComponentSet())
            throw Error(`Component ${this.name} has not been registered yet`);
        const i = this.getOrInitializeService({
            instanceIdentifier: n,
            options: r
        });
        for (const [o,s] of this.instancesDeferred.entries()) {
            const a = this.normalizeInstanceIdentifier(o);
            n === a && s.resolve(i)
        }
        return i
    }
    onInit(e, r) {
        var n;
        const i = this.normalizeInstanceIdentifier(r)
          , o = (n = this.onInitCallbacks.get(i)) !== null && n !== void 0 ? n : new Set;
        o.add(e),
        this.onInitCallbacks.set(i, o);
        const s = this.instances.get(i);
        return s && e(s, i),
        () => {
            o.delete(e)
        }
    }
    invokeOnInitCallbacks(e, r) {
        const n = this.onInitCallbacks.get(r);
        if (n)
            for (const i of n)
                try {
                    i(e, r)
                } catch {}
    }
    getOrInitializeService({instanceIdentifier: e, options: r={}}) {
        let n = this.instances.get(e);
        if (!n && this.component && (n = this.component.instanceFactory(this.container, {
            instanceIdentifier: o1e(e),
            options: r
        }),
        this.instances.set(e, n),
        this.instancesOptions.set(e, r),
        this.invokeOnInitCallbacks(n, e),
        this.component.onInstanceCreated))
            try {
                this.component.onInstanceCreated(this.container, e, n)
            } catch {}
        return n || null
    }
    normalizeInstanceIdentifier(e=La) {
        return this.component ? this.component.multipleInstances ? e : La : e
    }
    shouldAutoInitialize() {
        return !!this.component && this.component.instantiationMode !== "EXPLICIT"
    }
}
function o1e(t) {
    return t === La ? void 0 : t
}
function s1e(t) {
    return t.instantiationMode === "EAGER"
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
class a1e {
    constructor(e) {
        this.name = e,
        this.providers = new Map
    }
    addComponent(e) {
        const r = this.getProvider(e.name);
        if (r.isComponentSet())
            throw new Error(`Component ${e.name} has already been registered with ${this.name}`);
        r.setComponent(e)
    }
    addOrOverwriteComponent(e) {
        this.getProvider(e.name).isComponentSet() && this.providers.delete(e.name),
        this.addComponent(e)
    }
    getProvider(e) {
        if (this.providers.has(e))
            return this.providers.get(e);
        const r = new i1e(e,this);
        return this.providers.set(e, r),
        r
    }
    getProviders() {
        return Array.from(this.providers.values())
    }
}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
var Mt;
(function(t) {
    t[t.DEBUG = 0] = "DEBUG",
    t[t.VERBOSE = 1] = "VERBOSE",
    t[t.INFO = 2] = "INFO",
    t[t.WARN = 3] = "WARN",
    t[t.ERROR = 4] = "ERROR",
    t[t.SILENT = 5] = "SILENT"
}
)(Mt || (Mt = {}));
const l1e = {
    debug: Mt.DEBUG,
    verbose: Mt.VERBOSE,
    info: Mt.INFO,
    warn: Mt.WARN,
    error: Mt.ERROR,
    silent: Mt.SILENT
}
  , c1e = Mt.INFO
  , u1e = {
    [Mt.DEBUG]: "log",
    [Mt.VERBOSE]: "log",
    [Mt.INFO]: "info",
    [Mt.WARN]: "warn",
    [Mt.ERROR]: "error"
}
  , f1e = (t, e, ...r) => {
    if (e < t.logLevel)
        return;
    const n = new Date().toISOString()
      , i = u1e[e];
    if (i)
        console[i](`[${n}]  ${t.name}:`, ...r);
    else
        throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)
}
;
class Uk {
    constructor(e) {
        this.name = e,
        this._logLevel = c1e,
        this._logHandler = f1e,
        this._userLogHandler = null
    }
    get logLevel() {
        return this._logLevel
    }
    set logLevel(e) {
        if (!(e in Mt))
            throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);
        this._logLevel = e
    }
    setLogLevel(e) {
        this._logLevel = typeof e == "string" ? l1e[e] : e
    }
    get logHandler() {
        return this._logHandler
    }
    set logHandler(e) {
        if (typeof e != "function")
            throw new TypeError("Value assigned to `logHandler` must be a function");
        this._logHandler = e
    }
    get userLogHandler() {
        return this._userLogHandler
    }
    set userLogHandler(e) {
        this._userLogHandler = e
    }
    debug(...e) {
        this._userLogHandler && this._userLogHandler(this, Mt.DEBUG, ...e),
        this._logHandler(this, Mt.DEBUG, ...e)
    }
    log(...e) {
        this._userLogHandler && this._userLogHandler(this, Mt.VERBOSE, ...e),
        this._logHandler(this, Mt.VERBOSE, ...e)
    }
    info(...e) {
        this._userLogHandler && this._userLogHandler(this, Mt.INFO, ...e),
        this._logHandler(this, Mt.INFO, ...e)
    }
    warn(...e) {
        this._userLogHandler && this._userLogHandler(this, Mt.WARN, ...e),
        this._logHandler(this, Mt.WARN, ...e)
    }
    error(...e) {
        this._userLogHandler && this._userLogHandler(this, Mt.ERROR, ...e),
        this._logHandler(this, Mt.ERROR, ...e)
    }
}
const d1e = (t, e) => e.some(r => t instanceof r);
let i4, o4;
function h1e() {
    return i4 || (i4 = [IDBDatabase, IDBObjectStore, IDBIndex, IDBCursor, IDBTransaction])
}
function x1e() {
    return o4 || (o4 = [IDBCursor.prototype.advance, IDBCursor.prototype.continue, IDBCursor.prototype.continuePrimaryKey])
}
const Gk = new WeakMap
  , wE = new WeakMap
  , Hk = new WeakMap
  , dm = new WeakMap
  , Jb = new WeakMap;
function p1e(t) {
    const e = new Promise( (r, n) => {
        const i = () => {
            t.removeEventListener("success", o),
            t.removeEventListener("error", s)
        }
          , o = () => {
            r(ns(t.result)),
            i()
        }
          , s = () => {
            n(t.error),
            i()
        }
        ;
        t.addEventListener("success", o),
        t.addEventListener("error", s)
    }
    );
    return e.then(r => {
        r instanceof IDBCursor && Gk.set(r, t)
    }
    ).catch( () => {}
    ),
    Jb.set(e, t),
    e
}
function g1e(t) {
    if (wE.has(t))
        return;
    const e = new Promise( (r, n) => {
        const i = () => {
            t.removeEventListener("complete", o),
            t.removeEventListener("error", s),
            t.removeEventListener("abort", s)
        }
          , o = () => {
            r(),
            i()
        }
          , s = () => {
            n(t.error || new DOMException("AbortError","AbortError")),
            i()
        }
        ;
        t.addEventListener("complete", o),
        t.addEventListener("error", s),
        t.addEventListener("abort", s)
    }
    );
    wE.set(t, e)
}
let BE = {
    get(t, e, r) {
        if (t instanceof IDBTransaction) {
            if (e === "done")
                return wE.get(t);
            if (e === "objectStoreNames")
                return t.objectStoreNames || Hk.get(t);
            if (e === "store")
                return r.objectStoreNames[1] ? void 0 : r.objectStore(r.objectStoreNames[0])
        }
        return ns(t[e])
    },
    set(t, e, r) {
        return t[e] = r,
        !0
    },
    has(t, e) {
        return t instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in t
    }
};
function m1e(t) {
    BE = t(BE)
}
function v1e(t) {
    return t === IDBDatabase.prototype.transaction && !("objectStoreNames"in IDBTransaction.prototype) ? function(e, ...r) {
        const n = t.call(hm(this), e, ...r);
        return Hk.set(n, e.sort ? e.sort() : [e]),
        ns(n)
    }
    : x1e().includes(t) ? function(...e) {
        return t.apply(hm(this), e),
        ns(Gk.get(this))
    }
    : function(...e) {
        return ns(t.apply(hm(this), e))
    }
}
function y1e(t) {
    return typeof t == "function" ? v1e(t) : (t instanceof IDBTransaction && g1e(t),
    d1e(t, h1e()) ? new Proxy(t,BE) : t)
}
function ns(t) {
    if (t instanceof IDBRequest)
        return p1e(t);
    if (dm.has(t))
        return dm.get(t);
    const e = y1e(t);
    return e !== t && (dm.set(t, e),
    Jb.set(e, t)),
    e
}
const hm = t => Jb.get(t);
function A1(t, e, {blocked: r, upgrade: n, blocking: i, terminated: o}={}) {
    const s = indexedDB.open(t, e)
      , a = ns(s);
    return n && s.addEventListener("upgradeneeded", l => {
        n(ns(s.result), l.oldVersion, l.newVersion, ns(s.transaction), l)
    }
    ),
    r && s.addEventListener("blocked", l => r(l.oldVersion, l.newVersion, l)),
    a.then(l => {
        o && l.addEventListener("close", () => o()),
        i && l.addEventListener("versionchange", c => i(c.oldVersion, c.newVersion, c))
    }
    ).catch( () => {}
    ),
    a
}
function xm(t, {blocked: e}={}) {
    const r = indexedDB.deleteDatabase(t);
    return e && r.addEventListener("blocked", n => e(n.oldVersion, n)),
    ns(r).then( () => {}
    )
}
const E1e = ["get", "getKey", "getAll", "getAllKeys", "count"]
  , _1e = ["put", "add", "delete", "clear"]
  , pm = new Map;
function s4(t, e) {
    if (!(t instanceof IDBDatabase && !(e in t) && typeof e == "string"))
        return;
    if (pm.get(e))
        return pm.get(e);
    const r = e.replace(/FromIndex$/, "")
      , n = e !== r
      , i = _1e.includes(r);
    if (!(r in (n ? IDBIndex : IDBObjectStore).prototype) || !(i || E1e.includes(r)))
        return;
    const o = async function(s, ...a) {
        const l = this.transaction(s, i ? "readwrite" : "readonly");
        let c = l.store;
        return n && (c = c.index(a.shift())),
        (await Promise.all([c[r](...a), i && l.done]))[0]
    };
    return pm.set(e, o),
    o
}
m1e(t => ({
    ...t,
    get: (e, r, n) => s4(e, r) || t.get(e, r, n),
    has: (e, r) => !!s4(e, r) || t.has(e, r)
}));
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
class b1e {
    constructor(e) {
        this.container = e
    }
    getPlatformInfoString() {
        return this.container.getProviders().map(r => {
            if (C1e(r)) {
                const n = r.getImmediate();
                return `${n.library}/${n.version}`
            } else
                return null
        }
        ).filter(r => r).join(" ")
    }
}
function C1e(t) {
    const e = t.getComponent();
    return (e == null ? void 0 : e.type) === "VERSION"
}
const SE = "@firebase/app"
  , a4 = "0.13.2";
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const xs = new Uk("@firebase/app")
  , A1e = "@firebase/app-compat"
  , w1e = "@firebase/analytics-compat"
  , B1e = "@firebase/analytics"
  , S1e = "@firebase/app-check-compat"
  , T1e = "@firebase/app-check"
  , D1e = "@firebase/auth"
  , F1e = "@firebase/auth-compat"
  , P1e = "@firebase/database"
  , I1e = "@firebase/data-connect"
  , O1e = "@firebase/database-compat"
  , k1e = "@firebase/functions"
  , R1e = "@firebase/functions-compat"
  , M1e = "@firebase/installations"
  , N1e = "@firebase/installations-compat"
  , L1e = "@firebase/messaging"
  , $1e = "@firebase/messaging-compat"
  , U1e = "@firebase/performance"
  , G1e = "@firebase/performance-compat"
  , H1e = "@firebase/remote-config"
  , V1e = "@firebase/remote-config-compat"
  , z1e = "@firebase/storage"
  , j1e = "@firebase/storage-compat"
  , W1e = "@firebase/firestore"
  , Y1e = "@firebase/ai"
  , X1e = "@firebase/firestore-compat"
  , K1e = "firebase";
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const TE = "[DEFAULT]"
  , q1e = {
    [SE]: "fire-core",
    [A1e]: "fire-core-compat",
    [B1e]: "fire-analytics",
    [w1e]: "fire-analytics-compat",
    [T1e]: "fire-app-check",
    [S1e]: "fire-app-check-compat",
    [D1e]: "fire-auth",
    [F1e]: "fire-auth-compat",
    [P1e]: "fire-rtdb",
    [I1e]: "fire-data-connect",
    [O1e]: "fire-rtdb-compat",
    [k1e]: "fire-fn",
    [R1e]: "fire-fn-compat",
    [M1e]: "fire-iid",
    [N1e]: "fire-iid-compat",
    [L1e]: "fire-fcm",
    [$1e]: "fire-fcm-compat",
    [U1e]: "fire-perf",
    [G1e]: "fire-perf-compat",
    [H1e]: "fire-rc",
    [V1e]: "fire-rc-compat",
    [z1e]: "fire-gcs",
    [j1e]: "fire-gcs-compat",
    [W1e]: "fire-fst",
    [X1e]: "fire-fst-compat",
    [Y1e]: "fire-vertex",
    "fire-js": "fire-js",
    [K1e]: "fire-js-all"
};
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const jx = new Map
  , Z1e = new Map
  , DE = new Map;
function l4(t, e) {
    try {
        t.container.addComponent(e)
    } catch (r) {
        xs.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`, r)
    }
}
function ps(t) {
    const e = t.name;
    if (DE.has(e))
        return xs.debug(`There were multiple attempts to register component ${e}.`),
        !1;
    DE.set(e, t);
    for (const r of jx.values())
        l4(r, t);
    for (const r of Z1e.values())
        l4(r, t);
    return !0
}
function pd(t, e) {
    const r = t.container.getProvider("heartbeat").getImmediate({
        optional: !0
    });
    return r && r.triggerHeartbeat(),
    t.container.getProvider(e)
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const J1e = {
    "no-app": "No Firebase App '{$appName}' has been created - call initializeApp() first",
    "bad-app-name": "Illegal App name: '{$appName}'",
    "duplicate-app": "Firebase App named '{$appName}' already exists with different options or config",
    "app-deleted": "Firebase App named '{$appName}' already deleted",
    "server-app-deleted": "Firebase Server App has been deleted",
    "no-options": "Need to provide options, when not being deployed to hosting via source.",
    "invalid-app-argument": "firebase.{$appName}() takes either no argument or a Firebase App instance.",
    "invalid-log-argument": "First argument to `onLog` must be null or a function.",
    "idb-open": "Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",
    "idb-get": "Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",
    "idb-set": "Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",
    "idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",
    "finalization-registry-not-supported": "FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.",
    "invalid-server-app-environment": "FirebaseServerApp is not for use in browser environments."
}
  , ea = new hd("app","Firebase",J1e);
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
class Q1e {
    constructor(e, r, n) {
        this._isDeleted = !1,
        this._options = Object.assign({}, e),
        this._config = Object.assign({}, r),
        this._name = r.name,
        this._automaticDataCollectionEnabled = r.automaticDataCollectionEnabled,
        this._container = n,
        this.container.addComponent(new Co("app", () => this,"PUBLIC"))
    }
    get automaticDataCollectionEnabled() {
        return this.checkDestroyed(),
        this._automaticDataCollectionEnabled
    }
    set automaticDataCollectionEnabled(e) {
        this.checkDestroyed(),
        this._automaticDataCollectionEnabled = e
    }
    get name() {
        return this.checkDestroyed(),
        this._name
    }
    get options() {
        return this.checkDestroyed(),
        this._options
    }
    get config() {
        return this.checkDestroyed(),
        this._config
    }
    get container() {
        return this._container
    }
    get isDeleted() {
        return this._isDeleted
    }
    set isDeleted(e) {
        this._isDeleted = e
    }
    checkDestroyed() {
        if (this.isDeleted)
            throw ea.create("app-deleted", {
                appName: this._name
            })
    }
}
function ege(t, e={}) {
    let r = t;
    typeof e != "object" && (e = {
        name: e
    });
    const n = Object.assign({
        name: TE,
        automaticDataCollectionEnabled: !0
    }, e)
      , i = n.name;
    if (typeof i != "string" || !i)
        throw ea.create("bad-app-name", {
            appName: String(i)
        });
    if (r || (r = Lk()),
    !r)
        throw ea.create("no-options");
    const o = jx.get(i);
    if (o) {
        if (zx(r, o.options) && zx(n, o.config))
            return o;
        throw ea.create("duplicate-app", {
            appName: i
        })
    }
    const s = new a1e(i);
    for (const l of DE.values())
        s.addComponent(l);
    const a = new Q1e(r,n,s);
    return jx.set(i, a),
    a
}
function Vk(t=TE) {
    const e = jx.get(t);
    if (!e && t === TE && Lk())
        return ege();
    if (!e)
        throw ea.create("no-app", {
            appName: t
        });
    return e
}
function xo(t, e, r) {
    var n;
    let i = (n = q1e[t]) !== null && n !== void 0 ? n : t;
    r && (i += `-${r}`);
    const o = i.match(/\s|\//)
      , s = e.match(/\s|\//);
    if (o || s) {
        const a = [`Unable to register library "${i}" with version "${e}":`];
        o && a.push(`library name "${i}" contains illegal characters (whitespace or "/")`),
        o && s && a.push("and"),
        s && a.push(`version name "${e}" contains illegal characters (whitespace or "/")`),
        xs.warn(a.join(" "));
        return
    }
    ps(new Co(`${i}-version`, () => ({
        library: i,
        version: e
    }),"VERSION"))
}
/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const tge = "firebase-heartbeat-database"
  , rge = 1
  , Sf = "firebase-heartbeat-store";
let gm = null;
function zk() {
    return gm || (gm = A1(tge, rge, {
        upgrade: (t, e) => {
            switch (e) {
            case 0:
                try {
                    t.createObjectStore(Sf)
                } catch (r) {
                    console.warn(r)
                }
            }
        }
    }).catch(t => {
        throw ea.create("idb-open", {
            originalErrorMessage: t.message
        })
    }
    )),
    gm
}
async function nge(t) {
    try {
        const r = (await zk()).transaction(Sf)
          , n = await r.objectStore(Sf).get(jk(t));
        return await r.done,
        n
    } catch (e) {
        if (e instanceof Hl)
            xs.warn(e.message);
        else {
            const r = ea.create("idb-get", {
                originalErrorMessage: e == null ? void 0 : e.message
            });
            xs.warn(r.message)
        }
    }
}
async function c4(t, e) {
    try {
        const n = (await zk()).transaction(Sf, "readwrite");
        await n.objectStore(Sf).put(e, jk(t)),
        await n.done
    } catch (r) {
        if (r instanceof Hl)
            xs.warn(r.message);
        else {
            const n = ea.create("idb-set", {
                originalErrorMessage: r == null ? void 0 : r.message
            });
            xs.warn(n.message)
        }
    }
}
function jk(t) {
    return `${t.name}!${t.options.appId}`
}
/**
 * @license
 * Copyright 2021 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const ige = 1024
  , oge = 30;
class sge {
    constructor(e) {
        this.container = e,
        this._heartbeatsCache = null;
        const r = this.container.getProvider("app").getImmediate();
        this._storage = new lge(r),
        this._heartbeatsCachePromise = this._storage.read().then(n => (this._heartbeatsCache = n,
        n))
    }
    async triggerHeartbeat() {
        var e, r;
        try {
            const i = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString()
              , o = u4();
            if (((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null && (this._heartbeatsCache = await this._heartbeatsCachePromise,
            ((r = this._heartbeatsCache) === null || r === void 0 ? void 0 : r.heartbeats) == null) || this._heartbeatsCache.lastSentHeartbeatDate === o || this._heartbeatsCache.heartbeats.some(s => s.date === o))
                return;
            if (this._heartbeatsCache.heartbeats.push({
                date: o,
                agent: i
            }),
            this._heartbeatsCache.heartbeats.length > oge) {
                const s = cge(this._heartbeatsCache.heartbeats);
                this._heartbeatsCache.heartbeats.splice(s, 1)
            }
            return this._storage.overwrite(this._heartbeatsCache)
        } catch (n) {
            xs.warn(n)
        }
    }
    async getHeartbeatsHeader() {
        var e;
        try {
            if (this._heartbeatsCache === null && await this._heartbeatsCachePromise,
            ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null || this._heartbeatsCache.heartbeats.length === 0)
                return "";
            const r = u4()
              , {heartbeatsToSend: n, unsentEntries: i} = age(this._heartbeatsCache.heartbeats)
              , o = Nk(JSON.stringify({
                version: 2,
                heartbeats: n
            }));
            return this._heartbeatsCache.lastSentHeartbeatDate = r,
            i.length > 0 ? (this._heartbeatsCache.heartbeats = i,
            await this._storage.overwrite(this._heartbeatsCache)) : (this._heartbeatsCache.heartbeats = [],
            this._storage.overwrite(this._heartbeatsCache)),
            o
        } catch (r) {
            return xs.warn(r),
            ""
        }
    }
}
function u4() {
    return new Date().toISOString().substring(0, 10)
}
function age(t, e=ige) {
    const r = [];
    let n = t.slice();
    for (const i of t) {
        const o = r.find(s => s.agent === i.agent);
        if (o) {
            if (o.dates.push(i.date),
            f4(r) > e) {
                o.dates.pop();
                break
            }
        } else if (r.push({
            agent: i.agent,
            dates: [i.date]
        }),
        f4(r) > e) {
            r.pop();
            break
        }
        n = n.slice(1)
    }
    return {
        heartbeatsToSend: r,
        unsentEntries: n
    }
}
class lge {
    constructor(e) {
        this.app = e,
        this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck()
    }
    async runIndexedDBEnvironmentCheck() {
        return qb() ? Zb().then( () => !0).catch( () => !1) : !1
    }
    async read() {
        if (await this._canUseIndexedDBPromise) {
            const r = await nge(this.app);
            return r != null && r.heartbeats ? r : {
                heartbeats: []
            }
        } else
            return {
                heartbeats: []
            }
    }
    async overwrite(e) {
        var r;
        if (await this._canUseIndexedDBPromise) {
            const i = await this.read();
            return c4(this.app, {
                lastSentHeartbeatDate: (r = e.lastSentHeartbeatDate) !== null && r !== void 0 ? r : i.lastSentHeartbeatDate,
                heartbeats: e.heartbeats
            })
        } else
            return
    }
    async add(e) {
        var r;
        if (await this._canUseIndexedDBPromise) {
            const i = await this.read();
            return c4(this.app, {
                lastSentHeartbeatDate: (r = e.lastSentHeartbeatDate) !== null && r !== void 0 ? r : i.lastSentHeartbeatDate,
                heartbeats: [...i.heartbeats, ...e.heartbeats]
            })
        } else
            return
    }
}
function f4(t) {
    return Nk(JSON.stringify({
        version: 2,
        heartbeats: t
    })).length
}
function cge(t) {
    if (t.length === 0)
        return -1;
    let e = 0
      , r = t[0].date;
    for (let n = 1; n < t.length; n++)
        t[n].date < r && (r = t[n].date,
        e = n);
    return e
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function uge(t) {
    ps(new Co("platform-logger",e => new b1e(e),"PRIVATE")),
    ps(new Co("heartbeat",e => new sge(e),"PRIVATE")),
    xo(SE, a4, t),
    xo(SE, a4, "esm2017"),
    xo("fire-js", "")
}
uge("");
var fge = "firebase"
  , dge = "11.10.0";
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
xo(fge, dge, "app");
const Wk = "@firebase/installations"
  , Qb = "0.6.18";
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Yk = 1e4
  , Xk = `w:${Qb}`
  , Kk = "FIS_v2"
  , hge = "https://firebaseinstallations.googleapis.com/v1"
  , xge = 60 * 60 * 1e3
  , pge = "installations"
  , gge = "Installations";
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const mge = {
    "missing-app-config-values": 'Missing App configuration value: "{$valueName}"',
    "not-registered": "Firebase Installation is not registered.",
    "installation-not-found": "Firebase Installation not found.",
    "request-failed": '{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',
    "app-offline": "Could not process request. Application offline.",
    "delete-pending-registration": "Can't delete installation while there is a pending registration request."
}
  , Sl = new hd(pge,gge,mge);
function qk(t) {
    return t instanceof Hl && t.code.includes("request-failed")
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function Zk({projectId: t}) {
    return `${hge}/projects/${t}/installations`
}
function Jk(t) {
    return {
        token: t.token,
        requestStatus: 2,
        expiresIn: yge(t.expiresIn),
        creationTime: Date.now()
    }
}
async function Qk(t, e) {
    const n = (await e.json()).error;
    return Sl.create("request-failed", {
        requestName: t,
        serverCode: n.code,
        serverMessage: n.message,
        serverStatus: n.status
    })
}
function eR({apiKey: t}) {
    return new Headers({
        "Content-Type": "application/json",
        Accept: "application/json",
        "x-goog-api-key": t
    })
}
function vge(t, {refreshToken: e}) {
    const r = eR(t);
    return r.append("Authorization", Ege(e)),
    r
}
async function tR(t) {
    const e = await t();
    return e.status >= 500 && e.status < 600 ? t() : e
}
function yge(t) {
    return Number(t.replace("s", "000"))
}
function Ege(t) {
    return `${Kk} ${t}`
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function _ge({appConfig: t, heartbeatServiceProvider: e}, {fid: r}) {
    const n = Zk(t)
      , i = eR(t)
      , o = e.getImmediate({
        optional: !0
    });
    if (o) {
        const c = await o.getHeartbeatsHeader();
        c && i.append("x-firebase-client", c)
    }
    const s = {
        fid: r,
        authVersion: Kk,
        appId: t.appId,
        sdkVersion: Xk
    }
      , a = {
        method: "POST",
        headers: i,
        body: JSON.stringify(s)
    }
      , l = await tR( () => fetch(n, a));
    if (l.ok) {
        const c = await l.json();
        return {
            fid: c.fid || r,
            registrationStatus: 2,
            refreshToken: c.refreshToken,
            authToken: Jk(c.authToken)
        }
    } else
        throw await Qk("Create Installation", l)
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function rR(t) {
    return new Promise(e => {
        setTimeout(e, t)
    }
    )
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function bge(t) {
    return btoa(String.fromCharCode(...t)).replace(/\+/g, "-").replace(/\//g, "_")
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Cge = /^[cdef][\w-]{21}$/
  , FE = "";
function Age() {
    try {
        const t = new Uint8Array(17);
        (self.crypto || self.msCrypto).getRandomValues(t),
        t[0] = 112 + t[0] % 16;
        const r = wge(t);
        return Cge.test(r) ? r : FE
    } catch {
        return FE
    }
}
function wge(t) {
    return bge(t).substr(0, 22)
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function w1(t) {
    return `${t.appName}!${t.appId}`
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const nR = new Map;
function iR(t, e) {
    const r = w1(t);
    oR(r, e),
    Bge(r, e)
}
function oR(t, e) {
    const r = nR.get(t);
    if (r)
        for (const n of r)
            n(e)
}
function Bge(t, e) {
    const r = Sge();
    r && r.postMessage({
        key: t,
        fid: e
    }),
    Tge()
}
let Za = null;
function Sge() {
    return !Za && "BroadcastChannel"in self && (Za = new BroadcastChannel("[Firebase] FID Change"),
    Za.onmessage = t => {
        oR(t.data.key, t.data.fid)
    }
    ),
    Za
}
function Tge() {
    nR.size === 0 && Za && (Za.close(),
    Za = null)
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Dge = "firebase-installations-database"
  , Fge = 1
  , Tl = "firebase-installations-store";
let mm = null;
function eC() {
    return mm || (mm = A1(Dge, Fge, {
        upgrade: (t, e) => {
            switch (e) {
            case 0:
                t.createObjectStore(Tl)
            }
        }
    })),
    mm
}
async function Wx(t, e) {
    const r = w1(t)
      , i = (await eC()).transaction(Tl, "readwrite")
      , o = i.objectStore(Tl)
      , s = await o.get(r);
    return await o.put(e, r),
    await i.done,
    (!s || s.fid !== e.fid) && iR(t, e.fid),
    e
}
async function sR(t) {
    const e = w1(t)
      , n = (await eC()).transaction(Tl, "readwrite");
    await n.objectStore(Tl).delete(e),
    await n.done
}
async function B1(t, e) {
    const r = w1(t)
      , i = (await eC()).transaction(Tl, "readwrite")
      , o = i.objectStore(Tl)
      , s = await o.get(r)
      , a = e(s);
    return a === void 0 ? await o.delete(r) : await o.put(a, r),
    await i.done,
    a && (!s || s.fid !== a.fid) && iR(t, a.fid),
    a
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function tC(t) {
    let e;
    const r = await B1(t.appConfig, n => {
        const i = Pge(n)
          , o = Ige(t, i);
        return e = o.registrationPromise,
        o.installationEntry
    }
    );
    return r.fid === FE ? {
        installationEntry: await e
    } : {
        installationEntry: r,
        registrationPromise: e
    }
}
function Pge(t) {
    const e = t || {
        fid: Age(),
        registrationStatus: 0
    };
    return aR(e)
}
function Ige(t, e) {
    if (e.registrationStatus === 0) {
        if (!navigator.onLine) {
            const i = Promise.reject(Sl.create("app-offline"));
            return {
                installationEntry: e,
                registrationPromise: i
            }
        }
        const r = {
            fid: e.fid,
            registrationStatus: 1,
            registrationTime: Date.now()
        }
          , n = Oge(t, r);
        return {
            installationEntry: r,
            registrationPromise: n
        }
    } else
        return e.registrationStatus === 1 ? {
            installationEntry: e,
            registrationPromise: kge(t)
        } : {
            installationEntry: e
        }
}
async function Oge(t, e) {
    try {
        const r = await _ge(t, e);
        return Wx(t.appConfig, r)
    } catch (r) {
        throw qk(r) && r.customData.serverCode === 409 ? await sR(t.appConfig) : await Wx(t.appConfig, {
            fid: e.fid,
            registrationStatus: 0
        }),
        r
    }
}
async function kge(t) {
    let e = await d4(t.appConfig);
    for (; e.registrationStatus === 1; )
        await rR(100),
        e = await d4(t.appConfig);
    if (e.registrationStatus === 0) {
        const {installationEntry: r, registrationPromise: n} = await tC(t);
        return n || r
    }
    return e
}
function d4(t) {
    return B1(t, e => {
        if (!e)
            throw Sl.create("installation-not-found");
        return aR(e)
    }
    )
}
function aR(t) {
    return Rge(t) ? {
        fid: t.fid,
        registrationStatus: 0
    } : t
}
function Rge(t) {
    return t.registrationStatus === 1 && t.registrationTime + Yk < Date.now()
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function Mge({appConfig: t, heartbeatServiceProvider: e}, r) {
    const n = Nge(t, r)
      , i = vge(t, r)
      , o = e.getImmediate({
        optional: !0
    });
    if (o) {
        const c = await o.getHeartbeatsHeader();
        c && i.append("x-firebase-client", c)
    }
    const s = {
        installation: {
            sdkVersion: Xk,
            appId: t.appId
        }
    }
      , a = {
        method: "POST",
        headers: i,
        body: JSON.stringify(s)
    }
      , l = await tR( () => fetch(n, a));
    if (l.ok) {
        const c = await l.json();
        return Jk(c)
    } else
        throw await Qk("Generate Auth Token", l)
}
function Nge(t, {fid: e}) {
    return `${Zk(t)}/${e}/authTokens:generate`
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function rC(t, e=!1) {
    let r;
    const n = await B1(t.appConfig, o => {
        if (!lR(o))
            throw Sl.create("not-registered");
        const s = o.authToken;
        if (!e && Uge(s))
            return o;
        if (s.requestStatus === 1)
            return r = Lge(t, e),
            o;
        {
            if (!navigator.onLine)
                throw Sl.create("app-offline");
            const a = Hge(o);
            return r = $ge(t, a),
            a
        }
    }
    );
    return r ? await r : n.authToken
}
async function Lge(t, e) {
    let r = await h4(t.appConfig);
    for (; r.authToken.requestStatus === 1; )
        await rR(100),
        r = await h4(t.appConfig);
    const n = r.authToken;
    return n.requestStatus === 0 ? rC(t, e) : n
}
function h4(t) {
    return B1(t, e => {
        if (!lR(e))
            throw Sl.create("not-registered");
        const r = e.authToken;
        return Vge(r) ? Object.assign(Object.assign({}, e), {
            authToken: {
                requestStatus: 0
            }
        }) : e
    }
    )
}
async function $ge(t, e) {
    try {
        const r = await Mge(t, e)
          , n = Object.assign(Object.assign({}, e), {
            authToken: r
        });
        return await Wx(t.appConfig, n),
        r
    } catch (r) {
        if (qk(r) && (r.customData.serverCode === 401 || r.customData.serverCode === 404))
            await sR(t.appConfig);
        else {
            const n = Object.assign(Object.assign({}, e), {
                authToken: {
                    requestStatus: 0
                }
            });
            await Wx(t.appConfig, n)
        }
        throw r
    }
}
function lR(t) {
    return t !== void 0 && t.registrationStatus === 2
}
function Uge(t) {
    return t.requestStatus === 2 && !Gge(t)
}
function Gge(t) {
    const e = Date.now();
    return e < t.creationTime || t.creationTime + t.expiresIn < e + xge
}
function Hge(t) {
    const e = {
        requestStatus: 1,
        requestTime: Date.now()
    };
    return Object.assign(Object.assign({}, t), {
        authToken: e
    })
}
function Vge(t) {
    return t.requestStatus === 1 && t.requestTime + Yk < Date.now()
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function zge(t) {
    const e = t
      , {installationEntry: r, registrationPromise: n} = await tC(e);
    return n ? n.catch(console.error) : rC(e).catch(console.error),
    r.fid
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function jge(t, e=!1) {
    const r = t;
    return await Wge(r),
    (await rC(r, e)).token
}
async function Wge(t) {
    const {registrationPromise: e} = await tC(t);
    e && await e
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function Yge(t) {
    if (!t || !t.options)
        throw vm("App Configuration");
    if (!t.name)
        throw vm("App Name");
    const e = ["projectId", "apiKey", "appId"];
    for (const r of e)
        if (!t.options[r])
            throw vm(r);
    return {
        appName: t.name,
        projectId: t.options.projectId,
        apiKey: t.options.apiKey,
        appId: t.options.appId
    }
}
function vm(t) {
    return Sl.create("missing-app-config-values", {
        valueName: t
    })
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const cR = "installations"
  , Xge = "installations-internal"
  , Kge = t => {
    const e = t.getProvider("app").getImmediate()
      , r = Yge(e)
      , n = pd(e, "heartbeat");
    return {
        app: e,
        appConfig: r,
        heartbeatServiceProvider: n,
        _delete: () => Promise.resolve()
    }
}
  , qge = t => {
    const e = t.getProvider("app").getImmediate()
      , r = pd(e, cR).getImmediate();
    return {
        getId: () => zge(r),
        getToken: i => jge(r, i)
    }
}
;
function Zge() {
    ps(new Co(cR,Kge,"PUBLIC")),
    ps(new Co(Xge,qge,"PRIVATE"))
}
Zge();
xo(Wk, Qb);
xo(Wk, Qb, "esm2017");
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Yx = "analytics"
  , Jge = "firebase_id"
  , Qge = "origin"
  , eme = 60 * 1e3
  , tme = "https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig"
  , nC = "https://www.googletagmanager.com/gtag/js";
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Fn = new Uk("@firebase/analytics");
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const rme = {
    "already-exists": "A Firebase Analytics instance with the appId {$id}  already exists. Only one Firebase Analytics instance can be created for each appId.",
    "already-initialized": "initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.",
    "already-initialized-settings": "Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.",
    "interop-component-reg-failed": "Firebase Analytics Interop Component failed to instantiate: {$reason}",
    "invalid-analytics-context": "Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",
    "indexeddb-unavailable": "IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}",
    "fetch-throttle": "The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.",
    "config-fetch-failed": "Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}",
    "no-api-key": 'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',
    "no-app-id": 'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',
    "no-client-id": 'The "client_id" field is empty.',
    "invalid-gtag-resource": "Trusted Types detected an invalid gtag resource: {$gtagURL}."
}
  , Yn = new hd("analytics","Analytics",rme);
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function nme(t) {
    if (!t.startsWith(nC)) {
        const e = Yn.create("invalid-gtag-resource", {
            gtagURL: t
        });
        return Fn.warn(e.message),
        ""
    }
    return t
}
function uR(t) {
    return Promise.all(t.map(e => e.catch(r => r)))
}
function ime(t, e) {
    let r;
    return window.trustedTypes && (r = window.trustedTypes.createPolicy(t, e)),
    r
}
function ome(t, e) {
    const r = ime("firebase-js-sdk-policy", {
        createScriptURL: nme
    })
      , n = document.createElement("script")
      , i = `${nC}?l=${t}&id=${e}`;
    n.src = r ? r == null ? void 0 : r.createScriptURL(i) : i,
    n.async = !0,
    document.head.appendChild(n)
}
function sme(t) {
    let e = [];
    return Array.isArray(window[t]) ? e = window[t] : window[t] = e,
    e
}
async function ame(t, e, r, n, i, o) {
    const s = n[i];
    try {
        if (s)
            await e[s];
        else {
            const l = (await uR(r)).find(c => c.measurementId === i);
            l && await e[l.appId]
        }
    } catch (a) {
        Fn.error(a)
    }
    t("config", i, o)
}
async function lme(t, e, r, n, i) {
    try {
        let o = [];
        if (i && i.send_to) {
            let s = i.send_to;
            Array.isArray(s) || (s = [s]);
            const a = await uR(r);
            for (const l of s) {
                const c = a.find(f => f.measurementId === l)
                  , u = c && e[c.appId];
                if (u)
                    o.push(u);
                else {
                    o = [];
                    break
                }
            }
        }
        o.length === 0 && (o = Object.values(e)),
        await Promise.all(o),
        t("event", n, i || {})
    } catch (o) {
        Fn.error(o)
    }
}
function cme(t, e, r, n) {
    async function i(o, ...s) {
        try {
            if (o === "event") {
                const [a,l] = s;
                await lme(t, e, r, a, l)
            } else if (o === "config") {
                const [a,l] = s;
                await ame(t, e, r, n, a, l)
            } else if (o === "consent") {
                const [a,l] = s;
                t("consent", a, l)
            } else if (o === "get") {
                const [a,l,c] = s;
                t("get", a, l, c)
            } else if (o === "set") {
                const [a] = s;
                t("set", a)
            } else
                t(o, ...s)
        } catch (a) {
            Fn.error(a)
        }
    }
    return i
}
function ume(t, e, r, n, i) {
    let o = function(...s) {
        window[n].push(arguments)
    };
    return window[i] && typeof window[i] == "function" && (o = window[i]),
    window[i] = cme(o, t, e, r),
    {
        gtagCore: o,
        wrappedGtag: window[i]
    }
}
function fme(t) {
    const e = window.document.getElementsByTagName("script");
    for (const r of Object.values(e))
        if (r.src && r.src.includes(nC) && r.src.includes(t))
            return r;
    return null
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const dme = 30
  , hme = 1e3;
class xme {
    constructor(e={}, r=hme) {
        this.throttleMetadata = e,
        this.intervalMillis = r
    }
    getThrottleMetadata(e) {
        return this.throttleMetadata[e]
    }
    setThrottleMetadata(e, r) {
        this.throttleMetadata[e] = r
    }
    deleteThrottleMetadata(e) {
        delete this.throttleMetadata[e]
    }
}
const fR = new xme;
function pme(t) {
    return new Headers({
        Accept: "application/json",
        "x-goog-api-key": t
    })
}
async function gme(t) {
    var e;
    const {appId: r, apiKey: n} = t
      , i = {
        method: "GET",
        headers: pme(n)
    }
      , o = tme.replace("{app-id}", r)
      , s = await fetch(o, i);
    if (s.status !== 200 && s.status !== 304) {
        let a = "";
        try {
            const l = await s.json();
            !((e = l.error) === null || e === void 0) && e.message && (a = l.error.message)
        } catch {}
        throw Yn.create("config-fetch-failed", {
            httpStatus: s.status,
            responseMessage: a
        })
    }
    return s.json()
}
async function mme(t, e=fR, r) {
    const {appId: n, apiKey: i, measurementId: o} = t.options;
    if (!n)
        throw Yn.create("no-app-id");
    if (!i) {
        if (o)
            return {
                measurementId: o,
                appId: n
            };
        throw Yn.create("no-api-key")
    }
    const s = e.getThrottleMetadata(n) || {
        backoffCount: 0,
        throttleEndTimeMillis: Date.now()
    }
      , a = new Eme;
    return setTimeout(async () => {
        a.abort()
    }
    , r !== void 0 ? r : eme),
    dR({
        appId: n,
        apiKey: i,
        measurementId: o
    }, s, a, e)
}
async function dR(t, {throttleEndTimeMillis: e, backoffCount: r}, n, i=fR) {
    var o;
    const {appId: s, measurementId: a} = t;
    try {
        await vme(n, e)
    } catch (l) {
        if (a)
            return Fn.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${a} provided in the "measurementId" field in the local Firebase config. [${l == null ? void 0 : l.message}]`),
            {
                appId: s,
                measurementId: a
            };
        throw l
    }
    try {
        const l = await gme(t);
        return i.deleteThrottleMetadata(s),
        l
    } catch (l) {
        const c = l;
        if (!yme(c)) {
            if (i.deleteThrottleMetadata(s),
            a)
                return Fn.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${a} provided in the "measurementId" field in the local Firebase config. [${c == null ? void 0 : c.message}]`),
                {
                    appId: s,
                    measurementId: a
                };
            throw l
        }
        const u = Number((o = c == null ? void 0 : c.customData) === null || o === void 0 ? void 0 : o.httpStatus) === 503 ? n4(r, i.intervalMillis, dme) : n4(r, i.intervalMillis)
          , f = {
            throttleEndTimeMillis: Date.now() + u,
            backoffCount: r + 1
        };
        return i.setThrottleMetadata(s, f),
        Fn.debug(`Calling attemptFetch again in ${u} millis`),
        dR(t, f, n, i)
    }
}
function vme(t, e) {
    return new Promise( (r, n) => {
        const i = Math.max(e - Date.now(), 0)
          , o = setTimeout(r, i);
        t.addEventListener( () => {
            clearTimeout(o),
            n(Yn.create("fetch-throttle", {
                throttleEndTimeMillis: e
            }))
        }
        )
    }
    )
}
function yme(t) {
    if (!(t instanceof Hl) || !t.customData)
        return !1;
    const e = Number(t.customData.httpStatus);
    return e === 429 || e === 500 || e === 503 || e === 504
}
class Eme {
    constructor() {
        this.listeners = []
    }
    addEventListener(e) {
        this.listeners.push(e)
    }
    abort() {
        this.listeners.forEach(e => e())
    }
}
async function _me(t, e, r, n, i) {
    if (i && i.global) {
        t("event", r, n);
        return
    } else {
        const o = await e
          , s = Object.assign(Object.assign({}, n), {
            send_to: o
        });
        t("event", r, s)
    }
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function bme() {
    if (qb())
        try {
            await Zb()
        } catch (t) {
            return Fn.warn(Yn.create("indexeddb-unavailable", {
                errorInfo: t == null ? void 0 : t.toString()
            }).message),
            !1
        }
    else
        return Fn.warn(Yn.create("indexeddb-unavailable", {
            errorInfo: "IndexedDB is not available in this environment."
        }).message),
        !1;
    return !0
}
async function Cme(t, e, r, n, i, o, s) {
    var a;
    const l = mme(t);
    l.then(h => {
        r[h.measurementId] = h.appId,
        t.options.measurementId && h.measurementId !== t.options.measurementId && Fn.warn(`The measurement ID in the local Firebase config (${t.options.measurementId}) does not match the measurement ID fetched from the server (${h.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)
    }
    ).catch(h => Fn.error(h)),
    e.push(l);
    const c = bme().then(h => {
        if (h)
            return n.getId()
    }
    )
      , [u,f] = await Promise.all([l, c]);
    fme(o) || ome(o, u.measurementId),
    i("js", new Date);
    const d = (a = s == null ? void 0 : s.config) !== null && a !== void 0 ? a : {};
    return d[Qge] = "firebase",
    d.update = !0,
    f != null && (d[Jge] = f),
    i("config", u.measurementId, d),
    u.measurementId
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
class Ame {
    constructor(e) {
        this.app = e
    }
    _delete() {
        return delete H0[this.app.options.appId],
        Promise.resolve()
    }
}
let H0 = {}
  , x4 = [];
const p4 = {};
let ym = "dataLayer", wme = "gtag", g4, hR, m4 = !1;
function Bme() {
    const t = [];
    if (qpe() && t.push("This is a browser extension environment."),
    $k() || t.push("Cookies are not available."),
    t.length > 0) {
        const e = t.map( (n, i) => `(${i + 1}) ${n}`).join(" ")
          , r = Yn.create("invalid-analytics-context", {
            errorInfo: e
        });
        Fn.warn(r.message)
    }
}
function Sme(t, e, r) {
    Bme();
    const n = t.options.appId;
    if (!n)
        throw Yn.create("no-app-id");
    if (!t.options.apiKey)
        if (t.options.measurementId)
            Fn.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${t.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);
        else
            throw Yn.create("no-api-key");
    if (H0[n] != null)
        throw Yn.create("already-exists", {
            id: n
        });
    if (!m4) {
        sme(ym);
        const {wrappedGtag: o, gtagCore: s} = ume(H0, x4, p4, ym, wme);
        hR = o,
        g4 = s,
        m4 = !0
    }
    return H0[n] = Cme(t, x4, p4, e, g4, ym, r),
    new Ame(t)
}
function w6e(t=Vk()) {
    t = xd(t);
    const e = pd(t, Yx);
    return e.isInitialized() ? e.getImmediate() : Tme(t)
}
function Tme(t, e={}) {
    const r = pd(t, Yx);
    if (r.isInitialized()) {
        const i = r.getImmediate();
        if (zx(e, r.getOptions()))
            return i;
        throw Yn.create("already-initialized")
    }
    return r.initialize({
        options: e
    })
}
function Dme(t, e, r, n) {
    t = xd(t),
    _me(hR, H0[t.app.options.appId], e, r, n).catch(i => Fn.error(i))
}
const v4 = "@firebase/analytics"
  , y4 = "0.10.17";
function Fme() {
    ps(new Co(Yx, (e, {options: r}) => {
        const n = e.getProvider("app").getImmediate()
          , i = e.getProvider("installations-internal").getImmediate();
        return Sme(n, i, r)
    }
    ,"PUBLIC")),
    ps(new Co("analytics-internal",t,"PRIVATE")),
    xo(v4, y4),
    xo(v4, y4, "esm2017");
    function t(e) {
        try {
            const r = e.getProvider(Yx).getImmediate();
            return {
                logEvent: (n, i, o) => Dme(r, n, i, o)
            }
        } catch (r) {
            throw Yn.create("interop-component-reg-failed", {
                reason: r
            })
        }
    }
}
Fme();
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Pme = "/firebase-messaging-sw.js"
  , Ime = "/firebase-cloud-messaging-push-scope"
  , xR = "BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4"
  , Ome = "https://fcmregistrations.googleapis.com/v1"
  , pR = "google.c.a.c_id"
  , kme = "google.c.a.c_l"
  , Rme = "google.c.a.ts"
  , Mme = "google.c.a.e"
  , E4 = 1e4;
var _4;
(function(t) {
    t[t.DATA_MESSAGE = 1] = "DATA_MESSAGE",
    t[t.DISPLAY_NOTIFICATION = 3] = "DISPLAY_NOTIFICATION"
}
)(_4 || (_4 = {}));
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
var Tf;
(function(t) {
    t.PUSH_RECEIVED = "push-received",
    t.NOTIFICATION_CLICKED = "notification-clicked"
}
)(Tf || (Tf = {}));
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function Uo(t) {
    const e = new Uint8Array(t);
    return btoa(String.fromCharCode(...e)).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_")
}
function Nme(t) {
    const e = "=".repeat((4 - t.length % 4) % 4)
      , r = (t + e).replace(/\-/g, "+").replace(/_/g, "/")
      , n = atob(r)
      , i = new Uint8Array(n.length);
    for (let o = 0; o < n.length; ++o)
        i[o] = n.charCodeAt(o);
    return i
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Em = "fcm_token_details_db"
  , Lme = 5
  , b4 = "fcm_token_object_Store";
async function $me(t) {
    if ("databases"in indexedDB && !(await indexedDB.databases()).map(o => o.name).includes(Em))
        return null;
    let e = null;
    return (await A1(Em, Lme, {
        upgrade: async (n, i, o, s) => {
            var a;
            if (i < 2 || !n.objectStoreNames.contains(b4))
                return;
            const l = s.objectStore(b4)
              , c = await l.index("fcmSenderId").get(t);
            if (await l.clear(),
            !!c) {
                if (i === 2) {
                    const u = c;
                    if (!u.auth || !u.p256dh || !u.endpoint)
                        return;
                    e = {
                        token: u.fcmToken,
                        createTime: (a = u.createTime) !== null && a !== void 0 ? a : Date.now(),
                        subscriptionOptions: {
                            auth: u.auth,
                            p256dh: u.p256dh,
                            endpoint: u.endpoint,
                            swScope: u.swScope,
                            vapidKey: typeof u.vapidKey == "string" ? u.vapidKey : Uo(u.vapidKey)
                        }
                    }
                } else if (i === 3) {
                    const u = c;
                    e = {
                        token: u.fcmToken,
                        createTime: u.createTime,
                        subscriptionOptions: {
                            auth: Uo(u.auth),
                            p256dh: Uo(u.p256dh),
                            endpoint: u.endpoint,
                            swScope: u.swScope,
                            vapidKey: Uo(u.vapidKey)
                        }
                    }
                } else if (i === 4) {
                    const u = c;
                    e = {
                        token: u.fcmToken,
                        createTime: u.createTime,
                        subscriptionOptions: {
                            auth: Uo(u.auth),
                            p256dh: Uo(u.p256dh),
                            endpoint: u.endpoint,
                            swScope: u.swScope,
                            vapidKey: Uo(u.vapidKey)
                        }
                    }
                }
            }
        }
    })).close(),
    await xm(Em),
    await xm("fcm_vapid_details_db"),
    await xm("undefined"),
    Ume(e) ? e : null
}
function Ume(t) {
    if (!t || !t.subscriptionOptions)
        return !1;
    const {subscriptionOptions: e} = t;
    return typeof t.createTime == "number" && t.createTime > 0 && typeof t.token == "string" && t.token.length > 0 && typeof e.auth == "string" && e.auth.length > 0 && typeof e.p256dh == "string" && e.p256dh.length > 0 && typeof e.endpoint == "string" && e.endpoint.length > 0 && typeof e.swScope == "string" && e.swScope.length > 0 && typeof e.vapidKey == "string" && e.vapidKey.length > 0
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Gme = "firebase-messaging-database"
  , Hme = 1
  , Df = "firebase-messaging-store";
let _m = null;
function gR() {
    return _m || (_m = A1(Gme, Hme, {
        upgrade: (t, e) => {
            switch (e) {
            case 0:
                t.createObjectStore(Df)
            }
        }
    })),
    _m
}
async function Vme(t) {
    const e = mR(t)
      , n = await (await gR()).transaction(Df).objectStore(Df).get(e);
    if (n)
        return n;
    {
        const i = await $me(t.appConfig.senderId);
        if (i)
            return await iC(t, i),
            i
    }
}
async function iC(t, e) {
    const r = mR(t)
      , i = (await gR()).transaction(Df, "readwrite");
    return await i.objectStore(Df).put(e, r),
    await i.done,
    e
}
function mR({appConfig: t}) {
    return t.appId
}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const zme = {
    "missing-app-config-values": 'Missing App configuration value: "{$valueName}"',
    "only-available-in-window": "This method is available in a Window context.",
    "only-available-in-sw": "This method is available in a service worker context.",
    "permission-default": "The notification permission was not granted and dismissed instead.",
    "permission-blocked": "The notification permission was not granted and blocked instead.",
    "unsupported-browser": "This browser doesn't support the API's required to use the Firebase SDK.",
    "indexed-db-unsupported": "This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)",
    "failed-service-worker-registration": "We are unable to register the default service worker. {$browserErrorMessage}",
    "token-subscribe-failed": "A problem occurred while subscribing the user to FCM: {$errorInfo}",
    "token-subscribe-no-token": "FCM returned no token when subscribing the user to push.",
    "token-unsubscribe-failed": "A problem occurred while unsubscribing the user from FCM: {$errorInfo}",
    "token-update-failed": "A problem occurred while updating the user from FCM: {$errorInfo}",
    "token-update-no-token": "FCM returned no token when updating the user to push.",
    "use-sw-after-get-token": "The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.",
    "invalid-sw-registration": "The input to useServiceWorker() must be a ServiceWorkerRegistration.",
    "invalid-bg-handler": "The input to setBackgroundMessageHandler() must be a function.",
    "invalid-vapid-key": "The public VAPID key must be a string.",
    "use-vapid-key-after-get-token": "The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used."
}
  , Qr = new hd("messaging","Messaging",zme);
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function jme(t, e) {
    const r = await sC(t)
      , n = vR(e)
      , i = {
        method: "POST",
        headers: r,
        body: JSON.stringify(n)
    };
    let o;
    try {
        o = await (await fetch(oC(t.appConfig), i)).json()
    } catch (s) {
        throw Qr.create("token-subscribe-failed", {
            errorInfo: s == null ? void 0 : s.toString()
        })
    }
    if (o.error) {
        const s = o.error.message;
        throw Qr.create("token-subscribe-failed", {
            errorInfo: s
        })
    }
    if (!o.token)
        throw Qr.create("token-subscribe-no-token");
    return o.token
}
async function Wme(t, e) {
    const r = await sC(t)
      , n = vR(e.subscriptionOptions)
      , i = {
        method: "PATCH",
        headers: r,
        body: JSON.stringify(n)
    };
    let o;
    try {
        o = await (await fetch(`${oC(t.appConfig)}/${e.token}`, i)).json()
    } catch (s) {
        throw Qr.create("token-update-failed", {
            errorInfo: s == null ? void 0 : s.toString()
        })
    }
    if (o.error) {
        const s = o.error.message;
        throw Qr.create("token-update-failed", {
            errorInfo: s
        })
    }
    if (!o.token)
        throw Qr.create("token-update-no-token");
    return o.token
}
async function Yme(t, e) {
    const n = {
        method: "DELETE",
        headers: await sC(t)
    };
    try {
        const o = await (await fetch(`${oC(t.appConfig)}/${e}`, n)).json();
        if (o.error) {
            const s = o.error.message;
            throw Qr.create("token-unsubscribe-failed", {
                errorInfo: s
            })
        }
    } catch (i) {
        throw Qr.create("token-unsubscribe-failed", {
            errorInfo: i == null ? void 0 : i.toString()
        })
    }
}
function oC({projectId: t}) {
    return `${Ome}/projects/${t}/registrations`
}
async function sC({appConfig: t, installations: e}) {
    const r = await e.getToken();
    return new Headers({
        "Content-Type": "application/json",
        Accept: "application/json",
        "x-goog-api-key": t.apiKey,
        "x-goog-firebase-installations-auth": `FIS ${r}`
    })
}
function vR({p256dh: t, auth: e, endpoint: r, vapidKey: n}) {
    const i = {
        web: {
            endpoint: r,
            auth: e,
            p256dh: t
        }
    };
    return n !== xR && (i.web.applicationPubKey = n),
    i
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const Xme = 7 * 24 * 60 * 60 * 1e3;
async function Kme(t) {
    const e = await Zme(t.swRegistration, t.vapidKey)
      , r = {
        vapidKey: t.vapidKey,
        swScope: t.swRegistration.scope,
        endpoint: e.endpoint,
        auth: Uo(e.getKey("auth")),
        p256dh: Uo(e.getKey("p256dh"))
    }
      , n = await Vme(t.firebaseDependencies);
    if (n) {
        if (Jme(n.subscriptionOptions, r))
            return Date.now() >= n.createTime + Xme ? qme(t, {
                token: n.token,
                createTime: Date.now(),
                subscriptionOptions: r
            }) : n.token;
        try {
            await Yme(t.firebaseDependencies, n.token)
        } catch (i) {
            console.warn(i)
        }
        return C4(t.firebaseDependencies, r)
    } else
        return C4(t.firebaseDependencies, r)
}
async function qme(t, e) {
    try {
        const r = await Wme(t.firebaseDependencies, e)
          , n = Object.assign(Object.assign({}, e), {
            token: r,
            createTime: Date.now()
        });
        return await iC(t.firebaseDependencies, n),
        r
    } catch (r) {
        throw r
    }
}
async function C4(t, e) {
    const n = {
        token: await jme(t, e),
        createTime: Date.now(),
        subscriptionOptions: e
    };
    return await iC(t, n),
    n.token
}
async function Zme(t, e) {
    const r = await t.pushManager.getSubscription();
    return r || t.pushManager.subscribe({
        userVisibleOnly: !0,
        applicationServerKey: Nme(e)
    })
}
function Jme(t, e) {
    const r = e.vapidKey === t.vapidKey
      , n = e.endpoint === t.endpoint
      , i = e.auth === t.auth
      , o = e.p256dh === t.p256dh;
    return r && n && i && o
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function A4(t) {
    const e = {
        from: t.from,
        collapseKey: t.collapse_key,
        messageId: t.fcmMessageId
    };
    return Qme(e, t),
    eve(e, t),
    tve(e, t),
    e
}
function Qme(t, e) {
    if (!e.notification)
        return;
    t.notification = {};
    const r = e.notification.title;
    r && (t.notification.title = r);
    const n = e.notification.body;
    n && (t.notification.body = n);
    const i = e.notification.image;
    i && (t.notification.image = i);
    const o = e.notification.icon;
    o && (t.notification.icon = o)
}
function eve(t, e) {
    e.data && (t.data = e.data)
}
function tve(t, e) {
    var r, n, i, o, s;
    if (!e.fcmOptions && !(!((r = e.notification) === null || r === void 0) && r.click_action))
        return;
    t.fcmOptions = {};
    const a = (i = (n = e.fcmOptions) === null || n === void 0 ? void 0 : n.link) !== null && i !== void 0 ? i : (o = e.notification) === null || o === void 0 ? void 0 : o.click_action;
    a && (t.fcmOptions.link = a);
    const l = (s = e.fcmOptions) === null || s === void 0 ? void 0 : s.analytics_label;
    l && (t.fcmOptions.analyticsLabel = l)
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function rve(t) {
    return typeof t == "object" && !!t && pR in t
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
nve("AzSCbw63g1R0nCw85jG8", "Iaya3yLKwmgvh7cF0q4");
function nve(t, e) {
    const r = [];
    for (let n = 0; n < t.length; n++)
        r.push(t.charAt(n)),
        n < e.length && r.push(e.charAt(n));
    return r.join("")
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function ive(t) {
    if (!t || !t.options)
        throw bm("App Configuration Object");
    if (!t.name)
        throw bm("App Name");
    const e = ["projectId", "apiKey", "appId", "messagingSenderId"]
      , {options: r} = t;
    for (const n of e)
        if (!r[n])
            throw bm(n);
    return {
        appName: t.name,
        projectId: r.projectId,
        apiKey: r.apiKey,
        appId: r.appId,
        senderId: r.messagingSenderId
    }
}
function bm(t) {
    return Qr.create("missing-app-config-values", {
        valueName: t
    })
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
class ove {
    constructor(e, r, n) {
        this.deliveryMetricsExportedToBigQueryEnabled = !1,
        this.onBackgroundMessageHandler = null,
        this.onMessageHandler = null,
        this.logEvents = [],
        this.isLogServiceStarted = !1;
        const i = ive(e);
        this.firebaseDependencies = {
            app: e,
            appConfig: i,
            installations: r,
            analyticsProvider: n
        }
    }
    _delete() {
        return Promise.resolve()
    }
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function sve(t) {
    try {
        t.swRegistration = await navigator.serviceWorker.register(Pme, {
            scope: Ime
        }),
        t.swRegistration.update().catch( () => {}
        ),
        await ave(t.swRegistration)
    } catch (e) {
        throw Qr.create("failed-service-worker-registration", {
            browserErrorMessage: e == null ? void 0 : e.message
        })
    }
}
async function ave(t) {
    return new Promise( (e, r) => {
        const n = setTimeout( () => r(new Error(`Service worker not registered after ${E4} ms`)), E4)
          , i = t.installing || t.waiting;
        t.active ? (clearTimeout(n),
        e()) : i ? i.onstatechange = o => {
            var s;
            ((s = o.target) === null || s === void 0 ? void 0 : s.state) === "activated" && (i.onstatechange = null,
            clearTimeout(n),
            e())
        }
        : (clearTimeout(n),
        r(new Error("No incoming service worker found.")))
    }
    )
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function lve(t, e) {
    if (!e && !t.swRegistration && await sve(t),
    !(!e && t.swRegistration)) {
        if (!(e instanceof ServiceWorkerRegistration))
            throw Qr.create("invalid-sw-registration");
        t.swRegistration = e
    }
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function cve(t, e) {
    e ? t.vapidKey = e : t.vapidKey || (t.vapidKey = xR)
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function yR(t, e) {
    if (!navigator)
        throw Qr.create("only-available-in-window");
    if (Notification.permission === "default" && await Notification.requestPermission(),
    Notification.permission !== "granted")
        throw Qr.create("permission-blocked");
    return await cve(t, e == null ? void 0 : e.vapidKey),
    await lve(t, e == null ? void 0 : e.serviceWorkerRegistration),
    Kme(t)
}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function uve(t, e, r) {
    const n = fve(e);
    (await t.firebaseDependencies.analyticsProvider.get()).logEvent(n, {
        message_id: r[pR],
        message_name: r[kme],
        message_time: r[Rme],
        message_device_time: Math.floor(Date.now() / 1e3)
    })
}
function fve(t) {
    switch (t) {
    case Tf.NOTIFICATION_CLICKED:
        return "notification_open";
    case Tf.PUSH_RECEIVED:
        return "notification_foreground";
    default:
        throw new Error
    }
}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function dve(t, e) {
    const r = e.data;
    if (!r.isFirebaseMessaging)
        return;
    t.onMessageHandler && r.messageType === Tf.PUSH_RECEIVED && (typeof t.onMessageHandler == "function" ? t.onMessageHandler(A4(r)) : t.onMessageHandler.next(A4(r)));
    const n = r.data;
    rve(n) && n[Mme] === "1" && await uve(t, r.messageType, n)
}
const w4 = "@firebase/messaging"
  , B4 = "0.12.22";
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
const hve = t => {
    const e = new ove(t.getProvider("app").getImmediate(),t.getProvider("installations-internal").getImmediate(),t.getProvider("analytics-internal"));
    return navigator.serviceWorker.addEventListener("message", r => dve(e, r)),
    e
}
  , xve = t => {
    const e = t.getProvider("messaging").getImmediate();
    return {
        getToken: n => yR(e, n)
    }
}
;
function pve() {
    ps(new Co("messaging",hve,"PUBLIC")),
    ps(new Co("messaging-internal",xve,"PRIVATE")),
    xo(w4, B4),
    xo(w4, B4, "esm2017")
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
async function gve() {
    try {
        await Zb()
    } catch {
        return !1
    }
    return typeof window < "u" && qb() && $k() && "serviceWorker"in navigator && "PushManager"in window && "Notification"in window && "fetch"in window && ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification") && PushSubscription.prototype.hasOwnProperty("getKey")
}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function mve(t, e) {
    if (!navigator)
        throw Qr.create("only-available-in-window");
    return t.onMessageHandler = e,
    () => {
        t.onMessageHandler = null
    }
}
/**
 * @license
 * Copyright 2017 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
function B6e(t=Vk()) {
    return gve().then(e => {
        if (!e)
            throw Qr.create("unsupported-browser")
    }
    , e => {
        throw Qr.create("indexed-db-unsupported")
    }
    ),
    pd(xd(t), "messaging").getImmediate()
}
async function S6e(t, e) {
    return t = xd(t),
    yR(t, e)
}
function T6e(t, e) {
    return t = xd(t),
    mve(t, e)
}
pve();
$e.add(Xae);
$e.mixin(kn, Kae);
$e.add(AP);
$e.add(wP);
$e.add(eI);
$e.mixin(kn, B0e);
$e.add(QP);
$e.add(IO);
$e.add(Eb);
$e.add(RO);
$e.add(NO);
$e.add(LO);
$e.add(qO);
$e.add(KO);
$e.add(jO);
$e.add(XO);
$e.add(WO);
$e.add(zO);
$e.add(VO);
$e.add(oI);
$e.add(iI);
const vve = Object.freeze(Object.defineProperty({
    __proto__: null
}, Symbol.toStringTag, {
    value: "Module"
}))
  , yve = Object.freeze(Object.defineProperty({
    __proto__: null
}, Symbol.toStringTag, {
    value: "Module"
}));
var gd = {}
  , Eve = function() {
    return typeof Promise == "function" && Promise.prototype && Promise.prototype.then
}
  , ER = {}
  , ei = {};
let aC;
const _ve = [0, 26, 44, 70, 100, 134, 172, 196, 242, 292, 346, 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085, 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185, 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706];
ei.getSymbolSize = function(e) {
    if (!e)
        throw new Error('"version" cannot be null or undefined');
    if (e < 1 || e > 40)
        throw new Error('"version" should be in range from 1 to 40');
    return e * 4 + 17
}
;
ei.getSymbolTotalCodewords = function(e) {
    return _ve[e]
}
;
ei.getBCHDigit = function(t) {
    let e = 0;
    for (; t !== 0; )
        e++,
        t >>>= 1;
    return e
}
;
ei.setToSJISFunction = function(e) {
    if (typeof e != "function")
        throw new Error('"toSJISFunc" is not a valid function.');
    aC = e
}
;
ei.isKanjiModeEnabled = function() {
    return typeof aC < "u"
}
;
ei.toSJIS = function(e) {
    return aC(e)
}
;
var S1 = {};
(function(t) {
    t.L = {
        bit: 1
    },
    t.M = {
        bit: 0
    },
    t.Q = {
        bit: 3
    },
    t.H = {
        bit: 2
    };
    function e(r) {
        if (typeof r != "string")
            throw new Error("Param is not a string");
        switch (r.toLowerCase()) {
        case "l":
        case "low":
            return t.L;
        case "m":
        case "medium":
            return t.M;
        case "q":
        case "quartile":
            return t.Q;
        case "h":
        case "high":
            return t.H;
        default:
            throw new Error("Unknown EC Level: " + r)
        }
    }
    t.isValid = function(n) {
        return n && typeof n.bit < "u" && n.bit >= 0 && n.bit < 4
    }
    ,
    t.from = function(n, i) {
        if (t.isValid(n))
            return n;
        try {
            return e(n)
        } catch {
            return i
        }
    }
}
)(S1);
function _R() {
    this.buffer = [],
    this.length = 0
}
_R.prototype = {
    get: function(t) {
        const e = Math.floor(t / 8);
        return (this.buffer[e] >>> 7 - t % 8 & 1) === 1
    },
    put: function(t, e) {
        for (let r = 0; r < e; r++)
            this.putBit((t >>> e - r - 1 & 1) === 1)
    },
    getLengthInBits: function() {
        return this.length
    },
    putBit: function(t) {
        const e = Math.floor(this.length / 8);
        this.buffer.length <= e && this.buffer.push(0),
        t && (this.buffer[e] |= 128 >>> this.length % 8),
        this.length++
    }
};
var bve = _R;
function md(t) {
    if (!t || t < 1)
        throw new Error("BitMatrix size must be defined and greater than 0");
    this.size = t,
    this.data = new Uint8Array(t * t),
    this.reservedBit = new Uint8Array(t * t)
}
md.prototype.set = function(t, e, r, n) {
    const i = t * this.size + e;
    this.data[i] = r,
    n && (this.reservedBit[i] = !0)
}
;
md.prototype.get = function(t, e) {
    return this.data[t * this.size + e]
}
;
md.prototype.xor = function(t, e, r) {
    this.data[t * this.size + e] ^= r
}
;
md.prototype.isReserved = function(t, e) {
    return this.reservedBit[t * this.size + e]
}
;
var Cve = md
  , bR = {};
(function(t) {
    const e = ei.getSymbolSize;
    t.getRowColCoords = function(n) {
        if (n === 1)
            return [];
        const i = Math.floor(n / 7) + 2
          , o = e(n)
          , s = o === 145 ? 26 : Math.ceil((o - 13) / (2 * i - 2)) * 2
          , a = [o - 7];
        for (let l = 1; l < i - 1; l++)
            a[l] = a[l - 1] - s;
        return a.push(6),
        a.reverse()
    }
    ,
    t.getPositions = function(n) {
        const i = []
          , o = t.getRowColCoords(n)
          , s = o.length;
        for (let a = 0; a < s; a++)
            for (let l = 0; l < s; l++)
                a === 0 && l === 0 || a === 0 && l === s - 1 || a === s - 1 && l === 0 || i.push([o[a], o[l]]);
        return i
    }
}
)(bR);
var CR = {};
const Ave = ei.getSymbolSize
  , S4 = 7;
CR.getPositions = function(e) {
    const r = Ave(e);
    return [[0, 0], [r - S4, 0], [0, r - S4]]
}
;
var AR = {};
(function(t) {
    t.Patterns = {
        PATTERN000: 0,
        PATTERN001: 1,
        PATTERN010: 2,
        PATTERN011: 3,
        PATTERN100: 4,
        PATTERN101: 5,
        PATTERN110: 6,
        PATTERN111: 7
    };
    const e = {
        N1: 3,
        N2: 3,
        N3: 40,
        N4: 10
    };
    t.isValid = function(i) {
        return i != null && i !== "" && !isNaN(i) && i >= 0 && i <= 7
    }
    ,
    t.from = function(i) {
        return t.isValid(i) ? parseInt(i, 10) : void 0
    }
    ,
    t.getPenaltyN1 = function(i) {
        const o = i.size;
        let s = 0
          , a = 0
          , l = 0
          , c = null
          , u = null;
        for (let f = 0; f < o; f++) {
            a = l = 0,
            c = u = null;
            for (let d = 0; d < o; d++) {
                let h = i.get(f, d);
                h === c ? a++ : (a >= 5 && (s += e.N1 + (a - 5)),
                c = h,
                a = 1),
                h = i.get(d, f),
                h === u ? l++ : (l >= 5 && (s += e.N1 + (l - 5)),
                u = h,
                l = 1)
            }
            a >= 5 && (s += e.N1 + (a - 5)),
            l >= 5 && (s += e.N1 + (l - 5))
        }
        return s
    }
    ,
    t.getPenaltyN2 = function(i) {
        const o = i.size;
        let s = 0;
        for (let a = 0; a < o - 1; a++)
            for (let l = 0; l < o - 1; l++) {
                const c = i.get(a, l) + i.get(a, l + 1) + i.get(a + 1, l) + i.get(a + 1, l + 1);
                (c === 4 || c === 0) && s++
            }
        return s * e.N2
    }
    ,
    t.getPenaltyN3 = function(i) {
        const o = i.size;
        let s = 0
          , a = 0
          , l = 0;
        for (let c = 0; c < o; c++) {
            a = l = 0;
            for (let u = 0; u < o; u++)
                a = a << 1 & 2047 | i.get(c, u),
                u >= 10 && (a === 1488 || a === 93) && s++,
                l = l << 1 & 2047 | i.get(u, c),
                u >= 10 && (l === 1488 || l === 93) && s++
        }
        return s * e.N3
    }
    ,
    t.getPenaltyN4 = function(i) {
        let o = 0;
        const s = i.data.length;
        for (let l = 0; l < s; l++)
            o += i.data[l];
        return Math.abs(Math.ceil(o * 100 / s / 5) - 10) * e.N4
    }
    ;
    function r(n, i, o) {
        switch (n) {
        case t.Patterns.PATTERN000:
            return (i + o) % 2 === 0;
        case t.Patterns.PATTERN001:
            return i % 2 === 0;
        case t.Patterns.PATTERN010:
            return o % 3 === 0;
        case t.Patterns.PATTERN011:
            return (i + o) % 3 === 0;
        case t.Patterns.PATTERN100:
            return (Math.floor(i / 2) + Math.floor(o / 3)) % 2 === 0;
        case t.Patterns.PATTERN101:
            return i * o % 2 + i * o % 3 === 0;
        case t.Patterns.PATTERN110:
            return (i * o % 2 + i * o % 3) % 2 === 0;
        case t.Patterns.PATTERN111:
            return (i * o % 3 + (i + o) % 2) % 2 === 0;
        default:
            throw new Error("bad maskPattern:" + n)
        }
    }
    t.applyMask = function(i, o) {
        const s = o.size;
        for (let a = 0; a < s; a++)
            for (let l = 0; l < s; l++)
                o.isReserved(l, a) || o.xor(l, a, r(i, l, a))
    }
    ,
    t.getBestMask = function(i, o) {
        const s = Object.keys(t.Patterns).length;
        let a = 0
          , l = 1 / 0;
        for (let c = 0; c < s; c++) {
            o(c),
            t.applyMask(c, i);
            const u = t.getPenaltyN1(i) + t.getPenaltyN2(i) + t.getPenaltyN3(i) + t.getPenaltyN4(i);
            t.applyMask(c, i),
            u < l && (l = u,
            a = c)
        }
        return a
    }
}
)(AR);
var T1 = {};
const Vs = S1
  , bh = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 4, 1, 2, 4, 4, 2, 4, 4, 4, 2, 4, 6, 5, 2, 4, 6, 6, 2, 5, 8, 8, 4, 5, 8, 8, 4, 5, 8, 11, 4, 8, 10, 11, 4, 9, 12, 16, 4, 9, 16, 16, 6, 10, 12, 18, 6, 10, 17, 16, 6, 11, 16, 19, 6, 13, 18, 21, 7, 14, 21, 25, 8, 16, 20, 25, 8, 17, 23, 25, 9, 17, 23, 34, 9, 18, 25, 30, 10, 20, 27, 32, 12, 21, 29, 35, 12, 23, 34, 37, 12, 25, 34, 40, 13, 26, 35, 42, 14, 28, 38, 45, 15, 29, 40, 48, 16, 31, 43, 51, 17, 33, 45, 54, 18, 35, 48, 57, 19, 37, 51, 60, 19, 38, 53, 63, 20, 40, 56, 66, 21, 43, 59, 70, 22, 45, 62, 74, 24, 47, 65, 77, 25, 49, 68, 81]
  , Ch = [7, 10, 13, 17, 10, 16, 22, 28, 15, 26, 36, 44, 20, 36, 52, 64, 26, 48, 72, 88, 36, 64, 96, 112, 40, 72, 108, 130, 48, 88, 132, 156, 60, 110, 160, 192, 72, 130, 192, 224, 80, 150, 224, 264, 96, 176, 260, 308, 104, 198, 288, 352, 120, 216, 320, 384, 132, 240, 360, 432, 144, 280, 408, 480, 168, 308, 448, 532, 180, 338, 504, 588, 196, 364, 546, 650, 224, 416, 600, 700, 224, 442, 644, 750, 252, 476, 690, 816, 270, 504, 750, 900, 300, 560, 810, 960, 312, 588, 870, 1050, 336, 644, 952, 1110, 360, 700, 1020, 1200, 390, 728, 1050, 1260, 420, 784, 1140, 1350, 450, 812, 1200, 1440, 480, 868, 1290, 1530, 510, 924, 1350, 1620, 540, 980, 1440, 1710, 570, 1036, 1530, 1800, 570, 1064, 1590, 1890, 600, 1120, 1680, 1980, 630, 1204, 1770, 2100, 660, 1260, 1860, 2220, 720, 1316, 1950, 2310, 750, 1372, 2040, 2430];
T1.getBlocksCount = function(e, r) {
    switch (r) {
    case Vs.L:
        return bh[(e - 1) * 4 + 0];
    case Vs.M:
        return bh[(e - 1) * 4 + 1];
    case Vs.Q:
        return bh[(e - 1) * 4 + 2];
    case Vs.H:
        return bh[(e - 1) * 4 + 3];
    default:
        return
    }
}
;
T1.getTotalCodewordsCount = function(e, r) {
    switch (r) {
    case Vs.L:
        return Ch[(e - 1) * 4 + 0];
    case Vs.M:
        return Ch[(e - 1) * 4 + 1];
    case Vs.Q:
        return Ch[(e - 1) * 4 + 2];
    case Vs.H:
        return Ch[(e - 1) * 4 + 3];
    default:
        return
    }
}
;
var wR = {}
  , D1 = {};
const V0 = new Uint8Array(512)
  , Xx = new Uint8Array(256);
(function() {
    let e = 1;
    for (let r = 0; r < 255; r++)
        V0[r] = e,
        Xx[e] = r,
        e <<= 1,
        e & 256 && (e ^= 285);
    for (let r = 255; r < 512; r++)
        V0[r] = V0[r - 255]
}
)();
D1.log = function(e) {
    if (e < 1)
        throw new Error("log(" + e + ")");
    return Xx[e]
}
;
D1.exp = function(e) {
    return V0[e]
}
;
D1.mul = function(e, r) {
    return e === 0 || r === 0 ? 0 : V0[Xx[e] + Xx[r]]
}
;
(function(t) {
    const e = D1;
    t.mul = function(n, i) {
        const o = new Uint8Array(n.length + i.length - 1);
        for (let s = 0; s < n.length; s++)
            for (let a = 0; a < i.length; a++)
                o[s + a] ^= e.mul(n[s], i[a]);
        return o
    }
    ,
    t.mod = function(n, i) {
        let o = new Uint8Array(n);
        for (; o.length - i.length >= 0; ) {
            const s = o[0];
            for (let l = 0; l < i.length; l++)
                o[l] ^= e.mul(i[l], s);
            let a = 0;
            for (; a < o.length && o[a] === 0; )
                a++;
            o = o.slice(a)
        }
        return o
    }
    ,
    t.generateECPolynomial = function(n) {
        let i = new Uint8Array([1]);
        for (let o = 0; o < n; o++)
            i = t.mul(i, new Uint8Array([1, e.exp(o)]));
        return i
    }
}
)(wR);
const BR = wR;
function lC(t) {
    this.genPoly = void 0,
    this.degree = t,
    this.degree && this.initialize(this.degree)
}
lC.prototype.initialize = function(e) {
    this.degree = e,
    this.genPoly = BR.generateECPolynomial(this.degree)
}
;
lC.prototype.encode = function(e) {
    if (!this.genPoly)
        throw new Error("Encoder not initialized");
    const r = new Uint8Array(e.length + this.degree);
    r.set(e);
    const n = BR.mod(r, this.genPoly)
      , i = this.degree - n.length;
    if (i > 0) {
        const o = new Uint8Array(this.degree);
        return o.set(n, i),
        o
    }
    return n
}
;
var wve = lC
  , SR = {}
  , _a = {}
  , cC = {};
cC.isValid = function(e) {
    return !isNaN(e) && e >= 1 && e <= 40
}
;
var To = {};
const TR = "[0-9]+"
  , Bve = "[A-Z $%*+\\-./:]+";
let Ff = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
Ff = Ff.replace(/u/g, "\\u");
const Sve = "(?:(?![A-Z0-9 $%*+\\-./:]|" + Ff + `)(?:.|[\r
]))+`;
To.KANJI = new RegExp(Ff,"g");
To.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");
To.BYTE = new RegExp(Sve,"g");
To.NUMERIC = new RegExp(TR,"g");
To.ALPHANUMERIC = new RegExp(Bve,"g");
const Tve = new RegExp("^" + Ff + "$")
  , Dve = new RegExp("^" + TR + "$")
  , Fve = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
To.testKanji = function(e) {
    return Tve.test(e)
}
;
To.testNumeric = function(e) {
    return Dve.test(e)
}
;
To.testAlphanumeric = function(e) {
    return Fve.test(e)
}
;
(function(t) {
    const e = cC
      , r = To;
    t.NUMERIC = {
        id: "Numeric",
        bit: 1,
        ccBits: [10, 12, 14]
    },
    t.ALPHANUMERIC = {
        id: "Alphanumeric",
        bit: 2,
        ccBits: [9, 11, 13]
    },
    t.BYTE = {
        id: "Byte",
        bit: 4,
        ccBits: [8, 16, 16]
    },
    t.KANJI = {
        id: "Kanji",
        bit: 8,
        ccBits: [8, 10, 12]
    },
    t.MIXED = {
        bit: -1
    },
    t.getCharCountIndicator = function(o, s) {
        if (!o.ccBits)
            throw new Error("Invalid mode: " + o);
        if (!e.isValid(s))
            throw new Error("Invalid version: " + s);
        return s >= 1 && s < 10 ? o.ccBits[0] : s < 27 ? o.ccBits[1] : o.ccBits[2]
    }
    ,
    t.getBestModeForData = function(o) {
        return r.testNumeric(o) ? t.NUMERIC : r.testAlphanumeric(o) ? t.ALPHANUMERIC : r.testKanji(o) ? t.KANJI : t.BYTE
    }
    ,
    t.toString = function(o) {
        if (o && o.id)
            return o.id;
        throw new Error("Invalid mode")
    }
    ,
    t.isValid = function(o) {
        return o && o.bit && o.ccBits
    }
    ;
    function n(i) {
        if (typeof i != "string")
            throw new Error("Param is not a string");
        switch (i.toLowerCase()) {
        case "numeric":
            return t.NUMERIC;
        case "alphanumeric":
            return t.ALPHANUMERIC;
        case "kanji":
            return t.KANJI;
        case "byte":
            return t.BYTE;
        default:
            throw new Error("Unknown mode: " + i)
        }
    }
    t.from = function(o, s) {
        if (t.isValid(o))
            return o;
        try {
            return n(o)
        } catch {
            return s
        }
    }
}
)(_a);
(function(t) {
    const e = ei
      , r = T1
      , n = S1
      , i = _a
      , o = cC
      , s = 7973
      , a = e.getBCHDigit(s);
    function l(d, h, x) {
        for (let y = 1; y <= 40; y++)
            if (h <= t.getCapacity(y, x, d))
                return y
    }
    function c(d, h) {
        return i.getCharCountIndicator(d, h) + 4
    }
    function u(d, h) {
        let x = 0;
        return d.forEach(function(y) {
            const m = c(y.mode, h);
            x += m + y.getBitsLength()
        }),
        x
    }
    function f(d, h) {
        for (let x = 1; x <= 40; x++)
            if (u(d, x) <= t.getCapacity(x, h, i.MIXED))
                return x
    }
    t.from = function(h, x) {
        return o.isValid(h) ? parseInt(h, 10) : x
    }
    ,
    t.getCapacity = function(h, x, y) {
        if (!o.isValid(h))
            throw new Error("Invalid QR Code version");
        typeof y > "u" && (y = i.BYTE);
        const m = e.getSymbolTotalCodewords(h)
          , E = r.getTotalCodewordsCount(h, x)
          , g = (m - E) * 8;
        if (y === i.MIXED)
            return g;
        const p = g - c(y, h);
        switch (y) {
        case i.NUMERIC:
            return Math.floor(p / 10 * 3);
        case i.ALPHANUMERIC:
            return Math.floor(p / 11 * 2);
        case i.KANJI:
            return Math.floor(p / 13);
        case i.BYTE:
        default:
            return Math.floor(p / 8)
        }
    }
    ,
    t.getBestVersionForData = function(h, x) {
        let y;
        const m = n.from(x, n.M);
        if (Array.isArray(h)) {
            if (h.length > 1)
                return f(h, m);
            if (h.length === 0)
                return 1;
            y = h[0]
        } else
            y = h;
        return l(y.mode, y.getLength(), m)
    }
    ,
    t.getEncodedBits = function(h) {
        if (!o.isValid(h) || h < 7)
            throw new Error("Invalid QR Code version");
        let x = h << 12;
        for (; e.getBCHDigit(x) - a >= 0; )
            x ^= s << e.getBCHDigit(x) - a;
        return h << 12 | x
    }
}
)(SR);
var DR = {};
const PE = ei
  , FR = 1335
  , Pve = 21522
  , T4 = PE.getBCHDigit(FR);
DR.getEncodedBits = function(e, r) {
    const n = e.bit << 3 | r;
    let i = n << 10;
    for (; PE.getBCHDigit(i) - T4 >= 0; )
        i ^= FR << PE.getBCHDigit(i) - T4;
    return (n << 10 | i) ^ Pve
}
;
var PR = {};
const Ive = _a;
function ou(t) {
    this.mode = Ive.NUMERIC,
    this.data = t.toString()
}
ou.getBitsLength = function(e) {
    return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0)
}
;
ou.prototype.getLength = function() {
    return this.data.length
}
;
ou.prototype.getBitsLength = function() {
    return ou.getBitsLength(this.data.length)
}
;
ou.prototype.write = function(e) {
    let r, n, i;
    for (r = 0; r + 3 <= this.data.length; r += 3)
        n = this.data.substr(r, 3),
        i = parseInt(n, 10),
        e.put(i, 10);
    const o = this.data.length - r;
    o > 0 && (n = this.data.substr(r),
    i = parseInt(n, 10),
    e.put(i, o * 3 + 1))
}
;
var Ove = ou;
const kve = _a
  , Cm = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", " ", "$", "%", "*", "+", "-", ".", "/", ":"];
function su(t) {
    this.mode = kve.ALPHANUMERIC,
    this.data = t
}
su.getBitsLength = function(e) {
    return 11 * Math.floor(e / 2) + 6 * (e % 2)
}
;
su.prototype.getLength = function() {
    return this.data.length
}
;
su.prototype.getBitsLength = function() {
    return su.getBitsLength(this.data.length)
}
;
su.prototype.write = function(e) {
    let r;
    for (r = 0; r + 2 <= this.data.length; r += 2) {
        let n = Cm.indexOf(this.data[r]) * 45;
        n += Cm.indexOf(this.data[r + 1]),
        e.put(n, 11)
    }
    this.data.length % 2 && e.put(Cm.indexOf(this.data[r]), 6)
}
;
var Rve = su;
const Mve = _a;
function au(t) {
    this.mode = Mve.BYTE,
    typeof t == "string" ? this.data = new TextEncoder().encode(t) : this.data = new Uint8Array(t)
}
au.getBitsLength = function(e) {
    return e * 8
}
;
au.prototype.getLength = function() {
    return this.data.length
}
;
au.prototype.getBitsLength = function() {
    return au.getBitsLength(this.data.length)
}
;
au.prototype.write = function(t) {
    for (let e = 0, r = this.data.length; e < r; e++)
        t.put(this.data[e], 8)
}
;
var Nve = au;
const Lve = _a
  , $ve = ei;
function lu(t) {
    this.mode = Lve.KANJI,
    this.data = t
}
lu.getBitsLength = function(e) {
    return e * 13
}
;
lu.prototype.getLength = function() {
    return this.data.length
}
;
lu.prototype.getBitsLength = function() {
    return lu.getBitsLength(this.data.length)
}
;
lu.prototype.write = function(t) {
    let e;
    for (e = 0; e < this.data.length; e++) {
        let r = $ve.toSJIS(this.data[e]);
        if (r >= 33088 && r <= 40956)
            r -= 33088;
        else if (r >= 57408 && r <= 60351)
            r -= 49472;
        else
            throw new Error("Invalid SJIS character: " + this.data[e] + `
Make sure your charset is UTF-8`);
        r = (r >>> 8 & 255) * 192 + (r & 255),
        t.put(r, 13)
    }
}
;
var Uve = lu
  , IR = {
    exports: {}
};
(function(t) {
    var e = {
        single_source_shortest_paths: function(r, n, i) {
            var o = {}
              , s = {};
            s[n] = 0;
            var a = e.PriorityQueue.make();
            a.push(n, 0);
            for (var l, c, u, f, d, h, x, y, m; !a.empty(); ) {
                l = a.pop(),
                c = l.value,
                f = l.cost,
                d = r[c] || {};
                for (u in d)
                    d.hasOwnProperty(u) && (h = d[u],
                    x = f + h,
                    y = s[u],
                    m = typeof s[u] > "u",
                    (m || y > x) && (s[u] = x,
                    a.push(u, x),
                    o[u] = c))
            }
            if (typeof i < "u" && typeof s[i] > "u") {
                var E = ["Could not find a path from ", n, " to ", i, "."].join("");
                throw new Error(E)
            }
            return o
        },
        extract_shortest_path_from_predecessor_list: function(r, n) {
            for (var i = [], o = n; o; )
                i.push(o),
                r[o],
                o = r[o];
            return i.reverse(),
            i
        },
        find_path: function(r, n, i) {
            var o = e.single_source_shortest_paths(r, n, i);
            return e.extract_shortest_path_from_predecessor_list(o, i)
        },
        PriorityQueue: {
            make: function(r) {
                var n = e.PriorityQueue, i = {}, o;
                r = r || {};
                for (o in n)
                    n.hasOwnProperty(o) && (i[o] = n[o]);
                return i.queue = [],
                i.sorter = r.sorter || n.default_sorter,
                i
            },
            default_sorter: function(r, n) {
                return r.cost - n.cost
            },
            push: function(r, n) {
                var i = {
                    value: r,
                    cost: n
                };
                this.queue.push(i),
                this.queue.sort(this.sorter)
            },
            pop: function() {
                return this.queue.shift()
            },
            empty: function() {
                return this.queue.length === 0
            }
        }
    };
    t.exports = e
}
)(IR);
var Gve = IR.exports;
(function(t) {
    const e = _a
      , r = Ove
      , n = Rve
      , i = Nve
      , o = Uve
      , s = To
      , a = ei
      , l = Gve;
    function c(E) {
        return unescape(encodeURIComponent(E)).length
    }
    function u(E, g, p) {
        const v = [];
        let _;
        for (; (_ = E.exec(p)) !== null; )
            v.push({
                data: _[0],
                index: _.index,
                mode: g,
                length: _[0].length
            });
        return v
    }
    function f(E) {
        const g = u(s.NUMERIC, e.NUMERIC, E)
          , p = u(s.ALPHANUMERIC, e.ALPHANUMERIC, E);
        let v, _;
        return a.isKanjiModeEnabled() ? (v = u(s.BYTE, e.BYTE, E),
        _ = u(s.KANJI, e.KANJI, E)) : (v = u(s.BYTE_KANJI, e.BYTE, E),
        _ = []),
        g.concat(p, v, _).sort(function(C, B) {
            return C.index - B.index
        }).map(function(C) {
            return {
                data: C.data,
                mode: C.mode,
                length: C.length
            }
        })
    }
    function d(E, g) {
        switch (g) {
        case e.NUMERIC:
            return r.getBitsLength(E);
        case e.ALPHANUMERIC:
            return n.getBitsLength(E);
        case e.KANJI:
            return o.getBitsLength(E);
        case e.BYTE:
            return i.getBitsLength(E)
        }
    }
    function h(E) {
        return E.reduce(function(g, p) {
            const v = g.length - 1 >= 0 ? g[g.length - 1] : null;
            return v && v.mode === p.mode ? (g[g.length - 1].data += p.data,
            g) : (g.push(p),
            g)
        }, [])
    }
    function x(E) {
        const g = [];
        for (let p = 0; p < E.length; p++) {
            const v = E[p];
            switch (v.mode) {
            case e.NUMERIC:
                g.push([v, {
                    data: v.data,
                    mode: e.ALPHANUMERIC,
                    length: v.length
                }, {
                    data: v.data,
                    mode: e.BYTE,
                    length: v.length
                }]);
                break;
            case e.ALPHANUMERIC:
                g.push([v, {
                    data: v.data,
                    mode: e.BYTE,
                    length: v.length
                }]);
                break;
            case e.KANJI:
                g.push([v, {
                    data: v.data,
                    mode: e.BYTE,
                    length: c(v.data)
                }]);
                break;
            case e.BYTE:
                g.push([{
                    data: v.data,
                    mode: e.BYTE,
                    length: c(v.data)
                }])
            }
        }
        return g
    }
    function y(E, g) {
        const p = {}
          , v = {
            start: {}
        };
        let _ = ["start"];
        for (let b = 0; b < E.length; b++) {
            const C = E[b]
              , B = [];
            for (let T = 0; T < C.length; T++) {
                const A = C[T]
                  , w = "" + b + T;
                B.push(w),
                p[w] = {
                    node: A,
                    lastCount: 0
                },
                v[w] = {};
                for (let S = 0; S < _.length; S++) {
                    const D = _[S];
                    p[D] && p[D].node.mode === A.mode ? (v[D][w] = d(p[D].lastCount + A.length, A.mode) - d(p[D].lastCount, A.mode),
                    p[D].lastCount += A.length) : (p[D] && (p[D].lastCount = A.length),
                    v[D][w] = d(A.length, A.mode) + 4 + e.getCharCountIndicator(A.mode, g))
                }
            }
            _ = B
        }
        for (let b = 0; b < _.length; b++)
            v[_[b]].end = 0;
        return {
            map: v,
            table: p
        }
    }
    function m(E, g) {
        let p;
        const v = e.getBestModeForData(E);
        if (p = e.from(g, v),
        p !== e.BYTE && p.bit < v.bit)
            throw new Error('"' + E + '" cannot be encoded with mode ' + e.toString(p) + `.
 Suggested mode is: ` + e.toString(v));
        switch (p === e.KANJI && !a.isKanjiModeEnabled() && (p = e.BYTE),
        p) {
        case e.NUMERIC:
            return new r(E);
        case e.ALPHANUMERIC:
            return new n(E);
        case e.KANJI:
            return new o(E);
        case e.BYTE:
            return new i(E)
        }
    }
    t.fromArray = function(g) {
        return g.reduce(function(p, v) {
            return typeof v == "string" ? p.push(m(v, null)) : v.data && p.push(m(v.data, v.mode)),
            p
        }, [])
    }
    ,
    t.fromString = function(g, p) {
        const v = f(g, a.isKanjiModeEnabled())
          , _ = x(v)
          , b = y(_, p)
          , C = l.find_path(b.map, "start", "end")
          , B = [];
        for (let T = 1; T < C.length - 1; T++)
            B.push(b.table[C[T]].node);
        return t.fromArray(h(B))
    }
    ,
    t.rawSplit = function(g) {
        return t.fromArray(f(g, a.isKanjiModeEnabled()))
    }
}
)(PR);
const F1 = ei
  , Am = S1
  , Hve = bve
  , Vve = Cve
  , zve = bR
  , jve = CR
  , IE = AR
  , OE = T1
  , Wve = wve
  , Kx = SR
  , Yve = DR
  , Xve = _a
  , wm = PR;
function Kve(t, e) {
    const r = t.size
      , n = jve.getPositions(e);
    for (let i = 0; i < n.length; i++) {
        const o = n[i][0]
          , s = n[i][1];
        for (let a = -1; a <= 7; a++)
            if (!(o + a <= -1 || r <= o + a))
                for (let l = -1; l <= 7; l++)
                    s + l <= -1 || r <= s + l || (a >= 0 && a <= 6 && (l === 0 || l === 6) || l >= 0 && l <= 6 && (a === 0 || a === 6) || a >= 2 && a <= 4 && l >= 2 && l <= 4 ? t.set(o + a, s + l, !0, !0) : t.set(o + a, s + l, !1, !0))
    }
}
function qve(t) {
    const e = t.size;
    for (let r = 8; r < e - 8; r++) {
        const n = r % 2 === 0;
        t.set(r, 6, n, !0),
        t.set(6, r, n, !0)
    }
}
function Zve(t, e) {
    const r = zve.getPositions(e);
    for (let n = 0; n < r.length; n++) {
        const i = r[n][0]
          , o = r[n][1];
        for (let s = -2; s <= 2; s++)
            for (let a = -2; a <= 2; a++)
                s === -2 || s === 2 || a === -2 || a === 2 || s === 0 && a === 0 ? t.set(i + s, o + a, !0, !0) : t.set(i + s, o + a, !1, !0)
    }
}
function Jve(t, e) {
    const r = t.size
      , n = Kx.getEncodedBits(e);
    let i, o, s;
    for (let a = 0; a < 18; a++)
        i = Math.floor(a / 3),
        o = a % 3 + r - 8 - 3,
        s = (n >> a & 1) === 1,
        t.set(i, o, s, !0),
        t.set(o, i, s, !0)
}
function Bm(t, e, r) {
    const n = t.size
      , i = Yve.getEncodedBits(e, r);
    let o, s;
    for (o = 0; o < 15; o++)
        s = (i >> o & 1) === 1,
        o < 6 ? t.set(o, 8, s, !0) : o < 8 ? t.set(o + 1, 8, s, !0) : t.set(n - 15 + o, 8, s, !0),
        o < 8 ? t.set(8, n - o - 1, s, !0) : o < 9 ? t.set(8, 15 - o - 1 + 1, s, !0) : t.set(8, 15 - o - 1, s, !0);
    t.set(n - 8, 8, 1, !0)
}
function Qve(t, e) {
    const r = t.size;
    let n = -1
      , i = r - 1
      , o = 7
      , s = 0;
    for (let a = r - 1; a > 0; a -= 2)
        for (a === 6 && a--; ; ) {
            for (let l = 0; l < 2; l++)
                if (!t.isReserved(i, a - l)) {
                    let c = !1;
                    s < e.length && (c = (e[s] >>> o & 1) === 1),
                    t.set(i, a - l, c),
                    o--,
                    o === -1 && (s++,
                    o = 7)
                }
            if (i += n,
            i < 0 || r <= i) {
                i -= n,
                n = -n;
                break
            }
        }
}
function eye(t, e, r) {
    const n = new Hve;
    r.forEach(function(l) {
        n.put(l.mode.bit, 4),
        n.put(l.getLength(), Xve.getCharCountIndicator(l.mode, t)),
        l.write(n)
    });
    const i = F1.getSymbolTotalCodewords(t)
      , o = OE.getTotalCodewordsCount(t, e)
      , s = (i - o) * 8;
    for (n.getLengthInBits() + 4 <= s && n.put(0, 4); n.getLengthInBits() % 8 !== 0; )
        n.putBit(0);
    const a = (s - n.getLengthInBits()) / 8;
    for (let l = 0; l < a; l++)
        n.put(l % 2 ? 17 : 236, 8);
    return tye(n, t, e)
}
function tye(t, e, r) {
    const n = F1.getSymbolTotalCodewords(e)
      , i = OE.getTotalCodewordsCount(e, r)
      , o = n - i
      , s = OE.getBlocksCount(e, r)
      , a = n % s
      , l = s - a
      , c = Math.floor(n / s)
      , u = Math.floor(o / s)
      , f = u + 1
      , d = c - u
      , h = new Wve(d);
    let x = 0;
    const y = new Array(s)
      , m = new Array(s);
    let E = 0;
    const g = new Uint8Array(t.buffer);
    for (let C = 0; C < s; C++) {
        const B = C < l ? u : f;
        y[C] = g.slice(x, x + B),
        m[C] = h.encode(y[C]),
        x += B,
        E = Math.max(E, B)
    }
    const p = new Uint8Array(n);
    let v = 0, _, b;
    for (_ = 0; _ < E; _++)
        for (b = 0; b < s; b++)
            _ < y[b].length && (p[v++] = y[b][_]);
    for (_ = 0; _ < d; _++)
        for (b = 0; b < s; b++)
            p[v++] = m[b][_];
    return p
}
function rye(t, e, r, n) {
    let i;
    if (Array.isArray(t))
        i = wm.fromArray(t);
    else if (typeof t == "string") {
        let c = e;
        if (!c) {
            const u = wm.rawSplit(t);
            c = Kx.getBestVersionForData(u, r)
        }
        i = wm.fromString(t, c || 40)
    } else
        throw new Error("Invalid data");
    const o = Kx.getBestVersionForData(i, r);
    if (!o)
        throw new Error("The amount of data is too big to be stored in a QR Code");
    if (!e)
        e = o;
    else if (e < o)
        throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: ` + o + `.
`);
    const s = eye(e, r, i)
      , a = F1.getSymbolSize(e)
      , l = new Vve(a);
    return Kve(l, e),
    qve(l),
    Zve(l, e),
    Bm(l, r, 0),
    e >= 7 && Jve(l, e),
    Qve(l, s),
    isNaN(n) && (n = IE.getBestMask(l, Bm.bind(null, l, r))),
    IE.applyMask(n, l),
    Bm(l, r, n),
    {
        modules: l,
        version: e,
        errorCorrectionLevel: r,
        maskPattern: n,
        segments: i
    }
}
ER.create = function(e, r) {
    if (typeof e > "u" || e === "")
        throw new Error("No input text");
    let n = Am.M, i, o;
    return typeof r < "u" && (n = Am.from(r.errorCorrectionLevel, Am.M),
    i = Kx.from(r.version),
    o = IE.from(r.maskPattern),
    r.toSJISFunc && F1.setToSJISFunction(r.toSJISFunc)),
    rye(e, i, n, o)
}
;
var OR = {}
  , uC = {};
(function(t) {
    function e(r) {
        if (typeof r == "number" && (r = r.toString()),
        typeof r != "string")
            throw new Error("Color should be defined as hex string");
        let n = r.slice().replace("#", "").split("");
        if (n.length < 3 || n.length === 5 || n.length > 8)
            throw new Error("Invalid hex color: " + r);
        (n.length === 3 || n.length === 4) && (n = Array.prototype.concat.apply([], n.map(function(o) {
            return [o, o]
        }))),
        n.length === 6 && n.push("F", "F");
        const i = parseInt(n.join(""), 16);
        return {
            r: i >> 24 & 255,
            g: i >> 16 & 255,
            b: i >> 8 & 255,
            a: i & 255,
            hex: "#" + n.slice(0, 6).join("")
        }
    }
    t.getOptions = function(n) {
        n || (n = {}),
        n.color || (n.color = {});
        const i = typeof n.margin > "u" || n.margin === null || n.margin < 0 ? 4 : n.margin
          , o = n.width && n.width >= 21 ? n.width : void 0
          , s = n.scale || 4;
        return {
            width: o,
            scale: o ? 4 : s,
            margin: i,
            color: {
                dark: e(n.color.dark || "#000000ff"),
                light: e(n.color.light || "#ffffffff")
            },
            type: n.type,
            rendererOpts: n.rendererOpts || {}
        }
    }
    ,
    t.getScale = function(n, i) {
        return i.width && i.width >= n + i.margin * 2 ? i.width / (n + i.margin * 2) : i.scale
    }
    ,
    t.getImageWidth = function(n, i) {
        const o = t.getScale(n, i);
        return Math.floor((n + i.margin * 2) * o)
    }
    ,
    t.qrToImageData = function(n, i, o) {
        const s = i.modules.size
          , a = i.modules.data
          , l = t.getScale(s, o)
          , c = Math.floor((s + o.margin * 2) * l)
          , u = o.margin * l
          , f = [o.color.light, o.color.dark];
        for (let d = 0; d < c; d++)
            for (let h = 0; h < c; h++) {
                let x = (d * c + h) * 4
                  , y = o.color.light;
                if (d >= u && h >= u && d < c - u && h < c - u) {
                    const m = Math.floor((d - u) / l)
                      , E = Math.floor((h - u) / l);
                    y = f[a[m * s + E] ? 1 : 0]
                }
                n[x++] = y.r,
                n[x++] = y.g,
                n[x++] = y.b,
                n[x] = y.a
            }
    }
}
)(uC);
(function(t) {
    const e = uC;
    function r(i, o, s) {
        i.clearRect(0, 0, o.width, o.height),
        o.style || (o.style = {}),
        o.height = s,
        o.width = s,
        o.style.height = s + "px",
        o.style.width = s + "px"
    }
    function n() {
        try {
            return document.createElement("canvas")
        } catch {
            throw new Error("You need to specify a canvas element")
        }
    }
    t.render = function(o, s, a) {
        let l = a
          , c = s;
        typeof l > "u" && (!s || !s.getContext) && (l = s,
        s = void 0),
        s || (c = n()),
        l = e.getOptions(l);
        const u = e.getImageWidth(o.modules.size, l)
          , f = c.getContext("2d")
          , d = f.createImageData(u, u);
        return e.qrToImageData(d.data, o, l),
        r(f, c, u),
        f.putImageData(d, 0, 0),
        c
    }
    ,
    t.renderToDataURL = function(o, s, a) {
        let l = a;
        typeof l > "u" && (!s || !s.getContext) && (l = s,
        s = void 0),
        l || (l = {});
        const c = t.render(o, s, l)
          , u = l.type || "image/png"
          , f = l.rendererOpts || {};
        return c.toDataURL(u, f.quality)
    }
}
)(OR);
var kR = {};
const nye = uC;
function D4(t, e) {
    const r = t.a / 255
      , n = e + '="' + t.hex + '"';
    return r < 1 ? n + " " + e + '-opacity="' + r.toFixed(2).slice(1) + '"' : n
}
function Sm(t, e, r) {
    let n = t + e;
    return typeof r < "u" && (n += " " + r),
    n
}
function iye(t, e, r) {
    let n = ""
      , i = 0
      , o = !1
      , s = 0;
    for (let a = 0; a < t.length; a++) {
        const l = Math.floor(a % e)
          , c = Math.floor(a / e);
        !l && !o && (o = !0),
        t[a] ? (s++,
        a > 0 && l > 0 && t[a - 1] || (n += o ? Sm("M", l + r, .5 + c + r) : Sm("m", i, 0),
        i = 0,
        o = !1),
        l + 1 < e && t[a + 1] || (n += Sm("h", s),
        s = 0)) : i++
    }
    return n
}
kR.render = function(e, r, n) {
    const i = nye.getOptions(r)
      , o = e.modules.size
      , s = e.modules.data
      , a = o + i.margin * 2
      , l = i.color.light.a ? "<path " + D4(i.color.light, "fill") + ' d="M0 0h' + a + "v" + a + 'H0z"/>' : ""
      , c = "<path " + D4(i.color.dark, "stroke") + ' d="' + iye(s, o, i.margin) + '"/>'
      , u = 'viewBox="0 0 ' + a + " " + a + '"'
      , d = '<svg xmlns="http://www.w3.org/2000/svg" ' + (i.width ? 'width="' + i.width + '" height="' + i.width + '" ' : "") + u + ' shape-rendering="crispEdges">' + l + c + `</svg>
`;
    return typeof n == "function" && n(null, d),
    d
}
;
const oye = Eve
  , kE = ER
  , RR = OR
  , sye = kR;
function fC(t, e, r, n, i) {
    const o = [].slice.call(arguments, 1)
      , s = o.length
      , a = typeof o[s - 1] == "function";
    if (!a && !oye())
        throw new Error("Callback required as last argument");
    if (a) {
        if (s < 2)
            throw new Error("Too few arguments provided");
        s === 2 ? (i = r,
        r = e,
        e = n = void 0) : s === 3 && (e.getContext && typeof i > "u" ? (i = n,
        n = void 0) : (i = n,
        n = r,
        r = e,
        e = void 0))
    } else {
        if (s < 1)
            throw new Error("Too few arguments provided");
        return s === 1 ? (r = e,
        e = n = void 0) : s === 2 && !e.getContext && (n = r,
        r = e,
        e = void 0),
        new Promise(function(l, c) {
            try {
                const u = kE.create(r, n);
                l(t(u, e, n))
            } catch (u) {
                c(u)
            }
        }
        )
    }
    try {
        const l = kE.create(r, n);
        i(null, t(l, e, n))
    } catch (l) {
        i(l)
    }
}
gd.create = kE.create;
gd.toCanvas = fC.bind(null, RR.render);
gd.toDataURL = fC.bind(null, RR.renderToDataURL);
gd.toString = fC.bind(null, function(t, e, r) {
    return sye.render(t, r)
});
function D6e(t, e) {
    const r = eF(t)
      , n = ie("");
    return me(r, async i => {
        r.value && ca && (n.value = await gd.toDataURL(i, e))
    }
    , {
        immediate: !0
    }),
    n
}
var MR = {
    exports: {}
};
function aye(t) {
    throw new Error('Could not dynamically require "' + t + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')
}
var Tm = {
    exports: {}
};
const NR = G_(wpe);
var F4;
function Do() {
    return F4 || (F4 = 1,
    function(t, e) {
        (function(r, n) {
            t.exports = n()
        }
        )(er, function() {
            var r = r || function(n, i) {
                var o;
                if (typeof window < "u" && window.crypto && (o = window.crypto),
                typeof self < "u" && self.crypto && (o = self.crypto),
                typeof globalThis < "u" && globalThis.crypto && (o = globalThis.crypto),
                !o && typeof window < "u" && window.msCrypto && (o = window.msCrypto),
                !o && typeof er < "u" && er.crypto && (o = er.crypto),
                !o && typeof aye == "function")
                    try {
                        o = NR
                    } catch {}
                var s = function() {
                    if (o) {
                        if (typeof o.getRandomValues == "function")
                            try {
                                return o.getRandomValues(new Uint32Array(1))[0]
                            } catch {}
                        if (typeof o.randomBytes == "function")
                            try {
                                return o.randomBytes(4).readInt32LE()
                            } catch {}
                    }
                    throw new Error("Native crypto module could not be used to get secure random number.")
                }
                  , a = Object.create || function() {
                    function g() {}
                    return function(p) {
                        var v;
                        return g.prototype = p,
                        v = new g,
                        g.prototype = null,
                        v
                    }
                }()
                  , l = {}
                  , c = l.lib = {}
                  , u = c.Base = function() {
                    return {
                        extend: function(g) {
                            var p = a(this);
                            return g && p.mixIn(g),
                            (!p.hasOwnProperty("init") || this.init === p.init) && (p.init = function() {
                                p.$super.init.apply(this, arguments)
                            }
                            ),
                            p.init.prototype = p,
                            p.$super = this,
                            p
                        },
                        create: function() {
                            var g = this.extend();
                            return g.init.apply(g, arguments),
                            g
                        },
                        init: function() {},
                        mixIn: function(g) {
                            for (var p in g)
                                g.hasOwnProperty(p) && (this[p] = g[p]);
                            g.hasOwnProperty("toString") && (this.toString = g.toString)
                        },
                        clone: function() {
                            return this.init.prototype.extend(this)
                        }
                    }
                }()
                  , f = c.WordArray = u.extend({
                    init: function(g, p) {
                        g = this.words = g || [],
                        p != i ? this.sigBytes = p : this.sigBytes = g.length * 4
                    },
                    toString: function(g) {
                        return (g || h).stringify(this)
                    },
                    concat: function(g) {
                        var p = this.words
                          , v = g.words
                          , _ = this.sigBytes
                          , b = g.sigBytes;
                        if (this.clamp(),
                        _ % 4)
                            for (var C = 0; C < b; C++) {
                                var B = v[C >>> 2] >>> 24 - C % 4 * 8 & 255;
                                p[_ + C >>> 2] |= B << 24 - (_ + C) % 4 * 8
                            }
                        else
                            for (var T = 0; T < b; T += 4)
                                p[_ + T >>> 2] = v[T >>> 2];
                        return this.sigBytes += b,
                        this
                    },
                    clamp: function() {
                        var g = this.words
                          , p = this.sigBytes;
                        g[p >>> 2] &= 4294967295 << 32 - p % 4 * 8,
                        g.length = n.ceil(p / 4)
                    },
                    clone: function() {
                        var g = u.clone.call(this);
                        return g.words = this.words.slice(0),
                        g
                    },
                    random: function(g) {
                        for (var p = [], v = 0; v < g; v += 4)
                            p.push(s());
                        return new f.init(p,g)
                    }
                })
                  , d = l.enc = {}
                  , h = d.Hex = {
                    stringify: function(g) {
                        for (var p = g.words, v = g.sigBytes, _ = [], b = 0; b < v; b++) {
                            var C = p[b >>> 2] >>> 24 - b % 4 * 8 & 255;
                            _.push((C >>> 4).toString(16)),
                            _.push((C & 15).toString(16))
                        }
                        return _.join("")
                    },
                    parse: function(g) {
                        for (var p = g.length, v = [], _ = 0; _ < p; _ += 2)
                            v[_ >>> 3] |= parseInt(g.substr(_, 2), 16) << 24 - _ % 8 * 4;
                        return new f.init(v,p / 2)
                    }
                }
                  , x = d.Latin1 = {
                    stringify: function(g) {
                        for (var p = g.words, v = g.sigBytes, _ = [], b = 0; b < v; b++) {
                            var C = p[b >>> 2] >>> 24 - b % 4 * 8 & 255;
                            _.push(String.fromCharCode(C))
                        }
                        return _.join("")
                    },
                    parse: function(g) {
                        for (var p = g.length, v = [], _ = 0; _ < p; _++)
                            v[_ >>> 2] |= (g.charCodeAt(_) & 255) << 24 - _ % 4 * 8;
                        return new f.init(v,p)
                    }
                }
                  , y = d.Utf8 = {
                    stringify: function(g) {
                        try {
                            return decodeURIComponent(escape(x.stringify(g)))
                        } catch {
                            throw new Error("Malformed UTF-8 data")
                        }
                    },
                    parse: function(g) {
                        return x.parse(unescape(encodeURIComponent(g)))
                    }
                }
                  , m = c.BufferedBlockAlgorithm = u.extend({
                    reset: function() {
                        this._data = new f.init,
                        this._nDataBytes = 0
                    },
                    _append: function(g) {
                        typeof g == "string" && (g = y.parse(g)),
                        this._data.concat(g),
                        this._nDataBytes += g.sigBytes
                    },
                    _process: function(g) {
                        var p, v = this._data, _ = v.words, b = v.sigBytes, C = this.blockSize, B = C * 4, T = b / B;
                        g ? T = n.ceil(T) : T = n.max((T | 0) - this._minBufferSize, 0);
                        var A = T * C
                          , w = n.min(A * 4, b);
                        if (A) {
                            for (var S = 0; S < A; S += C)
                                this._doProcessBlock(_, S);
                            p = _.splice(0, A),
                            v.sigBytes -= w
                        }
                        return new f.init(p,w)
                    },
                    clone: function() {
                        var g = u.clone.call(this);
                        return g._data = this._data.clone(),
                        g
                    },
                    _minBufferSize: 0
                });
                c.Hasher = m.extend({
                    cfg: u.extend(),
                    init: function(g) {
                        this.cfg = this.cfg.extend(g),
                        this.reset()
                    },
                    reset: function() {
                        m.reset.call(this),
                        this._doReset()
                    },
                    update: function(g) {
                        return this._append(g),
                        this._process(),
                        this
                    },
                    finalize: function(g) {
                        g && this._append(g);
                        var p = this._doFinalize();
                        return p
                    },
                    blockSize: 16,
                    _createHelper: function(g) {
                        return function(p, v) {
                            return new g.init(v).finalize(p)
                        }
                    },
                    _createHmacHelper: function(g) {
                        return function(p, v) {
                            return new E.HMAC.init(g,v).finalize(p)
                        }
                    }
                });
                var E = l.algo = {};
                return l
            }(Math);
            return r
        })
    }(Tm)),
    Tm.exports
}
var Dm = {
    exports: {}
}, P4;
function lye() {
    return P4 || (P4 = 1,
    function(t, e) {
        (function(r, n) {
            t.exports = n(Do())
        }
        )(er, function(r) {
            return function() {
                var n = r
                  , i = n.lib
                  , o = i.WordArray
                  , s = n.enc;
                s.Base64 = {
                    stringify: function(l) {
                        var c = l.words
                          , u = l.sigBytes
                          , f = this._map;
                        l.clamp();
                        for (var d = [], h = 0; h < u; h += 3)
                            for (var x = c[h >>> 2] >>> 24 - h % 4 * 8 & 255, y = c[h + 1 >>> 2] >>> 24 - (h + 1) % 4 * 8 & 255, m = c[h + 2 >>> 2] >>> 24 - (h + 2) % 4 * 8 & 255, E = x << 16 | y << 8 | m, g = 0; g < 4 && h + g * .75 < u; g++)
                                d.push(f.charAt(E >>> 6 * (3 - g) & 63));
                        var p = f.charAt(64);
                        if (p)
                            for (; d.length % 4; )
                                d.push(p);
                        return d.join("")
                    },
                    parse: function(l) {
                        var c = l.length
                          , u = this._map
                          , f = this._reverseMap;
                        if (!f) {
                            f = this._reverseMap = [];
                            for (var d = 0; d < u.length; d++)
                                f[u.charCodeAt(d)] = d
                        }
                        var h = u.charAt(64);
                        if (h) {
                            var x = l.indexOf(h);
                            x !== -1 && (c = x)
                        }
                        return a(l, c, f)
                    },
                    _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
                };
                function a(l, c, u) {
                    for (var f = [], d = 0, h = 0; h < c; h++)
                        if (h % 4) {
                            var x = u[l.charCodeAt(h - 1)] << h % 4 * 2
                              , y = u[l.charCodeAt(h)] >>> 6 - h % 4 * 2
                              , m = x | y;
                            f[d >>> 2] |= m << 24 - d % 4 * 8,
                            d++
                        }
                    return o.create(f, d)
                }
            }(),
            r.enc.Base64
        })
    }(Dm)),
    Dm.exports
}
var Fm = {
    exports: {}
}, I4;
function cye() {
    return I4 || (I4 = 1,
    function(t, e) {
        (function(r, n) {
            t.exports = n(Do())
        }
        )(er, function(r) {
            return function(n) {
                var i = r
                  , o = i.lib
                  , s = o.WordArray
                  , a = o.Hasher
                  , l = i.algo
                  , c = [];
                (function() {
                    for (var y = 0; y < 64; y++)
                        c[y] = n.abs(n.sin(y + 1)) * 4294967296 | 0
                }
                )();
                var u = l.MD5 = a.extend({
                    _doReset: function() {
                        this._hash = new s.init([1732584193, 4023233417, 2562383102, 271733878])
                    },
                    _doProcessBlock: function(y, m) {
                        for (var E = 0; E < 16; E++) {
                            var g = m + E
                              , p = y[g];
                            y[g] = (p << 8 | p >>> 24) & 16711935 | (p << 24 | p >>> 8) & 4278255360
                        }
                        var v = this._hash.words
                          , _ = y[m + 0]
                          , b = y[m + 1]
                          , C = y[m + 2]
                          , B = y[m + 3]
                          , T = y[m + 4]
                          , A = y[m + 5]
                          , w = y[m + 6]
                          , S = y[m + 7]
                          , D = y[m + 8]
                          , F = y[m + 9]
                          , R = y[m + 10]
                          , P = y[m + 11]
                          , N = y[m + 12]
                          , j = y[m + 13]
                          , K = y[m + 14]
                          , oe = y[m + 15]
                          , U = v[0]
                          , $ = v[1]
                          , V = v[2]
                          , W = v[3];
                        U = f(U, $, V, W, _, 7, c[0]),
                        W = f(W, U, $, V, b, 12, c[1]),
                        V = f(V, W, U, $, C, 17, c[2]),
                        $ = f($, V, W, U, B, 22, c[3]),
                        U = f(U, $, V, W, T, 7, c[4]),
                        W = f(W, U, $, V, A, 12, c[5]),
                        V = f(V, W, U, $, w, 17, c[6]),
                        $ = f($, V, W, U, S, 22, c[7]),
                        U = f(U, $, V, W, D, 7, c[8]),
                        W = f(W, U, $, V, F, 12, c[9]),
                        V = f(V, W, U, $, R, 17, c[10]),
                        $ = f($, V, W, U, P, 22, c[11]),
                        U = f(U, $, V, W, N, 7, c[12]),
                        W = f(W, U, $, V, j, 12, c[13]),
                        V = f(V, W, U, $, K, 17, c[14]),
                        $ = f($, V, W, U, oe, 22, c[15]),
                        U = d(U, $, V, W, b, 5, c[16]),
                        W = d(W, U, $, V, w, 9, c[17]),
                        V = d(V, W, U, $, P, 14, c[18]),
                        $ = d($, V, W, U, _, 20, c[19]),
                        U = d(U, $, V, W, A, 5, c[20]),
                        W = d(W, U, $, V, R, 9, c[21]),
                        V = d(V, W, U, $, oe, 14, c[22]),
                        $ = d($, V, W, U, T, 20, c[23]),
                        U = d(U, $, V, W, F, 5, c[24]),
                        W = d(W, U, $, V, K, 9, c[25]),
                        V = d(V, W, U, $, B, 14, c[26]),
                        $ = d($, V, W, U, D, 20, c[27]),
                        U = d(U, $, V, W, j, 5, c[28]),
                        W = d(W, U, $, V, C, 9, c[29]),
                        V = d(V, W, U, $, S, 14, c[30]),
                        $ = d($, V, W, U, N, 20, c[31]),
                        U = h(U, $, V, W, A, 4, c[32]),
                        W = h(W, U, $, V, D, 11, c[33]),
                        V = h(V, W, U, $, P, 16, c[34]),
                        $ = h($, V, W, U, K, 23, c[35]),
                        U = h(U, $, V, W, b, 4, c[36]),
                        W = h(W, U, $, V, T, 11, c[37]),
                        V = h(V, W, U, $, S, 16, c[38]),
                        $ = h($, V, W, U, R, 23, c[39]),
                        U = h(U, $, V, W, j, 4, c[40]),
                        W = h(W, U, $, V, _, 11, c[41]),
                        V = h(V, W, U, $, B, 16, c[42]),
                        $ = h($, V, W, U, w, 23, c[43]),
                        U = h(U, $, V, W, F, 4, c[44]),
                        W = h(W, U, $, V, N, 11, c[45]),
                        V = h(V, W, U, $, oe, 16, c[46]),
                        $ = h($, V, W, U, C, 23, c[47]),
                        U = x(U, $, V, W, _, 6, c[48]),
                        W = x(W, U, $, V, S, 10, c[49]),
                        V = x(V, W, U, $, K, 15, c[50]),
                        $ = x($, V, W, U, A, 21, c[51]),
                        U = x(U, $, V, W, N, 6, c[52]),
                        W = x(W, U, $, V, B, 10, c[53]),
                        V = x(V, W, U, $, R, 15, c[54]),
                        $ = x($, V, W, U, b, 21, c[55]),
                        U = x(U, $, V, W, D, 6, c[56]),
                        W = x(W, U, $, V, oe, 10, c[57]),
                        V = x(V, W, U, $, w, 15, c[58]),
                        $ = x($, V, W, U, j, 21, c[59]),
                        U = x(U, $, V, W, T, 6, c[60]),
                        W = x(W, U, $, V, P, 10, c[61]),
                        V = x(V, W, U, $, C, 15, c[62]),
                        $ = x($, V, W, U, F, 21, c[63]),
                        v[0] = v[0] + U | 0,
                        v[1] = v[1] + $ | 0,
                        v[2] = v[2] + V | 0,
                        v[3] = v[3] + W | 0
                    },
                    _doFinalize: function() {
                        var y = this._data
                          , m = y.words
                          , E = this._nDataBytes * 8
                          , g = y.sigBytes * 8;
                        m[g >>> 5] |= 128 << 24 - g % 32;
                        var p = n.floor(E / 4294967296)
                          , v = E;
                        m[(g + 64 >>> 9 << 4) + 15] = (p << 8 | p >>> 24) & 16711935 | (p << 24 | p >>> 8) & 4278255360,
                        m[(g + 64 >>> 9 << 4) + 14] = (v << 8 | v >>> 24) & 16711935 | (v << 24 | v >>> 8) & 4278255360,
                        y.sigBytes = (m.length + 1) * 4,
                        this._process();
                        for (var _ = this._hash, b = _.words, C = 0; C < 4; C++) {
                            var B = b[C];
                            b[C] = (B << 8 | B >>> 24) & 16711935 | (B << 24 | B >>> 8) & 4278255360
                        }
                        return _
                    },
                    clone: function() {
                        var y = a.clone.call(this);
                        return y._hash = this._hash.clone(),
                        y
                    }
                });
                function f(y, m, E, g, p, v, _) {
                    var b = y + (m & E | ~m & g) + p + _;
                    return (b << v | b >>> 32 - v) + m
                }
                function d(y, m, E, g, p, v, _) {
                    var b = y + (m & g | E & ~g) + p + _;
                    return (b << v | b >>> 32 - v) + m
                }
                function h(y, m, E, g, p, v, _) {
                    var b = y + (m ^ E ^ g) + p + _;
                    return (b << v | b >>> 32 - v) + m
                }
                function x(y, m, E, g, p, v, _) {
                    var b = y + (E ^ (m | ~g)) + p + _;
                    return (b << v | b >>> 32 - v) + m
                }
                i.MD5 = a._createHelper(u),
                i.HmacMD5 = a._createHmacHelper(u)
            }(Math),
            r.MD5
        })
    }(Fm)),
    Fm.exports
}
var Pm = {
    exports: {}
}, Im = {
    exports: {}
}, O4;
function uye() {
    return O4 || (O4 = 1,
    function(t, e) {
        (function(r, n) {
            t.exports = n(Do())
        }
        )(er, function(r) {
            return function() {
                var n = r
                  , i = n.lib
                  , o = i.WordArray
                  , s = i.Hasher
                  , a = n.algo
                  , l = []
                  , c = a.SHA1 = s.extend({
                    _doReset: function() {
                        this._hash = new o.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520])
                    },
                    _doProcessBlock: function(u, f) {
                        for (var d = this._hash.words, h = d[0], x = d[1], y = d[2], m = d[3], E = d[4], g = 0; g < 80; g++) {
                            if (g < 16)
                                l[g] = u[f + g] | 0;
                            else {
                                var p = l[g - 3] ^ l[g - 8] ^ l[g - 14] ^ l[g - 16];
                                l[g] = p << 1 | p >>> 31
                            }
                            var v = (h << 5 | h >>> 27) + E + l[g];
                            g < 20 ? v += (x & y | ~x & m) + 1518500249 : g < 40 ? v += (x ^ y ^ m) + 1859775393 : g < 60 ? v += (x & y | x & m | y & m) - 1894007588 : v += (x ^ y ^ m) - 899497514,
                            E = m,
                            m = y,
                            y = x << 30 | x >>> 2,
                            x = h,
                            h = v
                        }
                        d[0] = d[0] + h | 0,
                        d[1] = d[1] + x | 0,
                        d[2] = d[2] + y | 0,
                        d[3] = d[3] + m | 0,
                        d[4] = d[4] + E | 0
                    },
                    _doFinalize: function() {
                        var u = this._data
                          , f = u.words
                          , d = this._nDataBytes * 8
                          , h = u.sigBytes * 8;
                        return f[h >>> 5] |= 128 << 24 - h % 32,
                        f[(h + 64 >>> 9 << 4) + 14] = Math.floor(d / 4294967296),
                        f[(h + 64 >>> 9 << 4) + 15] = d,
                        u.sigBytes = f.length * 4,
                        this._process(),
                        this._hash
                    },
                    clone: function() {
                        var u = s.clone.call(this);
                        return u._hash = this._hash.clone(),
                        u
                    }
                });
                n.SHA1 = s._createHelper(c),
                n.HmacSHA1 = s._createHmacHelper(c)
            }(),
            r.SHA1
        })
    }(Im)),
    Im.exports
}
var Om = {
    exports: {}
}, k4;
function fye() {
    return k4 || (k4 = 1,
    function(t, e) {
        (function(r, n) {
            t.exports = n(Do())
        }
        )(er, function(r) {
            (function() {
                var n = r
                  , i = n.lib
                  , o = i.Base
                  , s = n.enc
                  , a = s.Utf8
                  , l = n.algo;
                l.HMAC = o.extend({
                    init: function(c, u) {
                        c = this._hasher = new c.init,
                        typeof u == "string" && (u = a.parse(u));
                        var f = c.blockSize
                          , d = f * 4;
                        u.sigBytes > d && (u = c.finalize(u)),
                        u.clamp();
                        for (var h = this._oKey = u.clone(), x = this._iKey = u.clone(), y = h.words, m = x.words, E = 0; E < f; E++)
                            y[E] ^= 1549556828,
                            m[E] ^= 909522486;
                        h.sigBytes = x.sigBytes = d,
                        this.reset()
                    },
                    reset: function() {
                        var c = this._hasher;
                        c.reset(),
                        c.update(this._iKey)
                    },
                    update: function(c) {
                        return this._hasher.update(c),
                        this
                    },
                    finalize: function(c) {
                        var u = this._hasher
                          , f = u.finalize(c);
                        u.reset();
                        var d = u.finalize(this._oKey.clone().concat(f));
                        return d
                    }
                })
            }
            )()
        })
    }(Om)),
    Om.exports
}
var R4;
function LR() {
    return R4 || (R4 = 1,
    function(t, e) {
        (function(r, n, i) {
            t.exports = n(Do(), uye(), fye())
        }
        )(er, function(r) {
            return function() {
                var n = r
                  , i = n.lib
                  , o = i.Base
                  , s = i.WordArray
                  , a = n.algo
                  , l = a.MD5
                  , c = a.EvpKDF = o.extend({
                    cfg: o.extend({
                        keySize: 128 / 32,
                        hasher: l,
                        iterations: 1
                    }),
                    init: function(u) {
                        this.cfg = this.cfg.extend(u)
                    },
                    compute: function(u, f) {
                        for (var d, h = this.cfg, x = h.hasher.create(), y = s.create(), m = y.words, E = h.keySize, g = h.iterations; m.length < E; ) {
                            d && x.update(d),
                            d = x.update(u).finalize(f),
                            x.reset();
                            for (var p = 1; p < g; p++)
                                d = x.finalize(d),
                                x.reset();
                            y.concat(d)
                        }
                        return y.sigBytes = E * 4,
                        y
                    }
                });
                n.EvpKDF = function(u, f, d) {
                    return c.create(d).compute(u, f)
                }
            }(),
            r.EvpKDF
        })
    }(Pm)),
    Pm.exports
}
var km = {
    exports: {}
}, M4;
function dC() {
    return M4 || (M4 = 1,
    function(t, e) {
        (function(r, n, i) {
            t.exports = n(Do(), LR())
        }
        )(er, function(r) {
            r.lib.Cipher || function(n) {
                var i = r
                  , o = i.lib
                  , s = o.Base
                  , a = o.WordArray
                  , l = o.BufferedBlockAlgorithm
                  , c = i.enc;
                c.Utf8;
                var u = c.Base64
                  , f = i.algo
                  , d = f.EvpKDF
                  , h = o.Cipher = l.extend({
                    cfg: s.extend(),
                    createEncryptor: function(A, w) {
                        return this.create(this._ENC_XFORM_MODE, A, w)
                    },
                    createDecryptor: function(A, w) {
                        return this.create(this._DEC_XFORM_MODE, A, w)
                    },
                    init: function(A, w, S) {
                        this.cfg = this.cfg.extend(S),
                        this._xformMode = A,
                        this._key = w,
                        this.reset()
                    },
                    reset: function() {
                        l.reset.call(this),
                        this._doReset()
                    },
                    process: function(A) {
                        return this._append(A),
                        this._process()
                    },
                    finalize: function(A) {
                        A && this._append(A);
                        var w = this._doFinalize();
                        return w
                    },
                    keySize: 128 / 32,
                    ivSize: 128 / 32,
                    _ENC_XFORM_MODE: 1,
                    _DEC_XFORM_MODE: 2,
                    _createHelper: function() {
                        function A(w) {
                            return typeof w == "string" ? T : b
                        }
                        return function(w) {
                            return {
                                encrypt: function(S, D, F) {
                                    return A(D).encrypt(w, S, D, F)
                                },
                                decrypt: function(S, D, F) {
                                    return A(D).decrypt(w, S, D, F)
                                }
                            }
                        }
                    }()
                });
                o.StreamCipher = h.extend({
                    _doFinalize: function() {
                        var A = this._process(!0);
                        return A
                    },
                    blockSize: 1
                });
                var x = i.mode = {}
                  , y = o.BlockCipherMode = s.extend({
                    createEncryptor: function(A, w) {
                        return this.Encryptor.create(A, w)
                    },
                    createDecryptor: function(A, w) {
                        return this.Decryptor.create(A, w)
                    },
                    init: function(A, w) {
                        this._cipher = A,
                        this._iv = w
                    }
                })
                  , m = x.CBC = function() {
                    var A = y.extend();
                    A.Encryptor = A.extend({
                        processBlock: function(S, D) {
                            var F = this._cipher
                              , R = F.blockSize;
                            w.call(this, S, D, R),
                            F.encryptBlock(S, D),
                            this._prevBlock = S.slice(D, D + R)
                        }
                    }),
                    A.Decryptor = A.extend({
                        processBlock: function(S, D) {
                            var F = this._cipher
                              , R = F.blockSize
                              , P = S.slice(D, D + R);
                            F.decryptBlock(S, D),
                            w.call(this, S, D, R),
                            this._prevBlock = P
                        }
                    });
                    function w(S, D, F) {
                        var R, P = this._iv;
                        P ? (R = P,
                        this._iv = n) : R = this._prevBlock;
                        for (var N = 0; N < F; N++)
                            S[D + N] ^= R[N]
                    }
                    return A
                }()
                  , E = i.pad = {}
                  , g = E.Pkcs7 = {
                    pad: function(A, w) {
                        for (var S = w * 4, D = S - A.sigBytes % S, F = D << 24 | D << 16 | D << 8 | D, R = [], P = 0; P < D; P += 4)
                            R.push(F);
                        var N = a.create(R, D);
                        A.concat(N)
                    },
                    unpad: function(A) {
                        var w = A.words[A.sigBytes - 1 >>> 2] & 255;
                        A.sigBytes -= w
                    }
                };
                o.BlockCipher = h.extend({
                    cfg: h.cfg.extend({
                        mode: m,
                        padding: g
                    }),
                    reset: function() {
                        var A;
                        h.reset.call(this);
                        var w = this.cfg
                          , S = w.iv
                          , D = w.mode;
                        this._xformMode == this._ENC_XFORM_MODE ? A = D.createEncryptor : (A = D.createDecryptor,
                        this._minBufferSize = 1),
                        this._mode && this._mode.__creator == A ? this._mode.init(this, S && S.words) : (this._mode = A.call(D, this, S && S.words),
                        this._mode.__creator = A)
                    },
                    _doProcessBlock: function(A, w) {
                        this._mode.processBlock(A, w)
                    },
                    _doFinalize: function() {
                        var A, w = this.cfg.padding;
                        return this._xformMode == this._ENC_XFORM_MODE ? (w.pad(this._data, this.blockSize),
                        A = this._process(!0)) : (A = this._process(!0),
                        w.unpad(A)),
                        A
                    },
                    blockSize: 128 / 32
                });
                var p = o.CipherParams = s.extend({
                    init: function(A) {
                        this.mixIn(A)
                    },
                    toString: function(A) {
                        return (A || this.formatter).stringify(this)
                    }
                })
                  , v = i.format = {}
                  , _ = v.OpenSSL = {
                    stringify: function(A) {
                        var w, S = A.ciphertext, D = A.salt;
                        return D ? w = a.create([1398893684, 1701076831]).concat(D).concat(S) : w = S,
                        w.toString(u)
                    },
                    parse: function(A) {
                        var w, S = u.parse(A), D = S.words;
                        return D[0] == 1398893684 && D[1] == 1701076831 && (w = a.create(D.slice(2, 4)),
                        D.splice(0, 4),
                        S.sigBytes -= 16),
                        p.create({
                            ciphertext: S,
                            salt: w
                        })
                    }
                }
                  , b = o.SerializableCipher = s.extend({
                    cfg: s.extend({
                        format: _
                    }),
                    encrypt: function(A, w, S, D) {
                        D = this.cfg.extend(D);
                        var F = A.createEncryptor(S, D)
                          , R = F.finalize(w)
                          , P = F.cfg;
                        return p.create({
                            ciphertext: R,
                            key: S,
                            iv: P.iv,
                            algorithm: A,
                            mode: P.mode,
                            padding: P.padding,
                            blockSize: A.blockSize,
                            formatter: D.format
                        })
                    },
                    decrypt: function(A, w, S, D) {
                        D = this.cfg.extend(D),
                        w = this._parse(w, D.format);
                        var F = A.createDecryptor(S, D).finalize(w.ciphertext);
                        return F
                    },
                    _parse: function(A, w) {
                        return typeof A == "string" ? w.parse(A, this) : A
                    }
                })
                  , C = i.kdf = {}
                  , B = C.OpenSSL = {
                    execute: function(A, w, S, D, F) {
                        if (D || (D = a.random(64 / 8)),
                        F)
                            var R = d.create({
                                keySize: w + S,
                                hasher: F
                            }).compute(A, D);
                        else
                            var R = d.create({
                                keySize: w + S
                            }).compute(A, D);
                        var P = a.create(R.words.slice(w), S * 4);
                        return R.sigBytes = w * 4,
                        p.create({
                            key: R,
                            iv: P,
                            salt: D
                        })
                    }
                }
                  , T = o.PasswordBasedCipher = b.extend({
                    cfg: b.cfg.extend({
                        kdf: B
                    }),
                    encrypt: function(A, w, S, D) {
                        D = this.cfg.extend(D);
                        var F = D.kdf.execute(S, A.keySize, A.ivSize, D.salt, D.hasher);
                        D.iv = F.iv;
                        var R = b.encrypt.call(this, A, w, F.key, D);
                        return R.mixIn(F),
                        R
                    },
                    decrypt: function(A, w, S, D) {
                        D = this.cfg.extend(D),
                        w = this._parse(w, D.format);
                        var F = D.kdf.execute(S, A.keySize, A.ivSize, w.salt, D.hasher);
                        D.iv = F.iv;
                        var R = b.decrypt.call(this, A, w, F.key, D);
                        return R
                    }
                })
            }()
        })
    }(km)),
    km.exports
}
(function(t, e) {
    (function(r, n, i) {
        t.exports = n(Do(), lye(), cye(), LR(), dC())
    }
    )(er, function(r) {
        return function() {
            var n = r
              , i = n.lib
              , o = i.BlockCipher
              , s = n.algo
              , a = []
              , l = []
              , c = []
              , u = []
              , f = []
              , d = []
              , h = []
              , x = []
              , y = []
              , m = [];
            (function() {
                for (var p = [], v = 0; v < 256; v++)
                    v < 128 ? p[v] = v << 1 : p[v] = v << 1 ^ 283;
                for (var _ = 0, b = 0, v = 0; v < 256; v++) {
                    var C = b ^ b << 1 ^ b << 2 ^ b << 3 ^ b << 4;
                    C = C >>> 8 ^ C & 255 ^ 99,
                    a[_] = C,
                    l[C] = _;
                    var B = p[_]
                      , T = p[B]
                      , A = p[T]
                      , w = p[C] * 257 ^ C * 16843008;
                    c[_] = w << 24 | w >>> 8,
                    u[_] = w << 16 | w >>> 16,
                    f[_] = w << 8 | w >>> 24,
                    d[_] = w;
                    var w = A * 16843009 ^ T * 65537 ^ B * 257 ^ _ * 16843008;
                    h[C] = w << 24 | w >>> 8,
                    x[C] = w << 16 | w >>> 16,
                    y[C] = w << 8 | w >>> 24,
                    m[C] = w,
                    _ ? (_ = B ^ p[p[p[A ^ B]]],
                    b ^= p[p[b]]) : _ = b = 1
                }
            }
            )();
            var E = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]
              , g = s.AES = o.extend({
                _doReset: function() {
                    var p;
                    if (!(this._nRounds && this._keyPriorReset === this._key)) {
                        for (var v = this._keyPriorReset = this._key, _ = v.words, b = v.sigBytes / 4, C = this._nRounds = b + 6, B = (C + 1) * 4, T = this._keySchedule = [], A = 0; A < B; A++)
                            A < b ? T[A] = _[A] : (p = T[A - 1],
                            A % b ? b > 6 && A % b == 4 && (p = a[p >>> 24] << 24 | a[p >>> 16 & 255] << 16 | a[p >>> 8 & 255] << 8 | a[p & 255]) : (p = p << 8 | p >>> 24,
                            p = a[p >>> 24] << 24 | a[p >>> 16 & 255] << 16 | a[p >>> 8 & 255] << 8 | a[p & 255],
                            p ^= E[A / b | 0] << 24),
                            T[A] = T[A - b] ^ p);
                        for (var w = this._invKeySchedule = [], S = 0; S < B; S++) {
                            var A = B - S;
                            if (S % 4)
                                var p = T[A];
                            else
                                var p = T[A - 4];
                            S < 4 || A <= 4 ? w[S] = p : w[S] = h[a[p >>> 24]] ^ x[a[p >>> 16 & 255]] ^ y[a[p >>> 8 & 255]] ^ m[a[p & 255]]
                        }
                    }
                },
                encryptBlock: function(p, v) {
                    this._doCryptBlock(p, v, this._keySchedule, c, u, f, d, a)
                },
                decryptBlock: function(p, v) {
                    var _ = p[v + 1];
                    p[v + 1] = p[v + 3],
                    p[v + 3] = _,
                    this._doCryptBlock(p, v, this._invKeySchedule, h, x, y, m, l);
                    var _ = p[v + 1];
                    p[v + 1] = p[v + 3],
                    p[v + 3] = _
                },
                _doCryptBlock: function(p, v, _, b, C, B, T, A) {
                    for (var w = this._nRounds, S = p[v] ^ _[0], D = p[v + 1] ^ _[1], F = p[v + 2] ^ _[2], R = p[v + 3] ^ _[3], P = 4, N = 1; N < w; N++) {
                        var j = b[S >>> 24] ^ C[D >>> 16 & 255] ^ B[F >>> 8 & 255] ^ T[R & 255] ^ _[P++]
                          , K = b[D >>> 24] ^ C[F >>> 16 & 255] ^ B[R >>> 8 & 255] ^ T[S & 255] ^ _[P++]
                          , oe = b[F >>> 24] ^ C[R >>> 16 & 255] ^ B[S >>> 8 & 255] ^ T[D & 255] ^ _[P++]
                          , U = b[R >>> 24] ^ C[S >>> 16 & 255] ^ B[D >>> 8 & 255] ^ T[F & 255] ^ _[P++];
                        S = j,
                        D = K,
                        F = oe,
                        R = U
                    }
                    var j = (A[S >>> 24] << 24 | A[D >>> 16 & 255] << 16 | A[F >>> 8 & 255] << 8 | A[R & 255]) ^ _[P++]
                      , K = (A[D >>> 24] << 24 | A[F >>> 16 & 255] << 16 | A[R >>> 8 & 255] << 8 | A[S & 255]) ^ _[P++]
                      , oe = (A[F >>> 24] << 24 | A[R >>> 16 & 255] << 16 | A[S >>> 8 & 255] << 8 | A[D & 255]) ^ _[P++]
                      , U = (A[R >>> 24] << 24 | A[S >>> 16 & 255] << 16 | A[D >>> 8 & 255] << 8 | A[F & 255]) ^ _[P++];
                    p[v] = j,
                    p[v + 1] = K,
                    p[v + 2] = oe,
                    p[v + 3] = U
                },
                keySize: 256 / 32
            });
            n.AES = o._createHelper(g)
        }(),
        r.AES
    })
}
)(MR);
var dye = MR.exports;
const F6e = Gi(dye);
var $R = {
    exports: {}
};
(function(t, e) {
    (function(r, n) {
        t.exports = n(Do())
    }
    )(er, function(r) {
        return r.enc.Utf8
    })
}
)($R);
var hye = $R.exports;
const P6e = Gi(hye);
var UR = {
    exports: {}
};
(function(t, e) {
    (function(r, n, i) {
        t.exports = n(Do(), dC())
    }
    )(er, function(r) {
        return r.mode.ECB = function() {
            var n = r.lib.BlockCipherMode.extend();
            return n.Encryptor = n.extend({
                processBlock: function(i, o) {
                    this._cipher.encryptBlock(i, o)
                }
            }),
            n.Decryptor = n.extend({
                processBlock: function(i, o) {
                    this._cipher.decryptBlock(i, o)
                }
            }),
            n
        }(),
        r.mode.ECB
    })
}
)(UR);
var xye = UR.exports;
const I6e = Gi(xye);
var GR = {
    exports: {}
};
(function(t, e) {
    (function(r, n, i) {
        t.exports = n(Do(), dC())
    }
    )(er, function(r) {
        return r.pad.Pkcs7
    })
}
)(GR);
var pye = GR.exports;
const O6e = Gi(pye);
function N4(t) {
    return t !== null && typeof t == "object" && "constructor"in t && t.constructor === Object
}
function hC(t={}, e={}) {
    Object.keys(e).forEach(r => {
        typeof t[r] > "u" ? t[r] = e[r] : N4(e[r]) && N4(t[r]) && Object.keys(e[r]).length > 0 && hC(t[r], e[r])
    }
    )
}
const HR = {
    body: {},
    addEventListener() {},
    removeEventListener() {},
    activeElement: {
        blur() {},
        nodeName: ""
    },
    querySelector() {
        return null
    },
    querySelectorAll() {
        return []
    },
    getElementById() {
        return null
    },
    createEvent() {
        return {
            initEvent() {}
        }
    },
    createElement() {
        return {
            children: [],
            childNodes: [],
            style: {},
            setAttribute() {},
            getElementsByTagName() {
                return []
            }
        }
    },
    createElementNS() {
        return {}
    },
    importNode() {
        return null
    },
    location: {
        hash: "",
        host: "",
        hostname: "",
        href: "",
        origin: "",
        pathname: "",
        protocol: "",
        search: ""
    }
};
function en() {
    const t = typeof document < "u" ? document : {};
    return hC(t, HR),
    t
}
const gye = {
    document: HR,
    navigator: {
        userAgent: ""
    },
    location: {
        hash: "",
        host: "",
        hostname: "",
        href: "",
        origin: "",
        pathname: "",
        protocol: "",
        search: ""
    },
    history: {
        replaceState() {},
        pushState() {},
        go() {},
        back() {}
    },
    CustomEvent: function() {
        return this
    },
    addEventListener() {},
    removeEventListener() {},
    getComputedStyle() {
        return {
            getPropertyValue() {
                return ""
            }
        }
    },
    Image() {},
    Date() {},
    screen: {},
    setTimeout() {},
    clearTimeout() {},
    matchMedia() {
        return {}
    },
    requestAnimationFrame(t) {
        return typeof setTimeout > "u" ? (t(),
        null) : setTimeout(t, 0)
    },
    cancelAnimationFrame(t) {
        typeof setTimeout > "u" || clearTimeout(t)
    }
};
function Mr() {
    const t = typeof window < "u" ? window : {};
    return hC(t, gye),
    t
}
function mye(t) {
    const e = t.__proto__;
    Object.defineProperty(t, "__proto__", {
        get() {
            return e
        },
        set(r) {
            e.__proto__ = r
        }
    })
}
class zs extends Array {
    constructor(e) {
        typeof e == "number" ? super(e) : (super(...e || []),
        mye(this))
    }
}
function vd(t=[]) {
    const e = [];
    return t.forEach(r => {
        Array.isArray(r) ? e.push(...vd(r)) : e.push(r)
    }
    ),
    e
}
function VR(t, e) {
    return Array.prototype.filter.call(t, e)
}
function vye(t) {
    const e = [];
    for (let r = 0; r < t.length; r += 1)
        e.indexOf(t[r]) === -1 && e.push(t[r]);
    return e
}
function yye(t, e) {
    if (typeof t != "string")
        return [t];
    const r = []
      , n = e.querySelectorAll(t);
    for (let i = 0; i < n.length; i += 1)
        r.push(n[i]);
    return r
}
function De(t, e) {
    const r = Mr()
      , n = en();
    let i = [];
    if (!e && t instanceof zs)
        return t;
    if (!t)
        return new zs(i);
    if (typeof t == "string") {
        const o = t.trim();
        if (o.indexOf("<") >= 0 && o.indexOf(">") >= 0) {
            let s = "div";
            o.indexOf("<li") === 0 && (s = "ul"),
            o.indexOf("<tr") === 0 && (s = "tbody"),
            (o.indexOf("<td") === 0 || o.indexOf("<th") === 0) && (s = "tr"),
            o.indexOf("<tbody") === 0 && (s = "table"),
            o.indexOf("<option") === 0 && (s = "select");
            const a = n.createElement(s);
            a.innerHTML = o;
            for (let l = 0; l < a.childNodes.length; l += 1)
                i.push(a.childNodes[l])
        } else
            i = yye(t.trim(), e || n)
    } else if (t.nodeType || t === r || t === n)
        i.push(t);
    else if (Array.isArray(t)) {
        if (t instanceof zs)
            return t;
        i = t
    }
    return new zs(vye(i))
}
De.fn = zs.prototype;
function Eye(...t) {
    const e = vd(t.map(r => r.split(" ")));
    return this.forEach(r => {
        r.classList.add(...e)
    }
    ),
    this
}
function _ye(...t) {
    const e = vd(t.map(r => r.split(" ")));
    return this.forEach(r => {
        r.classList.remove(...e)
    }
    ),
    this
}
function bye(...t) {
    const e = vd(t.map(r => r.split(" ")));
    this.forEach(r => {
        e.forEach(n => {
            r.classList.toggle(n)
        }
        )
    }
    )
}
function Cye(...t) {
    const e = vd(t.map(r => r.split(" ")));
    return VR(this, r => e.filter(n => r.classList.contains(n)).length > 0).length > 0
}
function Aye(t, e) {
    if (arguments.length === 1 && typeof t == "string")
        return this[0] ? this[0].getAttribute(t) : void 0;
    for (let r = 0; r < this.length; r += 1)
        if (arguments.length === 2)
            this[r].setAttribute(t, e);
        else
            for (const n in t)
                this[r][n] = t[n],
                this[r].setAttribute(n, t[n]);
    return this
}
function wye(t) {
    for (let e = 0; e < this.length; e += 1)
        this[e].removeAttribute(t);
    return this
}
function Bye(t) {
    for (let e = 0; e < this.length; e += 1)
        this[e].style.transform = t;
    return this
}
function Sye(t) {
    for (let e = 0; e < this.length; e += 1)
        this[e].style.transitionDuration = typeof t != "string" ? `${t}ms` : t;
    return this
}
function Tye(...t) {
    let[e,r,n,i] = t;
    typeof t[1] == "function" && ([e,n,i] = t,
    r = void 0),
    i || (i = !1);
    function o(c) {
        const u = c.target;
        if (!u)
            return;
        const f = c.target.dom7EventData || [];
        if (f.indexOf(c) < 0 && f.unshift(c),
        De(u).is(r))
            n.apply(u, f);
        else {
            const d = De(u).parents();
            for (let h = 0; h < d.length; h += 1)
                De(d[h]).is(r) && n.apply(d[h], f)
        }
    }
    function s(c) {
        const u = c && c.target ? c.target.dom7EventData || [] : [];
        u.indexOf(c) < 0 && u.unshift(c),
        n.apply(this, u)
    }
    const a = e.split(" ");
    let l;
    for (let c = 0; c < this.length; c += 1) {
        const u = this[c];
        if (r)
            for (l = 0; l < a.length; l += 1) {
                const f = a[l];
                u.dom7LiveListeners || (u.dom7LiveListeners = {}),
                u.dom7LiveListeners[f] || (u.dom7LiveListeners[f] = []),
                u.dom7LiveListeners[f].push({
                    listener: n,
                    proxyListener: o
                }),
                u.addEventListener(f, o, i)
            }
        else
            for (l = 0; l < a.length; l += 1) {
                const f = a[l];
                u.dom7Listeners || (u.dom7Listeners = {}),
                u.dom7Listeners[f] || (u.dom7Listeners[f] = []),
                u.dom7Listeners[f].push({
                    listener: n,
                    proxyListener: s
                }),
                u.addEventListener(f, s, i)
            }
    }
    return this
}
function Dye(...t) {
    let[e,r,n,i] = t;
    typeof t[1] == "function" && ([e,n,i] = t,
    r = void 0),
    i || (i = !1);
    const o = e.split(" ");
    for (let s = 0; s < o.length; s += 1) {
        const a = o[s];
        for (let l = 0; l < this.length; l += 1) {
            const c = this[l];
            let u;
            if (!r && c.dom7Listeners ? u = c.dom7Listeners[a] : r && c.dom7LiveListeners && (u = c.dom7LiveListeners[a]),
            u && u.length)
                for (let f = u.length - 1; f >= 0; f -= 1) {
                    const d = u[f];
                    n && d.listener === n || n && d.listener && d.listener.dom7proxy && d.listener.dom7proxy === n ? (c.removeEventListener(a, d.proxyListener, i),
                    u.splice(f, 1)) : n || (c.removeEventListener(a, d.proxyListener, i),
                    u.splice(f, 1))
                }
        }
    }
    return this
}
function Fye(...t) {
    const e = Mr()
      , r = t[0].split(" ")
      , n = t[1];
    for (let i = 0; i < r.length; i += 1) {
        const o = r[i];
        for (let s = 0; s < this.length; s += 1) {
            const a = this[s];
            if (e.CustomEvent) {
                const l = new e.CustomEvent(o,{
                    detail: n,
                    bubbles: !0,
                    cancelable: !0
                });
                a.dom7EventData = t.filter( (c, u) => u > 0),
                a.dispatchEvent(l),
                a.dom7EventData = [],
                delete a.dom7EventData
            }
        }
    }
    return this
}
function Pye(t) {
    const e = this;
    function r(n) {
        n.target === this && (t.call(this, n),
        e.off("transitionend", r))
    }
    return t && e.on("transitionend", r),
    this
}
function Iye(t) {
    if (this.length > 0) {
        if (t) {
            const e = this.styles();
            return this[0].offsetWidth + parseFloat(e.getPropertyValue("margin-right")) + parseFloat(e.getPropertyValue("margin-left"))
        }
        return this[0].offsetWidth
    }
    return null
}
function Oye(t) {
    if (this.length > 0) {
        if (t) {
            const e = this.styles();
            return this[0].offsetHeight + parseFloat(e.getPropertyValue("margin-top")) + parseFloat(e.getPropertyValue("margin-bottom"))
        }
        return this[0].offsetHeight
    }
    return null
}
function kye() {
    if (this.length > 0) {
        const t = Mr()
          , e = en()
          , r = this[0]
          , n = r.getBoundingClientRect()
          , i = e.body
          , o = r.clientTop || i.clientTop || 0
          , s = r.clientLeft || i.clientLeft || 0
          , a = r === t ? t.scrollY : r.scrollTop
          , l = r === t ? t.scrollX : r.scrollLeft;
        return {
            top: n.top + a - o,
            left: n.left + l - s
        }
    }
    return null
}
function Rye() {
    const t = Mr();
    return this[0] ? t.getComputedStyle(this[0], null) : {}
}
function Mye(t, e) {
    const r = Mr();
    let n;
    if (arguments.length === 1)
        if (typeof t == "string") {
            if (this[0])
                return r.getComputedStyle(this[0], null).getPropertyValue(t)
        } else {
            for (n = 0; n < this.length; n += 1)
                for (const i in t)
                    this[n].style[i] = t[i];
            return this
        }
    if (arguments.length === 2 && typeof t == "string") {
        for (n = 0; n < this.length; n += 1)
            this[n].style[t] = e;
        return this
    }
    return this
}
function Nye(t) {
    return t ? (this.forEach( (e, r) => {
        t.apply(e, [e, r])
    }
    ),
    this) : this
}
function Lye(t) {
    const e = VR(this, t);
    return De(e)
}
function $ye(t) {
    if (typeof t > "u")
        return this[0] ? this[0].innerHTML : null;
    for (let e = 0; e < this.length; e += 1)
        this[e].innerHTML = t;
    return this
}
function Uye(t) {
    if (typeof t > "u")
        return this[0] ? this[0].textContent.trim() : null;
    for (let e = 0; e < this.length; e += 1)
        this[e].textContent = t;
    return this
}
function Gye(t) {
    const e = Mr()
      , r = en()
      , n = this[0];
    let i, o;
    if (!n || typeof t > "u")
        return !1;
    if (typeof t == "string") {
        if (n.matches)
            return n.matches(t);
        if (n.webkitMatchesSelector)
            return n.webkitMatchesSelector(t);
        if (n.msMatchesSelector)
            return n.msMatchesSelector(t);
        for (i = De(t),
        o = 0; o < i.length; o += 1)
            if (i[o] === n)
                return !0;
        return !1
    }
    if (t === r)
        return n === r;
    if (t === e)
        return n === e;
    if (t.nodeType || t instanceof zs) {
        for (i = t.nodeType ? [t] : t,
        o = 0; o < i.length; o += 1)
            if (i[o] === n)
                return !0;
        return !1
    }
    return !1
}
function Hye() {
    let t = this[0], e;
    if (t) {
        for (e = 0; (t = t.previousSibling) !== null; )
            t.nodeType === 1 && (e += 1);
        return e
    }
}
function Vye(t) {
    if (typeof t > "u")
        return this;
    const e = this.length;
    if (t > e - 1)
        return De([]);
    if (t < 0) {
        const r = e + t;
        return r < 0 ? De([]) : De([this[r]])
    }
    return De([this[t]])
}
function zye(...t) {
    let e;
    const r = en();
    for (let n = 0; n < t.length; n += 1) {
        e = t[n];
        for (let i = 0; i < this.length; i += 1)
            if (typeof e == "string") {
                const o = r.createElement("div");
                for (o.innerHTML = e; o.firstChild; )
                    this[i].appendChild(o.firstChild)
            } else if (e instanceof zs)
                for (let o = 0; o < e.length; o += 1)
                    this[i].appendChild(e[o]);
            else
                this[i].appendChild(e)
    }
    return this
}
function jye(t) {
    const e = en();
    let r, n;
    for (r = 0; r < this.length; r += 1)
        if (typeof t == "string") {
            const i = e.createElement("div");
            for (i.innerHTML = t,
            n = i.childNodes.length - 1; n >= 0; n -= 1)
                this[r].insertBefore(i.childNodes[n], this[r].childNodes[0])
        } else if (t instanceof zs)
            for (n = 0; n < t.length; n += 1)
                this[r].insertBefore(t[n], this[r].childNodes[0]);
        else
            this[r].insertBefore(t, this[r].childNodes[0]);
    return this
}
function Wye(t) {
    return this.length > 0 ? t ? this[0].nextElementSibling && De(this[0].nextElementSibling).is(t) ? De([this[0].nextElementSibling]) : De([]) : this[0].nextElementSibling ? De([this[0].nextElementSibling]) : De([]) : De([])
}
function Yye(t) {
    const e = [];
    let r = this[0];
    if (!r)
        return De([]);
    for (; r.nextElementSibling; ) {
        const n = r.nextElementSibling;
        t ? De(n).is(t) && e.push(n) : e.push(n),
        r = n
    }
    return De(e)
}
function Xye(t) {
    if (this.length > 0) {
        const e = this[0];
        return t ? e.previousElementSibling && De(e.previousElementSibling).is(t) ? De([e.previousElementSibling]) : De([]) : e.previousElementSibling ? De([e.previousElementSibling]) : De([])
    }
    return De([])
}
function Kye(t) {
    const e = [];
    let r = this[0];
    if (!r)
        return De([]);
    for (; r.previousElementSibling; ) {
        const n = r.previousElementSibling;
        t ? De(n).is(t) && e.push(n) : e.push(n),
        r = n
    }
    return De(e)
}
function qye(t) {
    const e = [];
    for (let r = 0; r < this.length; r += 1)
        this[r].parentNode !== null && (t ? De(this[r].parentNode).is(t) && e.push(this[r].parentNode) : e.push(this[r].parentNode));
    return De(e)
}
function Zye(t) {
    const e = [];
    for (let r = 0; r < this.length; r += 1) {
        let n = this[r].parentNode;
        for (; n; )
            t ? De(n).is(t) && e.push(n) : e.push(n),
            n = n.parentNode
    }
    return De(e)
}
function Jye(t) {
    let e = this;
    return typeof t > "u" ? De([]) : (e.is(t) || (e = e.parents(t).eq(0)),
    e)
}
function Qye(t) {
    const e = [];
    for (let r = 0; r < this.length; r += 1) {
        const n = this[r].querySelectorAll(t);
        for (let i = 0; i < n.length; i += 1)
            e.push(n[i])
    }
    return De(e)
}
function eEe(t) {
    const e = [];
    for (let r = 0; r < this.length; r += 1) {
        const n = this[r].children;
        for (let i = 0; i < n.length; i += 1)
            (!t || De(n[i]).is(t)) && e.push(n[i])
    }
    return De(e)
}
function tEe() {
    for (let t = 0; t < this.length; t += 1)
        this[t].parentNode && this[t].parentNode.removeChild(this[t]);
    return this
}
const L4 = {
    addClass: Eye,
    removeClass: _ye,
    hasClass: Cye,
    toggleClass: bye,
    attr: Aye,
    removeAttr: wye,
    transform: Bye,
    transition: Sye,
    on: Tye,
    off: Dye,
    trigger: Fye,
    transitionEnd: Pye,
    outerWidth: Iye,
    outerHeight: Oye,
    styles: Rye,
    offset: kye,
    css: Mye,
    each: Nye,
    html: $ye,
    text: Uye,
    is: Gye,
    index: Hye,
    eq: Vye,
    append: zye,
    prepend: jye,
    next: Wye,
    nextAll: Yye,
    prev: Xye,
    prevAll: Kye,
    parent: qye,
    parents: Zye,
    closest: Jye,
    find: Qye,
    children: eEe,
    filter: Lye,
    remove: tEe
};
Object.keys(L4).forEach(t => {
    Object.defineProperty(De.fn, t, {
        value: L4[t],
        writable: !0
    })
}
);
function rEe(t) {
    const e = t;
    Object.keys(e).forEach(r => {
        try {
            e[r] = null
        } catch {}
        try {
            delete e[r]
        } catch {}
    }
    )
}
function qx(t, e=0) {
    return setTimeout(t, e)
}
function Pf() {
    return Date.now()
}
function nEe(t) {
    const e = Mr();
    let r;
    return e.getComputedStyle && (r = e.getComputedStyle(t, null)),
    !r && t.currentStyle && (r = t.currentStyle),
    r || (r = t.style),
    r
}
function iEe(t, e="x") {
    const r = Mr();
    let n, i, o;
    const s = nEe(t);
    return r.WebKitCSSMatrix ? (i = s.transform || s.webkitTransform,
    i.split(",").length > 6 && (i = i.split(", ").map(a => a.replace(",", ".")).join(", ")),
    o = new r.WebKitCSSMatrix(i === "none" ? "" : i)) : (o = s.MozTransform || s.OTransform || s.MsTransform || s.msTransform || s.transform || s.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,"),
    n = o.toString().split(",")),
    e === "x" && (r.WebKitCSSMatrix ? i = o.m41 : n.length === 16 ? i = parseFloat(n[12]) : i = parseFloat(n[4])),
    e === "y" && (r.WebKitCSSMatrix ? i = o.m42 : n.length === 16 ? i = parseFloat(n[13]) : i = parseFloat(n[5])),
    i || 0
}
function Ah(t) {
    return typeof t == "object" && t !== null && t.constructor && Object.prototype.toString.call(t).slice(8, -1) === "Object"
}
function oEe(t) {
    return typeof window < "u" && typeof window.HTMLElement < "u" ? t instanceof HTMLElement : t && (t.nodeType === 1 || t.nodeType === 11)
}
function Gn(...t) {
    const e = Object(t[0])
      , r = ["__proto__", "constructor", "prototype"];
    for (let n = 1; n < t.length; n += 1) {
        const i = t[n];
        if (i != null && !oEe(i)) {
            const o = Object.keys(Object(i)).filter(s => r.indexOf(s) < 0);
            for (let s = 0, a = o.length; s < a; s += 1) {
                const l = o[s]
                  , c = Object.getOwnPropertyDescriptor(i, l);
                c !== void 0 && c.enumerable && (Ah(e[l]) && Ah(i[l]) ? i[l].__swiper__ ? e[l] = i[l] : Gn(e[l], i[l]) : !Ah(e[l]) && Ah(i[l]) ? (e[l] = {},
                i[l].__swiper__ ? e[l] = i[l] : Gn(e[l], i[l])) : e[l] = i[l])
            }
        }
    }
    return e
}
function wh(t, e, r) {
    t.style.setProperty(e, r)
}
function zR({swiper: t, targetPosition: e, side: r}) {
    const n = Mr()
      , i = -t.translate;
    let o = null, s;
    const a = t.params.speed;
    t.wrapperEl.style.scrollSnapType = "none",
    n.cancelAnimationFrame(t.cssModeFrameID);
    const l = e > i ? "next" : "prev"
      , c = (f, d) => l === "next" && f >= d || l === "prev" && f <= d
      , u = () => {
        s = new Date().getTime(),
        o === null && (o = s);
        const f = Math.max(Math.min((s - o) / a, 1), 0)
          , d = .5 - Math.cos(f * Math.PI) / 2;
        let h = i + d * (e - i);
        if (c(h, e) && (h = e),
        t.wrapperEl.scrollTo({
            [r]: h
        }),
        c(h, e)) {
            t.wrapperEl.style.overflow = "hidden",
            t.wrapperEl.style.scrollSnapType = "",
            setTimeout( () => {
                t.wrapperEl.style.overflow = "",
                t.wrapperEl.scrollTo({
                    [r]: h
                })
            }
            ),
            n.cancelAnimationFrame(t.cssModeFrameID);
            return
        }
        t.cssModeFrameID = n.requestAnimationFrame(u)
    }
    ;
    u()
}
let Rm;
function sEe() {
    const t = Mr()
      , e = en();
    return {
        smoothScroll: e.documentElement && "scrollBehavior"in e.documentElement.style,
        touch: !!("ontouchstart"in t || t.DocumentTouch && e instanceof t.DocumentTouch),
        passiveListener: function() {
            let n = !1;
            try {
                const i = Object.defineProperty({}, "passive", {
                    get() {
                        n = !0
                    }
                });
                t.addEventListener("testPassiveListener", null, i)
            } catch {}
            return n
        }(),
        gestures: function() {
            return "ongesturestart"in t
        }()
    }
}
function jR() {
    return Rm || (Rm = sEe()),
    Rm
}
let Mm;
function aEe({userAgent: t}={}) {
    const e = jR()
      , r = Mr()
      , n = r.navigator.platform
      , i = t || r.navigator.userAgent
      , o = {
        ios: !1,
        android: !1
    }
      , s = r.screen.width
      , a = r.screen.height
      , l = i.match(/(Android);?[\s\/]+([\d.]+)?/);
    let c = i.match(/(iPad).*OS\s([\d_]+)/);
    const u = i.match(/(iPod)(.*OS\s([\d_]+))?/)
      , f = !c && i.match(/(iPhone\sOS|iOS)\s([\d_]+)/)
      , d = n === "Win32";
    let h = n === "MacIntel";
    const x = ["1024x1366", "1366x1024", "834x1194", "1194x834", "834x1112", "1112x834", "768x1024", "1024x768", "820x1180", "1180x820", "810x1080", "1080x810"];
    return !c && h && e.touch && x.indexOf(`${s}x${a}`) >= 0 && (c = i.match(/(Version)\/([\d.]+)/),
    c || (c = [0, 1, "13_0_0"]),
    h = !1),
    l && !d && (o.os = "android",
    o.android = !0),
    (c || f || u) && (o.os = "ios",
    o.ios = !0),
    o
}
function lEe(t={}) {
    return Mm || (Mm = aEe(t)),
    Mm
}
let Nm;
function cEe() {
    const t = Mr();
    function e() {
        const r = t.navigator.userAgent.toLowerCase();
        return r.indexOf("safari") >= 0 && r.indexOf("chrome") < 0 && r.indexOf("android") < 0
    }
    return {
        isSafari: e(),
        isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)
    }
}
function uEe() {
    return Nm || (Nm = cEe()),
    Nm
}
function fEe({swiper: t, on: e, emit: r}) {
    const n = Mr();
    let i = null
      , o = null;
    const s = () => {
        !t || t.destroyed || !t.initialized || (r("beforeResize"),
        r("resize"))
    }
      , a = () => {
        !t || t.destroyed || !t.initialized || (i = new ResizeObserver(u => {
            o = n.requestAnimationFrame( () => {
                const {width: f, height: d} = t;
                let h = f
                  , x = d;
                u.forEach( ({contentBoxSize: y, contentRect: m, target: E}) => {
                    E && E !== t.el || (h = m ? m.width : (y[0] || y).inlineSize,
                    x = m ? m.height : (y[0] || y).blockSize)
                }
                ),
                (h !== f || x !== d) && s()
            }
            )
        }
        ),
        i.observe(t.el))
    }
      , l = () => {
        o && n.cancelAnimationFrame(o),
        i && i.unobserve && t.el && (i.unobserve(t.el),
        i = null)
    }
      , c = () => {
        !t || t.destroyed || !t.initialized || r("orientationchange")
    }
    ;
    e("init", () => {
        if (t.params.resizeObserver && typeof n.ResizeObserver < "u") {
            a();
            return
        }
        n.addEventListener("resize", s),
        n.addEventListener("orientationchange", c)
    }
    ),
    e("destroy", () => {
        l(),
        n.removeEventListener("resize", s),
        n.removeEventListener("orientationchange", c)
    }
    )
}
function dEe({swiper: t, extendParams: e, on: r, emit: n}) {
    const i = []
      , o = Mr()
      , s = (c, u={}) => {
        const f = o.MutationObserver || o.WebkitMutationObserver
          , d = new f(h => {
            if (h.length === 1) {
                n("observerUpdate", h[0]);
                return
            }
            const x = function() {
                n("observerUpdate", h[0])
            };
            o.requestAnimationFrame ? o.requestAnimationFrame(x) : o.setTimeout(x, 0)
        }
        );
        d.observe(c, {
            attributes: typeof u.attributes > "u" ? !0 : u.attributes,
            childList: typeof u.childList > "u" ? !0 : u.childList,
            characterData: typeof u.characterData > "u" ? !0 : u.characterData
        }),
        i.push(d)
    }
      , a = () => {
        if (t.params.observer) {
            if (t.params.observeParents) {
                const c = t.$el.parents();
                for (let u = 0; u < c.length; u += 1)
                    s(c[u])
            }
            s(t.$el[0], {
                childList: t.params.observeSlideChildren
            }),
            s(t.$wrapperEl[0], {
                attributes: !1
            })
        }
    }
      , l = () => {
        i.forEach(c => {
            c.disconnect()
        }
        ),
        i.splice(0, i.length)
    }
    ;
    e({
        observer: !1,
        observeParents: !1,
        observeSlideChildren: !1
    }),
    r("init", a),
    r("destroy", l)
}
const hEe = {
    on(t, e, r) {
        const n = this;
        if (!n.eventsListeners || n.destroyed || typeof e != "function")
            return n;
        const i = r ? "unshift" : "push";
        return t.split(" ").forEach(o => {
            n.eventsListeners[o] || (n.eventsListeners[o] = []),
            n.eventsListeners[o][i](e)
        }
        ),
        n
    },
    once(t, e, r) {
        const n = this;
        if (!n.eventsListeners || n.destroyed || typeof e != "function")
            return n;
        function i(...o) {
            n.off(t, i),
            i.__emitterProxy && delete i.__emitterProxy,
            e.apply(n, o)
        }
        return i.__emitterProxy = e,
        n.on(t, i, r)
    },
    onAny(t, e) {
        const r = this;
        if (!r.eventsListeners || r.destroyed || typeof t != "function")
            return r;
        const n = e ? "unshift" : "push";
        return r.eventsAnyListeners.indexOf(t) < 0 && r.eventsAnyListeners[n](t),
        r
    },
    offAny(t) {
        const e = this;
        if (!e.eventsListeners || e.destroyed || !e.eventsAnyListeners)
            return e;
        const r = e.eventsAnyListeners.indexOf(t);
        return r >= 0 && e.eventsAnyListeners.splice(r, 1),
        e
    },
    off(t, e) {
        const r = this;
        return !r.eventsListeners || r.destroyed || !r.eventsListeners || t.split(" ").forEach(n => {
            typeof e > "u" ? r.eventsListeners[n] = [] : r.eventsListeners[n] && r.eventsListeners[n].forEach( (i, o) => {
                (i === e || i.__emitterProxy && i.__emitterProxy === e) && r.eventsListeners[n].splice(o, 1)
            }
            )
        }
        ),
        r
    },
    emit(...t) {
        const e = this;
        if (!e.eventsListeners || e.destroyed || !e.eventsListeners)
            return e;
        let r, n, i;
        return typeof t[0] == "string" || Array.isArray(t[0]) ? (r = t[0],
        n = t.slice(1, t.length),
        i = e) : (r = t[0].events,
        n = t[0].data,
        i = t[0].context || e),
        n.unshift(i),
        (Array.isArray(r) ? r : r.split(" ")).forEach(s => {
            e.eventsAnyListeners && e.eventsAnyListeners.length && e.eventsAnyListeners.forEach(a => {
                a.apply(i, [s, ...n])
            }
            ),
            e.eventsListeners && e.eventsListeners[s] && e.eventsListeners[s].forEach(a => {
                a.apply(i, n)
            }
            )
        }
        ),
        e
    }
};
function xEe() {
    const t = this;
    let e, r;
    const n = t.$el;
    typeof t.params.width < "u" && t.params.width !== null ? e = t.params.width : e = n[0].clientWidth,
    typeof t.params.height < "u" && t.params.height !== null ? r = t.params.height : r = n[0].clientHeight,
    !(e === 0 && t.isHorizontal() || r === 0 && t.isVertical()) && (e = e - parseInt(n.css("padding-left") || 0, 10) - parseInt(n.css("padding-right") || 0, 10),
    r = r - parseInt(n.css("padding-top") || 0, 10) - parseInt(n.css("padding-bottom") || 0, 10),
    Number.isNaN(e) && (e = 0),
    Number.isNaN(r) && (r = 0),
    Object.assign(t, {
        width: e,
        height: r,
        size: t.isHorizontal() ? e : r
    }))
}
function pEe() {
    const t = this;
    function e(A) {
        return t.isHorizontal() ? A : {
            width: "height",
            "margin-top": "margin-left",
            "margin-bottom ": "margin-right",
            "margin-left": "margin-top",
            "margin-right": "margin-bottom",
            "padding-left": "padding-top",
            "padding-right": "padding-bottom",
            marginRight: "marginBottom"
        }[A]
    }
    function r(A, w) {
        return parseFloat(A.getPropertyValue(e(w)) || 0)
    }
    const n = t.params
      , {$wrapperEl: i, size: o, rtlTranslate: s, wrongRTL: a} = t
      , l = t.virtual && n.virtual.enabled
      , c = l ? t.virtual.slides.length : t.slides.length
      , u = i.children(`.${t.params.slideClass}`)
      , f = l ? t.virtual.slides.length : u.length;
    let d = [];
    const h = []
      , x = [];
    let y = n.slidesOffsetBefore;
    typeof y == "function" && (y = n.slidesOffsetBefore.call(t));
    let m = n.slidesOffsetAfter;
    typeof m == "function" && (m = n.slidesOffsetAfter.call(t));
    const E = t.snapGrid.length
      , g = t.slidesGrid.length;
    let p = n.spaceBetween
      , v = -y
      , _ = 0
      , b = 0;
    if (typeof o > "u")
        return;
    typeof p == "string" && p.indexOf("%") >= 0 && (p = parseFloat(p.replace("%", "")) / 100 * o),
    t.virtualSize = -p,
    s ? u.css({
        marginLeft: "",
        marginBottom: "",
        marginTop: ""
    }) : u.css({
        marginRight: "",
        marginBottom: "",
        marginTop: ""
    }),
    n.centeredSlides && n.cssMode && (wh(t.wrapperEl, "--swiper-centered-offset-before", ""),
    wh(t.wrapperEl, "--swiper-centered-offset-after", ""));
    const C = n.grid && n.grid.rows > 1 && t.grid;
    C && t.grid.initSlides(f);
    let B;
    const T = n.slidesPerView === "auto" && n.breakpoints && Object.keys(n.breakpoints).filter(A => typeof n.breakpoints[A].slidesPerView < "u").length > 0;
    for (let A = 0; A < f; A += 1) {
        B = 0;
        const w = u.eq(A);
        if (C && t.grid.updateSlide(A, w, f, e),
        w.css("display") !== "none") {
            if (n.slidesPerView === "auto") {
                T && (u[A].style[e("width")] = "");
                const S = getComputedStyle(w[0])
                  , D = w[0].style.transform
                  , F = w[0].style.webkitTransform;
                if (D && (w[0].style.transform = "none"),
                F && (w[0].style.webkitTransform = "none"),
                n.roundLengths)
                    B = t.isHorizontal() ? w.outerWidth(!0) : w.outerHeight(!0);
                else {
                    const R = r(S, "width")
                      , P = r(S, "padding-left")
                      , N = r(S, "padding-right")
                      , j = r(S, "margin-left")
                      , K = r(S, "margin-right")
                      , oe = S.getPropertyValue("box-sizing");
                    if (oe && oe === "border-box")
                        B = R + j + K;
                    else {
                        const {clientWidth: U, offsetWidth: $} = w[0];
                        B = R + P + N + j + K + ($ - U)
                    }
                }
                D && (w[0].style.transform = D),
                F && (w[0].style.webkitTransform = F),
                n.roundLengths && (B = Math.floor(B))
            } else
                B = (o - (n.slidesPerView - 1) * p) / n.slidesPerView,
                n.roundLengths && (B = Math.floor(B)),
                u[A] && (u[A].style[e("width")] = `${B}px`);
            u[A] && (u[A].swiperSlideSize = B),
            x.push(B),
            n.centeredSlides ? (v = v + B / 2 + _ / 2 + p,
            _ === 0 && A !== 0 && (v = v - o / 2 - p),
            A === 0 && (v = v - o / 2 - p),
            Math.abs(v) < 1 / 1e3 && (v = 0),
            n.roundLengths && (v = Math.floor(v)),
            b % n.slidesPerGroup === 0 && d.push(v),
            h.push(v)) : (n.roundLengths && (v = Math.floor(v)),
            (b - Math.min(t.params.slidesPerGroupSkip, b)) % t.params.slidesPerGroup === 0 && d.push(v),
            h.push(v),
            v = v + B + p),
            t.virtualSize += B + p,
            _ = B,
            b += 1
        }
    }
    if (t.virtualSize = Math.max(t.virtualSize, o) + m,
    s && a && (n.effect === "slide" || n.effect === "coverflow") && i.css({
        width: `${t.virtualSize + n.spaceBetween}px`
    }),
    n.setWrapperSize && i.css({
        [e("width")]: `${t.virtualSize + n.spaceBetween}px`
    }),
    C && t.grid.updateWrapperSize(B, d, e),
    !n.centeredSlides) {
        const A = [];
        for (let w = 0; w < d.length; w += 1) {
            let S = d[w];
            n.roundLengths && (S = Math.floor(S)),
            d[w] <= t.virtualSize - o && A.push(S)
        }
        d = A,
        Math.floor(t.virtualSize - o) - Math.floor(d[d.length - 1]) > 1 && d.push(t.virtualSize - o)
    }
    if (d.length === 0 && (d = [0]),
    n.spaceBetween !== 0) {
        const A = t.isHorizontal() && s ? "marginLeft" : e("marginRight");
        u.filter( (w, S) => n.cssMode ? S !== u.length - 1 : !0).css({
            [A]: `${p}px`
        })
    }
    if (n.centeredSlides && n.centeredSlidesBounds) {
        let A = 0;
        x.forEach(S => {
            A += S + (n.spaceBetween ? n.spaceBetween : 0)
        }
        ),
        A -= n.spaceBetween;
        const w = A - o;
        d = d.map(S => S < 0 ? -y : S > w ? w + m : S)
    }
    if (n.centerInsufficientSlides) {
        let A = 0;
        if (x.forEach(w => {
            A += w + (n.spaceBetween ? n.spaceBetween : 0)
        }
        ),
        A -= n.spaceBetween,
        A < o) {
            const w = (o - A) / 2;
            d.forEach( (S, D) => {
                d[D] = S - w
            }
            ),
            h.forEach( (S, D) => {
                h[D] = S + w
            }
            )
        }
    }
    if (Object.assign(t, {
        slides: u,
        snapGrid: d,
        slidesGrid: h,
        slidesSizesGrid: x
    }),
    n.centeredSlides && n.cssMode && !n.centeredSlidesBounds) {
        wh(t.wrapperEl, "--swiper-centered-offset-before", `${-d[0]}px`),
        wh(t.wrapperEl, "--swiper-centered-offset-after", `${t.size / 2 - x[x.length - 1] / 2}px`);
        const A = -t.snapGrid[0]
          , w = -t.slidesGrid[0];
        t.snapGrid = t.snapGrid.map(S => S + A),
        t.slidesGrid = t.slidesGrid.map(S => S + w)
    }
    if (f !== c && t.emit("slidesLengthChange"),
    d.length !== E && (t.params.watchOverflow && t.checkOverflow(),
    t.emit("snapGridLengthChange")),
    h.length !== g && t.emit("slidesGridLengthChange"),
    n.watchSlidesProgress && t.updateSlidesOffset(),
    !l && !n.cssMode && (n.effect === "slide" || n.effect === "fade")) {
        const A = `${n.containerModifierClass}backface-hidden`
          , w = t.$el.hasClass(A);
        f <= n.maxBackfaceHiddenSlides ? w || t.$el.addClass(A) : w && t.$el.removeClass(A)
    }
}
function gEe(t) {
    const e = this
      , r = []
      , n = e.virtual && e.params.virtual.enabled;
    let i = 0, o;
    typeof t == "number" ? e.setTransition(t) : t === !0 && e.setTransition(e.params.speed);
    const s = a => n ? e.slides.filter(l => parseInt(l.getAttribute("data-swiper-slide-index"), 10) === a)[0] : e.slides.eq(a)[0];
    if (e.params.slidesPerView !== "auto" && e.params.slidesPerView > 1)
        if (e.params.centeredSlides)
            (e.visibleSlides || De([])).each(a => {
                r.push(a)
            }
            );
        else
            for (o = 0; o < Math.ceil(e.params.slidesPerView); o += 1) {
                const a = e.activeIndex + o;
                if (a > e.slides.length && !n)
                    break;
                r.push(s(a))
            }
    else
        r.push(s(e.activeIndex));
    for (o = 0; o < r.length; o += 1)
        if (typeof r[o] < "u") {
            const a = r[o].offsetHeight;
            i = a > i ? a : i
        }
    (i || i === 0) && e.$wrapperEl.css("height", `${i}px`)
}
function mEe() {
    const t = this
      , e = t.slides;
    for (let r = 0; r < e.length; r += 1)
        e[r].swiperSlideOffset = t.isHorizontal() ? e[r].offsetLeft : e[r].offsetTop
}
function vEe(t=this && this.translate || 0) {
    const e = this
      , r = e.params
      , {slides: n, rtlTranslate: i, snapGrid: o} = e;
    if (n.length === 0)
        return;
    typeof n[0].swiperSlideOffset > "u" && e.updateSlidesOffset();
    let s = -t;
    i && (s = t),
    n.removeClass(r.slideVisibleClass),
    e.visibleSlidesIndexes = [],
    e.visibleSlides = [];
    for (let a = 0; a < n.length; a += 1) {
        const l = n[a];
        let c = l.swiperSlideOffset;
        r.cssMode && r.centeredSlides && (c -= n[0].swiperSlideOffset);
        const u = (s + (r.centeredSlides ? e.minTranslate() : 0) - c) / (l.swiperSlideSize + r.spaceBetween)
          , f = (s - o[0] + (r.centeredSlides ? e.minTranslate() : 0) - c) / (l.swiperSlideSize + r.spaceBetween)
          , d = -(s - c)
          , h = d + e.slidesSizesGrid[a];
        (d >= 0 && d < e.size - 1 || h > 1 && h <= e.size || d <= 0 && h >= e.size) && (e.visibleSlides.push(l),
        e.visibleSlidesIndexes.push(a),
        n.eq(a).addClass(r.slideVisibleClass)),
        l.progress = i ? -u : u,
        l.originalProgress = i ? -f : f
    }
    e.visibleSlides = De(e.visibleSlides)
}
function yEe(t) {
    const e = this;
    if (typeof t > "u") {
        const c = e.rtlTranslate ? -1 : 1;
        t = e && e.translate && e.translate * c || 0
    }
    const r = e.params
      , n = e.maxTranslate() - e.minTranslate();
    let {progress: i, isBeginning: o, isEnd: s} = e;
    const a = o
      , l = s;
    n === 0 ? (i = 0,
    o = !0,
    s = !0) : (i = (t - e.minTranslate()) / n,
    o = i <= 0,
    s = i >= 1),
    Object.assign(e, {
        progress: i,
        isBeginning: o,
        isEnd: s
    }),
    (r.watchSlidesProgress || r.centeredSlides && r.autoHeight) && e.updateSlidesProgress(t),
    o && !a && e.emit("reachBeginning toEdge"),
    s && !l && e.emit("reachEnd toEdge"),
    (a && !o || l && !s) && e.emit("fromEdge"),
    e.emit("progress", i)
}
function EEe() {
    const t = this
      , {slides: e, params: r, $wrapperEl: n, activeIndex: i, realIndex: o} = t
      , s = t.virtual && r.virtual.enabled;
    e.removeClass(`${r.slideActiveClass} ${r.slideNextClass} ${r.slidePrevClass} ${r.slideDuplicateActiveClass} ${r.slideDuplicateNextClass} ${r.slideDuplicatePrevClass}`);
    let a;
    s ? a = t.$wrapperEl.find(`.${r.slideClass}[data-swiper-slide-index="${i}"]`) : a = e.eq(i),
    a.addClass(r.slideActiveClass),
    r.loop && (a.hasClass(r.slideDuplicateClass) ? n.children(`.${r.slideClass}:not(.${r.slideDuplicateClass})[data-swiper-slide-index="${o}"]`).addClass(r.slideDuplicateActiveClass) : n.children(`.${r.slideClass}.${r.slideDuplicateClass}[data-swiper-slide-index="${o}"]`).addClass(r.slideDuplicateActiveClass));
    let l = a.nextAll(`.${r.slideClass}`).eq(0).addClass(r.slideNextClass);
    r.loop && l.length === 0 && (l = e.eq(0),
    l.addClass(r.slideNextClass));
    let c = a.prevAll(`.${r.slideClass}`).eq(0).addClass(r.slidePrevClass);
    r.loop && c.length === 0 && (c = e.eq(-1),
    c.addClass(r.slidePrevClass)),
    r.loop && (l.hasClass(r.slideDuplicateClass) ? n.children(`.${r.slideClass}:not(.${r.slideDuplicateClass})[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(r.slideDuplicateNextClass) : n.children(`.${r.slideClass}.${r.slideDuplicateClass}[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(r.slideDuplicateNextClass),
    c.hasClass(r.slideDuplicateClass) ? n.children(`.${r.slideClass}:not(.${r.slideDuplicateClass})[data-swiper-slide-index="${c.attr("data-swiper-slide-index")}"]`).addClass(r.slideDuplicatePrevClass) : n.children(`.${r.slideClass}.${r.slideDuplicateClass}[data-swiper-slide-index="${c.attr("data-swiper-slide-index")}"]`).addClass(r.slideDuplicatePrevClass)),
    t.emitSlidesClasses()
}
function _Ee(t) {
    const e = this
      , r = e.rtlTranslate ? e.translate : -e.translate
      , {slidesGrid: n, snapGrid: i, params: o, activeIndex: s, realIndex: a, snapIndex: l} = e;
    let c = t, u;
    if (typeof c > "u") {
        for (let d = 0; d < n.length; d += 1)
            typeof n[d + 1] < "u" ? r >= n[d] && r < n[d + 1] - (n[d + 1] - n[d]) / 2 ? c = d : r >= n[d] && r < n[d + 1] && (c = d + 1) : r >= n[d] && (c = d);
        o.normalizeSlideIndex && (c < 0 || typeof c > "u") && (c = 0)
    }
    if (i.indexOf(r) >= 0)
        u = i.indexOf(r);
    else {
        const d = Math.min(o.slidesPerGroupSkip, c);
        u = d + Math.floor((c - d) / o.slidesPerGroup)
    }
    if (u >= i.length && (u = i.length - 1),
    c === s) {
        u !== l && (e.snapIndex = u,
        e.emit("snapIndexChange"));
        return
    }
    const f = parseInt(e.slides.eq(c).attr("data-swiper-slide-index") || c, 10);
    Object.assign(e, {
        snapIndex: u,
        realIndex: f,
        previousIndex: s,
        activeIndex: c
    }),
    e.emit("activeIndexChange"),
    e.emit("snapIndexChange"),
    a !== f && e.emit("realIndexChange"),
    (e.initialized || e.params.runCallbacksOnInit) && e.emit("slideChange")
}
function bEe(t) {
    const e = this
      , r = e.params
      , n = De(t).closest(`.${r.slideClass}`)[0];
    let i = !1, o;
    if (n) {
        for (let s = 0; s < e.slides.length; s += 1)
            if (e.slides[s] === n) {
                i = !0,
                o = s;
                break
            }
    }
    if (n && i)
        e.clickedSlide = n,
        e.virtual && e.params.virtual.enabled ? e.clickedIndex = parseInt(De(n).attr("data-swiper-slide-index"), 10) : e.clickedIndex = o;
    else {
        e.clickedSlide = void 0,
        e.clickedIndex = void 0;
        return
    }
    r.slideToClickedSlide && e.clickedIndex !== void 0 && e.clickedIndex !== e.activeIndex && e.slideToClickedSlide()
}
const CEe = {
    updateSize: xEe,
    updateSlides: pEe,
    updateAutoHeight: gEe,
    updateSlidesOffset: mEe,
    updateSlidesProgress: vEe,
    updateProgress: yEe,
    updateSlidesClasses: EEe,
    updateActiveIndex: _Ee,
    updateClickedSlide: bEe
};
function AEe(t=this.isHorizontal() ? "x" : "y") {
    const e = this
      , {params: r, rtlTranslate: n, translate: i, $wrapperEl: o} = e;
    if (r.virtualTranslate)
        return n ? -i : i;
    if (r.cssMode)
        return i;
    let s = iEe(o[0], t);
    return n && (s = -s),
    s || 0
}
function wEe(t, e) {
    const r = this
      , {rtlTranslate: n, params: i, $wrapperEl: o, wrapperEl: s, progress: a} = r;
    let l = 0
      , c = 0;
    const u = 0;
    r.isHorizontal() ? l = n ? -t : t : c = t,
    i.roundLengths && (l = Math.floor(l),
    c = Math.floor(c)),
    i.cssMode ? s[r.isHorizontal() ? "scrollLeft" : "scrollTop"] = r.isHorizontal() ? -l : -c : i.virtualTranslate || o.transform(`translate3d(${l}px, ${c}px, ${u}px)`),
    r.previousTranslate = r.translate,
    r.translate = r.isHorizontal() ? l : c;
    let f;
    const d = r.maxTranslate() - r.minTranslate();
    d === 0 ? f = 0 : f = (t - r.minTranslate()) / d,
    f !== a && r.updateProgress(t),
    r.emit("setTranslate", r.translate, e)
}
function BEe() {
    return -this.snapGrid[0]
}
function SEe() {
    return -this.snapGrid[this.snapGrid.length - 1]
}
function TEe(t=0, e=this.params.speed, r=!0, n=!0, i) {
    const o = this
      , {params: s, wrapperEl: a} = o;
    if (o.animating && s.preventInteractionOnTransition)
        return !1;
    const l = o.minTranslate()
      , c = o.maxTranslate();
    let u;
    if (n && t > l ? u = l : n && t < c ? u = c : u = t,
    o.updateProgress(u),
    s.cssMode) {
        const f = o.isHorizontal();
        if (e === 0)
            a[f ? "scrollLeft" : "scrollTop"] = -u;
        else {
            if (!o.support.smoothScroll)
                return zR({
                    swiper: o,
                    targetPosition: -u,
                    side: f ? "left" : "top"
                }),
                !0;
            a.scrollTo({
                [f ? "left" : "top"]: -u,
                behavior: "smooth"
            })
        }
        return !0
    }
    return e === 0 ? (o.setTransition(0),
    o.setTranslate(u),
    r && (o.emit("beforeTransitionStart", e, i),
    o.emit("transitionEnd"))) : (o.setTransition(e),
    o.setTranslate(u),
    r && (o.emit("beforeTransitionStart", e, i),
    o.emit("transitionStart")),
    o.animating || (o.animating = !0,
    o.onTranslateToWrapperTransitionEnd || (o.onTranslateToWrapperTransitionEnd = function(d) {
        !o || o.destroyed || d.target === this && (o.$wrapperEl[0].removeEventListener("transitionend", o.onTranslateToWrapperTransitionEnd),
        o.$wrapperEl[0].removeEventListener("webkitTransitionEnd", o.onTranslateToWrapperTransitionEnd),
        o.onTranslateToWrapperTransitionEnd = null,
        delete o.onTranslateToWrapperTransitionEnd,
        r && o.emit("transitionEnd"))
    }
    ),
    o.$wrapperEl[0].addEventListener("transitionend", o.onTranslateToWrapperTransitionEnd),
    o.$wrapperEl[0].addEventListener("webkitTransitionEnd", o.onTranslateToWrapperTransitionEnd))),
    !0
}
const DEe = {
    getTranslate: AEe,
    setTranslate: wEe,
    minTranslate: BEe,
    maxTranslate: SEe,
    translateTo: TEe
};
function FEe(t, e) {
    const r = this;
    r.params.cssMode || r.$wrapperEl.transition(t),
    r.emit("setTransition", t, e)
}
function WR({swiper: t, runCallbacks: e, direction: r, step: n}) {
    const {activeIndex: i, previousIndex: o} = t;
    let s = r;
    if (s || (i > o ? s = "next" : i < o ? s = "prev" : s = "reset"),
    t.emit(`transition${n}`),
    e && i !== o) {
        if (s === "reset") {
            t.emit(`slideResetTransition${n}`);
            return
        }
        t.emit(`slideChangeTransition${n}`),
        s === "next" ? t.emit(`slideNextTransition${n}`) : t.emit(`slidePrevTransition${n}`)
    }
}
function PEe(t=!0, e) {
    const r = this
      , {params: n} = r;
    n.cssMode || (n.autoHeight && r.updateAutoHeight(),
    WR({
        swiper: r,
        runCallbacks: t,
        direction: e,
        step: "Start"
    }))
}
function IEe(t=!0, e) {
    const r = this
      , {params: n} = r;
    r.animating = !1,
    !n.cssMode && (r.setTransition(0),
    WR({
        swiper: r,
        runCallbacks: t,
        direction: e,
        step: "End"
    }))
}
const OEe = {
    setTransition: FEe,
    transitionStart: PEe,
    transitionEnd: IEe
};
function kEe(t=0, e=this.params.speed, r=!0, n, i) {
    if (typeof t != "number" && typeof t != "string")
        throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof t}] given.`);
    if (typeof t == "string") {
        const p = parseInt(t, 10);
        if (!isFinite(p))
            throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${t}] given.`);
        t = p
    }
    const o = this;
    let s = t;
    s < 0 && (s = 0);
    const {params: a, snapGrid: l, slidesGrid: c, previousIndex: u, activeIndex: f, rtlTranslate: d, wrapperEl: h, enabled: x} = o;
    if (o.animating && a.preventInteractionOnTransition || !x && !n && !i)
        return !1;
    const y = Math.min(o.params.slidesPerGroupSkip, s);
    let m = y + Math.floor((s - y) / o.params.slidesPerGroup);
    m >= l.length && (m = l.length - 1);
    const E = -l[m];
    if (a.normalizeSlideIndex)
        for (let p = 0; p < c.length; p += 1) {
            const v = -Math.floor(E * 100)
              , _ = Math.floor(c[p] * 100)
              , b = Math.floor(c[p + 1] * 100);
            typeof c[p + 1] < "u" ? v >= _ && v < b - (b - _) / 2 ? s = p : v >= _ && v < b && (s = p + 1) : v >= _ && (s = p)
        }
    if (o.initialized && s !== f && (!o.allowSlideNext && E < o.translate && E < o.minTranslate() || !o.allowSlidePrev && E > o.translate && E > o.maxTranslate() && (f || 0) !== s))
        return !1;
    s !== (u || 0) && r && o.emit("beforeSlideChangeStart"),
    o.updateProgress(E);
    let g;
    if (s > f ? g = "next" : s < f ? g = "prev" : g = "reset",
    d && -E === o.translate || !d && E === o.translate)
        return o.updateActiveIndex(s),
        a.autoHeight && o.updateAutoHeight(),
        o.updateSlidesClasses(),
        a.effect !== "slide" && o.setTranslate(E),
        g !== "reset" && (o.transitionStart(r, g),
        o.transitionEnd(r, g)),
        !1;
    if (a.cssMode) {
        const p = o.isHorizontal()
          , v = d ? E : -E;
        if (e === 0) {
            const _ = o.virtual && o.params.virtual.enabled;
            _ && (o.wrapperEl.style.scrollSnapType = "none",
            o._immediateVirtual = !0),
            h[p ? "scrollLeft" : "scrollTop"] = v,
            _ && requestAnimationFrame( () => {
                o.wrapperEl.style.scrollSnapType = "",
                o._swiperImmediateVirtual = !1
            }
            )
        } else {
            if (!o.support.smoothScroll)
                return zR({
                    swiper: o,
                    targetPosition: v,
                    side: p ? "left" : "top"
                }),
                !0;
            h.scrollTo({
                [p ? "left" : "top"]: v,
                behavior: "smooth"
            })
        }
        return !0
    }
    return o.setTransition(e),
    o.setTranslate(E),
    o.updateActiveIndex(s),
    o.updateSlidesClasses(),
    o.emit("beforeTransitionStart", e, n),
    o.transitionStart(r, g),
    e === 0 ? o.transitionEnd(r, g) : o.animating || (o.animating = !0,
    o.onSlideToWrapperTransitionEnd || (o.onSlideToWrapperTransitionEnd = function(v) {
        !o || o.destroyed || v.target === this && (o.$wrapperEl[0].removeEventListener("transitionend", o.onSlideToWrapperTransitionEnd),
        o.$wrapperEl[0].removeEventListener("webkitTransitionEnd", o.onSlideToWrapperTransitionEnd),
        o.onSlideToWrapperTransitionEnd = null,
        delete o.onSlideToWrapperTransitionEnd,
        o.transitionEnd(r, g))
    }
    ),
    o.$wrapperEl[0].addEventListener("transitionend", o.onSlideToWrapperTransitionEnd),
    o.$wrapperEl[0].addEventListener("webkitTransitionEnd", o.onSlideToWrapperTransitionEnd)),
    !0
}
function REe(t=0, e=this.params.speed, r=!0, n) {
    if (typeof t == "string") {
        const s = parseInt(t, 10);
        if (!isFinite(s))
            throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${t}] given.`);
        t = s
    }
    const i = this;
    let o = t;
    return i.params.loop && (o += i.loopedSlides),
    i.slideTo(o, e, r, n)
}
function MEe(t=this.params.speed, e=!0, r) {
    const n = this
      , {animating: i, enabled: o, params: s} = n;
    if (!o)
        return n;
    let a = s.slidesPerGroup;
    s.slidesPerView === "auto" && s.slidesPerGroup === 1 && s.slidesPerGroupAuto && (a = Math.max(n.slidesPerViewDynamic("current", !0), 1));
    const l = n.activeIndex < s.slidesPerGroupSkip ? 1 : a;
    if (s.loop) {
        if (i && s.loopPreventsSlide)
            return !1;
        n.loopFix(),
        n._clientLeft = n.$wrapperEl[0].clientLeft
    }
    return s.rewind && n.isEnd ? n.slideTo(0, t, e, r) : n.slideTo(n.activeIndex + l, t, e, r)
}
function NEe(t=this.params.speed, e=!0, r) {
    const n = this
      , {params: i, animating: o, snapGrid: s, slidesGrid: a, rtlTranslate: l, enabled: c} = n;
    if (!c)
        return n;
    if (i.loop) {
        if (o && i.loopPreventsSlide)
            return !1;
        n.loopFix(),
        n._clientLeft = n.$wrapperEl[0].clientLeft
    }
    const u = l ? n.translate : -n.translate;
    function f(m) {
        return m < 0 ? -Math.floor(Math.abs(m)) : Math.floor(m)
    }
    const d = f(u)
      , h = s.map(m => f(m));
    let x = s[h.indexOf(d) - 1];
    if (typeof x > "u" && i.cssMode) {
        let m;
        s.forEach( (E, g) => {
            d >= E && (m = g)
        }
        ),
        typeof m < "u" && (x = s[m > 0 ? m - 1 : m])
    }
    let y = 0;
    if (typeof x < "u" && (y = a.indexOf(x),
    y < 0 && (y = n.activeIndex - 1),
    i.slidesPerView === "auto" && i.slidesPerGroup === 1 && i.slidesPerGroupAuto && (y = y - n.slidesPerViewDynamic("previous", !0) + 1,
    y = Math.max(y, 0))),
    i.rewind && n.isBeginning) {
        const m = n.params.virtual && n.params.virtual.enabled && n.virtual ? n.virtual.slides.length - 1 : n.slides.length - 1;
        return n.slideTo(m, t, e, r)
    }
    return n.slideTo(y, t, e, r)
}
function LEe(t=this.params.speed, e=!0, r) {
    const n = this;
    return n.slideTo(n.activeIndex, t, e, r)
}
function $Ee(t=this.params.speed, e=!0, r, n=.5) {
    const i = this;
    let o = i.activeIndex;
    const s = Math.min(i.params.slidesPerGroupSkip, o)
      , a = s + Math.floor((o - s) / i.params.slidesPerGroup)
      , l = i.rtlTranslate ? i.translate : -i.translate;
    if (l >= i.snapGrid[a]) {
        const c = i.snapGrid[a]
          , u = i.snapGrid[a + 1];
        l - c > (u - c) * n && (o += i.params.slidesPerGroup)
    } else {
        const c = i.snapGrid[a - 1]
          , u = i.snapGrid[a];
        l - c <= (u - c) * n && (o -= i.params.slidesPerGroup)
    }
    return o = Math.max(o, 0),
    o = Math.min(o, i.slidesGrid.length - 1),
    i.slideTo(o, t, e, r)
}
function UEe() {
    const t = this
      , {params: e, $wrapperEl: r} = t
      , n = e.slidesPerView === "auto" ? t.slidesPerViewDynamic() : e.slidesPerView;
    let i = t.clickedIndex, o;
    if (e.loop) {
        if (t.animating)
            return;
        o = parseInt(De(t.clickedSlide).attr("data-swiper-slide-index"), 10),
        e.centeredSlides ? i < t.loopedSlides - n / 2 || i > t.slides.length - t.loopedSlides + n / 2 ? (t.loopFix(),
        i = r.children(`.${e.slideClass}[data-swiper-slide-index="${o}"]:not(.${e.slideDuplicateClass})`).eq(0).index(),
        qx( () => {
            t.slideTo(i)
        }
        )) : t.slideTo(i) : i > t.slides.length - n ? (t.loopFix(),
        i = r.children(`.${e.slideClass}[data-swiper-slide-index="${o}"]:not(.${e.slideDuplicateClass})`).eq(0).index(),
        qx( () => {
            t.slideTo(i)
        }
        )) : t.slideTo(i)
    } else
        t.slideTo(i)
}
const GEe = {
    slideTo: kEe,
    slideToLoop: REe,
    slideNext: MEe,
    slidePrev: NEe,
    slideReset: LEe,
    slideToClosest: $Ee,
    slideToClickedSlide: UEe
};
function HEe() {
    const t = this
      , e = en()
      , {params: r, $wrapperEl: n} = t
      , i = n.children().length > 0 ? De(n.children()[0].parentNode) : n;
    i.children(`.${r.slideClass}.${r.slideDuplicateClass}`).remove();
    let o = i.children(`.${r.slideClass}`);
    if (r.loopFillGroupWithBlank) {
        const l = r.slidesPerGroup - o.length % r.slidesPerGroup;
        if (l !== r.slidesPerGroup) {
            for (let c = 0; c < l; c += 1) {
                const u = De(e.createElement("div")).addClass(`${r.slideClass} ${r.slideBlankClass}`);
                i.append(u)
            }
            o = i.children(`.${r.slideClass}`)
        }
    }
    r.slidesPerView === "auto" && !r.loopedSlides && (r.loopedSlides = o.length),
    t.loopedSlides = Math.ceil(parseFloat(r.loopedSlides || r.slidesPerView, 10)),
    t.loopedSlides += r.loopAdditionalSlides,
    t.loopedSlides > o.length && t.params.loopedSlidesLimit && (t.loopedSlides = o.length);
    const s = []
      , a = [];
    o.each( (l, c) => {
        De(l).attr("data-swiper-slide-index", c)
    }
    );
    for (let l = 0; l < t.loopedSlides; l += 1) {
        const c = l - Math.floor(l / o.length) * o.length;
        a.push(o.eq(c)[0]),
        s.unshift(o.eq(o.length - c - 1)[0])
    }
    for (let l = 0; l < a.length; l += 1)
        i.append(De(a[l].cloneNode(!0)).addClass(r.slideDuplicateClass));
    for (let l = s.length - 1; l >= 0; l -= 1)
        i.prepend(De(s[l].cloneNode(!0)).addClass(r.slideDuplicateClass))
}
function VEe() {
    const t = this;
    t.emit("beforeLoopFix");
    const {activeIndex: e, slides: r, loopedSlides: n, allowSlidePrev: i, allowSlideNext: o, snapGrid: s, rtlTranslate: a} = t;
    let l;
    t.allowSlidePrev = !0,
    t.allowSlideNext = !0;
    const u = -s[e] - t.getTranslate();
    e < n ? (l = r.length - n * 3 + e,
    l += n,
    t.slideTo(l, 0, !1, !0) && u !== 0 && t.setTranslate((a ? -t.translate : t.translate) - u)) : e >= r.length - n && (l = -r.length + e + n,
    l += n,
    t.slideTo(l, 0, !1, !0) && u !== 0 && t.setTranslate((a ? -t.translate : t.translate) - u)),
    t.allowSlidePrev = i,
    t.allowSlideNext = o,
    t.emit("loopFix")
}
function zEe() {
    const t = this
      , {$wrapperEl: e, params: r, slides: n} = t;
    e.children(`.${r.slideClass}.${r.slideDuplicateClass},.${r.slideClass}.${r.slideBlankClass}`).remove(),
    n.removeAttr("data-swiper-slide-index")
}
const jEe = {
    loopCreate: HEe,
    loopFix: VEe,
    loopDestroy: zEe
};
function WEe(t) {
    const e = this;
    if (e.support.touch || !e.params.simulateTouch || e.params.watchOverflow && e.isLocked || e.params.cssMode)
        return;
    const r = e.params.touchEventsTarget === "container" ? e.el : e.wrapperEl;
    r.style.cursor = "move",
    r.style.cursor = t ? "grabbing" : "grab"
}
function YEe() {
    const t = this;
    t.support.touch || t.params.watchOverflow && t.isLocked || t.params.cssMode || (t[t.params.touchEventsTarget === "container" ? "el" : "wrapperEl"].style.cursor = "")
}
const XEe = {
    setGrabCursor: WEe,
    unsetGrabCursor: YEe
};
function KEe(t, e=this) {
    function r(n) {
        if (!n || n === en() || n === Mr())
            return null;
        n.assignedSlot && (n = n.assignedSlot);
        const i = n.closest(t);
        return !i && !n.getRootNode ? null : i || r(n.getRootNode().host)
    }
    return r(e)
}
function qEe(t) {
    const e = this
      , r = en()
      , n = Mr()
      , i = e.touchEventsData
      , {params: o, touches: s, enabled: a} = e;
    if (!a || e.animating && o.preventInteractionOnTransition)
        return;
    !e.animating && o.cssMode && o.loop && e.loopFix();
    let l = t;
    l.originalEvent && (l = l.originalEvent);
    let c = De(l.target);
    if (o.touchEventsTarget === "wrapper" && !c.closest(e.wrapperEl).length || (i.isTouchEvent = l.type === "touchstart",
    !i.isTouchEvent && "which"in l && l.which === 3) || !i.isTouchEvent && "button"in l && l.button > 0 || i.isTouched && i.isMoved)
        return;
    const u = !!o.noSwipingClass && o.noSwipingClass !== ""
      , f = t.composedPath ? t.composedPath() : t.path;
    u && l.target && l.target.shadowRoot && f && (c = De(f[0]));
    const d = o.noSwipingSelector ? o.noSwipingSelector : `.${o.noSwipingClass}`
      , h = !!(l.target && l.target.shadowRoot);
    if (o.noSwiping && (h ? KEe(d, c[0]) : c.closest(d)[0])) {
        e.allowClick = !0;
        return
    }
    if (o.swipeHandler && !c.closest(o.swipeHandler)[0])
        return;
    s.currentX = l.type === "touchstart" ? l.targetTouches[0].pageX : l.pageX,
    s.currentY = l.type === "touchstart" ? l.targetTouches[0].pageY : l.pageY;
    const x = s.currentX
      , y = s.currentY
      , m = o.edgeSwipeDetection || o.iOSEdgeSwipeDetection
      , E = o.edgeSwipeThreshold || o.iOSEdgeSwipeThreshold;
    if (m && (x <= E || x >= n.innerWidth - E))
        if (m === "prevent")
            t.preventDefault();
        else
            return;
    if (Object.assign(i, {
        isTouched: !0,
        isMoved: !1,
        allowTouchCallbacks: !0,
        isScrolling: void 0,
        startMoving: void 0
    }),
    s.startX = x,
    s.startY = y,
    i.touchStartTime = Pf(),
    e.allowClick = !0,
    e.updateSize(),
    e.swipeDirection = void 0,
    o.threshold > 0 && (i.allowThresholdMove = !1),
    l.type !== "touchstart") {
        let g = !0;
        c.is(i.focusableElements) && (g = !1,
        c[0].nodeName === "SELECT" && (i.isTouched = !1)),
        r.activeElement && De(r.activeElement).is(i.focusableElements) && r.activeElement !== c[0] && r.activeElement.blur();
        const p = g && e.allowTouchMove && o.touchStartPreventDefault;
        (o.touchStartForcePreventDefault || p) && !c[0].isContentEditable && l.preventDefault()
    }
    e.params.freeMode && e.params.freeMode.enabled && e.freeMode && e.animating && !o.cssMode && e.freeMode.onTouchStart(),
    e.emit("touchStart", l)
}
function ZEe(t) {
    const e = en()
      , r = this
      , n = r.touchEventsData
      , {params: i, touches: o, rtlTranslate: s, enabled: a} = r;
    if (!a)
        return;
    let l = t;
    if (l.originalEvent && (l = l.originalEvent),
    !n.isTouched) {
        n.startMoving && n.isScrolling && r.emit("touchMoveOpposite", l);
        return
    }
    if (n.isTouchEvent && l.type !== "touchmove")
        return;
    const c = l.type === "touchmove" && l.targetTouches && (l.targetTouches[0] || l.changedTouches[0])
      , u = l.type === "touchmove" ? c.pageX : l.pageX
      , f = l.type === "touchmove" ? c.pageY : l.pageY;
    if (l.preventedByNestedSwiper) {
        o.startX = u,
        o.startY = f;
        return
    }
    if (!r.allowTouchMove) {
        De(l.target).is(n.focusableElements) || (r.allowClick = !1),
        n.isTouched && (Object.assign(o, {
            startX: u,
            startY: f,
            currentX: u,
            currentY: f
        }),
        n.touchStartTime = Pf());
        return
    }
    if (n.isTouchEvent && i.touchReleaseOnEdges && !i.loop) {
        if (r.isVertical()) {
            if (f < o.startY && r.translate <= r.maxTranslate() || f > o.startY && r.translate >= r.minTranslate()) {
                n.isTouched = !1,
                n.isMoved = !1;
                return
            }
        } else if (u < o.startX && r.translate <= r.maxTranslate() || u > o.startX && r.translate >= r.minTranslate())
            return
    }
    if (n.isTouchEvent && e.activeElement && l.target === e.activeElement && De(l.target).is(n.focusableElements)) {
        n.isMoved = !0,
        r.allowClick = !1;
        return
    }
    if (n.allowTouchCallbacks && r.emit("touchMove", l),
    l.targetTouches && l.targetTouches.length > 1)
        return;
    o.currentX = u,
    o.currentY = f;
    const d = o.currentX - o.startX
      , h = o.currentY - o.startY;
    if (r.params.threshold && Math.sqrt(d ** 2 + h ** 2) < r.params.threshold)
        return;
    if (typeof n.isScrolling > "u") {
        let E;
        r.isHorizontal() && o.currentY === o.startY || r.isVertical() && o.currentX === o.startX ? n.isScrolling = !1 : d * d + h * h >= 25 && (E = Math.atan2(Math.abs(h), Math.abs(d)) * 180 / Math.PI,
        n.isScrolling = r.isHorizontal() ? E > i.touchAngle : 90 - E > i.touchAngle)
    }
    if (n.isScrolling && r.emit("touchMoveOpposite", l),
    typeof n.startMoving > "u" && (o.currentX !== o.startX || o.currentY !== o.startY) && (n.startMoving = !0),
    n.isScrolling) {
        n.isTouched = !1;
        return
    }
    if (!n.startMoving)
        return;
    r.allowClick = !1,
    !i.cssMode && l.cancelable && l.preventDefault(),
    i.touchMoveStopPropagation && !i.nested && l.stopPropagation(),
    n.isMoved || (i.loop && !i.cssMode && r.loopFix(),
    n.startTranslate = r.getTranslate(),
    r.setTransition(0),
    r.animating && r.$wrapperEl.trigger("webkitTransitionEnd transitionend"),
    n.allowMomentumBounce = !1,
    i.grabCursor && (r.allowSlideNext === !0 || r.allowSlidePrev === !0) && r.setGrabCursor(!0),
    r.emit("sliderFirstMove", l)),
    r.emit("sliderMove", l),
    n.isMoved = !0;
    let x = r.isHorizontal() ? d : h;
    o.diff = x,
    x *= i.touchRatio,
    s && (x = -x),
    r.swipeDirection = x > 0 ? "prev" : "next",
    n.currentTranslate = x + n.startTranslate;
    let y = !0
      , m = i.resistanceRatio;
    if (i.touchReleaseOnEdges && (m = 0),
    x > 0 && n.currentTranslate > r.minTranslate() ? (y = !1,
    i.resistance && (n.currentTranslate = r.minTranslate() - 1 + (-r.minTranslate() + n.startTranslate + x) ** m)) : x < 0 && n.currentTranslate < r.maxTranslate() && (y = !1,
    i.resistance && (n.currentTranslate = r.maxTranslate() + 1 - (r.maxTranslate() - n.startTranslate - x) ** m)),
    y && (l.preventedByNestedSwiper = !0),
    !r.allowSlideNext && r.swipeDirection === "next" && n.currentTranslate < n.startTranslate && (n.currentTranslate = n.startTranslate),
    !r.allowSlidePrev && r.swipeDirection === "prev" && n.currentTranslate > n.startTranslate && (n.currentTranslate = n.startTranslate),
    !r.allowSlidePrev && !r.allowSlideNext && (n.currentTranslate = n.startTranslate),
    i.threshold > 0)
        if (Math.abs(x) > i.threshold || n.allowThresholdMove) {
            if (!n.allowThresholdMove) {
                n.allowThresholdMove = !0,
                o.startX = o.currentX,
                o.startY = o.currentY,
                n.currentTranslate = n.startTranslate,
                o.diff = r.isHorizontal() ? o.currentX - o.startX : o.currentY - o.startY;
                return
            }
        } else {
            n.currentTranslate = n.startTranslate;
            return
        }
    !i.followFinger || i.cssMode || ((i.freeMode && i.freeMode.enabled && r.freeMode || i.watchSlidesProgress) && (r.updateActiveIndex(),
    r.updateSlidesClasses()),
    r.params.freeMode && i.freeMode.enabled && r.freeMode && r.freeMode.onTouchMove(),
    r.updateProgress(n.currentTranslate),
    r.setTranslate(n.currentTranslate))
}
function JEe(t) {
    const e = this
      , r = e.touchEventsData
      , {params: n, touches: i, rtlTranslate: o, slidesGrid: s, enabled: a} = e;
    if (!a)
        return;
    let l = t;
    if (l.originalEvent && (l = l.originalEvent),
    r.allowTouchCallbacks && e.emit("touchEnd", l),
    r.allowTouchCallbacks = !1,
    !r.isTouched) {
        r.isMoved && n.grabCursor && e.setGrabCursor(!1),
        r.isMoved = !1,
        r.startMoving = !1;
        return
    }
    n.grabCursor && r.isMoved && r.isTouched && (e.allowSlideNext === !0 || e.allowSlidePrev === !0) && e.setGrabCursor(!1);
    const c = Pf()
      , u = c - r.touchStartTime;
    if (e.allowClick) {
        const g = l.path || l.composedPath && l.composedPath();
        e.updateClickedSlide(g && g[0] || l.target),
        e.emit("tap click", l),
        u < 300 && c - r.lastClickTime < 300 && e.emit("doubleTap doubleClick", l)
    }
    if (r.lastClickTime = Pf(),
    qx( () => {
        e.destroyed || (e.allowClick = !0)
    }
    ),
    !r.isTouched || !r.isMoved || !e.swipeDirection || i.diff === 0 || r.currentTranslate === r.startTranslate) {
        r.isTouched = !1,
        r.isMoved = !1,
        r.startMoving = !1;
        return
    }
    r.isTouched = !1,
    r.isMoved = !1,
    r.startMoving = !1;
    let f;
    if (n.followFinger ? f = o ? e.translate : -e.translate : f = -r.currentTranslate,
    n.cssMode)
        return;
    if (e.params.freeMode && n.freeMode.enabled) {
        e.freeMode.onTouchEnd({
            currentPos: f
        });
        return
    }
    let d = 0
      , h = e.slidesSizesGrid[0];
    for (let g = 0; g < s.length; g += g < n.slidesPerGroupSkip ? 1 : n.slidesPerGroup) {
        const p = g < n.slidesPerGroupSkip - 1 ? 1 : n.slidesPerGroup;
        typeof s[g + p] < "u" ? f >= s[g] && f < s[g + p] && (d = g,
        h = s[g + p] - s[g]) : f >= s[g] && (d = g,
        h = s[s.length - 1] - s[s.length - 2])
    }
    let x = null
      , y = null;
    n.rewind && (e.isBeginning ? y = e.params.virtual && e.params.virtual.enabled && e.virtual ? e.virtual.slides.length - 1 : e.slides.length - 1 : e.isEnd && (x = 0));
    const m = (f - s[d]) / h
      , E = d < n.slidesPerGroupSkip - 1 ? 1 : n.slidesPerGroup;
    if (u > n.longSwipesMs) {
        if (!n.longSwipes) {
            e.slideTo(e.activeIndex);
            return
        }
        e.swipeDirection === "next" && (m >= n.longSwipesRatio ? e.slideTo(n.rewind && e.isEnd ? x : d + E) : e.slideTo(d)),
        e.swipeDirection === "prev" && (m > 1 - n.longSwipesRatio ? e.slideTo(d + E) : y !== null && m < 0 && Math.abs(m) > n.longSwipesRatio ? e.slideTo(y) : e.slideTo(d))
    } else {
        if (!n.shortSwipes) {
            e.slideTo(e.activeIndex);
            return
        }
        e.navigation && (l.target === e.navigation.nextEl || l.target === e.navigation.prevEl) ? l.target === e.navigation.nextEl ? e.slideTo(d + E) : e.slideTo(d) : (e.swipeDirection === "next" && e.slideTo(x !== null ? x : d + E),
        e.swipeDirection === "prev" && e.slideTo(y !== null ? y : d))
    }
}
function $4() {
    const t = this
      , {params: e, el: r} = t;
    if (r && r.offsetWidth === 0)
        return;
    e.breakpoints && t.setBreakpoint();
    const {allowSlideNext: n, allowSlidePrev: i, snapGrid: o} = t;
    t.allowSlideNext = !0,
    t.allowSlidePrev = !0,
    t.updateSize(),
    t.updateSlides(),
    t.updateSlidesClasses(),
    (e.slidesPerView === "auto" || e.slidesPerView > 1) && t.isEnd && !t.isBeginning && !t.params.centeredSlides ? t.slideTo(t.slides.length - 1, 0, !1, !0) : t.slideTo(t.activeIndex, 0, !1, !0),
    t.autoplay && t.autoplay.running && t.autoplay.paused && t.autoplay.run(),
    t.allowSlidePrev = i,
    t.allowSlideNext = n,
    t.params.watchOverflow && o !== t.snapGrid && t.checkOverflow()
}
function QEe(t) {
    const e = this;
    e.enabled && (e.allowClick || (e.params.preventClicks && t.preventDefault(),
    e.params.preventClicksPropagation && e.animating && (t.stopPropagation(),
    t.stopImmediatePropagation())))
}
function e_e() {
    const t = this
      , {wrapperEl: e, rtlTranslate: r, enabled: n} = t;
    if (!n)
        return;
    t.previousTranslate = t.translate,
    t.isHorizontal() ? t.translate = -e.scrollLeft : t.translate = -e.scrollTop,
    t.translate === 0 && (t.translate = 0),
    t.updateActiveIndex(),
    t.updateSlidesClasses();
    let i;
    const o = t.maxTranslate() - t.minTranslate();
    o === 0 ? i = 0 : i = (t.translate - t.minTranslate()) / o,
    i !== t.progress && t.updateProgress(r ? -t.translate : t.translate),
    t.emit("setTranslate", t.translate, !1)
}
let U4 = !1;
function t_e() {}
const YR = (t, e) => {
    const r = en()
      , {params: n, touchEvents: i, el: o, wrapperEl: s, device: a, support: l} = t
      , c = !!n.nested
      , u = e === "on" ? "addEventListener" : "removeEventListener"
      , f = e;
    if (!l.touch)
        o[u](i.start, t.onTouchStart, !1),
        r[u](i.move, t.onTouchMove, c),
        r[u](i.end, t.onTouchEnd, !1);
    else {
        const d = i.start === "touchstart" && l.passiveListener && n.passiveListeners ? {
            passive: !0,
            capture: !1
        } : !1;
        o[u](i.start, t.onTouchStart, d),
        o[u](i.move, t.onTouchMove, l.passiveListener ? {
            passive: !1,
            capture: c
        } : c),
        o[u](i.end, t.onTouchEnd, d),
        i.cancel && o[u](i.cancel, t.onTouchEnd, d)
    }
    (n.preventClicks || n.preventClicksPropagation) && o[u]("click", t.onClick, !0),
    n.cssMode && s[u]("scroll", t.onScroll),
    n.updateOnWindowResize ? t[f](a.ios || a.android ? "resize orientationchange observerUpdate" : "resize observerUpdate", $4, !0) : t[f]("observerUpdate", $4, !0)
}
;
function r_e() {
    const t = this
      , e = en()
      , {params: r, support: n} = t;
    t.onTouchStart = qEe.bind(t),
    t.onTouchMove = ZEe.bind(t),
    t.onTouchEnd = JEe.bind(t),
    r.cssMode && (t.onScroll = e_e.bind(t)),
    t.onClick = QEe.bind(t),
    n.touch && !U4 && (e.addEventListener("touchstart", t_e),
    U4 = !0),
    YR(t, "on")
}
function n_e() {
    YR(this, "off")
}
const i_e = {
    attachEvents: r_e,
    detachEvents: n_e
}
  , G4 = (t, e) => t.grid && e.grid && e.grid.rows > 1;
function o_e() {
    const t = this
      , {activeIndex: e, initialized: r, loopedSlides: n=0, params: i, $el: o} = t
      , s = i.breakpoints;
    if (!s || s && Object.keys(s).length === 0)
        return;
    const a = t.getBreakpoint(s, t.params.breakpointsBase, t.el);
    if (!a || t.currentBreakpoint === a)
        return;
    const c = (a in s ? s[a] : void 0) || t.originalParams
      , u = G4(t, i)
      , f = G4(t, c)
      , d = i.enabled;
    u && !f ? (o.removeClass(`${i.containerModifierClass}grid ${i.containerModifierClass}grid-column`),
    t.emitContainerClasses()) : !u && f && (o.addClass(`${i.containerModifierClass}grid`),
    (c.grid.fill && c.grid.fill === "column" || !c.grid.fill && i.grid.fill === "column") && o.addClass(`${i.containerModifierClass}grid-column`),
    t.emitContainerClasses()),
    ["navigation", "pagination", "scrollbar"].forEach(m => {
        const E = i[m] && i[m].enabled
          , g = c[m] && c[m].enabled;
        E && !g && t[m].disable(),
        !E && g && t[m].enable()
    }
    );
    const h = c.direction && c.direction !== i.direction
      , x = i.loop && (c.slidesPerView !== i.slidesPerView || h);
    h && r && t.changeDirection(),
    Gn(t.params, c);
    const y = t.params.enabled;
    Object.assign(t, {
        allowTouchMove: t.params.allowTouchMove,
        allowSlideNext: t.params.allowSlideNext,
        allowSlidePrev: t.params.allowSlidePrev
    }),
    d && !y ? t.disable() : !d && y && t.enable(),
    t.currentBreakpoint = a,
    t.emit("_beforeBreakpoint", c),
    x && r && (t.loopDestroy(),
    t.loopCreate(),
    t.updateSlides(),
    t.slideTo(e - n + t.loopedSlides, 0, !1)),
    t.emit("breakpoint", c)
}
function s_e(t, e="window", r) {
    if (!t || e === "container" && !r)
        return;
    let n = !1;
    const i = Mr()
      , o = e === "window" ? i.innerHeight : r.clientHeight
      , s = Object.keys(t).map(a => {
        if (typeof a == "string" && a.indexOf("@") === 0) {
            const l = parseFloat(a.substr(1));
            return {
                value: o * l,
                point: a
            }
        }
        return {
            value: a,
            point: a
        }
    }
    );
    s.sort( (a, l) => parseInt(a.value, 10) - parseInt(l.value, 10));
    for (let a = 0; a < s.length; a += 1) {
        const {point: l, value: c} = s[a];
        e === "window" ? i.matchMedia(`(min-width: ${c}px)`).matches && (n = l) : c <= r.clientWidth && (n = l)
    }
    return n || "max"
}
const a_e = {
    setBreakpoint: o_e,
    getBreakpoint: s_e
};
function l_e(t, e) {
    const r = [];
    return t.forEach(n => {
        typeof n == "object" ? Object.keys(n).forEach(i => {
            n[i] && r.push(e + i)
        }
        ) : typeof n == "string" && r.push(e + n)
    }
    ),
    r
}
function c_e() {
    const t = this
      , {classNames: e, params: r, rtl: n, $el: i, device: o, support: s} = t
      , a = l_e(["initialized", r.direction, {
        "pointer-events": !s.touch
    }, {
        "free-mode": t.params.freeMode && r.freeMode.enabled
    }, {
        autoheight: r.autoHeight
    }, {
        rtl: n
    }, {
        grid: r.grid && r.grid.rows > 1
    }, {
        "grid-column": r.grid && r.grid.rows > 1 && r.grid.fill === "column"
    }, {
        android: o.android
    }, {
        ios: o.ios
    }, {
        "css-mode": r.cssMode
    }, {
        centered: r.cssMode && r.centeredSlides
    }, {
        "watch-progress": r.watchSlidesProgress
    }], r.containerModifierClass);
    e.push(...a),
    i.addClass([...e].join(" ")),
    t.emitContainerClasses()
}
function u_e() {
    const t = this
      , {$el: e, classNames: r} = t;
    e.removeClass(r.join(" ")),
    t.emitContainerClasses()
}
const f_e = {
    addClasses: c_e,
    removeClasses: u_e
};
function d_e(t, e, r, n, i, o) {
    const s = Mr();
    let a;
    function l() {
        o && o()
    }
    !De(t).parent("picture")[0] && (!t.complete || !i) && e ? (a = new s.Image,
    a.onload = l,
    a.onerror = l,
    n && (a.sizes = n),
    r && (a.srcset = r),
    e && (a.src = e)) : l()
}
function h_e() {
    const t = this;
    t.imagesToLoad = t.$el.find("img");
    function e() {
        typeof t > "u" || t === null || !t || t.destroyed || (t.imagesLoaded !== void 0 && (t.imagesLoaded += 1),
        t.imagesLoaded === t.imagesToLoad.length && (t.params.updateOnImagesReady && t.update(),
        t.emit("imagesReady")))
    }
    for (let r = 0; r < t.imagesToLoad.length; r += 1) {
        const n = t.imagesToLoad[r];
        t.loadImage(n, n.currentSrc || n.getAttribute("src"), n.srcset || n.getAttribute("srcset"), n.sizes || n.getAttribute("sizes"), !0, e)
    }
}
const x_e = {
    loadImage: d_e,
    preloadImages: h_e
};
function p_e() {
    const t = this
      , {isLocked: e, params: r} = t
      , {slidesOffsetBefore: n} = r;
    if (n) {
        const i = t.slides.length - 1
          , o = t.slidesGrid[i] + t.slidesSizesGrid[i] + n * 2;
        t.isLocked = t.size > o
    } else
        t.isLocked = t.snapGrid.length === 1;
    r.allowSlideNext === !0 && (t.allowSlideNext = !t.isLocked),
    r.allowSlidePrev === !0 && (t.allowSlidePrev = !t.isLocked),
    e && e !== t.isLocked && (t.isEnd = !1),
    e !== t.isLocked && t.emit(t.isLocked ? "lock" : "unlock")
}
const g_e = {
    checkOverflow: p_e
}
  , H4 = {
    init: !0,
    direction: "horizontal",
    touchEventsTarget: "wrapper",
    initialSlide: 0,
    speed: 300,
    cssMode: !1,
    updateOnWindowResize: !0,
    resizeObserver: !0,
    nested: !1,
    createElements: !1,
    enabled: !0,
    focusableElements: "input, select, option, textarea, button, video, label",
    width: null,
    height: null,
    preventInteractionOnTransition: !1,
    userAgent: null,
    url: null,
    edgeSwipeDetection: !1,
    edgeSwipeThreshold: 20,
    autoHeight: !1,
    setWrapperSize: !1,
    virtualTranslate: !1,
    effect: "slide",
    breakpoints: void 0,
    breakpointsBase: "window",
    spaceBetween: 0,
    slidesPerView: 1,
    slidesPerGroup: 1,
    slidesPerGroupSkip: 0,
    slidesPerGroupAuto: !1,
    centeredSlides: !1,
    centeredSlidesBounds: !1,
    slidesOffsetBefore: 0,
    slidesOffsetAfter: 0,
    normalizeSlideIndex: !0,
    centerInsufficientSlides: !1,
    watchOverflow: !0,
    roundLengths: !1,
    touchRatio: 1,
    touchAngle: 45,
    simulateTouch: !0,
    shortSwipes: !0,
    longSwipes: !0,
    longSwipesRatio: .5,
    longSwipesMs: 300,
    followFinger: !0,
    allowTouchMove: !0,
    threshold: 0,
    touchMoveStopPropagation: !1,
    touchStartPreventDefault: !0,
    touchStartForcePreventDefault: !1,
    touchReleaseOnEdges: !1,
    uniqueNavElements: !0,
    resistance: !0,
    resistanceRatio: .85,
    watchSlidesProgress: !1,
    grabCursor: !1,
    preventClicks: !0,
    preventClicksPropagation: !0,
    slideToClickedSlide: !1,
    preloadImages: !0,
    updateOnImagesReady: !0,
    loop: !1,
    loopAdditionalSlides: 0,
    loopedSlides: null,
    loopedSlidesLimit: !0,
    loopFillGroupWithBlank: !1,
    loopPreventsSlide: !0,
    rewind: !1,
    allowSlidePrev: !0,
    allowSlideNext: !0,
    swipeHandler: null,
    noSwiping: !0,
    noSwipingClass: "swiper-no-swiping",
    noSwipingSelector: null,
    passiveListeners: !0,
    maxBackfaceHiddenSlides: 10,
    containerModifierClass: "swiper-",
    slideClass: "swiper-slide",
    slideBlankClass: "swiper-slide-invisible-blank",
    slideActiveClass: "swiper-slide-active",
    slideDuplicateActiveClass: "swiper-slide-duplicate-active",
    slideVisibleClass: "swiper-slide-visible",
    slideDuplicateClass: "swiper-slide-duplicate",
    slideNextClass: "swiper-slide-next",
    slideDuplicateNextClass: "swiper-slide-duplicate-next",
    slidePrevClass: "swiper-slide-prev",
    slideDuplicatePrevClass: "swiper-slide-duplicate-prev",
    wrapperClass: "swiper-wrapper",
    runCallbacksOnInit: !0,
    _emitClasses: !1
};
function m_e(t, e) {
    return function(n={}) {
        const i = Object.keys(n)[0]
          , o = n[i];
        if (typeof o != "object" || o === null) {
            Gn(e, n);
            return
        }
        if (["navigation", "pagination", "scrollbar"].indexOf(i) >= 0 && t[i] === !0 && (t[i] = {
            auto: !0
        }),
        !(i in t && "enabled"in o)) {
            Gn(e, n);
            return
        }
        t[i] === !0 && (t[i] = {
            enabled: !0
        }),
        typeof t[i] == "object" && !("enabled"in t[i]) && (t[i].enabled = !0),
        t[i] || (t[i] = {
            enabled: !1
        }),
        Gn(e, n)
    }
}
const Lm = {
    eventsEmitter: hEe,
    update: CEe,
    translate: DEe,
    transition: OEe,
    slide: GEe,
    loop: jEe,
    grabCursor: XEe,
    events: i_e,
    breakpoints: a_e,
    checkOverflow: g_e,
    classes: f_e,
    images: x_e
}
  , $m = {};
let cu = class $o {
    constructor(...e) {
        let r, n;
        if (e.length === 1 && e[0].constructor && Object.prototype.toString.call(e[0]).slice(8, -1) === "Object" ? n = e[0] : [r,n] = e,
        n || (n = {}),
        n = Gn({}, n),
        r && !n.el && (n.el = r),
        n.el && De(n.el).length > 1) {
            const a = [];
            return De(n.el).each(l => {
                const c = Gn({}, n, {
                    el: l
                });
                a.push(new $o(c))
            }
            ),
            a
        }
        const i = this;
        i.__swiper__ = !0,
        i.support = jR(),
        i.device = lEe({
            userAgent: n.userAgent
        }),
        i.browser = uEe(),
        i.eventsListeners = {},
        i.eventsAnyListeners = [],
        i.modules = [...i.__modules__],
        n.modules && Array.isArray(n.modules) && i.modules.push(...n.modules);
        const o = {};
        i.modules.forEach(a => {
            a({
                swiper: i,
                extendParams: m_e(n, o),
                on: i.on.bind(i),
                once: i.once.bind(i),
                off: i.off.bind(i),
                emit: i.emit.bind(i)
            })
        }
        );
        const s = Gn({}, H4, o);
        return i.params = Gn({}, s, $m, n),
        i.originalParams = Gn({}, i.params),
        i.passedParams = Gn({}, n),
        i.params && i.params.on && Object.keys(i.params.on).forEach(a => {
            i.on(a, i.params.on[a])
        }
        ),
        i.params && i.params.onAny && i.onAny(i.params.onAny),
        i.$ = De,
        Object.assign(i, {
            enabled: i.params.enabled,
            el: r,
            classNames: [],
            slides: De(),
            slidesGrid: [],
            snapGrid: [],
            slidesSizesGrid: [],
            isHorizontal() {
                return i.params.direction === "horizontal"
            },
            isVertical() {
                return i.params.direction === "vertical"
            },
            activeIndex: 0,
            realIndex: 0,
            isBeginning: !0,
            isEnd: !1,
            translate: 0,
            previousTranslate: 0,
            progress: 0,
            velocity: 0,
            animating: !1,
            allowSlideNext: i.params.allowSlideNext,
            allowSlidePrev: i.params.allowSlidePrev,
            touchEvents: function() {
                const l = ["touchstart", "touchmove", "touchend", "touchcancel"]
                  , c = ["pointerdown", "pointermove", "pointerup"];
                return i.touchEventsTouch = {
                    start: l[0],
                    move: l[1],
                    end: l[2],
                    cancel: l[3]
                },
                i.touchEventsDesktop = {
                    start: c[0],
                    move: c[1],
                    end: c[2]
                },
                i.support.touch || !i.params.simulateTouch ? i.touchEventsTouch : i.touchEventsDesktop
            }(),
            touchEventsData: {
                isTouched: void 0,
                isMoved: void 0,
                allowTouchCallbacks: void 0,
                touchStartTime: void 0,
                isScrolling: void 0,
                currentTranslate: void 0,
                startTranslate: void 0,
                allowThresholdMove: void 0,
                focusableElements: i.params.focusableElements,
                lastClickTime: Pf(),
                clickTimeout: void 0,
                velocities: [],
                allowMomentumBounce: void 0,
                isTouchEvent: void 0,
                startMoving: void 0
            },
            allowClick: !0,
            allowTouchMove: i.params.allowTouchMove,
            touches: {
                startX: 0,
                startY: 0,
                currentX: 0,
                currentY: 0,
                diff: 0
            },
            imagesToLoad: [],
            imagesLoaded: 0
        }),
        i.emit("_swiper"),
        i.params.init && i.init(),
        i
    }
    enable() {
        const e = this;
        e.enabled || (e.enabled = !0,
        e.params.grabCursor && e.setGrabCursor(),
        e.emit("enable"))
    }
    disable() {
        const e = this;
        e.enabled && (e.enabled = !1,
        e.params.grabCursor && e.unsetGrabCursor(),
        e.emit("disable"))
    }
    setProgress(e, r) {
        const n = this;
        e = Math.min(Math.max(e, 0), 1);
        const i = n.minTranslate()
          , s = (n.maxTranslate() - i) * e + i;
        n.translateTo(s, typeof r > "u" ? 0 : r),
        n.updateActiveIndex(),
        n.updateSlidesClasses()
    }
    emitContainerClasses() {
        const e = this;
        if (!e.params._emitClasses || !e.el)
            return;
        const r = e.el.className.split(" ").filter(n => n.indexOf("swiper") === 0 || n.indexOf(e.params.containerModifierClass) === 0);
        e.emit("_containerClasses", r.join(" "))
    }
    getSlideClasses(e) {
        const r = this;
        return r.destroyed ? "" : e.className.split(" ").filter(n => n.indexOf("swiper-slide") === 0 || n.indexOf(r.params.slideClass) === 0).join(" ")
    }
    emitSlidesClasses() {
        const e = this;
        if (!e.params._emitClasses || !e.el)
            return;
        const r = [];
        e.slides.each(n => {
            const i = e.getSlideClasses(n);
            r.push({
                slideEl: n,
                classNames: i
            }),
            e.emit("_slideClass", n, i)
        }
        ),
        e.emit("_slideClasses", r)
    }
    slidesPerViewDynamic(e="current", r=!1) {
        const n = this
          , {params: i, slides: o, slidesGrid: s, slidesSizesGrid: a, size: l, activeIndex: c} = n;
        let u = 1;
        if (i.centeredSlides) {
            let f = o[c].swiperSlideSize, d;
            for (let h = c + 1; h < o.length; h += 1)
                o[h] && !d && (f += o[h].swiperSlideSize,
                u += 1,
                f > l && (d = !0));
            for (let h = c - 1; h >= 0; h -= 1)
                o[h] && !d && (f += o[h].swiperSlideSize,
                u += 1,
                f > l && (d = !0))
        } else if (e === "current")
            for (let f = c + 1; f < o.length; f += 1)
                (r ? s[f] + a[f] - s[c] < l : s[f] - s[c] < l) && (u += 1);
        else
            for (let f = c - 1; f >= 0; f -= 1)
                s[c] - s[f] < l && (u += 1);
        return u
    }
    update() {
        const e = this;
        if (!e || e.destroyed)
            return;
        const {snapGrid: r, params: n} = e;
        n.breakpoints && e.setBreakpoint(),
        e.updateSize(),
        e.updateSlides(),
        e.updateProgress(),
        e.updateSlidesClasses();
        function i() {
            const s = e.rtlTranslate ? e.translate * -1 : e.translate
              , a = Math.min(Math.max(s, e.maxTranslate()), e.minTranslate());
            e.setTranslate(a),
            e.updateActiveIndex(),
            e.updateSlidesClasses()
        }
        let o;
        e.params.freeMode && e.params.freeMode.enabled ? (i(),
        e.params.autoHeight && e.updateAutoHeight()) : ((e.params.slidesPerView === "auto" || e.params.slidesPerView > 1) && e.isEnd && !e.params.centeredSlides ? o = e.slideTo(e.slides.length - 1, 0, !1, !0) : o = e.slideTo(e.activeIndex, 0, !1, !0),
        o || i()),
        n.watchOverflow && r !== e.snapGrid && e.checkOverflow(),
        e.emit("update")
    }
    changeDirection(e, r=!0) {
        const n = this
          , i = n.params.direction;
        return e || (e = i === "horizontal" ? "vertical" : "horizontal"),
        e === i || e !== "horizontal" && e !== "vertical" || (n.$el.removeClass(`${n.params.containerModifierClass}${i}`).addClass(`${n.params.containerModifierClass}${e}`),
        n.emitContainerClasses(),
        n.params.direction = e,
        n.slides.each(o => {
            e === "vertical" ? o.style.width = "" : o.style.height = ""
        }
        ),
        n.emit("changeDirection"),
        r && n.update()),
        n
    }
    changeLanguageDirection(e) {
        const r = this;
        r.rtl && e === "rtl" || !r.rtl && e === "ltr" || (r.rtl = e === "rtl",
        r.rtlTranslate = r.params.direction === "horizontal" && r.rtl,
        r.rtl ? (r.$el.addClass(`${r.params.containerModifierClass}rtl`),
        r.el.dir = "rtl") : (r.$el.removeClass(`${r.params.containerModifierClass}rtl`),
        r.el.dir = "ltr"),
        r.update())
    }
    mount(e) {
        const r = this;
        if (r.mounted)
            return !0;
        const n = De(e || r.params.el);
        if (e = n[0],
        !e)
            return !1;
        e.swiper = r;
        const i = () => `.${(r.params.wrapperClass || "").trim().split(" ").join(".")}`;
        let s = ( () => {
            if (e && e.shadowRoot && e.shadowRoot.querySelector) {
                const a = De(e.shadowRoot.querySelector(i()));
                return a.children = l => n.children(l),
                a
            }
            return n.children ? n.children(i()) : De(n).children(i())
        }
        )();
        if (s.length === 0 && r.params.createElements) {
            const l = en().createElement("div");
            s = De(l),
            l.className = r.params.wrapperClass,
            n.append(l),
            n.children(`.${r.params.slideClass}`).each(c => {
                s.append(c)
            }
            )
        }
        return Object.assign(r, {
            $el: n,
            el: e,
            $wrapperEl: s,
            wrapperEl: s[0],
            mounted: !0,
            rtl: e.dir.toLowerCase() === "rtl" || n.css("direction") === "rtl",
            rtlTranslate: r.params.direction === "horizontal" && (e.dir.toLowerCase() === "rtl" || n.css("direction") === "rtl"),
            wrongRTL: s.css("display") === "-webkit-box"
        }),
        !0
    }
    init(e) {
        const r = this;
        return r.initialized || r.mount(e) === !1 || (r.emit("beforeInit"),
        r.params.breakpoints && r.setBreakpoint(),
        r.addClasses(),
        r.params.loop && r.loopCreate(),
        r.updateSize(),
        r.updateSlides(),
        r.params.watchOverflow && r.checkOverflow(),
        r.params.grabCursor && r.enabled && r.setGrabCursor(),
        r.params.preloadImages && r.preloadImages(),
        r.params.loop ? r.slideTo(r.params.initialSlide + r.loopedSlides, 0, r.params.runCallbacksOnInit, !1, !0) : r.slideTo(r.params.initialSlide, 0, r.params.runCallbacksOnInit, !1, !0),
        r.attachEvents(),
        r.initialized = !0,
        r.emit("init"),
        r.emit("afterInit")),
        r
    }
    destroy(e=!0, r=!0) {
        const n = this
          , {params: i, $el: o, $wrapperEl: s, slides: a} = n;
        return typeof n.params > "u" || n.destroyed || (n.emit("beforeDestroy"),
        n.initialized = !1,
        n.detachEvents(),
        i.loop && n.loopDestroy(),
        r && (n.removeClasses(),
        o.removeAttr("style"),
        s.removeAttr("style"),
        a && a.length && a.removeClass([i.slideVisibleClass, i.slideActiveClass, i.slideNextClass, i.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),
        n.emit("destroy"),
        Object.keys(n.eventsListeners).forEach(l => {
            n.off(l)
        }
        ),
        e !== !1 && (n.$el[0].swiper = null,
        rEe(n)),
        n.destroyed = !0),
        null
    }
    static extendDefaults(e) {
        Gn($m, e)
    }
    static get extendedDefaults() {
        return $m
    }
    static get defaults() {
        return H4
    }
    static installModule(e) {
        $o.prototype.__modules__ || ($o.prototype.__modules__ = []);
        const r = $o.prototype.__modules__;
        typeof e == "function" && r.indexOf(e) < 0 && r.push(e)
    }
    static use(e) {
        return Array.isArray(e) ? (e.forEach(r => $o.installModule(r)),
        $o) : ($o.installModule(e),
        $o)
    }
}
;
Object.keys(Lm).forEach(t => {
    Object.keys(Lm[t]).forEach(e => {
        cu.prototype[e] = Lm[t][e]
    }
    )
}
);
cu.use([fEe, dEe]);
function k6e({swiper: t, extendParams: e, on: r, emit: n}) {
    let i;
    t.autoplay = {
        running: !1,
        paused: !1
    },
    e({
        autoplay: {
            enabled: !1,
            delay: 3e3,
            waitForTransition: !0,
            disableOnInteraction: !0,
            stopOnLastSlide: !1,
            reverseDirection: !1,
            pauseOnMouseEnter: !1
        }
    });
    function o() {
        if (!t.size) {
            t.autoplay.running = !1,
            t.autoplay.paused = !1;
            return
        }
        const y = t.slides.eq(t.activeIndex);
        let m = t.params.autoplay.delay;
        y.attr("data-swiper-autoplay") && (m = y.attr("data-swiper-autoplay") || t.params.autoplay.delay),
        clearTimeout(i),
        i = qx( () => {
            let E;
            t.params.autoplay.reverseDirection ? t.params.loop ? (t.loopFix(),
            E = t.slidePrev(t.params.speed, !0, !0),
            n("autoplay")) : t.isBeginning ? t.params.autoplay.stopOnLastSlide ? a() : (E = t.slideTo(t.slides.length - 1, t.params.speed, !0, !0),
            n("autoplay")) : (E = t.slidePrev(t.params.speed, !0, !0),
            n("autoplay")) : t.params.loop ? (t.loopFix(),
            E = t.slideNext(t.params.speed, !0, !0),
            n("autoplay")) : t.isEnd ? t.params.autoplay.stopOnLastSlide ? a() : (E = t.slideTo(0, t.params.speed, !0, !0),
            n("autoplay")) : (E = t.slideNext(t.params.speed, !0, !0),
            n("autoplay")),
            (t.params.cssMode && t.autoplay.running || E === !1) && o()
        }
        , m)
    }
    function s() {
        return typeof i < "u" || t.autoplay.running ? !1 : (t.autoplay.running = !0,
        n("autoplayStart"),
        o(),
        !0)
    }
    function a() {
        return !t.autoplay.running || typeof i > "u" ? !1 : (i && (clearTimeout(i),
        i = void 0),
        t.autoplay.running = !1,
        n("autoplayStop"),
        !0)
    }
    function l(y) {
        t.autoplay.running && (t.autoplay.paused || (i && clearTimeout(i),
        t.autoplay.paused = !0,
        y === 0 || !t.params.autoplay.waitForTransition ? (t.autoplay.paused = !1,
        o()) : ["transitionend", "webkitTransitionEnd"].forEach(m => {
            t.$wrapperEl[0].addEventListener(m, u)
        }
        )))
    }
    function c() {
        const y = en();
        y.visibilityState === "hidden" && t.autoplay.running && l(),
        y.visibilityState === "visible" && t.autoplay.paused && (o(),
        t.autoplay.paused = !1)
    }
    function u(y) {
        !t || t.destroyed || !t.$wrapperEl || y.target === t.$wrapperEl[0] && (["transitionend", "webkitTransitionEnd"].forEach(m => {
            t.$wrapperEl[0].removeEventListener(m, u)
        }
        ),
        t.autoplay.paused = !1,
        t.autoplay.running ? o() : a())
    }
    function f() {
        t.params.autoplay.disableOnInteraction ? a() : (n("autoplayPause"),
        l()),
        ["transitionend", "webkitTransitionEnd"].forEach(y => {
            t.$wrapperEl[0].removeEventListener(y, u)
        }
        )
    }
    function d() {
        t.params.autoplay.disableOnInteraction || (t.autoplay.paused = !1,
        n("autoplayResume"),
        o())
    }
    function h() {
        t.params.autoplay.pauseOnMouseEnter && (t.$el.on("mouseenter", f),
        t.$el.on("mouseleave", d))
    }
    function x() {
        t.$el.off("mouseenter", f),
        t.$el.off("mouseleave", d)
    }
    r("init", () => {
        t.params.autoplay.enabled && (s(),
        en().addEventListener("visibilitychange", c),
        h())
    }
    ),
    r("beforeTransitionStart", (y, m, E) => {
        t.autoplay.running && (E || !t.params.autoplay.disableOnInteraction ? t.autoplay.pause(m) : a())
    }
    ),
    r("sliderFirstMove", () => {
        t.autoplay.running && (t.params.autoplay.disableOnInteraction ? a() : l())
    }
    ),
    r("touchEnd", () => {
        t.params.cssMode && t.autoplay.paused && !t.params.autoplay.disableOnInteraction && o()
    }
    ),
    r("destroy", () => {
        x(),
        t.autoplay.running && a(),
        en().removeEventListener("visibilitychange", c)
    }
    ),
    Object.assign(t.autoplay, {
        pause: l,
        run: o,
        start: s,
        stop: a
    })
}
function Dl(t) {
    return typeof t == "object" && t !== null && t.constructor && Object.prototype.toString.call(t).slice(8, -1) === "Object"
}
function js(t, e) {
    const r = ["__proto__", "constructor", "prototype"];
    Object.keys(e).filter(n => r.indexOf(n) < 0).forEach(n => {
        typeof t[n] > "u" ? t[n] = e[n] : Dl(e[n]) && Dl(t[n]) && Object.keys(e[n]).length > 0 ? e[n].__swiper__ ? t[n] = e[n] : js(t[n], e[n]) : t[n] = e[n]
    }
    )
}
function XR(t={}) {
    return t.navigation && typeof t.navigation.nextEl > "u" && typeof t.navigation.prevEl > "u"
}
function KR(t={}) {
    return t.pagination && typeof t.pagination.el > "u"
}
function qR(t={}) {
    return t.scrollbar && typeof t.scrollbar.el > "u"
}
function ZR(t="") {
    const e = t.split(" ").map(n => n.trim()).filter(n => !!n)
      , r = [];
    return e.forEach(n => {
        r.indexOf(n) < 0 && r.push(n)
    }
    ),
    r.join(" ")
}
const JR = ["modules", "init", "_direction", "touchEventsTarget", "initialSlide", "_speed", "cssMode", "updateOnWindowResize", "resizeObserver", "nested", "focusableElements", "_enabled", "_width", "_height", "preventInteractionOnTransition", "userAgent", "url", "_edgeSwipeDetection", "_edgeSwipeThreshold", "_freeMode", "_autoHeight", "setWrapperSize", "virtualTranslate", "_effect", "breakpoints", "_spaceBetween", "_slidesPerView", "maxBackfaceHiddenSlides", "_grid", "_slidesPerGroup", "_slidesPerGroupSkip", "_slidesPerGroupAuto", "_centeredSlides", "_centeredSlidesBounds", "_slidesOffsetBefore", "_slidesOffsetAfter", "normalizeSlideIndex", "_centerInsufficientSlides", "_watchOverflow", "roundLengths", "touchRatio", "touchAngle", "simulateTouch", "_shortSwipes", "_longSwipes", "longSwipesRatio", "longSwipesMs", "_followFinger", "allowTouchMove", "_threshold", "touchMoveStopPropagation", "touchStartPreventDefault", "touchStartForcePreventDefault", "touchReleaseOnEdges", "uniqueNavElements", "_resistance", "_resistanceRatio", "_watchSlidesProgress", "_grabCursor", "preventClicks", "preventClicksPropagation", "_slideToClickedSlide", "_preloadImages", "updateOnImagesReady", "_loop", "_loopAdditionalSlides", "_loopedSlides", "_loopedSlidesLimit", "_loopFillGroupWithBlank", "loopPreventsSlide", "_rewind", "_allowSlidePrev", "_allowSlideNext", "_swipeHandler", "_noSwiping", "noSwipingClass", "noSwipingSelector", "passiveListeners", "containerModifierClass", "slideClass", "slideBlankClass", "slideActiveClass", "slideDuplicateActiveClass", "slideVisibleClass", "slideDuplicateClass", "slideNextClass", "slideDuplicateNextClass", "slidePrevClass", "slideDuplicatePrevClass", "wrapperClass", "runCallbacksOnInit", "observer", "observeParents", "observeSlideChildren", "a11y", "_autoplay", "_controller", "coverflowEffect", "cubeEffect", "fadeEffect", "flipEffect", "creativeEffect", "cardsEffect", "hashNavigation", "history", "keyboard", "lazy", "mousewheel", "_navigation", "_pagination", "parallax", "_scrollbar", "_thumbs", "virtual", "zoom"];
function V4(t={}, e=!0) {
    const r = {
        on: {}
    }
      , n = {}
      , i = {};
    js(r, cu.defaults),
    js(r, cu.extendedDefaults),
    r._emitClasses = !0,
    r.init = !1;
    const o = {}
      , s = JR.map(l => l.replace(/_/, ""))
      , a = Object.assign({}, t);
    return Object.keys(a).forEach(l => {
        typeof t[l] > "u" || (s.indexOf(l) >= 0 ? Dl(t[l]) ? (r[l] = {},
        i[l] = {},
        js(r[l], t[l]),
        js(i[l], t[l])) : (r[l] = t[l],
        i[l] = t[l]) : l.search(/on[A-Z]/) === 0 && typeof t[l] == "function" ? e ? n[`${l[2].toLowerCase()}${l.substr(3)}`] = t[l] : r.on[`${l[2].toLowerCase()}${l.substr(3)}`] = t[l] : o[l] = t[l])
    }
    ),
    ["navigation", "pagination", "scrollbar"].forEach(l => {
        r[l] === !0 && (r[l] = {}),
        r[l] === !1 && delete r[l]
    }
    ),
    {
        params: r,
        passedParams: i,
        rest: o,
        events: n
    }
}
function v_e({el: t, nextEl: e, prevEl: r, paginationEl: n, scrollbarEl: i, swiper: o}, s) {
    XR(s) && e && r && (o.params.navigation.nextEl = e,
    o.originalParams.navigation.nextEl = e,
    o.params.navigation.prevEl = r,
    o.originalParams.navigation.prevEl = r),
    KR(s) && n && (o.params.pagination.el = n,
    o.originalParams.pagination.el = n),
    qR(s) && i && (o.params.scrollbar.el = i,
    o.originalParams.scrollbar.el = i),
    o.init(t)
}
const QR = (t, e) => {
    let r = e.slidesPerView;
    if (e.breakpoints) {
        const i = cu.prototype.getBreakpoint(e.breakpoints)
          , o = i in e.breakpoints ? e.breakpoints[i] : void 0;
        o && o.slidesPerView && (r = o.slidesPerView)
    }
    let n = Math.ceil(parseFloat(e.loopedSlides || r, 10));
    return n += e.loopAdditionalSlides,
    n > t.length && e.loopedSlidesLimit && (n = t.length),
    n
}
;
function y_e(t, e, r) {
    const n = e.map( (l, c) => (l.props || (l.props = {}),
    l.props.swiperRef = t,
    l.props["data-swiper-slide-index"] = c,
    l));
    function i(l, c, u) {
        return l.props || (l.props = {}),
        Or(l.type, {
            ...l.props,
            key: `${l.key}-duplicate-${c}-${u}`,
            class: `${l.props.className || ""} ${r.slideDuplicateClass} ${l.props.class || ""}`
        }, l.children)
    }
    if (r.loopFillGroupWithBlank) {
        const l = r.slidesPerGroup - n.length % r.slidesPerGroup;
        if (l !== r.slidesPerGroup)
            for (let c = 0; c < l; c += 1) {
                const u = Or("div", {
                    class: `${r.slideClass} ${r.slideBlankClass}`
                });
                n.push(u)
            }
    }
    r.slidesPerView === "auto" && !r.loopedSlides && (r.loopedSlides = n.length);
    const o = QR(n, r)
      , s = []
      , a = [];
    for (let l = 0; l < o; l += 1) {
        const c = l - Math.floor(l / n.length) * n.length;
        a.push(i(n[c], l, "append")),
        s.unshift(i(n[n.length - c - 1], l, "prepend"))
    }
    return t.value && (t.value.loopedSlides = o),
    [...s, ...n, ...a]
}
function E_e(t, e, r, n, i) {
    const o = [];
    if (!e)
        return o;
    const s = l => {
        o.indexOf(l) < 0 && o.push(l)
    }
    ;
    if (r && n) {
        const l = n.map(i)
          , c = r.map(i);
        l.join("") !== c.join("") && s("children"),
        n.length !== r.length && s("children")
    }
    return JR.filter(l => l[0] === "_").map(l => l.replace(/_/, "")).forEach(l => {
        if (l in t && l in e)
            if (Dl(t[l]) && Dl(e[l])) {
                const c = Object.keys(t[l])
                  , u = Object.keys(e[l]);
                c.length !== u.length ? s(l) : (c.forEach(f => {
                    t[l][f] !== e[l][f] && s(l)
                }
                ),
                u.forEach(f => {
                    t[l][f] !== e[l][f] && s(l)
                }
                ))
            } else
                t[l] !== e[l] && s(l)
    }
    ),
    o
}
function Um(t, e, r) {
    t === void 0 && (t = {});
    const n = []
      , i = {
        "container-start": [],
        "container-end": [],
        "wrapper-start": [],
        "wrapper-end": []
    }
      , o = (s, a) => {
        Array.isArray(s) && s.forEach(l => {
            const c = typeof l.type == "symbol";
            a === "default" && (a = "container-end"),
            c && l.children ? o(l.children, "default") : l.type && (l.type.name === "SwiperSlide" || l.type.name === "AsyncComponentWrapper") ? n.push(l) : i[a] && i[a].push(l)
        }
        )
    }
    ;
    return Object.keys(t).forEach(s => {
        if (typeof t[s] != "function")
            return;
        const a = t[s]();
        o(a, s)
    }
    ),
    r.value = e.value,
    e.value = n,
    {
        slides: n,
        slots: i
    }
}
function __e({swiper: t, slides: e, passedParams: r, changedParams: n, nextEl: i, prevEl: o, scrollbarEl: s, paginationEl: a}) {
    const l = n.filter(_ => _ !== "children" && _ !== "direction")
      , {params: c, pagination: u, navigation: f, scrollbar: d, virtual: h, thumbs: x} = t;
    let y, m, E, g, p;
    n.includes("thumbs") && r.thumbs && r.thumbs.swiper && c.thumbs && !c.thumbs.swiper && (y = !0),
    n.includes("controller") && r.controller && r.controller.control && c.controller && !c.controller.control && (m = !0),
    n.includes("pagination") && r.pagination && (r.pagination.el || a) && (c.pagination || c.pagination === !1) && u && !u.el && (E = !0),
    n.includes("scrollbar") && r.scrollbar && (r.scrollbar.el || s) && (c.scrollbar || c.scrollbar === !1) && d && !d.el && (g = !0),
    n.includes("navigation") && r.navigation && (r.navigation.prevEl || o) && (r.navigation.nextEl || i) && (c.navigation || c.navigation === !1) && f && !f.prevEl && !f.nextEl && (p = !0);
    const v = _ => {
        t[_] && (t[_].destroy(),
        _ === "navigation" ? (c[_].prevEl = void 0,
        c[_].nextEl = void 0,
        t[_].prevEl = void 0,
        t[_].nextEl = void 0) : (c[_].el = void 0,
        t[_].el = void 0))
    }
    ;
    l.forEach(_ => {
        if (Dl(c[_]) && Dl(r[_]))
            js(c[_], r[_]);
        else {
            const b = r[_];
            (b === !0 || b === !1) && (_ === "navigation" || _ === "pagination" || _ === "scrollbar") ? b === !1 && v(_) : c[_] = r[_]
        }
    }
    ),
    l.includes("controller") && !m && t.controller && t.controller.control && c.controller && c.controller.control && (t.controller.control = c.controller.control),
    n.includes("children") && e && h && c.virtual.enabled ? (h.slides = e,
    h.update(!0)) : n.includes("children") && t.lazy && t.params.lazy.enabled && t.lazy.load(),
    y && x.init() && x.update(!0),
    m && (t.controller.control = c.controller.control),
    E && (a && (c.pagination.el = a),
    u.init(),
    u.render(),
    u.update()),
    g && (s && (c.scrollbar.el = s),
    d.init(),
    d.updateSize(),
    d.setTranslate()),
    p && (i && (c.navigation.nextEl = i),
    o && (c.navigation.prevEl = o),
    f.init(),
    f.update()),
    n.includes("allowSlideNext") && (t.allowSlideNext = r.allowSlideNext),
    n.includes("allowSlidePrev") && (t.allowSlidePrev = r.allowSlidePrev),
    n.includes("direction") && t.changeDirection(r.direction, !1),
    t.update()
}
function b_e(t, e, r) {
    if (!r)
        return null;
    const n = t.value.isHorizontal() ? {
        [t.value.rtlTranslate ? "right" : "left"]: `${r.offset}px`
    } : {
        top: `${r.offset}px`
    };
    return e.filter( (i, o) => o >= r.from && o <= r.to).map(i => (i.props || (i.props = {}),
    i.props.style || (i.props.style = {}),
    i.props.swiperRef = t,
    i.props.style = n,
    Or(i.type, {
        ...i.props
    }, i.children)))
}
const C_e = t => {
    !t || t.destroyed || !t.params.virtual || t.params.virtual && !t.params.virtual.enabled || (t.updateSlides(),
    t.updateProgress(),
    t.updateSlidesClasses(),
    t.lazy && t.params.lazy.enabled && t.lazy.load(),
    t.parallax && t.params.parallax && t.params.parallax.enabled && t.parallax.setTranslate())
}
  , R6e = {
    name: "Swiper",
    props: {
        tag: {
            type: String,
            default: "div"
        },
        wrapperTag: {
            type: String,
            default: "div"
        },
        modules: {
            type: Array,
            default: void 0
        },
        init: {
            type: Boolean,
            default: void 0
        },
        direction: {
            type: String,
            default: void 0
        },
        touchEventsTarget: {
            type: String,
            default: void 0
        },
        initialSlide: {
            type: Number,
            default: void 0
        },
        speed: {
            type: Number,
            default: void 0
        },
        cssMode: {
            type: Boolean,
            default: void 0
        },
        updateOnWindowResize: {
            type: Boolean,
            default: void 0
        },
        resizeObserver: {
            type: Boolean,
            default: void 0
        },
        nested: {
            type: Boolean,
            default: void 0
        },
        focusableElements: {
            type: String,
            default: void 0
        },
        width: {
            type: Number,
            default: void 0
        },
        height: {
            type: Number,
            default: void 0
        },
        preventInteractionOnTransition: {
            type: Boolean,
            default: void 0
        },
        userAgent: {
            type: String,
            default: void 0
        },
        url: {
            type: String,
            default: void 0
        },
        edgeSwipeDetection: {
            type: [Boolean, String],
            default: void 0
        },
        edgeSwipeThreshold: {
            type: Number,
            default: void 0
        },
        autoHeight: {
            type: Boolean,
            default: void 0
        },
        setWrapperSize: {
            type: Boolean,
            default: void 0
        },
        virtualTranslate: {
            type: Boolean,
            default: void 0
        },
        effect: {
            type: String,
            default: void 0
        },
        breakpoints: {
            type: Object,
            default: void 0
        },
        spaceBetween: {
            type: Number,
            default: void 0
        },
        slidesPerView: {
            type: [Number, String],
            default: void 0
        },
        maxBackfaceHiddenSlides: {
            type: Number,
            default: void 0
        },
        slidesPerGroup: {
            type: Number,
            default: void 0
        },
        slidesPerGroupSkip: {
            type: Number,
            default: void 0
        },
        slidesPerGroupAuto: {
            type: Boolean,
            default: void 0
        },
        centeredSlides: {
            type: Boolean,
            default: void 0
        },
        centeredSlidesBounds: {
            type: Boolean,
            default: void 0
        },
        slidesOffsetBefore: {
            type: Number,
            default: void 0
        },
        slidesOffsetAfter: {
            type: Number,
            default: void 0
        },
        normalizeSlideIndex: {
            type: Boolean,
            default: void 0
        },
        centerInsufficientSlides: {
            type: Boolean,
            default: void 0
        },
        watchOverflow: {
            type: Boolean,
            default: void 0
        },
        roundLengths: {
            type: Boolean,
            default: void 0
        },
        touchRatio: {
            type: Number,
            default: void 0
        },
        touchAngle: {
            type: Number,
            default: void 0
        },
        simulateTouch: {
            type: Boolean,
            default: void 0
        },
        shortSwipes: {
            type: Boolean,
            default: void 0
        },
        longSwipes: {
            type: Boolean,
            default: void 0
        },
        longSwipesRatio: {
            type: Number,
            default: void 0
        },
        longSwipesMs: {
            type: Number,
            default: void 0
        },
        followFinger: {
            type: Boolean,
            default: void 0
        },
        allowTouchMove: {
            type: Boolean,
            default: void 0
        },
        threshold: {
            type: Number,
            default: void 0
        },
        touchMoveStopPropagation: {
            type: Boolean,
            default: void 0
        },
        touchStartPreventDefault: {
            type: Boolean,
            default: void 0
        },
        touchStartForcePreventDefault: {
            type: Boolean,
            default: void 0
        },
        touchReleaseOnEdges: {
            type: Boolean,
            default: void 0
        },
        uniqueNavElements: {
            type: Boolean,
            default: void 0
        },
        resistance: {
            type: Boolean,
            default: void 0
        },
        resistanceRatio: {
            type: Number,
            default: void 0
        },
        watchSlidesProgress: {
            type: Boolean,
            default: void 0
        },
        grabCursor: {
            type: Boolean,
            default: void 0
        },
        preventClicks: {
            type: Boolean,
            default: void 0
        },
        preventClicksPropagation: {
            type: Boolean,
            default: void 0
        },
        slideToClickedSlide: {
            type: Boolean,
            default: void 0
        },
        preloadImages: {
            type: Boolean,
            default: void 0
        },
        updateOnImagesReady: {
            type: Boolean,
            default: void 0
        },
        loop: {
            type: Boolean,
            default: void 0
        },
        loopAdditionalSlides: {
            type: Number,
            default: void 0
        },
        loopedSlides: {
            type: Number,
            default: void 0
        },
        loopedSlidesLimit: {
            type: Boolean,
            default: !0
        },
        loopFillGroupWithBlank: {
            type: Boolean,
            default: void 0
        },
        loopPreventsSlide: {
            type: Boolean,
            default: void 0
        },
        rewind: {
            type: Boolean,
            default: void 0
        },
        allowSlidePrev: {
            type: Boolean,
            default: void 0
        },
        allowSlideNext: {
            type: Boolean,
            default: void 0
        },
        swipeHandler: {
            type: Boolean,
            default: void 0
        },
        noSwiping: {
            type: Boolean,
            default: void 0
        },
        noSwipingClass: {
            type: String,
            default: void 0
        },
        noSwipingSelector: {
            type: String,
            default: void 0
        },
        passiveListeners: {
            type: Boolean,
            default: void 0
        },
        containerModifierClass: {
            type: String,
            default: void 0
        },
        slideClass: {
            type: String,
            default: void 0
        },
        slideBlankClass: {
            type: String,
            default: void 0
        },
        slideActiveClass: {
            type: String,
            default: void 0
        },
        slideDuplicateActiveClass: {
            type: String,
            default: void 0
        },
        slideVisibleClass: {
            type: String,
            default: void 0
        },
        slideDuplicateClass: {
            type: String,
            default: void 0
        },
        slideNextClass: {
            type: String,
            default: void 0
        },
        slideDuplicateNextClass: {
            type: String,
            default: void 0
        },
        slidePrevClass: {
            type: String,
            default: void 0
        },
        slideDuplicatePrevClass: {
            type: String,
            default: void 0
        },
        wrapperClass: {
            type: String,
            default: void 0
        },
        runCallbacksOnInit: {
            type: Boolean,
            default: void 0
        },
        observer: {
            type: Boolean,
            default: void 0
        },
        observeParents: {
            type: Boolean,
            default: void 0
        },
        observeSlideChildren: {
            type: Boolean,
            default: void 0
        },
        a11y: {
            type: [Boolean, Object],
            default: void 0
        },
        autoplay: {
            type: [Boolean, Object],
            default: void 0
        },
        controller: {
            type: Object,
            default: void 0
        },
        coverflowEffect: {
            type: Object,
            default: void 0
        },
        cubeEffect: {
            type: Object,
            default: void 0
        },
        fadeEffect: {
            type: Object,
            default: void 0
        },
        flipEffect: {
            type: Object,
            default: void 0
        },
        creativeEffect: {
            type: Object,
            default: void 0
        },
        cardsEffect: {
            type: Object,
            default: void 0
        },
        hashNavigation: {
            type: [Boolean, Object],
            default: void 0
        },
        history: {
            type: [Boolean, Object],
            default: void 0
        },
        keyboard: {
            type: [Boolean, Object],
            default: void 0
        },
        lazy: {
            type: [Boolean, Object],
            default: void 0
        },
        mousewheel: {
            type: [Boolean, Object],
            default: void 0
        },
        navigation: {
            type: [Boolean, Object],
            default: void 0
        },
        pagination: {
            type: [Boolean, Object],
            default: void 0
        },
        parallax: {
            type: [Boolean, Object],
            default: void 0
        },
        scrollbar: {
            type: [Boolean, Object],
            default: void 0
        },
        thumbs: {
            type: Object,
            default: void 0
        },
        virtual: {
            type: [Boolean, Object],
            default: void 0
        },
        zoom: {
            type: [Boolean, Object],
            default: void 0
        },
        grid: {
            type: [Object],
            default: void 0
        },
        freeMode: {
            type: [Boolean, Object],
            default: void 0
        },
        enabled: {
            type: Boolean,
            default: void 0
        }
    },
    emits: ["_beforeBreakpoint", "_containerClasses", "_slideClass", "_slideClasses", "_swiper", "_freeModeNoMomentumRelease", "activeIndexChange", "afterInit", "autoplay", "autoplayStart", "autoplayStop", "autoplayPause", "autoplayResume", "beforeDestroy", "beforeInit", "beforeLoopFix", "beforeResize", "beforeSlideChangeStart", "beforeTransitionStart", "breakpoint", "changeDirection", "click", "disable", "doubleTap", "doubleClick", "destroy", "enable", "fromEdge", "hashChange", "hashSet", "imagesReady", "init", "keyPress", "lazyImageLoad", "lazyImageReady", "lock", "loopFix", "momentumBounce", "navigationHide", "navigationShow", "navigationPrev", "navigationNext", "observerUpdate", "orientationchange", "paginationHide", "paginationRender", "paginationShow", "paginationUpdate", "progress", "reachBeginning", "reachEnd", "realIndexChange", "resize", "scroll", "scrollbarDragEnd", "scrollbarDragMove", "scrollbarDragStart", "setTransition", "setTranslate", "slideChange", "slideChangeTransitionEnd", "slideChangeTransitionStart", "slideNextTransitionEnd", "slideNextTransitionStart", "slidePrevTransitionEnd", "slidePrevTransitionStart", "slideResetTransitionStart", "slideResetTransitionEnd", "sliderMove", "sliderFirstMove", "slidesLengthChange", "slidesGridLengthChange", "snapGridLengthChange", "snapIndexChange", "swiper", "tap", "toEdge", "touchEnd", "touchMove", "touchMoveOpposite", "touchStart", "transitionEnd", "transitionStart", "unlock", "update", "virtualUpdate", "zoomChange"],
    setup(t, e) {
        let {slots: r, emit: n} = e;
        const {tag: i, wrapperTag: o} = t
          , s = ie("swiper")
          , a = ie(null)
          , l = ie(!1)
          , c = ie(!1)
          , u = ie(null)
          , f = ie(null)
          , d = ie(null)
          , h = {
            value: []
        }
          , x = {
            value: []
        }
          , y = ie(null)
          , m = ie(null)
          , E = ie(null)
          , g = ie(null)
          , {params: p, passedParams: v} = V4(t, !1);
        Um(r, h, x),
        d.value = v,
        x.value = h.value;
        const _ = () => {
            Um(r, h, x),
            l.value = !0
        }
        ;
        if (p.onAny = function(C) {
            for (var B = arguments.length, T = new Array(B > 1 ? B - 1 : 0), A = 1; A < B; A++)
                T[A - 1] = arguments[A];
            n(C, ...T)
        }
        ,
        Object.assign(p.on, {
            _beforeBreakpoint: _,
            _containerClasses(C, B) {
                s.value = B
            }
        }),
        f.value = new cu(p),
        f.value.loopCreate = () => {}
        ,
        f.value.loopDestroy = () => {}
        ,
        p.loop && (f.value.loopedSlides = QR(h.value, p)),
        f.value.virtual && f.value.params.virtual.enabled) {
            f.value.virtual.slides = h.value;
            const C = {
                cache: !1,
                slides: h.value,
                renderExternal: B => {
                    a.value = B
                }
                ,
                renderExternalUpdate: !1
            };
            js(f.value.params.virtual, C),
            js(f.value.originalParams.virtual, C)
        }
        Ml( () => {
            !c.value && f.value && (f.value.emitSlidesClasses(),
            c.value = !0);
            const {passedParams: C} = V4(t, !1)
              , B = E_e(C, d.value, h.value, x.value, T => T.props && T.props.key);
            d.value = C,
            (B.length || l.value) && f.value && !f.value.destroyed && __e({
                swiper: f.value,
                slides: h.value,
                passedParams: C,
                changedParams: B,
                nextEl: y.value,
                prevEl: m.value,
                scrollbarEl: g.value,
                paginationEl: E.value
            }),
            l.value = !1
        }
        ),
        xi("swiper", f),
        me(a, () => {
            Xe( () => {
                C_e(f.value)
            }
            )
        }
        ),
        Ht( () => {
            u.value && (v_e({
                el: u.value,
                nextEl: y.value,
                prevEl: m.value,
                paginationEl: E.value,
                scrollbarEl: g.value,
                swiper: f.value
            }, p),
            n("swiper", f.value))
        }
        ),
        Zn( () => {
            f.value && !f.value.destroyed && f.value.destroy(!0, !1)
        }
        );
        function b(C) {
            return p.virtual ? b_e(f, C, a.value) : !p.loop || f.value && f.value.destroyed ? (C.forEach(B => {
                B.props || (B.props = {}),
                B.props.swiperRef = f
            }
            ),
            C) : y_e(f, C, p)
        }
        return () => {
            const {slides: C, slots: B} = Um(r, h, x);
            return Or(i, {
                ref: u,
                class: ZR(s.value)
            }, [B["container-start"], Or(o, {
                class: "swiper-wrapper"
            }, [B["wrapper-start"], b(C), B["wrapper-end"]]), XR(t) && [Or("div", {
                ref: m,
                class: "swiper-button-prev"
            }), Or("div", {
                ref: y,
                class: "swiper-button-next"
            })], qR(t) && Or("div", {
                ref: g,
                class: "swiper-scrollbar"
            }), KR(t) && Or("div", {
                ref: E,
                class: "swiper-pagination"
            }), B["container-end"]])
        }
    }
}
  , M6e = {
    name: "SwiperSlide",
    props: {
        tag: {
            type: String,
            default: "div"
        },
        swiperRef: {
            type: Object,
            required: !1
        },
        zoom: {
            type: Boolean,
            default: void 0
        },
        virtualIndex: {
            type: [String, Number],
            default: void 0
        }
    },
    setup(t, e) {
        let {slots: r} = e
          , n = !1;
        const {swiperRef: i} = t
          , o = ie(null)
          , s = ie("swiper-slide");
        function a(c, u, f) {
            u === o.value && (s.value = f)
        }
        Ht( () => {
            !i || !i.value || (i.value.on("_slideClass", a),
            n = !0)
        }
        ),
        wp( () => {
            n || !i || !i.value || (i.value.on("_slideClass", a),
            n = !0)
        }
        ),
        Ml( () => {
            !o.value || !i || !i.value || i.value.destroyed && s.value !== "swiper-slide" && (s.value = "swiper-slide")
        }
        ),
        Zn( () => {
            !i || !i.value || i.value.off("_slideClass", a)
        }
        );
        const l = ae( () => ({
            isActive: s.value.indexOf("swiper-slide-active") >= 0 || s.value.indexOf("swiper-slide-duplicate-active") >= 0,
            isVisible: s.value.indexOf("swiper-slide-visible") >= 0,
            isDuplicate: s.value.indexOf("swiper-slide-duplicate") >= 0,
            isPrev: s.value.indexOf("swiper-slide-prev") >= 0 || s.value.indexOf("swiper-slide-duplicate-prev") >= 0,
            isNext: s.value.indexOf("swiper-slide-next") >= 0 || s.value.indexOf("swiper-slide-duplicate-next") >= 0
        }));
        return xi("swiperSlide", l),
        () => Or(t.tag, {
            class: ZR(`${s.value}`),
            ref: o,
            "data-swiper-slide-index": t.virtualIndex
        }, t.zoom ? Or("div", {
            class: "swiper-zoom-container",
            "data-swiper-zoom": typeof t.zoom == "number" ? t.zoom : void 0
        }, r.default && r.default(l.value)) : r.default && r.default(l.value))
    }
};
var _e = {
    pullStartY: null,
    pullMoveY: null,
    handlers: [],
    styleEl: null,
    events: null,
    dist: 0,
    state: "pending",
    timeout: null,
    distResisted: 0,
    supportsPassive: !1,
    supportsPointerEvents: typeof window < "u" && !!window.PointerEvent
};
try {
    window.addEventListener("test", null, {
        get passive() {
            _e.supportsPassive = !0
        }
    })
} catch {}
function A_e(t) {
    if (!t.ptrElement) {
        var e = document.createElement("div");
        t.mainElement !== document.body ? t.mainElement.parentNode.insertBefore(e, t.mainElement) : document.body.insertBefore(e, document.body.firstChild),
        e.classList.add(t.classPrefix + "ptr"),
        e.innerHTML = t.getMarkup().replace(/__PREFIX__/g, t.classPrefix),
        t.ptrElement = e,
        typeof t.onInit == "function" && t.onInit(t),
        _e.styleEl || (_e.styleEl = document.createElement("style"),
        _e.styleEl.setAttribute("id", "pull-to-refresh-js-style"),
        document.head.appendChild(_e.styleEl)),
        _e.styleEl.textContent = t.getStyles().replace(/__PREFIX__/g, t.classPrefix).replace(/\s+/g, " ")
    }
    return t
}
function w_e(t) {
    t.ptrElement && (t.ptrElement.classList.remove(t.classPrefix + "refresh"),
    t.ptrElement.style[t.cssProp] = "0px",
    setTimeout(function() {
        t.ptrElement && t.ptrElement.parentNode && (t.ptrElement.parentNode.removeChild(t.ptrElement),
        t.ptrElement = null),
        _e.state = "pending"
    }, t.refreshTimeout))
}
function B_e(t) {
    var e = t.ptrElement.querySelector("." + t.classPrefix + "icon")
      , r = t.ptrElement.querySelector("." + t.classPrefix + "text");
    e && (_e.state === "refreshing" ? e.innerHTML = t.iconRefreshing : e.innerHTML = t.iconArrow),
    r && (_e.state === "releasing" && (r.innerHTML = t.instructionsReleaseToRefresh),
    (_e.state === "pulling" || _e.state === "pending") && (r.innerHTML = t.instructionsPullToRefresh),
    _e.state === "refreshing" && (r.innerHTML = t.instructionsRefreshing))
}
var $n = {
    setupDOM: A_e,
    onReset: w_e,
    update: B_e
}, z4, Gm = function(e) {
    return _e.pointerEventsEnabled && _e.supportsPointerEvents ? e.screenY : e.touches[0].screenY
}, eM = function() {
    var t;
    function e(s) {
        var a = _e.handlers.filter(function(l) {
            return l.contains(s.target)
        })[0];
        _e.enable = !!a,
        a && _e.state === "pending" && (t = $n.setupDOM(a),
        a.shouldPullToRefresh() && (_e.pullStartY = Gm(s)),
        clearTimeout(_e.timeout),
        $n.update(a))
    }
    function r(s) {
        if (t && t.ptrElement && _e.enable) {
            if (_e.pullStartY ? _e.pullMoveY = Gm(s) : t.shouldPullToRefresh() && (_e.pullStartY = Gm(s)),
            _e.state === "refreshing") {
                s.cancelable && t.shouldPullToRefresh() && _e.pullStartY < _e.pullMoveY && s.preventDefault();
                return
            }
            _e.state === "pending" && (t.ptrElement.classList.add(t.classPrefix + "pull"),
            _e.state = "pulling",
            $n.update(t)),
            _e.pullStartY && _e.pullMoveY && (_e.dist = _e.pullMoveY - _e.pullStartY),
            _e.distExtra = _e.dist - t.distIgnore,
            _e.distExtra > 0 && (s.cancelable && s.preventDefault(),
            t.ptrElement.style[t.cssProp] = _e.distResisted + "px",
            _e.distResisted = t.resistanceFunction(_e.distExtra / t.distThreshold) * Math.min(t.distMax, _e.distExtra),
            _e.state === "pulling" && _e.distResisted > t.distThreshold && (t.ptrElement.classList.add(t.classPrefix + "release"),
            _e.state = "releasing",
            $n.update(t)),
            _e.state === "releasing" && _e.distResisted < t.distThreshold && (t.ptrElement.classList.remove(t.classPrefix + "release"),
            _e.state = "pulling",
            $n.update(t)))
        }
    }
    function n() {
        if (t && t.ptrElement && _e.enable) {
            if (clearTimeout(z4),
            z4 = setTimeout(function() {
                t && t.ptrElement && _e.state === "pending" && $n.onReset(t)
            }, 500),
            _e.state === "releasing" && _e.distResisted > t.distThreshold)
                _e.state = "refreshing",
                t.ptrElement.style[t.cssProp] = t.distReload + "px",
                t.ptrElement.classList.add(t.classPrefix + "refresh"),
                _e.timeout = setTimeout(function() {
                    var s = t.onRefresh(function() {
                        return $n.onReset(t)
                    });
                    s && typeof s.then == "function" && s.then(function() {
                        return $n.onReset(t)
                    }),
                    !s && !t.onRefresh.length && $n.onReset(t)
                }, t.refreshTimeout);
            else {
                if (_e.state === "refreshing")
                    return;
                t.ptrElement.style[t.cssProp] = "0px",
                _e.state = "pending"
            }
            $n.update(t),
            t.ptrElement.classList.remove(t.classPrefix + "release"),
            t.ptrElement.classList.remove(t.classPrefix + "pull"),
            _e.pullStartY = _e.pullMoveY = null,
            _e.dist = _e.distResisted = 0
        }
    }
    function i() {
        t && t.mainElement.classList.toggle(t.classPrefix + "top", t.shouldPullToRefresh())
    }
    var o = _e.supportsPassive ? {
        passive: _e.passive || !1
    } : void 0;
    return _e.pointerEventsEnabled && _e.supportsPointerEvents ? (window.addEventListener("pointerup", n),
    window.addEventListener("pointerdown", e),
    window.addEventListener("pointermove", r, o)) : (window.addEventListener("touchend", n),
    window.addEventListener("touchstart", e),
    window.addEventListener("touchmove", r, o)),
    window.addEventListener("scroll", i),
    {
        onTouchEnd: n,
        onTouchStart: e,
        onTouchMove: r,
        onScroll: i,
        destroy: function() {
            _e.pointerEventsEnabled && _e.supportsPointerEvents ? (window.removeEventListener("pointerdown", e),
            window.removeEventListener("pointerup", n),
            window.removeEventListener("pointermove", r, o)) : (window.removeEventListener("touchstart", e),
            window.removeEventListener("touchend", n),
            window.removeEventListener("touchmove", r, o)),
            window.removeEventListener("scroll", i)
        }
    }
}, S_e = `
<div class="__PREFIX__box">
  <div class="__PREFIX__content">
    <div class="__PREFIX__icon"></div>
    <div class="__PREFIX__text"></div>
  </div>
</div>
`, T_e = `
.__PREFIX__ptr {
  box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  font-size: 0.85em;
  font-weight: bold;
  top: 0;
  height: 0;
  transition: height 0.3s, min-height 0.3s;
  text-align: center;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  align-content: stretch;
}

.__PREFIX__box {
  padding: 10px;
  flex-basis: 100%;
}

.__PREFIX__pull {
  transition: none;
}

.__PREFIX__text {
  margin-top: .33em;
  color: rgba(0, 0, 0, 0.3);
}

.__PREFIX__icon {
  color: rgba(0, 0, 0, 0.3);
  transition: transform .3s;
}

/*
When at the top of the page, disable vertical overscroll so passive touch
listeners can take over.
*/
.__PREFIX__top {
  touch-action: pan-x pan-down pinch-zoom;
}

.__PREFIX__release .__PREFIX__icon {
  transform: rotate(180deg);
}
`, Hm = {
    distThreshold: 60,
    distMax: 80,
    distReload: 50,
    distIgnore: 0,
    mainElement: "body",
    triggerElement: "body",
    ptrElement: ".ptr",
    classPrefix: "ptr--",
    cssProp: "min-height",
    iconArrow: "&#8675;",
    iconRefreshing: "&hellip;",
    instructionsPullToRefresh: "Pull down to refresh",
    instructionsReleaseToRefresh: "Release to refresh",
    instructionsRefreshing: "Refreshing",
    refreshTimeout: 500,
    getMarkup: function() {
        return S_e
    },
    getStyles: function() {
        return T_e
    },
    onInit: function() {},
    onRefresh: function() {
        return location.reload()
    },
    resistanceFunction: function(t) {
        return Math.min(1, t / 2.5)
    },
    shouldPullToRefresh: function() {
        return !window.scrollY
    }
}, D_e = ["mainElement", "ptrElement", "triggerElement"], j4 = function(t) {
    var e = {};
    return Object.keys(Hm).forEach(function(r) {
        e[r] = t[r] || Hm[r]
    }),
    e.refreshTimeout = typeof t.refreshTimeout == "number" ? t.refreshTimeout : Hm.refreshTimeout,
    D_e.forEach(function(r) {
        typeof e[r] == "string" && (e[r] = document.querySelector(e[r]))
    }),
    _e.events || (_e.events = eM()),
    e.contains = function(r) {
        return e.triggerElement.contains(r)
    }
    ,
    e.destroy = function() {
        clearTimeout(_e.timeout);
        var r = _e.handlers.indexOf(e);
        _e.handlers.splice(r, 1)
    }
    ,
    e
}, F_e = {
    setPassiveMode: function(e) {
        _e.passive = e
    },
    setPointerEventsMode: function(e) {
        _e.pointerEventsEnabled = e
    },
    destroyAll: function() {
        _e.events && (_e.events.destroy(),
        _e.events = null),
        _e.handlers.forEach(function(e) {
            e.destroy()
        })
    },
    init: function(e) {
        e === void 0 && (e = {});
        var r = j4(e);
        return _e.handlers.push(r),
        r
    },
    _: {
        setupHandler: j4,
        setupEvents: eM,
        setupDOM: $n.setupDOM,
        onReset: $n.onReset,
        update: $n.update
    }
};
const N6e = F_e;
var tM = !1;
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var An = function() {
    return An = Object.assign || function(t) {
        for (var e, r = 1, n = arguments.length; r < n; r++)
            for (var i in e = arguments[r])
                Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
        return t
    }
    ,
    An.apply(this, arguments)
};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var RE = function(t, e) {
    return RE = Object.setPrototypeOf || {
        __proto__: []
    }instanceof Array && function(r, n) {
        r.__proto__ = n
    }
    || function(r, n) {
        for (var i in n)
            Object.prototype.hasOwnProperty.call(n, i) && (r[i] = n[i])
    }
    ,
    RE(t, e)
};
function xC(t, e) {
    if (typeof e != "function" && e !== null)
        throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
    function r() {
        this.constructor = t
    }
    RE(t, e),
    t.prototype = e === null ? Object.create(e) : (r.prototype = e.prototype,
    new r)
}
var is = function() {
    return is = Object.assign || function(t) {
        for (var e, r = 1, n = arguments.length; r < n; r++)
            for (var i in e = arguments[r])
                Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
        return t
    }
    ,
    is.apply(this, arguments)
};
function os(t, e, r, n) {
    return new (r || (r = Promise))(function(i, o) {
        function s(c) {
            try {
                l(n.next(c))
            } catch (u) {
                o(u)
            }
        }
        function a(c) {
            try {
                l(n.throw(c))
            } catch (u) {
                o(u)
            }
        }
        function l(c) {
            var u;
            c.done ? i(c.value) : (u = c.value,
            u instanceof r ? u : new r(function(f) {
                f(u)
            }
            )).then(s, a)
        }
        l((n = n.apply(t, e || [])).next())
    }
    )
}
function ss(t, e) {
    var r, n, i, o, s = {
        label: 0,
        sent: function() {
            if (1 & i[0])
                throw i[1];
            return i[1]
        },
        trys: [],
        ops: []
    };
    return o = {
        next: a(0),
        throw: a(1),
        return: a(2)
    },
    typeof Symbol == "function" && (o[Symbol.iterator] = function() {
        return this
    }
    ),
    o;
    function a(l) {
        return function(c) {
            return function(u) {
                if (r)
                    throw new TypeError("Generator is already executing.");
                for (; s; )
                    try {
                        if (r = 1,
                        n && (i = 2 & u[0] ? n.return : u[0] ? n.throw || ((i = n.return) && i.call(n),
                        0) : n.next) && !(i = i.call(n, u[1])).done)
                            return i;
                        switch (n = 0,
                        i && (u = [2 & u[0], i.value]),
                        u[0]) {
                        case 0:
                        case 1:
                            i = u;
                            break;
                        case 4:
                            return s.label++,
                            {
                                value: u[1],
                                done: !1
                            };
                        case 5:
                            s.label++,
                            n = u[1],
                            u = [0];
                            continue;
                        case 7:
                            u = s.ops.pop(),
                            s.trys.pop();
                            continue;
                        default:
                            if (!((i = (i = s.trys).length > 0 && i[i.length - 1]) || u[0] !== 6 && u[0] !== 2)) {
                                s = 0;
                                continue
                            }
                            if (u[0] === 3 && (!i || u[1] > i[0] && u[1] < i[3])) {
                                s.label = u[1];
                                break
                            }
                            if (u[0] === 6 && s.label < i[1]) {
                                s.label = i[1],
                                i = u;
                                break
                            }
                            if (i && s.label < i[2]) {
                                s.label = i[2],
                                s.ops.push(u);
                                break
                            }
                            i[2] && s.ops.pop(),
                            s.trys.pop();
                            continue
                        }
                        u = e.call(t, s)
                    } catch (f) {
                        u = [6, f],
                        n = 0
                    } finally {
                        r = i = 0
                    }
                if (5 & u[0])
                    throw u[1];
                return {
                    value: u[0] ? u[1] : void 0,
                    done: !0
                }
            }([l, c])
        }
    }
}
function Ac(t, e) {
    for (var r = 0, n = e.length, i = t.length; r < n; r++,
    i++)
        t[i] = e[r];
    return t
}
Array.prototype.includes || Object.defineProperty(Array.prototype, "includes", {
    value: function(t, e) {
        if (this == null)
            throw new TypeError('"this" is null or not defined');
        var r = Object(this)
          , n = r.length >>> 0;
        if (n === 0)
            return !1;
        for (var i, o, s = 0 | e, a = Math.max(s >= 0 ? s : n - Math.abs(s), 0); a < n; ) {
            if ((i = r[a]) === (o = t) || typeof i == "number" && typeof o == "number" && isNaN(i) && isNaN(o))
                return !0;
            a++
        }
        return !1
    }
}),
String.prototype.includes || (String.prototype.includes = function(t, e) {
    return typeof e != "number" && (e = 0),
    !(e + t.length > this.length) && this.indexOf(t, e) !== -1
}
),
Array.prototype.find || Object.defineProperty(Array.prototype, "find", {
    value: function(t) {
        if (this == null)
            throw new TypeError('"this" is null or not defined');
        var e = Object(this)
          , r = e.length >>> 0;
        if (typeof t != "function")
            throw new TypeError("predicate must be a function");
        for (var n = arguments[1], i = 0; i < r; ) {
            var o = e[i];
            if (t.call(n, o, i, e))
                return o;
            i++
        }
    }
});
var If = function(t) {
    for (var e = [], r = 1; r < arguments.length; r++)
        e[r - 1] = arguments[r];
    return e.some(function(n) {
        return Object.prototype.toString.call(t).slice(8, -1).toLowerCase() === n
    })
}
  , uu = function(t, e) {
    return Object.prototype.hasOwnProperty.call(t, e)
}
  , pC = function(t) {
    return [].filter.call(t, function(e) {
        return e !== `
`
    }).join("")
}
  , Ws = function(t) {
    if (typeof t != "string" || (t = t.toLocaleLowerCase().trim()) === "transparent")
        return !1;
    var e;
    return !(/^rgba/.test(t) && ((e = /([^\s,]+)\)$/.exec(t)) === null ? 0 : typeof e == "object" ? NaN : typeof e == "number" ? e : typeof e == "string" ? e[e.length - 1] === "%" ? Number(e.slice(0, -1)) / 100 : Number(e) : NaN) === 0)
}
  , rM = function(t, e) {
    var r, n = ((r = t.padding) === null || r === void 0 ? void 0 : r.split(" ").map(function(u) {
        return e(u)
    })) || [0], i = 0, o = 0, s = 0, a = 0;
    switch (n.length) {
    case 1:
        i = o = s = a = n[0];
        break;
    case 2:
        i = o = n[0],
        s = a = n[1];
        break;
    case 3:
        i = n[0],
        s = a = n[1],
        o = n[2];
        break;
    default:
        i = n[0],
        o = n[1],
        s = n[2],
        a = n[3]
    }
    var l = {
        paddingTop: i,
        paddingBottom: o,
        paddingLeft: s,
        paddingRight: a
    };
    for (var c in l)
        l[c] = uu(t, c) && If(t[c], "string", "number") ? e(t[c]) : l[c];
    return [i, o, s, a]
}
  , nM = function(t) {
    var e = []
      , r = t.map(function(i) {
        return Number(i)
    }).reduce(function(i, o) {
        if (o > 0) {
            var s = i + o;
            return e.push(s),
            s
        }
        return e.push(NaN),
        i
    }, 0)
      , n = Math.random() * r;
    return e.findIndex(function(i) {
        return n <= i
    })
}
  , gC = function(t, e, r, n) {
    n === void 0 && (n = 1 / 0),
    n <= 0 && (n = 1 / 0);
    for (var i = "", o = [], s = t.measureText("...").width, a = 0; a < e.length; a++) {
        i += e[a];
        var l = t.measureText(i).width
          , c = r(o);
        if (n === o.length + 1 && (l += s),
        c < 0)
            return o;
        if (l > c && (o.push(i.slice(0, -1)),
        i = e[a]),
        n === o.length)
            return o[o.length - 1] += "...",
            o
    }
    return i && o.push(i),
    o.length || o.push(e),
    o
}
  , Ja = function() {
    function t() {
        this.subs = []
    }
    return t.prototype.addSub = function(e) {
        this.subs.includes(e) || this.subs.push(e)
    }
    ,
    t.prototype.notify = function() {
        this.subs.forEach(function(e) {
            e.update()
        })
    }
    ,
    t
}()
  , P_e = "__proto__"in {};
function W4(t, e, r, n) {
    Object.defineProperty(t, e, {
        value: r,
        enumerable: !!n,
        writable: !0,
        configurable: !0
    })
}
var iM = Array.prototype
  , tx = Object.create(iM);
["push", "pop", "shift", "unshift", "sort", "splice", "reverse"].forEach(function(t) {
    tx[t] = function() {
        for (var e = [], r = 0; r < arguments.length; r++)
            e[r] = arguments[r];
        var n = iM[t].apply(this, e)
          , i = this.__luckyOb__;
        return ["push", "unshift", "splice"].includes(t) && i.walk(this),
        i.dep.notify(),
        n
    }
});
var I_e = function() {
    function t(e) {
        this.dep = new Ja,
        W4(e, "__luckyOb__", this),
        Array.isArray(e) && (P_e ? e.__proto__ = tx : Object.getOwnPropertyNames(tx).forEach(function(r) {
            W4(e, r, tx[r])
        })),
        this.walk(e)
    }
    return t.prototype.walk = function(e) {
        Object.keys(e).forEach(function(r) {
            oM(e, r, e[r])
        })
    }
    ,
    t
}();
function Y4(t) {
    if (t && typeof t == "object")
        return "__luckyOb__"in t ? t.__luckyOb__ : new I_e(t)
}
function oM(t, e, r) {
    var n = new Ja
      , i = Object.getOwnPropertyDescriptor(t, e);
    if (!i || i.configurable !== !1) {
        var o = i && i.get
          , s = i && i.set;
        o && !s || arguments.length !== 2 || (r = t[e]);
        var a = Y4(r);
        Object.defineProperty(t, e, {
            get: function() {
                var l = o ? o.call(t) : r;
                return Ja.target && (n.addSub(Ja.target),
                a && a.dep.addSub(Ja.target)),
                l
            },
            set: function(l) {
                l !== r && (r = l,
                o && !s || (s ? s.call(t, l) : r = l,
                a = Y4(l),
                n.notify()))
            }
        })
    }
}
var O_e = 0
  , k_e = function() {
    function t(e, r, n, i) {
        i === void 0 && (i = {}),
        this.id = O_e++,
        this.$lucky = e,
        this.expr = r,
        this.deep = !!i.deep,
        this.getter = typeof r == "function" ? r : function(o) {
            o += ".";
            for (var s = [], a = "", l = 0; l < o.length; l++) {
                var c = o[l];
                if (/\[|\./.test(c))
                    s.push(a),
                    a = "";
                else {
                    if (/\W/.test(c))
                        continue;
                    a += c
                }
            }
            return function(u) {
                return s.reduce(function(f, d) {
                    return f[d]
                }, u)
            }
        }(r),
        this.cb = n,
        this.value = this.get()
    }
    return t.prototype.get = function() {
        Ja.target = this;
        var e = this.getter.call(this.$lucky, this.$lucky);
        return this.deep && function(r) {
            var n = function(i) {
                If(i, "array", "object") && Object.keys(i).forEach(function(o) {
                    var s = i[o];
                    n(s)
                })
            };
            n(r)
        }(e),
        Ja.target = null,
        e
    }
    ,
    t.prototype.update = function() {
        var e = this.get()
          , r = this.value;
        this.value = e,
        this.cb.call(this.$lucky, e, r)
    }
    ,
    t
}()
  , mC = function() {
    function t(e, r) {
        var n = this;
        this.version = "1.7.21",
        this.htmlFontSize = 16,
        this.rAF = function() {}
        ,
        this.boxWidth = 0,
        this.boxHeight = 0,
        typeof e == "string" ? e = {
            el: e
        } : e.nodeType === 1 && (e = {
            el: "",
            divElement: e
        }),
        e = e,
        this.config = e,
        this.data = r,
        e.flag || (e.flag = "WEB"),
        e.el && (e.divElement = document.querySelector(e.el)),
        e.divElement && (e.canvasElement = document.createElement("canvas"),
        e.divElement.appendChild(e.canvasElement)),
        e.canvasElement && (e.ctx = e.canvasElement.getContext("2d"),
        e.canvasElement.setAttribute("package", "lucky-canvas@1.7.21"),
        e.canvasElement.addEventListener("click", function(i) {
            return n.handleClick(i)
        })),
        this.ctx = e.ctx,
        this.initWindowFunction(),
        this.config.ctx || console.error("无法获取到 CanvasContext2D"),
        window && typeof window.addEventListener == "function" && window.addEventListener("resize", function(i, o) {
            o === void 0 && (o = 300);
            var s = null;
            return function() {
                for (var a = this, l = [], c = 0; c < arguments.length; c++)
                    l[c] = arguments[c];
                s || (s = setTimeout(function() {
                    i.apply(a, l),
                    clearTimeout(s),
                    s = null
                }, o))
            }
        }(function() {
            return n.resize()
        }, 300)),
        window && typeof window.MutationObserver == "function" && new window.MutationObserver(function() {
            n.resize()
        }
        ).observe(document.documentElement, {
            attributes: !0
        })
    }
    return t.prototype.resize = function() {
        var e, r;
        (r = (e = this.config).beforeResize) === null || r === void 0 || r.call(e),
        this.setHTMLFontSize(),
        this.setDpr(),
        this.resetWidthAndHeight(),
        this.zoomCanvas()
    }
    ,
    t.prototype.initLucky = function() {
        if (this.resize(),
        !this.boxWidth || !this.boxHeight)
            return console.error("无法获取到宽度或高度")
    }
    ,
    t.prototype.handleClick = function(e) {}
    ,
    t.prototype.setHTMLFontSize = function() {
        window && (this.htmlFontSize = +window.getComputedStyle(document.documentElement).fontSize.slice(0, -2))
    }
    ,
    t.prototype.clearCanvas = function() {
        var e = [this.boxWidth, this.boxHeight]
          , r = e[0]
          , n = e[1];
        this.ctx.clearRect(-r, -n, 2 * r, 2 * n)
    }
    ,
    t.prototype.setDpr = function() {
        var e = this.config;
        e.dpr || (window ? window.dpr = e.dpr = window.devicePixelRatio || 1 : e.dpr || console.error(e, "未传入 dpr 可能会导致绘制异常"))
    }
    ,
    t.prototype.resetWidthAndHeight = function() {
        var e = this.config
          , r = this.data
          , n = 0
          , i = 0;
        e.divElement && (n = e.divElement.offsetWidth,
        i = e.divElement.offsetHeight),
        this.boxWidth = this.getLength(r.width || e.width) || n,
        this.boxHeight = this.getLength(r.height || e.height) || i,
        e.divElement && (e.divElement.style.overflow = "hidden",
        e.divElement.style.width = this.boxWidth + "px",
        e.divElement.style.height = this.boxHeight + "px")
    }
    ,
    t.prototype.zoomCanvas = function() {
        var e = this.config
          , r = this.ctx
          , n = e.canvasElement
          , i = e.dpr
          , o = [this.boxWidth * i, this.boxHeight * i]
          , s = o[0]
          , a = o[1];
        n && (n.width = s,
        n.height = a,
        n.style.width = s + "px",
        n.style.height = a + "px",
        n.style["transform-origin"] = "left top",
        n.style.transform = "scale(" + 1 / i + ")",
        r.scale(i, i))
    }
    ,
    t.prototype.initWindowFunction = function() {
        var e = this.config;
        if (window)
            return this.rAF = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(n) {
                window.setTimeout(n, 1e3 / 60)
            }
            ,
            e.setTimeout = window.setTimeout,
            e.setInterval = window.setInterval,
            e.clearTimeout = window.clearTimeout,
            void (e.clearInterval = window.clearInterval);
        if (e.rAF)
            this.rAF = e.rAF;
        else if (e.setTimeout) {
            var r = e.setTimeout;
            this.rAF = function(n) {
                return r(n, 16.7)
            }
        } else
            this.rAF = function(n) {
                return setTimeout(n, 16.7)
            }
    }
    ,
    t.prototype.loadImg = function(e, r, n) {
        var i = this;
        return n === void 0 && (n = "$resolve"),
        new Promise(function(o, s) {
            if (e || s("=> '" + r.src + "' 不能为空或不合法"),
            i.config.flag !== "WEB")
                return r[n] = o,
                void (r.$reject = s);
            var a = new Image;
            a.onload = function() {
                return o(a)
            }
            ,
            a.onerror = function() {
                return s("=> '" + r.src + "' 图片加载失败")
            }
            ,
            a.src = e
        }
        )
    }
    ,
    t.prototype.drawImage = function(e, r) {
        for (var n, i = [], o = 2; o < arguments.length; o++)
            i[o - 2] = arguments[o];
        var s = this.config
          , a = s.flag
          , l = s.dpr;
        if (["WEB", "MP-WX"].includes(a))
            n = r;
        else {
            if (!["UNI-H5", "UNI-MP", "TARO-H5", "TARO-MP"].includes(a))
                return console.error("意料之外的 flag, 该平台尚未兼容!");
            n = r.path
        }
        if (!n.canvas)
            return i.length === 8 && (i = i.map(function(f, d) {
                return d < 4 ? f * l : f
            })),
            e.drawImage.apply(e, Ac([n], i));
        var c = n.canvas.getContext("2d");
        i = i.map(function(f) {
            return f * l
        });
        var u = c.getImageData.apply(c, i.slice(0, 4));
        e.putImageData.apply(e, Ac([u], i.slice(4, 6)))
    }
    ,
    t.prototype.computedWidthAndHeight = function(e, r, n, i) {
        if (!r.width && !r.height)
            return [e.width, e.height];
        if (r.width && !r.height) {
            var o = this.getLength(r.width, n);
            return [o, e.height * (o / e.width)]
        }
        if (!r.width && r.height) {
            var s = this.getLength(r.height, i);
            return [e.width * (s / e.height), s]
        }
        return [this.getLength(r.width, n), this.getLength(r.height, i)]
    }
    ,
    t.prototype.changeUnits = function(e, r) {
        var n = this;
        r === void 0 && (r = 1);
        var i = this.config;
        return Number(e.replace(/^([-]*[0-9.]*)([a-z%]*)$/, function(o, s, a) {
            var l = {
                "%": function(u) {
                    return u * (r / 100)
                },
                px: function(u) {
                    return 1 * u
                },
                rem: function(u) {
                    return u * n.htmlFontSize
                },
                vw: function(u) {
                    return u / 100 * window.innerWidth
                }
            }[a];
            if (l)
                return l(s);
            var c = i.handleCssUnit || i.unitFunc;
            return c ? c(s, a) : s
        }))
    }
    ,
    t.prototype.getLength = function(e, r) {
        return If(e, "number") ? e : If(e, "string") ? this.changeUnits(e, r) : 0
    }
    ,
    t.prototype.getOffsetX = function(e, r) {
        return r === void 0 && (r = 0),
        (r - e) / 2
    }
    ,
    t.prototype.getOffscreenCanvas = function(e, r) {
        if (!uu(this, "_offscreenCanvas") && (window && window.document && this.config.flag === "WEB" ? this._offscreenCanvas = document.createElement("canvas") : this._offscreenCanvas = this.config.offscreenCanvas,
        !this._offscreenCanvas))
            return console.error("离屏 Canvas 无法渲染!");
        var n = this.config.dpr
          , i = this._offscreenCanvas;
        i.width = (e || 300) * n,
        i.height = (r || 150) * n;
        var o = i.getContext("2d");
        return o.clearRect(0, 0, e, r),
        o.scale(n, n),
        o.dpr = n,
        {
            _offscreenCanvas: i,
            _ctx: o
        }
    }
    ,
    t.prototype.$set = function(e, r, n) {
        e && typeof e == "object" && oM(e, r, n)
    }
    ,
    t.prototype.$computed = function(e, r, n) {
        var i = this;
        Object.defineProperty(e, r, {
            get: function() {
                return n.call(i)
            }
        })
    }
    ,
    t.prototype.$watch = function(e, r, n) {
        n === void 0 && (n = {}),
        typeof r == "object" && (r = (n = r).handler);
        var i = new k_e(this,e,r,n);
        return n.immediate && r.call(this, i.value),
        function() {}
    }
    ,
    t.version = "1.7.21",
    t
}()
  , Fa = function(t) {
    return Math.PI / 180 * t
}
  , Zx = function(t) {
    for (var e = [], r = 1; r < arguments.length; r++)
        e[r - 1] = arguments[r];
    var n = e[0]
      , i = e[1]
      , o = e[2]
      , s = e[3]
      , a = e[4]
      , l = Math.min(o, s)
      , c = Math.PI;
    a > l / 2 && (a = l / 2),
    t.beginPath(),
    t.moveTo(n + a, i),
    t.lineTo(n + a, i),
    t.lineTo(n + o - a, i),
    t.arc(n + o - a, i + a, a, -c / 2, 0),
    t.lineTo(n + o, i + s - a),
    t.arc(n + o - a, i + s - a, a, 0, c / 2),
    t.lineTo(n + a, i + s),
    t.arc(n + a, i + s - a, a, c / 2, c),
    t.lineTo(n, i + a),
    t.arc(n + a, i + a, a, c, -c / 2),
    t.closePath()
}
  , vC = function(t, e, r, n) {
    return t >= n && (t = n),
    r * (t /= n) * t + e
}
  , fu = function(t, e, r, n) {
    return t >= n && (t = n),
    -r * (t /= n) * (t - 2) + e
}
  , R_e = function(t) {
    function e(r, n) {
        var i, o = t.call(this, r, {
            width: n.width,
            height: n.height
        }) || this;
        return o.blocks = [],
        o.prizes = [],
        o.buttons = [],
        o.defaultConfig = {},
        o.defaultStyle = {},
        o._defaultConfig = {},
        o._defaultStyle = {},
        o.Radius = 0,
        o.prizeRadius = 0,
        o.prizeDeg = 0,
        o.prizeAng = 0,
        o.rotateDeg = 0,
        o.maxBtnRadius = 0,
        o.startTime = 0,
        o.endTime = 0,
        o.stopDeg = 0,
        o.endDeg = 0,
        o.FPS = 16.6,
        o.step = 0,
        o.ImageCache = new Map,
        o.initData(n),
        o.initWatch(),
        o.initComputed(),
        (i = r.beforeCreate) === null || i === void 0 || i.call(o),
        o.init(),
        o
    }
    return xC(e, t),
    e.prototype.resize = function() {
        var r, n;
        t.prototype.resize.call(this),
        this.Radius = Math.min(this.boxWidth, this.boxHeight) / 2,
        this.ctx.translate(this.Radius, this.Radius),
        this.draw(),
        (n = (r = this.config).afterResize) === null || n === void 0 || n.call(r)
    }
    ,
    e.prototype.initLucky = function() {
        this.Radius = 0,
        this.prizeRadius = 0,
        this.prizeDeg = 0,
        this.prizeAng = 0,
        this.rotateDeg = 0,
        this.maxBtnRadius = 0,
        this.startTime = 0,
        this.endTime = 0,
        this.stopDeg = 0,
        this.endDeg = 0,
        this.FPS = 16.6,
        this.prizeFlag = -1,
        this.step = 0,
        t.prototype.initLucky.call(this)
    }
    ,
    e.prototype.initData = function(r) {
        this.$set(this, "width", r.width || "300px"),
        this.$set(this, "height", r.height || "300px"),
        this.$set(this, "blocks", r.blocks || []),
        this.$set(this, "prizes", r.prizes || []),
        this.$set(this, "buttons", r.buttons || []),
        this.$set(this, "defaultConfig", r.defaultConfig || {}),
        this.$set(this, "defaultStyle", r.defaultStyle || {}),
        this.$set(this, "startCallback", r.start),
        this.$set(this, "endCallback", r.end)
    }
    ,
    e.prototype.initComputed = function() {
        var r = this;
        this.$computed(this, "_defaultConfig", function() {
            return is({
                gutter: "0px",
                offsetDegree: 0,
                speed: 20,
                speedFunction: "quad",
                accelerationTime: 2500,
                decelerationTime: 2500,
                stopRange: 0
            }, r.defaultConfig)
        }),
        this.$computed(this, "_defaultStyle", function() {
            return is({
                fontSize: "18px",
                fontColor: "#000",
                fontStyle: "sans-serif",
                fontWeight: "400",
                background: "rgba(0,0,0,0)",
                wordWrap: !0,
                lengthLimit: "90%"
            }, r.defaultStyle)
        })
    }
    ,
    e.prototype.initWatch = function() {
        var r = this;
        this.$watch("width", function(n) {
            r.data.width = n,
            r.resize()
        }),
        this.$watch("height", function(n) {
            r.data.height = n,
            r.resize()
        }),
        this.$watch("blocks", function(n) {
            r.initImageCache()
        }, {
            deep: !0
        }),
        this.$watch("prizes", function(n) {
            r.initImageCache()
        }, {
            deep: !0
        }),
        this.$watch("buttons", function(n) {
            r.initImageCache()
        }, {
            deep: !0
        }),
        this.$watch("defaultConfig", function() {
            return r.draw()
        }, {
            deep: !0
        }),
        this.$watch("defaultStyle", function() {
            return r.draw()
        }, {
            deep: !0
        }),
        this.$watch("startCallback", function() {
            return r.init()
        }),
        this.$watch("endCallback", function() {
            return r.init()
        })
    }
    ,
    e.prototype.init = function() {
        var r, n;
        return os(this, void 0, void 0, function() {
            var i;
            return ss(this, function(o) {
                switch (o.label) {
                case 0:
                    return this.initLucky(),
                    i = this.config,
                    (r = i.beforeInit) === null || r === void 0 || r.call(this),
                    this.draw(),
                    this.draw(),
                    [4, this.initImageCache()];
                case 1:
                    return o.sent(),
                    (n = i.afterInit) === null || n === void 0 || n.call(this),
                    [2]
                }
            })
        })
    }
    ,
    e.prototype.initImageCache = function() {
        var r = this;
        return new Promise(function(n) {
            var i = {
                blocks: r.blocks.map(function(o) {
                    return o.imgs
                }),
                prizes: r.prizes.map(function(o) {
                    return o.imgs
                }),
                buttons: r.buttons.map(function(o) {
                    return o.imgs
                })
            };
            Object.keys(i).forEach(function(o) {
                var s = i[o]
                  , a = [];
                s && s.forEach(function(l, c) {
                    l && l.forEach(function(u, f) {
                        a.push(r.loadAndCacheImg(o, c, f))
                    })
                }),
                Promise.all(a).then(function() {
                    r.draw(),
                    n()
                })
            })
        }
        )
    }
    ,
    e.prototype.handleClick = function(r) {
        var n, i = this.ctx;
        i.beginPath(),
        i.arc(0, 0, this.maxBtnRadius, 0, 2 * Math.PI, !1),
        i.isPointInPath(r.offsetX, r.offsetY) && this.step === 0 && ((n = this.startCallback) === null || n === void 0 || n.call(this, r))
    }
    ,
    e.prototype.loadAndCacheImg = function(r, n, i) {
        return os(this, void 0, void 0, function() {
            var o = this;
            return ss(this, function(s) {
                return [2, new Promise(function(a, l) {
                    var c = o[r][n];
                    if (c && c.imgs) {
                        var u = c.imgs[i];
                        u && o.loadImg(u.src, u).then(function(f) {
                            return os(o, void 0, void 0, function() {
                                return ss(this, function(d) {
                                    switch (d.label) {
                                    case 0:
                                        return typeof u.formatter != "function" ? [3, 2] : [4, Promise.resolve(u.formatter.call(this, f))];
                                    case 1:
                                        f = d.sent(),
                                        d.label = 2;
                                    case 2:
                                        return this.ImageCache.set(u.src, f),
                                        a(),
                                        [2]
                                    }
                                })
                            })
                        }).catch(function(f) {
                            console.error(r + "[" + n + "].imgs[" + i + "] " + f),
                            l()
                        })
                    }
                }
                )]
            })
        })
    }
    ,
    e.prototype.drawBlock = function(r, n, i) {
        var o = this
          , s = this.ctx;
        Ws(n.background) && (s.beginPath(),
        s.fillStyle = n.background,
        s.arc(0, 0, r, 0, 2 * Math.PI, !1),
        s.fill()),
        n.imgs && n.imgs.forEach(function(a, l) {
            var c = o.ImageCache.get(a.src);
            if (c) {
                var u = o.computedWidthAndHeight(c, a, 2 * r, 2 * r)
                  , f = u[0]
                  , d = u[1]
                  , h = [o.getOffsetX(f) + o.getLength(a.left, 2 * r), o.getLength(a.top, 2 * r) - r]
                  , x = h[0]
                  , y = h[1];
                s.save(),
                a.rotate && s.rotate(Fa(o.rotateDeg)),
                o.drawImage(s, c, x, y, f, d),
                s.restore()
            }
        })
    }
    ,
    e.prototype.draw = function() {
        var r, n, i = this, o = this, s = o.config, a = o.ctx, l = o._defaultConfig, c = o._defaultStyle;
        (r = s.beforeDraw) === null || r === void 0 || r.call(this, a),
        a.clearRect(-this.Radius, -this.Radius, 2 * this.Radius, 2 * this.Radius),
        this.prizeRadius = this.blocks.reduce(function(x, y, m) {
            return i.drawBlock(x, y, m),
            x - i.getLength(y.padding && y.padding.split(" ")[0])
        }, this.Radius),
        this.prizeDeg = 360 / this.prizes.length,
        this.prizeAng = Fa(this.prizeDeg);
        var u = this.prizeRadius * Math.sin(this.prizeAng / 2) * 2
          , f = Fa(this.rotateDeg - 90 + this.prizeDeg / 2 + l.offsetDegree)
          , d = function(x, y) {
            return i.getOffsetX(a.measureText(y).width) + i.getLength(x.left, u)
        }
          , h = function(x, y, m) {
            var E = x.lineHeight || c.lineHeight || x.fontSize || c.fontSize;
            return i.getLength(x.top, y) + (m + 1) * i.getLength(E)
        };
        a.save(),
        this.prizes.forEach(function(x, y) {
            var m = f + y * i.prizeAng
              , E = i.prizeRadius - i.maxBtnRadius
              , g = x.background || c.background;
            Ws(g) && (a.fillStyle = g,
            function(_, b, C, B, T, A) {
                _.beginPath();
                var w, S, D = Fa(90 / Math.PI / C * A), F = B + D, R = T - D;
                _.arc(0, 0, C, F, R, !1),
                _.lineTo.apply(_, (w = (B + T) / 2,
                S = A / 2 / Math.abs(Math.sin((B - T) / 2)),
                [+(Math.cos(w) * S).toFixed(8), +(Math.sin(w) * S).toFixed(8)])),
                _.closePath()
            }(a, i.maxBtnRadius, i.prizeRadius, m - i.prizeAng / 2, m + i.prizeAng / 2, i.getLength(l.gutter)),
            a.fill());
            var p = Math.cos(m) * i.prizeRadius
              , v = Math.sin(m) * i.prizeRadius;
            a.translate(p, v),
            a.rotate(m + Fa(90)),
            x.imgs && x.imgs.forEach(function(_, b) {
                var C = i.ImageCache.get(_.src);
                if (C) {
                    var B = i.computedWidthAndHeight(C, _, i.prizeAng * i.prizeRadius, E)
                      , T = B[0]
                      , A = B[1]
                      , w = [i.getOffsetX(T) + i.getLength(_.left, u), i.getLength(_.top, E)]
                      , S = w[0]
                      , D = w[1];
                    i.drawImage(a, C, S, D, T, A)
                }
            }),
            x.fonts && x.fonts.forEach(function(_) {
                var b = _.fontColor || c.fontColor
                  , C = _.fontWeight || c.fontWeight
                  , B = i.getLength(_.fontSize || c.fontSize)
                  , T = _.fontStyle || c.fontStyle
                  , A = uu(_, "wordWrap") ? _.wordWrap : c.wordWrap
                  , w = _.lengthLimit || c.lengthLimit
                  , S = _.lineClamp || c.lineClamp;
                a.fillStyle = b,
                a.font = C + " " + (B >> 0) + "px " + T;
                var D = String(_.text);
                (A ? gC(a, pC(D), function(F) {
                    var R = (i.prizeRadius - h(_, E, F.length)) * Math.tan(i.prizeAng / 2) * 2 - i.getLength(l.gutter);
                    return i.getLength(w, R)
                }, S) : D.split(`
`)).filter(function(F) {
                    return !!F
                }).forEach(function(F, R) {
                    a.fillText(F, d(_, F), h(_, E, R))
                })
            }),
            a.rotate(Fa(360) - m - Fa(90)),
            a.translate(-p, -v)
        }),
        a.restore(),
        this.buttons.forEach(function(x, y) {
            var m = i.getLength(x.radius, i.prizeRadius);
            i.maxBtnRadius = Math.max(i.maxBtnRadius, m),
            Ws(x.background) && (a.beginPath(),
            a.fillStyle = x.background,
            a.arc(0, 0, m, 0, 2 * Math.PI, !1),
            a.fill()),
            x.pointer && Ws(x.background) && (a.beginPath(),
            a.fillStyle = x.background,
            a.moveTo(-m, 0),
            a.lineTo(m, 0),
            a.lineTo(0, 2 * -m),
            a.closePath(),
            a.fill()),
            x.imgs && x.imgs.forEach(function(E, g) {
                var p = i.ImageCache.get(E.src);
                if (p) {
                    var v = i.computedWidthAndHeight(p, E, 2 * m, 2 * m)
                      , _ = v[0]
                      , b = v[1]
                      , C = [i.getOffsetX(_) + i.getLength(E.left, m), i.getLength(E.top, m)]
                      , B = C[0]
                      , T = C[1];
                    i.drawImage(a, p, B, T, _, b)
                }
            }),
            x.fonts && x.fonts.forEach(function(E) {
                var g = E.fontColor || c.fontColor
                  , p = E.fontWeight || c.fontWeight
                  , v = i.getLength(E.fontSize || c.fontSize)
                  , _ = E.fontStyle || c.fontStyle;
                a.fillStyle = g,
                a.font = p + " " + (v >> 0) + "px " + _,
                String(E.text).split(`
`).forEach(function(b, C) {
                    a.fillText(b, d(E, b), h(E, m, C))
                })
            })
        }),
        (n = s.afterDraw) === null || n === void 0 || n.call(this, a)
    }
    ,
    e.prototype.carveOnGunwaleOfAMovingBoat = function() {
        var r = this
          , n = r._defaultConfig
          , i = r.prizeFlag
          , o = r.prizeDeg
          , s = r.rotateDeg;
        this.endTime = Date.now();
        for (var a = this.stopDeg = s, l = n.speed, c = (Math.random() * o - o / 2) * this.getLength(n.stopRange), u = 0, f = 0, d = 0; ++u; ) {
            var h = 360 * u - i * o - s - n.offsetDegree + c - o / 2
              , x = fu(this.FPS, a, h, n.decelerationTime) - a;
            if (x > l) {
                this.endDeg = l - f > x - l ? h : d;
                break
            }
            d = h,
            f = x
        }
    }
    ,
    e.prototype.play = function() {
        var r, n;
        this.step === 0 && (this.startTime = Date.now(),
        this.prizeFlag = void 0,
        this.step = 1,
        (n = (r = this.config).afterStart) === null || n === void 0 || n.call(r),
        this.run())
    }
    ,
    e.prototype.stop = function(r) {
        if (this.step !== 0 && this.step !== 3) {
            if (!r && r !== 0) {
                var n = this.prizes.map(function(i) {
                    return i.range
                });
                r = nM(n)
            }
            r < 0 ? (this.step = 0,
            this.prizeFlag = -1) : (this.step = 2,
            this.prizeFlag = r % this.prizes.length)
        }
    }
    ,
    e.prototype.run = function(r) {
        var n;
        r === void 0 && (r = 0);
        var i = this
          , o = i.rAF
          , s = i.step
          , a = i.prizeFlag
          , l = i._defaultConfig
          , c = l.accelerationTime
          , u = l.decelerationTime
          , f = l.speed;
        if (s !== 0) {
            if (a !== -1) {
                s !== 3 || this.endDeg || this.carveOnGunwaleOfAMovingBoat();
                var d = Date.now() - this.startTime
                  , h = Date.now() - this.endTime
                  , x = this.rotateDeg;
                if (s === 1 || d < c) {
                    this.FPS = d / r;
                    var y = vC(d, 0, f, c);
                    y === f && (this.step = 2),
                    x += y % 360
                } else
                    s === 2 ? (x += f % 360,
                    a !== void 0 && a >= 0 && (this.step = 3,
                    this.stopDeg = 0,
                    this.endDeg = 0)) : s === 3 ? (x = fu(h, this.stopDeg, this.endDeg, u),
                    h >= u && (this.step = 0)) : this.stop(-1);
                this.rotateDeg = x,
                this.draw(),
                o(this.run.bind(this, r + 1))
            }
        } else
            (n = this.endCallback) === null || n === void 0 || n.call(this, this.prizes.find(function(m, E) {
                return E === a
            }) || {})
    }
    ,
    e.prototype.conversionAxis = function(r, n) {
        var i = this.config;
        return [r / i.dpr - this.Radius, n / i.dpr - this.Radius]
    }
    ,
    e
}(mC)
  , M_e = function(t) {
    function e(r, n) {
        var i, o = t.call(this, r, {
            width: n.width,
            height: n.height
        }) || this;
        return o.rows = 3,
        o.cols = 3,
        o.blocks = [],
        o.prizes = [],
        o.buttons = [],
        o.defaultConfig = {},
        o.defaultStyle = {},
        o.activeStyle = {},
        o._defaultConfig = {},
        o._defaultStyle = {},
        o._activeStyle = {},
        o.cellWidth = 0,
        o.cellHeight = 0,
        o.startTime = 0,
        o.endTime = 0,
        o.currIndex = 0,
        o.stopIndex = 0,
        o.endIndex = 0,
        o.demo = !1,
        o.timer = 0,
        o.FPS = 16.6,
        o.step = 0,
        o.prizeFlag = -1,
        o.cells = [],
        o.ImageCache = new Map,
        o.initData(n),
        o.initWatch(),
        o.initComputed(),
        (i = r.beforeCreate) === null || i === void 0 || i.call(o),
        o.init(),
        o
    }
    return xC(e, t),
    e.prototype.resize = function() {
        var r, n;
        t.prototype.resize.call(this),
        this.draw(),
        (n = (r = this.config).afterResize) === null || n === void 0 || n.call(r)
    }
    ,
    e.prototype.initLucky = function() {
        this.cellWidth = 0,
        this.cellHeight = 0,
        this.startTime = 0,
        this.endTime = 0,
        this.currIndex = 0,
        this.stopIndex = 0,
        this.endIndex = 0,
        this.demo = !1,
        this.timer = 0,
        this.FPS = 16.6,
        this.prizeFlag = -1,
        this.step = 0,
        t.prototype.initLucky.call(this)
    }
    ,
    e.prototype.initData = function(r) {
        this.$set(this, "width", r.width || "300px"),
        this.$set(this, "height", r.height || "300px"),
        this.$set(this, "rows", Number(r.rows) || 3),
        this.$set(this, "cols", Number(r.cols) || 3),
        this.$set(this, "blocks", r.blocks || []),
        this.$set(this, "prizes", r.prizes || []),
        this.$set(this, "buttons", r.buttons || []),
        this.$set(this, "button", r.button),
        this.$set(this, "defaultConfig", r.defaultConfig || {}),
        this.$set(this, "defaultStyle", r.defaultStyle || {}),
        this.$set(this, "activeStyle", r.activeStyle || {}),
        this.$set(this, "startCallback", r.start),
        this.$set(this, "endCallback", r.end)
    }
    ,
    e.prototype.initComputed = function() {
        var r = this;
        this.$computed(this, "_defaultConfig", function() {
            var n = is({
                gutter: 5,
                speed: 20,
                accelerationTime: 2500,
                decelerationTime: 2500
            }, r.defaultConfig);
            return n.gutter = r.getLength(n.gutter),
            n.speed = n.speed / 40,
            n
        }),
        this.$computed(this, "_defaultStyle", function() {
            return is({
                borderRadius: 20,
                fontColor: "#000",
                fontSize: "18px",
                fontStyle: "sans-serif",
                fontWeight: "400",
                background: "rgba(0,0,0,0)",
                shadow: "",
                wordWrap: !0,
                lengthLimit: "90%"
            }, r.defaultStyle)
        }),
        this.$computed(this, "_activeStyle", function() {
            return is({
                background: "#ffce98",
                shadow: ""
            }, r.activeStyle)
        })
    }
    ,
    e.prototype.initWatch = function() {
        var r = this;
        this.$watch("width", function(n) {
            r.data.width = n,
            r.resize()
        }),
        this.$watch("height", function(n) {
            r.data.height = n,
            r.resize()
        }),
        this.$watch("blocks", function(n) {
            r.initImageCache()
        }, {
            deep: !0
        }),
        this.$watch("prizes", function(n) {
            r.initImageCache()
        }, {
            deep: !0
        }),
        this.$watch("buttons", function(n) {
            r.initImageCache()
        }, {
            deep: !0
        }),
        this.$watch("rows", function() {
            return r.init()
        }),
        this.$watch("cols", function() {
            return r.init()
        }),
        this.$watch("defaultConfig", function() {
            return r.draw()
        }, {
            deep: !0
        }),
        this.$watch("defaultStyle", function() {
            return r.draw()
        }, {
            deep: !0
        }),
        this.$watch("activeStyle", function() {
            return r.draw()
        }, {
            deep: !0
        }),
        this.$watch("startCallback", function() {
            return r.init()
        }),
        this.$watch("endCallback", function() {
            return r.init()
        })
    }
    ,
    e.prototype.init = function() {
        var r, n;
        return os(this, void 0, void 0, function() {
            var i;
            return ss(this, function(o) {
                switch (o.label) {
                case 0:
                    return this.initLucky(),
                    i = this.config,
                    (r = i.beforeInit) === null || r === void 0 || r.call(this),
                    this.draw(),
                    [4, this.initImageCache()];
                case 1:
                    return o.sent(),
                    (n = i.afterInit) === null || n === void 0 || n.call(this),
                    [2]
                }
            })
        })
    }
    ,
    e.prototype.initImageCache = function() {
        var r = this;
        return new Promise(function(n) {
            var i = r.buttons.map(function(s) {
                return s.imgs
            });
            r.button && i.push(r.button.imgs);
            var o = {
                blocks: r.blocks.map(function(s) {
                    return s.imgs
                }),
                prizes: r.prizes.map(function(s) {
                    return s.imgs
                }),
                buttons: i
            };
            Object.keys(o).forEach(function(s) {
                var a = o[s]
                  , l = [];
                a && a.forEach(function(c, u) {
                    c && c.forEach(function(f, d) {
                        l.push(r.loadAndCacheImg(s, u, d))
                    })
                }),
                Promise.all(l).then(function() {
                    r.draw(),
                    n()
                })
            })
        }
        )
    }
    ,
    e.prototype.handleClick = function(r) {
        var n = this
          , i = this.ctx;
        Ac(Ac([], this.buttons), [this.button]).forEach(function(o) {
            var s;
            if (o) {
                var a = n.getGeometricProperty([o.x, o.y, o.col || 1, o.row || 1])
                  , l = a[0]
                  , c = a[1]
                  , u = a[2]
                  , f = a[3];
                i.beginPath(),
                i.rect(l, c, u, f),
                i.isPointInPath(r.offsetX, r.offsetY) && n.step === 0 && (typeof o.callback == "function" && o.callback.call(n, o),
                (s = n.startCallback) === null || s === void 0 || s.call(n, r, o))
            }
        })
    }
    ,
    e.prototype.loadAndCacheImg = function(r, n, i) {
        return os(this, void 0, void 0, function() {
            var o = this;
            return ss(this, function(s) {
                return [2, new Promise(function(a, l) {
                    var c = o[r][n];
                    if (r === "buttons" && !o.buttons.length && o.button && (c = o.button),
                    c && c.imgs) {
                        var u = c.imgs[i];
                        if (u) {
                            var f = [o.loadImg(u.src, u), u.activeSrc && o.loadImg(u.activeSrc, u, "$activeResolve")];
                            Promise.all(f).then(function(d) {
                                var h = d[0]
                                  , x = d[1];
                                return os(o, void 0, void 0, function() {
                                    var y;
                                    return ss(this, function(m) {
                                        switch (m.label) {
                                        case 0:
                                            return typeof (y = u.formatter) != "function" ? [3, 3] : [4, Promise.resolve(y.call(this, h))];
                                        case 1:
                                            return h = m.sent(),
                                            x ? [4, Promise.resolve(y.call(this, x))] : [3, 3];
                                        case 2:
                                            x = m.sent(),
                                            m.label = 3;
                                        case 3:
                                            return this.ImageCache.set(u.src, h),
                                            x && this.ImageCache.set(u.activeSrc, x),
                                            a(),
                                            [2]
                                        }
                                    })
                                })
                            }).catch(function(d) {
                                console.error(r + "[" + n + "].imgs[" + i + "] " + d),
                                l()
                            })
                        }
                    }
                }
                )]
            })
        })
    }
    ,
    e.prototype.draw = function() {
        var r, n, i = this, o = this, s = o.config, a = o.ctx, l = o._defaultConfig, c = o._defaultStyle, u = o._activeStyle;
        (r = s.beforeDraw) === null || r === void 0 || r.call(this, a),
        a.clearRect(0, 0, this.boxWidth, this.boxHeight),
        this.cells = Ac(Ac([], this.prizes), this.buttons),
        this.button && this.cells.push(this.button),
        this.cells.forEach(function(f) {
            f.col = f.col || 1,
            f.row = f.row || 1
        }),
        this.prizeArea = this.blocks.reduce(function(f, d, h) {
            var x = f.x
              , y = f.y
              , m = f.w
              , E = f.h
              , g = rM(d, i.getLength.bind(i))
              , p = g[0]
              , v = g[1]
              , _ = g[2]
              , b = g[3]
              , C = d.borderRadius ? i.getLength(d.borderRadius) : 0
              , B = d.background;
            return Ws(B) && (a.fillStyle = i.handleBackground(x, y, m, E, B),
            Zx(a, x, y, m, E, C),
            a.fill()),
            d.imgs && d.imgs.forEach(function(T, A) {
                var w = i.ImageCache.get(T.src);
                if (w) {
                    var S = i.computedWidthAndHeight(w, T, m, E)
                      , D = S[0]
                      , F = S[1]
                      , R = [i.getOffsetX(D, m) + i.getLength(T.left, m), i.getLength(T.top, E)]
                      , P = R[0]
                      , N = R[1];
                    i.drawImage(a, w, x + P, y + N, D, F)
                }
            }),
            {
                x: x + _,
                y: y + p,
                w: m - _ - b,
                h: E - p - v
            }
        }, {
            x: 0,
            y: 0,
            w: this.boxWidth,
            h: this.boxHeight
        }),
        this.cellWidth = (this.prizeArea.w - l.gutter * (this.cols - 1)) / this.cols,
        this.cellHeight = (this.prizeArea.h - l.gutter * (this.rows - 1)) / this.rows,
        this.cells.forEach(function(f, d) {
            var h = i.getGeometricProperty([f.x, f.y, f.col, f.row])
              , x = h[0]
              , y = h[1]
              , m = h[2]
              , E = h[3]
              , g = !1;
            (i.prizeFlag === void 0 || i.prizeFlag > -1) && (g = d === i.currIndex % i.prizes.length >> 0);
            var p = g ? u.background : f.background || c.background;
            if (Ws(p)) {
                var v = (g ? u.shadow : f.shadow || c.shadow).replace(/px/g, "").split(",")[0].split(" ").map(function(b, C) {
                    return C < 3 ? Number(b) : b
                });
                v.length === 4 && (a.shadowColor = v[3],
                a.shadowOffsetX = v[0] * s.dpr,
                a.shadowOffsetY = v[1] * s.dpr,
                a.shadowBlur = v[2],
                v[0] > 0 ? m -= v[0] : (m += v[0],
                x -= v[0]),
                v[1] > 0 ? E -= v[1] : (E += v[1],
                y -= v[1])),
                a.fillStyle = i.handleBackground(x, y, m, E, p);
                var _ = i.getLength(f.borderRadius ? f.borderRadius : c.borderRadius);
                Zx(a, x, y, m, E, _),
                a.fill(),
                a.shadowColor = "rgba(0, 0, 0, 0)",
                a.shadowOffsetX = 0,
                a.shadowOffsetY = 0,
                a.shadowBlur = 0
            }
            d >= i.prizes.length && (d -= i.prizes.length),
            f.imgs && f.imgs.forEach(function(b, C) {
                var B = i.ImageCache.get(b.src)
                  , T = i.ImageCache.get(b.activeSrc);
                if (B) {
                    var A = g && T || B;
                    if (A) {
                        var w = i.computedWidthAndHeight(A, b, m, E)
                          , S = w[0]
                          , D = w[1]
                          , F = [x + i.getOffsetX(S, m) + i.getLength(b.left, m), y + i.getLength(b.top, E)]
                          , R = F[0]
                          , P = F[1];
                        i.drawImage(a, A, R, P, S, D)
                    }
                }
            }),
            f.fonts && f.fonts.forEach(function(b) {
                var C = g && u.fontStyle ? u.fontStyle : b.fontStyle || c.fontStyle
                  , B = g && u.fontWeight ? u.fontWeight : b.fontWeight || c.fontWeight
                  , T = g && u.fontSize ? i.getLength(u.fontSize) : i.getLength(b.fontSize || c.fontSize)
                  , A = g && u.lineHeight ? u.lineHeight : b.lineHeight || c.lineHeight || b.fontSize || c.fontSize
                  , w = uu(b, "wordWrap") ? b.wordWrap : c.wordWrap
                  , S = b.lengthLimit || c.lengthLimit
                  , D = b.lineClamp || c.lineClamp;
                a.font = B + " " + (T >> 0) + "px " + C,
                a.fillStyle = g && u.fontColor ? u.fontColor : b.fontColor || c.fontColor;
                var F = []
                  , R = String(b.text);
                if (w) {
                    var P = i.getLength(S, m);
                    F = gC(a, pC(R), function() {
                        return P
                    }, D)
                } else
                    F = R.split(`
`);
                F.forEach(function(N, j) {
                    a.fillText(N, x + i.getOffsetX(a.measureText(N).width, m) + i.getLength(b.left, m), y + i.getLength(b.top, E) + (j + 1) * i.getLength(A))
                })
            })
        }),
        (n = s.afterDraw) === null || n === void 0 || n.call(this, a)
    }
    ,
    e.prototype.handleBackground = function(r, n, i, o, s) {
        var a = this.ctx;
        return s.includes("linear-gradient") && (s = function(l, c, u, f, d, h) {
            var x = /linear-gradient\((.+)\)/.exec(h)[1].split(",").map(function(p) {
                return p.trim()
            })
              , y = x.shift()
              , m = [0, 0, 0, 0];
            if (y.includes("deg")) {
                var E = function(p) {
                    return Math.tan(p / 180 * Math.PI)
                };
                (y = y.slice(0, -3) % 360) >= 0 && y < 45 ? m = [c, u + d, c + f, u + d - f * E(y - 0)] : y >= 45 && y < 90 ? m = [c, u + d, c + f - d * E(y - 45), u] : y >= 90 && y < 135 ? m = [c + f, u + d, c + f - d * E(y - 90), u] : y >= 135 && y < 180 ? m = [c + f, u + d, c, u + f * E(y - 135)] : y >= 180 && y < 225 ? m = [c + f, u, c, u + f * E(y - 180)] : y >= 225 && y < 270 ? m = [c + f, u, c + d * E(y - 225), u + d] : y >= 270 && y < 315 ? m = [c, u, c + d * E(y - 270), u + d] : y >= 315 && y < 360 && (m = [c, u, c + f, u + d - f * E(y - 315)])
            } else
                y.includes("top") ? m = [c, u + d, c, u] : y.includes("bottom") ? m = [c, u, c, u + d] : y.includes("left") ? m = [c + f, u, c, u] : y.includes("right") && (m = [c, u, c + f, u]);
            var g = l.createLinearGradient.apply(l, m.map(function(p) {
                return p >> 0
            }));
            return x.reduce(function(p, v, _) {
                var b = v.split(" ");
                return b.length === 1 ? p.addColorStop(_, b[0]) : b.length === 2 && p.addColorStop.apply(p, b),
                p
            }, g)
        }(a, r, n, i, o, s)),
        s
    }
    ,
    e.prototype.carveOnGunwaleOfAMovingBoat = function() {
        var r = this
          , n = r._defaultConfig
          , i = r.prizeFlag
          , o = r.currIndex;
        this.endTime = Date.now();
        for (var s = this.stopIndex = o, a = n.speed, l = 0, c = 0, u = 0; ++l; ) {
            var f = this.prizes.length * l + i - s
              , d = fu(this.FPS, s, f, n.decelerationTime) - s;
            if (d > a) {
                this.endIndex = a - c > d - a ? f : u;
                break
            }
            u = f,
            c = d
        }
    }
    ,
    e.prototype.play = function() {
        var r, n;
        this.step === 0 && (this.startTime = Date.now(),
        this.prizeFlag = void 0,
        this.step = 1,
        (n = (r = this.config).afterStart) === null || n === void 0 || n.call(r),
        this.run())
    }
    ,
    e.prototype.stop = function(r) {
        if (this.step !== 0 && this.step !== 3) {
            if (!r && r !== 0) {
                var n = this.prizes.map(function(i) {
                    return i.range
                });
                r = nM(n)
            }
            r < 0 ? (this.step = 0,
            this.prizeFlag = -1) : (this.step = 2,
            this.prizeFlag = r % this.prizes.length)
        }
    }
    ,
    e.prototype.run = function(r) {
        var n;
        r === void 0 && (r = 0);
        var i = this
          , o = i.rAF
          , s = i.step
          , a = i.prizes
          , l = i.prizeFlag
          , c = i._defaultConfig
          , u = c.accelerationTime
          , f = c.decelerationTime
          , d = c.speed;
        if (s !== 0) {
            if (l !== -1) {
                s !== 3 || this.endIndex || this.carveOnGunwaleOfAMovingBoat();
                var h = Date.now() - this.startTime
                  , x = Date.now() - this.endTime
                  , y = this.currIndex;
                if (s === 1 || h < u) {
                    this.FPS = h / r;
                    var m = vC(h, .1, d - .1, u);
                    m === d && (this.step = 2),
                    y += m % a.length
                } else
                    s === 2 ? (y += d % a.length,
                    l !== void 0 && l >= 0 && (this.step = 3,
                    this.stopIndex = 0,
                    this.endIndex = 0)) : s === 3 ? (y = fu(x, this.stopIndex, this.endIndex, f),
                    x >= f && (this.step = 0)) : this.stop(-1);
                this.currIndex = y,
                this.draw(),
                o(this.run.bind(this, r + 1))
            }
        } else
            (n = this.endCallback) === null || n === void 0 || n.call(this, this.prizes.find(function(E, g) {
                return g === l
            }) || {})
    }
    ,
    e.prototype.getGeometricProperty = function(r) {
        var n = r[0]
          , i = r[1]
          , o = r[2]
          , s = o === void 0 ? 1 : o
          , a = r[3]
          , l = a === void 0 ? 1 : a
          , c = this.cellWidth
          , u = this.cellHeight
          , f = this._defaultConfig.gutter
          , d = [this.prizeArea.x + (c + f) * n, this.prizeArea.y + (u + f) * i];
        return s && l && d.push(c * s + f * (s - 1), u * l + f * (l - 1)),
        d
    }
    ,
    e.prototype.conversionAxis = function(r, n) {
        var i = this.config;
        return [r / i.dpr, n / i.dpr]
    }
    ,
    e
}(mC)
  , N_e = function(t) {
    function e(r, n) {
        var i, o = t.call(this, r, {
            width: n.width,
            height: n.height
        }) || this;
        return o.blocks = [],
        o.prizes = [],
        o.slots = [],
        o.defaultConfig = {},
        o._defaultConfig = {},
        o.defaultStyle = {},
        o._defaultStyle = {},
        o.endCallback = function() {}
        ,
        o.cellWidth = 0,
        o.cellHeight = 0,
        o.cellAndSpacing = 0,
        o.widthAndSpacing = 0,
        o.heightAndSpacing = 0,
        o.FPS = 16.6,
        o.scroll = [],
        o.stopScroll = [],
        o.endScroll = [],
        o.startTime = 0,
        o.endTime = 0,
        o.step = 0,
        o.prizeFlag = void 0,
        o.ImageCache = new Map,
        o.initData(n),
        o.initWatch(),
        o.initComputed(),
        (i = r.beforeCreate) === null || i === void 0 || i.call(o),
        o.init(),
        o
    }
    return xC(e, t),
    e.prototype.resize = function() {
        var r, n;
        t.prototype.resize.call(this),
        this.draw(),
        (n = (r = this.config).afterResize) === null || n === void 0 || n.call(r)
    }
    ,
    e.prototype.initLucky = function() {
        this.cellWidth = 0,
        this.cellHeight = 0,
        this.cellAndSpacing = 0,
        this.widthAndSpacing = 0,
        this.heightAndSpacing = 0,
        this.FPS = 16.6,
        this.scroll = [],
        this.stopScroll = [],
        this.endScroll = [],
        this.startTime = 0,
        this.endTime = 0,
        this.prizeFlag = void 0,
        this.step = 0,
        t.prototype.initLucky.call(this)
    }
    ,
    e.prototype.initData = function(r) {
        this.$set(this, "width", r.width || "300px"),
        this.$set(this, "height", r.height || "300px"),
        this.$set(this, "blocks", r.blocks || []),
        this.$set(this, "prizes", r.prizes || []),
        this.$set(this, "slots", r.slots || []),
        this.$set(this, "defaultConfig", r.defaultConfig || {}),
        this.$set(this, "defaultStyle", r.defaultStyle || {}),
        this.$set(this, "endCallback", r.end)
    }
    ,
    e.prototype.initComputed = function() {
        var r = this;
        this.$computed(this, "_defaultConfig", function() {
            var n = is({
                mode: "vertical",
                rowSpacing: 0,
                colSpacing: 5,
                speed: 20,
                direction: 1,
                accelerationTime: 2500,
                decelerationTime: 2500
            }, r.defaultConfig);
            return n.rowSpacing = r.getLength(n.rowSpacing),
            n.colSpacing = r.getLength(n.colSpacing),
            n
        }),
        this.$computed(this, "_defaultStyle", function() {
            return is({
                borderRadius: 0,
                fontColor: "#000",
                fontSize: "18px",
                fontStyle: "sans-serif",
                fontWeight: "400",
                background: "rgba(0,0,0,0)",
                wordWrap: !0,
                lengthLimit: "90%"
            }, r.defaultStyle)
        })
    }
    ,
    e.prototype.initWatch = function() {
        var r = this;
        this.$watch("width", function(n) {
            r.data.width = n,
            r.resize()
        }),
        this.$watch("height", function(n) {
            r.data.height = n,
            r.resize()
        }),
        this.$watch("blocks", function(n) {
            r.initImageCache()
        }, {
            deep: !0
        }),
        this.$watch("prizes", function(n) {
            r.initImageCache()
        }, {
            deep: !0
        }),
        this.$watch("slots", function(n) {
            r.drawOffscreenCanvas(),
            r.draw()
        }, {
            deep: !0
        }),
        this.$watch("defaultConfig", function() {
            return r.draw()
        }, {
            deep: !0
        }),
        this.$watch("defaultStyle", function() {
            return r.draw()
        }, {
            deep: !0
        }),
        this.$watch("endCallback", function() {
            return r.init()
        })
    }
    ,
    e.prototype.init = function() {
        var r, n;
        return os(this, void 0, void 0, function() {
            var i;
            return ss(this, function(o) {
                switch (o.label) {
                case 0:
                    return this.initLucky(),
                    i = this.config,
                    (r = i.beforeInit) === null || r === void 0 || r.call(this),
                    this.drawOffscreenCanvas(),
                    this.draw(),
                    [4, this.initImageCache()];
                case 1:
                    return o.sent(),
                    (n = i.afterInit) === null || n === void 0 || n.call(this),
                    [2]
                }
            })
        })
    }
    ,
    e.prototype.initImageCache = function() {
        var r = this;
        return new Promise(function(n) {
            var i = {
                blocks: r.blocks.map(function(o) {
                    return o.imgs
                }),
                prizes: r.prizes.map(function(o) {
                    return o.imgs
                })
            };
            Object.keys(i).forEach(function(o) {
                var s = i[o]
                  , a = [];
                s && s.forEach(function(l, c) {
                    l && l.forEach(function(u, f) {
                        a.push(r.loadAndCacheImg(o, c, f))
                    })
                }),
                Promise.all(a).then(function() {
                    r.drawOffscreenCanvas(),
                    r.draw(),
                    n()
                })
            })
        }
        )
    }
    ,
    e.prototype.loadAndCacheImg = function(r, n, i) {
        return os(this, void 0, void 0, function() {
            var o = this;
            return ss(this, function(s) {
                return [2, new Promise(function(a, l) {
                    var c = o[r][n];
                    if (c && c.imgs) {
                        var u = c.imgs[i];
                        u && o.loadImg(u.src, u).then(function(f) {
                            return os(o, void 0, void 0, function() {
                                return ss(this, function(d) {
                                    switch (d.label) {
                                    case 0:
                                        return typeof u.formatter != "function" ? [3, 2] : [4, Promise.resolve(u.formatter.call(this, f))];
                                    case 1:
                                        f = d.sent(),
                                        d.label = 2;
                                    case 2:
                                        return this.ImageCache.set(u.src, f),
                                        a(),
                                        [2]
                                    }
                                })
                            })
                        }).catch(function(f) {
                            console.error(r + "[" + n + "].imgs[" + i + "] " + f),
                            l()
                        })
                    }
                }
                )]
            })
        })
    }
    ,
    e.prototype.drawOffscreenCanvas = function() {
        var r = this
          , n = this._defaultConfig
          , i = this._defaultStyle
          , o = this.drawBlocks()
          , s = o.w
          , a = o.h
          , l = this.prizes.length
          , c = this.displacementWidthOrHeight()
          , u = c.cellWidth
          , f = c.cellHeight
          , d = c.widthAndSpacing
          , h = c.heightAndSpacing
          , x = new Array(l).fill(void 0).map(function(v, _) {
            return _
        })
          , y = 0
          , m = 0;
        this.slots.forEach(function(v, _) {
            r.scroll[_] === void 0 && (r.scroll[_] = 0),
            v.order = v.order || x;
            var b = v.order.length;
            y = Math.max(y, s + d * b),
            m = Math.max(m, a + h * b)
        });
        var E = this.getOffscreenCanvas(y, m)
          , g = E._offscreenCanvas
          , p = E._ctx;
        this._offscreenCanvas = g,
        this.slots.forEach(function(v, _) {
            var b = u * _
              , C = f * _
              , B = 0
              , T = function(K, oe) {
                for (var U = {}, $ = [], V = 0; V < K.length; V++)
                    U[V] = K[V];
                for (V = 0; V < oe.length; V++) {
                    var W = U[oe[V]];
                    W && ($[V] = W)
                }
                return $
            }(r.prizes, v.order);
            if (T.length) {
                T.forEach(function(K, oe) {
                    if (K) {
                        v.order[oe];
                        var U = d * oe + n.colSpacing / 2
                          , $ = h * oe + n.rowSpacing / 2
                          , V = r.displacement([b, $, h], [U, C, d])
                          , W = V[0]
                          , H = V[1]
                          , Q = V[2];
                        B += Q;
                        var G = K.background || i.background;
                        if (Ws(G)) {
                            var re = r.getLength(uu(K, "borderRadius") ? K.borderRadius : i.borderRadius);
                            Zx(p, W, H, u, u, re),
                            p.fillStyle = G,
                            p.fill()
                        }
                        K.imgs && K.imgs.forEach(function(te, he) {
                            var xe = r.ImageCache.get(te.src);
                            if (xe) {
                                var ve = r.computedWidthAndHeight(xe, te, u, f)
                                  , I = ve[0]
                                  , z = ve[1]
                                  , q = [W + r.getOffsetX(I, u) + r.getLength(te.left, u), H + r.getLength(te.top, f)]
                                  , ce = q[0]
                                  , fe = q[1];
                                r.drawImage(p, xe, ce, fe, I, z)
                            }
                        }),
                        K.fonts && K.fonts.forEach(function(te) {
                            var he = te.fontStyle || i.fontStyle
                              , xe = te.fontWeight || i.fontWeight
                              , ve = r.getLength(te.fontSize || i.fontSize)
                              , I = te.lineHeight || i.lineHeight || te.fontSize || i.fontSize
                              , z = uu(te, "wordWrap") ? te.wordWrap : i.wordWrap
                              , q = te.lengthLimit || i.lengthLimit
                              , ce = te.lineClamp || i.lineClamp;
                            p.font = xe + " " + (ve >> 0) + "px " + he,
                            p.fillStyle = te.fontColor || i.fontColor;
                            var fe = []
                              , k = String(te.text);
                            if (z) {
                                var L = r.getLength(q, u);
                                fe = gC(p, pC(k), function() {
                                    return L
                                }, ce)
                            } else
                                fe = k.split(`
`);
                            fe.forEach(function(Y, ee) {
                                p.fillText(Y, W + r.getOffsetX(p.measureText(Y).width, u) + r.getLength(te.left, u), H + r.getLength(te.top, f) + (ee + 1) * r.getLength(I))
                            })
                        })
                    }
                });
                for (var A = r.displacement([b, 0, u, B], [0, C, B, f]), w = A[0], S = A[1], D = A[2], F = A[3], R = B; R < m + B; ) {
                    var P = r.displacement([w, R], [R, S])
                      , N = P[0]
                      , j = P[1];
                    r.drawImage(p, g, w, S, D, F, N, j, D, F),
                    R += B
                }
            }
        })
    }
    ,
    e.prototype.drawBlocks = function() {
        var r = this
          , n = this;
        n.config;
        var i = n.ctx;
        n._defaultConfig;
        var o = n._defaultStyle;
        return this.prizeArea = this.blocks.reduce(function(s, a, l) {
            var c = s.x
              , u = s.y
              , f = s.w
              , d = s.h
              , h = rM(a, r.getLength.bind(r))
              , x = h[0]
              , y = h[1]
              , m = h[2]
              , E = h[3]
              , g = a.borderRadius ? r.getLength(a.borderRadius) : 0
              , p = a.background || o.background;
            return Ws(p) && (Zx(i, c, u, f, d, g),
            i.fillStyle = p,
            i.fill()),
            a.imgs && a.imgs.forEach(function(v, _) {
                var b = r.ImageCache.get(v.src);
                if (b) {
                    var C = r.computedWidthAndHeight(b, v, f, d)
                      , B = C[0]
                      , T = C[1]
                      , A = [r.getOffsetX(B, f) + r.getLength(v.left, f), r.getLength(v.top, d)]
                      , w = A[0]
                      , S = A[1];
                    r.drawImage(i, b, c + w, u + S, B, T)
                }
            }),
            {
                x: c + m,
                y: u + x,
                w: f - m - E,
                h: d - x - y
            }
        }, {
            x: 0,
            y: 0,
            w: this.boxWidth,
            h: this.boxHeight
        })
    }
    ,
    e.prototype.draw = function() {
        var r, n = this, i = this, o = i.config, s = i.ctx;
        i._defaultConfig,
        i._defaultStyle,
        (r = o.beforeDraw) === null || r === void 0 || r.call(this, s),
        s.clearRect(0, 0, this.boxWidth, this.boxHeight);
        var a = this.drawBlocks()
          , l = a.x
          , c = a.y
          , u = a.w
          , f = a.h;
        if (this._offscreenCanvas) {
            var d = this
              , h = d.cellWidth
              , x = d.cellHeight
              , y = d.cellAndSpacing
              , m = d.widthAndSpacing
              , E = d.heightAndSpacing;
            this.slots.forEach(function(g, p) {
                var v = y * g.order.length
                  , _ = n.displacement(-(f - E) / 2, -(u - m) / 2)
                  , b = n.scroll[p] + _;
                b < 0 && (b = b % v + v),
                b > v && (b %= v);
                var C = n.displacement([h * p, b, h, f], [b, x * p, u, x])
                  , B = C[0]
                  , T = C[1]
                  , A = C[2]
                  , w = C[3]
                  , S = n.displacement([l + m * p, c, h, f], [l, c + E * p, u, x])
                  , D = S[0]
                  , F = S[1]
                  , R = S[2]
                  , P = S[3];
                n.drawImage(s, n._offscreenCanvas, B, T, A, w, D, F, R, P)
            })
        }
    }
    ,
    e.prototype.carveOnGunwaleOfAMovingBoat = function() {
        var r = this
          , n = this
          , i = n._defaultConfig
          , o = n.prizeFlag
          , s = n.cellAndSpacing;
        this.endTime = Date.now(),
        this.slots.forEach(function(a, l) {
            var c = a.order;
            if (c.length)
                for (var u = a.speed || i.speed, f = a.direction || i.direction, d = c.findIndex(function(g) {
                    return g === o[l]
                }), h = s * c.length, x = r.stopScroll[l] = r.scroll[l], y = 0; ++y; ) {
                    var m = s * d + h * y * f - x
                      , E = fu(r.FPS, x, m, i.decelerationTime) - x;
                    if (Math.abs(E) > u) {
                        r.endScroll[l] = m;
                        break
                    }
                }
        })
    }
    ,
    e.prototype.play = function() {
        var r, n;
        this.step === 0 && (this.startTime = Date.now(),
        this.prizeFlag = void 0,
        this.step = 1,
        (n = (r = this.config).afterStart) === null || n === void 0 || n.call(r),
        this.run())
    }
    ,
    e.prototype.stop = function(r) {
        var n;
        if (this.step !== 0 && this.step !== 3) {
            if (typeof r == "number")
                this.prizeFlag = new Array(this.slots.length).fill(r);
            else {
                if (!If(r, "array"))
                    return this.stop(-1),
                    console.error("stop() 无法识别的参数类型 " + typeof r);
                if (r.length !== this.slots.length)
                    return this.stop(-1),
                    console.error("stop([" + r + "]) 参数长度的不正确");
                this.prizeFlag = r
            }
            !((n = this.prizeFlag) === null || n === void 0) && n.includes(-1) ? (this.prizeFlag = [],
            this.step = 0) : this.step = 2
        }
    }
    ,
    e.prototype.run = function(r) {
        var n, i, o = this;
        r === void 0 && (r = 0);
        var s = this
          , a = s.rAF
          , l = s.step
          , c = s.prizeFlag
          , u = s._defaultConfig
          , f = s.cellAndSpacing
          , d = s.slots
          , h = u.accelerationTime
          , x = u.decelerationTime;
        if (this.step !== 0 || (c == null ? void 0 : c.length) !== d.length) {
            if (c === void 0 || c.length) {
                this.step !== 3 || this.endScroll.length || this.carveOnGunwaleOfAMovingBoat();
                var y = Date.now() - this.startTime
                  , m = Date.now() - this.endTime;
                d.forEach(function(_, b) {
                    var C = _.order;
                    if (C && C.length) {
                        var B = f * C.length
                          , T = Math.abs(_.speed || u.speed)
                          , A = _.direction || u.direction
                          , w = 0
                          , S = o.scroll[b];
                        if (l === 1 || y < h) {
                            o.FPS = y / r;
                            var D = vC(y, 0, T, h);
                            D === T && (o.step = 2),
                            w = (S + D * A) % B
                        } else if (l === 2)
                            w = (S + T * A) % B,
                            (c == null ? void 0 : c.length) === d.length && (o.step = 3,
                            o.stopScroll = [],
                            o.endScroll = []);
                        else if (l === 3 && m) {
                            var F = o.stopScroll[b]
                              , R = o.endScroll[b];
                            w = fu(m, F, R, x),
                            m >= x && (o.step = 0)
                        }
                        o.scroll[b] = w
                    }
                }),
                this.draw(),
                a(this.run.bind(this, r + 1))
            }
        } else {
            for (var E = c[0], g = 0; g < d.length; g++) {
                var p = d[g]
                  , v = c[g];
                if (!(!((n = p.order) === null || n === void 0) && n.includes(v)) || E !== v) {
                    E = -1;
                    break
                }
            }
            (i = this.endCallback) === null || i === void 0 || i.call(this, this.prizes.find(function(_, b) {
                return b === E
            }) || void 0)
        }
    }
    ,
    e.prototype.displacement = function(r, n) {
        return this._defaultConfig.mode === "horizontal" ? n : r
    }
    ,
    e.prototype.displacementWidthOrHeight = function() {
        var r = this._defaultConfig.mode
          , n = this.slots.length
          , i = this._defaultConfig
          , o = i.colSpacing
          , s = i.rowSpacing
          , a = this.prizeArea || this.drawBlocks();
        a.x,
        a.y;
        var l, c, u = a.w, f = a.h, d = 0, h = 0;
        return r === "horizontal" ? (h = this.cellHeight = (f - s * (n - 1)) / n,
        d = this.cellWidth = h) : (d = this.cellWidth = (u - o * (n - 1)) / n,
        h = this.cellHeight = d),
        l = this.widthAndSpacing = this.cellWidth + o,
        c = this.heightAndSpacing = this.cellHeight + s,
        this.cellAndSpacing = r === "horizontal" ? l : c,
        {
            cellWidth: d,
            cellHeight: h,
            widthAndSpacing: l,
            heightAndSpacing: c
        }
    }
    ,
    e
}(mC)
  , yC = function(t, e, r) {
    e === void 0 && (e = {});
    var n = e.props
      , i = e.domProps
      , o = e.on
      , s = function(c, u) {
        var f = {};
        for (var d in c)
            Object.prototype.hasOwnProperty.call(c, d) && u.indexOf(d) < 0 && (f[d] = c[d]);
        if (c != null && typeof Object.getOwnPropertySymbols == "function") {
            var h = 0;
            for (d = Object.getOwnPropertySymbols(c); h < d.length; h++)
                u.indexOf(d[h]) < 0 && Object.prototype.propertyIsEnumerable.call(c, d[h]) && (f[d[h]] = c[d[h]])
        }
        return f
    }(e, ["props", "domProps", "on"])
      , a = function(c) {
        return c ? Object.entries(c).reduce(function(u, f) {
            var d, h = f[0], x = f[1];
            return h = "on" + (h = h.charAt(0).toUpperCase() + h.slice(1)),
            An(An({}, u), ((d = {})[h] = x,
            d))
        }, {}) : null
    }(o)
      , l = An(An(An(An({}, s), n), i), a);
    return Or(t, l, r)
}
  , EC = "@lucky-canvas/vue"
  , L_e = be({
    name: "LuckyWheel",
    props: {
        width: {
            type: [String, Number]
        },
        height: {
            type: [String, Number]
        },
        blocks: {
            type: Array,
            default: function() {
                return []
            }
        },
        prizes: {
            type: Array,
            default: function() {
                return []
            }
        },
        buttons: {
            type: Array,
            default: function() {
                return []
            }
        },
        defaultStyle: {
            type: Object,
            default: function() {
                return {}
            }
        },
        defaultConfig: {
            type: Object,
            default: function() {
                return {}
            }
        }
    },
    emits: ["start", "end", "success", "error", "finally"],
    watch: {
        blocks: function(t, e) {
            this.lucky && (this.lucky.blocks = t)
        },
        prizes: function(t, e) {
            this.lucky && (this.lucky.prizes = t)
        },
        buttons: function(t, e) {
            this.lucky && (this.lucky.buttons = t)
        }
    },
    data: function() {
        return {
            lucky: null
        }
    },
    mounted: function() {
        this.$refs.myLucky && this.$refs.myLucky.setAttribute("package", EC + "@0.1.11");
        try {
            this.initLucky(),
            this.$emit("success")
        } catch (t) {
            this.$emit("error", t)
        } finally {
            this.$emit("finally")
        }
    },
    methods: {
        initLucky: function() {
            var t = this;
            this.lucky = new R_e({
                flag: "WEB",
                width: String(this.width),
                height: String(this.height),
                divElement: this.$refs.myLucky,
                rAF: window.requestAnimationFrame,
                setTimeout: window.setTimeout,
                setInterval: window.setInterval,
                clearTimeout: window.clearTimeout,
                clearInterval: window.clearInterval
            },An(An({}, this.$props), {
                start: function(e) {
                    t.$emit("start", e)
                },
                end: function(e) {
                    t.$emit("end", e)
                }
            }))
        },
        init: function() {
            this.lucky && this.lucky.init()
        },
        play: function() {
            var t;
            (t = this.lucky) === null || t === void 0 || t.play()
        },
        stop: function(t) {
            var e;
            (e = this.lucky) === null || e === void 0 || e.stop(t)
        }
    },
    render: function() {
        return yC("div", {
            ref: "myLucky"
        })
    }
})
  , $_e = be({
    name: "LuckyGrid",
    props: {
        width: {
            type: [String, Number]
        },
        height: {
            type: [String, Number]
        },
        cols: {
            type: [String, Number],
            default: 3
        },
        rows: {
            type: [String, Number],
            default: 3
        },
        blocks: {
            type: Array,
            default: function() {
                return []
            }
        },
        prizes: {
            type: Array,
            default: function() {
                return []
            }
        },
        buttons: {
            type: Array,
            default: function() {
                return []
            }
        },
        button: {
            type: Object
        },
        defaultStyle: {
            type: Object,
            default: function() {
                return {}
            }
        },
        activeStyle: {
            type: Object,
            default: function() {
                return {}
            }
        },
        defaultConfig: {
            type: Object,
            default: function() {
                return {}
            }
        }
    },
    emits: ["start", "end", "success", "error", "finally"],
    watch: {
        cols: function(t, e) {
            this.lucky && (this.lucky.cols = t)
        },
        rows: function(t, e) {
            this.lucky && (this.lucky.rows = t)
        },
        blocks: function(t, e) {
            this.lucky && (this.lucky.blocks = t)
        },
        prizes: function(t, e) {
            this.lucky && (this.lucky.prizes = t)
        },
        buttons: function(t, e) {
            this.lucky && (this.lucky.buttons = t)
        },
        button: function(t, e) {
            this.lucky && (this.lucky.button = t)
        }
    },
    data: function() {
        return {
            lucky: null
        }
    },
    mounted: function() {
        this.$refs.myLucky && this.$refs.myLucky.setAttribute("package", EC + "@0.1.11");
        try {
            this.initLucky(),
            this.$emit("success")
        } catch (t) {
            this.$emit("error", t)
        } finally {
            this.$emit("finally")
        }
    },
    methods: {
        initLucky: function() {
            var t = this;
            this.lucky = new M_e({
                flag: "WEB",
                width: String(this.width),
                height: String(this.height),
                divElement: this.$refs.myLucky,
                rAF: window.requestAnimationFrame,
                setTimeout: window.setTimeout,
                setInterval: window.setInterval,
                clearTimeout: window.clearTimeout,
                clearInterval: window.clearInterval
            },An(An({}, this.$props), {
                start: function(e, r) {
                    t.$emit("start", e, r)
                },
                end: function(e) {
                    t.$emit("end", e)
                }
            }))
        },
        init: function() {
            this.lucky && this.lucky.init()
        },
        play: function() {
            var t;
            (t = this.lucky) === null || t === void 0 || t.play()
        },
        stop: function(t) {
            var e;
            (e = this.lucky) === null || e === void 0 || e.stop(t)
        }
    },
    render: function() {
        return yC("div", {
            ref: "myLucky"
        })
    }
})
  , U_e = be({
    name: "SlotMachine",
    props: {
        width: {
            type: [String, Number]
        },
        height: {
            type: [String, Number]
        },
        blocks: {
            type: Array,
            default: function() {
                return []
            }
        },
        prizes: {
            type: Array,
            default: function() {
                return []
            }
        },
        slots: {
            type: Array,
            default: function() {
                return []
            }
        },
        defaultStyle: {
            type: Object,
            default: function() {
                return {}
            }
        },
        defaultConfig: {
            type: Object,
            default: function() {
                return {}
            }
        }
    },
    watch: {
        blocks: function(t, e) {
            this.lucky && (this.lucky.blocks = t)
        },
        slots: function(t, e) {
            this.lucky && (this.lucky.slots = t)
        },
        prizes: function(t, e) {
            this.lucky && (this.lucky.prizes = t)
        }
    },
    data: function() {
        return {
            lucky: null
        }
    },
    mounted: function() {
        this.$refs.myLucky && this.$refs.myLucky.setAttribute("package", EC + "@0.1.11");
        try {
            this.initLucky(),
            this.$emit("success")
        } catch (t) {
            this.$emit("error", t)
        } finally {
            this.$emit("finally")
        }
    },
    methods: {
        initLucky: function() {
            var t = this;
            this.lucky = new N_e({
                flag: "WEB",
                width: String(this.width),
                height: String(this.height),
                divElement: this.$refs.myLucky,
                rAF: window.requestAnimationFrame,
                setTimeout: window.setTimeout,
                setInterval: window.setInterval,
                clearTimeout: window.clearTimeout,
                clearInterval: window.clearInterval
            },An(An({}, this.$props), {
                start: function(e) {
                    t.$emit("start", e)
                },
                end: function(e) {
                    t.$emit("end", e)
                }
            }))
        },
        init: function() {
            this.lucky && this.lucky.init()
        },
        play: function() {
            var t;
            (t = this.lucky) === null || t === void 0 || t.play()
        },
        stop: function(t) {
            var e;
            (e = this.lucky) === null || e === void 0 || e.stop(t)
        }
    },
    render: function() {
        return yC("div", {
            ref: "myLucky"
        })
    }
})
  , G_e = function(t) {
    t.component("LuckyWheel", L_e),
    t.component("LuckyGrid", $_e),
    t.component("SlotMachine", U_e)
};
typeof window < "u" && window.Vue && tM && G_e(window.Vue);
function H_e(t, e) {
    var r = Object.setPrototypeOf;
    r ? r(t, e) : t.__proto__ = e
}
function V_e(t, e) {
    e === void 0 && (e = t.constructor);
    var r = Error.captureStackTrace;
    r && r(t, e)
}
var z_e = function() {
    var t = function(r, n) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(i, o) {
            i.__proto__ = o
        }
        || function(i, o) {
            for (var s in o)
                Object.prototype.hasOwnProperty.call(o, s) && (i[s] = o[s])
        }
        ,
        t(r, n)
    };
    return function(e, r) {
        if (typeof r != "function" && r !== null)
            throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), j_e = function(t) {
    z_e(e, t);
    function e(r, n) {
        var i = this.constructor
          , o = t.call(this, r, n) || this;
        return Object.defineProperty(o, "name", {
            value: i.name,
            enumerable: !1,
            configurable: !0
        }),
        H_e(o, i.prototype),
        V_e(o),
        o
    }
    return e
}(Error), W_e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), Mn = function(t) {
    W_e(e, t);
    function e(r) {
        r === void 0 && (r = void 0);
        var n = t.call(this, r) || this;
        return n.message = r,
        n
    }
    return e.prototype.getKind = function() {
        var r = this.constructor;
        return r.kind
    }
    ,
    e.kind = "Exception",
    e
}(j_e), Y_e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), ir = function(t) {
    Y_e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "ArgumentException",
    e
}(Mn), X_e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), Me = function(t) {
    X_e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "IllegalArgumentException",
    e
}(Mn), sM = function() {
    function t(e) {
        if (this.binarizer = e,
        e === null)
            throw new Me("Binarizer must be non-null.")
    }
    return t.prototype.getWidth = function() {
        return this.binarizer.getWidth()
    }
    ,
    t.prototype.getHeight = function() {
        return this.binarizer.getHeight()
    }
    ,
    t.prototype.getBlackRow = function(e, r) {
        return this.binarizer.getBlackRow(e, r)
    }
    ,
    t.prototype.getBlackMatrix = function() {
        return (this.matrix === null || this.matrix === void 0) && (this.matrix = this.binarizer.getBlackMatrix()),
        this.matrix
    }
    ,
    t.prototype.isCropSupported = function() {
        return this.binarizer.getLuminanceSource().isCropSupported()
    }
    ,
    t.prototype.crop = function(e, r, n, i) {
        var o = this.binarizer.getLuminanceSource().crop(e, r, n, i);
        return new t(this.binarizer.createBinarizer(o))
    }
    ,
    t.prototype.isRotateSupported = function() {
        return this.binarizer.getLuminanceSource().isRotateSupported()
    }
    ,
    t.prototype.rotateCounterClockwise = function() {
        var e = this.binarizer.getLuminanceSource().rotateCounterClockwise();
        return new t(this.binarizer.createBinarizer(e))
    }
    ,
    t.prototype.rotateCounterClockwise45 = function() {
        var e = this.binarizer.getLuminanceSource().rotateCounterClockwise45();
        return new t(this.binarizer.createBinarizer(e))
    }
    ,
    t.prototype.toString = function() {
        try {
            return this.getBlackMatrix().toString()
        } catch {
            return ""
        }
    }
    ,
    t
}(), K_e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), fr = function(t) {
    K_e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.getChecksumInstance = function() {
        return new e
    }
    ,
    e.kind = "ChecksumException",
    e
}(Mn), q_e = function() {
    function t(e) {
        this.source = e
    }
    return t.prototype.getLuminanceSource = function() {
        return this.source
    }
    ,
    t.prototype.getWidth = function() {
        return this.source.getWidth()
    }
    ,
    t.prototype.getHeight = function() {
        return this.source.getHeight()
    }
    ,
    t
}(), Dt = function() {
    function t() {}
    return t.arraycopy = function(e, r, n, i, o) {
        for (; o--; )
            n[i++] = e[r++]
    }
    ,
    t.currentTimeMillis = function() {
        return Date.now()
    }
    ,
    t
}(), Z_e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), _C = function(t) {
    Z_e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "IndexOutOfBoundsException",
    e
}(Mn), J_e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), X4 = function(t) {
    J_e(e, t);
    function e(r, n) {
        r === void 0 && (r = void 0),
        n === void 0 && (n = void 0);
        var i = t.call(this, n) || this;
        return i.index = r,
        i.message = n,
        i
    }
    return e.kind = "ArrayIndexOutOfBoundsException",
    e
}(_C), Q_e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, br = function() {
    function t() {}
    return t.fill = function(e, r) {
        for (var n = 0, i = e.length; n < i; n++)
            e[n] = r
    }
    ,
    t.fillWithin = function(e, r, n, i) {
        t.rangeCheck(e.length, r, n);
        for (var o = r; o < n; o++)
            e[o] = i
    }
    ,
    t.rangeCheck = function(e, r, n) {
        if (r > n)
            throw new Me("fromIndex(" + r + ") > toIndex(" + n + ")");
        if (r < 0)
            throw new X4(r);
        if (n > e)
            throw new X4(n)
    }
    ,
    t.asList = function() {
        for (var e = [], r = 0; r < arguments.length; r++)
            e[r] = arguments[r];
        return e
    }
    ,
    t.create = function(e, r, n) {
        var i = Array.from({
            length: e
        });
        return i.map(function(o) {
            return Array.from({
                length: r
            }).fill(n)
        })
    }
    ,
    t.createInt32Array = function(e, r, n) {
        var i = Array.from({
            length: e
        });
        return i.map(function(o) {
            return Int32Array.from({
                length: r
            }).fill(n)
        })
    }
    ,
    t.equals = function(e, r) {
        if (!e || !r || !e.length || !r.length || e.length !== r.length)
            return !1;
        for (var n = 0, i = e.length; n < i; n++)
            if (e[n] !== r[n])
                return !1;
        return !0
    }
    ,
    t.hashCode = function(e) {
        var r, n;
        if (e === null)
            return 0;
        var i = 1;
        try {
            for (var o = Q_e(e), s = o.next(); !s.done; s = o.next()) {
                var a = s.value;
                i = 31 * i + a
            }
        } catch (l) {
            r = {
                error: l
            }
        } finally {
            try {
                s && !s.done && (n = o.return) && n.call(o)
            } finally {
                if (r)
                    throw r.error
            }
        }
        return i
    }
    ,
    t.fillUint8Array = function(e, r) {
        for (var n = 0; n !== e.length; n++)
            e[n] = r
    }
    ,
    t.copyOf = function(e, r) {
        return e.slice(0, r)
    }
    ,
    t.copyOfUint8Array = function(e, r) {
        if (e.length <= r) {
            var n = new Uint8Array(r);
            return n.set(e),
            n
        }
        return e.slice(0, r)
    }
    ,
    t.copyOfRange = function(e, r, n) {
        var i = n - r
          , o = new Int32Array(i);
        return Dt.arraycopy(e, r, o, 0, i),
        o
    }
    ,
    t.binarySearch = function(e, r, n) {
        n === void 0 && (n = t.numberComparator);
        for (var i = 0, o = e.length - 1; i <= o; ) {
            var s = o + i >> 1
              , a = n(r, e[s]);
            if (a > 0)
                i = s + 1;
            else if (a < 0)
                o = s - 1;
            else
                return s
        }
        return -i - 1
    }
    ,
    t.numberComparator = function(e, r) {
        return e - r
    }
    ,
    t
}(), qe = function() {
    function t() {}
    return t.numberOfTrailingZeros = function(e) {
        var r;
        if (e === 0)
            return 32;
        var n = 31;
        return r = e << 16,
        r !== 0 && (n -= 16,
        e = r),
        r = e << 8,
        r !== 0 && (n -= 8,
        e = r),
        r = e << 4,
        r !== 0 && (n -= 4,
        e = r),
        r = e << 2,
        r !== 0 && (n -= 2,
        e = r),
        n - (e << 1 >>> 31)
    }
    ,
    t.numberOfLeadingZeros = function(e) {
        if (e === 0)
            return 32;
        var r = 1;
        return e >>> 16 || (r += 16,
        e <<= 16),
        e >>> 24 || (r += 8,
        e <<= 8),
        e >>> 28 || (r += 4,
        e <<= 4),
        e >>> 30 || (r += 2,
        e <<= 2),
        r -= e >>> 31,
        r
    }
    ,
    t.toHexString = function(e) {
        return e.toString(16)
    }
    ,
    t.toBinaryString = function(e) {
        return String(parseInt(String(e), 2))
    }
    ,
    t.bitCount = function(e) {
        return e = e - (e >>> 1 & 1431655765),
        e = (e & 858993459) + (e >>> 2 & 858993459),
        e = e + (e >>> 4) & 252645135,
        e = e + (e >>> 8),
        e = e + (e >>> 16),
        e & 63
    }
    ,
    t.truncDivision = function(e, r) {
        return Math.trunc(e / r)
    }
    ,
    t.parseInt = function(e, r) {
        return r === void 0 && (r = void 0),
        parseInt(e, r)
    }
    ,
    t.MIN_VALUE_32_BITS = -2147483648,
    t.MAX_VALUE = Number.MAX_SAFE_INTEGER,
    t
}(), kr = function() {
    function t(e, r) {
        e === void 0 ? (this.size = 0,
        this.bits = new Int32Array(1)) : (this.size = e,
        r == null ? this.bits = t.makeArray(e) : this.bits = r)
    }
    return t.prototype.getSize = function() {
        return this.size
    }
    ,
    t.prototype.getSizeInBytes = function() {
        return Math.floor((this.size + 7) / 8)
    }
    ,
    t.prototype.ensureCapacity = function(e) {
        if (e > this.bits.length * 32) {
            var r = t.makeArray(e);
            Dt.arraycopy(this.bits, 0, r, 0, this.bits.length),
            this.bits = r
        }
    }
    ,
    t.prototype.get = function(e) {
        return (this.bits[Math.floor(e / 32)] & 1 << (e & 31)) !== 0
    }
    ,
    t.prototype.set = function(e) {
        this.bits[Math.floor(e / 32)] |= 1 << (e & 31)
    }
    ,
    t.prototype.flip = function(e) {
        this.bits[Math.floor(e / 32)] ^= 1 << (e & 31)
    }
    ,
    t.prototype.getNextSet = function(e) {
        var r = this.size;
        if (e >= r)
            return r;
        var n = this.bits
          , i = Math.floor(e / 32)
          , o = n[i];
        o &= ~((1 << (e & 31)) - 1);
        for (var s = n.length; o === 0; ) {
            if (++i === s)
                return r;
            o = n[i]
        }
        var a = i * 32 + qe.numberOfTrailingZeros(o);
        return a > r ? r : a
    }
    ,
    t.prototype.getNextUnset = function(e) {
        var r = this.size;
        if (e >= r)
            return r;
        var n = this.bits
          , i = Math.floor(e / 32)
          , o = ~n[i];
        o &= ~((1 << (e & 31)) - 1);
        for (var s = n.length; o === 0; ) {
            if (++i === s)
                return r;
            o = ~n[i]
        }
        var a = i * 32 + qe.numberOfTrailingZeros(o);
        return a > r ? r : a
    }
    ,
    t.prototype.setBulk = function(e, r) {
        this.bits[Math.floor(e / 32)] = r
    }
    ,
    t.prototype.setRange = function(e, r) {
        if (r < e || e < 0 || r > this.size)
            throw new Me;
        if (r !== e) {
            r--;
            for (var n = Math.floor(e / 32), i = Math.floor(r / 32), o = this.bits, s = n; s <= i; s++) {
                var a = s > n ? 0 : e & 31
                  , l = s < i ? 31 : r & 31
                  , c = (2 << l) - (1 << a);
                o[s] |= c
            }
        }
    }
    ,
    t.prototype.clear = function() {
        for (var e = this.bits.length, r = this.bits, n = 0; n < e; n++)
            r[n] = 0
    }
    ,
    t.prototype.isRange = function(e, r, n) {
        if (r < e || e < 0 || r > this.size)
            throw new Me;
        if (r === e)
            return !0;
        r--;
        for (var i = Math.floor(e / 32), o = Math.floor(r / 32), s = this.bits, a = i; a <= o; a++) {
            var l = a > i ? 0 : e & 31
              , c = a < o ? 31 : r & 31
              , u = (2 << c) - (1 << l) & 4294967295;
            if ((s[a] & u) !== (n ? u : 0))
                return !1
        }
        return !0
    }
    ,
    t.prototype.appendBit = function(e) {
        this.ensureCapacity(this.size + 1),
        e && (this.bits[Math.floor(this.size / 32)] |= 1 << (this.size & 31)),
        this.size++
    }
    ,
    t.prototype.appendBits = function(e, r) {
        if (r < 0 || r > 32)
            throw new Me("Num bits must be between 0 and 32");
        this.ensureCapacity(this.size + r);
        for (var n = r; n > 0; n--)
            this.appendBit((e >> n - 1 & 1) === 1)
    }
    ,
    t.prototype.appendBitArray = function(e) {
        var r = e.size;
        this.ensureCapacity(this.size + r);
        for (var n = 0; n < r; n++)
            this.appendBit(e.get(n))
    }
    ,
    t.prototype.xor = function(e) {
        if (this.size !== e.size)
            throw new Me("Sizes don't match");
        for (var r = this.bits, n = 0, i = r.length; n < i; n++)
            r[n] ^= e.bits[n]
    }
    ,
    t.prototype.toBytes = function(e, r, n, i) {
        for (var o = 0; o < i; o++) {
            for (var s = 0, a = 0; a < 8; a++)
                this.get(e) && (s |= 1 << 7 - a),
                e++;
            r[n + o] = s
        }
    }
    ,
    t.prototype.getBitArray = function() {
        return this.bits
    }
    ,
    t.prototype.reverse = function() {
        for (var e = new Int32Array(this.bits.length), r = Math.floor((this.size - 1) / 32), n = r + 1, i = this.bits, o = 0; o < n; o++) {
            var s = i[o];
            s = s >> 1 & 1431655765 | (s & 1431655765) << 1,
            s = s >> 2 & 858993459 | (s & 858993459) << 2,
            s = s >> 4 & 252645135 | (s & 252645135) << 4,
            s = s >> 8 & 16711935 | (s & 16711935) << 8,
            s = s >> 16 & 65535 | (s & 65535) << 16,
            e[r - o] = s
        }
        if (this.size !== n * 32) {
            for (var a = n * 32 - this.size, l = e[0] >>> a, o = 1; o < n; o++) {
                var c = e[o];
                l |= c << 32 - a,
                e[o - 1] = l,
                l = c >>> a
            }
            e[n - 1] = l
        }
        this.bits = e
    }
    ,
    t.makeArray = function(e) {
        return new Int32Array(Math.floor((e + 31) / 32))
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        return this.size === r.size && br.equals(this.bits, r.bits)
    }
    ,
    t.prototype.hashCode = function() {
        return 31 * this.size + br.hashCode(this.bits)
    }
    ,
    t.prototype.toString = function() {
        for (var e = "", r = 0, n = this.size; r < n; r++)
            r & 7 || (e += " "),
            e += this.get(r) ? "X" : ".";
        return e
    }
    ,
    t.prototype.clone = function() {
        return new t(this.size,this.bits.slice())
    }
    ,
    t.prototype.toArray = function() {
        for (var e = [], r = 0, n = this.size; r < n; r++)
            e.push(this.get(r));
        return e
    }
    ,
    t
}(), ME;
(function(t) {
    t[t.OTHER = 0] = "OTHER",
    t[t.PURE_BARCODE = 1] = "PURE_BARCODE",
    t[t.POSSIBLE_FORMATS = 2] = "POSSIBLE_FORMATS",
    t[t.TRY_HARDER = 3] = "TRY_HARDER",
    t[t.CHARACTER_SET = 4] = "CHARACTER_SET",
    t[t.ALLOWED_LENGTHS = 5] = "ALLOWED_LENGTHS",
    t[t.ASSUME_CODE_39_CHECK_DIGIT = 6] = "ASSUME_CODE_39_CHECK_DIGIT",
    t[t.ENABLE_CODE_39_EXTENDED_MODE = 7] = "ENABLE_CODE_39_EXTENDED_MODE",
    t[t.ASSUME_GS1 = 8] = "ASSUME_GS1",
    t[t.RETURN_CODABAR_START_END = 9] = "RETURN_CODABAR_START_END",
    t[t.NEED_RESULT_POINT_CALLBACK = 10] = "NEED_RESULT_POINT_CALLBACK",
    t[t.ALLOWED_EAN_EXTENSIONS = 11] = "ALLOWED_EAN_EXTENSIONS"
}
)(ME || (ME = {}));
const Ft = ME;
var e2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), ge = function(t) {
    e2e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.getFormatInstance = function() {
        return new e
    }
    ,
    e.kind = "FormatException",
    e
}(Mn), t2e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, vt;
(function(t) {
    t[t.Cp437 = 0] = "Cp437",
    t[t.ISO8859_1 = 1] = "ISO8859_1",
    t[t.ISO8859_2 = 2] = "ISO8859_2",
    t[t.ISO8859_3 = 3] = "ISO8859_3",
    t[t.ISO8859_4 = 4] = "ISO8859_4",
    t[t.ISO8859_5 = 5] = "ISO8859_5",
    t[t.ISO8859_6 = 6] = "ISO8859_6",
    t[t.ISO8859_7 = 7] = "ISO8859_7",
    t[t.ISO8859_8 = 8] = "ISO8859_8",
    t[t.ISO8859_9 = 9] = "ISO8859_9",
    t[t.ISO8859_10 = 10] = "ISO8859_10",
    t[t.ISO8859_11 = 11] = "ISO8859_11",
    t[t.ISO8859_13 = 12] = "ISO8859_13",
    t[t.ISO8859_14 = 13] = "ISO8859_14",
    t[t.ISO8859_15 = 14] = "ISO8859_15",
    t[t.ISO8859_16 = 15] = "ISO8859_16",
    t[t.SJIS = 16] = "SJIS",
    t[t.Cp1250 = 17] = "Cp1250",
    t[t.Cp1251 = 18] = "Cp1251",
    t[t.Cp1252 = 19] = "Cp1252",
    t[t.Cp1256 = 20] = "Cp1256",
    t[t.UnicodeBigUnmarked = 21] = "UnicodeBigUnmarked",
    t[t.UTF8 = 22] = "UTF8",
    t[t.ASCII = 23] = "ASCII",
    t[t.Big5 = 24] = "Big5",
    t[t.GB18030 = 25] = "GB18030",
    t[t.EUC_KR = 26] = "EUC_KR"
}
)(vt || (vt = {}));
var _r = function() {
    function t(e, r, n) {
        for (var i, o, s = [], a = 3; a < arguments.length; a++)
            s[a - 3] = arguments[a];
        this.valueIdentifier = e,
        this.name = n,
        typeof r == "number" ? this.values = Int32Array.from([r]) : this.values = r,
        this.otherEncodingNames = s,
        t.VALUE_IDENTIFIER_TO_ECI.set(e, this),
        t.NAME_TO_ECI.set(n, this);
        for (var l = this.values, c = 0, u = l.length; c !== u; c++) {
            var f = l[c];
            t.VALUES_TO_ECI.set(f, this)
        }
        try {
            for (var d = t2e(s), h = d.next(); !h.done; h = d.next()) {
                var x = h.value;
                t.NAME_TO_ECI.set(x, this)
            }
        } catch (y) {
            i = {
                error: y
            }
        } finally {
            try {
                h && !h.done && (o = d.return) && o.call(d)
            } finally {
                if (i)
                    throw i.error
            }
        }
    }
    return t.prototype.getValueIdentifier = function() {
        return this.valueIdentifier
    }
    ,
    t.prototype.getName = function() {
        return this.name
    }
    ,
    t.prototype.getValue = function() {
        return this.values[0]
    }
    ,
    t.getCharacterSetECIByValue = function(e) {
        if (e < 0 || e >= 900)
            throw new ge("incorect value");
        var r = t.VALUES_TO_ECI.get(e);
        if (r === void 0)
            throw new ge("incorect value");
        return r
    }
    ,
    t.getCharacterSetECIByName = function(e) {
        var r = t.NAME_TO_ECI.get(e);
        if (r === void 0)
            throw new ge("incorect value");
        return r
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        return this.getName() === r.getName()
    }
    ,
    t.VALUE_IDENTIFIER_TO_ECI = new Map,
    t.VALUES_TO_ECI = new Map,
    t.NAME_TO_ECI = new Map,
    t.Cp437 = new t(vt.Cp437,Int32Array.from([0, 2]),"Cp437"),
    t.ISO8859_1 = new t(vt.ISO8859_1,Int32Array.from([1, 3]),"ISO-8859-1","ISO88591","ISO8859_1"),
    t.ISO8859_2 = new t(vt.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),
    t.ISO8859_3 = new t(vt.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),
    t.ISO8859_4 = new t(vt.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),
    t.ISO8859_5 = new t(vt.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),
    t.ISO8859_6 = new t(vt.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),
    t.ISO8859_7 = new t(vt.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),
    t.ISO8859_8 = new t(vt.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),
    t.ISO8859_9 = new t(vt.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),
    t.ISO8859_10 = new t(vt.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),
    t.ISO8859_11 = new t(vt.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),
    t.ISO8859_13 = new t(vt.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),
    t.ISO8859_14 = new t(vt.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),
    t.ISO8859_15 = new t(vt.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),
    t.ISO8859_16 = new t(vt.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),
    t.SJIS = new t(vt.SJIS,20,"SJIS","Shift_JIS"),
    t.Cp1250 = new t(vt.Cp1250,21,"Cp1250","windows-1250"),
    t.Cp1251 = new t(vt.Cp1251,22,"Cp1251","windows-1251"),
    t.Cp1252 = new t(vt.Cp1252,23,"Cp1252","windows-1252"),
    t.Cp1256 = new t(vt.Cp1256,24,"Cp1256","windows-1256"),
    t.UnicodeBigUnmarked = new t(vt.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),
    t.UTF8 = new t(vt.UTF8,26,"UTF8","UTF-8"),
    t.ASCII = new t(vt.ASCII,Int32Array.from([27, 170]),"ASCII","US-ASCII"),
    t.Big5 = new t(vt.Big5,28,"Big5"),
    t.GB18030 = new t(vt.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),
    t.EUC_KR = new t(vt.EUC_KR,30,"EUC_KR","EUC-KR"),
    t
}(), r2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), rx = function(t) {
    r2e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "UnsupportedOperationException",
    e
}(Mn), mi = function() {
    function t() {}
    return t.decode = function(e, r) {
        var n = this.encodingName(r);
        return this.customDecoder ? this.customDecoder(e, n) : typeof TextDecoder > "u" || this.shouldDecodeOnFallback(n) ? this.decodeFallback(e, n) : new TextDecoder(n).decode(e)
    }
    ,
    t.shouldDecodeOnFallback = function(e) {
        return !t.isBrowser() && e === "ISO-8859-1"
    }
    ,
    t.encode = function(e, r) {
        var n = this.encodingName(r);
        return this.customEncoder ? this.customEncoder(e, n) : typeof TextEncoder > "u" ? this.encodeFallback(e) : new TextEncoder().encode(e)
    }
    ,
    t.isBrowser = function() {
        return typeof window < "u" && {}.toString.call(window) === "[object Window]"
    }
    ,
    t.encodingName = function(e) {
        return typeof e == "string" ? e : e.getName()
    }
    ,
    t.encodingCharacterSet = function(e) {
        return e instanceof _r ? e : _r.getCharacterSetECIByName(e)
    }
    ,
    t.decodeFallback = function(e, r) {
        var n = this.encodingCharacterSet(r);
        if (t.isDecodeFallbackSupported(n)) {
            for (var i = "", o = 0, s = e.length; o < s; o++) {
                var a = e[o].toString(16);
                a.length < 2 && (a = "0" + a),
                i += "%" + a
            }
            return decodeURIComponent(i)
        }
        if (n.equals(_r.UnicodeBigUnmarked))
            return String.fromCharCode.apply(null, new Uint16Array(e.buffer));
        throw new rx("Encoding " + this.encodingName(r) + " not supported by fallback.")
    }
    ,
    t.isDecodeFallbackSupported = function(e) {
        return e.equals(_r.UTF8) || e.equals(_r.ISO8859_1) || e.equals(_r.ASCII)
    }
    ,
    t.encodeFallback = function(e) {
        for (var r = btoa(unescape(encodeURIComponent(e))), n = r.split(""), i = [], o = 0; o < n.length; o++)
            i.push(n[o].charCodeAt(0));
        return new Uint8Array(i)
    }
    ,
    t
}(), nt = function() {
    function t() {}
    return t.castAsNonUtf8Char = function(e, r) {
        r === void 0 && (r = null);
        var n = r ? r.getName() : this.ISO88591;
        return mi.decode(new Uint8Array([e]), n)
    }
    ,
    t.guessEncoding = function(e, r) {
        if (r != null && r.get(Ft.CHARACTER_SET) !== void 0)
            return r.get(Ft.CHARACTER_SET).toString();
        for (var n = e.length, i = !0, o = !0, s = !0, a = 0, l = 0, c = 0, u = 0, f = 0, d = 0, h = 0, x = 0, y = 0, m = 0, E = 0, g = e.length > 3 && e[0] === 239 && e[1] === 187 && e[2] === 191, p = 0; p < n && (i || o || s); p++) {
            var v = e[p] & 255;
            s && (a > 0 ? v & 128 ? a-- : s = !1 : v & 128 && (v & 64 ? (a++,
            v & 32 ? (a++,
            v & 16 ? (a++,
            v & 8 ? s = !1 : u++) : c++) : l++) : s = !1)),
            i && (v > 127 && v < 160 ? i = !1 : v > 159 && (v < 192 || v === 215 || v === 247) && E++),
            o && (f > 0 ? v < 64 || v === 127 || v > 252 ? o = !1 : f-- : v === 128 || v === 160 || v > 239 ? o = !1 : v > 160 && v < 224 ? (d++,
            x = 0,
            h++,
            h > y && (y = h)) : v > 127 ? (f++,
            h = 0,
            x++,
            x > m && (m = x)) : (h = 0,
            x = 0))
        }
        return s && a > 0 && (s = !1),
        o && f > 0 && (o = !1),
        s && (g || l + c + u > 0) ? t.UTF8 : o && (t.ASSUME_SHIFT_JIS || y >= 3 || m >= 3) ? t.SHIFT_JIS : i && o ? y === 2 && d === 2 || E * 10 >= n ? t.SHIFT_JIS : t.ISO88591 : i ? t.ISO88591 : o ? t.SHIFT_JIS : s ? t.UTF8 : t.PLATFORM_DEFAULT_ENCODING
    }
    ,
    t.format = function(e) {
        for (var r = [], n = 1; n < arguments.length; n++)
            r[n - 1] = arguments[n];
        var i = -1;
        function o(a, l, c, u, f, d) {
            if (a === "%%")
                return "%";
            if (r[++i] !== void 0) {
                a = u ? parseInt(u.substr(1)) : void 0;
                var h = f ? parseInt(f.substr(1)) : void 0, x;
                switch (d) {
                case "s":
                    x = r[i];
                    break;
                case "c":
                    x = r[i][0];
                    break;
                case "f":
                    x = parseFloat(r[i]).toFixed(a);
                    break;
                case "p":
                    x = parseFloat(r[i]).toPrecision(a);
                    break;
                case "e":
                    x = parseFloat(r[i]).toExponential(a);
                    break;
                case "x":
                    x = parseInt(r[i]).toString(h || 16);
                    break;
                case "d":
                    x = parseFloat(parseInt(r[i], h || 10).toPrecision(a)).toFixed(0);
                    break
                }
                x = typeof x == "object" ? JSON.stringify(x) : (+x).toString(h);
                for (var y = parseInt(c), m = c && c[0] + "" == "0" ? "0" : " "; x.length < y; )
                    x = l !== void 0 ? x + m : m + x;
                return x
            }
        }
        var s = /%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;
        return e.replace(s, o)
    }
    ,
    t.getBytes = function(e, r) {
        return mi.encode(e, r)
    }
    ,
    t.getCharCode = function(e, r) {
        return r === void 0 && (r = 0),
        e.charCodeAt(r)
    }
    ,
    t.getCharAt = function(e) {
        return String.fromCharCode(e)
    }
    ,
    t.SHIFT_JIS = _r.SJIS.getName(),
    t.GB2312 = "GB2312",
    t.ISO88591 = _r.ISO8859_1.getName(),
    t.EUC_JP = "EUC_JP",
    t.UTF8 = _r.UTF8.getName(),
    t.PLATFORM_DEFAULT_ENCODING = t.UTF8,
    t.ASSUME_SHIFT_JIS = !1,
    t
}(), Ke = function() {
    function t(e) {
        e === void 0 && (e = ""),
        this.value = e
    }
    return t.prototype.enableDecoding = function(e) {
        return this.encoding = e,
        this
    }
    ,
    t.prototype.append = function(e) {
        return typeof e == "string" ? this.value += e.toString() : this.encoding ? this.value += nt.castAsNonUtf8Char(e, this.encoding) : this.value += String.fromCharCode(e),
        this
    }
    ,
    t.prototype.appendChars = function(e, r, n) {
        for (var i = r; r < r + n; i++)
            this.append(e[i]);
        return this
    }
    ,
    t.prototype.length = function() {
        return this.value.length
    }
    ,
    t.prototype.charAt = function(e) {
        return this.value.charAt(e)
    }
    ,
    t.prototype.deleteCharAt = function(e) {
        this.value = this.value.substr(0, e) + this.value.substring(e + 1)
    }
    ,
    t.prototype.setCharAt = function(e, r) {
        this.value = this.value.substr(0, e) + r + this.value.substr(e + 1)
    }
    ,
    t.prototype.substring = function(e, r) {
        return this.value.substring(e, r)
    }
    ,
    t.prototype.setLengthToZero = function() {
        this.value = ""
    }
    ,
    t.prototype.toString = function() {
        return this.value
    }
    ,
    t.prototype.insert = function(e, r) {
        this.value = this.value.substring(0, e) + r + this.value.substring(e)
    }
    ,
    t
}(), Ao = function() {
    function t(e, r, n, i) {
        if (this.width = e,
        this.height = r,
        this.rowSize = n,
        this.bits = i,
        r == null && (r = e),
        this.height = r,
        e < 1 || r < 1)
            throw new Me("Both dimensions must be greater than 0");
        n == null && (n = Math.floor((e + 31) / 32)),
        this.rowSize = n,
        i == null && (this.bits = new Int32Array(this.rowSize * this.height))
    }
    return t.parseFromBooleanArray = function(e) {
        for (var r = e.length, n = e[0].length, i = new t(n,r), o = 0; o < r; o++)
            for (var s = e[o], a = 0; a < n; a++)
                s[a] && i.set(a, o);
        return i
    }
    ,
    t.parseFromString = function(e, r, n) {
        if (e === null)
            throw new Me("stringRepresentation cannot be null");
        for (var i = new Array(e.length), o = 0, s = 0, a = -1, l = 0, c = 0; c < e.length; )
            if (e.charAt(c) === `
` || e.charAt(c) === "\r") {
                if (o > s) {
                    if (a === -1)
                        a = o - s;
                    else if (o - s !== a)
                        throw new Me("row lengths do not match");
                    s = o,
                    l++
                }
                c++
            } else if (e.substring(c, c + r.length) === r)
                c += r.length,
                i[o] = !0,
                o++;
            else if (e.substring(c, c + n.length) === n)
                c += n.length,
                i[o] = !1,
                o++;
            else
                throw new Me("illegal character encountered: " + e.substring(c));
        if (o > s) {
            if (a === -1)
                a = o - s;
            else if (o - s !== a)
                throw new Me("row lengths do not match");
            l++
        }
        for (var u = new t(a,l), f = 0; f < o; f++)
            i[f] && u.set(Math.floor(f % a), Math.floor(f / a));
        return u
    }
    ,
    t.prototype.get = function(e, r) {
        var n = r * this.rowSize + Math.floor(e / 32);
        return (this.bits[n] >>> (e & 31) & 1) !== 0
    }
    ,
    t.prototype.set = function(e, r) {
        var n = r * this.rowSize + Math.floor(e / 32);
        this.bits[n] |= 1 << (e & 31) & 4294967295
    }
    ,
    t.prototype.unset = function(e, r) {
        var n = r * this.rowSize + Math.floor(e / 32);
        this.bits[n] &= ~(1 << (e & 31) & 4294967295)
    }
    ,
    t.prototype.flip = function(e, r) {
        var n = r * this.rowSize + Math.floor(e / 32);
        this.bits[n] ^= 1 << (e & 31) & 4294967295
    }
    ,
    t.prototype.xor = function(e) {
        if (this.width !== e.getWidth() || this.height !== e.getHeight() || this.rowSize !== e.getRowSize())
            throw new Me("input matrix dimensions do not match");
        for (var r = new kr(Math.floor(this.width / 32) + 1), n = this.rowSize, i = this.bits, o = 0, s = this.height; o < s; o++)
            for (var a = o * n, l = e.getRow(o, r).getBitArray(), c = 0; c < n; c++)
                i[a + c] ^= l[c]
    }
    ,
    t.prototype.clear = function() {
        for (var e = this.bits, r = e.length, n = 0; n < r; n++)
            e[n] = 0
    }
    ,
    t.prototype.setRegion = function(e, r, n, i) {
        if (r < 0 || e < 0)
            throw new Me("Left and top must be nonnegative");
        if (i < 1 || n < 1)
            throw new Me("Height and width must be at least 1");
        var o = e + n
          , s = r + i;
        if (s > this.height || o > this.width)
            throw new Me("The region must fit inside the matrix");
        for (var a = this.rowSize, l = this.bits, c = r; c < s; c++)
            for (var u = c * a, f = e; f < o; f++)
                l[u + Math.floor(f / 32)] |= 1 << (f & 31) & 4294967295
    }
    ,
    t.prototype.getRow = function(e, r) {
        r == null || r.getSize() < this.width ? r = new kr(this.width) : r.clear();
        for (var n = this.rowSize, i = this.bits, o = e * n, s = 0; s < n; s++)
            r.setBulk(s * 32, i[o + s]);
        return r
    }
    ,
    t.prototype.setRow = function(e, r) {
        Dt.arraycopy(r.getBitArray(), 0, this.bits, e * this.rowSize, this.rowSize)
    }
    ,
    t.prototype.rotate180 = function() {
        for (var e = this.getWidth(), r = this.getHeight(), n = new kr(e), i = new kr(e), o = 0, s = Math.floor((r + 1) / 2); o < s; o++)
            n = this.getRow(o, n),
            i = this.getRow(r - 1 - o, i),
            n.reverse(),
            i.reverse(),
            this.setRow(o, i),
            this.setRow(r - 1 - o, n)
    }
    ,
    t.prototype.getEnclosingRectangle = function() {
        for (var e = this.width, r = this.height, n = this.rowSize, i = this.bits, o = e, s = r, a = -1, l = -1, c = 0; c < r; c++)
            for (var u = 0; u < n; u++) {
                var f = i[c * n + u];
                if (f !== 0) {
                    if (c < s && (s = c),
                    c > l && (l = c),
                    u * 32 < o) {
                        for (var d = 0; !(f << 31 - d & 4294967295); )
                            d++;
                        u * 32 + d < o && (o = u * 32 + d)
                    }
                    if (u * 32 + 31 > a) {
                        for (var d = 31; !(f >>> d); )
                            d--;
                        u * 32 + d > a && (a = u * 32 + d)
                    }
                }
            }
        return a < o || l < s ? null : Int32Array.from([o, s, a - o + 1, l - s + 1])
    }
    ,
    t.prototype.getTopLeftOnBit = function() {
        for (var e = this.rowSize, r = this.bits, n = 0; n < r.length && r[n] === 0; )
            n++;
        if (n === r.length)
            return null;
        for (var i = n / e, o = n % e * 32, s = r[n], a = 0; !(s << 31 - a & 4294967295); )
            a++;
        return o += a,
        Int32Array.from([o, i])
    }
    ,
    t.prototype.getBottomRightOnBit = function() {
        for (var e = this.rowSize, r = this.bits, n = r.length - 1; n >= 0 && r[n] === 0; )
            n--;
        if (n < 0)
            return null;
        for (var i = Math.floor(n / e), o = Math.floor(n % e) * 32, s = r[n], a = 31; !(s >>> a); )
            a--;
        return o += a,
        Int32Array.from([o, i])
    }
    ,
    t.prototype.getWidth = function() {
        return this.width
    }
    ,
    t.prototype.getHeight = function() {
        return this.height
    }
    ,
    t.prototype.getRowSize = function() {
        return this.rowSize
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        return this.width === r.width && this.height === r.height && this.rowSize === r.rowSize && br.equals(this.bits, r.bits)
    }
    ,
    t.prototype.hashCode = function() {
        var e = this.width;
        return e = 31 * e + this.width,
        e = 31 * e + this.height,
        e = 31 * e + this.rowSize,
        e = 31 * e + br.hashCode(this.bits),
        e
    }
    ,
    t.prototype.toString = function(e, r, n) {
        return e === void 0 && (e = "X "),
        r === void 0 && (r = "  "),
        n === void 0 && (n = `
`),
        this.buildToString(e, r, n)
    }
    ,
    t.prototype.buildToString = function(e, r, n) {
        for (var i = new Ke, o = 0, s = this.height; o < s; o++) {
            for (var a = 0, l = this.width; a < l; a++)
                i.append(this.get(a, o) ? e : r);
            i.append(n)
        }
        return i.toString()
    }
    ,
    t.prototype.clone = function() {
        return new t(this.width,this.height,this.rowSize,this.bits.slice())
    }
    ,
    t
}(), n2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), le = function(t) {
    n2e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.getNotFoundInstance = function() {
        return new e
    }
    ,
    e.kind = "NotFoundException",
    e
}(Mn), i2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), o2e = function(t) {
    i2e(e, t);
    function e(r) {
        var n = t.call(this, r) || this;
        return n.luminances = e.EMPTY,
        n.buckets = new Int32Array(e.LUMINANCE_BUCKETS),
        n
    }
    return e.prototype.getBlackRow = function(r, n) {
        var i = this.getLuminanceSource()
          , o = i.getWidth();
        n == null || n.getSize() < o ? n = new kr(o) : n.clear(),
        this.initArrays(o);
        for (var s = i.getRow(r, this.luminances), a = this.buckets, l = 0; l < o; l++)
            a[(s[l] & 255) >> e.LUMINANCE_SHIFT]++;
        var c = e.estimateBlackPoint(a);
        if (o < 3)
            for (var l = 0; l < o; l++)
                (s[l] & 255) < c && n.set(l);
        else
            for (var u = s[0] & 255, f = s[1] & 255, l = 1; l < o - 1; l++) {
                var d = s[l + 1] & 255;
                (f * 4 - u - d) / 2 < c && n.set(l),
                u = f,
                f = d
            }
        return n
    }
    ,
    e.prototype.getBlackMatrix = function() {
        var r = this.getLuminanceSource()
          , n = r.getWidth()
          , i = r.getHeight()
          , o = new Ao(n,i);
        this.initArrays(n);
        for (var s = this.buckets, a = 1; a < 5; a++)
            for (var l = Math.floor(i * a / 5), c = r.getRow(l, this.luminances), u = Math.floor(n * 4 / 5), f = Math.floor(n / 5); f < u; f++) {
                var d = c[f] & 255;
                s[d >> e.LUMINANCE_SHIFT]++
            }
        for (var h = e.estimateBlackPoint(s), x = r.getMatrix(), a = 0; a < i; a++)
            for (var y = a * n, f = 0; f < n; f++) {
                var d = x[y + f] & 255;
                d < h && o.set(f, a)
            }
        return o
    }
    ,
    e.prototype.createBinarizer = function(r) {
        return new e(r)
    }
    ,
    e.prototype.initArrays = function(r) {
        this.luminances.length < r && (this.luminances = new Uint8ClampedArray(r));
        for (var n = this.buckets, i = 0; i < e.LUMINANCE_BUCKETS; i++)
            n[i] = 0
    }
    ,
    e.estimateBlackPoint = function(r) {
        for (var n = r.length, i = 0, o = 0, s = 0, a = 0; a < n; a++)
            r[a] > s && (o = a,
            s = r[a]),
            r[a] > i && (i = r[a]);
        for (var l = 0, c = 0, a = 0; a < n; a++) {
            var u = a - o
              , f = r[a] * u * u;
            f > c && (l = a,
            c = f)
        }
        if (o > l) {
            var d = o;
            o = l,
            l = d
        }
        if (l - o <= n / 16)
            throw new le;
        for (var h = l - 1, x = -1, a = l - 1; a > o; a--) {
            var y = a - o
              , f = y * y * (l - a) * (i - r[a]);
            f > x && (h = a,
            x = f)
        }
        return h << e.LUMINANCE_SHIFT
    }
    ,
    e.LUMINANCE_BITS = 5,
    e.LUMINANCE_SHIFT = 8 - e.LUMINANCE_BITS,
    e.LUMINANCE_BUCKETS = 1 << e.LUMINANCE_BITS,
    e.EMPTY = Uint8ClampedArray.from([0]),
    e
}(q_e), s2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), aM = function(t) {
    s2e(e, t);
    function e(r) {
        var n = t.call(this, r) || this;
        return n.matrix = null,
        n
    }
    return e.prototype.getBlackMatrix = function() {
        if (this.matrix !== null)
            return this.matrix;
        var r = this.getLuminanceSource()
          , n = r.getWidth()
          , i = r.getHeight();
        if (n >= e.MINIMUM_DIMENSION && i >= e.MINIMUM_DIMENSION) {
            var o = r.getMatrix()
              , s = n >> e.BLOCK_SIZE_POWER;
            n & e.BLOCK_SIZE_MASK && s++;
            var a = i >> e.BLOCK_SIZE_POWER;
            i & e.BLOCK_SIZE_MASK && a++;
            var l = e.calculateBlackPoints(o, s, a, n, i)
              , c = new Ao(n,i);
            e.calculateThresholdForBlock(o, s, a, n, i, l, c),
            this.matrix = c
        } else
            this.matrix = t.prototype.getBlackMatrix.call(this);
        return this.matrix
    }
    ,
    e.prototype.createBinarizer = function(r) {
        return new e(r)
    }
    ,
    e.calculateThresholdForBlock = function(r, n, i, o, s, a, l) {
        for (var c = s - e.BLOCK_SIZE, u = o - e.BLOCK_SIZE, f = 0; f < i; f++) {
            var d = f << e.BLOCK_SIZE_POWER;
            d > c && (d = c);
            for (var h = e.cap(f, 2, i - 3), x = 0; x < n; x++) {
                var y = x << e.BLOCK_SIZE_POWER;
                y > u && (y = u);
                for (var m = e.cap(x, 2, n - 3), E = 0, g = -2; g <= 2; g++) {
                    var p = a[h + g];
                    E += p[m - 2] + p[m - 1] + p[m] + p[m + 1] + p[m + 2]
                }
                var v = E / 25;
                e.thresholdBlock(r, y, d, v, o, l)
            }
        }
    }
    ,
    e.cap = function(r, n, i) {
        return r < n ? n : r > i ? i : r
    }
    ,
    e.thresholdBlock = function(r, n, i, o, s, a) {
        for (var l = 0, c = i * s + n; l < e.BLOCK_SIZE; l++,
        c += s)
            for (var u = 0; u < e.BLOCK_SIZE; u++)
                (r[c + u] & 255) <= o && a.set(n + u, i + l)
    }
    ,
    e.calculateBlackPoints = function(r, n, i, o, s) {
        for (var a = s - e.BLOCK_SIZE, l = o - e.BLOCK_SIZE, c = new Array(i), u = 0; u < i; u++) {
            c[u] = new Int32Array(n);
            var f = u << e.BLOCK_SIZE_POWER;
            f > a && (f = a);
            for (var d = 0; d < n; d++) {
                var h = d << e.BLOCK_SIZE_POWER;
                h > l && (h = l);
                for (var x = 0, y = 255, m = 0, E = 0, g = f * o + h; E < e.BLOCK_SIZE; E++,
                g += o) {
                    for (var p = 0; p < e.BLOCK_SIZE; p++) {
                        var v = r[g + p] & 255;
                        x += v,
                        v < y && (y = v),
                        v > m && (m = v)
                    }
                    if (m - y > e.MIN_DYNAMIC_RANGE)
                        for (E++,
                        g += o; E < e.BLOCK_SIZE; E++,
                        g += o)
                            for (var p = 0; p < e.BLOCK_SIZE; p++)
                                x += r[g + p] & 255
                }
                var _ = x >> e.BLOCK_SIZE_POWER * 2;
                if (m - y <= e.MIN_DYNAMIC_RANGE && (_ = y / 2,
                u > 0 && d > 0)) {
                    var b = (c[u - 1][d] + 2 * c[u][d - 1] + c[u - 1][d - 1]) / 4;
                    y < b && (_ = b)
                }
                c[u][d] = _
            }
        }
        return c
    }
    ,
    e.BLOCK_SIZE_POWER = 3,
    e.BLOCK_SIZE = 1 << e.BLOCK_SIZE_POWER,
    e.BLOCK_SIZE_MASK = e.BLOCK_SIZE - 1,
    e.MINIMUM_DIMENSION = e.BLOCK_SIZE * 5,
    e.MIN_DYNAMIC_RANGE = 24,
    e
}(o2e), yd = function() {
    function t(e, r) {
        this.width = e,
        this.height = r
    }
    return t.prototype.getWidth = function() {
        return this.width
    }
    ,
    t.prototype.getHeight = function() {
        return this.height
    }
    ,
    t.prototype.isCropSupported = function() {
        return !1
    }
    ,
    t.prototype.crop = function(e, r, n, i) {
        throw new rx("This luminance source does not support cropping.")
    }
    ,
    t.prototype.isRotateSupported = function() {
        return !1
    }
    ,
    t.prototype.rotateCounterClockwise = function() {
        throw new rx("This luminance source does not support rotation by 90 degrees.")
    }
    ,
    t.prototype.rotateCounterClockwise45 = function() {
        throw new rx("This luminance source does not support rotation by 45 degrees.")
    }
    ,
    t.prototype.toString = function() {
        for (var e = new Uint8ClampedArray(this.width), r = new Ke, n = 0; n < this.height; n++) {
            for (var i = this.getRow(n, e), o = 0; o < this.width; o++) {
                var s = i[o] & 255
                  , a = void 0;
                s < 64 ? a = "#" : s < 128 ? a = "+" : s < 192 ? a = "." : a = " ",
                r.append(a)
            }
            r.append(`
`)
        }
        return r.toString()
    }
    ,
    t
}(), a2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), P1 = function(t) {
    a2e(e, t);
    function e(r) {
        var n = t.call(this, r.getWidth(), r.getHeight()) || this;
        return n.delegate = r,
        n
    }
    return e.prototype.getRow = function(r, n) {
        for (var i = this.delegate.getRow(r, n), o = this.getWidth(), s = 0; s < o; s++)
            i[s] = 255 - (i[s] & 255);
        return i
    }
    ,
    e.prototype.getMatrix = function() {
        for (var r = this.delegate.getMatrix(), n = this.getWidth() * this.getHeight(), i = new Uint8ClampedArray(n), o = 0; o < n; o++)
            i[o] = 255 - (r[o] & 255);
        return i
    }
    ,
    e.prototype.isCropSupported = function() {
        return this.delegate.isCropSupported()
    }
    ,
    e.prototype.crop = function(r, n, i, o) {
        return new e(this.delegate.crop(r, n, i, o))
    }
    ,
    e.prototype.isRotateSupported = function() {
        return this.delegate.isRotateSupported()
    }
    ,
    e.prototype.invert = function() {
        return this.delegate
    }
    ,
    e.prototype.rotateCounterClockwise = function() {
        return new e(this.delegate.rotateCounterClockwise())
    }
    ,
    e.prototype.rotateCounterClockwise45 = function() {
        return new e(this.delegate.rotateCounterClockwise45())
    }
    ,
    e
}(yd), l2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), c2e = function(t) {
    l2e(e, t);
    function e(r, n) {
        n === void 0 && (n = !1);
        var i = t.call(this, r.width, r.height) || this;
        return i.canvas = r,
        i.tempCanvasElement = null,
        i.buffer = e.makeBufferFromCanvasImageData(r, n),
        i
    }
    return e.makeBufferFromCanvasImageData = function(r, n) {
        n === void 0 && (n = !1);
        var i = r.getContext("2d").getImageData(0, 0, r.width, r.height);
        return e.toGrayscaleBuffer(i.data, r.width, r.height, n)
    }
    ,
    e.toGrayscaleBuffer = function(r, n, i, o) {
        o === void 0 && (o = !1);
        var s = new Uint8ClampedArray(n * i);
        if (e.FRAME_INDEX = !e.FRAME_INDEX,
        e.FRAME_INDEX || !o)
            for (var a = 0, l = 0, c = r.length; a < c; a += 4,
            l++) {
                var u = void 0
                  , f = r[a + 3];
                if (f === 0)
                    u = 255;
                else {
                    var d = r[a]
                      , h = r[a + 1]
                      , x = r[a + 2];
                    u = 306 * d + 601 * h + 117 * x + 512 >> 10
                }
                s[l] = u
            }
        else
            for (var a = 0, l = 0, y = r.length; a < y; a += 4,
            l++) {
                var u = void 0
                  , f = r[a + 3];
                if (f === 0)
                    u = 255;
                else {
                    var d = r[a]
                      , h = r[a + 1]
                      , x = r[a + 2];
                    u = 306 * d + 601 * h + 117 * x + 512 >> 10
                }
                s[l] = 255 - u
            }
        return s
    }
    ,
    e.prototype.getRow = function(r, n) {
        if (r < 0 || r >= this.getHeight())
            throw new Me("Requested row is outside the image: " + r);
        var i = this.getWidth()
          , o = r * i;
        return n === null ? n = this.buffer.slice(o, o + i) : (n.length < i && (n = new Uint8ClampedArray(i)),
        n.set(this.buffer.slice(o, o + i))),
        n
    }
    ,
    e.prototype.getMatrix = function() {
        return this.buffer
    }
    ,
    e.prototype.isCropSupported = function() {
        return !0
    }
    ,
    e.prototype.crop = function(r, n, i, o) {
        return t.prototype.crop.call(this, r, n, i, o),
        this
    }
    ,
    e.prototype.isRotateSupported = function() {
        return !0
    }
    ,
    e.prototype.rotateCounterClockwise = function() {
        return this.rotate(-90),
        this
    }
    ,
    e.prototype.rotateCounterClockwise45 = function() {
        return this.rotate(-45),
        this
    }
    ,
    e.prototype.getTempCanvasElement = function() {
        if (this.tempCanvasElement === null) {
            var r = this.canvas.ownerDocument.createElement("canvas");
            r.width = this.canvas.width,
            r.height = this.canvas.height,
            this.tempCanvasElement = r
        }
        return this.tempCanvasElement
    }
    ,
    e.prototype.rotate = function(r) {
        var n = this.getTempCanvasElement()
          , i = n.getContext("2d")
          , o = r * e.DEGREE_TO_RADIANS
          , s = this.canvas.width
          , a = this.canvas.height
          , l = Math.ceil(Math.abs(Math.cos(o)) * s + Math.abs(Math.sin(o)) * a)
          , c = Math.ceil(Math.abs(Math.sin(o)) * s + Math.abs(Math.cos(o)) * a);
        return n.width = l,
        n.height = c,
        i.translate(l / 2, c / 2),
        i.rotate(o),
        i.drawImage(this.canvas, s / -2, a / -2),
        this.buffer = e.makeBufferFromCanvasImageData(n),
        this
    }
    ,
    e.prototype.invert = function() {
        return new P1(this)
    }
    ,
    e.DEGREE_TO_RADIANS = Math.PI / 180,
    e.FRAME_INDEX = !0,
    e
}(yd), u2e = function() {
    function t(e, r, n) {
        this.deviceId = e,
        this.label = r,
        this.kind = "videoinput",
        this.groupId = n || void 0
    }
    return t.prototype.toJSON = function() {
        return {
            kind: this.kind,
            groupId: this.groupId,
            deviceId: this.deviceId,
            label: this.label
        }
    }
    ,
    t
}(), on = globalThis && globalThis.__awaiter || function(t, e, r, n) {
    function i(o) {
        return o instanceof r ? o : new r(function(s) {
            s(o)
        }
        )
    }
    return new (r || (r = Promise))(function(o, s) {
        function a(u) {
            try {
                c(n.next(u))
            } catch (f) {
                s(f)
            }
        }
        function l(u) {
            try {
                c(n.throw(u))
            } catch (f) {
                s(f)
            }
        }
        function c(u) {
            u.done ? o(u.value) : i(u.value).then(a, l)
        }
        c((n = n.apply(t, e || [])).next())
    }
    )
}
, sn = globalThis && globalThis.__generator || function(t, e) {
    var r = {
        label: 0,
        sent: function() {
            if (o[0] & 1)
                throw o[1];
            return o[1]
        },
        trys: [],
        ops: []
    }, n, i, o, s;
    return s = {
        next: a(0),
        throw: a(1),
        return: a(2)
    },
    typeof Symbol == "function" && (s[Symbol.iterator] = function() {
        return this
    }
    ),
    s;
    function a(c) {
        return function(u) {
            return l([c, u])
        }
    }
    function l(c) {
        if (n)
            throw new TypeError("Generator is already executing.");
        for (; r; )
            try {
                if (n = 1,
                i && (o = c[0] & 2 ? i.return : c[0] ? i.throw || ((o = i.return) && o.call(i),
                0) : i.next) && !(o = o.call(i, c[1])).done)
                    return o;
                switch (i = 0,
                o && (c = [c[0] & 2, o.value]),
                c[0]) {
                case 0:
                case 1:
                    o = c;
                    break;
                case 4:
                    return r.label++,
                    {
                        value: c[1],
                        done: !1
                    };
                case 5:
                    r.label++,
                    i = c[1],
                    c = [0];
                    continue;
                case 7:
                    c = r.ops.pop(),
                    r.trys.pop();
                    continue;
                default:
                    if (o = r.trys,
                    !(o = o.length > 0 && o[o.length - 1]) && (c[0] === 6 || c[0] === 2)) {
                        r = 0;
                        continue
                    }
                    if (c[0] === 3 && (!o || c[1] > o[0] && c[1] < o[3])) {
                        r.label = c[1];
                        break
                    }
                    if (c[0] === 6 && r.label < o[1]) {
                        r.label = o[1],
                        o = c;
                        break
                    }
                    if (o && r.label < o[2]) {
                        r.label = o[2],
                        r.ops.push(c);
                        break
                    }
                    o[2] && r.ops.pop(),
                    r.trys.pop();
                    continue
                }
                c = e.call(t, r)
            } catch (u) {
                c = [6, u],
                i = 0
            } finally {
                n = o = 0
            }
        if (c[0] & 5)
            throw c[1];
        return {
            value: c[0] ? c[1] : void 0,
            done: !0
        }
    }
}
, f2e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, Du = function() {
    function t(e, r, n) {
        r === void 0 && (r = 500),
        this.reader = e,
        this.timeBetweenScansMillis = r,
        this._hints = n,
        this._stopContinuousDecode = !1,
        this._stopAsyncDecode = !1,
        this._timeBetweenDecodingAttempts = 0
    }
    return Object.defineProperty(t.prototype, "hasNavigator", {
        get: function() {
            return typeof navigator < "u"
        },
        enumerable: !1,
        configurable: !0
    }),
    Object.defineProperty(t.prototype, "isMediaDevicesSuported", {
        get: function() {
            return this.hasNavigator && !!navigator.mediaDevices
        },
        enumerable: !1,
        configurable: !0
    }),
    Object.defineProperty(t.prototype, "canEnumerateDevices", {
        get: function() {
            return !!(this.isMediaDevicesSuported && navigator.mediaDevices.enumerateDevices)
        },
        enumerable: !1,
        configurable: !0
    }),
    Object.defineProperty(t.prototype, "timeBetweenDecodingAttempts", {
        get: function() {
            return this._timeBetweenDecodingAttempts
        },
        set: function(e) {
            this._timeBetweenDecodingAttempts = e < 0 ? 0 : e
        },
        enumerable: !1,
        configurable: !0
    }),
    Object.defineProperty(t.prototype, "hints", {
        get: function() {
            return this._hints
        },
        set: function(e) {
            this._hints = e || null
        },
        enumerable: !1,
        configurable: !0
    }),
    t.prototype.listVideoInputDevices = function() {
        return on(this, void 0, void 0, function() {
            var e, r, n, i, o, s, a, l, c, u, f, d;
            return sn(this, function(h) {
                switch (h.label) {
                case 0:
                    if (!this.hasNavigator)
                        throw new Error("Can't enumerate devices, navigator is not present.");
                    if (!this.canEnumerateDevices)
                        throw new Error("Can't enumerate devices, method not supported.");
                    return [4, navigator.mediaDevices.enumerateDevices()];
                case 1:
                    e = h.sent(),
                    r = [];
                    try {
                        for (n = f2e(e),
                        i = n.next(); !i.done; i = n.next())
                            o = i.value,
                            s = o.kind === "video" ? "videoinput" : o.kind,
                            s === "videoinput" && (a = o.deviceId || o.id,
                            l = o.label || "Video device " + (r.length + 1),
                            c = o.groupId,
                            u = {
                                deviceId: a,
                                label: l,
                                kind: s,
                                groupId: c
                            },
                            r.push(u))
                    } catch (x) {
                        f = {
                            error: x
                        }
                    } finally {
                        try {
                            i && !i.done && (d = n.return) && d.call(n)
                        } finally {
                            if (f)
                                throw f.error
                        }
                    }
                    return [2, r]
                }
            })
        })
    }
    ,
    t.prototype.getVideoInputDevices = function() {
        return on(this, void 0, void 0, function() {
            var e;
            return sn(this, function(r) {
                switch (r.label) {
                case 0:
                    return [4, this.listVideoInputDevices()];
                case 1:
                    return e = r.sent(),
                    [2, e.map(function(n) {
                        return new u2e(n.deviceId,n.label)
                    })]
                }
            })
        })
    }
    ,
    t.prototype.findDeviceById = function(e) {
        return on(this, void 0, void 0, function() {
            var r;
            return sn(this, function(n) {
                switch (n.label) {
                case 0:
                    return [4, this.listVideoInputDevices()];
                case 1:
                    return r = n.sent(),
                    r ? [2, r.find(function(i) {
                        return i.deviceId === e
                    })] : [2, null]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromInputVideoDevice = function(e, r) {
        return on(this, void 0, void 0, function() {
            return sn(this, function(n) {
                switch (n.label) {
                case 0:
                    return [4, this.decodeOnceFromVideoDevice(e, r)];
                case 1:
                    return [2, n.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeOnceFromVideoDevice = function(e, r) {
        return on(this, void 0, void 0, function() {
            var n, i;
            return sn(this, function(o) {
                switch (o.label) {
                case 0:
                    return this.reset(),
                    e ? n = {
                        deviceId: {
                            exact: e
                        }
                    } : n = {
                        facingMode: "environment"
                    },
                    i = {
                        video: n
                    },
                    [4, this.decodeOnceFromConstraints(i, r)];
                case 1:
                    return [2, o.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeOnceFromConstraints = function(e, r) {
        return on(this, void 0, void 0, function() {
            var n;
            return sn(this, function(i) {
                switch (i.label) {
                case 0:
                    return [4, navigator.mediaDevices.getUserMedia(e)];
                case 1:
                    return n = i.sent(),
                    [4, this.decodeOnceFromStream(n, r)];
                case 2:
                    return [2, i.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeOnceFromStream = function(e, r) {
        return on(this, void 0, void 0, function() {
            var n, i;
            return sn(this, function(o) {
                switch (o.label) {
                case 0:
                    return this.reset(),
                    [4, this.attachStreamToVideo(e, r)];
                case 1:
                    return n = o.sent(),
                    [4, this.decodeOnce(n)];
                case 2:
                    return i = o.sent(),
                    [2, i]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromInputVideoDeviceContinuously = function(e, r, n) {
        return on(this, void 0, void 0, function() {
            return sn(this, function(i) {
                switch (i.label) {
                case 0:
                    return [4, this.decodeFromVideoDevice(e, r, n)];
                case 1:
                    return [2, i.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromVideoDevice = function(e, r, n) {
        return on(this, void 0, void 0, function() {
            var i, o;
            return sn(this, function(s) {
                switch (s.label) {
                case 0:
                    return e ? i = {
                        deviceId: {
                            exact: e
                        }
                    } : i = {
                        facingMode: "environment"
                    },
                    o = {
                        video: i
                    },
                    [4, this.decodeFromConstraints(o, r, n)];
                case 1:
                    return [2, s.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromConstraints = function(e, r, n) {
        return on(this, void 0, void 0, function() {
            var i;
            return sn(this, function(o) {
                switch (o.label) {
                case 0:
                    return [4, navigator.mediaDevices.getUserMedia(e)];
                case 1:
                    return i = o.sent(),
                    [4, this.decodeFromStream(i, r, n)];
                case 2:
                    return [2, o.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromStream = function(e, r, n) {
        return on(this, void 0, void 0, function() {
            var i;
            return sn(this, function(o) {
                switch (o.label) {
                case 0:
                    return this.reset(),
                    [4, this.attachStreamToVideo(e, r)];
                case 1:
                    return i = o.sent(),
                    [4, this.decodeContinuously(i, n)];
                case 2:
                    return [2, o.sent()]
                }
            })
        })
    }
    ,
    t.prototype.stopAsyncDecode = function() {
        this._stopAsyncDecode = !0
    }
    ,
    t.prototype.stopContinuousDecode = function() {
        this._stopContinuousDecode = !0
    }
    ,
    t.prototype.attachStreamToVideo = function(e, r) {
        return on(this, void 0, void 0, function() {
            var n;
            return sn(this, function(i) {
                switch (i.label) {
                case 0:
                    return n = this.prepareVideoElement(r),
                    this.addVideoSource(n, e),
                    this.videoElement = n,
                    this.stream = e,
                    [4, this.playVideoOnLoadAsync(n)];
                case 1:
                    return i.sent(),
                    [2, n]
                }
            })
        })
    }
    ,
    t.prototype.playVideoOnLoadAsync = function(e) {
        var r = this;
        return new Promise(function(n, i) {
            return r.playVideoOnLoad(e, function() {
                return n()
            })
        }
        )
    }
    ,
    t.prototype.playVideoOnLoad = function(e, r) {
        var n = this;
        this.videoEndedListener = function() {
            return n.stopStreams()
        }
        ,
        this.videoCanPlayListener = function() {
            return n.tryPlayVideo(e)
        }
        ,
        e.addEventListener("ended", this.videoEndedListener),
        e.addEventListener("canplay", this.videoCanPlayListener),
        e.addEventListener("playing", r),
        this.tryPlayVideo(e)
    }
    ,
    t.prototype.isVideoPlaying = function(e) {
        return e.currentTime > 0 && !e.paused && !e.ended && e.readyState > 2
    }
    ,
    t.prototype.tryPlayVideo = function(e) {
        return on(this, void 0, void 0, function() {
            return sn(this, function(r) {
                switch (r.label) {
                case 0:
                    if (this.isVideoPlaying(e))
                        return console.warn("Trying to play video that is already playing."),
                        [2];
                    r.label = 1;
                case 1:
                    return r.trys.push([1, 3, , 4]),
                    [4, e.play()];
                case 2:
                    return r.sent(),
                    [3, 4];
                case 3:
                    return r.sent(),
                    console.warn("It was not possible to play the video."),
                    [3, 4];
                case 4:
                    return [2]
                }
            })
        })
    }
    ,
    t.prototype.getMediaElement = function(e, r) {
        var n = document.getElementById(e);
        if (!n)
            throw new ir("element with id '" + e + "' not found");
        if (n.nodeName.toLowerCase() !== r.toLowerCase())
            throw new ir("element with id '" + e + "' must be an " + r + " element");
        return n
    }
    ,
    t.prototype.decodeFromImage = function(e, r) {
        if (!e && !r)
            throw new ir("either imageElement with a src set or an url must be provided");
        return r && !e ? this.decodeFromImageUrl(r) : this.decodeFromImageElement(e)
    }
    ,
    t.prototype.decodeFromVideo = function(e, r) {
        if (!e && !r)
            throw new ir("Either an element with a src set or an URL must be provided");
        return r && !e ? this.decodeFromVideoUrl(r) : this.decodeFromVideoElement(e)
    }
    ,
    t.prototype.decodeFromVideoContinuously = function(e, r, n) {
        if (e === void 0 && r === void 0)
            throw new ir("Either an element with a src set or an URL must be provided");
        return r && !e ? this.decodeFromVideoUrlContinuously(r, n) : this.decodeFromVideoElementContinuously(e, n)
    }
    ,
    t.prototype.decodeFromImageElement = function(e) {
        if (!e)
            throw new ir("An image element must be provided.");
        this.reset();
        var r = this.prepareImageElement(e);
        this.imageElement = r;
        var n;
        return this.isImageLoaded(r) ? n = this.decodeOnce(r, !1, !0) : n = this._decodeOnLoadImage(r),
        n
    }
    ,
    t.prototype.decodeFromVideoElement = function(e) {
        var r = this._decodeFromVideoElementSetup(e);
        return this._decodeOnLoadVideo(r)
    }
    ,
    t.prototype.decodeFromVideoElementContinuously = function(e, r) {
        var n = this._decodeFromVideoElementSetup(e);
        return this._decodeOnLoadVideoContinuously(n, r)
    }
    ,
    t.prototype._decodeFromVideoElementSetup = function(e) {
        if (!e)
            throw new ir("A video element must be provided.");
        this.reset();
        var r = this.prepareVideoElement(e);
        return this.videoElement = r,
        r
    }
    ,
    t.prototype.decodeFromImageUrl = function(e) {
        if (!e)
            throw new ir("An URL must be provided.");
        this.reset();
        var r = this.prepareImageElement();
        this.imageElement = r;
        var n = this._decodeOnLoadImage(r);
        return r.src = e,
        n
    }
    ,
    t.prototype.decodeFromVideoUrl = function(e) {
        if (!e)
            throw new ir("An URL must be provided.");
        this.reset();
        var r = this.prepareVideoElement()
          , n = this.decodeFromVideoElement(r);
        return r.src = e,
        n
    }
    ,
    t.prototype.decodeFromVideoUrlContinuously = function(e, r) {
        if (!e)
            throw new ir("An URL must be provided.");
        this.reset();
        var n = this.prepareVideoElement()
          , i = this.decodeFromVideoElementContinuously(n, r);
        return n.src = e,
        i
    }
    ,
    t.prototype._decodeOnLoadImage = function(e) {
        var r = this;
        return new Promise(function(n, i) {
            r.imageLoadedListener = function() {
                return r.decodeOnce(e, !1, !0).then(n, i)
            }
            ,
            e.addEventListener("load", r.imageLoadedListener)
        }
        )
    }
    ,
    t.prototype._decodeOnLoadVideo = function(e) {
        return on(this, void 0, void 0, function() {
            return sn(this, function(r) {
                switch (r.label) {
                case 0:
                    return [4, this.playVideoOnLoadAsync(e)];
                case 1:
                    return r.sent(),
                    [4, this.decodeOnce(e)];
                case 2:
                    return [2, r.sent()]
                }
            })
        })
    }
    ,
    t.prototype._decodeOnLoadVideoContinuously = function(e, r) {
        return on(this, void 0, void 0, function() {
            return sn(this, function(n) {
                switch (n.label) {
                case 0:
                    return [4, this.playVideoOnLoadAsync(e)];
                case 1:
                    return n.sent(),
                    this.decodeContinuously(e, r),
                    [2]
                }
            })
        })
    }
    ,
    t.prototype.isImageLoaded = function(e) {
        return !(!e.complete || e.naturalWidth === 0)
    }
    ,
    t.prototype.prepareImageElement = function(e) {
        var r;
        return typeof e > "u" && (r = document.createElement("img"),
        r.width = 200,
        r.height = 200),
        typeof e == "string" && (r = this.getMediaElement(e, "img")),
        e instanceof HTMLImageElement && (r = e),
        r
    }
    ,
    t.prototype.prepareVideoElement = function(e) {
        var r;
        return !e && typeof document < "u" && (r = document.createElement("video"),
        r.width = 200,
        r.height = 200),
        typeof e == "string" && (r = this.getMediaElement(e, "video")),
        e instanceof HTMLVideoElement && (r = e),
        r.setAttribute("autoplay", "true"),
        r.setAttribute("muted", "true"),
        r.setAttribute("playsinline", "true"),
        r
    }
    ,
    t.prototype.decodeOnce = function(e, r, n) {
        var i = this;
        r === void 0 && (r = !0),
        n === void 0 && (n = !0),
        this._stopAsyncDecode = !1;
        var o = function(s, a) {
            if (i._stopAsyncDecode) {
                a(new le("Video stream has ended before any code could be detected.")),
                i._stopAsyncDecode = void 0;
                return
            }
            try {
                var l = i.decode(e);
                s(l)
            } catch (d) {
                var c = r && d instanceof le
                  , u = d instanceof fr || d instanceof ge
                  , f = u && n;
                if (c || f)
                    return setTimeout(o, i._timeBetweenDecodingAttempts, s, a);
                a(d)
            }
        };
        return new Promise(function(s, a) {
            return o(s, a)
        }
        )
    }
    ,
    t.prototype.decodeContinuously = function(e, r) {
        var n = this;
        this._stopContinuousDecode = !1;
        var i = function() {
            if (n._stopContinuousDecode) {
                n._stopContinuousDecode = void 0;
                return
            }
            try {
                var o = n.decode(e);
                r(o, null),
                setTimeout(i, n.timeBetweenScansMillis)
            } catch (l) {
                r(null, l);
                var s = l instanceof fr || l instanceof ge
                  , a = l instanceof le;
                (s || a) && setTimeout(i, n._timeBetweenDecodingAttempts)
            }
        };
        i()
    }
    ,
    t.prototype.decode = function(e) {
        var r = this.createBinaryBitmap(e);
        return this.decodeBitmap(r)
    }
    ,
    t.prototype.createBinaryBitmap = function(e) {
        this.getCaptureCanvasContext(e);
        var r = !1;
        e instanceof HTMLVideoElement ? (this.drawFrameOnCanvas(e),
        r = !0) : this.drawImageOnCanvas(e);
        var n = this.getCaptureCanvas(e)
          , i = new c2e(n,r)
          , o = new aM(i);
        return new sM(o)
    }
    ,
    t.prototype.getCaptureCanvasContext = function(e) {
        if (!this.captureCanvasContext) {
            var r = this.getCaptureCanvas(e)
              , n = void 0;
            try {
                n = r.getContext("2d", {
                    willReadFrequently: !0
                })
            } catch {
                n = r.getContext("2d")
            }
            this.captureCanvasContext = n
        }
        return this.captureCanvasContext
    }
    ,
    t.prototype.getCaptureCanvas = function(e) {
        if (!this.captureCanvas) {
            var r = this.createCaptureCanvas(e);
            this.captureCanvas = r
        }
        return this.captureCanvas
    }
    ,
    t.prototype.drawFrameOnCanvas = function(e, r, n) {
        r === void 0 && (r = {
            sx: 0,
            sy: 0,
            sWidth: e.videoWidth,
            sHeight: e.videoHeight,
            dx: 0,
            dy: 0,
            dWidth: e.videoWidth,
            dHeight: e.videoHeight
        }),
        n === void 0 && (n = this.captureCanvasContext),
        n.drawImage(e, r.sx, r.sy, r.sWidth, r.sHeight, r.dx, r.dy, r.dWidth, r.dHeight)
    }
    ,
    t.prototype.drawImageOnCanvas = function(e, r, n) {
        r === void 0 && (r = {
            sx: 0,
            sy: 0,
            sWidth: e.naturalWidth,
            sHeight: e.naturalHeight,
            dx: 0,
            dy: 0,
            dWidth: e.naturalWidth,
            dHeight: e.naturalHeight
        }),
        n === void 0 && (n = this.captureCanvasContext),
        n.drawImage(e, r.sx, r.sy, r.sWidth, r.sHeight, r.dx, r.dy, r.dWidth, r.dHeight)
    }
    ,
    t.prototype.decodeBitmap = function(e) {
        return this.reader.decode(e, this._hints)
    }
    ,
    t.prototype.createCaptureCanvas = function(e) {
        if (typeof document > "u")
            return this._destroyCaptureCanvas(),
            null;
        var r = document.createElement("canvas"), n, i;
        return typeof e < "u" && (e instanceof HTMLVideoElement ? (n = e.videoWidth,
        i = e.videoHeight) : e instanceof HTMLImageElement && (n = e.naturalWidth || e.width,
        i = e.naturalHeight || e.height)),
        r.style.width = n + "px",
        r.style.height = i + "px",
        r.width = n,
        r.height = i,
        r
    }
    ,
    t.prototype.stopStreams = function() {
        this.stream && (this.stream.getVideoTracks().forEach(function(e) {
            return e.stop()
        }),
        this.stream = void 0),
        this._stopAsyncDecode === !1 && this.stopAsyncDecode(),
        this._stopContinuousDecode === !1 && this.stopContinuousDecode()
    }
    ,
    t.prototype.reset = function() {
        this.stopStreams(),
        this._destroyVideoElement(),
        this._destroyImageElement(),
        this._destroyCaptureCanvas()
    }
    ,
    t.prototype._destroyVideoElement = function() {
        this.videoElement && (typeof this.videoEndedListener < "u" && this.videoElement.removeEventListener("ended", this.videoEndedListener),
        typeof this.videoPlayingEventListener < "u" && this.videoElement.removeEventListener("playing", this.videoPlayingEventListener),
        typeof this.videoCanPlayListener < "u" && this.videoElement.removeEventListener("loadedmetadata", this.videoCanPlayListener),
        this.cleanVideoSource(this.videoElement),
        this.videoElement = void 0)
    }
    ,
    t.prototype._destroyImageElement = function() {
        this.imageElement && (this.imageLoadedListener !== void 0 && this.imageElement.removeEventListener("load", this.imageLoadedListener),
        this.imageElement.src = void 0,
        this.imageElement.removeAttribute("src"),
        this.imageElement = void 0)
    }
    ,
    t.prototype._destroyCaptureCanvas = function() {
        this.captureCanvasContext = void 0,
        this.captureCanvas = void 0
    }
    ,
    t.prototype.addVideoSource = function(e, r) {
        try {
            e.srcObject = r
        } catch {
            e.src = URL.createObjectURL(r)
        }
    }
    ,
    t.prototype.cleanVideoSource = function(e) {
        try {
            e.srcObject = null
        } catch {
            e.src = ""
        }
        this.videoElement.removeAttribute("src")
    }
    ,
    t
}(), rn = function() {
    function t(e, r, n, i, o, s) {
        n === void 0 && (n = r == null ? 0 : 8 * r.length),
        s === void 0 && (s = Dt.currentTimeMillis()),
        this.text = e,
        this.rawBytes = r,
        this.numBits = n,
        this.resultPoints = i,
        this.format = o,
        this.timestamp = s,
        this.text = e,
        this.rawBytes = r,
        n == null ? this.numBits = r == null ? 0 : 8 * r.length : this.numBits = n,
        this.resultPoints = i,
        this.format = o,
        this.resultMetadata = null,
        s == null ? this.timestamp = Dt.currentTimeMillis() : this.timestamp = s
    }
    return t.prototype.getText = function() {
        return this.text
    }
    ,
    t.prototype.getRawBytes = function() {
        return this.rawBytes
    }
    ,
    t.prototype.getNumBits = function() {
        return this.numBits
    }
    ,
    t.prototype.getResultPoints = function() {
        return this.resultPoints
    }
    ,
    t.prototype.getBarcodeFormat = function() {
        return this.format
    }
    ,
    t.prototype.getResultMetadata = function() {
        return this.resultMetadata
    }
    ,
    t.prototype.putMetadata = function(e, r) {
        this.resultMetadata === null && (this.resultMetadata = new Map),
        this.resultMetadata.set(e, r)
    }
    ,
    t.prototype.putAllMetadata = function(e) {
        e !== null && (this.resultMetadata === null ? this.resultMetadata = e : this.resultMetadata = new Map(e))
    }
    ,
    t.prototype.addResultPoints = function(e) {
        var r = this.resultPoints;
        if (r === null)
            this.resultPoints = e;
        else if (e !== null && e.length > 0) {
            var n = new Array(r.length + e.length);
            Dt.arraycopy(r, 0, n, 0, r.length),
            Dt.arraycopy(e, 0, n, r.length, e.length),
            this.resultPoints = n
        }
    }
    ,
    t.prototype.getTimestamp = function() {
        return this.timestamp
    }
    ,
    t.prototype.toString = function() {
        return this.text
    }
    ,
    t
}(), NE;
(function(t) {
    t[t.AZTEC = 0] = "AZTEC",
    t[t.CODABAR = 1] = "CODABAR",
    t[t.CODE_39 = 2] = "CODE_39",
    t[t.CODE_93 = 3] = "CODE_93",
    t[t.CODE_128 = 4] = "CODE_128",
    t[t.DATA_MATRIX = 5] = "DATA_MATRIX",
    t[t.EAN_8 = 6] = "EAN_8",
    t[t.EAN_13 = 7] = "EAN_13",
    t[t.ITF = 8] = "ITF",
    t[t.MAXICODE = 9] = "MAXICODE",
    t[t.PDF_417 = 10] = "PDF_417",
    t[t.QR_CODE = 11] = "QR_CODE",
    t[t.RSS_14 = 12] = "RSS_14",
    t[t.RSS_EXPANDED = 13] = "RSS_EXPANDED",
    t[t.UPC_A = 14] = "UPC_A",
    t[t.UPC_E = 15] = "UPC_E",
    t[t.UPC_EAN_EXTENSION = 16] = "UPC_EAN_EXTENSION"
}
)(NE || (NE = {}));
const ke = NE;
var LE;
(function(t) {
    t[t.OTHER = 0] = "OTHER",
    t[t.ORIENTATION = 1] = "ORIENTATION",
    t[t.BYTE_SEGMENTS = 2] = "BYTE_SEGMENTS",
    t[t.ERROR_CORRECTION_LEVEL = 3] = "ERROR_CORRECTION_LEVEL",
    t[t.ISSUE_NUMBER = 4] = "ISSUE_NUMBER",
    t[t.SUGGESTED_PRICE = 5] = "SUGGESTED_PRICE",
    t[t.POSSIBLE_COUNTRY = 6] = "POSSIBLE_COUNTRY",
    t[t.UPC_EAN_EXTENSION = 7] = "UPC_EAN_EXTENSION",
    t[t.PDF417_EXTRA_METADATA = 8] = "PDF417_EXTRA_METADATA",
    t[t.STRUCTURED_APPEND_SEQUENCE = 9] = "STRUCTURED_APPEND_SEQUENCE",
    t[t.STRUCTURED_APPEND_PARITY = 10] = "STRUCTURED_APPEND_PARITY"
}
)(LE || (LE = {}));
const Hr = LE;
var I1 = function() {
    function t(e, r, n, i, o, s) {
        o === void 0 && (o = -1),
        s === void 0 && (s = -1),
        this.rawBytes = e,
        this.text = r,
        this.byteSegments = n,
        this.ecLevel = i,
        this.structuredAppendSequenceNumber = o,
        this.structuredAppendParity = s,
        this.numBits = e == null ? 0 : 8 * e.length
    }
    return t.prototype.getRawBytes = function() {
        return this.rawBytes
    }
    ,
    t.prototype.getNumBits = function() {
        return this.numBits
    }
    ,
    t.prototype.setNumBits = function(e) {
        this.numBits = e
    }
    ,
    t.prototype.getText = function() {
        return this.text
    }
    ,
    t.prototype.getByteSegments = function() {
        return this.byteSegments
    }
    ,
    t.prototype.getECLevel = function() {
        return this.ecLevel
    }
    ,
    t.prototype.getErrorsCorrected = function() {
        return this.errorsCorrected
    }
    ,
    t.prototype.setErrorsCorrected = function(e) {
        this.errorsCorrected = e
    }
    ,
    t.prototype.getErasures = function() {
        return this.erasures
    }
    ,
    t.prototype.setErasures = function(e) {
        this.erasures = e
    }
    ,
    t.prototype.getOther = function() {
        return this.other
    }
    ,
    t.prototype.setOther = function(e) {
        this.other = e
    }
    ,
    t.prototype.hasStructuredAppend = function() {
        return this.structuredAppendParity >= 0 && this.structuredAppendSequenceNumber >= 0
    }
    ,
    t.prototype.getStructuredAppendParity = function() {
        return this.structuredAppendParity
    }
    ,
    t.prototype.getStructuredAppendSequenceNumber = function() {
        return this.structuredAppendSequenceNumber
    }
    ,
    t
}(), x0 = function() {
    function t() {}
    return t.prototype.exp = function(e) {
        return this.expTable[e]
    }
    ,
    t.prototype.log = function(e) {
        if (e === 0)
            throw new Me;
        return this.logTable[e]
    }
    ,
    t.addOrSubtract = function(e, r) {
        return e ^ r
    }
    ,
    t
}(), ta = function() {
    function t(e, r) {
        if (r.length === 0)
            throw new Me;
        this.field = e;
        var n = r.length;
        if (n > 1 && r[0] === 0) {
            for (var i = 1; i < n && r[i] === 0; )
                i++;
            i === n ? this.coefficients = Int32Array.from([0]) : (this.coefficients = new Int32Array(n - i),
            Dt.arraycopy(r, i, this.coefficients, 0, this.coefficients.length))
        } else
            this.coefficients = r
    }
    return t.prototype.getCoefficients = function() {
        return this.coefficients
    }
    ,
    t.prototype.getDegree = function() {
        return this.coefficients.length - 1
    }
    ,
    t.prototype.isZero = function() {
        return this.coefficients[0] === 0
    }
    ,
    t.prototype.getCoefficient = function(e) {
        return this.coefficients[this.coefficients.length - 1 - e]
    }
    ,
    t.prototype.evaluateAt = function(e) {
        if (e === 0)
            return this.getCoefficient(0);
        var r = this.coefficients, n;
        if (e === 1) {
            n = 0;
            for (var i = 0, o = r.length; i !== o; i++) {
                var s = r[i];
                n = x0.addOrSubtract(n, s)
            }
            return n
        }
        n = r[0];
        for (var a = r.length, l = this.field, i = 1; i < a; i++)
            n = x0.addOrSubtract(l.multiply(e, n), r[i]);
        return n
    }
    ,
    t.prototype.addOrSubtract = function(e) {
        if (!this.field.equals(e.field))
            throw new Me("GenericGFPolys do not have same GenericGF field");
        if (this.isZero())
            return e;
        if (e.isZero())
            return this;
        var r = this.coefficients
          , n = e.coefficients;
        if (r.length > n.length) {
            var i = r;
            r = n,
            n = i
        }
        var o = new Int32Array(n.length)
          , s = n.length - r.length;
        Dt.arraycopy(n, 0, o, 0, s);
        for (var a = s; a < n.length; a++)
            o[a] = x0.addOrSubtract(r[a - s], n[a]);
        return new t(this.field,o)
    }
    ,
    t.prototype.multiply = function(e) {
        if (!this.field.equals(e.field))
            throw new Me("GenericGFPolys do not have same GenericGF field");
        if (this.isZero() || e.isZero())
            return this.field.getZero();
        for (var r = this.coefficients, n = r.length, i = e.coefficients, o = i.length, s = new Int32Array(n + o - 1), a = this.field, l = 0; l < n; l++)
            for (var c = r[l], u = 0; u < o; u++)
                s[l + u] = x0.addOrSubtract(s[l + u], a.multiply(c, i[u]));
        return new t(a,s)
    }
    ,
    t.prototype.multiplyScalar = function(e) {
        if (e === 0)
            return this.field.getZero();
        if (e === 1)
            return this;
        for (var r = this.coefficients.length, n = this.field, i = new Int32Array(r), o = this.coefficients, s = 0; s < r; s++)
            i[s] = n.multiply(o[s], e);
        return new t(n,i)
    }
    ,
    t.prototype.multiplyByMonomial = function(e, r) {
        if (e < 0)
            throw new Me;
        if (r === 0)
            return this.field.getZero();
        for (var n = this.coefficients, i = n.length, o = new Int32Array(i + e), s = this.field, a = 0; a < i; a++)
            o[a] = s.multiply(n[a], r);
        return new t(s,o)
    }
    ,
    t.prototype.divide = function(e) {
        if (!this.field.equals(e.field))
            throw new Me("GenericGFPolys do not have same GenericGF field");
        if (e.isZero())
            throw new Me("Divide by 0");
        for (var r = this.field, n = r.getZero(), i = this, o = e.getCoefficient(e.getDegree()), s = r.inverse(o); i.getDegree() >= e.getDegree() && !i.isZero(); ) {
            var a = i.getDegree() - e.getDegree()
              , l = r.multiply(i.getCoefficient(i.getDegree()), s)
              , c = e.multiplyByMonomial(a, l)
              , u = r.buildMonomial(a, l);
            n = n.addOrSubtract(u),
            i = i.addOrSubtract(c)
        }
        return [n, i]
    }
    ,
    t.prototype.toString = function() {
        for (var e = "", r = this.getDegree(); r >= 0; r--) {
            var n = this.getCoefficient(r);
            if (n !== 0) {
                if (n < 0 ? (e += " - ",
                n = -n) : e.length > 0 && (e += " + "),
                r === 0 || n !== 1) {
                    var i = this.field.log(n);
                    i === 0 ? e += "1" : i === 1 ? e += "a" : (e += "a^",
                    e += i)
                }
                r !== 0 && (r === 1 ? e += "x" : (e += "x^",
                e += r))
            }
        }
        return e
    }
    ,
    t
}(), d2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), lM = function(t) {
    d2e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "ArithmeticException",
    e
}(Mn), h2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), wn = function(t) {
    h2e(e, t);
    function e(r, n, i) {
        var o = t.call(this) || this;
        o.primitive = r,
        o.size = n,
        o.generatorBase = i;
        for (var s = new Int32Array(n), a = 1, l = 0; l < n; l++)
            s[l] = a,
            a *= 2,
            a >= n && (a ^= r,
            a &= n - 1);
        o.expTable = s;
        for (var c = new Int32Array(n), l = 0; l < n - 1; l++)
            c[s[l]] = l;
        return o.logTable = c,
        o.zero = new ta(o,Int32Array.from([0])),
        o.one = new ta(o,Int32Array.from([1])),
        o
    }
    return e.prototype.getZero = function() {
        return this.zero
    }
    ,
    e.prototype.getOne = function() {
        return this.one
    }
    ,
    e.prototype.buildMonomial = function(r, n) {
        if (r < 0)
            throw new Me;
        if (n === 0)
            return this.zero;
        var i = new Int32Array(r + 1);
        return i[0] = n,
        new ta(this,i)
    }
    ,
    e.prototype.inverse = function(r) {
        if (r === 0)
            throw new lM;
        return this.expTable[this.size - this.logTable[r] - 1]
    }
    ,
    e.prototype.multiply = function(r, n) {
        return r === 0 || n === 0 ? 0 : this.expTable[(this.logTable[r] + this.logTable[n]) % (this.size - 1)]
    }
    ,
    e.prototype.getSize = function() {
        return this.size
    }
    ,
    e.prototype.getGeneratorBase = function() {
        return this.generatorBase
    }
    ,
    e.prototype.toString = function() {
        return "GF(0x" + qe.toHexString(this.primitive) + "," + this.size + ")"
    }
    ,
    e.prototype.equals = function(r) {
        return r === this
    }
    ,
    e.AZTEC_DATA_12 = new e(4201,4096,1),
    e.AZTEC_DATA_10 = new e(1033,1024,1),
    e.AZTEC_DATA_6 = new e(67,64,1),
    e.AZTEC_PARAM = new e(19,16,1),
    e.QR_CODE_FIELD_256 = new e(285,256,0),
    e.DATA_MATRIX_FIELD_256 = new e(301,256,1),
    e.AZTEC_DATA_8 = e.DATA_MATRIX_FIELD_256,
    e.MAXICODE_FIELD_64 = e.AZTEC_DATA_6,
    e
}(x0), x2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), Bh = function(t) {
    x2e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "ReedSolomonException",
    e
}(Mn), p2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), Ed = function(t) {
    p2e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "IllegalStateException",
    e
}(Mn), O1 = function() {
    function t(e) {
        this.field = e
    }
    return t.prototype.decode = function(e, r) {
        for (var n = this.field, i = new ta(n,e), o = new Int32Array(r), s = !0, a = 0; a < r; a++) {
            var l = i.evaluateAt(n.exp(a + n.getGeneratorBase()));
            o[o.length - 1 - a] = l,
            l !== 0 && (s = !1)
        }
        if (!s)
            for (var c = new ta(n,o), u = this.runEuclideanAlgorithm(n.buildMonomial(r, 1), c, r), f = u[0], d = u[1], h = this.findErrorLocations(f), x = this.findErrorMagnitudes(d, h), a = 0; a < h.length; a++) {
                var y = e.length - 1 - n.log(h[a]);
                if (y < 0)
                    throw new Bh("Bad error location");
                e[y] = wn.addOrSubtract(e[y], x[a])
            }
    }
    ,
    t.prototype.runEuclideanAlgorithm = function(e, r, n) {
        if (e.getDegree() < r.getDegree()) {
            var i = e;
            e = r,
            r = i
        }
        for (var o = this.field, s = e, a = r, l = o.getZero(), c = o.getOne(); a.getDegree() >= (n / 2 | 0); ) {
            var u = s
              , f = l;
            if (s = a,
            l = c,
            s.isZero())
                throw new Bh("r_{i-1} was zero");
            a = u;
            for (var d = o.getZero(), h = s.getCoefficient(s.getDegree()), x = o.inverse(h); a.getDegree() >= s.getDegree() && !a.isZero(); ) {
                var y = a.getDegree() - s.getDegree()
                  , m = o.multiply(a.getCoefficient(a.getDegree()), x);
                d = d.addOrSubtract(o.buildMonomial(y, m)),
                a = a.addOrSubtract(s.multiplyByMonomial(y, m))
            }
            if (c = d.multiply(l).addOrSubtract(f),
            a.getDegree() >= s.getDegree())
                throw new Ed("Division algorithm failed to reduce polynomial?")
        }
        var E = c.getCoefficient(0);
        if (E === 0)
            throw new Bh("sigmaTilde(0) was zero");
        var g = o.inverse(E)
          , p = c.multiplyScalar(g)
          , v = a.multiplyScalar(g);
        return [p, v]
    }
    ,
    t.prototype.findErrorLocations = function(e) {
        var r = e.getDegree();
        if (r === 1)
            return Int32Array.from([e.getCoefficient(1)]);
        for (var n = new Int32Array(r), i = 0, o = this.field, s = 1; s < o.getSize() && i < r; s++)
            e.evaluateAt(s) === 0 && (n[i] = o.inverse(s),
            i++);
        if (i !== r)
            throw new Bh("Error locator degree does not match number of roots");
        return n
    }
    ,
    t.prototype.findErrorMagnitudes = function(e, r) {
        for (var n = r.length, i = new Int32Array(n), o = this.field, s = 0; s < n; s++) {
            for (var a = o.inverse(r[s]), l = 1, c = 0; c < n; c++)
                if (s !== c) {
                    var u = o.multiply(r[c], a)
                      , f = u & 1 ? u & -2 : u | 1;
                    l = o.multiply(l, f)
                }
            i[s] = o.multiply(e.evaluateAt(a), o.inverse(l)),
            o.getGeneratorBase() !== 0 && (i[s] = o.multiply(i[s], a))
        }
        return i
    }
    ,
    t
}(), Nr;
(function(t) {
    t[t.UPPER = 0] = "UPPER",
    t[t.LOWER = 1] = "LOWER",
    t[t.MIXED = 2] = "MIXED",
    t[t.DIGIT = 3] = "DIGIT",
    t[t.PUNCT = 4] = "PUNCT",
    t[t.BINARY = 5] = "BINARY"
}
)(Nr || (Nr = {}));
var K4 = function() {
    function t() {}
    return t.prototype.decode = function(e) {
        this.ddata = e;
        var r = e.getBits()
          , n = this.extractBits(r)
          , i = this.correctBits(n)
          , o = t.convertBoolArrayToByteArray(i)
          , s = t.getEncodedData(i)
          , a = new I1(o,s,null,null);
        return a.setNumBits(i.length),
        a
    }
    ,
    t.highLevelDecode = function(e) {
        return this.getEncodedData(e)
    }
    ,
    t.getEncodedData = function(e) {
        for (var r = e.length, n = Nr.UPPER, i = Nr.UPPER, o = "", s = 0; s < r; )
            if (i === Nr.BINARY) {
                if (r - s < 5)
                    break;
                var a = t.readCode(e, s, 5);
                if (s += 5,
                a === 0) {
                    if (r - s < 11)
                        break;
                    a = t.readCode(e, s, 11) + 31,
                    s += 11
                }
                for (var l = 0; l < a; l++) {
                    if (r - s < 8) {
                        s = r;
                        break
                    }
                    var c = t.readCode(e, s, 8);
                    o += nt.castAsNonUtf8Char(c),
                    s += 8
                }
                i = n
            } else {
                var u = i === Nr.DIGIT ? 4 : 5;
                if (r - s < u)
                    break;
                var c = t.readCode(e, s, u);
                s += u;
                var f = t.getCharacter(i, c);
                f.startsWith("CTRL_") ? (n = i,
                i = t.getTable(f.charAt(5)),
                f.charAt(6) === "L" && (n = i)) : (o += f,
                i = n)
            }
        return o
    }
    ,
    t.getTable = function(e) {
        switch (e) {
        case "L":
            return Nr.LOWER;
        case "P":
            return Nr.PUNCT;
        case "M":
            return Nr.MIXED;
        case "D":
            return Nr.DIGIT;
        case "B":
            return Nr.BINARY;
        case "U":
        default:
            return Nr.UPPER
        }
    }
    ,
    t.getCharacter = function(e, r) {
        switch (e) {
        case Nr.UPPER:
            return t.UPPER_TABLE[r];
        case Nr.LOWER:
            return t.LOWER_TABLE[r];
        case Nr.MIXED:
            return t.MIXED_TABLE[r];
        case Nr.PUNCT:
            return t.PUNCT_TABLE[r];
        case Nr.DIGIT:
            return t.DIGIT_TABLE[r];
        default:
            throw new Ed("Bad table")
        }
    }
    ,
    t.prototype.correctBits = function(e) {
        var r, n;
        this.ddata.getNbLayers() <= 2 ? (n = 6,
        r = wn.AZTEC_DATA_6) : this.ddata.getNbLayers() <= 8 ? (n = 8,
        r = wn.AZTEC_DATA_8) : this.ddata.getNbLayers() <= 22 ? (n = 10,
        r = wn.AZTEC_DATA_10) : (n = 12,
        r = wn.AZTEC_DATA_12);
        var i = this.ddata.getNbDatablocks()
          , o = e.length / n;
        if (o < i)
            throw new ge;
        for (var s = e.length % n, a = new Int32Array(o), l = 0; l < o; l++,
        s += n)
            a[l] = t.readCode(e, s, n);
        try {
            var c = new O1(r);
            c.decode(a, o - i)
        } catch (m) {
            throw new ge(m)
        }
        for (var u = (1 << n) - 1, f = 0, l = 0; l < i; l++) {
            var d = a[l];
            if (d === 0 || d === u)
                throw new ge;
            (d === 1 || d === u - 1) && f++
        }
        for (var h = new Array(i * n - f), x = 0, l = 0; l < i; l++) {
            var d = a[l];
            if (d === 1 || d === u - 1)
                h.fill(d > 1, x, x + n - 1),
                x += n - 1;
            else
                for (var y = n - 1; y >= 0; --y)
                    h[x++] = (d & 1 << y) !== 0
        }
        return h
    }
    ,
    t.prototype.extractBits = function(e) {
        var r = this.ddata.isCompact()
          , n = this.ddata.getNbLayers()
          , i = (r ? 11 : 14) + n * 4
          , o = new Int32Array(i)
          , s = new Array(this.totalBitsInLayer(n, r));
        if (r)
            for (var a = 0; a < o.length; a++)
                o[a] = a;
        else
            for (var l = i + 1 + 2 * qe.truncDivision(qe.truncDivision(i, 2) - 1, 15), c = i / 2, u = qe.truncDivision(l, 2), a = 0; a < c; a++) {
                var f = a + qe.truncDivision(a, 15);
                o[c - a - 1] = u - f - 1,
                o[c + a] = u + f + 1
            }
        for (var a = 0, d = 0; a < n; a++) {
            for (var h = (n - a) * 4 + (r ? 9 : 12), x = a * 2, y = i - 1 - x, m = 0; m < h; m++)
                for (var E = m * 2, g = 0; g < 2; g++)
                    s[d + E + g] = e.get(o[x + g], o[x + m]),
                    s[d + 2 * h + E + g] = e.get(o[x + m], o[y - g]),
                    s[d + 4 * h + E + g] = e.get(o[y - g], o[y - m]),
                    s[d + 6 * h + E + g] = e.get(o[y - m], o[x + g]);
            d += h * 8
        }
        return s
    }
    ,
    t.readCode = function(e, r, n) {
        for (var i = 0, o = r; o < r + n; o++)
            i <<= 1,
            e[o] && (i |= 1);
        return i
    }
    ,
    t.readByte = function(e, r) {
        var n = e.length - r;
        return n >= 8 ? t.readCode(e, r, 8) : t.readCode(e, r, n) << 8 - n
    }
    ,
    t.convertBoolArrayToByteArray = function(e) {
        for (var r = new Uint8Array((e.length + 7) / 8), n = 0; n < r.length; n++)
            r[n] = t.readByte(e, 8 * n);
        return r
    }
    ,
    t.prototype.totalBitsInLayer = function(e, r) {
        return ((r ? 88 : 112) + 16 * e) * e
    }
    ,
    t.UPPER_TABLE = ["CTRL_PS", " ", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "CTRL_LL", "CTRL_ML", "CTRL_DL", "CTRL_BS"],
    t.LOWER_TABLE = ["CTRL_PS", " ", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "CTRL_US", "CTRL_ML", "CTRL_DL", "CTRL_BS"],
    t.MIXED_TABLE = ["CTRL_PS", " ", "", "", "", "", "", "", "\x07", "\b", "	", `
`, "\v", "\f", "\r", "\x1B", "", "", "", "", "@", "\\", "^", "_", "`", "|", "~", "", "CTRL_LL", "CTRL_UL", "CTRL_PL", "CTRL_BS"],
    t.PUNCT_TABLE = ["", "\r", `\r
`, ". ", ", ", ": ", "!", '"', "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", ":", ";", "<", "=", ">", "?", "[", "]", "{", "}", "CTRL_UL"],
    t.DIGIT_TABLE = ["CTRL_PS", " ", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ",", ".", "CTRL_UL", "CTRL_US"],
    t
}()
  , ft = function() {
    function t() {}
    return t.round = function(e) {
        return isNaN(e) ? 0 : e <= Number.MIN_SAFE_INTEGER ? Number.MIN_SAFE_INTEGER : e >= Number.MAX_SAFE_INTEGER ? Number.MAX_SAFE_INTEGER : e + (e < 0 ? -.5 : .5) | 0
    }
    ,
    t.distance = function(e, r, n, i) {
        var o = e - n
          , s = r - i;
        return Math.sqrt(o * o + s * s)
    }
    ,
    t.sum = function(e) {
        for (var r = 0, n = 0, i = e.length; n !== i; n++) {
            var o = e[n];
            r += o
        }
        return r
    }
    ,
    t
}()
  , $E = function() {
    function t() {}
    return t.floatToIntBits = function(e) {
        return e
    }
    ,
    t.MAX_VALUE = Number.MAX_SAFE_INTEGER,
    t
}()
  , Te = function() {
    function t(e, r) {
        this.x = e,
        this.y = r
    }
    return t.prototype.getX = function() {
        return this.x
    }
    ,
    t.prototype.getY = function() {
        return this.y
    }
    ,
    t.prototype.equals = function(e) {
        if (e instanceof t) {
            var r = e;
            return this.x === r.x && this.y === r.y
        }
        return !1
    }
    ,
    t.prototype.hashCode = function() {
        return 31 * $E.floatToIntBits(this.x) + $E.floatToIntBits(this.y)
    }
    ,
    t.prototype.toString = function() {
        return "(" + this.x + "," + this.y + ")"
    }
    ,
    t.orderBestPatterns = function(e) {
        var r = this.distance(e[0], e[1]), n = this.distance(e[1], e[2]), i = this.distance(e[0], e[2]), o, s, a;
        if (n >= r && n >= i ? (s = e[0],
        o = e[1],
        a = e[2]) : i >= n && i >= r ? (s = e[1],
        o = e[0],
        a = e[2]) : (s = e[2],
        o = e[0],
        a = e[1]),
        this.crossProductZ(o, s, a) < 0) {
            var l = o;
            o = a,
            a = l
        }
        e[0] = o,
        e[1] = s,
        e[2] = a
    }
    ,
    t.distance = function(e, r) {
        return ft.distance(e.x, e.y, r.x, r.y)
    }
    ,
    t.crossProductZ = function(e, r, n) {
        var i = r.x
          , o = r.y;
        return (n.x - i) * (e.y - o) - (n.y - o) * (e.x - i)
    }
    ,
    t
}()
  , bC = function() {
    function t(e, r) {
        this.bits = e,
        this.points = r
    }
    return t.prototype.getBits = function() {
        return this.bits
    }
    ,
    t.prototype.getPoints = function() {
        return this.points
    }
    ,
    t
}()
  , g2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , m2e = function(t) {
    g2e(e, t);
    function e(r, n, i, o, s) {
        var a = t.call(this, r, n) || this;
        return a.compact = i,
        a.nbDatablocks = o,
        a.nbLayers = s,
        a
    }
    return e.prototype.getNbLayers = function() {
        return this.nbLayers
    }
    ,
    e.prototype.getNbDatablocks = function() {
        return this.nbDatablocks
    }
    ,
    e.prototype.isCompact = function() {
        return this.compact
    }
    ,
    e
}(bC)
  , UE = function() {
    function t(e, r, n, i) {
        this.image = e,
        this.height = e.getHeight(),
        this.width = e.getWidth(),
        r == null && (r = t.INIT_SIZE),
        n == null && (n = e.getWidth() / 2 | 0),
        i == null && (i = e.getHeight() / 2 | 0);
        var o = r / 2 | 0;
        if (this.leftInit = n - o,
        this.rightInit = n + o,
        this.upInit = i - o,
        this.downInit = i + o,
        this.upInit < 0 || this.leftInit < 0 || this.downInit >= this.height || this.rightInit >= this.width)
            throw new le
    }
    return t.prototype.detect = function() {
        for (var e = this.leftInit, r = this.rightInit, n = this.upInit, i = this.downInit, o = !1, s = !0, a = !1, l = !1, c = !1, u = !1, f = !1, d = this.width, h = this.height; s; ) {
            s = !1;
            for (var x = !0; (x || !l) && r < d; )
                x = this.containsBlackPoint(n, i, r, !1),
                x ? (r++,
                s = !0,
                l = !0) : l || r++;
            if (r >= d) {
                o = !0;
                break
            }
            for (var y = !0; (y || !c) && i < h; )
                y = this.containsBlackPoint(e, r, i, !0),
                y ? (i++,
                s = !0,
                c = !0) : c || i++;
            if (i >= h) {
                o = !0;
                break
            }
            for (var m = !0; (m || !u) && e >= 0; )
                m = this.containsBlackPoint(n, i, e, !1),
                m ? (e--,
                s = !0,
                u = !0) : u || e--;
            if (e < 0) {
                o = !0;
                break
            }
            for (var E = !0; (E || !f) && n >= 0; )
                E = this.containsBlackPoint(e, r, n, !0),
                E ? (n--,
                s = !0,
                f = !0) : f || n--;
            if (n < 0) {
                o = !0;
                break
            }
            s && (a = !0)
        }
        if (!o && a) {
            for (var g = r - e, p = null, v = 1; p === null && v < g; v++)
                p = this.getBlackPointOnSegment(e, i - v, e + v, i);
            if (p == null)
                throw new le;
            for (var _ = null, v = 1; _ === null && v < g; v++)
                _ = this.getBlackPointOnSegment(e, n + v, e + v, n);
            if (_ == null)
                throw new le;
            for (var b = null, v = 1; b === null && v < g; v++)
                b = this.getBlackPointOnSegment(r, n + v, r - v, n);
            if (b == null)
                throw new le;
            for (var C = null, v = 1; C === null && v < g; v++)
                C = this.getBlackPointOnSegment(r, i - v, r - v, i);
            if (C == null)
                throw new le;
            return this.centerEdges(C, p, b, _)
        } else
            throw new le
    }
    ,
    t.prototype.getBlackPointOnSegment = function(e, r, n, i) {
        for (var o = ft.round(ft.distance(e, r, n, i)), s = (n - e) / o, a = (i - r) / o, l = this.image, c = 0; c < o; c++) {
            var u = ft.round(e + c * s)
              , f = ft.round(r + c * a);
            if (l.get(u, f))
                return new Te(u,f)
        }
        return null
    }
    ,
    t.prototype.centerEdges = function(e, r, n, i) {
        var o = e.getX()
          , s = e.getY()
          , a = r.getX()
          , l = r.getY()
          , c = n.getX()
          , u = n.getY()
          , f = i.getX()
          , d = i.getY()
          , h = t.CORR;
        return o < this.width / 2 ? [new Te(f - h,d + h), new Te(a + h,l + h), new Te(c - h,u - h), new Te(o + h,s - h)] : [new Te(f + h,d + h), new Te(a + h,l - h), new Te(c - h,u + h), new Te(o - h,s - h)]
    }
    ,
    t.prototype.containsBlackPoint = function(e, r, n, i) {
        var o = this.image;
        if (i) {
            for (var s = e; s <= r; s++)
                if (o.get(s, n))
                    return !0
        } else
            for (var a = e; a <= r; a++)
                if (o.get(n, a))
                    return !0;
        return !1
    }
    ,
    t.INIT_SIZE = 10,
    t.CORR = 1,
    t
}()
  , q4 = function() {
    function t() {}
    return t.checkAndNudgePoints = function(e, r) {
        for (var n = e.getWidth(), i = e.getHeight(), o = !0, s = 0; s < r.length && o; s += 2) {
            var a = Math.floor(r[s])
              , l = Math.floor(r[s + 1]);
            if (a < -1 || a > n || l < -1 || l > i)
                throw new le;
            o = !1,
            a === -1 ? (r[s] = 0,
            o = !0) : a === n && (r[s] = n - 1,
            o = !0),
            l === -1 ? (r[s + 1] = 0,
            o = !0) : l === i && (r[s + 1] = i - 1,
            o = !0)
        }
        o = !0;
        for (var s = r.length - 2; s >= 0 && o; s -= 2) {
            var a = Math.floor(r[s])
              , l = Math.floor(r[s + 1]);
            if (a < -1 || a > n || l < -1 || l > i)
                throw new le;
            o = !1,
            a === -1 ? (r[s] = 0,
            o = !0) : a === n && (r[s] = n - 1,
            o = !0),
            l === -1 ? (r[s + 1] = 0,
            o = !0) : l === i && (r[s + 1] = i - 1,
            o = !0)
        }
    }
    ,
    t
}()
  , cM = function() {
    function t(e, r, n, i, o, s, a, l, c) {
        this.a11 = e,
        this.a21 = r,
        this.a31 = n,
        this.a12 = i,
        this.a22 = o,
        this.a32 = s,
        this.a13 = a,
        this.a23 = l,
        this.a33 = c
    }
    return t.quadrilateralToQuadrilateral = function(e, r, n, i, o, s, a, l, c, u, f, d, h, x, y, m) {
        var E = t.quadrilateralToSquare(e, r, n, i, o, s, a, l)
          , g = t.squareToQuadrilateral(c, u, f, d, h, x, y, m);
        return g.times(E)
    }
    ,
    t.prototype.transformPoints = function(e) {
        for (var r = e.length, n = this.a11, i = this.a12, o = this.a13, s = this.a21, a = this.a22, l = this.a23, c = this.a31, u = this.a32, f = this.a33, d = 0; d < r; d += 2) {
            var h = e[d]
              , x = e[d + 1]
              , y = o * h + l * x + f;
            e[d] = (n * h + s * x + c) / y,
            e[d + 1] = (i * h + a * x + u) / y
        }
    }
    ,
    t.prototype.transformPointsWithValues = function(e, r) {
        for (var n = this.a11, i = this.a12, o = this.a13, s = this.a21, a = this.a22, l = this.a23, c = this.a31, u = this.a32, f = this.a33, d = e.length, h = 0; h < d; h++) {
            var x = e[h]
              , y = r[h]
              , m = o * x + l * y + f;
            e[h] = (n * x + s * y + c) / m,
            r[h] = (i * x + a * y + u) / m
        }
    }
    ,
    t.squareToQuadrilateral = function(e, r, n, i, o, s, a, l) {
        var c = e - n + o - a
          , u = r - i + s - l;
        if (c === 0 && u === 0)
            return new t(n - e,o - n,e,i - r,s - i,r,0,0,1);
        var f = n - o
          , d = a - o
          , h = i - s
          , x = l - s
          , y = f * x - d * h
          , m = (c * x - d * u) / y
          , E = (f * u - c * h) / y;
        return new t(n - e + m * n,a - e + E * a,e,i - r + m * i,l - r + E * l,r,m,E,1)
    }
    ,
    t.quadrilateralToSquare = function(e, r, n, i, o, s, a, l) {
        return t.squareToQuadrilateral(e, r, n, i, o, s, a, l).buildAdjoint()
    }
    ,
    t.prototype.buildAdjoint = function() {
        return new t(this.a22 * this.a33 - this.a23 * this.a32,this.a23 * this.a31 - this.a21 * this.a33,this.a21 * this.a32 - this.a22 * this.a31,this.a13 * this.a32 - this.a12 * this.a33,this.a11 * this.a33 - this.a13 * this.a31,this.a12 * this.a31 - this.a11 * this.a32,this.a12 * this.a23 - this.a13 * this.a22,this.a13 * this.a21 - this.a11 * this.a23,this.a11 * this.a22 - this.a12 * this.a21)
    }
    ,
    t.prototype.times = function(e) {
        return new t(this.a11 * e.a11 + this.a21 * e.a12 + this.a31 * e.a13,this.a11 * e.a21 + this.a21 * e.a22 + this.a31 * e.a23,this.a11 * e.a31 + this.a21 * e.a32 + this.a31 * e.a33,this.a12 * e.a11 + this.a22 * e.a12 + this.a32 * e.a13,this.a12 * e.a21 + this.a22 * e.a22 + this.a32 * e.a23,this.a12 * e.a31 + this.a22 * e.a32 + this.a32 * e.a33,this.a13 * e.a11 + this.a23 * e.a12 + this.a33 * e.a13,this.a13 * e.a21 + this.a23 * e.a22 + this.a33 * e.a23,this.a13 * e.a31 + this.a23 * e.a32 + this.a33 * e.a33)
    }
    ,
    t
}()
  , v2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , y2e = function(t) {
    v2e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.prototype.sampleGrid = function(r, n, i, o, s, a, l, c, u, f, d, h, x, y, m, E, g, p, v) {
        var _ = cM.quadrilateralToQuadrilateral(o, s, a, l, c, u, f, d, h, x, y, m, E, g, p, v);
        return this.sampleGridWithTransform(r, n, i, _)
    }
    ,
    e.prototype.sampleGridWithTransform = function(r, n, i, o) {
        if (n <= 0 || i <= 0)
            throw new le;
        for (var s = new Ao(n,i), a = new Float32Array(2 * n), l = 0; l < i; l++) {
            for (var c = a.length, u = l + .5, f = 0; f < c; f += 2)
                a[f] = f / 2 + .5,
                a[f + 1] = u;
            o.transformPoints(a),
            q4.checkAndNudgePoints(r, a);
            try {
                for (var f = 0; f < c; f += 2)
                    r.get(Math.floor(a[f]), Math.floor(a[f + 1])) && s.set(f / 2, l)
            } catch {
                throw new le
            }
        }
        return s
    }
    ,
    e
}(q4)
  , CC = function() {
    function t() {}
    return t.setGridSampler = function(e) {
        t.gridSampler = e
    }
    ,
    t.getInstance = function() {
        return t.gridSampler
    }
    ,
    t.gridSampler = new y2e,
    t
}()
  , yn = function() {
    function t(e, r) {
        this.x = e,
        this.y = r
    }
    return t.prototype.toResultPoint = function() {
        return new Te(this.getX(),this.getY())
    }
    ,
    t.prototype.getX = function() {
        return this.x
    }
    ,
    t.prototype.getY = function() {
        return this.y
    }
    ,
    t
}()
  , E2e = function() {
    function t(e) {
        this.EXPECTED_CORNER_BITS = new Int32Array([3808, 476, 2107, 1799]),
        this.image = e
    }
    return t.prototype.detect = function() {
        return this.detectMirror(!1)
    }
    ,
    t.prototype.detectMirror = function(e) {
        var r = this.getMatrixCenter()
          , n = this.getBullsEyeCorners(r);
        if (e) {
            var i = n[0];
            n[0] = n[2],
            n[2] = i
        }
        this.extractParameters(n);
        var o = this.sampleGrid(this.image, n[this.shift % 4], n[(this.shift + 1) % 4], n[(this.shift + 2) % 4], n[(this.shift + 3) % 4])
          , s = this.getMatrixCornerPoints(n);
        return new m2e(o,s,this.compact,this.nbDataBlocks,this.nbLayers)
    }
    ,
    t.prototype.extractParameters = function(e) {
        if (!this.isValidPoint(e[0]) || !this.isValidPoint(e[1]) || !this.isValidPoint(e[2]) || !this.isValidPoint(e[3]))
            throw new le;
        var r = 2 * this.nbCenterLayers
          , n = new Int32Array([this.sampleLine(e[0], e[1], r), this.sampleLine(e[1], e[2], r), this.sampleLine(e[2], e[3], r), this.sampleLine(e[3], e[0], r)]);
        this.shift = this.getRotation(n, r);
        for (var i = 0, o = 0; o < 4; o++) {
            var s = n[(this.shift + o) % 4];
            this.compact ? (i <<= 7,
            i += s >> 1 & 127) : (i <<= 10,
            i += (s >> 2 & 992) + (s >> 1 & 31))
        }
        var a = this.getCorrectedParameterData(i, this.compact);
        this.compact ? (this.nbLayers = (a >> 6) + 1,
        this.nbDataBlocks = (a & 63) + 1) : (this.nbLayers = (a >> 11) + 1,
        this.nbDataBlocks = (a & 2047) + 1)
    }
    ,
    t.prototype.getRotation = function(e, r) {
        var n = 0;
        e.forEach(function(o, s, a) {
            var l = (o >> r - 2 << 1) + (o & 1);
            n = (n << 3) + l
        }),
        n = ((n & 1) << 11) + (n >> 1);
        for (var i = 0; i < 4; i++)
            if (qe.bitCount(n ^ this.EXPECTED_CORNER_BITS[i]) <= 2)
                return i;
        throw new le
    }
    ,
    t.prototype.getCorrectedParameterData = function(e, r) {
        var n, i;
        r ? (n = 7,
        i = 2) : (n = 10,
        i = 4);
        for (var o = n - i, s = new Int32Array(n), a = n - 1; a >= 0; --a)
            s[a] = e & 15,
            e >>= 4;
        try {
            var l = new O1(wn.AZTEC_PARAM);
            l.decode(s, o)
        } catch {
            throw new le
        }
        for (var c = 0, a = 0; a < i; a++)
            c = (c << 4) + s[a];
        return c
    }
    ,
    t.prototype.getBullsEyeCorners = function(e) {
        var r = e
          , n = e
          , i = e
          , o = e
          , s = !0;
        for (this.nbCenterLayers = 1; this.nbCenterLayers < 9; this.nbCenterLayers++) {
            var a = this.getFirstDifferent(r, s, 1, -1)
              , l = this.getFirstDifferent(n, s, 1, 1)
              , c = this.getFirstDifferent(i, s, -1, 1)
              , u = this.getFirstDifferent(o, s, -1, -1);
            if (this.nbCenterLayers > 2) {
                var f = this.distancePoint(u, a) * this.nbCenterLayers / (this.distancePoint(o, r) * (this.nbCenterLayers + 2));
                if (f < .75 || f > 1.25 || !this.isWhiteOrBlackRectangle(a, l, c, u))
                    break
            }
            r = a,
            n = l,
            i = c,
            o = u,
            s = !s
        }
        if (this.nbCenterLayers !== 5 && this.nbCenterLayers !== 7)
            throw new le;
        this.compact = this.nbCenterLayers === 5;
        var d = new Te(r.getX() + .5,r.getY() - .5)
          , h = new Te(n.getX() + .5,n.getY() + .5)
          , x = new Te(i.getX() - .5,i.getY() + .5)
          , y = new Te(o.getX() - .5,o.getY() - .5);
        return this.expandSquare([d, h, x, y], 2 * this.nbCenterLayers - 3, 2 * this.nbCenterLayers)
    }
    ,
    t.prototype.getMatrixCenter = function() {
        var e, r, n, i;
        try {
            var o = new UE(this.image).detect();
            e = o[0],
            r = o[1],
            n = o[2],
            i = o[3]
        } catch {
            var s = this.image.getWidth() / 2
              , a = this.image.getHeight() / 2;
            e = this.getFirstDifferent(new yn(s + 7,a - 7), !1, 1, -1).toResultPoint(),
            r = this.getFirstDifferent(new yn(s + 7,a + 7), !1, 1, 1).toResultPoint(),
            n = this.getFirstDifferent(new yn(s - 7,a + 7), !1, -1, 1).toResultPoint(),
            i = this.getFirstDifferent(new yn(s - 7,a - 7), !1, -1, -1).toResultPoint()
        }
        var l = ft.round((e.getX() + i.getX() + r.getX() + n.getX()) / 4)
          , c = ft.round((e.getY() + i.getY() + r.getY() + n.getY()) / 4);
        try {
            var o = new UE(this.image,15,l,c).detect();
            e = o[0],
            r = o[1],
            n = o[2],
            i = o[3]
        } catch {
            e = this.getFirstDifferent(new yn(l + 7,c - 7), !1, 1, -1).toResultPoint(),
            r = this.getFirstDifferent(new yn(l + 7,c + 7), !1, 1, 1).toResultPoint(),
            n = this.getFirstDifferent(new yn(l - 7,c + 7), !1, -1, 1).toResultPoint(),
            i = this.getFirstDifferent(new yn(l - 7,c - 7), !1, -1, -1).toResultPoint()
        }
        return l = ft.round((e.getX() + i.getX() + r.getX() + n.getX()) / 4),
        c = ft.round((e.getY() + i.getY() + r.getY() + n.getY()) / 4),
        new yn(l,c)
    }
    ,
    t.prototype.getMatrixCornerPoints = function(e) {
        return this.expandSquare(e, 2 * this.nbCenterLayers, this.getDimension())
    }
    ,
    t.prototype.sampleGrid = function(e, r, n, i, o) {
        var s = CC.getInstance()
          , a = this.getDimension()
          , l = a / 2 - this.nbCenterLayers
          , c = a / 2 + this.nbCenterLayers;
        return s.sampleGrid(e, a, a, l, l, c, l, c, c, l, c, r.getX(), r.getY(), n.getX(), n.getY(), i.getX(), i.getY(), o.getX(), o.getY())
    }
    ,
    t.prototype.sampleLine = function(e, r, n) {
        for (var i = 0, o = this.distanceResultPoint(e, r), s = o / n, a = e.getX(), l = e.getY(), c = s * (r.getX() - e.getX()) / o, u = s * (r.getY() - e.getY()) / o, f = 0; f < n; f++)
            this.image.get(ft.round(a + f * c), ft.round(l + f * u)) && (i |= 1 << n - f - 1);
        return i
    }
    ,
    t.prototype.isWhiteOrBlackRectangle = function(e, r, n, i) {
        var o = 3;
        e = new yn(e.getX() - o,e.getY() + o),
        r = new yn(r.getX() - o,r.getY() - o),
        n = new yn(n.getX() + o,n.getY() - o),
        i = new yn(i.getX() + o,i.getY() + o);
        var s = this.getColor(i, e);
        if (s === 0)
            return !1;
        var a = this.getColor(e, r);
        return a !== s || (a = this.getColor(r, n),
        a !== s) ? !1 : (a = this.getColor(n, i),
        a === s)
    }
    ,
    t.prototype.getColor = function(e, r) {
        for (var n = this.distancePoint(e, r), i = (r.getX() - e.getX()) / n, o = (r.getY() - e.getY()) / n, s = 0, a = e.getX(), l = e.getY(), c = this.image.get(e.getX(), e.getY()), u = Math.ceil(n), f = 0; f < u; f++)
            a += i,
            l += o,
            this.image.get(ft.round(a), ft.round(l)) !== c && s++;
        var d = s / n;
        return d > .1 && d < .9 ? 0 : d <= .1 === c ? 1 : -1
    }
    ,
    t.prototype.getFirstDifferent = function(e, r, n, i) {
        for (var o = e.getX() + n, s = e.getY() + i; this.isValid(o, s) && this.image.get(o, s) === r; )
            o += n,
            s += i;
        for (o -= n,
        s -= i; this.isValid(o, s) && this.image.get(o, s) === r; )
            o += n;
        for (o -= n; this.isValid(o, s) && this.image.get(o, s) === r; )
            s += i;
        return s -= i,
        new yn(o,s)
    }
    ,
    t.prototype.expandSquare = function(e, r, n) {
        var i = n / (2 * r)
          , o = e[0].getX() - e[2].getX()
          , s = e[0].getY() - e[2].getY()
          , a = (e[0].getX() + e[2].getX()) / 2
          , l = (e[0].getY() + e[2].getY()) / 2
          , c = new Te(a + i * o,l + i * s)
          , u = new Te(a - i * o,l - i * s);
        o = e[1].getX() - e[3].getX(),
        s = e[1].getY() - e[3].getY(),
        a = (e[1].getX() + e[3].getX()) / 2,
        l = (e[1].getY() + e[3].getY()) / 2;
        var f = new Te(a + i * o,l + i * s)
          , d = new Te(a - i * o,l - i * s)
          , h = [c, f, u, d];
        return h
    }
    ,
    t.prototype.isValid = function(e, r) {
        return e >= 0 && e < this.image.getWidth() && r > 0 && r < this.image.getHeight()
    }
    ,
    t.prototype.isValidPoint = function(e) {
        var r = ft.round(e.getX())
          , n = ft.round(e.getY());
        return this.isValid(r, n)
    }
    ,
    t.prototype.distancePoint = function(e, r) {
        return ft.distance(e.getX(), e.getY(), r.getX(), r.getY())
    }
    ,
    t.prototype.distanceResultPoint = function(e, r) {
        return ft.distance(e.getX(), e.getY(), r.getX(), r.getY())
    }
    ,
    t.prototype.getDimension = function() {
        return this.compact ? 4 * this.nbLayers + 11 : this.nbLayers <= 4 ? 4 * this.nbLayers + 15 : 4 * this.nbLayers + 2 * (qe.truncDivision(this.nbLayers - 4, 8) + 1) + 15
    }
    ,
    t
}()
  , Jx = function() {
    function t() {}
    return t.prototype.decode = function(e, r) {
        r === void 0 && (r = null);
        var n = null
          , i = new E2e(e.getBlackMatrix())
          , o = null
          , s = null;
        try {
            var a = i.detectMirror(!1);
            o = a.getPoints(),
            this.reportFoundResultPoints(r, o),
            s = new K4().decode(a)
        } catch (f) {
            n = f
        }
        if (s == null)
            try {
                var a = i.detectMirror(!0);
                o = a.getPoints(),
                this.reportFoundResultPoints(r, o),
                s = new K4().decode(a)
            } catch (f) {
                throw n ?? f
            }
        var l = new rn(s.getText(),s.getRawBytes(),s.getNumBits(),o,ke.AZTEC,Dt.currentTimeMillis())
          , c = s.getByteSegments();
        c != null && l.putMetadata(Hr.BYTE_SEGMENTS, c);
        var u = s.getECLevel();
        return u != null && l.putMetadata(Hr.ERROR_CORRECTION_LEVEL, u),
        l
    }
    ,
    t.prototype.reportFoundResultPoints = function(e, r) {
        if (e != null) {
            var n = e.get(Ft.NEED_RESULT_POINT_CALLBACK);
            n != null && r.forEach(function(i, o, s) {
                n.foundPossibleResultPoint(i)
            })
        }
    }
    ,
    t.prototype.reset = function() {}
    ,
    t
}()
  , _2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    _2e(e, t);
    function e(r) {
        return r === void 0 && (r = 500),
        t.call(this, new Jx, r) || this
    }
    return e
}
)(Du);
var Ar = function() {
    function t() {}
    return t.prototype.decode = function(e, r) {
        try {
            return this.doDecode(e, r)
        } catch {
            var n = r && r.get(Ft.TRY_HARDER) === !0;
            if (n && e.isRotateSupported()) {
                var i = e.rotateCounterClockwise()
                  , o = this.doDecode(i, r)
                  , s = o.getResultMetadata()
                  , a = 270;
                s !== null && s.get(Hr.ORIENTATION) === !0 && (a = a + s.get(Hr.ORIENTATION) % 360),
                o.putMetadata(Hr.ORIENTATION, a);
                var l = o.getResultPoints();
                if (l !== null)
                    for (var c = i.getHeight(), u = 0; u < l.length; u++)
                        l[u] = new Te(c - l[u].getY() - 1,l[u].getX());
                return o
            } else
                throw new le
        }
    }
    ,
    t.prototype.reset = function() {}
    ,
    t.prototype.doDecode = function(e, r) {
        var n = e.getWidth(), i = e.getHeight(), o = new kr(n), s = r && r.get(Ft.TRY_HARDER) === !0, a = Math.max(1, i >> (s ? 8 : 5)), l;
        s ? l = i : l = 15;
        for (var c = Math.trunc(i / 2), u = 0; u < l; u++) {
            var f = Math.trunc((u + 1) / 2)
              , d = (u & 1) === 0
              , h = c + a * (d ? f : -f);
            if (h < 0 || h >= i)
                break;
            try {
                o = e.getBlackRow(h, o)
            } catch {
                continue
            }
            for (var x = function(g) {
                if (g === 1 && (o.reverse(),
                r && r.get(Ft.NEED_RESULT_POINT_CALLBACK) === !0)) {
                    var p = new Map;
                    r.forEach(function(b, C) {
                        return p.set(C, b)
                    }),
                    p.delete(Ft.NEED_RESULT_POINT_CALLBACK),
                    r = p
                }
                try {
                    var v = y.decodeRow(h, o, r);
                    if (g === 1) {
                        v.putMetadata(Hr.ORIENTATION, 180);
                        var _ = v.getResultPoints();
                        _ !== null && (_[0] = new Te(n - _[0].getX() - 1,_[0].getY()),
                        _[1] = new Te(n - _[1].getX() - 1,_[1].getY()))
                    }
                    return {
                        value: v
                    }
                } catch {}
            }, y = this, m = 0; m < 2; m++) {
                var E = x(m);
                if (typeof E == "object")
                    return E.value
            }
        }
        throw new le
    }
    ,
    t.recordPattern = function(e, r, n) {
        for (var i = n.length, o = 0; o < i; o++)
            n[o] = 0;
        var s = e.getSize();
        if (r >= s)
            throw new le;
        for (var a = !e.get(r), l = 0, c = r; c < s; ) {
            if (e.get(c) !== a)
                n[l]++;
            else {
                if (++l === i)
                    break;
                n[l] = 1,
                a = !a
            }
            c++
        }
        if (!(l === i || l === i - 1 && c === s))
            throw new le
    }
    ,
    t.recordPatternInReverse = function(e, r, n) {
        for (var i = n.length, o = e.get(r); r > 0 && i >= 0; )
            e.get(--r) !== o && (i--,
            o = !o);
        if (i >= 0)
            throw new le;
        t.recordPattern(e, r + 1, n)
    }
    ,
    t.patternMatchVariance = function(e, r, n) {
        for (var i = e.length, o = 0, s = 0, a = 0; a < i; a++)
            o += e[a],
            s += r[a];
        if (o < s)
            return Number.POSITIVE_INFINITY;
        var l = o / s;
        n *= l;
        for (var c = 0, u = 0; u < i; u++) {
            var f = e[u]
              , d = r[u] * l
              , h = f > d ? f - d : d - f;
            if (h > n)
                return Number.POSITIVE_INFINITY;
            c += h
        }
        return c / o
    }
    ,
    t
}()
  , b2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Z4 = function(t) {
    b2e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.findStartPattern = function(r) {
        for (var n = r.getSize(), i = r.getNextSet(0), o = 0, s = Int32Array.from([0, 0, 0, 0, 0, 0]), a = i, l = !1, c = 6, u = i; u < n; u++)
            if (r.get(u) !== l)
                s[o]++;
            else {
                if (o === c - 1) {
                    for (var f = e.MAX_AVG_VARIANCE, d = -1, h = e.CODE_START_A; h <= e.CODE_START_C; h++) {
                        var x = Ar.patternMatchVariance(s, e.CODE_PATTERNS[h], e.MAX_INDIVIDUAL_VARIANCE);
                        x < f && (f = x,
                        d = h)
                    }
                    if (d >= 0 && r.isRange(Math.max(0, a - (u - a) / 2), a, !1))
                        return Int32Array.from([a, u, d]);
                    a += s[0] + s[1],
                    s = s.slice(2, s.length),
                    s[o - 1] = 0,
                    s[o] = 0,
                    o--
                } else
                    o++;
                s[o] = 1,
                l = !l
            }
        throw new le
    }
    ,
    e.decodeCode = function(r, n, i) {
        Ar.recordPattern(r, i, n);
        for (var o = e.MAX_AVG_VARIANCE, s = -1, a = 0; a < e.CODE_PATTERNS.length; a++) {
            var l = e.CODE_PATTERNS[a]
              , c = this.patternMatchVariance(n, l, e.MAX_INDIVIDUAL_VARIANCE);
            c < o && (o = c,
            s = a)
        }
        if (s >= 0)
            return s;
        throw new le
    }
    ,
    e.prototype.decodeRow = function(r, n, i) {
        var o = i && i.get(Ft.ASSUME_GS1) === !0
          , s = e.findStartPattern(n)
          , a = s[2]
          , l = 0
          , c = new Uint8Array(20);
        c[l++] = a;
        var u;
        switch (a) {
        case e.CODE_START_A:
            u = e.CODE_CODE_A;
            break;
        case e.CODE_START_B:
            u = e.CODE_CODE_B;
            break;
        case e.CODE_START_C:
            u = e.CODE_CODE_C;
            break;
        default:
            throw new ge
        }
        for (var f = !1, d = !1, h = "", x = s[0], y = s[1], m = Int32Array.from([0, 0, 0, 0, 0, 0]), E = 0, g = 0, p = a, v = 0, _ = !0, b = !1, C = !1; !f; ) {
            var B = d;
            switch (d = !1,
            E = g,
            g = e.decodeCode(n, m, y),
            c[l++] = g,
            g !== e.CODE_STOP && (_ = !0),
            g !== e.CODE_STOP && (v++,
            p += v * g),
            x = y,
            y += m.reduce(function(N, j) {
                return N + j
            }, 0),
            g) {
            case e.CODE_START_A:
            case e.CODE_START_B:
            case e.CODE_START_C:
                throw new ge
            }
            switch (u) {
            case e.CODE_CODE_A:
                if (g < 64)
                    C === b ? h += String.fromCharCode(" ".charCodeAt(0) + g) : h += String.fromCharCode(" ".charCodeAt(0) + g + 128),
                    C = !1;
                else if (g < 96)
                    C === b ? h += String.fromCharCode(g - 64) : h += String.fromCharCode(g + 64),
                    C = !1;
                else
                    switch (g !== e.CODE_STOP && (_ = !1),
                    g) {
                    case e.CODE_FNC_1:
                        o && (h.length === 0 ? h += "]C1" : h += String.fromCharCode(29));
                        break;
                    case e.CODE_FNC_2:
                    case e.CODE_FNC_3:
                        break;
                    case e.CODE_FNC_4_A:
                        !b && C ? (b = !0,
                        C = !1) : b && C ? (b = !1,
                        C = !1) : C = !0;
                        break;
                    case e.CODE_SHIFT:
                        d = !0,
                        u = e.CODE_CODE_B;
                        break;
                    case e.CODE_CODE_B:
                        u = e.CODE_CODE_B;
                        break;
                    case e.CODE_CODE_C:
                        u = e.CODE_CODE_C;
                        break;
                    case e.CODE_STOP:
                        f = !0;
                        break
                    }
                break;
            case e.CODE_CODE_B:
                if (g < 96)
                    C === b ? h += String.fromCharCode(" ".charCodeAt(0) + g) : h += String.fromCharCode(" ".charCodeAt(0) + g + 128),
                    C = !1;
                else
                    switch (g !== e.CODE_STOP && (_ = !1),
                    g) {
                    case e.CODE_FNC_1:
                        o && (h.length === 0 ? h += "]C1" : h += String.fromCharCode(29));
                        break;
                    case e.CODE_FNC_2:
                    case e.CODE_FNC_3:
                        break;
                    case e.CODE_FNC_4_B:
                        !b && C ? (b = !0,
                        C = !1) : b && C ? (b = !1,
                        C = !1) : C = !0;
                        break;
                    case e.CODE_SHIFT:
                        d = !0,
                        u = e.CODE_CODE_A;
                        break;
                    case e.CODE_CODE_A:
                        u = e.CODE_CODE_A;
                        break;
                    case e.CODE_CODE_C:
                        u = e.CODE_CODE_C;
                        break;
                    case e.CODE_STOP:
                        f = !0;
                        break
                    }
                break;
            case e.CODE_CODE_C:
                if (g < 100)
                    g < 10 && (h += "0"),
                    h += g;
                else
                    switch (g !== e.CODE_STOP && (_ = !1),
                    g) {
                    case e.CODE_FNC_1:
                        o && (h.length === 0 ? h += "]C1" : h += String.fromCharCode(29));
                        break;
                    case e.CODE_CODE_A:
                        u = e.CODE_CODE_A;
                        break;
                    case e.CODE_CODE_B:
                        u = e.CODE_CODE_B;
                        break;
                    case e.CODE_STOP:
                        f = !0;
                        break
                    }
                break
            }
            B && (u = u === e.CODE_CODE_A ? e.CODE_CODE_B : e.CODE_CODE_A)
        }
        var T = y - x;
        if (y = n.getNextUnset(y),
        !n.isRange(y, Math.min(n.getSize(), y + (y - x) / 2), !1))
            throw new le;
        if (p -= v * E,
        p % 103 !== E)
            throw new fr;
        var A = h.length;
        if (A === 0)
            throw new le;
        A > 0 && _ && (u === e.CODE_CODE_C ? h = h.substring(0, A - 2) : h = h.substring(0, A - 1));
        for (var w = (s[1] + s[0]) / 2, S = x + T / 2, D = c.length, F = new Uint8Array(D), R = 0; R < D; R++)
            F[R] = c[R];
        var P = [new Te(w,r), new Te(S,r)];
        return new rn(h,F,0,P,ke.CODE_128,new Date().getTime())
    }
    ,
    e.CODE_PATTERNS = [Int32Array.from([2, 1, 2, 2, 2, 2]), Int32Array.from([2, 2, 2, 1, 2, 2]), Int32Array.from([2, 2, 2, 2, 2, 1]), Int32Array.from([1, 2, 1, 2, 2, 3]), Int32Array.from([1, 2, 1, 3, 2, 2]), Int32Array.from([1, 3, 1, 2, 2, 2]), Int32Array.from([1, 2, 2, 2, 1, 3]), Int32Array.from([1, 2, 2, 3, 1, 2]), Int32Array.from([1, 3, 2, 2, 1, 2]), Int32Array.from([2, 2, 1, 2, 1, 3]), Int32Array.from([2, 2, 1, 3, 1, 2]), Int32Array.from([2, 3, 1, 2, 1, 2]), Int32Array.from([1, 1, 2, 2, 3, 2]), Int32Array.from([1, 2, 2, 1, 3, 2]), Int32Array.from([1, 2, 2, 2, 3, 1]), Int32Array.from([1, 1, 3, 2, 2, 2]), Int32Array.from([1, 2, 3, 1, 2, 2]), Int32Array.from([1, 2, 3, 2, 2, 1]), Int32Array.from([2, 2, 3, 2, 1, 1]), Int32Array.from([2, 2, 1, 1, 3, 2]), Int32Array.from([2, 2, 1, 2, 3, 1]), Int32Array.from([2, 1, 3, 2, 1, 2]), Int32Array.from([2, 2, 3, 1, 1, 2]), Int32Array.from([3, 1, 2, 1, 3, 1]), Int32Array.from([3, 1, 1, 2, 2, 2]), Int32Array.from([3, 2, 1, 1, 2, 2]), Int32Array.from([3, 2, 1, 2, 2, 1]), Int32Array.from([3, 1, 2, 2, 1, 2]), Int32Array.from([3, 2, 2, 1, 1, 2]), Int32Array.from([3, 2, 2, 2, 1, 1]), Int32Array.from([2, 1, 2, 1, 2, 3]), Int32Array.from([2, 1, 2, 3, 2, 1]), Int32Array.from([2, 3, 2, 1, 2, 1]), Int32Array.from([1, 1, 1, 3, 2, 3]), Int32Array.from([1, 3, 1, 1, 2, 3]), Int32Array.from([1, 3, 1, 3, 2, 1]), Int32Array.from([1, 1, 2, 3, 1, 3]), Int32Array.from([1, 3, 2, 1, 1, 3]), Int32Array.from([1, 3, 2, 3, 1, 1]), Int32Array.from([2, 1, 1, 3, 1, 3]), Int32Array.from([2, 3, 1, 1, 1, 3]), Int32Array.from([2, 3, 1, 3, 1, 1]), Int32Array.from([1, 1, 2, 1, 3, 3]), Int32Array.from([1, 1, 2, 3, 3, 1]), Int32Array.from([1, 3, 2, 1, 3, 1]), Int32Array.from([1, 1, 3, 1, 2, 3]), Int32Array.from([1, 1, 3, 3, 2, 1]), Int32Array.from([1, 3, 3, 1, 2, 1]), Int32Array.from([3, 1, 3, 1, 2, 1]), Int32Array.from([2, 1, 1, 3, 3, 1]), Int32Array.from([2, 3, 1, 1, 3, 1]), Int32Array.from([2, 1, 3, 1, 1, 3]), Int32Array.from([2, 1, 3, 3, 1, 1]), Int32Array.from([2, 1, 3, 1, 3, 1]), Int32Array.from([3, 1, 1, 1, 2, 3]), Int32Array.from([3, 1, 1, 3, 2, 1]), Int32Array.from([3, 3, 1, 1, 2, 1]), Int32Array.from([3, 1, 2, 1, 1, 3]), Int32Array.from([3, 1, 2, 3, 1, 1]), Int32Array.from([3, 3, 2, 1, 1, 1]), Int32Array.from([3, 1, 4, 1, 1, 1]), Int32Array.from([2, 2, 1, 4, 1, 1]), Int32Array.from([4, 3, 1, 1, 1, 1]), Int32Array.from([1, 1, 1, 2, 2, 4]), Int32Array.from([1, 1, 1, 4, 2, 2]), Int32Array.from([1, 2, 1, 1, 2, 4]), Int32Array.from([1, 2, 1, 4, 2, 1]), Int32Array.from([1, 4, 1, 1, 2, 2]), Int32Array.from([1, 4, 1, 2, 2, 1]), Int32Array.from([1, 1, 2, 2, 1, 4]), Int32Array.from([1, 1, 2, 4, 1, 2]), Int32Array.from([1, 2, 2, 1, 1, 4]), Int32Array.from([1, 2, 2, 4, 1, 1]), Int32Array.from([1, 4, 2, 1, 1, 2]), Int32Array.from([1, 4, 2, 2, 1, 1]), Int32Array.from([2, 4, 1, 2, 1, 1]), Int32Array.from([2, 2, 1, 1, 1, 4]), Int32Array.from([4, 1, 3, 1, 1, 1]), Int32Array.from([2, 4, 1, 1, 1, 2]), Int32Array.from([1, 3, 4, 1, 1, 1]), Int32Array.from([1, 1, 1, 2, 4, 2]), Int32Array.from([1, 2, 1, 1, 4, 2]), Int32Array.from([1, 2, 1, 2, 4, 1]), Int32Array.from([1, 1, 4, 2, 1, 2]), Int32Array.from([1, 2, 4, 1, 1, 2]), Int32Array.from([1, 2, 4, 2, 1, 1]), Int32Array.from([4, 1, 1, 2, 1, 2]), Int32Array.from([4, 2, 1, 1, 1, 2]), Int32Array.from([4, 2, 1, 2, 1, 1]), Int32Array.from([2, 1, 2, 1, 4, 1]), Int32Array.from([2, 1, 4, 1, 2, 1]), Int32Array.from([4, 1, 2, 1, 2, 1]), Int32Array.from([1, 1, 1, 1, 4, 3]), Int32Array.from([1, 1, 1, 3, 4, 1]), Int32Array.from([1, 3, 1, 1, 4, 1]), Int32Array.from([1, 1, 4, 1, 1, 3]), Int32Array.from([1, 1, 4, 3, 1, 1]), Int32Array.from([4, 1, 1, 1, 1, 3]), Int32Array.from([4, 1, 1, 3, 1, 1]), Int32Array.from([1, 1, 3, 1, 4, 1]), Int32Array.from([1, 1, 4, 1, 3, 1]), Int32Array.from([3, 1, 1, 1, 4, 1]), Int32Array.from([4, 1, 1, 1, 3, 1]), Int32Array.from([2, 1, 1, 4, 1, 2]), Int32Array.from([2, 1, 1, 2, 1, 4]), Int32Array.from([2, 1, 1, 2, 3, 2]), Int32Array.from([2, 3, 3, 1, 1, 1, 2])],
    e.MAX_AVG_VARIANCE = .25,
    e.MAX_INDIVIDUAL_VARIANCE = .7,
    e.CODE_SHIFT = 98,
    e.CODE_CODE_C = 99,
    e.CODE_CODE_B = 100,
    e.CODE_CODE_A = 101,
    e.CODE_FNC_1 = 102,
    e.CODE_FNC_2 = 97,
    e.CODE_FNC_3 = 96,
    e.CODE_FNC_4_A = 101,
    e.CODE_FNC_4_B = 100,
    e.CODE_START_A = 103,
    e.CODE_START_B = 104,
    e.CODE_START_C = 105,
    e.CODE_STOP = 106,
    e
}(Ar)
  , C2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Vm = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , J4 = function(t) {
    C2e(e, t);
    function e(r, n) {
        r === void 0 && (r = !1),
        n === void 0 && (n = !1);
        var i = t.call(this) || this;
        return i.usingCheckDigit = r,
        i.extendedMode = n,
        i.decodeRowResult = "",
        i.counters = new Int32Array(9),
        i
    }
    return e.prototype.decodeRow = function(r, n, i) {
        var o, s, a, l, c = this.counters;
        c.fill(0),
        this.decodeRowResult = "";
        var u = e.findAsteriskPattern(n, c), f = n.getNextSet(u[1]), d = n.getSize(), h, x;
        do {
            e.recordPattern(n, f, c);
            var y = e.toNarrowWidePattern(c);
            if (y < 0)
                throw new le;
            h = e.patternToChar(y),
            this.decodeRowResult += h,
            x = f;
            try {
                for (var m = (o = void 0,
                Vm(c)), E = m.next(); !E.done; E = m.next()) {
                    var g = E.value;
                    f += g
                }
            } catch (D) {
                o = {
                    error: D
                }
            } finally {
                try {
                    E && !E.done && (s = m.return) && s.call(m)
                } finally {
                    if (o)
                        throw o.error
                }
            }
            f = n.getNextSet(f)
        } while (h !== "*");
        this.decodeRowResult = this.decodeRowResult.substring(0, this.decodeRowResult.length - 1);
        var p = 0;
        try {
            for (var v = Vm(c), _ = v.next(); !_.done; _ = v.next()) {
                var g = _.value;
                p += g
            }
        } catch (D) {
            a = {
                error: D
            }
        } finally {
            try {
                _ && !_.done && (l = v.return) && l.call(v)
            } finally {
                if (a)
                    throw a.error
            }
        }
        var b = f - x - p;
        if (f !== d && b * 2 < p)
            throw new le;
        if (this.usingCheckDigit) {
            for (var C = this.decodeRowResult.length - 1, B = 0, T = 0; T < C; T++)
                B += e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(T));
            if (this.decodeRowResult.charAt(C) !== e.ALPHABET_STRING.charAt(B % 43))
                throw new fr;
            this.decodeRowResult = this.decodeRowResult.substring(0, C)
        }
        if (this.decodeRowResult.length === 0)
            throw new le;
        var A;
        this.extendedMode ? A = e.decodeExtended(this.decodeRowResult) : A = this.decodeRowResult;
        var w = (u[1] + u[0]) / 2
          , S = x + p / 2;
        return new rn(A,null,0,[new Te(w,r), new Te(S,r)],ke.CODE_39,new Date().getTime())
    }
    ,
    e.findAsteriskPattern = function(r, n) {
        for (var i = r.getSize(), o = r.getNextSet(0), s = 0, a = o, l = !1, c = n.length, u = o; u < i; u++)
            if (r.get(u) !== l)
                n[s]++;
            else {
                if (s === c - 1) {
                    if (this.toNarrowWidePattern(n) === e.ASTERISK_ENCODING && r.isRange(Math.max(0, a - Math.floor((u - a) / 2)), a, !1))
                        return [a, u];
                    a += n[0] + n[1],
                    n.copyWithin(0, 2, 2 + s - 1),
                    n[s - 1] = 0,
                    n[s] = 0,
                    s--
                } else
                    s++;
                n[s] = 1,
                l = !l
            }
        throw new le
    }
    ,
    e.toNarrowWidePattern = function(r) {
        var n, i, o = r.length, s = 0, a;
        do {
            var l = 2147483647;
            try {
                for (var c = (n = void 0,
                Vm(r)), u = c.next(); !u.done; u = c.next()) {
                    var f = u.value;
                    f < l && f > s && (l = f)
                }
            } catch (y) {
                n = {
                    error: y
                }
            } finally {
                try {
                    u && !u.done && (i = c.return) && i.call(c)
                } finally {
                    if (n)
                        throw n.error
                }
            }
            s = l,
            a = 0;
            for (var d = 0, h = 0, x = 0; x < o; x++) {
                var f = r[x];
                f > s && (h |= 1 << o - 1 - x,
                a++,
                d += f)
            }
            if (a === 3) {
                for (var x = 0; x < o && a > 0; x++) {
                    var f = r[x];
                    if (f > s && (a--,
                    f * 2 >= d))
                        return -1
                }
                return h
            }
        } while (a > 3);
        return -1
    }
    ,
    e.patternToChar = function(r) {
        for (var n = 0; n < e.CHARACTER_ENCODINGS.length; n++)
            if (e.CHARACTER_ENCODINGS[n] === r)
                return e.ALPHABET_STRING.charAt(n);
        if (r === e.ASTERISK_ENCODING)
            return "*";
        throw new le
    }
    ,
    e.decodeExtended = function(r) {
        for (var n = r.length, i = "", o = 0; o < n; o++) {
            var s = r.charAt(o);
            if (s === "+" || s === "$" || s === "%" || s === "/") {
                var a = r.charAt(o + 1)
                  , l = "\0";
                switch (s) {
                case "+":
                    if (a >= "A" && a <= "Z")
                        l = String.fromCharCode(a.charCodeAt(0) + 32);
                    else
                        throw new ge;
                    break;
                case "$":
                    if (a >= "A" && a <= "Z")
                        l = String.fromCharCode(a.charCodeAt(0) - 64);
                    else
                        throw new ge;
                    break;
                case "%":
                    if (a >= "A" && a <= "E")
                        l = String.fromCharCode(a.charCodeAt(0) - 38);
                    else if (a >= "F" && a <= "J")
                        l = String.fromCharCode(a.charCodeAt(0) - 11);
                    else if (a >= "K" && a <= "O")
                        l = String.fromCharCode(a.charCodeAt(0) + 16);
                    else if (a >= "P" && a <= "T")
                        l = String.fromCharCode(a.charCodeAt(0) + 43);
                    else if (a === "U")
                        l = "\0";
                    else if (a === "V")
                        l = "@";
                    else if (a === "W")
                        l = "`";
                    else if (a === "X" || a === "Y" || a === "Z")
                        l = "";
                    else
                        throw new ge;
                    break;
                case "/":
                    if (a >= "A" && a <= "O")
                        l = String.fromCharCode(a.charCodeAt(0) - 32);
                    else if (a === "Z")
                        l = ":";
                    else
                        throw new ge;
                    break
                }
                i += l,
                o++
            } else
                i += s
        }
        return i
    }
    ,
    e.ALPHABET_STRING = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",
    e.CHARACTER_ENCODINGS = [52, 289, 97, 352, 49, 304, 112, 37, 292, 100, 265, 73, 328, 25, 280, 88, 13, 268, 76, 28, 259, 67, 322, 19, 274, 82, 7, 262, 70, 22, 385, 193, 448, 145, 400, 208, 133, 388, 196, 168, 162, 138, 42],
    e.ASTERISK_ENCODING = 148,
    e
}(Ar)
  , A2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , zm = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , Q4 = function(t) {
    A2e(e, t);
    function e() {
        var r = t.call(this) || this;
        return r.decodeRowResult = "",
        r.counters = new Int32Array(6),
        r
    }
    return e.prototype.decodeRow = function(r, n, i) {
        var o, s, a, l, c = this.findAsteriskPattern(n), u = n.getNextSet(c[1]), f = n.getSize(), d = this.counters;
        d.fill(0),
        this.decodeRowResult = "";
        var h, x;
        do {
            e.recordPattern(n, u, d);
            var y = this.toPattern(d);
            if (y < 0)
                throw new le;
            h = this.patternToChar(y),
            this.decodeRowResult += h,
            x = u;
            try {
                for (var m = (o = void 0,
                zm(d)), E = m.next(); !E.done; E = m.next()) {
                    var g = E.value;
                    u += g
                }
            } catch (T) {
                o = {
                    error: T
                }
            } finally {
                try {
                    E && !E.done && (s = m.return) && s.call(m)
                } finally {
                    if (o)
                        throw o.error
                }
            }
            u = n.getNextSet(u)
        } while (h !== "*");
        this.decodeRowResult = this.decodeRowResult.substring(0, this.decodeRowResult.length - 1);
        var p = 0;
        try {
            for (var v = zm(d), _ = v.next(); !_.done; _ = v.next()) {
                var g = _.value;
                p += g
            }
        } catch (T) {
            a = {
                error: T
            }
        } finally {
            try {
                _ && !_.done && (l = v.return) && l.call(v)
            } finally {
                if (a)
                    throw a.error
            }
        }
        if (u === f || !n.get(u))
            throw new le;
        if (this.decodeRowResult.length < 2)
            throw new le;
        this.checkChecksums(this.decodeRowResult),
        this.decodeRowResult = this.decodeRowResult.substring(0, this.decodeRowResult.length - 2);
        var b = this.decodeExtended(this.decodeRowResult)
          , C = (c[1] + c[0]) / 2
          , B = x + p / 2;
        return new rn(b,null,0,[new Te(C,r), new Te(B,r)],ke.CODE_93,new Date().getTime())
    }
    ,
    e.prototype.findAsteriskPattern = function(r) {
        var n = r.getSize()
          , i = r.getNextSet(0);
        this.counters.fill(0);
        for (var o = this.counters, s = i, a = !1, l = o.length, c = 0, u = i; u < n; u++)
            if (r.get(u) !== a)
                o[c]++;
            else {
                if (c === l - 1) {
                    if (this.toPattern(o) === e.ASTERISK_ENCODING)
                        return new Int32Array([s, u]);
                    s += o[0] + o[1],
                    o.copyWithin(0, 2, 2 + c - 1),
                    o[c - 1] = 0,
                    o[c] = 0,
                    c--
                } else
                    c++;
                o[c] = 1,
                a = !a
            }
        throw new le
    }
    ,
    e.prototype.toPattern = function(r) {
        var n, i, o = 0;
        try {
            for (var s = zm(r), a = s.next(); !a.done; a = s.next()) {
                var l = a.value;
                o += l
            }
        } catch (x) {
            n = {
                error: x
            }
        } finally {
            try {
                a && !a.done && (i = s.return) && i.call(s)
            } finally {
                if (n)
                    throw n.error
            }
        }
        for (var c = 0, u = r.length, f = 0; f < u; f++) {
            var d = Math.round(r[f] * 9 / o);
            if (d < 1 || d > 4)
                return -1;
            if (f & 1)
                c <<= d;
            else
                for (var h = 0; h < d; h++)
                    c = c << 1 | 1
        }
        return c
    }
    ,
    e.prototype.patternToChar = function(r) {
        for (var n = 0; n < e.CHARACTER_ENCODINGS.length; n++)
            if (e.CHARACTER_ENCODINGS[n] === r)
                return e.ALPHABET_STRING.charAt(n);
        throw new le
    }
    ,
    e.prototype.decodeExtended = function(r) {
        for (var n = r.length, i = "", o = 0; o < n; o++) {
            var s = r.charAt(o);
            if (s >= "a" && s <= "d") {
                if (o >= n - 1)
                    throw new ge;
                var a = r.charAt(o + 1)
                  , l = "\0";
                switch (s) {
                case "d":
                    if (a >= "A" && a <= "Z")
                        l = String.fromCharCode(a.charCodeAt(0) + 32);
                    else
                        throw new ge;
                    break;
                case "a":
                    if (a >= "A" && a <= "Z")
                        l = String.fromCharCode(a.charCodeAt(0) - 64);
                    else
                        throw new ge;
                    break;
                case "b":
                    if (a >= "A" && a <= "E")
                        l = String.fromCharCode(a.charCodeAt(0) - 38);
                    else if (a >= "F" && a <= "J")
                        l = String.fromCharCode(a.charCodeAt(0) - 11);
                    else if (a >= "K" && a <= "O")
                        l = String.fromCharCode(a.charCodeAt(0) + 16);
                    else if (a >= "P" && a <= "T")
                        l = String.fromCharCode(a.charCodeAt(0) + 43);
                    else if (a === "U")
                        l = "\0";
                    else if (a === "V")
                        l = "@";
                    else if (a === "W")
                        l = "`";
                    else if (a >= "X" && a <= "Z")
                        l = String.fromCharCode(127);
                    else
                        throw new ge;
                    break;
                case "c":
                    if (a >= "A" && a <= "O")
                        l = String.fromCharCode(a.charCodeAt(0) - 32);
                    else if (a === "Z")
                        l = ":";
                    else
                        throw new ge;
                    break
                }
                i += l,
                o++
            } else
                i += s
        }
        return i
    }
    ,
    e.prototype.checkChecksums = function(r) {
        var n = r.length;
        this.checkOneChecksum(r, n - 2, 20),
        this.checkOneChecksum(r, n - 1, 15)
    }
    ,
    e.prototype.checkOneChecksum = function(r, n, i) {
        for (var o = 1, s = 0, a = n - 1; a >= 0; a--)
            s += o * e.ALPHABET_STRING.indexOf(r.charAt(a)),
            ++o > i && (o = 1);
        if (r.charAt(n) !== e.ALPHABET_STRING[s % 47])
            throw new fr
    }
    ,
    e.ALPHABET_STRING = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%abcd*",
    e.CHARACTER_ENCODINGS = [276, 328, 324, 322, 296, 292, 290, 336, 274, 266, 424, 420, 418, 404, 402, 394, 360, 356, 354, 308, 282, 344, 332, 326, 300, 278, 436, 434, 428, 422, 406, 410, 364, 358, 310, 314, 302, 468, 466, 458, 366, 374, 430, 294, 474, 470, 306, 350],
    e.ASTERISK_ENCODING = e.CHARACTER_ENCODINGS[47],
    e
}(Ar)
  , w2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , B2e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , e6 = function(t) {
    w2e(e, t);
    function e() {
        var r = t !== null && t.apply(this, arguments) || this;
        return r.narrowLineWidth = -1,
        r
    }
    return e.prototype.decodeRow = function(r, n, i) {
        var o, s, a = this.decodeStart(n), l = this.decodeEnd(n), c = new Ke;
        e.decodeMiddle(n, a[1], l[0], c);
        var u = c.toString()
          , f = null;
        i != null && (f = i.get(Ft.ALLOWED_LENGTHS)),
        f == null && (f = e.DEFAULT_ALLOWED_LENGTHS);
        var d = u.length
          , h = !1
          , x = 0;
        try {
            for (var y = B2e(f), m = y.next(); !m.done; m = y.next()) {
                var E = m.value;
                if (d === E) {
                    h = !0;
                    break
                }
                E > x && (x = E)
            }
        } catch (v) {
            o = {
                error: v
            }
        } finally {
            try {
                m && !m.done && (s = y.return) && s.call(y)
            } finally {
                if (o)
                    throw o.error
            }
        }
        if (!h && d > x && (h = !0),
        !h)
            throw new ge;
        var g = [new Te(a[1],r), new Te(l[0],r)]
          , p = new rn(u,null,0,g,ke.ITF,new Date().getTime());
        return p
    }
    ,
    e.decodeMiddle = function(r, n, i, o) {
        var s = new Int32Array(10)
          , a = new Int32Array(5)
          , l = new Int32Array(5);
        for (s.fill(0),
        a.fill(0),
        l.fill(0); n < i; ) {
            Ar.recordPattern(r, n, s);
            for (var c = 0; c < 5; c++) {
                var u = 2 * c;
                a[c] = s[u],
                l[c] = s[u + 1]
            }
            var f = e.decodeDigit(a);
            o.append(f.toString()),
            f = this.decodeDigit(l),
            o.append(f.toString()),
            s.forEach(function(d) {
                n += d
            })
        }
    }
    ,
    e.prototype.decodeStart = function(r) {
        var n = e.skipWhiteSpace(r)
          , i = e.findGuardPattern(r, n, e.START_PATTERN);
        return this.narrowLineWidth = (i[1] - i[0]) / 4,
        this.validateQuietZone(r, i[0]),
        i
    }
    ,
    e.prototype.validateQuietZone = function(r, n) {
        var i = this.narrowLineWidth * 10;
        i = i < n ? i : n;
        for (var o = n - 1; i > 0 && o >= 0 && !r.get(o); o--)
            i--;
        if (i !== 0)
            throw new le
    }
    ,
    e.skipWhiteSpace = function(r) {
        var n = r.getSize()
          , i = r.getNextSet(0);
        if (i === n)
            throw new le;
        return i
    }
    ,
    e.prototype.decodeEnd = function(r) {
        r.reverse();
        try {
            var n = e.skipWhiteSpace(r)
              , i = void 0;
            try {
                i = e.findGuardPattern(r, n, e.END_PATTERN_REVERSED[0])
            } catch (s) {
                s instanceof le && (i = e.findGuardPattern(r, n, e.END_PATTERN_REVERSED[1]))
            }
            this.validateQuietZone(r, i[0]);
            var o = i[0];
            return i[0] = r.getSize() - i[1],
            i[1] = r.getSize() - o,
            i
        } finally {
            r.reverse()
        }
    }
    ,
    e.findGuardPattern = function(r, n, i) {
        var o = i.length
          , s = new Int32Array(o)
          , a = r.getSize()
          , l = !1
          , c = 0
          , u = n;
        s.fill(0);
        for (var f = n; f < a; f++)
            if (r.get(f) !== l)
                s[c]++;
            else {
                if (c === o - 1) {
                    if (Ar.patternMatchVariance(s, i, e.MAX_INDIVIDUAL_VARIANCE) < e.MAX_AVG_VARIANCE)
                        return [u, f];
                    u += s[0] + s[1],
                    Dt.arraycopy(s, 2, s, 0, c - 1),
                    s[c - 1] = 0,
                    s[c] = 0,
                    c--
                } else
                    c++;
                s[c] = 1,
                l = !l
            }
        throw new le
    }
    ,
    e.decodeDigit = function(r) {
        for (var n = e.MAX_AVG_VARIANCE, i = -1, o = e.PATTERNS.length, s = 0; s < o; s++) {
            var a = e.PATTERNS[s]
              , l = Ar.patternMatchVariance(r, a, e.MAX_INDIVIDUAL_VARIANCE);
            l < n ? (n = l,
            i = s) : l === n && (i = -1)
        }
        if (i >= 0)
            return i % 10;
        throw new le
    }
    ,
    e.PATTERNS = [Int32Array.from([1, 1, 2, 2, 1]), Int32Array.from([2, 1, 1, 1, 2]), Int32Array.from([1, 2, 1, 1, 2]), Int32Array.from([2, 2, 1, 1, 1]), Int32Array.from([1, 1, 2, 1, 2]), Int32Array.from([2, 1, 2, 1, 1]), Int32Array.from([1, 2, 2, 1, 1]), Int32Array.from([1, 1, 1, 2, 2]), Int32Array.from([2, 1, 1, 2, 1]), Int32Array.from([1, 2, 1, 2, 1]), Int32Array.from([1, 1, 3, 3, 1]), Int32Array.from([3, 1, 1, 1, 3]), Int32Array.from([1, 3, 1, 1, 3]), Int32Array.from([3, 3, 1, 1, 1]), Int32Array.from([1, 1, 3, 1, 3]), Int32Array.from([3, 1, 3, 1, 1]), Int32Array.from([1, 3, 3, 1, 1]), Int32Array.from([1, 1, 1, 3, 3]), Int32Array.from([3, 1, 1, 3, 1]), Int32Array.from([1, 3, 1, 3, 1])],
    e.MAX_AVG_VARIANCE = .38,
    e.MAX_INDIVIDUAL_VARIANCE = .5,
    e.DEFAULT_ALLOWED_LENGTHS = [6, 8, 10, 12, 14],
    e.START_PATTERN = Int32Array.from([1, 1, 1, 1]),
    e.END_PATTERN_REVERSED = [Int32Array.from([1, 1, 2]), Int32Array.from([1, 1, 3])],
    e
}(Ar)
  , S2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , du = function(t) {
    S2e(e, t);
    function e() {
        var r = t !== null && t.apply(this, arguments) || this;
        return r.decodeRowStringBuffer = "",
        r
    }
    return e.findStartGuardPattern = function(r) {
        for (var n = !1, i, o = 0, s = Int32Array.from([0, 0, 0]); !n; ) {
            s = Int32Array.from([0, 0, 0]),
            i = e.findGuardPattern(r, o, !1, this.START_END_PATTERN, s);
            var a = i[0];
            o = i[1];
            var l = a - (o - a);
            l >= 0 && (n = r.isRange(l, a, !1))
        }
        return i
    }
    ,
    e.checkChecksum = function(r) {
        return e.checkStandardUPCEANChecksum(r)
    }
    ,
    e.checkStandardUPCEANChecksum = function(r) {
        var n = r.length;
        if (n === 0)
            return !1;
        var i = parseInt(r.charAt(n - 1), 10);
        return e.getStandardUPCEANChecksum(r.substring(0, n - 1)) === i
    }
    ,
    e.getStandardUPCEANChecksum = function(r) {
        for (var n = r.length, i = 0, o = n - 1; o >= 0; o -= 2) {
            var s = r.charAt(o).charCodeAt(0) - "0".charCodeAt(0);
            if (s < 0 || s > 9)
                throw new ge;
            i += s
        }
        i *= 3;
        for (var o = n - 2; o >= 0; o -= 2) {
            var s = r.charAt(o).charCodeAt(0) - "0".charCodeAt(0);
            if (s < 0 || s > 9)
                throw new ge;
            i += s
        }
        return (1e3 - i) % 10
    }
    ,
    e.decodeEnd = function(r, n) {
        return e.findGuardPattern(r, n, !1, e.START_END_PATTERN, new Int32Array(e.START_END_PATTERN.length).fill(0))
    }
    ,
    e.findGuardPatternWithoutCounters = function(r, n, i, o) {
        return this.findGuardPattern(r, n, i, o, new Int32Array(o.length))
    }
    ,
    e.findGuardPattern = function(r, n, i, o, s) {
        var a = r.getSize();
        n = i ? r.getNextUnset(n) : r.getNextSet(n);
        for (var l = 0, c = n, u = o.length, f = i, d = n; d < a; d++)
            if (r.get(d) !== f)
                s[l]++;
            else {
                if (l === u - 1) {
                    if (Ar.patternMatchVariance(s, o, e.MAX_INDIVIDUAL_VARIANCE) < e.MAX_AVG_VARIANCE)
                        return Int32Array.from([c, d]);
                    c += s[0] + s[1];
                    for (var h = s.slice(2, s.length), x = 0; x < l - 1; x++)
                        s[x] = h[x];
                    s[l - 1] = 0,
                    s[l] = 0,
                    l--
                } else
                    l++;
                s[l] = 1,
                f = !f
            }
        throw new le
    }
    ,
    e.decodeDigit = function(r, n, i, o) {
        this.recordPattern(r, i, n);
        for (var s = this.MAX_AVG_VARIANCE, a = -1, l = o.length, c = 0; c < l; c++) {
            var u = o[c]
              , f = Ar.patternMatchVariance(n, u, e.MAX_INDIVIDUAL_VARIANCE);
            f < s && (s = f,
            a = c)
        }
        if (a >= 0)
            return a;
        throw new le
    }
    ,
    e.MAX_AVG_VARIANCE = .48,
    e.MAX_INDIVIDUAL_VARIANCE = .7,
    e.START_END_PATTERN = Int32Array.from([1, 1, 1]),
    e.MIDDLE_PATTERN = Int32Array.from([1, 1, 1, 1, 1]),
    e.END_PATTERN = Int32Array.from([1, 1, 1, 1, 1, 1]),
    e.L_PATTERNS = [Int32Array.from([3, 2, 1, 1]), Int32Array.from([2, 2, 2, 1]), Int32Array.from([2, 1, 2, 2]), Int32Array.from([1, 4, 1, 1]), Int32Array.from([1, 1, 3, 2]), Int32Array.from([1, 2, 3, 1]), Int32Array.from([1, 1, 1, 4]), Int32Array.from([1, 3, 1, 2]), Int32Array.from([1, 2, 1, 3]), Int32Array.from([3, 1, 1, 2])],
    e
}(Ar)
  , T2e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , D2e = function() {
    function t() {
        this.CHECK_DIGIT_ENCODINGS = [24, 20, 18, 17, 12, 6, 3, 10, 9, 5],
        this.decodeMiddleCounters = Int32Array.from([0, 0, 0, 0]),
        this.decodeRowStringBuffer = ""
    }
    return t.prototype.decodeRow = function(e, r, n) {
        var i = this.decodeRowStringBuffer
          , o = this.decodeMiddle(r, n, i)
          , s = i.toString()
          , a = t.parseExtensionString(s)
          , l = [new Te((n[0] + n[1]) / 2,e), new Te(o,e)]
          , c = new rn(s,null,0,l,ke.UPC_EAN_EXTENSION,new Date().getTime());
        return a != null && c.putAllMetadata(a),
        c
    }
    ,
    t.prototype.decodeMiddle = function(e, r, n) {
        var i, o, s = this.decodeMiddleCounters;
        s[0] = 0,
        s[1] = 0,
        s[2] = 0,
        s[3] = 0;
        for (var a = e.getSize(), l = r[1], c = 0, u = 0; u < 5 && l < a; u++) {
            var f = du.decodeDigit(e, s, l, du.L_AND_G_PATTERNS);
            n += String.fromCharCode("0".charCodeAt(0) + f % 10);
            try {
                for (var d = (i = void 0,
                T2e(s)), h = d.next(); !h.done; h = d.next()) {
                    var x = h.value;
                    l += x
                }
            } catch (m) {
                i = {
                    error: m
                }
            } finally {
                try {
                    h && !h.done && (o = d.return) && o.call(d)
                } finally {
                    if (i)
                        throw i.error
                }
            }
            f >= 10 && (c |= 1 << 4 - u),
            u !== 4 && (l = e.getNextSet(l),
            l = e.getNextUnset(l))
        }
        if (n.length !== 5)
            throw new le;
        var y = this.determineCheckDigit(c);
        if (t.extensionChecksum(n.toString()) !== y)
            throw new le;
        return l
    }
    ,
    t.extensionChecksum = function(e) {
        for (var r = e.length, n = 0, i = r - 2; i >= 0; i -= 2)
            n += e.charAt(i).charCodeAt(0) - "0".charCodeAt(0);
        n *= 3;
        for (var i = r - 1; i >= 0; i -= 2)
            n += e.charAt(i).charCodeAt(0) - "0".charCodeAt(0);
        return n *= 3,
        n % 10
    }
    ,
    t.prototype.determineCheckDigit = function(e) {
        for (var r = 0; r < 10; r++)
            if (e === this.CHECK_DIGIT_ENCODINGS[r])
                return r;
        throw new le
    }
    ,
    t.parseExtensionString = function(e) {
        if (e.length !== 5)
            return null;
        var r = t.parseExtension5String(e);
        return r == null ? null : new Map([[Hr.SUGGESTED_PRICE, r]])
    }
    ,
    t.parseExtension5String = function(e) {
        var r;
        switch (e.charAt(0)) {
        case "0":
            r = "£";
            break;
        case "5":
            r = "$";
            break;
        case "9":
            switch (e) {
            case "90000":
                return null;
            case "99991":
                return "0.00";
            case "99990":
                return "Used"
            }
            r = "";
            break;
        default:
            r = "";
            break
        }
        var n = parseInt(e.substring(1))
          , i = (n / 100).toString()
          , o = n % 100
          , s = o < 10 ? "0" + o : o.toString();
        return r + i + "." + s
    }
    ,
    t
}()
  , F2e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , P2e = function() {
    function t() {
        this.decodeMiddleCounters = Int32Array.from([0, 0, 0, 0]),
        this.decodeRowStringBuffer = ""
    }
    return t.prototype.decodeRow = function(e, r, n) {
        var i = this.decodeRowStringBuffer
          , o = this.decodeMiddle(r, n, i)
          , s = i.toString()
          , a = t.parseExtensionString(s)
          , l = [new Te((n[0] + n[1]) / 2,e), new Te(o,e)]
          , c = new rn(s,null,0,l,ke.UPC_EAN_EXTENSION,new Date().getTime());
        return a != null && c.putAllMetadata(a),
        c
    }
    ,
    t.prototype.decodeMiddle = function(e, r, n) {
        var i, o, s = this.decodeMiddleCounters;
        s[0] = 0,
        s[1] = 0,
        s[2] = 0,
        s[3] = 0;
        for (var a = e.getSize(), l = r[1], c = 0, u = 0; u < 2 && l < a; u++) {
            var f = du.decodeDigit(e, s, l, du.L_AND_G_PATTERNS);
            n += String.fromCharCode("0".charCodeAt(0) + f % 10);
            try {
                for (var d = (i = void 0,
                F2e(s)), h = d.next(); !h.done; h = d.next()) {
                    var x = h.value;
                    l += x
                }
            } catch (y) {
                i = {
                    error: y
                }
            } finally {
                try {
                    h && !h.done && (o = d.return) && o.call(d)
                } finally {
                    if (i)
                        throw i.error
                }
            }
            f >= 10 && (c |= 1 << 1 - u),
            u !== 1 && (l = e.getNextSet(l),
            l = e.getNextUnset(l))
        }
        if (n.length !== 2)
            throw new le;
        if (parseInt(n.toString()) % 4 !== c)
            throw new le;
        return l
    }
    ,
    t.parseExtensionString = function(e) {
        return e.length !== 2 ? null : new Map([[Hr.ISSUE_NUMBER, parseInt(e)]])
    }
    ,
    t
}()
  , I2e = function() {
    function t() {}
    return t.decodeRow = function(e, r, n) {
        var i = du.findGuardPattern(r, n, !1, this.EXTENSION_START_PATTERN, new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));
        try {
            var o = new D2e;
            return o.decodeRow(e, r, i)
        } catch {
            var s = new P2e;
            return s.decodeRow(e, r, i)
        }
    }
    ,
    t.EXTENSION_START_PATTERN = Int32Array.from([1, 1, 2]),
    t
}()
  , O2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Er = function(t) {
    O2e(e, t);
    function e() {
        var r = t.call(this) || this;
        r.decodeRowStringBuffer = "",
        e.L_AND_G_PATTERNS = e.L_PATTERNS.map(function(a) {
            return Int32Array.from(a)
        });
        for (var n = 10; n < 20; n++) {
            for (var i = e.L_PATTERNS[n - 10], o = new Int32Array(i.length), s = 0; s < i.length; s++)
                o[s] = i[i.length - s - 1];
            e.L_AND_G_PATTERNS[n] = o
        }
        return r
    }
    return e.prototype.decodeRow = function(r, n, i) {
        var o = e.findStartGuardPattern(n)
          , s = i == null ? null : i.get(Ft.NEED_RESULT_POINT_CALLBACK);
        if (s != null) {
            var a = new Te((o[0] + o[1]) / 2,r);
            s.foundPossibleResultPoint(a)
        }
        var l = this.decodeMiddle(n, o, this.decodeRowStringBuffer)
          , c = l.rowOffset
          , u = l.resultString;
        if (s != null) {
            var f = new Te(c,r);
            s.foundPossibleResultPoint(f)
        }
        var d = e.decodeEnd(n, c);
        if (s != null) {
            var h = new Te((d[0] + d[1]) / 2,r);
            s.foundPossibleResultPoint(h)
        }
        var x = d[1]
          , y = x + (x - d[0]);
        if (y >= n.getSize() || !n.isRange(x, y, !1))
            throw new le;
        var m = u.toString();
        if (m.length < 8)
            throw new ge;
        if (!e.checkChecksum(m))
            throw new fr;
        var E = (o[1] + o[0]) / 2
          , g = (d[1] + d[0]) / 2
          , p = this.getBarcodeFormat()
          , v = [new Te(E,r), new Te(g,r)]
          , _ = new rn(m,null,0,v,p,new Date().getTime())
          , b = 0;
        try {
            var C = I2e.decodeRow(r, n, d[1]);
            _.putMetadata(Hr.UPC_EAN_EXTENSION, C.getText()),
            _.putAllMetadata(C.getResultMetadata()),
            _.addResultPoints(C.getResultPoints()),
            b = C.getText().length
        } catch {}
        var B = i == null ? null : i.get(Ft.ALLOWED_EAN_EXTENSIONS);
        if (B != null) {
            var T = !1;
            for (var A in B)
                if (b.toString() === A) {
                    T = !0;
                    break
                }
            if (!T)
                throw new le
        }
        return p === ke.EAN_13 || ke.UPC_A,
        _
    }
    ,
    e.checkChecksum = function(r) {
        return e.checkStandardUPCEANChecksum(r)
    }
    ,
    e.checkStandardUPCEANChecksum = function(r) {
        var n = r.length;
        if (n === 0)
            return !1;
        var i = parseInt(r.charAt(n - 1), 10);
        return e.getStandardUPCEANChecksum(r.substring(0, n - 1)) === i
    }
    ,
    e.getStandardUPCEANChecksum = function(r) {
        for (var n = r.length, i = 0, o = n - 1; o >= 0; o -= 2) {
            var s = r.charAt(o).charCodeAt(0) - "0".charCodeAt(0);
            if (s < 0 || s > 9)
                throw new ge;
            i += s
        }
        i *= 3;
        for (var o = n - 2; o >= 0; o -= 2) {
            var s = r.charAt(o).charCodeAt(0) - "0".charCodeAt(0);
            if (s < 0 || s > 9)
                throw new ge;
            i += s
        }
        return (1e3 - i) % 10
    }
    ,
    e.decodeEnd = function(r, n) {
        return e.findGuardPattern(r, n, !1, e.START_END_PATTERN, new Int32Array(e.START_END_PATTERN.length).fill(0))
    }
    ,
    e
}(du)
  , k2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , t6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , GE = function(t) {
    k2e(e, t);
    function e() {
        var r = t.call(this) || this;
        return r.decodeMiddleCounters = Int32Array.from([0, 0, 0, 0]),
        r
    }
    return e.prototype.decodeMiddle = function(r, n, i) {
        var o, s, a, l, c = this.decodeMiddleCounters;
        c[0] = 0,
        c[1] = 0,
        c[2] = 0,
        c[3] = 0;
        for (var u = r.getSize(), f = n[1], d = 0, h = 0; h < 6 && f < u; h++) {
            var x = Er.decodeDigit(r, c, f, Er.L_AND_G_PATTERNS);
            i += String.fromCharCode("0".charCodeAt(0) + x % 10);
            try {
                for (var y = (o = void 0,
                t6(c)), m = y.next(); !m.done; m = y.next()) {
                    var E = m.value;
                    f += E
                }
            } catch (_) {
                o = {
                    error: _
                }
            } finally {
                try {
                    m && !m.done && (s = y.return) && s.call(y)
                } finally {
                    if (o)
                        throw o.error
                }
            }
            x >= 10 && (d |= 1 << 5 - h)
        }
        i = e.determineFirstDigit(i, d);
        var g = Er.findGuardPattern(r, f, !0, Er.MIDDLE_PATTERN, new Int32Array(Er.MIDDLE_PATTERN.length).fill(0));
        f = g[1];
        for (var h = 0; h < 6 && f < u; h++) {
            var x = Er.decodeDigit(r, c, f, Er.L_PATTERNS);
            i += String.fromCharCode("0".charCodeAt(0) + x);
            try {
                for (var p = (a = void 0,
                t6(c)), v = p.next(); !v.done; v = p.next()) {
                    var E = v.value;
                    f += E
                }
            } catch (C) {
                a = {
                    error: C
                }
            } finally {
                try {
                    v && !v.done && (l = p.return) && l.call(p)
                } finally {
                    if (a)
                        throw a.error
                }
            }
        }
        return {
            rowOffset: f,
            resultString: i
        }
    }
    ,
    e.prototype.getBarcodeFormat = function() {
        return ke.EAN_13
    }
    ,
    e.determineFirstDigit = function(r, n) {
        for (var i = 0; i < 10; i++)
            if (n === this.FIRST_DIGIT_ENCODINGS[i])
                return r = String.fromCharCode("0".charCodeAt(0) + i) + r,
                r;
        throw new le
    }
    ,
    e.FIRST_DIGIT_ENCODINGS = [0, 11, 13, 14, 19, 25, 28, 21, 22, 26],
    e
}(Er)
  , R2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , r6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , n6 = function(t) {
    R2e(e, t);
    function e() {
        var r = t.call(this) || this;
        return r.decodeMiddleCounters = Int32Array.from([0, 0, 0, 0]),
        r
    }
    return e.prototype.decodeMiddle = function(r, n, i) {
        var o, s, a, l, c = this.decodeMiddleCounters;
        c[0] = 0,
        c[1] = 0,
        c[2] = 0,
        c[3] = 0;
        for (var u = r.getSize(), f = n[1], d = 0; d < 4 && f < u; d++) {
            var h = Er.decodeDigit(r, c, f, Er.L_PATTERNS);
            i += String.fromCharCode("0".charCodeAt(0) + h);
            try {
                for (var x = (o = void 0,
                r6(c)), y = x.next(); !y.done; y = x.next()) {
                    var m = y.value;
                    f += m
                }
            } catch (v) {
                o = {
                    error: v
                }
            } finally {
                try {
                    y && !y.done && (s = x.return) && s.call(x)
                } finally {
                    if (o)
                        throw o.error
                }
            }
        }
        var E = Er.findGuardPattern(r, f, !0, Er.MIDDLE_PATTERN, new Int32Array(Er.MIDDLE_PATTERN.length).fill(0));
        f = E[1];
        for (var d = 0; d < 4 && f < u; d++) {
            var h = Er.decodeDigit(r, c, f, Er.L_PATTERNS);
            i += String.fromCharCode("0".charCodeAt(0) + h);
            try {
                for (var g = (a = void 0,
                r6(c)), p = g.next(); !p.done; p = g.next()) {
                    var m = p.value;
                    f += m
                }
            } catch (b) {
                a = {
                    error: b
                }
            } finally {
                try {
                    p && !p.done && (l = g.return) && l.call(g)
                } finally {
                    if (a)
                        throw a.error
                }
            }
        }
        return {
            rowOffset: f,
            resultString: i
        }
    }
    ,
    e.prototype.getBarcodeFormat = function() {
        return ke.EAN_8
    }
    ,
    e
}(Er)
  , M2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , i6 = function(t) {
    M2e(e, t);
    function e() {
        var r = t !== null && t.apply(this, arguments) || this;
        return r.ean13Reader = new GE,
        r
    }
    return e.prototype.getBarcodeFormat = function() {
        return ke.UPC_A
    }
    ,
    e.prototype.decode = function(r, n) {
        return this.maybeReturnResult(this.ean13Reader.decode(r))
    }
    ,
    e.prototype.decodeRow = function(r, n, i) {
        return this.maybeReturnResult(this.ean13Reader.decodeRow(r, n, i))
    }
    ,
    e.prototype.decodeMiddle = function(r, n, i) {
        return this.ean13Reader.decodeMiddle(r, n, i)
    }
    ,
    e.prototype.maybeReturnResult = function(r) {
        var n = r.getText();
        if (n.charAt(0) === "0") {
            var i = new rn(n.substring(1),null,null,r.getResultPoints(),ke.UPC_A);
            return r.getResultMetadata() != null && i.putAllMetadata(r.getResultMetadata()),
            i
        } else
            throw new le
    }
    ,
    e.prototype.reset = function() {
        this.ean13Reader.reset()
    }
    ,
    e
}(Er)
  , N2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , L2e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , o6 = function(t) {
    N2e(e, t);
    function e() {
        var r = t.call(this) || this;
        return r.decodeMiddleCounters = new Int32Array(4),
        r
    }
    return e.prototype.decodeMiddle = function(r, n, i) {
        var o, s, a = this.decodeMiddleCounters.map(function(m) {
            return m
        });
        a[0] = 0,
        a[1] = 0,
        a[2] = 0,
        a[3] = 0;
        for (var l = r.getSize(), c = n[1], u = 0, f = 0; f < 6 && c < l; f++) {
            var d = e.decodeDigit(r, a, c, e.L_AND_G_PATTERNS);
            i += String.fromCharCode("0".charCodeAt(0) + d % 10);
            try {
                for (var h = (o = void 0,
                L2e(a)), x = h.next(); !x.done; x = h.next()) {
                    var y = x.value;
                    c += y
                }
            } catch (m) {
                o = {
                    error: m
                }
            } finally {
                try {
                    x && !x.done && (s = h.return) && s.call(h)
                } finally {
                    if (o)
                        throw o.error
                }
            }
            d >= 10 && (u |= 1 << 5 - f)
        }
        return e.determineNumSysAndCheckDigit(new Ke(i), u),
        c
    }
    ,
    e.prototype.decodeEnd = function(r, n) {
        return e.findGuardPatternWithoutCounters(r, n, !0, e.MIDDLE_END_PATTERN)
    }
    ,
    e.prototype.checkChecksum = function(r) {
        return Er.checkChecksum(e.convertUPCEtoUPCA(r))
    }
    ,
    e.determineNumSysAndCheckDigit = function(r, n) {
        for (var i = 0; i <= 1; i++)
            for (var o = 0; o < 10; o++)
                if (n === this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[i][o]) {
                    r.insert(0, "0" + i),
                    r.append("0" + o);
                    return
                }
        throw le.getNotFoundInstance()
    }
    ,
    e.prototype.getBarcodeFormat = function() {
        return ke.UPC_E
    }
    ,
    e.convertUPCEtoUPCA = function(r) {
        var n = r.slice(1, 7).split("").map(function(s) {
            return s.charCodeAt(0)
        })
          , i = new Ke;
        i.append(r.charAt(0));
        var o = n[5];
        switch (o) {
        case 0:
        case 1:
        case 2:
            i.appendChars(n, 0, 2),
            i.append(o),
            i.append("0000"),
            i.appendChars(n, 2, 3);
            break;
        case 3:
            i.appendChars(n, 0, 3),
            i.append("00000"),
            i.appendChars(n, 3, 2);
            break;
        case 4:
            i.appendChars(n, 0, 4),
            i.append("00000"),
            i.append(n[4]);
            break;
        default:
            i.appendChars(n, 0, 5),
            i.append("0000"),
            i.append(o);
            break
        }
        return r.length >= 8 && i.append(r.charAt(7)),
        i.toString()
    }
    ,
    e.MIDDLE_END_PATTERN = Int32Array.from([1, 1, 1, 1, 1, 1]),
    e.NUMSYS_AND_CHECK_DIGIT_PATTERNS = [Int32Array.from([56, 52, 50, 49, 44, 38, 35, 42, 41, 37]), Int32Array.from([7, 11, 13, 14, 19, 25, 28, 21, 22, 1])],
    e
}(Er)
  , $2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , s6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , jm = function(t) {
    $2e(e, t);
    function e(r) {
        var n = t.call(this) || this
          , i = r == null ? null : r.get(Ft.POSSIBLE_FORMATS)
          , o = [];
        return i != null && (i.indexOf(ke.EAN_13) > -1 && o.push(new GE),
        i.indexOf(ke.UPC_A) > -1 && o.push(new i6),
        i.indexOf(ke.EAN_8) > -1 && o.push(new n6),
        i.indexOf(ke.UPC_E) > -1 && o.push(new o6)),
        o.length === 0 && (o.push(new GE),
        o.push(new i6),
        o.push(new n6),
        o.push(new o6)),
        n.readers = o,
        n
    }
    return e.prototype.decodeRow = function(r, n, i) {
        var o, s;
        try {
            for (var a = s6(this.readers), l = a.next(); !l.done; l = a.next()) {
                var c = l.value;
                try {
                    var u = c.decodeRow(r, n, i)
                      , f = u.getBarcodeFormat() === ke.EAN_13 && u.getText().charAt(0) === "0"
                      , d = i == null ? null : i.get(Ft.POSSIBLE_FORMATS)
                      , h = d == null || d.includes(ke.UPC_A);
                    if (f && h) {
                        var x = u.getRawBytes()
                          , y = new rn(u.getText().substring(1),x,x ? x.length : null,u.getResultPoints(),ke.UPC_A);
                        return y.putAllMetadata(u.getResultMetadata()),
                        y
                    }
                    return u
                } catch {}
            }
        } catch (m) {
            o = {
                error: m
            }
        } finally {
            try {
                l && !l.done && (s = a.return) && s.call(a)
            } finally {
                if (o)
                    throw o.error
            }
        }
        throw new le
    }
    ,
    e.prototype.reset = function() {
        var r, n;
        try {
            for (var i = s6(this.readers), o = i.next(); !o.done; o = i.next()) {
                var s = o.value;
                s.reset()
            }
        } catch (a) {
            r = {
                error: a
            }
        } finally {
            try {
                o && !o.done && (n = i.return) && n.call(i)
            } finally {
                if (r)
                    throw r.error
            }
        }
    }
    ,
    e
}(Ar)
  , U2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , G2e = function(t) {
    U2e(e, t);
    function e() {
        var r = t !== null && t.apply(this, arguments) || this;
        return r.CODA_BAR_CHAR_SET = {
            nnnnnww: "0",
            nnnnwwn: "1",
            nnnwnnw: "2",
            wwnnnnn: "3",
            nnwnnwn: "4",
            wnnnnwn: "5",
            nwnnnnw: "6",
            nwnnwnn: "7",
            nwwnnnn: "8",
            wnnwnnn: "9",
            nnnwwnn: "-",
            nnwwnnn: "$",
            wnnnwnw: ":",
            wnwnnnw: "/",
            wnwnwnn: ".",
            nnwwwww: "+",
            nnwwnwn: "A",
            nwnwnnw: "B",
            nnnwnww: "C",
            nnnwwwn: "D"
        },
        r
    }
    return e.prototype.decodeRow = function(r, n, i) {
        var o = this.getValidRowData(n);
        if (!o)
            throw new le;
        var s = this.codaBarDecodeRow(o.row);
        if (!s)
            throw new le;
        return new rn(s,null,0,[new Te(o.left,r), new Te(o.right,r)],ke.CODABAR,new Date().getTime())
    }
    ,
    e.prototype.getValidRowData = function(r) {
        var n = r.toArray()
          , i = n.indexOf(!0);
        if (i === -1)
            return null;
        var o = n.lastIndexOf(!0);
        if (o <= i)
            return null;
        n = n.slice(i, o + 1);
        for (var s = [], a = n[0], l = 1, c = 1; c < n.length; c++)
            n[c] === a ? l++ : (a = n[c],
            s.push(l),
            l = 1);
        return s.push(l),
        s.length < 23 && (s.length + 1) % 8 !== 0 ? null : {
            row: s,
            left: i,
            right: o
        }
    }
    ,
    e.prototype.codaBarDecodeRow = function(r) {
        for (var n = [], i = Math.ceil(r.reduce(function(l, c) {
            return (l + c) / 2
        }, 0)); r.length > 0; ) {
            var o = r.splice(0, 8).splice(0, 7)
              , s = o.map(function(l) {
                return l < i ? "n" : "w"
            }).join("");
            if (this.CODA_BAR_CHAR_SET[s] === void 0)
                return null;
            n.push(this.CODA_BAR_CHAR_SET[s])
        }
        var a = n.join("");
        return this.validCodaBarString(a) ? a : null
    }
    ,
    e.prototype.validCodaBarString = function(r) {
        var n = /^[A-D].{1,}[A-D]$/;
        return n.test(r)
    }
    ,
    e
}(Ar)
  , H2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , V2e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , $a = function(t) {
    H2e(e, t);
    function e() {
        var r = t.call(this) || this;
        return r.decodeFinderCounters = new Int32Array(4),
        r.dataCharacterCounters = new Int32Array(8),
        r.oddRoundingErrors = new Array(4),
        r.evenRoundingErrors = new Array(4),
        r.oddCounts = new Array(r.dataCharacterCounters.length / 2),
        r.evenCounts = new Array(r.dataCharacterCounters.length / 2),
        r
    }
    return e.prototype.getDecodeFinderCounters = function() {
        return this.decodeFinderCounters
    }
    ,
    e.prototype.getDataCharacterCounters = function() {
        return this.dataCharacterCounters
    }
    ,
    e.prototype.getOddRoundingErrors = function() {
        return this.oddRoundingErrors
    }
    ,
    e.prototype.getEvenRoundingErrors = function() {
        return this.evenRoundingErrors
    }
    ,
    e.prototype.getOddCounts = function() {
        return this.oddCounts
    }
    ,
    e.prototype.getEvenCounts = function() {
        return this.evenCounts
    }
    ,
    e.prototype.parseFinderValue = function(r, n) {
        for (var i = 0; i < n.length; i++)
            if (Ar.patternMatchVariance(r, n[i], e.MAX_INDIVIDUAL_VARIANCE) < e.MAX_AVG_VARIANCE)
                return i;
        throw new le
    }
    ,
    e.count = function(r) {
        return ft.sum(new Int32Array(r))
    }
    ,
    e.increment = function(r, n) {
        for (var i = 0, o = n[0], s = 1; s < r.length; s++)
            n[s] > o && (o = n[s],
            i = s);
        r[i]++
    }
    ,
    e.decrement = function(r, n) {
        for (var i = 0, o = n[0], s = 1; s < r.length; s++)
            n[s] < o && (o = n[s],
            i = s);
        r[i]--
    }
    ,
    e.isFinderPattern = function(r) {
        var n, i, o = r[0] + r[1], s = o + r[2] + r[3], a = o / s;
        if (a >= e.MIN_FINDER_PATTERN_RATIO && a <= e.MAX_FINDER_PATTERN_RATIO) {
            var l = Number.MAX_SAFE_INTEGER
              , c = Number.MIN_SAFE_INTEGER;
            try {
                for (var u = V2e(r), f = u.next(); !f.done; f = u.next()) {
                    var d = f.value;
                    d > c && (c = d),
                    d < l && (l = d)
                }
            } catch (h) {
                n = {
                    error: h
                }
            } finally {
                try {
                    f && !f.done && (i = u.return) && i.call(u)
                } finally {
                    if (n)
                        throw n.error
                }
            }
            return c < 10 * l
        }
        return !1
    }
    ,
    e.MAX_AVG_VARIANCE = .2,
    e.MAX_INDIVIDUAL_VARIANCE = .45,
    e.MIN_FINDER_PATTERN_RATIO = 9.5 / 12,
    e.MAX_FINDER_PATTERN_RATIO = 12.5 / 14,
    e
}(Ar)
  , Qx = function() {
    function t(e, r) {
        this.value = e,
        this.checksumPortion = r
    }
    return t.prototype.getValue = function() {
        return this.value
    }
    ,
    t.prototype.getChecksumPortion = function() {
        return this.checksumPortion
    }
    ,
    t.prototype.toString = function() {
        return this.value + "(" + this.checksumPortion + ")"
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        return this.value === r.value && this.checksumPortion === r.checksumPortion
    }
    ,
    t.prototype.hashCode = function() {
        return this.value ^ this.checksumPortion
    }
    ,
    t
}()
  , uM = function() {
    function t(e, r, n, i, o) {
        this.value = e,
        this.startEnd = r,
        this.value = e,
        this.startEnd = r,
        this.resultPoints = new Array,
        this.resultPoints.push(new Te(n,o)),
        this.resultPoints.push(new Te(i,o))
    }
    return t.prototype.getValue = function() {
        return this.value
    }
    ,
    t.prototype.getStartEnd = function() {
        return this.startEnd
    }
    ,
    t.prototype.getResultPoints = function() {
        return this.resultPoints
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        return this.value === r.value
    }
    ,
    t.prototype.hashCode = function() {
        return this.value
    }
    ,
    t
}()
  , z2e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , wc = function() {
    function t() {}
    return t.getRSSvalue = function(e, r, n) {
        var i, o, s = 0;
        try {
            for (var a = z2e(e), l = a.next(); !l.done; l = a.next()) {
                var c = l.value;
                s += c
            }
        } catch (g) {
            i = {
                error: g
            }
        } finally {
            try {
                l && !l.done && (o = a.return) && o.call(a)
            } finally {
                if (i)
                    throw i.error
            }
        }
        for (var u = 0, f = 0, d = e.length, h = 0; h < d - 1; h++) {
            var x = void 0;
            for (x = 1,
            f |= 1 << h; x < e[h]; x++,
            f &= ~(1 << h)) {
                var y = t.combins(s - x - 1, d - h - 2);
                if (n && f === 0 && s - x - (d - h - 1) >= d - h - 1 && (y -= t.combins(s - x - (d - h), d - h - 2)),
                d - h - 1 > 1) {
                    for (var m = 0, E = s - x - (d - h - 2); E > r; E--)
                        m += t.combins(s - x - E - 1, d - h - 3);
                    y -= m * (d - 1 - h)
                } else
                    s - x > r && y--;
                u += y
            }
            s -= x
        }
        return u
    }
    ,
    t.combins = function(e, r) {
        var n, i;
        e - r > r ? (i = r,
        n = e - r) : (i = e - r,
        n = r);
        for (var o = 1, s = 1, a = e; a > n; a--)
            o *= a,
            s <= i && (o /= s,
            s++);
        for (; s <= i; )
            o /= s,
            s++;
        return o
    }
    ,
    t
}()
  , j2e = function() {
    function t() {}
    return t.buildBitArray = function(e) {
        var r = e.length * 2 - 1;
        e[e.length - 1].getRightChar() == null && (r -= 1);
        for (var n = 12 * r, i = new kr(n), o = 0, s = e[0], a = s.getRightChar().getValue(), l = 11; l >= 0; --l)
            a & 1 << l && i.set(o),
            o++;
        for (var l = 1; l < e.length; ++l) {
            for (var c = e[l], u = c.getLeftChar().getValue(), f = 11; f >= 0; --f)
                u & 1 << f && i.set(o),
                o++;
            if (c.getRightChar() !== null)
                for (var d = c.getRightChar().getValue(), f = 11; f >= 0; --f)
                    d & 1 << f && i.set(o),
                    o++
        }
        return i
    }
    ,
    t
}()
  , Pa = function() {
    function t(e, r) {
        r ? this.decodedInformation = null : (this.finished = e,
        this.decodedInformation = r)
    }
    return t.prototype.getDecodedInformation = function() {
        return this.decodedInformation
    }
    ,
    t.prototype.isFinished = function() {
        return this.finished
    }
    ,
    t
}()
  , AC = function() {
    function t(e) {
        this.newPosition = e
    }
    return t.prototype.getNewPosition = function() {
        return this.newPosition
    }
    ,
    t
}()
  , W2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Ci = function(t) {
    W2e(e, t);
    function e(r, n) {
        var i = t.call(this, r) || this;
        return i.value = n,
        i
    }
    return e.prototype.getValue = function() {
        return this.value
    }
    ,
    e.prototype.isFNC1 = function() {
        return this.value === e.FNC1
    }
    ,
    e.FNC1 = "$",
    e
}(AC)
  , Y2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Ia = function(t) {
    Y2e(e, t);
    function e(r, n, i) {
        var o = t.call(this, r) || this;
        return i ? (o.remaining = !0,
        o.remainingValue = o.remainingValue) : (o.remaining = !1,
        o.remainingValue = 0),
        o.newString = n,
        o
    }
    return e.prototype.getNewString = function() {
        return this.newString
    }
    ,
    e.prototype.isRemaining = function() {
        return this.remaining
    }
    ,
    e.prototype.getRemainingValue = function() {
        return this.remainingValue
    }
    ,
    e
}(AC)
  , X2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , cc = function(t) {
    X2e(e, t);
    function e(r, n, i) {
        var o = t.call(this, r) || this;
        if (n < 0 || n > 10 || i < 0 || i > 10)
            throw new ge;
        return o.firstDigit = n,
        o.secondDigit = i,
        o
    }
    return e.prototype.getFirstDigit = function() {
        return this.firstDigit
    }
    ,
    e.prototype.getSecondDigit = function() {
        return this.secondDigit
    }
    ,
    e.prototype.getValue = function() {
        return this.firstDigit * 10 + this.secondDigit
    }
    ,
    e.prototype.isFirstDigitFNC1 = function() {
        return this.firstDigit === e.FNC1
    }
    ,
    e.prototype.isSecondDigitFNC1 = function() {
        return this.secondDigit === e.FNC1
    }
    ,
    e.prototype.isAnyFNC1 = function() {
        return this.firstDigit === e.FNC1 || this.secondDigit === e.FNC1
    }
    ,
    e.FNC1 = 10,
    e
}(AC)
  , Sh = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , K2e = function() {
    function t() {}
    return t.parseFieldsInGeneralPurpose = function(e) {
        var r, n, i, o, s, a, l, c;
        if (!e)
            return null;
        if (e.length < 2)
            throw new le;
        var u = e.substring(0, 2);
        try {
            for (var f = Sh(t.TWO_DIGIT_DATA_LENGTH), d = f.next(); !d.done; d = f.next()) {
                var h = d.value;
                if (h[0] === u)
                    return h[1] === t.VARIABLE_LENGTH ? t.processVariableAI(2, h[2], e) : t.processFixedAI(2, h[1], e)
            }
        } catch (b) {
            r = {
                error: b
            }
        } finally {
            try {
                d && !d.done && (n = f.return) && n.call(f)
            } finally {
                if (r)
                    throw r.error
            }
        }
        if (e.length < 3)
            throw new le;
        var x = e.substring(0, 3);
        try {
            for (var y = Sh(t.THREE_DIGIT_DATA_LENGTH), m = y.next(); !m.done; m = y.next()) {
                var h = m.value;
                if (h[0] === x)
                    return h[1] === t.VARIABLE_LENGTH ? t.processVariableAI(3, h[2], e) : t.processFixedAI(3, h[1], e)
            }
        } catch (b) {
            i = {
                error: b
            }
        } finally {
            try {
                m && !m.done && (o = y.return) && o.call(y)
            } finally {
                if (i)
                    throw i.error
            }
        }
        try {
            for (var E = Sh(t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH), g = E.next(); !g.done; g = E.next()) {
                var h = g.value;
                if (h[0] === x)
                    return h[1] === t.VARIABLE_LENGTH ? t.processVariableAI(4, h[2], e) : t.processFixedAI(4, h[1], e)
            }
        } catch (b) {
            s = {
                error: b
            }
        } finally {
            try {
                g && !g.done && (a = E.return) && a.call(E)
            } finally {
                if (s)
                    throw s.error
            }
        }
        if (e.length < 4)
            throw new le;
        var p = e.substring(0, 4);
        try {
            for (var v = Sh(t.FOUR_DIGIT_DATA_LENGTH), _ = v.next(); !_.done; _ = v.next()) {
                var h = _.value;
                if (h[0] === p)
                    return h[1] === t.VARIABLE_LENGTH ? t.processVariableAI(4, h[2], e) : t.processFixedAI(4, h[1], e)
            }
        } catch (b) {
            l = {
                error: b
            }
        } finally {
            try {
                _ && !_.done && (c = v.return) && c.call(v)
            } finally {
                if (l)
                    throw l.error
            }
        }
        throw new le
    }
    ,
    t.processFixedAI = function(e, r, n) {
        if (n.length < e)
            throw new le;
        var i = n.substring(0, e);
        if (n.length < e + r)
            throw new le;
        var o = n.substring(e, e + r)
          , s = n.substring(e + r)
          , a = "(" + i + ")" + o
          , l = t.parseFieldsInGeneralPurpose(s);
        return l == null ? a : a + l
    }
    ,
    t.processVariableAI = function(e, r, n) {
        var i = n.substring(0, e), o;
        n.length < e + r ? o = n.length : o = e + r;
        var s = n.substring(e, o)
          , a = n.substring(o)
          , l = "(" + i + ")" + s
          , c = t.parseFieldsInGeneralPurpose(a);
        return c == null ? l : l + c
    }
    ,
    t.VARIABLE_LENGTH = [],
    t.TWO_DIGIT_DATA_LENGTH = [["00", 18], ["01", 14], ["02", 14], ["10", t.VARIABLE_LENGTH, 20], ["11", 6], ["12", 6], ["13", 6], ["15", 6], ["17", 6], ["20", 2], ["21", t.VARIABLE_LENGTH, 20], ["22", t.VARIABLE_LENGTH, 29], ["30", t.VARIABLE_LENGTH, 8], ["37", t.VARIABLE_LENGTH, 8], ["90", t.VARIABLE_LENGTH, 30], ["91", t.VARIABLE_LENGTH, 30], ["92", t.VARIABLE_LENGTH, 30], ["93", t.VARIABLE_LENGTH, 30], ["94", t.VARIABLE_LENGTH, 30], ["95", t.VARIABLE_LENGTH, 30], ["96", t.VARIABLE_LENGTH, 30], ["97", t.VARIABLE_LENGTH, 3], ["98", t.VARIABLE_LENGTH, 30], ["99", t.VARIABLE_LENGTH, 30]],
    t.THREE_DIGIT_DATA_LENGTH = [["240", t.VARIABLE_LENGTH, 30], ["241", t.VARIABLE_LENGTH, 30], ["242", t.VARIABLE_LENGTH, 6], ["250", t.VARIABLE_LENGTH, 30], ["251", t.VARIABLE_LENGTH, 30], ["253", t.VARIABLE_LENGTH, 17], ["254", t.VARIABLE_LENGTH, 20], ["400", t.VARIABLE_LENGTH, 30], ["401", t.VARIABLE_LENGTH, 30], ["402", 17], ["403", t.VARIABLE_LENGTH, 30], ["410", 13], ["411", 13], ["412", 13], ["413", 13], ["414", 13], ["420", t.VARIABLE_LENGTH, 20], ["421", t.VARIABLE_LENGTH, 15], ["422", 3], ["423", t.VARIABLE_LENGTH, 15], ["424", 3], ["425", 3], ["426", 3]],
    t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH = [["310", 6], ["311", 6], ["312", 6], ["313", 6], ["314", 6], ["315", 6], ["316", 6], ["320", 6], ["321", 6], ["322", 6], ["323", 6], ["324", 6], ["325", 6], ["326", 6], ["327", 6], ["328", 6], ["329", 6], ["330", 6], ["331", 6], ["332", 6], ["333", 6], ["334", 6], ["335", 6], ["336", 6], ["340", 6], ["341", 6], ["342", 6], ["343", 6], ["344", 6], ["345", 6], ["346", 6], ["347", 6], ["348", 6], ["349", 6], ["350", 6], ["351", 6], ["352", 6], ["353", 6], ["354", 6], ["355", 6], ["356", 6], ["357", 6], ["360", 6], ["361", 6], ["362", 6], ["363", 6], ["364", 6], ["365", 6], ["366", 6], ["367", 6], ["368", 6], ["369", 6], ["390", t.VARIABLE_LENGTH, 15], ["391", t.VARIABLE_LENGTH, 18], ["392", t.VARIABLE_LENGTH, 15], ["393", t.VARIABLE_LENGTH, 18], ["703", t.VARIABLE_LENGTH, 30]],
    t.FOUR_DIGIT_DATA_LENGTH = [["7001", 13], ["7002", t.VARIABLE_LENGTH, 30], ["7003", 10], ["8001", 14], ["8002", t.VARIABLE_LENGTH, 20], ["8003", t.VARIABLE_LENGTH, 30], ["8004", t.VARIABLE_LENGTH, 30], ["8005", 6], ["8006", 18], ["8007", t.VARIABLE_LENGTH, 30], ["8008", t.VARIABLE_LENGTH, 12], ["8018", 18], ["8020", t.VARIABLE_LENGTH, 25], ["8100", 6], ["8101", 10], ["8102", 2], ["8110", t.VARIABLE_LENGTH, 70], ["8200", t.VARIABLE_LENGTH, 70]],
    t
}()
  , nx = function() {
    function t(e) {
        this.buffer = new Ke,
        this.information = e
    }
    return t.prototype.decodeAllCodes = function(e, r) {
        var n = r
          , i = null;
        do {
            var o = this.decodeGeneralPurposeField(n, i)
              , s = K2e.parseFieldsInGeneralPurpose(o.getNewString());
            if (s != null && e.append(s),
            o.isRemaining() ? i = "" + o.getRemainingValue() : i = null,
            n === o.getNewPosition())
                break;
            n = o.getNewPosition()
        } while (!0);
        return e.toString()
    }
    ,
    t.prototype.isStillNumeric = function(e) {
        if (e + 7 > this.information.getSize())
            return e + 4 <= this.information.getSize();
        for (var r = e; r < e + 3; ++r)
            if (this.information.get(r))
                return !0;
        return this.information.get(e + 3)
    }
    ,
    t.prototype.decodeNumeric = function(e) {
        if (e + 7 > this.information.getSize()) {
            var r = this.extractNumericValueFromBitArray(e, 4);
            return r === 0 ? new cc(this.information.getSize(),cc.FNC1,cc.FNC1) : new cc(this.information.getSize(),r - 1,cc.FNC1)
        }
        var n = this.extractNumericValueFromBitArray(e, 7)
          , i = (n - 8) / 11
          , o = (n - 8) % 11;
        return new cc(e + 7,i,o)
    }
    ,
    t.prototype.extractNumericValueFromBitArray = function(e, r) {
        return t.extractNumericValueFromBitArray(this.information, e, r)
    }
    ,
    t.extractNumericValueFromBitArray = function(e, r, n) {
        for (var i = 0, o = 0; o < n; ++o)
            e.get(r + o) && (i |= 1 << n - o - 1);
        return i
    }
    ,
    t.prototype.decodeGeneralPurposeField = function(e, r) {
        this.buffer.setLengthToZero(),
        r != null && this.buffer.append(r),
        this.current.setPosition(e);
        var n = this.parseBlocks();
        return n != null && n.isRemaining() ? new Ia(this.current.getPosition(),this.buffer.toString(),n.getRemainingValue()) : new Ia(this.current.getPosition(),this.buffer.toString())
    }
    ,
    t.prototype.parseBlocks = function() {
        var e, r;
        do {
            var n = this.current.getPosition();
            this.current.isAlpha() ? (r = this.parseAlphaBlock(),
            e = r.isFinished()) : this.current.isIsoIec646() ? (r = this.parseIsoIec646Block(),
            e = r.isFinished()) : (r = this.parseNumericBlock(),
            e = r.isFinished());
            var i = n !== this.current.getPosition();
            if (!i && !e)
                break
        } while (!e);
        return r.getDecodedInformation()
    }
    ,
    t.prototype.parseNumericBlock = function() {
        for (; this.isStillNumeric(this.current.getPosition()); ) {
            var e = this.decodeNumeric(this.current.getPosition());
            if (this.current.setPosition(e.getNewPosition()),
            e.isFirstDigitFNC1()) {
                var r = void 0;
                return e.isSecondDigitFNC1() ? r = new Ia(this.current.getPosition(),this.buffer.toString()) : r = new Ia(this.current.getPosition(),this.buffer.toString(),e.getSecondDigit()),
                new Pa(!0,r)
            }
            if (this.buffer.append(e.getFirstDigit()),
            e.isSecondDigitFNC1()) {
                var r = new Ia(this.current.getPosition(),this.buffer.toString());
                return new Pa(!0,r)
            }
            this.buffer.append(e.getSecondDigit())
        }
        return this.isNumericToAlphaNumericLatch(this.current.getPosition()) && (this.current.setAlpha(),
        this.current.incrementPosition(4)),
        new Pa(!1)
    }
    ,
    t.prototype.parseIsoIec646Block = function() {
        for (; this.isStillIsoIec646(this.current.getPosition()); ) {
            var e = this.decodeIsoIec646(this.current.getPosition());
            if (this.current.setPosition(e.getNewPosition()),
            e.isFNC1()) {
                var r = new Ia(this.current.getPosition(),this.buffer.toString());
                return new Pa(!0,r)
            }
            this.buffer.append(e.getValue())
        }
        return this.isAlphaOr646ToNumericLatch(this.current.getPosition()) ? (this.current.incrementPosition(3),
        this.current.setNumeric()) : this.isAlphaTo646ToAlphaLatch(this.current.getPosition()) && (this.current.getPosition() + 5 < this.information.getSize() ? this.current.incrementPosition(5) : this.current.setPosition(this.information.getSize()),
        this.current.setAlpha()),
        new Pa(!1)
    }
    ,
    t.prototype.parseAlphaBlock = function() {
        for (; this.isStillAlpha(this.current.getPosition()); ) {
            var e = this.decodeAlphanumeric(this.current.getPosition());
            if (this.current.setPosition(e.getNewPosition()),
            e.isFNC1()) {
                var r = new Ia(this.current.getPosition(),this.buffer.toString());
                return new Pa(!0,r)
            }
            this.buffer.append(e.getValue())
        }
        return this.isAlphaOr646ToNumericLatch(this.current.getPosition()) ? (this.current.incrementPosition(3),
        this.current.setNumeric()) : this.isAlphaTo646ToAlphaLatch(this.current.getPosition()) && (this.current.getPosition() + 5 < this.information.getSize() ? this.current.incrementPosition(5) : this.current.setPosition(this.information.getSize()),
        this.current.setIsoIec646()),
        new Pa(!1)
    }
    ,
    t.prototype.isStillIsoIec646 = function(e) {
        if (e + 5 > this.information.getSize())
            return !1;
        var r = this.extractNumericValueFromBitArray(e, 5);
        if (r >= 5 && r < 16)
            return !0;
        if (e + 7 > this.information.getSize())
            return !1;
        var n = this.extractNumericValueFromBitArray(e, 7);
        if (n >= 64 && n < 116)
            return !0;
        if (e + 8 > this.information.getSize())
            return !1;
        var i = this.extractNumericValueFromBitArray(e, 8);
        return i >= 232 && i < 253
    }
    ,
    t.prototype.decodeIsoIec646 = function(e) {
        var r = this.extractNumericValueFromBitArray(e, 5);
        if (r === 15)
            return new Ci(e + 5,Ci.FNC1);
        if (r >= 5 && r < 15)
            return new Ci(e + 5,"0" + (r - 5));
        var n = this.extractNumericValueFromBitArray(e, 7);
        if (n >= 64 && n < 90)
            return new Ci(e + 7,"" + (n + 1));
        if (n >= 90 && n < 116)
            return new Ci(e + 7,"" + (n + 7));
        var i = this.extractNumericValueFromBitArray(e, 8), o;
        switch (i) {
        case 232:
            o = "!";
            break;
        case 233:
            o = '"';
            break;
        case 234:
            o = "%";
            break;
        case 235:
            o = "&";
            break;
        case 236:
            o = "'";
            break;
        case 237:
            o = "(";
            break;
        case 238:
            o = ")";
            break;
        case 239:
            o = "*";
            break;
        case 240:
            o = "+";
            break;
        case 241:
            o = ",";
            break;
        case 242:
            o = "-";
            break;
        case 243:
            o = ".";
            break;
        case 244:
            o = "/";
            break;
        case 245:
            o = ":";
            break;
        case 246:
            o = ";";
            break;
        case 247:
            o = "<";
            break;
        case 248:
            o = "=";
            break;
        case 249:
            o = ">";
            break;
        case 250:
            o = "?";
            break;
        case 251:
            o = "_";
            break;
        case 252:
            o = " ";
            break;
        default:
            throw new ge
        }
        return new Ci(e + 8,o)
    }
    ,
    t.prototype.isStillAlpha = function(e) {
        if (e + 5 > this.information.getSize())
            return !1;
        var r = this.extractNumericValueFromBitArray(e, 5);
        if (r >= 5 && r < 16)
            return !0;
        if (e + 6 > this.information.getSize())
            return !1;
        var n = this.extractNumericValueFromBitArray(e, 6);
        return n >= 16 && n < 63
    }
    ,
    t.prototype.decodeAlphanumeric = function(e) {
        var r = this.extractNumericValueFromBitArray(e, 5);
        if (r === 15)
            return new Ci(e + 5,Ci.FNC1);
        if (r >= 5 && r < 15)
            return new Ci(e + 5,"0" + (r - 5));
        var n = this.extractNumericValueFromBitArray(e, 6);
        if (n >= 32 && n < 58)
            return new Ci(e + 6,"" + (n + 33));
        var i;
        switch (n) {
        case 58:
            i = "*";
            break;
        case 59:
            i = ",";
            break;
        case 60:
            i = "-";
            break;
        case 61:
            i = ".";
            break;
        case 62:
            i = "/";
            break;
        default:
            throw new Ed("Decoding invalid alphanumeric value: " + n)
        }
        return new Ci(e + 6,i)
    }
    ,
    t.prototype.isAlphaTo646ToAlphaLatch = function(e) {
        if (e + 1 > this.information.getSize())
            return !1;
        for (var r = 0; r < 5 && r + e < this.information.getSize(); ++r)
            if (r === 2) {
                if (!this.information.get(e + 2))
                    return !1
            } else if (this.information.get(e + r))
                return !1;
        return !0
    }
    ,
    t.prototype.isAlphaOr646ToNumericLatch = function(e) {
        if (e + 3 > this.information.getSize())
            return !1;
        for (var r = e; r < e + 3; ++r)
            if (this.information.get(r))
                return !1;
        return !0
    }
    ,
    t.prototype.isNumericToAlphaNumericLatch = function(e) {
        if (e + 1 > this.information.getSize())
            return !1;
        for (var r = 0; r < 4 && r + e < this.information.getSize(); ++r)
            if (this.information.get(e + r))
                return !1;
        return !0
    }
    ,
    t
}()
  , fM = function() {
    function t(e) {
        this.information = e,
        this.generalDecoder = new nx(e)
    }
    return t.prototype.getInformation = function() {
        return this.information
    }
    ,
    t.prototype.getGeneralDecoder = function() {
        return this.generalDecoder
    }
    ,
    t
}()
  , q2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Pi = function(t) {
    q2e(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.encodeCompressedGtin = function(r, n) {
        r.append("(01)");
        var i = r.length();
        r.append("9"),
        this.encodeCompressedGtinWithoutAI(r, n, i)
    }
    ,
    e.prototype.encodeCompressedGtinWithoutAI = function(r, n, i) {
        for (var o = 0; o < 4; ++o) {
            var s = this.getGeneralDecoder().extractNumericValueFromBitArray(n + 10 * o, 10);
            s / 100 === 0 && r.append("0"),
            s / 10 === 0 && r.append("0"),
            r.append(s)
        }
        e.appendCheckDigit(r, i)
    }
    ,
    e.appendCheckDigit = function(r, n) {
        for (var i = 0, o = 0; o < 13; o++) {
            var s = r.charAt(o + n).charCodeAt(0) - "0".charCodeAt(0);
            i += o & 1 ? s : 3 * s
        }
        i = 10 - i % 10,
        i === 10 && (i = 0),
        r.append(i)
    }
    ,
    e.GTIN_SIZE = 40,
    e
}(fM)
  , Z2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , J2e = function(t) {
    Z2e(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.parseInformation = function() {
        var r = new Ke;
        r.append("(01)");
        var n = r.length()
          , i = this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE, 4);
        return r.append(i),
        this.encodeCompressedGtinWithoutAI(r, e.HEADER_SIZE + 4, n),
        this.getGeneralDecoder().decodeAllCodes(r, e.HEADER_SIZE + 44)
    }
    ,
    e.HEADER_SIZE = 1 + 1 + 2,
    e
}(Pi)
  , Q2e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , ebe = function(t) {
    Q2e(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.parseInformation = function() {
        var r = new Ke;
        return this.getGeneralDecoder().decodeAllCodes(r, e.HEADER_SIZE)
    }
    ,
    e.HEADER_SIZE = 2 + 1 + 2,
    e
}(fM)
  , tbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , ix = function(t) {
    tbe(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.encodeCompressedWeight = function(r, n, i) {
        var o = this.getGeneralDecoder().extractNumericValueFromBitArray(n, i);
        this.addWeightCode(r, o);
        for (var s = this.checkWeight(o), a = 1e5, l = 0; l < 5; ++l)
            s / a === 0 && r.append("0"),
            a /= 10;
        r.append(s)
    }
    ,
    e
}(Pi)
  , rbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , dM = function(t) {
    rbe(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.parseInformation = function() {
        if (this.getInformation().getSize() !== e.HEADER_SIZE + ix.GTIN_SIZE + e.WEIGHT_SIZE)
            throw new le;
        var r = new Ke;
        return this.encodeCompressedGtin(r, e.HEADER_SIZE),
        this.encodeCompressedWeight(r, e.HEADER_SIZE + ix.GTIN_SIZE, e.WEIGHT_SIZE),
        r.toString()
    }
    ,
    e.HEADER_SIZE = 4 + 1,
    e.WEIGHT_SIZE = 15,
    e
}(ix)
  , nbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , ibe = function(t) {
    nbe(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.addWeightCode = function(r, n) {
        r.append("(3103)")
    }
    ,
    e.prototype.checkWeight = function(r) {
        return r
    }
    ,
    e
}(dM)
  , obe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , sbe = function(t) {
    obe(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.addWeightCode = function(r, n) {
        n < 1e4 ? r.append("(3202)") : r.append("(3203)")
    }
    ,
    e.prototype.checkWeight = function(r) {
        return r < 1e4 ? r : r - 1e4
    }
    ,
    e
}(dM)
  , abe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , lbe = function(t) {
    abe(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.parseInformation = function() {
        if (this.getInformation().getSize() < e.HEADER_SIZE + Pi.GTIN_SIZE)
            throw new le;
        var r = new Ke;
        this.encodeCompressedGtin(r, e.HEADER_SIZE);
        var n = this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE + Pi.GTIN_SIZE, e.LAST_DIGIT_SIZE);
        r.append("(392"),
        r.append(n),
        r.append(")");
        var i = this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE + Pi.GTIN_SIZE + e.LAST_DIGIT_SIZE, null);
        return r.append(i.getNewString()),
        r.toString()
    }
    ,
    e.HEADER_SIZE = 5 + 1 + 2,
    e.LAST_DIGIT_SIZE = 2,
    e
}(Pi)
  , cbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , ube = function(t) {
    cbe(e, t);
    function e(r) {
        return t.call(this, r) || this
    }
    return e.prototype.parseInformation = function() {
        if (this.getInformation().getSize() < e.HEADER_SIZE + Pi.GTIN_SIZE)
            throw new le;
        var r = new Ke;
        this.encodeCompressedGtin(r, e.HEADER_SIZE);
        var n = this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE + Pi.GTIN_SIZE, e.LAST_DIGIT_SIZE);
        r.append("(393"),
        r.append(n),
        r.append(")");
        var i = this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE + Pi.GTIN_SIZE + e.LAST_DIGIT_SIZE, e.FIRST_THREE_DIGITS_SIZE);
        i / 100 === 0 && r.append("0"),
        i / 10 === 0 && r.append("0"),
        r.append(i);
        var o = this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE + Pi.GTIN_SIZE + e.LAST_DIGIT_SIZE + e.FIRST_THREE_DIGITS_SIZE, null);
        return r.append(o.getNewString()),
        r.toString()
    }
    ,
    e.HEADER_SIZE = 5 + 1 + 2,
    e.LAST_DIGIT_SIZE = 2,
    e.FIRST_THREE_DIGITS_SIZE = 10,
    e
}(Pi)
  , fbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Fs = function(t) {
    fbe(e, t);
    function e(r, n, i) {
        var o = t.call(this, r) || this;
        return o.dateCode = i,
        o.firstAIdigits = n,
        o
    }
    return e.prototype.parseInformation = function() {
        if (this.getInformation().getSize() !== e.HEADER_SIZE + e.GTIN_SIZE + e.WEIGHT_SIZE + e.DATE_SIZE)
            throw new le;
        var r = new Ke;
        return this.encodeCompressedGtin(r, e.HEADER_SIZE),
        this.encodeCompressedWeight(r, e.HEADER_SIZE + e.GTIN_SIZE, e.WEIGHT_SIZE),
        this.encodeCompressedDate(r, e.HEADER_SIZE + e.GTIN_SIZE + e.WEIGHT_SIZE),
        r.toString()
    }
    ,
    e.prototype.encodeCompressedDate = function(r, n) {
        var i = this.getGeneralDecoder().extractNumericValueFromBitArray(n, e.DATE_SIZE);
        if (i !== 38400) {
            r.append("("),
            r.append(this.dateCode),
            r.append(")");
            var o = i % 32;
            i /= 32;
            var s = i % 12 + 1;
            i /= 12;
            var a = i;
            a / 10 === 0 && r.append("0"),
            r.append(a),
            s / 10 === 0 && r.append("0"),
            r.append(s),
            o / 10 === 0 && r.append("0"),
            r.append(o)
        }
    }
    ,
    e.prototype.addWeightCode = function(r, n) {
        r.append("("),
        r.append(this.firstAIdigits),
        r.append(n / 1e5),
        r.append(")")
    }
    ,
    e.prototype.checkWeight = function(r) {
        return r % 1e5
    }
    ,
    e.HEADER_SIZE = 7 + 1,
    e.WEIGHT_SIZE = 20,
    e.DATE_SIZE = 16,
    e
}(ix);
function dbe(t) {
    try {
        if (t.get(1))
            return new J2e(t);
        if (!t.get(2))
            return new ebe(t);
        var e = nx.extractNumericValueFromBitArray(t, 1, 4);
        switch (e) {
        case 4:
            return new ibe(t);
        case 5:
            return new sbe(t)
        }
        var r = nx.extractNumericValueFromBitArray(t, 1, 5);
        switch (r) {
        case 12:
            return new lbe(t);
        case 13:
            return new ube(t)
        }
        var n = nx.extractNumericValueFromBitArray(t, 1, 7);
        switch (n) {
        case 56:
            return new Fs(t,"310","11");
        case 57:
            return new Fs(t,"320","11");
        case 58:
            return new Fs(t,"310","13");
        case 59:
            return new Fs(t,"320","13");
        case 60:
            return new Fs(t,"310","15");
        case 61:
            return new Fs(t,"320","15");
        case 62:
            return new Fs(t,"310","17");
        case 63:
            return new Fs(t,"320","17")
        }
    } catch (i) {
        throw console.log(i),
        new Ed("unknown decoder: " + t)
    }
}
var a6 = function() {
    function t(e, r, n, i) {
        this.leftchar = e,
        this.rightchar = r,
        this.finderpattern = n,
        this.maybeLast = i
    }
    return t.prototype.mayBeLast = function() {
        return this.maybeLast
    }
    ,
    t.prototype.getLeftChar = function() {
        return this.leftchar
    }
    ,
    t.prototype.getRightChar = function() {
        return this.rightchar
    }
    ,
    t.prototype.getFinderPattern = function() {
        return this.finderpattern
    }
    ,
    t.prototype.mustBeLast = function() {
        return this.rightchar == null
    }
    ,
    t.prototype.toString = function() {
        return "[ " + this.leftchar + ", " + this.rightchar + " : " + (this.finderpattern == null ? "null" : this.finderpattern.getValue()) + " ]"
    }
    ,
    t.equals = function(e, r) {
        return e instanceof t ? t.equalsOrNull(e.leftchar, r.leftchar) && t.equalsOrNull(e.rightchar, r.rightchar) && t.equalsOrNull(e.finderpattern, r.finderpattern) : !1
    }
    ,
    t.equalsOrNull = function(e, r) {
        return e === null ? r === null : t.equals(e, r)
    }
    ,
    t.prototype.hashCode = function() {
        var e = this.leftchar.getValue() ^ this.rightchar.getValue() ^ this.finderpattern.getValue();
        return e
    }
    ,
    t
}()
  , hbe = function() {
    function t(e, r, n) {
        this.pairs = e,
        this.rowNumber = r,
        this.wasReversed = n
    }
    return t.prototype.getPairs = function() {
        return this.pairs
    }
    ,
    t.prototype.getRowNumber = function() {
        return this.rowNumber
    }
    ,
    t.prototype.isReversed = function() {
        return this.wasReversed
    }
    ,
    t.prototype.isEquivalent = function(e) {
        return this.checkEqualitity(this, e)
    }
    ,
    t.prototype.toString = function() {
        return "{ " + this.pairs + " }"
    }
    ,
    t.prototype.equals = function(e, r) {
        return e instanceof t ? this.checkEqualitity(e, r) && e.wasReversed === r.wasReversed : !1
    }
    ,
    t.prototype.checkEqualitity = function(e, r) {
        if (!(!e || !r)) {
            var n;
            return e.forEach(function(i, o) {
                r.forEach(function(s) {
                    i.getLeftChar().getValue() === s.getLeftChar().getValue() && i.getRightChar().getValue() === s.getRightChar().getValue() && i.getFinderPatter().getValue() === s.getFinderPatter().getValue() && (n = !0)
                })
            }),
            n
        }
    }
    ,
    t
}()
  , xbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Ps = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , pbe = function(t) {
    xbe(e, t);
    function e() {
        var r = t !== null && t.apply(this, arguments) || this;
        return r.pairs = new Array(e.MAX_PAIRS),
        r.rows = new Array,
        r.startEnd = [2],
        r
    }
    return e.prototype.decodeRow = function(r, n, i) {
        this.pairs.length = 0,
        this.startFromEven = !1;
        try {
            return e.constructResult(this.decodeRow2pairs(r, n))
        } catch {}
        return this.pairs.length = 0,
        this.startFromEven = !0,
        e.constructResult(this.decodeRow2pairs(r, n))
    }
    ,
    e.prototype.reset = function() {
        this.pairs.length = 0,
        this.rows.length = 0
    }
    ,
    e.prototype.decodeRow2pairs = function(r, n) {
        for (var i = !1; !i; )
            try {
                this.pairs.push(this.retrieveNextPair(n, this.pairs, r))
            } catch (a) {
                if (a instanceof le) {
                    if (!this.pairs.length)
                        throw new le;
                    i = !0
                }
            }
        if (this.checkChecksum())
            return this.pairs;
        var o;
        if (this.rows.length ? o = !0 : o = !1,
        this.storeRow(r, !1),
        o) {
            var s = this.checkRowsBoolean(!1);
            if (s != null || (s = this.checkRowsBoolean(!0),
            s != null))
                return s
        }
        throw new le
    }
    ,
    e.prototype.checkRowsBoolean = function(r) {
        if (this.rows.length > 25)
            return this.rows.length = 0,
            null;
        this.pairs.length = 0,
        r && (this.rows = this.rows.reverse());
        var n = null;
        try {
            n = this.checkRows(new Array, 0)
        } catch (i) {
            console.log(i)
        }
        return r && (this.rows = this.rows.reverse()),
        n
    }
    ,
    e.prototype.checkRows = function(r, n) {
        for (var i, o, s = n; s < this.rows.length; s++) {
            var a = this.rows[s];
            this.pairs.length = 0;
            try {
                for (var l = (i = void 0,
                Ps(r)), c = l.next(); !c.done; c = l.next()) {
                    var u = c.value;
                    this.pairs.push(u.getPairs())
                }
            } catch (d) {
                i = {
                    error: d
                }
            } finally {
                try {
                    c && !c.done && (o = l.return) && o.call(l)
                } finally {
                    if (i)
                        throw i.error
                }
            }
            if (this.pairs.push(a.getPairs()),
            !!e.isValidSequence(this.pairs)) {
                if (this.checkChecksum())
                    return this.pairs;
                var f = new Array(r);
                f.push(a);
                try {
                    return this.checkRows(f, s + 1)
                } catch (d) {
                    console.log(d)
                }
            }
        }
        throw new le
    }
    ,
    e.isValidSequence = function(r) {
        var n, i;
        try {
            for (var o = Ps(e.FINDER_PATTERN_SEQUENCES), s = o.next(); !s.done; s = o.next()) {
                var a = s.value;
                if (!(r.length > a.length)) {
                    for (var l = !0, c = 0; c < r.length; c++)
                        if (r[c].getFinderPattern().getValue() !== a[c]) {
                            l = !1;
                            break
                        }
                    if (l)
                        return !0
                }
            }
        } catch (u) {
            n = {
                error: u
            }
        } finally {
            try {
                s && !s.done && (i = o.return) && i.call(o)
            } finally {
                if (n)
                    throw n.error
            }
        }
        return !1
    }
    ,
    e.prototype.storeRow = function(r, n) {
        for (var i = 0, o = !1, s = !1; i < this.rows.length; ) {
            var a = this.rows[i];
            if (a.getRowNumber() > r) {
                s = a.isEquivalent(this.pairs);
                break
            }
            o = a.isEquivalent(this.pairs),
            i++
        }
        s || o || e.isPartialRow(this.pairs, this.rows) || (this.rows.push(i, new hbe(this.pairs,r,n)),
        this.removePartialRows(this.pairs, this.rows))
    }
    ,
    e.prototype.removePartialRows = function(r, n) {
        var i, o, s, a, l, c;
        try {
            for (var u = Ps(n), f = u.next(); !f.done; f = u.next()) {
                var d = f.value;
                if (d.getPairs().length !== r.length) {
                    var h = !0;
                    try {
                        for (var x = (s = void 0,
                        Ps(d.getPairs())), y = x.next(); !y.done; y = x.next()) {
                            var m = y.value
                              , E = !1;
                            try {
                                for (var g = (l = void 0,
                                Ps(r)), p = g.next(); !p.done; p = g.next()) {
                                    var v = p.value;
                                    if (a6.equals(m, v)) {
                                        E = !0;
                                        break
                                    }
                                }
                            } catch (_) {
                                l = {
                                    error: _
                                }
                            } finally {
                                try {
                                    p && !p.done && (c = g.return) && c.call(g)
                                } finally {
                                    if (l)
                                        throw l.error
                                }
                            }
                            E || (h = !1)
                        }
                    } catch (_) {
                        s = {
                            error: _
                        }
                    } finally {
                        try {
                            y && !y.done && (a = x.return) && a.call(x)
                        } finally {
                            if (s)
                                throw s.error
                        }
                    }
                }
            }
        } catch (_) {
            i = {
                error: _
            }
        } finally {
            try {
                f && !f.done && (o = u.return) && o.call(u)
            } finally {
                if (i)
                    throw i.error
            }
        }
    }
    ,
    e.isPartialRow = function(r, n) {
        var i, o, s, a, l, c;
        try {
            for (var u = Ps(n), f = u.next(); !f.done; f = u.next()) {
                var d = f.value
                  , h = !0;
                try {
                    for (var x = (s = void 0,
                    Ps(r)), y = x.next(); !y.done; y = x.next()) {
                        var m = y.value
                          , E = !1;
                        try {
                            for (var g = (l = void 0,
                            Ps(d.getPairs())), p = g.next(); !p.done; p = g.next()) {
                                var v = p.value;
                                if (m.equals(v)) {
                                    E = !0;
                                    break
                                }
                            }
                        } catch (_) {
                            l = {
                                error: _
                            }
                        } finally {
                            try {
                                p && !p.done && (c = g.return) && c.call(g)
                            } finally {
                                if (l)
                                    throw l.error
                            }
                        }
                        if (!E) {
                            h = !1;
                            break
                        }
                    }
                } catch (_) {
                    s = {
                        error: _
                    }
                } finally {
                    try {
                        y && !y.done && (a = x.return) && a.call(x)
                    } finally {
                        if (s)
                            throw s.error
                    }
                }
                if (h)
                    return !0
            }
        } catch (_) {
            i = {
                error: _
            }
        } finally {
            try {
                f && !f.done && (o = u.return) && o.call(u)
            } finally {
                if (i)
                    throw i.error
            }
        }
        return !1
    }
    ,
    e.prototype.getRows = function() {
        return this.rows
    }
    ,
    e.constructResult = function(r) {
        var n = j2e.buildBitArray(r)
          , i = dbe(n)
          , o = i.parseInformation()
          , s = r[0].getFinderPattern().getResultPoints()
          , a = r[r.length - 1].getFinderPattern().getResultPoints()
          , l = [s[0], s[1], a[0], a[1]];
        return new rn(o,null,null,l,ke.RSS_EXPANDED,null)
    }
    ,
    e.prototype.checkChecksum = function() {
        var r = this.pairs.get(0)
          , n = r.getLeftChar()
          , i = r.getRightChar();
        if (i === null)
            return !1;
        for (var o = i.getChecksumPortion(), s = 2, a = 1; a < this.pairs.size(); ++a) {
            var l = this.pairs.get(a);
            o += l.getLeftChar().getChecksumPortion(),
            s++;
            var c = l.getRightChar();
            c != null && (o += c.getChecksumPortion(),
            s++)
        }
        o %= 211;
        var u = 211 * (s - 4) + o;
        return u === n.getValue()
    }
    ,
    e.getNextSecondBar = function(r, n) {
        var i;
        return r.get(n) ? (i = r.getNextUnset(n),
        i = r.getNextSet(i)) : (i = r.getNextSet(n),
        i = r.getNextUnset(i)),
        i
    }
    ,
    e.prototype.retrieveNextPair = function(r, n, i) {
        var o = n.length % 2 === 0;
        this.startFromEven && (o = !o);
        var s, a = !0, l = -1;
        do
            this.findNextPair(r, n, l),
            s = this.parseFoundFinderPattern(r, i, o),
            s === null ? l = e.getNextSecondBar(r, this.startEnd[0]) : a = !1;
        while (a);
        var c = this.decodeDataCharacter(r, s, o, !0);
        if (!this.isEmptyPair(n) && n[n.length - 1].mustBeLast())
            throw new le;
        var u;
        try {
            u = this.decodeDataCharacter(r, s, o, !1)
        } catch (f) {
            u = null,
            console.log(f)
        }
        return new a6(c,u,s,!0)
    }
    ,
    e.prototype.isEmptyPair = function(r) {
        return r.length === 0
    }
    ,
    e.prototype.findNextPair = function(r, n, i) {
        var o = this.getDecodeFinderCounters();
        o[0] = 0,
        o[1] = 0,
        o[2] = 0,
        o[3] = 0;
        var s = r.getSize(), a;
        if (i >= 0)
            a = i;
        else if (this.isEmptyPair(n))
            a = 0;
        else {
            var l = n[n.length - 1];
            a = l.getFinderPattern().getStartEnd()[1]
        }
        var c = n.length % 2 !== 0;
        this.startFromEven && (c = !c);
        for (var u = !1; a < s && (u = !r.get(a),
        !!u); )
            a++;
        for (var f = 0, d = a, h = a; h < s; h++)
            if (r.get(h) !== u)
                o[f]++;
            else {
                if (f === 3) {
                    if (c && e.reverseCounters(o),
                    e.isFinderPattern(o)) {
                        this.startEnd[0] = d,
                        this.startEnd[1] = h;
                        return
                    }
                    c && e.reverseCounters(o),
                    d += o[0] + o[1],
                    o[0] = o[2],
                    o[1] = o[3],
                    o[2] = 0,
                    o[3] = 0,
                    f--
                } else
                    f++;
                o[f] = 1,
                u = !u
            }
        throw new le
    }
    ,
    e.reverseCounters = function(r) {
        for (var n = r.length, i = 0; i < n / 2; ++i) {
            var o = r[i];
            r[i] = r[n - i - 1],
            r[n - i - 1] = o
        }
    }
    ,
    e.prototype.parseFoundFinderPattern = function(r, n, i) {
        var o, s, a;
        if (i) {
            for (var l = this.startEnd[0] - 1; l >= 0 && !r.get(l); )
                l--;
            l++,
            o = this.startEnd[0] - l,
            s = l,
            a = this.startEnd[1]
        } else
            s = this.startEnd[0],
            a = r.getNextUnset(this.startEnd[1] + 1),
            o = a - this.startEnd[1];
        var c = this.getDecodeFinderCounters();
        Dt.arraycopy(c, 0, c, 1, c.length - 1),
        c[0] = o;
        var u;
        try {
            u = this.parseFinderValue(c, e.FINDER_PATTERNS)
        } catch {
            return null
        }
        return new uM(u,[s, a],s,a,n)
    }
    ,
    e.prototype.decodeDataCharacter = function(r, n, i, o) {
        for (var s = this.getDataCharacterCounters(), a = 0; a < s.length; a++)
            s[a] = 0;
        if (o)
            e.recordPatternInReverse(r, n.getStartEnd()[0], s);
        else {
            e.recordPattern(r, n.getStartEnd()[1], s);
            for (var l = 0, c = s.length - 1; l < c; l++,
            c--) {
                var u = s[l];
                s[l] = s[c],
                s[c] = u
            }
        }
        var f = 17
          , d = ft.sum(new Int32Array(s)) / f
          , h = (n.getStartEnd()[1] - n.getStartEnd()[0]) / 15;
        if (Math.abs(d - h) / h > .3)
            throw new le;
        for (var x = this.getOddCounts(), y = this.getEvenCounts(), m = this.getOddRoundingErrors(), E = this.getEvenRoundingErrors(), l = 0; l < s.length; l++) {
            var g = 1 * s[l] / d
              , p = g + .5;
            if (p < 1) {
                if (g < .3)
                    throw new le;
                p = 1
            } else if (p > 8) {
                if (g > 8.7)
                    throw new le;
                p = 8
            }
            var v = l / 2;
            l & 1 ? (y[v] = p,
            E[v] = g - p) : (x[v] = p,
            m[v] = g - p)
        }
        this.adjustOddEvenCounts(f);
        for (var _ = 4 * n.getValue() + (i ? 0 : 2) + (o ? 0 : 1) - 1, b = 0, C = 0, l = x.length - 1; l >= 0; l--) {
            if (e.isNotA1left(n, i, o)) {
                var B = e.WEIGHTS[_][2 * l];
                C += x[l] * B
            }
            b += x[l]
        }
        for (var T = 0, l = y.length - 1; l >= 0; l--)
            if (e.isNotA1left(n, i, o)) {
                var B = e.WEIGHTS[_][2 * l + 1];
                T += y[l] * B
            }
        var A = C + T;
        if (b & 1 || b > 13 || b < 4)
            throw new le;
        var w = (13 - b) / 2
          , S = e.SYMBOL_WIDEST[w]
          , D = 9 - S
          , F = wc.getRSSvalue(x, S, !0)
          , R = wc.getRSSvalue(y, D, !1)
          , P = e.EVEN_TOTAL_SUBSET[w]
          , N = e.GSUM[w]
          , j = F * P + R + N;
        return new Qx(j,A)
    }
    ,
    e.isNotA1left = function(r, n, i) {
        return !(r.getValue() === 0 && n && i)
    }
    ,
    e.prototype.adjustOddEvenCounts = function(r) {
        var n = ft.sum(new Int32Array(this.getOddCounts()))
          , i = ft.sum(new Int32Array(this.getEvenCounts()))
          , o = !1
          , s = !1;
        n > 13 ? s = !0 : n < 4 && (o = !0);
        var a = !1
          , l = !1;
        i > 13 ? l = !0 : i < 4 && (a = !0);
        var c = n + i - r
          , u = (n & 1) === 1
          , f = (i & 1) === 0;
        if (c === 1)
            if (u) {
                if (f)
                    throw new le;
                s = !0
            } else {
                if (!f)
                    throw new le;
                l = !0
            }
        else if (c === -1)
            if (u) {
                if (f)
                    throw new le;
                o = !0
            } else {
                if (!f)
                    throw new le;
                a = !0
            }
        else if (c === 0) {
            if (u) {
                if (!f)
                    throw new le;
                n < i ? (o = !0,
                l = !0) : (s = !0,
                a = !0)
            } else if (f)
                throw new le
        } else
            throw new le;
        if (o) {
            if (s)
                throw new le;
            e.increment(this.getOddCounts(), this.getOddRoundingErrors())
        }
        if (s && e.decrement(this.getOddCounts(), this.getOddRoundingErrors()),
        a) {
            if (l)
                throw new le;
            e.increment(this.getEvenCounts(), this.getOddRoundingErrors())
        }
        l && e.decrement(this.getEvenCounts(), this.getEvenRoundingErrors())
    }
    ,
    e.SYMBOL_WIDEST = [7, 5, 4, 3, 1],
    e.EVEN_TOTAL_SUBSET = [4, 20, 52, 104, 204],
    e.GSUM = [0, 348, 1388, 2948, 3988],
    e.FINDER_PATTERNS = [Int32Array.from([1, 8, 4, 1]), Int32Array.from([3, 6, 4, 1]), Int32Array.from([3, 4, 6, 1]), Int32Array.from([3, 2, 8, 1]), Int32Array.from([2, 6, 5, 1]), Int32Array.from([2, 2, 9, 1])],
    e.WEIGHTS = [[1, 3, 9, 27, 81, 32, 96, 77], [20, 60, 180, 118, 143, 7, 21, 63], [189, 145, 13, 39, 117, 140, 209, 205], [193, 157, 49, 147, 19, 57, 171, 91], [62, 186, 136, 197, 169, 85, 44, 132], [185, 133, 188, 142, 4, 12, 36, 108], [113, 128, 173, 97, 80, 29, 87, 50], [150, 28, 84, 41, 123, 158, 52, 156], [46, 138, 203, 187, 139, 206, 196, 166], [76, 17, 51, 153, 37, 111, 122, 155], [43, 129, 176, 106, 107, 110, 119, 146], [16, 48, 144, 10, 30, 90, 59, 177], [109, 116, 137, 200, 178, 112, 125, 164], [70, 210, 208, 202, 184, 130, 179, 115], [134, 191, 151, 31, 93, 68, 204, 190], [148, 22, 66, 198, 172, 94, 71, 2], [6, 18, 54, 162, 64, 192, 154, 40], [120, 149, 25, 75, 14, 42, 126, 167], [79, 26, 78, 23, 69, 207, 199, 175], [103, 98, 83, 38, 114, 131, 182, 124], [161, 61, 183, 127, 170, 88, 53, 159], [55, 165, 73, 8, 24, 72, 5, 15], [45, 135, 194, 160, 58, 174, 100, 89]],
    e.FINDER_PAT_A = 0,
    e.FINDER_PAT_B = 1,
    e.FINDER_PAT_C = 2,
    e.FINDER_PAT_D = 3,
    e.FINDER_PAT_E = 4,
    e.FINDER_PAT_F = 5,
    e.FINDER_PATTERN_SEQUENCES = [[e.FINDER_PAT_A, e.FINDER_PAT_A], [e.FINDER_PAT_A, e.FINDER_PAT_B, e.FINDER_PAT_B], [e.FINDER_PAT_A, e.FINDER_PAT_C, e.FINDER_PAT_B, e.FINDER_PAT_D], [e.FINDER_PAT_A, e.FINDER_PAT_E, e.FINDER_PAT_B, e.FINDER_PAT_D, e.FINDER_PAT_C], [e.FINDER_PAT_A, e.FINDER_PAT_E, e.FINDER_PAT_B, e.FINDER_PAT_D, e.FINDER_PAT_D, e.FINDER_PAT_F], [e.FINDER_PAT_A, e.FINDER_PAT_E, e.FINDER_PAT_B, e.FINDER_PAT_D, e.FINDER_PAT_E, e.FINDER_PAT_F, e.FINDER_PAT_F], [e.FINDER_PAT_A, e.FINDER_PAT_A, e.FINDER_PAT_B, e.FINDER_PAT_B, e.FINDER_PAT_C, e.FINDER_PAT_C, e.FINDER_PAT_D, e.FINDER_PAT_D], [e.FINDER_PAT_A, e.FINDER_PAT_A, e.FINDER_PAT_B, e.FINDER_PAT_B, e.FINDER_PAT_C, e.FINDER_PAT_C, e.FINDER_PAT_D, e.FINDER_PAT_E, e.FINDER_PAT_E], [e.FINDER_PAT_A, e.FINDER_PAT_A, e.FINDER_PAT_B, e.FINDER_PAT_B, e.FINDER_PAT_C, e.FINDER_PAT_C, e.FINDER_PAT_D, e.FINDER_PAT_E, e.FINDER_PAT_F, e.FINDER_PAT_F], [e.FINDER_PAT_A, e.FINDER_PAT_A, e.FINDER_PAT_B, e.FINDER_PAT_B, e.FINDER_PAT_C, e.FINDER_PAT_D, e.FINDER_PAT_D, e.FINDER_PAT_E, e.FINDER_PAT_E, e.FINDER_PAT_F, e.FINDER_PAT_F]],
    e.MAX_PAIRS = 11,
    e
}($a)
  , gbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , mbe = function(t) {
    gbe(e, t);
    function e(r, n, i) {
        var o = t.call(this, r, n) || this;
        return o.count = 0,
        o.finderPattern = i,
        o
    }
    return e.prototype.getFinderPattern = function() {
        return this.finderPattern
    }
    ,
    e.prototype.getCount = function() {
        return this.count
    }
    ,
    e.prototype.incrementCount = function() {
        this.count++
    }
    ,
    e
}(Qx)
  , vbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Wm = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , l6 = function(t) {
    vbe(e, t);
    function e() {
        var r = t !== null && t.apply(this, arguments) || this;
        return r.possibleLeftPairs = [],
        r.possibleRightPairs = [],
        r
    }
    return e.prototype.decodeRow = function(r, n, i) {
        var o, s, a, l, c = this.decodePair(n, !1, r, i);
        e.addOrTally(this.possibleLeftPairs, c),
        n.reverse();
        var u = this.decodePair(n, !0, r, i);
        e.addOrTally(this.possibleRightPairs, u),
        n.reverse();
        try {
            for (var f = Wm(this.possibleLeftPairs), d = f.next(); !d.done; d = f.next()) {
                var h = d.value;
                if (h.getCount() > 1)
                    try {
                        for (var x = (a = void 0,
                        Wm(this.possibleRightPairs)), y = x.next(); !y.done; y = x.next()) {
                            var m = y.value;
                            if (m.getCount() > 1 && e.checkChecksum(h, m))
                                return e.constructResult(h, m)
                        }
                    } catch (E) {
                        a = {
                            error: E
                        }
                    } finally {
                        try {
                            y && !y.done && (l = x.return) && l.call(x)
                        } finally {
                            if (a)
                                throw a.error
                        }
                    }
            }
        } catch (E) {
            o = {
                error: E
            }
        } finally {
            try {
                d && !d.done && (s = f.return) && s.call(f)
            } finally {
                if (o)
                    throw o.error
            }
        }
        throw new le
    }
    ,
    e.addOrTally = function(r, n) {
        var i, o;
        if (n != null) {
            var s = !1;
            try {
                for (var a = Wm(r), l = a.next(); !l.done; l = a.next()) {
                    var c = l.value;
                    if (c.getValue() === n.getValue()) {
                        c.incrementCount(),
                        s = !0;
                        break
                    }
                }
            } catch (u) {
                i = {
                    error: u
                }
            } finally {
                try {
                    l && !l.done && (o = a.return) && o.call(a)
                } finally {
                    if (i)
                        throw i.error
                }
            }
            s || r.push(n)
        }
    }
    ,
    e.prototype.reset = function() {
        this.possibleLeftPairs.length = 0,
        this.possibleRightPairs.length = 0
    }
    ,
    e.constructResult = function(r, n) {
        for (var i = 4537077 * r.getValue() + n.getValue(), o = new String(i).toString(), s = new Ke, a = 13 - o.length; a > 0; a--)
            s.append("0");
        s.append(o);
        for (var l = 0, a = 0; a < 13; a++) {
            var c = s.charAt(a).charCodeAt(0) - "0".charCodeAt(0);
            l += a & 1 ? c : 3 * c
        }
        l = 10 - l % 10,
        l === 10 && (l = 0),
        s.append(l.toString());
        var u = r.getFinderPattern().getResultPoints()
          , f = n.getFinderPattern().getResultPoints();
        return new rn(s.toString(),null,0,[u[0], u[1], f[0], f[1]],ke.RSS_14,new Date().getTime())
    }
    ,
    e.checkChecksum = function(r, n) {
        var i = (r.getChecksumPortion() + 16 * n.getChecksumPortion()) % 79
          , o = 9 * r.getFinderPattern().getValue() + n.getFinderPattern().getValue();
        return o > 72 && o--,
        o > 8 && o--,
        i === o
    }
    ,
    e.prototype.decodePair = function(r, n, i, o) {
        try {
            var s = this.findFinderPattern(r, n)
              , a = this.parseFoundFinderPattern(r, i, n, s)
              , l = o == null ? null : o.get(Ft.NEED_RESULT_POINT_CALLBACK);
            if (l != null) {
                var c = (s[0] + s[1]) / 2;
                n && (c = r.getSize() - 1 - c),
                l.foundPossibleResultPoint(new Te(c,i))
            }
            var u = this.decodeDataCharacter(r, a, !0)
              , f = this.decodeDataCharacter(r, a, !1);
            return new mbe(1597 * u.getValue() + f.getValue(),u.getChecksumPortion() + 4 * f.getChecksumPortion(),a)
        } catch {
            return null
        }
    }
    ,
    e.prototype.decodeDataCharacter = function(r, n, i) {
        for (var o = this.getDataCharacterCounters(), s = 0; s < o.length; s++)
            o[s] = 0;
        if (i)
            Ar.recordPatternInReverse(r, n.getStartEnd()[0], o);
        else {
            Ar.recordPattern(r, n.getStartEnd()[1] + 1, o);
            for (var a = 0, l = o.length - 1; a < l; a++,
            l--) {
                var c = o[a];
                o[a] = o[l],
                o[l] = c
            }
        }
        for (var u = i ? 16 : 15, f = ft.sum(new Int32Array(o)) / u, d = this.getOddCounts(), h = this.getEvenCounts(), x = this.getOddRoundingErrors(), y = this.getEvenRoundingErrors(), a = 0; a < o.length; a++) {
            var m = o[a] / f
              , E = Math.floor(m + .5);
            E < 1 ? E = 1 : E > 8 && (E = 8);
            var g = Math.floor(a / 2);
            a & 1 ? (h[g] = E,
            y[g] = m - E) : (d[g] = E,
            x[g] = m - E)
        }
        this.adjustOddEvenCounts(i, u);
        for (var p = 0, v = 0, a = d.length - 1; a >= 0; a--)
            v *= 9,
            v += d[a],
            p += d[a];
        for (var _ = 0, b = 0, a = h.length - 1; a >= 0; a--)
            _ *= 9,
            _ += h[a],
            b += h[a];
        var C = v + 3 * _;
        if (i) {
            if (p & 1 || p > 12 || p < 4)
                throw new le;
            var B = (12 - p) / 2
              , T = e.OUTSIDE_ODD_WIDEST[B]
              , A = 9 - T
              , w = wc.getRSSvalue(d, T, !1)
              , S = wc.getRSSvalue(h, A, !0)
              , D = e.OUTSIDE_EVEN_TOTAL_SUBSET[B]
              , F = e.OUTSIDE_GSUM[B];
            return new Qx(w * D + S + F,C)
        } else {
            if (b & 1 || b > 10 || b < 4)
                throw new le;
            var B = (10 - b) / 2
              , T = e.INSIDE_ODD_WIDEST[B]
              , A = 9 - T
              , w = wc.getRSSvalue(d, T, !0)
              , S = wc.getRSSvalue(h, A, !1)
              , R = e.INSIDE_ODD_TOTAL_SUBSET[B]
              , F = e.INSIDE_GSUM[B];
            return new Qx(S * R + w + F,C)
        }
    }
    ,
    e.prototype.findFinderPattern = function(r, n) {
        var i = this.getDecodeFinderCounters();
        i[0] = 0,
        i[1] = 0,
        i[2] = 0,
        i[3] = 0;
        for (var o = r.getSize(), s = !1, a = 0; a < o && (s = !r.get(a),
        n !== s); )
            a++;
        for (var l = 0, c = a, u = a; u < o; u++)
            if (r.get(u) !== s)
                i[l]++;
            else {
                if (l === 3) {
                    if ($a.isFinderPattern(i))
                        return [c, u];
                    c += i[0] + i[1],
                    i[0] = i[2],
                    i[1] = i[3],
                    i[2] = 0,
                    i[3] = 0,
                    l--
                } else
                    l++;
                i[l] = 1,
                s = !s
            }
        throw new le
    }
    ,
    e.prototype.parseFoundFinderPattern = function(r, n, i, o) {
        for (var s = r.get(o[0]), a = o[0] - 1; a >= 0 && s !== r.get(a); )
            a--;
        a++;
        var l = o[0] - a
          , c = this.getDecodeFinderCounters()
          , u = new Int32Array(c.length);
        Dt.arraycopy(c, 0, u, 1, c.length - 1),
        u[0] = l;
        var f = this.parseFinderValue(u, e.FINDER_PATTERNS)
          , d = a
          , h = o[1];
        return i && (d = r.getSize() - 1 - d,
        h = r.getSize() - 1 - h),
        new uM(f,[a, o[1]],d,h,n)
    }
    ,
    e.prototype.adjustOddEvenCounts = function(r, n) {
        var i = ft.sum(new Int32Array(this.getOddCounts()))
          , o = ft.sum(new Int32Array(this.getEvenCounts()))
          , s = !1
          , a = !1
          , l = !1
          , c = !1;
        r ? (i > 12 ? a = !0 : i < 4 && (s = !0),
        o > 12 ? c = !0 : o < 4 && (l = !0)) : (i > 11 ? a = !0 : i < 5 && (s = !0),
        o > 10 ? c = !0 : o < 4 && (l = !0));
        var u = i + o - n
          , f = (i & 1) === (r ? 1 : 0)
          , d = (o & 1) === 1;
        if (u === 1)
            if (f) {
                if (d)
                    throw new le;
                a = !0
            } else {
                if (!d)
                    throw new le;
                c = !0
            }
        else if (u === -1)
            if (f) {
                if (d)
                    throw new le;
                s = !0
            } else {
                if (!d)
                    throw new le;
                l = !0
            }
        else if (u === 0) {
            if (f) {
                if (!d)
                    throw new le;
                i < o ? (s = !0,
                c = !0) : (a = !0,
                l = !0)
            } else if (d)
                throw new le
        } else
            throw new le;
        if (s) {
            if (a)
                throw new le;
            $a.increment(this.getOddCounts(), this.getOddRoundingErrors())
        }
        if (a && $a.decrement(this.getOddCounts(), this.getOddRoundingErrors()),
        l) {
            if (c)
                throw new le;
            $a.increment(this.getEvenCounts(), this.getOddRoundingErrors())
        }
        c && $a.decrement(this.getEvenCounts(), this.getEvenRoundingErrors())
    }
    ,
    e.OUTSIDE_EVEN_TOTAL_SUBSET = [1, 10, 34, 70, 126],
    e.INSIDE_ODD_TOTAL_SUBSET = [4, 20, 48, 81],
    e.OUTSIDE_GSUM = [0, 161, 961, 2015, 2715],
    e.INSIDE_GSUM = [0, 336, 1036, 1516],
    e.OUTSIDE_ODD_WIDEST = [8, 6, 4, 3, 1],
    e.INSIDE_ODD_WIDEST = [2, 4, 6, 8],
    e.FINDER_PATTERNS = [Int32Array.from([3, 8, 2, 1]), Int32Array.from([3, 5, 5, 1]), Int32Array.from([3, 3, 7, 1]), Int32Array.from([3, 1, 9, 1]), Int32Array.from([2, 7, 4, 1]), Int32Array.from([2, 5, 6, 1]), Int32Array.from([2, 3, 8, 1]), Int32Array.from([1, 5, 7, 1]), Int32Array.from([1, 3, 9, 1])],
    e
}($a)
  , ybe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Bc = function(t) {
    ybe(e, t);
    function e(r) {
        var n = t.call(this) || this;
        n.readers = [];
        var i = r ? r.get(Ft.POSSIBLE_FORMATS) : null
          , o = r && r.get(Ft.ASSUME_CODE_39_CHECK_DIGIT) !== void 0
          , s = r && r.get(Ft.ENABLE_CODE_39_EXTENDED_MODE) !== void 0;
        return i && ((i.includes(ke.EAN_13) || i.includes(ke.UPC_A) || i.includes(ke.EAN_8) || i.includes(ke.UPC_E)) && n.readers.push(new jm(r)),
        i.includes(ke.CODE_39) && n.readers.push(new J4(o,s)),
        i.includes(ke.CODE_93) && n.readers.push(new Q4),
        i.includes(ke.CODE_128) && n.readers.push(new Z4),
        i.includes(ke.ITF) && n.readers.push(new e6),
        i.includes(ke.CODABAR) && n.readers.push(new G2e),
        i.includes(ke.RSS_14) && n.readers.push(new l6),
        i.includes(ke.RSS_EXPANDED) && (console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),
        n.readers.push(new pbe))),
        n.readers.length === 0 && (n.readers.push(new jm(r)),
        n.readers.push(new J4),
        n.readers.push(new Q4),
        n.readers.push(new jm(r)),
        n.readers.push(new Z4),
        n.readers.push(new e6),
        n.readers.push(new l6)),
        n
    }
    return e.prototype.decodeRow = function(r, n, i) {
        for (var o = 0; o < this.readers.length; o++)
            try {
                return this.readers[o].decodeRow(r, n, i)
            } catch {}
        throw new le
    }
    ,
    e.prototype.reset = function() {
        this.readers.forEach(function(r) {
            return r.reset()
        })
    }
    ,
    e
}(Ar)
  , Ebe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    Ebe(e, t);
    function e(r, n) {
        return r === void 0 && (r = 500),
        t.call(this, new Bc(n), r, n) || this
    }
    return e
}
)(Du);
var c6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, pt = function() {
    function t(e, r, n) {
        this.ecCodewords = e,
        this.ecBlocks = [r],
        n && this.ecBlocks.push(n)
    }
    return t.prototype.getECCodewords = function() {
        return this.ecCodewords
    }
    ,
    t.prototype.getECBlocks = function() {
        return this.ecBlocks
    }
    ,
    t
}(), dt = function() {
    function t(e, r) {
        this.count = e,
        this.dataCodewords = r
    }
    return t.prototype.getCount = function() {
        return this.count
    }
    ,
    t.prototype.getDataCodewords = function() {
        return this.dataCodewords
    }
    ,
    t
}(), _be = function() {
    function t(e, r, n, i, o, s) {
        var a, l;
        this.versionNumber = e,
        this.symbolSizeRows = r,
        this.symbolSizeColumns = n,
        this.dataRegionSizeRows = i,
        this.dataRegionSizeColumns = o,
        this.ecBlocks = s;
        var c = 0
          , u = s.getECCodewords()
          , f = s.getECBlocks();
        try {
            for (var d = c6(f), h = d.next(); !h.done; h = d.next()) {
                var x = h.value;
                c += x.getCount() * (x.getDataCodewords() + u)
            }
        } catch (y) {
            a = {
                error: y
            }
        } finally {
            try {
                h && !h.done && (l = d.return) && l.call(d)
            } finally {
                if (a)
                    throw a.error
            }
        }
        this.totalCodewords = c
    }
    return t.prototype.getVersionNumber = function() {
        return this.versionNumber
    }
    ,
    t.prototype.getSymbolSizeRows = function() {
        return this.symbolSizeRows
    }
    ,
    t.prototype.getSymbolSizeColumns = function() {
        return this.symbolSizeColumns
    }
    ,
    t.prototype.getDataRegionSizeRows = function() {
        return this.dataRegionSizeRows
    }
    ,
    t.prototype.getDataRegionSizeColumns = function() {
        return this.dataRegionSizeColumns
    }
    ,
    t.prototype.getTotalCodewords = function() {
        return this.totalCodewords
    }
    ,
    t.prototype.getECBlocks = function() {
        return this.ecBlocks
    }
    ,
    t.getVersionForDimensions = function(e, r) {
        var n, i;
        if (e & 1 || r & 1)
            throw new ge;
        try {
            for (var o = c6(t.VERSIONS), s = o.next(); !s.done; s = o.next()) {
                var a = s.value;
                if (a.symbolSizeRows === e && a.symbolSizeColumns === r)
                    return a
            }
        } catch (l) {
            n = {
                error: l
            }
        } finally {
            try {
                s && !s.done && (i = o.return) && i.call(o)
            } finally {
                if (n)
                    throw n.error
            }
        }
        throw new ge
    }
    ,
    t.prototype.toString = function() {
        return "" + this.versionNumber
    }
    ,
    t.buildVersions = function() {
        return [new t(1,10,10,8,8,new pt(5,new dt(1,3))), new t(2,12,12,10,10,new pt(7,new dt(1,5))), new t(3,14,14,12,12,new pt(10,new dt(1,8))), new t(4,16,16,14,14,new pt(12,new dt(1,12))), new t(5,18,18,16,16,new pt(14,new dt(1,18))), new t(6,20,20,18,18,new pt(18,new dt(1,22))), new t(7,22,22,20,20,new pt(20,new dt(1,30))), new t(8,24,24,22,22,new pt(24,new dt(1,36))), new t(9,26,26,24,24,new pt(28,new dt(1,44))), new t(10,32,32,14,14,new pt(36,new dt(1,62))), new t(11,36,36,16,16,new pt(42,new dt(1,86))), new t(12,40,40,18,18,new pt(48,new dt(1,114))), new t(13,44,44,20,20,new pt(56,new dt(1,144))), new t(14,48,48,22,22,new pt(68,new dt(1,174))), new t(15,52,52,24,24,new pt(42,new dt(2,102))), new t(16,64,64,14,14,new pt(56,new dt(2,140))), new t(17,72,72,16,16,new pt(36,new dt(4,92))), new t(18,80,80,18,18,new pt(48,new dt(4,114))), new t(19,88,88,20,20,new pt(56,new dt(4,144))), new t(20,96,96,22,22,new pt(68,new dt(4,174))), new t(21,104,104,24,24,new pt(56,new dt(6,136))), new t(22,120,120,18,18,new pt(68,new dt(6,175))), new t(23,132,132,20,20,new pt(62,new dt(8,163))), new t(24,144,144,22,22,new pt(62,new dt(8,156),new dt(2,155))), new t(25,8,18,6,16,new pt(7,new dt(1,5))), new t(26,8,32,6,14,new pt(11,new dt(1,10))), new t(27,12,26,10,24,new pt(14,new dt(1,16))), new t(28,12,36,10,16,new pt(18,new dt(1,22))), new t(29,16,36,14,16,new pt(24,new dt(1,32))), new t(30,16,48,14,22,new pt(28,new dt(1,49)))]
    }
    ,
    t.VERSIONS = t.buildVersions(),
    t
}(), bbe = function() {
    function t(e) {
        var r = e.getHeight();
        if (r < 8 || r > 144 || r & 1)
            throw new ge;
        this.version = t.readVersion(e),
        this.mappingBitMatrix = this.extractDataRegion(e),
        this.readMappingMatrix = new Ao(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())
    }
    return t.prototype.getVersion = function() {
        return this.version
    }
    ,
    t.readVersion = function(e) {
        var r = e.getHeight()
          , n = e.getWidth();
        return _be.getVersionForDimensions(r, n)
    }
    ,
    t.prototype.readCodewords = function() {
        var e = new Int8Array(this.version.getTotalCodewords())
          , r = 0
          , n = 4
          , i = 0
          , o = this.mappingBitMatrix.getHeight()
          , s = this.mappingBitMatrix.getWidth()
          , a = !1
          , l = !1
          , c = !1
          , u = !1;
        do
            if (n === o && i === 0 && !a)
                e[r++] = this.readCorner1(o, s) & 255,
                n -= 2,
                i += 2,
                a = !0;
            else if (n === o - 2 && i === 0 && s & 3 && !l)
                e[r++] = this.readCorner2(o, s) & 255,
                n -= 2,
                i += 2,
                l = !0;
            else if (n === o + 4 && i === 2 && !(s & 7) && !c)
                e[r++] = this.readCorner3(o, s) & 255,
                n -= 2,
                i += 2,
                c = !0;
            else if (n === o - 2 && i === 0 && (s & 7) === 4 && !u)
                e[r++] = this.readCorner4(o, s) & 255,
                n -= 2,
                i += 2,
                u = !0;
            else {
                do
                    n < o && i >= 0 && !this.readMappingMatrix.get(i, n) && (e[r++] = this.readUtah(n, i, o, s) & 255),
                    n -= 2,
                    i += 2;
                while (n >= 0 && i < s);
                n += 1,
                i += 3;
                do
                    n >= 0 && i < s && !this.readMappingMatrix.get(i, n) && (e[r++] = this.readUtah(n, i, o, s) & 255),
                    n += 2,
                    i -= 2;
                while (n < o && i >= 0);
                n += 3,
                i += 1
            }
        while (n < o || i < s);
        if (r !== this.version.getTotalCodewords())
            throw new ge;
        return e
    }
    ,
    t.prototype.readModule = function(e, r, n, i) {
        return e < 0 && (e += n,
        r += 4 - (n + 4 & 7)),
        r < 0 && (r += i,
        e += 4 - (i + 4 & 7)),
        this.readMappingMatrix.set(r, e),
        this.mappingBitMatrix.get(r, e)
    }
    ,
    t.prototype.readUtah = function(e, r, n, i) {
        var o = 0;
        return this.readModule(e - 2, r - 2, n, i) && (o |= 1),
        o <<= 1,
        this.readModule(e - 2, r - 1, n, i) && (o |= 1),
        o <<= 1,
        this.readModule(e - 1, r - 2, n, i) && (o |= 1),
        o <<= 1,
        this.readModule(e - 1, r - 1, n, i) && (o |= 1),
        o <<= 1,
        this.readModule(e - 1, r, n, i) && (o |= 1),
        o <<= 1,
        this.readModule(e, r - 2, n, i) && (o |= 1),
        o <<= 1,
        this.readModule(e, r - 1, n, i) && (o |= 1),
        o <<= 1,
        this.readModule(e, r, n, i) && (o |= 1),
        o
    }
    ,
    t.prototype.readCorner1 = function(e, r) {
        var n = 0;
        return this.readModule(e - 1, 0, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(e - 1, 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(e - 1, 2, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 2, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(1, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(2, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(3, r - 1, e, r) && (n |= 1),
        n
    }
    ,
    t.prototype.readCorner2 = function(e, r) {
        var n = 0;
        return this.readModule(e - 3, 0, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(e - 2, 0, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(e - 1, 0, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 4, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 3, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 2, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(1, r - 1, e, r) && (n |= 1),
        n
    }
    ,
    t.prototype.readCorner3 = function(e, r) {
        var n = 0;
        return this.readModule(e - 1, 0, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(e - 1, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 3, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 2, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(1, r - 3, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(1, r - 2, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(1, r - 1, e, r) && (n |= 1),
        n
    }
    ,
    t.prototype.readCorner4 = function(e, r) {
        var n = 0;
        return this.readModule(e - 3, 0, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(e - 2, 0, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(e - 1, 0, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 2, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(0, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(1, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(2, r - 1, e, r) && (n |= 1),
        n <<= 1,
        this.readModule(3, r - 1, e, r) && (n |= 1),
        n
    }
    ,
    t.prototype.extractDataRegion = function(e) {
        var r = this.version.getSymbolSizeRows()
          , n = this.version.getSymbolSizeColumns();
        if (e.getHeight() !== r)
            throw new Me("Dimension of bitMatrix must match the version size");
        for (var i = this.version.getDataRegionSizeRows(), o = this.version.getDataRegionSizeColumns(), s = r / i | 0, a = n / o | 0, l = s * i, c = a * o, u = new Ao(c,l), f = 0; f < s; ++f)
            for (var d = f * i, h = 0; h < a; ++h)
                for (var x = h * o, y = 0; y < i; ++y)
                    for (var m = f * (i + 2) + 1 + y, E = d + y, g = 0; g < o; ++g) {
                        var p = h * (o + 2) + 1 + g;
                        if (e.get(p, m)) {
                            var v = x + g;
                            u.set(v, E)
                        }
                    }
        return u
    }
    ,
    t
}(), u6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, Cbe = function() {
    function t(e, r) {
        this.numDataCodewords = e,
        this.codewords = r
    }
    return t.getDataBlocks = function(e, r) {
        var n, i, o, s, a = r.getECBlocks(), l = 0, c = a.getECBlocks();
        try {
            for (var u = u6(c), f = u.next(); !f.done; f = u.next()) {
                var d = f.value;
                l += d.getCount()
            }
        } catch (F) {
            n = {
                error: F
            }
        } finally {
            try {
                f && !f.done && (i = u.return) && i.call(u)
            } finally {
                if (n)
                    throw n.error
            }
        }
        var h = new Array(l)
          , x = 0;
        try {
            for (var y = u6(c), m = y.next(); !m.done; m = y.next())
                for (var d = m.value, E = 0; E < d.getCount(); E++) {
                    var g = d.getDataCodewords()
                      , p = a.getECCodewords() + g;
                    h[x++] = new t(g,new Uint8Array(p))
                }
        } catch (F) {
            o = {
                error: F
            }
        } finally {
            try {
                m && !m.done && (s = y.return) && s.call(y)
            } finally {
                if (o)
                    throw o.error
            }
        }
        for (var v = h[0].codewords.length, _ = v - a.getECCodewords(), b = _ - 1, C = 0, E = 0; E < b; E++)
            for (var B = 0; B < x; B++)
                h[B].codewords[E] = e[C++];
        for (var T = r.getVersionNumber() === 24, A = T ? 8 : x, B = 0; B < A; B++)
            h[B].codewords[_ - 1] = e[C++];
        for (var w = h[0].codewords.length, E = _; E < w; E++)
            for (var B = 0; B < x; B++) {
                var S = T ? (B + 8) % x : B
                  , D = T && S > 7 ? E - 1 : E;
                h[S].codewords[D] = e[C++]
            }
        if (C !== e.length)
            throw new Me;
        return h
    }
    ,
    t.prototype.getNumDataCodewords = function() {
        return this.numDataCodewords
    }
    ,
    t.prototype.getCodewords = function() {
        return this.codewords
    }
    ,
    t
}(), hM = function() {
    function t(e) {
        this.bytes = e,
        this.byteOffset = 0,
        this.bitOffset = 0
    }
    return t.prototype.getBitOffset = function() {
        return this.bitOffset
    }
    ,
    t.prototype.getByteOffset = function() {
        return this.byteOffset
    }
    ,
    t.prototype.readBits = function(e) {
        if (e < 1 || e > 32 || e > this.available())
            throw new Me("" + e);
        var r = 0
          , n = this.bitOffset
          , i = this.byteOffset
          , o = this.bytes;
        if (n > 0) {
            var s = 8 - n
              , a = e < s ? e : s
              , l = s - a
              , c = 255 >> 8 - a << l;
            r = (o[i] & c) >> l,
            e -= a,
            n += a,
            n === 8 && (n = 0,
            i++)
        }
        if (e > 0) {
            for (; e >= 8; )
                r = r << 8 | o[i] & 255,
                i++,
                e -= 8;
            if (e > 0) {
                var l = 8 - e
                  , c = 255 >> l << l;
                r = r << e | (o[i] & c) >> l,
                n += e
            }
        }
        return this.bitOffset = n,
        this.byteOffset = i,
        r
    }
    ,
    t.prototype.available = function() {
        return 8 * (this.bytes.length - this.byteOffset) - this.bitOffset
    }
    ,
    t
}(), gr;
(function(t) {
    t[t.PAD_ENCODE = 0] = "PAD_ENCODE",
    t[t.ASCII_ENCODE = 1] = "ASCII_ENCODE",
    t[t.C40_ENCODE = 2] = "C40_ENCODE",
    t[t.TEXT_ENCODE = 3] = "TEXT_ENCODE",
    t[t.ANSIX12_ENCODE = 4] = "ANSIX12_ENCODE",
    t[t.EDIFACT_ENCODE = 5] = "EDIFACT_ENCODE",
    t[t.BASE256_ENCODE = 6] = "BASE256_ENCODE"
}
)(gr || (gr = {}));
var Abe = function() {
    function t() {}
    return t.decode = function(e) {
        var r = new hM(e)
          , n = new Ke
          , i = new Ke
          , o = new Array
          , s = gr.ASCII_ENCODE;
        do
            if (s === gr.ASCII_ENCODE)
                s = this.decodeAsciiSegment(r, n, i);
            else {
                switch (s) {
                case gr.C40_ENCODE:
                    this.decodeC40Segment(r, n);
                    break;
                case gr.TEXT_ENCODE:
                    this.decodeTextSegment(r, n);
                    break;
                case gr.ANSIX12_ENCODE:
                    this.decodeAnsiX12Segment(r, n);
                    break;
                case gr.EDIFACT_ENCODE:
                    this.decodeEdifactSegment(r, n);
                    break;
                case gr.BASE256_ENCODE:
                    this.decodeBase256Segment(r, n, o);
                    break;
                default:
                    throw new ge
                }
                s = gr.ASCII_ENCODE
            }
        while (s !== gr.PAD_ENCODE && r.available() > 0);
        return i.length() > 0 && n.append(i.toString()),
        new I1(e,n.toString(),o.length === 0 ? null : o,null)
    }
    ,
    t.decodeAsciiSegment = function(e, r, n) {
        var i = !1;
        do {
            var o = e.readBits(8);
            if (o === 0)
                throw new ge;
            if (o <= 128)
                return i && (o += 128),
                r.append(String.fromCharCode(o - 1)),
                gr.ASCII_ENCODE;
            if (o === 129)
                return gr.PAD_ENCODE;
            if (o <= 229) {
                var s = o - 130;
                s < 10 && r.append("0"),
                r.append("" + s)
            } else
                switch (o) {
                case 230:
                    return gr.C40_ENCODE;
                case 231:
                    return gr.BASE256_ENCODE;
                case 232:
                    r.append(String.fromCharCode(29));
                    break;
                case 233:
                case 234:
                    break;
                case 235:
                    i = !0;
                    break;
                case 236:
                    r.append("[)>05"),
                    n.insert(0, "");
                    break;
                case 237:
                    r.append("[)>06"),
                    n.insert(0, "");
                    break;
                case 238:
                    return gr.ANSIX12_ENCODE;
                case 239:
                    return gr.TEXT_ENCODE;
                case 240:
                    return gr.EDIFACT_ENCODE;
                case 241:
                    break;
                default:
                    if (o !== 254 || e.available() !== 0)
                        throw new ge;
                    break
                }
        } while (e.available() > 0);
        return gr.ASCII_ENCODE
    }
    ,
    t.decodeC40Segment = function(e, r) {
        var n = !1
          , i = []
          , o = 0;
        do {
            if (e.available() === 8)
                return;
            var s = e.readBits(8);
            if (s === 254)
                return;
            this.parseTwoBytes(s, e.readBits(8), i);
            for (var a = 0; a < 3; a++) {
                var l = i[a];
                switch (o) {
                case 0:
                    if (l < 3)
                        o = l + 1;
                    else if (l < this.C40_BASIC_SET_CHARS.length) {
                        var c = this.C40_BASIC_SET_CHARS[l];
                        n ? (r.append(String.fromCharCode(c.charCodeAt(0) + 128)),
                        n = !1) : r.append(c)
                    } else
                        throw new ge;
                    break;
                case 1:
                    n ? (r.append(String.fromCharCode(l + 128)),
                    n = !1) : r.append(String.fromCharCode(l)),
                    o = 0;
                    break;
                case 2:
                    if (l < this.C40_SHIFT2_SET_CHARS.length) {
                        var c = this.C40_SHIFT2_SET_CHARS[l];
                        n ? (r.append(String.fromCharCode(c.charCodeAt(0) + 128)),
                        n = !1) : r.append(c)
                    } else
                        switch (l) {
                        case 27:
                            r.append(String.fromCharCode(29));
                            break;
                        case 30:
                            n = !0;
                            break;
                        default:
                            throw new ge
                        }
                    o = 0;
                    break;
                case 3:
                    n ? (r.append(String.fromCharCode(l + 224)),
                    n = !1) : r.append(String.fromCharCode(l + 96)),
                    o = 0;
                    break;
                default:
                    throw new ge
                }
            }
        } while (e.available() > 0)
    }
    ,
    t.decodeTextSegment = function(e, r) {
        var n = !1
          , i = []
          , o = 0;
        do {
            if (e.available() === 8)
                return;
            var s = e.readBits(8);
            if (s === 254)
                return;
            this.parseTwoBytes(s, e.readBits(8), i);
            for (var a = 0; a < 3; a++) {
                var l = i[a];
                switch (o) {
                case 0:
                    if (l < 3)
                        o = l + 1;
                    else if (l < this.TEXT_BASIC_SET_CHARS.length) {
                        var c = this.TEXT_BASIC_SET_CHARS[l];
                        n ? (r.append(String.fromCharCode(c.charCodeAt(0) + 128)),
                        n = !1) : r.append(c)
                    } else
                        throw new ge;
                    break;
                case 1:
                    n ? (r.append(String.fromCharCode(l + 128)),
                    n = !1) : r.append(String.fromCharCode(l)),
                    o = 0;
                    break;
                case 2:
                    if (l < this.TEXT_SHIFT2_SET_CHARS.length) {
                        var c = this.TEXT_SHIFT2_SET_CHARS[l];
                        n ? (r.append(String.fromCharCode(c.charCodeAt(0) + 128)),
                        n = !1) : r.append(c)
                    } else
                        switch (l) {
                        case 27:
                            r.append(String.fromCharCode(29));
                            break;
                        case 30:
                            n = !0;
                            break;
                        default:
                            throw new ge
                        }
                    o = 0;
                    break;
                case 3:
                    if (l < this.TEXT_SHIFT3_SET_CHARS.length) {
                        var c = this.TEXT_SHIFT3_SET_CHARS[l];
                        n ? (r.append(String.fromCharCode(c.charCodeAt(0) + 128)),
                        n = !1) : r.append(c),
                        o = 0
                    } else
                        throw new ge;
                    break;
                default:
                    throw new ge
                }
            }
        } while (e.available() > 0)
    }
    ,
    t.decodeAnsiX12Segment = function(e, r) {
        var n = [];
        do {
            if (e.available() === 8)
                return;
            var i = e.readBits(8);
            if (i === 254)
                return;
            this.parseTwoBytes(i, e.readBits(8), n);
            for (var o = 0; o < 3; o++) {
                var s = n[o];
                switch (s) {
                case 0:
                    r.append("\r");
                    break;
                case 1:
                    r.append("*");
                    break;
                case 2:
                    r.append(">");
                    break;
                case 3:
                    r.append(" ");
                    break;
                default:
                    if (s < 14)
                        r.append(String.fromCharCode(s + 44));
                    else if (s < 40)
                        r.append(String.fromCharCode(s + 51));
                    else
                        throw new ge;
                    break
                }
            }
        } while (e.available() > 0)
    }
    ,
    t.parseTwoBytes = function(e, r, n) {
        var i = (e << 8) + r - 1
          , o = Math.floor(i / 1600);
        n[0] = o,
        i -= o * 1600,
        o = Math.floor(i / 40),
        n[1] = o,
        n[2] = i - o * 40
    }
    ,
    t.decodeEdifactSegment = function(e, r) {
        do {
            if (e.available() <= 16)
                return;
            for (var n = 0; n < 4; n++) {
                var i = e.readBits(6);
                if (i === 31) {
                    var o = 8 - e.getBitOffset();
                    o !== 8 && e.readBits(o);
                    return
                }
                i & 32 || (i |= 64),
                r.append(String.fromCharCode(i))
            }
        } while (e.available() > 0)
    }
    ,
    t.decodeBase256Segment = function(e, r, n) {
        var i = 1 + e.getByteOffset(), o = this.unrandomize255State(e.readBits(8), i++), s;
        if (o === 0 ? s = e.available() / 8 | 0 : o < 250 ? s = o : s = 250 * (o - 249) + this.unrandomize255State(e.readBits(8), i++),
        s < 0)
            throw new ge;
        for (var a = new Uint8Array(s), l = 0; l < s; l++) {
            if (e.available() < 8)
                throw new ge;
            a[l] = this.unrandomize255State(e.readBits(8), i++)
        }
        n.push(a);
        try {
            r.append(mi.decode(a, nt.ISO88591))
        } catch (c) {
            throw new Ed("Platform does not support required encoding: " + c.message)
        }
    }
    ,
    t.unrandomize255State = function(e, r) {
        var n = 149 * r % 255 + 1
          , i = e - n;
        return i >= 0 ? i : i + 256
    }
    ,
    t.C40_BASIC_SET_CHARS = ["*", "*", "*", " ", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"],
    t.C40_SHIFT2_SET_CHARS = ["!", '"', "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", ":", ";", "<", "=", ">", "?", "@", "[", "\\", "]", "^", "_"],
    t.TEXT_BASIC_SET_CHARS = ["*", "*", "*", " ", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"],
    t.TEXT_SHIFT2_SET_CHARS = t.C40_SHIFT2_SET_CHARS,
    t.TEXT_SHIFT3_SET_CHARS = ["`", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "{", "|", "}", "~", String.fromCharCode(127)],
    t
}()
  , wbe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , Bbe = function() {
    function t() {
        this.rsDecoder = new O1(wn.DATA_MATRIX_FIELD_256)
    }
    return t.prototype.decode = function(e) {
        var r, n, i = new bbe(e), o = i.getVersion(), s = i.readCodewords(), a = Cbe.getDataBlocks(s, o), l = 0;
        try {
            for (var c = wbe(a), u = c.next(); !u.done; u = c.next()) {
                var f = u.value;
                l += f.getNumDataCodewords()
            }
        } catch (p) {
            r = {
                error: p
            }
        } finally {
            try {
                u && !u.done && (n = c.return) && n.call(c)
            } finally {
                if (r)
                    throw r.error
            }
        }
        for (var d = new Uint8Array(l), h = a.length, x = 0; x < h; x++) {
            var y = a[x]
              , m = y.getCodewords()
              , E = y.getNumDataCodewords();
            this.correctErrors(m, E);
            for (var g = 0; g < E; g++)
                d[g * h + x] = m[g]
        }
        return Abe.decode(d)
    }
    ,
    t.prototype.correctErrors = function(e, r) {
        var n = new Int32Array(e);
        try {
            this.rsDecoder.decode(n, e.length - r)
        } catch {
            throw new fr
        }
        for (var i = 0; i < r; i++)
            e[i] = n[i]
    }
    ,
    t
}()
  , Sbe = function() {
    function t(e) {
        this.image = e,
        this.rectangleDetector = new UE(this.image)
    }
    return t.prototype.detect = function() {
        var e = this.rectangleDetector.detect()
          , r = this.detectSolid1(e);
        if (r = this.detectSolid2(r),
        r[3] = this.correctTopRight(r),
        !r[3])
            throw new le;
        r = this.shiftToModuleCenter(r);
        var n = r[0]
          , i = r[1]
          , o = r[2]
          , s = r[3]
          , a = this.transitionsBetween(n, s) + 1
          , l = this.transitionsBetween(o, s) + 1;
        (a & 1) === 1 && (a += 1),
        (l & 1) === 1 && (l += 1),
        4 * a < 7 * l && 4 * l < 7 * a && (a = l = Math.max(a, l));
        var c = t.sampleGrid(this.image, n, i, o, s, a, l);
        return new bC(c,[n, i, o, s])
    }
    ,
    t.shiftPoint = function(e, r, n) {
        var i = (r.getX() - e.getX()) / (n + 1)
          , o = (r.getY() - e.getY()) / (n + 1);
        return new Te(e.getX() + i,e.getY() + o)
    }
    ,
    t.moveAway = function(e, r, n) {
        var i = e.getX()
          , o = e.getY();
        return i < r ? i -= 1 : i += 1,
        o < n ? o -= 1 : o += 1,
        new Te(i,o)
    }
    ,
    t.prototype.detectSolid1 = function(e) {
        var r = e[0]
          , n = e[1]
          , i = e[3]
          , o = e[2]
          , s = this.transitionsBetween(r, n)
          , a = this.transitionsBetween(n, i)
          , l = this.transitionsBetween(i, o)
          , c = this.transitionsBetween(o, r)
          , u = s
          , f = [o, r, n, i];
        return u > a && (u = a,
        f[0] = r,
        f[1] = n,
        f[2] = i,
        f[3] = o),
        u > l && (u = l,
        f[0] = n,
        f[1] = i,
        f[2] = o,
        f[3] = r),
        u > c && (f[0] = i,
        f[1] = o,
        f[2] = r,
        f[3] = n),
        f
    }
    ,
    t.prototype.detectSolid2 = function(e) {
        var r = e[0]
          , n = e[1]
          , i = e[2]
          , o = e[3]
          , s = this.transitionsBetween(r, o)
          , a = t.shiftPoint(n, i, (s + 1) * 4)
          , l = t.shiftPoint(i, n, (s + 1) * 4)
          , c = this.transitionsBetween(a, r)
          , u = this.transitionsBetween(l, o);
        return c < u ? (e[0] = r,
        e[1] = n,
        e[2] = i,
        e[3] = o) : (e[0] = n,
        e[1] = i,
        e[2] = o,
        e[3] = r),
        e
    }
    ,
    t.prototype.correctTopRight = function(e) {
        var r = e[0]
          , n = e[1]
          , i = e[2]
          , o = e[3]
          , s = this.transitionsBetween(r, o)
          , a = this.transitionsBetween(n, o)
          , l = t.shiftPoint(r, n, (a + 1) * 4)
          , c = t.shiftPoint(i, n, (s + 1) * 4);
        s = this.transitionsBetween(l, o),
        a = this.transitionsBetween(c, o);
        var u = new Te(o.getX() + (i.getX() - n.getX()) / (s + 1),o.getY() + (i.getY() - n.getY()) / (s + 1))
          , f = new Te(o.getX() + (r.getX() - n.getX()) / (a + 1),o.getY() + (r.getY() - n.getY()) / (a + 1));
        if (!this.isValid(u))
            return this.isValid(f) ? f : null;
        if (!this.isValid(f))
            return u;
        var d = this.transitionsBetween(l, u) + this.transitionsBetween(c, u)
          , h = this.transitionsBetween(l, f) + this.transitionsBetween(c, f);
        return d > h ? u : f
    }
    ,
    t.prototype.shiftToModuleCenter = function(e) {
        var r = e[0]
          , n = e[1]
          , i = e[2]
          , o = e[3]
          , s = this.transitionsBetween(r, o) + 1
          , a = this.transitionsBetween(i, o) + 1
          , l = t.shiftPoint(r, n, a * 4)
          , c = t.shiftPoint(i, n, s * 4);
        s = this.transitionsBetween(l, o) + 1,
        a = this.transitionsBetween(c, o) + 1,
        (s & 1) === 1 && (s += 1),
        (a & 1) === 1 && (a += 1);
        var u = (r.getX() + n.getX() + i.getX() + o.getX()) / 4
          , f = (r.getY() + n.getY() + i.getY() + o.getY()) / 4;
        r = t.moveAway(r, u, f),
        n = t.moveAway(n, u, f),
        i = t.moveAway(i, u, f),
        o = t.moveAway(o, u, f);
        var d, h;
        return l = t.shiftPoint(r, n, a * 4),
        l = t.shiftPoint(l, o, s * 4),
        d = t.shiftPoint(n, r, a * 4),
        d = t.shiftPoint(d, i, s * 4),
        c = t.shiftPoint(i, o, a * 4),
        c = t.shiftPoint(c, n, s * 4),
        h = t.shiftPoint(o, i, a * 4),
        h = t.shiftPoint(h, r, s * 4),
        [l, d, c, h]
    }
    ,
    t.prototype.isValid = function(e) {
        return e.getX() >= 0 && e.getX() < this.image.getWidth() && e.getY() > 0 && e.getY() < this.image.getHeight()
    }
    ,
    t.sampleGrid = function(e, r, n, i, o, s, a) {
        var l = CC.getInstance();
        return l.sampleGrid(e, s, a, .5, .5, s - .5, .5, s - .5, a - .5, .5, a - .5, r.getX(), r.getY(), o.getX(), o.getY(), i.getX(), i.getY(), n.getX(), n.getY())
    }
    ,
    t.prototype.transitionsBetween = function(e, r) {
        var n = Math.trunc(e.getX())
          , i = Math.trunc(e.getY())
          , o = Math.trunc(r.getX())
          , s = Math.trunc(r.getY())
          , a = Math.abs(s - i) > Math.abs(o - n);
        if (a) {
            var l = n;
            n = i,
            i = l,
            l = o,
            o = s,
            s = l
        }
        for (var c = Math.abs(o - n), u = Math.abs(s - i), f = -c / 2, d = i < s ? 1 : -1, h = n < o ? 1 : -1, x = 0, y = this.image.get(a ? i : n, a ? n : i), m = n, E = i; m !== o; m += h) {
            var g = this.image.get(a ? E : m, a ? m : E);
            if (g !== y && (x++,
            y = g),
            f += u,
            f > 0) {
                if (E === s)
                    break;
                E += d,
                f -= c
            }
        }
        return x
    }
    ,
    t
}()
  , ep = function() {
    function t() {
        this.decoder = new Bbe
    }
    return t.prototype.decode = function(e, r) {
        r === void 0 && (r = null);
        var n, i;
        if (r != null && r.has(Ft.PURE_BARCODE)) {
            var o = t.extractPureBits(e.getBlackMatrix());
            n = this.decoder.decode(o),
            i = t.NO_POINTS
        } else {
            var s = new Sbe(e.getBlackMatrix()).detect();
            n = this.decoder.decode(s.getBits()),
            i = s.getPoints()
        }
        var a = n.getRawBytes()
          , l = new rn(n.getText(),a,8 * a.length,i,ke.DATA_MATRIX,Dt.currentTimeMillis())
          , c = n.getByteSegments();
        c != null && l.putMetadata(Hr.BYTE_SEGMENTS, c);
        var u = n.getECLevel();
        return u != null && l.putMetadata(Hr.ERROR_CORRECTION_LEVEL, u),
        l
    }
    ,
    t.prototype.reset = function() {}
    ,
    t.extractPureBits = function(e) {
        var r = e.getTopLeftOnBit()
          , n = e.getBottomRightOnBit();
        if (r == null || n == null)
            throw new le;
        var i = this.moduleSize(r, e)
          , o = r[1]
          , s = n[1]
          , a = r[0]
          , l = n[0]
          , c = (l - a + 1) / i
          , u = (s - o + 1) / i;
        if (c <= 0 || u <= 0)
            throw new le;
        var f = i / 2;
        o += f,
        a += f;
        for (var d = new Ao(c,u), h = 0; h < u; h++)
            for (var x = o + h * i, y = 0; y < c; y++)
                e.get(a + y * i, x) && d.set(y, h);
        return d
    }
    ,
    t.moduleSize = function(e, r) {
        for (var n = r.getWidth(), i = e[0], o = e[1]; i < n && r.get(i, o); )
            i++;
        if (i === n)
            throw new le;
        var s = i - e[0];
        if (s === 0)
            throw new le;
        return s
    }
    ,
    t.NO_POINTS = [],
    t
}()
  , Tbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    Tbe(e, t);
    function e(r) {
        return r === void 0 && (r = 500),
        t.call(this, new ep, r) || this
    }
    return e
}
)(Du);
var Sc;
(function(t) {
    t[t.L = 0] = "L",
    t[t.M = 1] = "M",
    t[t.Q = 2] = "Q",
    t[t.H = 3] = "H"
}
)(Sc || (Sc = {}));
var Dbe = function() {
    function t(e, r, n) {
        this.value = e,
        this.stringValue = r,
        this.bits = n,
        t.FOR_BITS.set(n, this),
        t.FOR_VALUE.set(e, this)
    }
    return t.prototype.getValue = function() {
        return this.value
    }
    ,
    t.prototype.getBits = function() {
        return this.bits
    }
    ,
    t.fromString = function(e) {
        switch (e) {
        case "L":
            return t.L;
        case "M":
            return t.M;
        case "Q":
            return t.Q;
        case "H":
            return t.H;
        default:
            throw new ir(e + "not available")
        }
    }
    ,
    t.prototype.toString = function() {
        return this.stringValue
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        return this.value === r.value
    }
    ,
    t.forBits = function(e) {
        if (e < 0 || e >= t.FOR_BITS.size)
            throw new Me;
        return t.FOR_BITS.get(e)
    }
    ,
    t.FOR_BITS = new Map,
    t.FOR_VALUE = new Map,
    t.L = new t(Sc.L,"L",1),
    t.M = new t(Sc.M,"M",0),
    t.Q = new t(Sc.Q,"Q",3),
    t.H = new t(Sc.H,"H",2),
    t
}(), Fbe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, xM = function() {
    function t(e) {
        this.errorCorrectionLevel = Dbe.forBits(e >> 3 & 3),
        this.dataMask = e & 7
    }
    return t.numBitsDiffering = function(e, r) {
        return qe.bitCount(e ^ r)
    }
    ,
    t.decodeFormatInformation = function(e, r) {
        var n = t.doDecodeFormatInformation(e, r);
        return n !== null ? n : t.doDecodeFormatInformation(e ^ t.FORMAT_INFO_MASK_QR, r ^ t.FORMAT_INFO_MASK_QR)
    }
    ,
    t.doDecodeFormatInformation = function(e, r) {
        var n, i, o = Number.MAX_SAFE_INTEGER, s = 0;
        try {
            for (var a = Fbe(t.FORMAT_INFO_DECODE_LOOKUP), l = a.next(); !l.done; l = a.next()) {
                var c = l.value
                  , u = c[0];
                if (u === e || u === r)
                    return new t(c[1]);
                var f = t.numBitsDiffering(e, u);
                f < o && (s = c[1],
                o = f),
                e !== r && (f = t.numBitsDiffering(r, u),
                f < o && (s = c[1],
                o = f))
            }
        } catch (d) {
            n = {
                error: d
            }
        } finally {
            try {
                l && !l.done && (i = a.return) && i.call(a)
            } finally {
                if (n)
                    throw n.error
            }
        }
        return o <= 3 ? new t(s) : null
    }
    ,
    t.prototype.getErrorCorrectionLevel = function() {
        return this.errorCorrectionLevel
    }
    ,
    t.prototype.getDataMask = function() {
        return this.dataMask
    }
    ,
    t.prototype.hashCode = function() {
        return this.errorCorrectionLevel.getBits() << 3 | this.dataMask
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        return this.errorCorrectionLevel === r.errorCorrectionLevel && this.dataMask === r.dataMask
    }
    ,
    t.FORMAT_INFO_MASK_QR = 21522,
    t.FORMAT_INFO_DECODE_LOOKUP = [Int32Array.from([21522, 0]), Int32Array.from([20773, 1]), Int32Array.from([24188, 2]), Int32Array.from([23371, 3]), Int32Array.from([17913, 4]), Int32Array.from([16590, 5]), Int32Array.from([20375, 6]), Int32Array.from([19104, 7]), Int32Array.from([30660, 8]), Int32Array.from([29427, 9]), Int32Array.from([32170, 10]), Int32Array.from([30877, 11]), Int32Array.from([26159, 12]), Int32Array.from([25368, 13]), Int32Array.from([27713, 14]), Int32Array.from([26998, 15]), Int32Array.from([5769, 16]), Int32Array.from([5054, 17]), Int32Array.from([7399, 18]), Int32Array.from([6608, 19]), Int32Array.from([1890, 20]), Int32Array.from([597, 21]), Int32Array.from([3340, 22]), Int32Array.from([2107, 23]), Int32Array.from([13663, 24]), Int32Array.from([12392, 25]), Int32Array.from([16177, 26]), Int32Array.from([14854, 27]), Int32Array.from([9396, 28]), Int32Array.from([8579, 29]), Int32Array.from([11994, 30]), Int32Array.from([11245, 31])],
    t
}(), Pbe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, J = function() {
    function t(e) {
        for (var r = [], n = 1; n < arguments.length; n++)
            r[n - 1] = arguments[n];
        this.ecCodewordsPerBlock = e,
        this.ecBlocks = r
    }
    return t.prototype.getECCodewordsPerBlock = function() {
        return this.ecCodewordsPerBlock
    }
    ,
    t.prototype.getNumBlocks = function() {
        var e, r, n = 0, i = this.ecBlocks;
        try {
            for (var o = Pbe(i), s = o.next(); !s.done; s = o.next()) {
                var a = s.value;
                n += a.getCount()
            }
        } catch (l) {
            e = {
                error: l
            }
        } finally {
            try {
                s && !s.done && (r = o.return) && r.call(o)
            } finally {
                if (e)
                    throw e.error
            }
        }
        return n
    }
    ,
    t.prototype.getTotalECCodewords = function() {
        return this.ecCodewordsPerBlock * this.getNumBlocks()
    }
    ,
    t.prototype.getECBlocks = function() {
        return this.ecBlocks
    }
    ,
    t
}(), M = function() {
    function t(e, r) {
        this.count = e,
        this.dataCodewords = r
    }
    return t.prototype.getCount = function() {
        return this.count
    }
    ,
    t.prototype.getDataCodewords = function() {
        return this.dataCodewords
    }
    ,
    t
}(), Ibe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, ul = function() {
    function t(e, r) {
        for (var n, i, o = [], s = 2; s < arguments.length; s++)
            o[s - 2] = arguments[s];
        this.versionNumber = e,
        this.alignmentPatternCenters = r,
        this.ecBlocks = o;
        var a = 0
          , l = o[0].getECCodewordsPerBlock()
          , c = o[0].getECBlocks();
        try {
            for (var u = Ibe(c), f = u.next(); !f.done; f = u.next()) {
                var d = f.value;
                a += d.getCount() * (d.getDataCodewords() + l)
            }
        } catch (h) {
            n = {
                error: h
            }
        } finally {
            try {
                f && !f.done && (i = u.return) && i.call(u)
            } finally {
                if (n)
                    throw n.error
            }
        }
        this.totalCodewords = a
    }
    return t.prototype.getVersionNumber = function() {
        return this.versionNumber
    }
    ,
    t.prototype.getAlignmentPatternCenters = function() {
        return this.alignmentPatternCenters
    }
    ,
    t.prototype.getTotalCodewords = function() {
        return this.totalCodewords
    }
    ,
    t.prototype.getDimensionForVersion = function() {
        return 17 + 4 * this.versionNumber
    }
    ,
    t.prototype.getECBlocksForLevel = function(e) {
        return this.ecBlocks[e.getValue()]
    }
    ,
    t.getProvisionalVersionForDimension = function(e) {
        if (e % 4 !== 1)
            throw new ge;
        try {
            return this.getVersionForNumber((e - 17) / 4)
        } catch {
            throw new ge
        }
    }
    ,
    t.getVersionForNumber = function(e) {
        if (e < 1 || e > 40)
            throw new Me;
        return t.VERSIONS[e - 1]
    }
    ,
    t.decodeVersionInformation = function(e) {
        for (var r = Number.MAX_SAFE_INTEGER, n = 0, i = 0; i < t.VERSION_DECODE_INFO.length; i++) {
            var o = t.VERSION_DECODE_INFO[i];
            if (o === e)
                return t.getVersionForNumber(i + 7);
            var s = xM.numBitsDiffering(e, o);
            s < r && (n = i + 7,
            r = s)
        }
        return r <= 3 ? t.getVersionForNumber(n) : null
    }
    ,
    t.prototype.buildFunctionPattern = function() {
        var e = this.getDimensionForVersion()
          , r = new Ao(e);
        r.setRegion(0, 0, 9, 9),
        r.setRegion(e - 8, 0, 8, 9),
        r.setRegion(0, e - 8, 9, 8);
        for (var n = this.alignmentPatternCenters.length, i = 0; i < n; i++)
            for (var o = this.alignmentPatternCenters[i] - 2, s = 0; s < n; s++)
                i === 0 && (s === 0 || s === n - 1) || i === n - 1 && s === 0 || r.setRegion(this.alignmentPatternCenters[s] - 2, o, 5, 5);
        return r.setRegion(6, 9, 1, e - 17),
        r.setRegion(9, 6, e - 17, 1),
        this.versionNumber > 6 && (r.setRegion(e - 11, 0, 3, 6),
        r.setRegion(0, e - 11, 6, 3)),
        r
    }
    ,
    t.prototype.toString = function() {
        return "" + this.versionNumber
    }
    ,
    t.VERSION_DECODE_INFO = Int32Array.from([31892, 34236, 39577, 42195, 48118, 51042, 55367, 58893, 63784, 68472, 70749, 76311, 79154, 84390, 87683, 92361, 96236, 102084, 102881, 110507, 110734, 117786, 119615, 126325, 127568, 133589, 136944, 141498, 145311, 150283, 152622, 158308, 161089, 167017]),
    t.VERSIONS = [new t(1,new Int32Array(0),new J(7,new M(1,19)),new J(10,new M(1,16)),new J(13,new M(1,13)),new J(17,new M(1,9))), new t(2,Int32Array.from([6, 18]),new J(10,new M(1,34)),new J(16,new M(1,28)),new J(22,new M(1,22)),new J(28,new M(1,16))), new t(3,Int32Array.from([6, 22]),new J(15,new M(1,55)),new J(26,new M(1,44)),new J(18,new M(2,17)),new J(22,new M(2,13))), new t(4,Int32Array.from([6, 26]),new J(20,new M(1,80)),new J(18,new M(2,32)),new J(26,new M(2,24)),new J(16,new M(4,9))), new t(5,Int32Array.from([6, 30]),new J(26,new M(1,108)),new J(24,new M(2,43)),new J(18,new M(2,15),new M(2,16)),new J(22,new M(2,11),new M(2,12))), new t(6,Int32Array.from([6, 34]),new J(18,new M(2,68)),new J(16,new M(4,27)),new J(24,new M(4,19)),new J(28,new M(4,15))), new t(7,Int32Array.from([6, 22, 38]),new J(20,new M(2,78)),new J(18,new M(4,31)),new J(18,new M(2,14),new M(4,15)),new J(26,new M(4,13),new M(1,14))), new t(8,Int32Array.from([6, 24, 42]),new J(24,new M(2,97)),new J(22,new M(2,38),new M(2,39)),new J(22,new M(4,18),new M(2,19)),new J(26,new M(4,14),new M(2,15))), new t(9,Int32Array.from([6, 26, 46]),new J(30,new M(2,116)),new J(22,new M(3,36),new M(2,37)),new J(20,new M(4,16),new M(4,17)),new J(24,new M(4,12),new M(4,13))), new t(10,Int32Array.from([6, 28, 50]),new J(18,new M(2,68),new M(2,69)),new J(26,new M(4,43),new M(1,44)),new J(24,new M(6,19),new M(2,20)),new J(28,new M(6,15),new M(2,16))), new t(11,Int32Array.from([6, 30, 54]),new J(20,new M(4,81)),new J(30,new M(1,50),new M(4,51)),new J(28,new M(4,22),new M(4,23)),new J(24,new M(3,12),new M(8,13))), new t(12,Int32Array.from([6, 32, 58]),new J(24,new M(2,92),new M(2,93)),new J(22,new M(6,36),new M(2,37)),new J(26,new M(4,20),new M(6,21)),new J(28,new M(7,14),new M(4,15))), new t(13,Int32Array.from([6, 34, 62]),new J(26,new M(4,107)),new J(22,new M(8,37),new M(1,38)),new J(24,new M(8,20),new M(4,21)),new J(22,new M(12,11),new M(4,12))), new t(14,Int32Array.from([6, 26, 46, 66]),new J(30,new M(3,115),new M(1,116)),new J(24,new M(4,40),new M(5,41)),new J(20,new M(11,16),new M(5,17)),new J(24,new M(11,12),new M(5,13))), new t(15,Int32Array.from([6, 26, 48, 70]),new J(22,new M(5,87),new M(1,88)),new J(24,new M(5,41),new M(5,42)),new J(30,new M(5,24),new M(7,25)),new J(24,new M(11,12),new M(7,13))), new t(16,Int32Array.from([6, 26, 50, 74]),new J(24,new M(5,98),new M(1,99)),new J(28,new M(7,45),new M(3,46)),new J(24,new M(15,19),new M(2,20)),new J(30,new M(3,15),new M(13,16))), new t(17,Int32Array.from([6, 30, 54, 78]),new J(28,new M(1,107),new M(5,108)),new J(28,new M(10,46),new M(1,47)),new J(28,new M(1,22),new M(15,23)),new J(28,new M(2,14),new M(17,15))), new t(18,Int32Array.from([6, 30, 56, 82]),new J(30,new M(5,120),new M(1,121)),new J(26,new M(9,43),new M(4,44)),new J(28,new M(17,22),new M(1,23)),new J(28,new M(2,14),new M(19,15))), new t(19,Int32Array.from([6, 30, 58, 86]),new J(28,new M(3,113),new M(4,114)),new J(26,new M(3,44),new M(11,45)),new J(26,new M(17,21),new M(4,22)),new J(26,new M(9,13),new M(16,14))), new t(20,Int32Array.from([6, 34, 62, 90]),new J(28,new M(3,107),new M(5,108)),new J(26,new M(3,41),new M(13,42)),new J(30,new M(15,24),new M(5,25)),new J(28,new M(15,15),new M(10,16))), new t(21,Int32Array.from([6, 28, 50, 72, 94]),new J(28,new M(4,116),new M(4,117)),new J(26,new M(17,42)),new J(28,new M(17,22),new M(6,23)),new J(30,new M(19,16),new M(6,17))), new t(22,Int32Array.from([6, 26, 50, 74, 98]),new J(28,new M(2,111),new M(7,112)),new J(28,new M(17,46)),new J(30,new M(7,24),new M(16,25)),new J(24,new M(34,13))), new t(23,Int32Array.from([6, 30, 54, 78, 102]),new J(30,new M(4,121),new M(5,122)),new J(28,new M(4,47),new M(14,48)),new J(30,new M(11,24),new M(14,25)),new J(30,new M(16,15),new M(14,16))), new t(24,Int32Array.from([6, 28, 54, 80, 106]),new J(30,new M(6,117),new M(4,118)),new J(28,new M(6,45),new M(14,46)),new J(30,new M(11,24),new M(16,25)),new J(30,new M(30,16),new M(2,17))), new t(25,Int32Array.from([6, 32, 58, 84, 110]),new J(26,new M(8,106),new M(4,107)),new J(28,new M(8,47),new M(13,48)),new J(30,new M(7,24),new M(22,25)),new J(30,new M(22,15),new M(13,16))), new t(26,Int32Array.from([6, 30, 58, 86, 114]),new J(28,new M(10,114),new M(2,115)),new J(28,new M(19,46),new M(4,47)),new J(28,new M(28,22),new M(6,23)),new J(30,new M(33,16),new M(4,17))), new t(27,Int32Array.from([6, 34, 62, 90, 118]),new J(30,new M(8,122),new M(4,123)),new J(28,new M(22,45),new M(3,46)),new J(30,new M(8,23),new M(26,24)),new J(30,new M(12,15),new M(28,16))), new t(28,Int32Array.from([6, 26, 50, 74, 98, 122]),new J(30,new M(3,117),new M(10,118)),new J(28,new M(3,45),new M(23,46)),new J(30,new M(4,24),new M(31,25)),new J(30,new M(11,15),new M(31,16))), new t(29,Int32Array.from([6, 30, 54, 78, 102, 126]),new J(30,new M(7,116),new M(7,117)),new J(28,new M(21,45),new M(7,46)),new J(30,new M(1,23),new M(37,24)),new J(30,new M(19,15),new M(26,16))), new t(30,Int32Array.from([6, 26, 52, 78, 104, 130]),new J(30,new M(5,115),new M(10,116)),new J(28,new M(19,47),new M(10,48)),new J(30,new M(15,24),new M(25,25)),new J(30,new M(23,15),new M(25,16))), new t(31,Int32Array.from([6, 30, 56, 82, 108, 134]),new J(30,new M(13,115),new M(3,116)),new J(28,new M(2,46),new M(29,47)),new J(30,new M(42,24),new M(1,25)),new J(30,new M(23,15),new M(28,16))), new t(32,Int32Array.from([6, 34, 60, 86, 112, 138]),new J(30,new M(17,115)),new J(28,new M(10,46),new M(23,47)),new J(30,new M(10,24),new M(35,25)),new J(30,new M(19,15),new M(35,16))), new t(33,Int32Array.from([6, 30, 58, 86, 114, 142]),new J(30,new M(17,115),new M(1,116)),new J(28,new M(14,46),new M(21,47)),new J(30,new M(29,24),new M(19,25)),new J(30,new M(11,15),new M(46,16))), new t(34,Int32Array.from([6, 34, 62, 90, 118, 146]),new J(30,new M(13,115),new M(6,116)),new J(28,new M(14,46),new M(23,47)),new J(30,new M(44,24),new M(7,25)),new J(30,new M(59,16),new M(1,17))), new t(35,Int32Array.from([6, 30, 54, 78, 102, 126, 150]),new J(30,new M(12,121),new M(7,122)),new J(28,new M(12,47),new M(26,48)),new J(30,new M(39,24),new M(14,25)),new J(30,new M(22,15),new M(41,16))), new t(36,Int32Array.from([6, 24, 50, 76, 102, 128, 154]),new J(30,new M(6,121),new M(14,122)),new J(28,new M(6,47),new M(34,48)),new J(30,new M(46,24),new M(10,25)),new J(30,new M(2,15),new M(64,16))), new t(37,Int32Array.from([6, 28, 54, 80, 106, 132, 158]),new J(30,new M(17,122),new M(4,123)),new J(28,new M(29,46),new M(14,47)),new J(30,new M(49,24),new M(10,25)),new J(30,new M(24,15),new M(46,16))), new t(38,Int32Array.from([6, 32, 58, 84, 110, 136, 162]),new J(30,new M(4,122),new M(18,123)),new J(28,new M(13,46),new M(32,47)),new J(30,new M(48,24),new M(14,25)),new J(30,new M(42,15),new M(32,16))), new t(39,Int32Array.from([6, 26, 54, 82, 110, 138, 166]),new J(30,new M(20,117),new M(4,118)),new J(28,new M(40,47),new M(7,48)),new J(30,new M(43,24),new M(22,25)),new J(30,new M(10,15),new M(67,16))), new t(40,Int32Array.from([6, 30, 58, 86, 114, 142, 170]),new J(30,new M(19,118),new M(6,119)),new J(28,new M(18,47),new M(31,48)),new J(30,new M(34,24),new M(34,25)),new J(30,new M(20,15),new M(61,16)))],
    t
}(), Tr;
(function(t) {
    t[t.DATA_MASK_000 = 0] = "DATA_MASK_000",
    t[t.DATA_MASK_001 = 1] = "DATA_MASK_001",
    t[t.DATA_MASK_010 = 2] = "DATA_MASK_010",
    t[t.DATA_MASK_011 = 3] = "DATA_MASK_011",
    t[t.DATA_MASK_100 = 4] = "DATA_MASK_100",
    t[t.DATA_MASK_101 = 5] = "DATA_MASK_101",
    t[t.DATA_MASK_110 = 6] = "DATA_MASK_110",
    t[t.DATA_MASK_111 = 7] = "DATA_MASK_111"
}
)(Tr || (Tr = {}));
var f6 = function() {
    function t(e, r) {
        this.value = e,
        this.isMasked = r
    }
    return t.prototype.unmaskBitMatrix = function(e, r) {
        for (var n = 0; n < r; n++)
            for (var i = 0; i < r; i++)
                this.isMasked(n, i) && e.flip(i, n)
    }
    ,
    t.values = new Map([[Tr.DATA_MASK_000, new t(Tr.DATA_MASK_000,function(e, r) {
        return (e + r & 1) === 0
    }
    )], [Tr.DATA_MASK_001, new t(Tr.DATA_MASK_001,function(e, r) {
        return (e & 1) === 0
    }
    )], [Tr.DATA_MASK_010, new t(Tr.DATA_MASK_010,function(e, r) {
        return r % 3 === 0
    }
    )], [Tr.DATA_MASK_011, new t(Tr.DATA_MASK_011,function(e, r) {
        return (e + r) % 3 === 0
    }
    )], [Tr.DATA_MASK_100, new t(Tr.DATA_MASK_100,function(e, r) {
        return (Math.floor(e / 2) + Math.floor(r / 3) & 1) === 0
    }
    )], [Tr.DATA_MASK_101, new t(Tr.DATA_MASK_101,function(e, r) {
        return e * r % 6 === 0
    }
    )], [Tr.DATA_MASK_110, new t(Tr.DATA_MASK_110,function(e, r) {
        return e * r % 6 < 3
    }
    )], [Tr.DATA_MASK_111, new t(Tr.DATA_MASK_111,function(e, r) {
        return (e + r + e * r % 3 & 1) === 0
    }
    )]]),
    t
}(), Obe = function() {
    function t(e) {
        var r = e.getHeight();
        if (r < 21 || (r & 3) !== 1)
            throw new ge;
        this.bitMatrix = e
    }
    return t.prototype.readFormatInformation = function() {
        if (this.parsedFormatInfo !== null && this.parsedFormatInfo !== void 0)
            return this.parsedFormatInfo;
        for (var e = 0, r = 0; r < 6; r++)
            e = this.copyBit(r, 8, e);
        e = this.copyBit(7, 8, e),
        e = this.copyBit(8, 8, e),
        e = this.copyBit(8, 7, e);
        for (var n = 5; n >= 0; n--)
            e = this.copyBit(8, n, e);
        for (var i = this.bitMatrix.getHeight(), o = 0, s = i - 7, n = i - 1; n >= s; n--)
            o = this.copyBit(8, n, o);
        for (var r = i - 8; r < i; r++)
            o = this.copyBit(r, 8, o);
        if (this.parsedFormatInfo = xM.decodeFormatInformation(e, o),
        this.parsedFormatInfo !== null)
            return this.parsedFormatInfo;
        throw new ge
    }
    ,
    t.prototype.readVersion = function() {
        if (this.parsedVersion !== null && this.parsedVersion !== void 0)
            return this.parsedVersion;
        var e = this.bitMatrix.getHeight()
          , r = Math.floor((e - 17) / 4);
        if (r <= 6)
            return ul.getVersionForNumber(r);
        for (var n = 0, i = e - 11, o = 5; o >= 0; o--)
            for (var s = e - 9; s >= i; s--)
                n = this.copyBit(s, o, n);
        var a = ul.decodeVersionInformation(n);
        if (a !== null && a.getDimensionForVersion() === e)
            return this.parsedVersion = a,
            a;
        n = 0;
        for (var s = 5; s >= 0; s--)
            for (var o = e - 9; o >= i; o--)
                n = this.copyBit(s, o, n);
        if (a = ul.decodeVersionInformation(n),
        a !== null && a.getDimensionForVersion() === e)
            return this.parsedVersion = a,
            a;
        throw new ge
    }
    ,
    t.prototype.copyBit = function(e, r, n) {
        var i = this.isMirror ? this.bitMatrix.get(r, e) : this.bitMatrix.get(e, r);
        return i ? n << 1 | 1 : n << 1
    }
    ,
    t.prototype.readCodewords = function() {
        var e = this.readFormatInformation()
          , r = this.readVersion()
          , n = f6.values.get(e.getDataMask())
          , i = this.bitMatrix.getHeight();
        n.unmaskBitMatrix(this.bitMatrix, i);
        for (var o = r.buildFunctionPattern(), s = !0, a = new Uint8Array(r.getTotalCodewords()), l = 0, c = 0, u = 0, f = i - 1; f > 0; f -= 2) {
            f === 6 && f--;
            for (var d = 0; d < i; d++)
                for (var h = s ? i - 1 - d : d, x = 0; x < 2; x++)
                    o.get(f - x, h) || (u++,
                    c <<= 1,
                    this.bitMatrix.get(f - x, h) && (c |= 1),
                    u === 8 && (a[l++] = c,
                    u = 0,
                    c = 0));
            s = !s
        }
        if (l !== r.getTotalCodewords())
            throw new ge;
        return a
    }
    ,
    t.prototype.remask = function() {
        if (this.parsedFormatInfo !== null) {
            var e = f6.values.get(this.parsedFormatInfo.getDataMask())
              , r = this.bitMatrix.getHeight();
            e.unmaskBitMatrix(this.bitMatrix, r)
        }
    }
    ,
    t.prototype.setMirror = function(e) {
        this.parsedVersion = null,
        this.parsedFormatInfo = null,
        this.isMirror = e
    }
    ,
    t.prototype.mirror = function() {
        for (var e = this.bitMatrix, r = 0, n = e.getWidth(); r < n; r++)
            for (var i = r + 1, o = e.getHeight(); i < o; i++)
                e.get(r, i) !== e.get(i, r) && (e.flip(i, r),
                e.flip(r, i))
    }
    ,
    t
}(), d6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, kbe = function() {
    function t(e, r) {
        this.numDataCodewords = e,
        this.codewords = r
    }
    return t.getDataBlocks = function(e, r, n) {
        var i, o, s, a;
        if (e.length !== r.getTotalCodewords())
            throw new Me;
        var l = r.getECBlocksForLevel(n)
          , c = 0
          , u = l.getECBlocks();
        try {
            for (var f = d6(u), d = f.next(); !d.done; d = f.next()) {
                var h = d.value;
                c += h.getCount()
            }
        } catch (D) {
            i = {
                error: D
            }
        } finally {
            try {
                d && !d.done && (o = f.return) && o.call(f)
            } finally {
                if (i)
                    throw i.error
            }
        }
        var x = new Array(c)
          , y = 0;
        try {
            for (var m = d6(u), E = m.next(); !E.done; E = m.next())
                for (var h = E.value, g = 0; g < h.getCount(); g++) {
                    var p = h.getDataCodewords()
                      , v = l.getECCodewordsPerBlock() + p;
                    x[y++] = new t(p,new Uint8Array(v))
                }
        } catch (D) {
            s = {
                error: D
            }
        } finally {
            try {
                E && !E.done && (a = m.return) && a.call(m)
            } finally {
                if (s)
                    throw s.error
            }
        }
        for (var _ = x[0].codewords.length, b = x.length - 1; b >= 0; ) {
            var C = x[b].codewords.length;
            if (C === _)
                break;
            b--
        }
        b++;
        for (var B = _ - l.getECCodewordsPerBlock(), T = 0, g = 0; g < B; g++)
            for (var A = 0; A < y; A++)
                x[A].codewords[g] = e[T++];
        for (var A = b; A < y; A++)
            x[A].codewords[B] = e[T++];
        for (var w = x[0].codewords.length, g = B; g < w; g++)
            for (var A = 0; A < y; A++) {
                var S = A < b ? g : g + 1;
                x[A].codewords[S] = e[T++]
            }
        return x
    }
    ,
    t.prototype.getNumDataCodewords = function() {
        return this.numDataCodewords
    }
    ,
    t.prototype.getCodewords = function() {
        return this.codewords
    }
    ,
    t
}(), si;
(function(t) {
    t[t.TERMINATOR = 0] = "TERMINATOR",
    t[t.NUMERIC = 1] = "NUMERIC",
    t[t.ALPHANUMERIC = 2] = "ALPHANUMERIC",
    t[t.STRUCTURED_APPEND = 3] = "STRUCTURED_APPEND",
    t[t.BYTE = 4] = "BYTE",
    t[t.ECI = 5] = "ECI",
    t[t.KANJI = 6] = "KANJI",
    t[t.FNC1_FIRST_POSITION = 7] = "FNC1_FIRST_POSITION",
    t[t.FNC1_SECOND_POSITION = 8] = "FNC1_SECOND_POSITION",
    t[t.HANZI = 9] = "HANZI"
}
)(si || (si = {}));
var Rt = function() {
    function t(e, r, n, i) {
        this.value = e,
        this.stringValue = r,
        this.characterCountBitsForVersions = n,
        this.bits = i,
        t.FOR_BITS.set(i, this),
        t.FOR_VALUE.set(e, this)
    }
    return t.forBits = function(e) {
        var r = t.FOR_BITS.get(e);
        if (r === void 0)
            throw new Me;
        return r
    }
    ,
    t.prototype.getCharacterCountBits = function(e) {
        var r = e.getVersionNumber(), n;
        return r <= 9 ? n = 0 : r <= 26 ? n = 1 : n = 2,
        this.characterCountBitsForVersions[n]
    }
    ,
    t.prototype.getValue = function() {
        return this.value
    }
    ,
    t.prototype.getBits = function() {
        return this.bits
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        return this.value === r.value
    }
    ,
    t.prototype.toString = function() {
        return this.stringValue
    }
    ,
    t.FOR_BITS = new Map,
    t.FOR_VALUE = new Map,
    t.TERMINATOR = new t(si.TERMINATOR,"TERMINATOR",Int32Array.from([0, 0, 0]),0),
    t.NUMERIC = new t(si.NUMERIC,"NUMERIC",Int32Array.from([10, 12, 14]),1),
    t.ALPHANUMERIC = new t(si.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9, 11, 13]),2),
    t.STRUCTURED_APPEND = new t(si.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0, 0, 0]),3),
    t.BYTE = new t(si.BYTE,"BYTE",Int32Array.from([8, 16, 16]),4),
    t.ECI = new t(si.ECI,"ECI",Int32Array.from([0, 0, 0]),7),
    t.KANJI = new t(si.KANJI,"KANJI",Int32Array.from([8, 10, 12]),8),
    t.FNC1_FIRST_POSITION = new t(si.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0, 0, 0]),5),
    t.FNC1_SECOND_POSITION = new t(si.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0, 0, 0]),9),
    t.HANZI = new t(si.HANZI,"HANZI",Int32Array.from([8, 10, 12]),13),
    t
}()
  , Rbe = function() {
    function t() {}
    return t.decode = function(e, r, n, i) {
        var o = new hM(e)
          , s = new Ke
          , a = new Array
          , l = -1
          , c = -1;
        try {
            var u = null
              , f = !1
              , d = void 0;
            do {
                if (o.available() < 4)
                    d = Rt.TERMINATOR;
                else {
                    var h = o.readBits(4);
                    d = Rt.forBits(h)
                }
                switch (d) {
                case Rt.TERMINATOR:
                    break;
                case Rt.FNC1_FIRST_POSITION:
                case Rt.FNC1_SECOND_POSITION:
                    f = !0;
                    break;
                case Rt.STRUCTURED_APPEND:
                    if (o.available() < 16)
                        throw new ge;
                    l = o.readBits(8),
                    c = o.readBits(8);
                    break;
                case Rt.ECI:
                    var x = t.parseECIValue(o);
                    if (u = _r.getCharacterSetECIByValue(x),
                    u === null)
                        throw new ge;
                    break;
                case Rt.HANZI:
                    var y = o.readBits(4)
                      , m = o.readBits(d.getCharacterCountBits(r));
                    y === t.GB2312_SUBSET && t.decodeHanziSegment(o, s, m);
                    break;
                default:
                    var E = o.readBits(d.getCharacterCountBits(r));
                    switch (d) {
                    case Rt.NUMERIC:
                        t.decodeNumericSegment(o, s, E);
                        break;
                    case Rt.ALPHANUMERIC:
                        t.decodeAlphanumericSegment(o, s, E, f);
                        break;
                    case Rt.BYTE:
                        t.decodeByteSegment(o, s, E, u, a, i);
                        break;
                    case Rt.KANJI:
                        t.decodeKanjiSegment(o, s, E);
                        break;
                    default:
                        throw new ge
                    }
                    break
                }
            } while (d !== Rt.TERMINATOR)
        } catch {
            throw new ge
        }
        return new I1(e,s.toString(),a.length === 0 ? null : a,n === null ? null : n.toString(),l,c)
    }
    ,
    t.decodeHanziSegment = function(e, r, n) {
        if (n * 13 > e.available())
            throw new ge;
        for (var i = new Uint8Array(2 * n), o = 0; n > 0; ) {
            var s = e.readBits(13)
              , a = s / 96 << 8 & 4294967295 | s % 96;
            a < 959 ? a += 41377 : a += 42657,
            i[o] = a >> 8 & 255,
            i[o + 1] = a & 255,
            o += 2,
            n--
        }
        try {
            r.append(mi.decode(i, nt.GB2312))
        } catch (l) {
            throw new ge(l)
        }
    }
    ,
    t.decodeKanjiSegment = function(e, r, n) {
        if (n * 13 > e.available())
            throw new ge;
        for (var i = new Uint8Array(2 * n), o = 0; n > 0; ) {
            var s = e.readBits(13)
              , a = s / 192 << 8 & 4294967295 | s % 192;
            a < 7936 ? a += 33088 : a += 49472,
            i[o] = a >> 8,
            i[o + 1] = a,
            o += 2,
            n--
        }
        try {
            r.append(mi.decode(i, nt.SHIFT_JIS))
        } catch (l) {
            throw new ge(l)
        }
    }
    ,
    t.decodeByteSegment = function(e, r, n, i, o, s) {
        if (8 * n > e.available())
            throw new ge;
        for (var a = new Uint8Array(n), l = 0; l < n; l++)
            a[l] = e.readBits(8);
        var c;
        i === null ? c = nt.guessEncoding(a, s) : c = i.getName();
        try {
            r.append(mi.decode(a, c))
        } catch (u) {
            throw new ge(u)
        }
        o.push(a)
    }
    ,
    t.toAlphaNumericChar = function(e) {
        if (e >= t.ALPHANUMERIC_CHARS.length)
            throw new ge;
        return t.ALPHANUMERIC_CHARS[e]
    }
    ,
    t.decodeAlphanumericSegment = function(e, r, n, i) {
        for (var o = r.length(); n > 1; ) {
            if (e.available() < 11)
                throw new ge;
            var s = e.readBits(11);
            r.append(t.toAlphaNumericChar(Math.floor(s / 45))),
            r.append(t.toAlphaNumericChar(s % 45)),
            n -= 2
        }
        if (n === 1) {
            if (e.available() < 6)
                throw new ge;
            r.append(t.toAlphaNumericChar(e.readBits(6)))
        }
        if (i)
            for (var a = o; a < r.length(); a++)
                r.charAt(a) === "%" && (a < r.length() - 1 && r.charAt(a + 1) === "%" ? r.deleteCharAt(a + 1) : r.setCharAt(a, String.fromCharCode(29)))
    }
    ,
    t.decodeNumericSegment = function(e, r, n) {
        for (; n >= 3; ) {
            if (e.available() < 10)
                throw new ge;
            var i = e.readBits(10);
            if (i >= 1e3)
                throw new ge;
            r.append(t.toAlphaNumericChar(Math.floor(i / 100))),
            r.append(t.toAlphaNumericChar(Math.floor(i / 10) % 10)),
            r.append(t.toAlphaNumericChar(i % 10)),
            n -= 3
        }
        if (n === 2) {
            if (e.available() < 7)
                throw new ge;
            var o = e.readBits(7);
            if (o >= 100)
                throw new ge;
            r.append(t.toAlphaNumericChar(Math.floor(o / 10))),
            r.append(t.toAlphaNumericChar(o % 10))
        } else if (n === 1) {
            if (e.available() < 4)
                throw new ge;
            var s = e.readBits(4);
            if (s >= 10)
                throw new ge;
            r.append(t.toAlphaNumericChar(s))
        }
    }
    ,
    t.parseECIValue = function(e) {
        var r = e.readBits(8);
        if (!(r & 128))
            return r & 127;
        if ((r & 192) === 128) {
            var n = e.readBits(8);
            return (r & 63) << 8 & 4294967295 | n
        }
        if ((r & 224) === 192) {
            var i = e.readBits(16);
            return (r & 31) << 16 & 4294967295 | i
        }
        throw new ge
    }
    ,
    t.ALPHANUMERIC_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",
    t.GB2312_SUBSET = 1,
    t
}()
  , pM = function() {
    function t(e) {
        this.mirrored = e
    }
    return t.prototype.isMirrored = function() {
        return this.mirrored
    }
    ,
    t.prototype.applyMirroredCorrection = function(e) {
        if (!(!this.mirrored || e === null || e.length < 3)) {
            var r = e[0];
            e[0] = e[2],
            e[2] = r
        }
    }
    ,
    t
}()
  , h6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , Mbe = function() {
    function t() {
        this.rsDecoder = new O1(wn.QR_CODE_FIELD_256)
    }
    return t.prototype.decodeBooleanArray = function(e, r) {
        return this.decodeBitMatrix(Ao.parseFromBooleanArray(e), r)
    }
    ,
    t.prototype.decodeBitMatrix = function(e, r) {
        var n = new Obe(e)
          , i = null;
        try {
            return this.decodeBitMatrixParser(n, r)
        } catch (s) {
            i = s
        }
        try {
            n.remask(),
            n.setMirror(!0),
            n.readVersion(),
            n.readFormatInformation(),
            n.mirror();
            var o = this.decodeBitMatrixParser(n, r);
            return o.setOther(new pM(!0)),
            o
        } catch (s) {
            throw i !== null ? i : s
        }
    }
    ,
    t.prototype.decodeBitMatrixParser = function(e, r) {
        var n, i, o, s, a = e.readVersion(), l = e.readFormatInformation().getErrorCorrectionLevel(), c = e.readCodewords(), u = kbe.getDataBlocks(c, a, l), f = 0;
        try {
            for (var d = h6(u), h = d.next(); !h.done; h = d.next()) {
                var x = h.value;
                f += x.getNumDataCodewords()
            }
        } catch (b) {
            n = {
                error: b
            }
        } finally {
            try {
                h && !h.done && (i = d.return) && i.call(d)
            } finally {
                if (n)
                    throw n.error
            }
        }
        var y = new Uint8Array(f)
          , m = 0;
        try {
            for (var E = h6(u), g = E.next(); !g.done; g = E.next()) {
                var x = g.value
                  , p = x.getCodewords()
                  , v = x.getNumDataCodewords();
                this.correctErrors(p, v);
                for (var _ = 0; _ < v; _++)
                    y[m++] = p[_]
            }
        } catch (b) {
            o = {
                error: b
            }
        } finally {
            try {
                g && !g.done && (s = E.return) && s.call(E)
            } finally {
                if (o)
                    throw o.error
            }
        }
        return Rbe.decode(y, a, l, r)
    }
    ,
    t.prototype.correctErrors = function(e, r) {
        var n = new Int32Array(e);
        try {
            this.rsDecoder.decode(n, e.length - r)
        } catch {
            throw new fr
        }
        for (var i = 0; i < r; i++)
            e[i] = n[i]
    }
    ,
    t
}()
  , Nbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Lbe = function(t) {
    Nbe(e, t);
    function e(r, n, i) {
        var o = t.call(this, r, n) || this;
        return o.estimatedModuleSize = i,
        o
    }
    return e.prototype.aboutEquals = function(r, n, i) {
        if (Math.abs(n - this.getY()) <= r && Math.abs(i - this.getX()) <= r) {
            var o = Math.abs(r - this.estimatedModuleSize);
            return o <= 1 || o <= this.estimatedModuleSize
        }
        return !1
    }
    ,
    e.prototype.combineEstimate = function(r, n, i) {
        var o = (this.getX() + n) / 2
          , s = (this.getY() + r) / 2
          , a = (this.estimatedModuleSize + i) / 2;
        return new e(o,s,a)
    }
    ,
    e
}(Te)
  , $be = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , Ube = function() {
    function t(e, r, n, i, o, s, a) {
        this.image = e,
        this.startX = r,
        this.startY = n,
        this.width = i,
        this.height = o,
        this.moduleSize = s,
        this.resultPointCallback = a,
        this.possibleCenters = [],
        this.crossCheckStateCount = new Int32Array(3)
    }
    return t.prototype.find = function() {
        for (var e = this.startX, r = this.height, n = this.width, i = e + n, o = this.startY + r / 2, s = new Int32Array(3), a = this.image, l = 0; l < r; l++) {
            var c = o + (l & 1 ? -Math.floor((l + 1) / 2) : Math.floor((l + 1) / 2));
            s[0] = 0,
            s[1] = 0,
            s[2] = 0;
            for (var u = e; u < i && !a.get(u, c); )
                u++;
            for (var f = 0; u < i; ) {
                if (a.get(u, c))
                    if (f === 1)
                        s[1]++;
                    else if (f === 2) {
                        if (this.foundPatternCross(s)) {
                            var d = this.handlePossibleCenter(s, c, u);
                            if (d !== null)
                                return d
                        }
                        s[0] = s[2],
                        s[1] = 1,
                        s[2] = 0,
                        f = 1
                    } else
                        s[++f]++;
                else
                    f === 1 && f++,
                    s[f]++;
                u++
            }
            if (this.foundPatternCross(s)) {
                var d = this.handlePossibleCenter(s, c, i);
                if (d !== null)
                    return d
            }
        }
        if (this.possibleCenters.length !== 0)
            return this.possibleCenters[0];
        throw new le
    }
    ,
    t.centerFromEnd = function(e, r) {
        return r - e[2] - e[1] / 2
    }
    ,
    t.prototype.foundPatternCross = function(e) {
        for (var r = this.moduleSize, n = r / 2, i = 0; i < 3; i++)
            if (Math.abs(r - e[i]) >= n)
                return !1;
        return !0
    }
    ,
    t.prototype.crossCheckVertical = function(e, r, n, i) {
        var o = this.image
          , s = o.getHeight()
          , a = this.crossCheckStateCount;
        a[0] = 0,
        a[1] = 0,
        a[2] = 0;
        for (var l = e; l >= 0 && o.get(r, l) && a[1] <= n; )
            a[1]++,
            l--;
        if (l < 0 || a[1] > n)
            return NaN;
        for (; l >= 0 && !o.get(r, l) && a[0] <= n; )
            a[0]++,
            l--;
        if (a[0] > n)
            return NaN;
        for (l = e + 1; l < s && o.get(r, l) && a[1] <= n; )
            a[1]++,
            l++;
        if (l === s || a[1] > n)
            return NaN;
        for (; l < s && !o.get(r, l) && a[2] <= n; )
            a[2]++,
            l++;
        if (a[2] > n)
            return NaN;
        var c = a[0] + a[1] + a[2];
        return 5 * Math.abs(c - i) >= 2 * i ? NaN : this.foundPatternCross(a) ? t.centerFromEnd(a, l) : NaN
    }
    ,
    t.prototype.handlePossibleCenter = function(e, r, n) {
        var i, o, s = e[0] + e[1] + e[2], a = t.centerFromEnd(e, n), l = this.crossCheckVertical(r, a, 2 * e[1], s);
        if (!isNaN(l)) {
            var c = (e[0] + e[1] + e[2]) / 3;
            try {
                for (var u = $be(this.possibleCenters), f = u.next(); !f.done; f = u.next()) {
                    var d = f.value;
                    if (d.aboutEquals(c, l, a))
                        return d.combineEstimate(l, a, c)
                }
            } catch (x) {
                i = {
                    error: x
                }
            } finally {
                try {
                    f && !f.done && (o = u.return) && o.call(u)
                } finally {
                    if (i)
                        throw i.error
                }
            }
            var h = new Lbe(a,l,c);
            this.possibleCenters.push(h),
            this.resultPointCallback !== null && this.resultPointCallback !== void 0 && this.resultPointCallback.foundPossibleResultPoint(h)
        }
        return null
    }
    ,
    t
}()
  , Gbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , Hbe = function(t) {
    Gbe(e, t);
    function e(r, n, i, o) {
        var s = t.call(this, r, n) || this;
        return s.estimatedModuleSize = i,
        s.count = o,
        o === void 0 && (s.count = 1),
        s
    }
    return e.prototype.getEstimatedModuleSize = function() {
        return this.estimatedModuleSize
    }
    ,
    e.prototype.getCount = function() {
        return this.count
    }
    ,
    e.prototype.aboutEquals = function(r, n, i) {
        if (Math.abs(n - this.getY()) <= r && Math.abs(i - this.getX()) <= r) {
            var o = Math.abs(r - this.estimatedModuleSize);
            return o <= 1 || o <= this.estimatedModuleSize
        }
        return !1
    }
    ,
    e.prototype.combineEstimate = function(r, n, i) {
        var o = this.count + 1
          , s = (this.count * this.getX() + n) / o
          , a = (this.count * this.getY() + r) / o
          , l = (this.count * this.estimatedModuleSize + i) / o;
        return new e(s,a,l,o)
    }
    ,
    e
}(Te)
  , Vbe = function() {
    function t(e) {
        this.bottomLeft = e[0],
        this.topLeft = e[1],
        this.topRight = e[2]
    }
    return t.prototype.getBottomLeft = function() {
        return this.bottomLeft
    }
    ,
    t.prototype.getTopLeft = function() {
        return this.topLeft
    }
    ,
    t.prototype.getTopRight = function() {
        return this.topRight
    }
    ,
    t
}()
  , r0 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , zbe = function() {
    function t(e, r) {
        this.image = e,
        this.resultPointCallback = r,
        this.possibleCenters = [],
        this.crossCheckStateCount = new Int32Array(5),
        this.resultPointCallback = r
    }
    return t.prototype.getImage = function() {
        return this.image
    }
    ,
    t.prototype.getPossibleCenters = function() {
        return this.possibleCenters
    }
    ,
    t.prototype.find = function(e) {
        var r = e != null && e.get(Ft.TRY_HARDER) !== void 0
          , n = e != null && e.get(Ft.PURE_BARCODE) !== void 0
          , i = this.image
          , o = i.getHeight()
          , s = i.getWidth()
          , a = Math.floor(3 * o / (4 * t.MAX_MODULES));
        (a < t.MIN_SKIP || r) && (a = t.MIN_SKIP);
        for (var l = !1, c = new Int32Array(5), u = a - 1; u < o && !l; u += a) {
            c[0] = 0,
            c[1] = 0,
            c[2] = 0,
            c[3] = 0,
            c[4] = 0;
            for (var f = 0, d = 0; d < s; d++)
                if (i.get(d, u))
                    (f & 1) === 1 && f++,
                    c[f]++;
                else if (f & 1)
                    c[f]++;
                else if (f === 4)
                    if (t.foundPatternCross(c)) {
                        var h = this.handlePossibleCenter(c, u, d, n);
                        if (h === !0)
                            if (a = 2,
                            this.hasSkipped === !0)
                                l = this.haveMultiplyConfirmedCenters();
                            else {
                                var x = this.findRowSkip();
                                x > c[2] && (u += x - c[2] - a,
                                d = s - 1)
                            }
                        else {
                            c[0] = c[2],
                            c[1] = c[3],
                            c[2] = c[4],
                            c[3] = 1,
                            c[4] = 0,
                            f = 3;
                            continue
                        }
                        f = 0,
                        c[0] = 0,
                        c[1] = 0,
                        c[2] = 0,
                        c[3] = 0,
                        c[4] = 0
                    } else
                        c[0] = c[2],
                        c[1] = c[3],
                        c[2] = c[4],
                        c[3] = 1,
                        c[4] = 0,
                        f = 3;
                else
                    c[++f]++;
            if (t.foundPatternCross(c)) {
                var h = this.handlePossibleCenter(c, u, s, n);
                h === !0 && (a = c[0],
                this.hasSkipped && (l = this.haveMultiplyConfirmedCenters()))
            }
        }
        var y = this.selectBestPatterns();
        return Te.orderBestPatterns(y),
        new Vbe(y)
    }
    ,
    t.centerFromEnd = function(e, r) {
        return r - e[4] - e[3] - e[2] / 2
    }
    ,
    t.foundPatternCross = function(e) {
        for (var r = 0, n = 0; n < 5; n++) {
            var i = e[n];
            if (i === 0)
                return !1;
            r += i
        }
        if (r < 7)
            return !1;
        var o = r / 7
          , s = o / 2;
        return Math.abs(o - e[0]) < s && Math.abs(o - e[1]) < s && Math.abs(3 * o - e[2]) < 3 * s && Math.abs(o - e[3]) < s && Math.abs(o - e[4]) < s
    }
    ,
    t.prototype.getCrossCheckStateCount = function() {
        var e = this.crossCheckStateCount;
        return e[0] = 0,
        e[1] = 0,
        e[2] = 0,
        e[3] = 0,
        e[4] = 0,
        e
    }
    ,
    t.prototype.crossCheckDiagonal = function(e, r, n, i) {
        for (var o = this.getCrossCheckStateCount(), s = 0, a = this.image; e >= s && r >= s && a.get(r - s, e - s); )
            o[2]++,
            s++;
        if (e < s || r < s)
            return !1;
        for (; e >= s && r >= s && !a.get(r - s, e - s) && o[1] <= n; )
            o[1]++,
            s++;
        if (e < s || r < s || o[1] > n)
            return !1;
        for (; e >= s && r >= s && a.get(r - s, e - s) && o[0] <= n; )
            o[0]++,
            s++;
        if (o[0] > n)
            return !1;
        var l = a.getHeight()
          , c = a.getWidth();
        for (s = 1; e + s < l && r + s < c && a.get(r + s, e + s); )
            o[2]++,
            s++;
        if (e + s >= l || r + s >= c)
            return !1;
        for (; e + s < l && r + s < c && !a.get(r + s, e + s) && o[3] < n; )
            o[3]++,
            s++;
        if (e + s >= l || r + s >= c || o[3] >= n)
            return !1;
        for (; e + s < l && r + s < c && a.get(r + s, e + s) && o[4] < n; )
            o[4]++,
            s++;
        if (o[4] >= n)
            return !1;
        var u = o[0] + o[1] + o[2] + o[3] + o[4];
        return Math.abs(u - i) < 2 * i && t.foundPatternCross(o)
    }
    ,
    t.prototype.crossCheckVertical = function(e, r, n, i) {
        for (var o = this.image, s = o.getHeight(), a = this.getCrossCheckStateCount(), l = e; l >= 0 && o.get(r, l); )
            a[2]++,
            l--;
        if (l < 0)
            return NaN;
        for (; l >= 0 && !o.get(r, l) && a[1] <= n; )
            a[1]++,
            l--;
        if (l < 0 || a[1] > n)
            return NaN;
        for (; l >= 0 && o.get(r, l) && a[0] <= n; )
            a[0]++,
            l--;
        if (a[0] > n)
            return NaN;
        for (l = e + 1; l < s && o.get(r, l); )
            a[2]++,
            l++;
        if (l === s)
            return NaN;
        for (; l < s && !o.get(r, l) && a[3] < n; )
            a[3]++,
            l++;
        if (l === s || a[3] >= n)
            return NaN;
        for (; l < s && o.get(r, l) && a[4] < n; )
            a[4]++,
            l++;
        if (a[4] >= n)
            return NaN;
        var c = a[0] + a[1] + a[2] + a[3] + a[4];
        return 5 * Math.abs(c - i) >= 2 * i ? NaN : t.foundPatternCross(a) ? t.centerFromEnd(a, l) : NaN
    }
    ,
    t.prototype.crossCheckHorizontal = function(e, r, n, i) {
        for (var o = this.image, s = o.getWidth(), a = this.getCrossCheckStateCount(), l = e; l >= 0 && o.get(l, r); )
            a[2]++,
            l--;
        if (l < 0)
            return NaN;
        for (; l >= 0 && !o.get(l, r) && a[1] <= n; )
            a[1]++,
            l--;
        if (l < 0 || a[1] > n)
            return NaN;
        for (; l >= 0 && o.get(l, r) && a[0] <= n; )
            a[0]++,
            l--;
        if (a[0] > n)
            return NaN;
        for (l = e + 1; l < s && o.get(l, r); )
            a[2]++,
            l++;
        if (l === s)
            return NaN;
        for (; l < s && !o.get(l, r) && a[3] < n; )
            a[3]++,
            l++;
        if (l === s || a[3] >= n)
            return NaN;
        for (; l < s && o.get(l, r) && a[4] < n; )
            a[4]++,
            l++;
        if (a[4] >= n)
            return NaN;
        var c = a[0] + a[1] + a[2] + a[3] + a[4];
        return 5 * Math.abs(c - i) >= i ? NaN : t.foundPatternCross(a) ? t.centerFromEnd(a, l) : NaN
    }
    ,
    t.prototype.handlePossibleCenter = function(e, r, n, i) {
        var o = e[0] + e[1] + e[2] + e[3] + e[4]
          , s = t.centerFromEnd(e, n)
          , a = this.crossCheckVertical(r, Math.floor(s), e[2], o);
        if (!isNaN(a) && (s = this.crossCheckHorizontal(Math.floor(s), Math.floor(a), e[2], o),
        !isNaN(s) && (!i || this.crossCheckDiagonal(Math.floor(a), Math.floor(s), e[2], o)))) {
            for (var l = o / 7, c = !1, u = this.possibleCenters, f = 0, d = u.length; f < d; f++) {
                var h = u[f];
                if (h.aboutEquals(l, a, s)) {
                    u[f] = h.combineEstimate(a, s, l),
                    c = !0;
                    break
                }
            }
            if (!c) {
                var x = new Hbe(s,a,l);
                u.push(x),
                this.resultPointCallback !== null && this.resultPointCallback !== void 0 && this.resultPointCallback.foundPossibleResultPoint(x)
            }
            return !0
        }
        return !1
    }
    ,
    t.prototype.findRowSkip = function() {
        var e, r, n = this.possibleCenters.length;
        if (n <= 1)
            return 0;
        var i = null;
        try {
            for (var o = r0(this.possibleCenters), s = o.next(); !s.done; s = o.next()) {
                var a = s.value;
                if (a.getCount() >= t.CENTER_QUORUM)
                    if (i == null)
                        i = a;
                    else
                        return this.hasSkipped = !0,
                        Math.floor((Math.abs(i.getX() - a.getX()) - Math.abs(i.getY() - a.getY())) / 2)
            }
        } catch (l) {
            e = {
                error: l
            }
        } finally {
            try {
                s && !s.done && (r = o.return) && r.call(o)
            } finally {
                if (e)
                    throw e.error
            }
        }
        return 0
    }
    ,
    t.prototype.haveMultiplyConfirmedCenters = function() {
        var e, r, n, i, o = 0, s = 0, a = this.possibleCenters.length;
        try {
            for (var l = r0(this.possibleCenters), c = l.next(); !c.done; c = l.next()) {
                var u = c.value;
                u.getCount() >= t.CENTER_QUORUM && (o++,
                s += u.getEstimatedModuleSize())
            }
        } catch (y) {
            e = {
                error: y
            }
        } finally {
            try {
                c && !c.done && (r = l.return) && r.call(l)
            } finally {
                if (e)
                    throw e.error
            }
        }
        if (o < 3)
            return !1;
        var f = s / a
          , d = 0;
        try {
            for (var h = r0(this.possibleCenters), x = h.next(); !x.done; x = h.next()) {
                var u = x.value;
                d += Math.abs(u.getEstimatedModuleSize() - f)
            }
        } catch (y) {
            n = {
                error: y
            }
        } finally {
            try {
                x && !x.done && (i = h.return) && i.call(h)
            } finally {
                if (n)
                    throw n.error
            }
        }
        return d <= .05 * s
    }
    ,
    t.prototype.selectBestPatterns = function() {
        var e, r, n, i, o = this.possibleCenters.length;
        if (o < 3)
            throw new le;
        var s = this.possibleCenters, a;
        if (o > 3) {
            var l = 0
              , c = 0;
            try {
                for (var u = r0(this.possibleCenters), f = u.next(); !f.done; f = u.next()) {
                    var d = f.value
                      , h = d.getEstimatedModuleSize();
                    l += h,
                    c += h * h
                }
            } catch (_) {
                e = {
                    error: _
                }
            } finally {
                try {
                    f && !f.done && (r = u.return) && r.call(u)
                } finally {
                    if (e)
                        throw e.error
                }
            }
            a = l / o;
            var x = Math.sqrt(c / o - a * a);
            s.sort(function(_, b) {
                var C = Math.abs(b.getEstimatedModuleSize() - a)
                  , B = Math.abs(_.getEstimatedModuleSize() - a);
                return C < B ? -1 : C > B ? 1 : 0
            });
            for (var y = Math.max(.2 * a, x), m = 0; m < s.length && s.length > 3; m++) {
                var E = s[m];
                Math.abs(E.getEstimatedModuleSize() - a) > y && (s.splice(m, 1),
                m--)
            }
        }
        if (s.length > 3) {
            var l = 0;
            try {
                for (var g = r0(s), p = g.next(); !p.done; p = g.next()) {
                    var v = p.value;
                    l += v.getEstimatedModuleSize()
                }
            } catch (b) {
                n = {
                    error: b
                }
            } finally {
                try {
                    p && !p.done && (i = g.return) && i.call(g)
                } finally {
                    if (n)
                        throw n.error
                }
            }
            a = l / s.length,
            s.sort(function(b, C) {
                if (C.getCount() === b.getCount()) {
                    var B = Math.abs(C.getEstimatedModuleSize() - a)
                      , T = Math.abs(b.getEstimatedModuleSize() - a);
                    return B < T ? 1 : B > T ? -1 : 0
                } else
                    return C.getCount() - b.getCount()
            }),
            s.splice(3)
        }
        return [s[0], s[1], s[2]]
    }
    ,
    t.CENTER_QUORUM = 2,
    t.MIN_SKIP = 3,
    t.MAX_MODULES = 57,
    t
}()
  , jbe = function() {
    function t(e) {
        this.image = e
    }
    return t.prototype.getImage = function() {
        return this.image
    }
    ,
    t.prototype.getResultPointCallback = function() {
        return this.resultPointCallback
    }
    ,
    t.prototype.detect = function(e) {
        this.resultPointCallback = e == null ? null : e.get(Ft.NEED_RESULT_POINT_CALLBACK);
        var r = new zbe(this.image,this.resultPointCallback)
          , n = r.find(e);
        return this.processFinderPatternInfo(n)
    }
    ,
    t.prototype.processFinderPatternInfo = function(e) {
        var r = e.getTopLeft()
          , n = e.getTopRight()
          , i = e.getBottomLeft()
          , o = this.calculateModuleSize(r, n, i);
        if (o < 1)
            throw new le("No pattern found in proccess finder.");
        var s = t.computeDimension(r, n, i, o)
          , a = ul.getProvisionalVersionForDimension(s)
          , l = a.getDimensionForVersion() - 7
          , c = null;
        if (a.getAlignmentPatternCenters().length > 0)
            for (var u = n.getX() - r.getX() + i.getX(), f = n.getY() - r.getY() + i.getY(), d = 1 - 3 / l, h = Math.floor(r.getX() + d * (u - r.getX())), x = Math.floor(r.getY() + d * (f - r.getY())), y = 4; y <= 16; y <<= 1)
                try {
                    c = this.findAlignmentInRegion(o, h, x, y);
                    break
                } catch (p) {
                    if (!(p instanceof le))
                        throw p
                }
        var m = t.createTransform(r, n, i, c, s), E = t.sampleGrid(this.image, m, s), g;
        return c === null ? g = [i, r, n] : g = [i, r, n, c],
        new bC(E,g)
    }
    ,
    t.createTransform = function(e, r, n, i, o) {
        var s = o - 3.5, a, l, c, u;
        return i !== null ? (a = i.getX(),
        l = i.getY(),
        c = s - 3,
        u = c) : (a = r.getX() - e.getX() + n.getX(),
        l = r.getY() - e.getY() + n.getY(),
        c = s,
        u = s),
        cM.quadrilateralToQuadrilateral(3.5, 3.5, s, 3.5, c, u, 3.5, s, e.getX(), e.getY(), r.getX(), r.getY(), a, l, n.getX(), n.getY())
    }
    ,
    t.sampleGrid = function(e, r, n) {
        var i = CC.getInstance();
        return i.sampleGridWithTransform(e, n, n, r)
    }
    ,
    t.computeDimension = function(e, r, n, i) {
        var o = ft.round(Te.distance(e, r) / i)
          , s = ft.round(Te.distance(e, n) / i)
          , a = Math.floor((o + s) / 2) + 7;
        switch (a & 3) {
        case 0:
            a++;
            break;
        case 2:
            a--;
            break;
        case 3:
            throw new le("Dimensions could be not found.")
        }
        return a
    }
    ,
    t.prototype.calculateModuleSize = function(e, r, n) {
        return (this.calculateModuleSizeOneWay(e, r) + this.calculateModuleSizeOneWay(e, n)) / 2
    }
    ,
    t.prototype.calculateModuleSizeOneWay = function(e, r) {
        var n = this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()), Math.floor(e.getY()), Math.floor(r.getX()), Math.floor(r.getY()))
          , i = this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(r.getX()), Math.floor(r.getY()), Math.floor(e.getX()), Math.floor(e.getY()));
        return isNaN(n) ? i / 7 : isNaN(i) ? n / 7 : (n + i) / 14
    }
    ,
    t.prototype.sizeOfBlackWhiteBlackRunBothWays = function(e, r, n, i) {
        var o = this.sizeOfBlackWhiteBlackRun(e, r, n, i)
          , s = 1
          , a = e - (n - e);
        a < 0 ? (s = e / (e - a),
        a = 0) : a >= this.image.getWidth() && (s = (this.image.getWidth() - 1 - e) / (a - e),
        a = this.image.getWidth() - 1);
        var l = Math.floor(r - (i - r) * s);
        return s = 1,
        l < 0 ? (s = r / (r - l),
        l = 0) : l >= this.image.getHeight() && (s = (this.image.getHeight() - 1 - r) / (l - r),
        l = this.image.getHeight() - 1),
        a = Math.floor(e + (a - e) * s),
        o += this.sizeOfBlackWhiteBlackRun(e, r, a, l),
        o - 1
    }
    ,
    t.prototype.sizeOfBlackWhiteBlackRun = function(e, r, n, i) {
        var o = Math.abs(i - r) > Math.abs(n - e);
        if (o) {
            var s = e;
            e = r,
            r = s,
            s = n,
            n = i,
            i = s
        }
        for (var a = Math.abs(n - e), l = Math.abs(i - r), c = -a / 2, u = e < n ? 1 : -1, f = r < i ? 1 : -1, d = 0, h = n + u, x = e, y = r; x !== h; x += u) {
            var m = o ? y : x
              , E = o ? x : y;
            if (d === 1 === this.image.get(m, E)) {
                if (d === 2)
                    return ft.distance(x, y, e, r);
                d++
            }
            if (c += l,
            c > 0) {
                if (y === i)
                    break;
                y += f,
                c -= a
            }
        }
        return d === 2 ? ft.distance(n + u, i, e, r) : NaN
    }
    ,
    t.prototype.findAlignmentInRegion = function(e, r, n, i) {
        var o = Math.floor(i * e)
          , s = Math.max(0, r - o)
          , a = Math.min(this.image.getWidth() - 1, r + o);
        if (a - s < e * 3)
            throw new le("Alignment top exceeds estimated module size.");
        var l = Math.max(0, n - o)
          , c = Math.min(this.image.getHeight() - 1, n + o);
        if (c - l < e * 3)
            throw new le("Alignment bottom exceeds estimated module size.");
        var u = new Ube(this.image,s,l,a - s,c - l,e,this.resultPointCallback);
        return u.find()
    }
    ,
    t
}()
  , Wbe = function() {
    function t() {
        this.decoder = new Mbe
    }
    return t.prototype.getDecoder = function() {
        return this.decoder
    }
    ,
    t.prototype.decode = function(e, r) {
        var n, i;
        if (r != null && r.get(Ft.PURE_BARCODE) !== void 0) {
            var o = t.extractPureBits(e.getBlackMatrix());
            n = this.decoder.decodeBitMatrix(o, r),
            i = t.NO_POINTS
        } else {
            var s = new jbe(e.getBlackMatrix()).detect(r);
            n = this.decoder.decodeBitMatrix(s.getBits(), r),
            i = s.getPoints()
        }
        n.getOther()instanceof pM && n.getOther().applyMirroredCorrection(i);
        var a = new rn(n.getText(),n.getRawBytes(),void 0,i,ke.QR_CODE,void 0)
          , l = n.getByteSegments();
        l !== null && a.putMetadata(Hr.BYTE_SEGMENTS, l);
        var c = n.getECLevel();
        return c !== null && a.putMetadata(Hr.ERROR_CORRECTION_LEVEL, c),
        n.hasStructuredAppend() && (a.putMetadata(Hr.STRUCTURED_APPEND_SEQUENCE, n.getStructuredAppendSequenceNumber()),
        a.putMetadata(Hr.STRUCTURED_APPEND_PARITY, n.getStructuredAppendParity())),
        a
    }
    ,
    t.prototype.reset = function() {}
    ,
    t.extractPureBits = function(e) {
        var r = e.getTopLeftOnBit()
          , n = e.getBottomRightOnBit();
        if (r === null || n === null)
            throw new le;
        var i = this.moduleSize(r, e)
          , o = r[1]
          , s = n[1]
          , a = r[0]
          , l = n[0];
        if (a >= l || o >= s)
            throw new le;
        if (s - o !== l - a && (l = a + (s - o),
        l >= e.getWidth()))
            throw new le;
        var c = Math.round((l - a + 1) / i)
          , u = Math.round((s - o + 1) / i);
        if (c <= 0 || u <= 0)
            throw new le;
        if (u !== c)
            throw new le;
        var f = Math.floor(i / 2);
        o += f,
        a += f;
        var d = a + Math.floor((c - 1) * i) - l;
        if (d > 0) {
            if (d > f)
                throw new le;
            a -= d
        }
        var h = o + Math.floor((u - 1) * i) - s;
        if (h > 0) {
            if (h > f)
                throw new le;
            o -= h
        }
        for (var x = new Ao(c,u), y = 0; y < u; y++)
            for (var m = o + Math.floor(y * i), E = 0; E < c; E++)
                e.get(a + Math.floor(E * i), m) && x.set(E, y);
        return x
    }
    ,
    t.moduleSize = function(e, r) {
        for (var n = r.getHeight(), i = r.getWidth(), o = e[0], s = e[1], a = !0, l = 0; o < i && s < n; ) {
            if (a !== r.get(o, s)) {
                if (++l === 5)
                    break;
                a = !a
            }
            o++,
            s++
        }
        if (o === i || s === n)
            throw new le;
        return (o - e[0]) / 7
    }
    ,
    t.NO_POINTS = new Array,
    t
}();
const tp = Wbe;
var Ybe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, at = function() {
    function t() {}
    return t.prototype.PDF417Common = function() {}
    ,
    t.getBitCountSum = function(e) {
        return ft.sum(e)
    }
    ,
    t.toIntArray = function(e) {
        var r, n;
        if (e == null || !e.length)
            return t.EMPTY_INT_ARRAY;
        var i = new Int32Array(e.length)
          , o = 0;
        try {
            for (var s = Ybe(e), a = s.next(); !a.done; a = s.next()) {
                var l = a.value;
                i[o++] = l
            }
        } catch (c) {
            r = {
                error: c
            }
        } finally {
            try {
                a && !a.done && (n = s.return) && n.call(s)
            } finally {
                if (r)
                    throw r.error
            }
        }
        return i
    }
    ,
    t.getCodeword = function(e) {
        var r = br.binarySearch(t.SYMBOL_TABLE, e & 262143);
        return r < 0 ? -1 : (t.CODEWORD_TABLE[r] - 1) % t.NUMBER_OF_CODEWORDS
    }
    ,
    t.NUMBER_OF_CODEWORDS = 929,
    t.MAX_CODEWORDS_IN_BARCODE = t.NUMBER_OF_CODEWORDS - 1,
    t.MIN_ROWS_IN_BARCODE = 3,
    t.MAX_ROWS_IN_BARCODE = 90,
    t.MODULES_IN_CODEWORD = 17,
    t.MODULES_IN_STOP_PATTERN = 18,
    t.BARS_IN_MODULE = 8,
    t.EMPTY_INT_ARRAY = new Int32Array([]),
    t.SYMBOL_TABLE = Int32Array.from([66142, 66170, 66206, 66236, 66290, 66292, 66350, 66382, 66396, 66454, 66470, 66476, 66594, 66600, 66614, 66626, 66628, 66632, 66640, 66654, 66662, 66668, 66682, 66690, 66718, 66720, 66748, 66758, 66776, 66798, 66802, 66804, 66820, 66824, 66832, 66846, 66848, 66876, 66880, 66936, 66950, 66956, 66968, 66992, 67006, 67022, 67036, 67042, 67044, 67048, 67062, 67118, 67150, 67164, 67214, 67228, 67256, 67294, 67322, 67350, 67366, 67372, 67398, 67404, 67416, 67438, 67474, 67476, 67490, 67492, 67496, 67510, 67618, 67624, 67650, 67656, 67664, 67678, 67686, 67692, 67706, 67714, 67716, 67728, 67742, 67744, 67772, 67782, 67788, 67800, 67822, 67826, 67828, 67842, 67848, 67870, 67872, 67900, 67904, 67960, 67974, 67992, 68016, 68030, 68046, 68060, 68066, 68068, 68072, 68086, 68104, 68112, 68126, 68128, 68156, 68160, 68216, 68336, 68358, 68364, 68376, 68400, 68414, 68448, 68476, 68494, 68508, 68536, 68546, 68548, 68552, 68560, 68574, 68582, 68588, 68654, 68686, 68700, 68706, 68708, 68712, 68726, 68750, 68764, 68792, 68802, 68804, 68808, 68816, 68830, 68838, 68844, 68858, 68878, 68892, 68920, 68976, 68990, 68994, 68996, 69e3, 69008, 69022, 69024, 69052, 69062, 69068, 69080, 69102, 69106, 69108, 69142, 69158, 69164, 69190, 69208, 69230, 69254, 69260, 69272, 69296, 69310, 69326, 69340, 69386, 69394, 69396, 69410, 69416, 69430, 69442, 69444, 69448, 69456, 69470, 69478, 69484, 69554, 69556, 69666, 69672, 69698, 69704, 69712, 69726, 69754, 69762, 69764, 69776, 69790, 69792, 69820, 69830, 69836, 69848, 69870, 69874, 69876, 69890, 69918, 69920, 69948, 69952, 70008, 70022, 70040, 70064, 70078, 70094, 70108, 70114, 70116, 70120, 70134, 70152, 70174, 70176, 70264, 70384, 70412, 70448, 70462, 70496, 70524, 70542, 70556, 70584, 70594, 70600, 70608, 70622, 70630, 70636, 70664, 70672, 70686, 70688, 70716, 70720, 70776, 70896, 71136, 71180, 71192, 71216, 71230, 71264, 71292, 71360, 71416, 71452, 71480, 71536, 71550, 71554, 71556, 71560, 71568, 71582, 71584, 71612, 71622, 71628, 71640, 71662, 71726, 71732, 71758, 71772, 71778, 71780, 71784, 71798, 71822, 71836, 71864, 71874, 71880, 71888, 71902, 71910, 71916, 71930, 71950, 71964, 71992, 72048, 72062, 72066, 72068, 72080, 72094, 72096, 72124, 72134, 72140, 72152, 72174, 72178, 72180, 72206, 72220, 72248, 72304, 72318, 72416, 72444, 72456, 72464, 72478, 72480, 72508, 72512, 72568, 72588, 72600, 72624, 72638, 72654, 72668, 72674, 72676, 72680, 72694, 72726, 72742, 72748, 72774, 72780, 72792, 72814, 72838, 72856, 72880, 72894, 72910, 72924, 72930, 72932, 72936, 72950, 72966, 72972, 72984, 73008, 73022, 73056, 73084, 73102, 73116, 73144, 73156, 73160, 73168, 73182, 73190, 73196, 73210, 73226, 73234, 73236, 73250, 73252, 73256, 73270, 73282, 73284, 73296, 73310, 73318, 73324, 73346, 73348, 73352, 73360, 73374, 73376, 73404, 73414, 73420, 73432, 73454, 73498, 73518, 73522, 73524, 73550, 73564, 73570, 73572, 73576, 73590, 73800, 73822, 73858, 73860, 73872, 73886, 73888, 73916, 73944, 73970, 73972, 73992, 74014, 74016, 74044, 74048, 74104, 74118, 74136, 74160, 74174, 74210, 74212, 74216, 74230, 74244, 74256, 74270, 74272, 74360, 74480, 74502, 74508, 74544, 74558, 74592, 74620, 74638, 74652, 74680, 74690, 74696, 74704, 74726, 74732, 74782, 74784, 74812, 74992, 75232, 75288, 75326, 75360, 75388, 75456, 75512, 75576, 75632, 75646, 75650, 75652, 75664, 75678, 75680, 75708, 75718, 75724, 75736, 75758, 75808, 75836, 75840, 75896, 76016, 76256, 76736, 76824, 76848, 76862, 76896, 76924, 76992, 77048, 77296, 77340, 77368, 77424, 77438, 77536, 77564, 77572, 77576, 77584, 77600, 77628, 77632, 77688, 77702, 77708, 77720, 77744, 77758, 77774, 77788, 77870, 77902, 77916, 77922, 77928, 77966, 77980, 78008, 78018, 78024, 78032, 78046, 78060, 78074, 78094, 78136, 78192, 78206, 78210, 78212, 78224, 78238, 78240, 78268, 78278, 78284, 78296, 78322, 78324, 78350, 78364, 78448, 78462, 78560, 78588, 78600, 78622, 78624, 78652, 78656, 78712, 78726, 78744, 78768, 78782, 78798, 78812, 78818, 78820, 78824, 78838, 78862, 78876, 78904, 78960, 78974, 79072, 79100, 79296, 79352, 79368, 79376, 79390, 79392, 79420, 79424, 79480, 79600, 79628, 79640, 79664, 79678, 79712, 79740, 79772, 79800, 79810, 79812, 79816, 79824, 79838, 79846, 79852, 79894, 79910, 79916, 79942, 79948, 79960, 79982, 79988, 80006, 80024, 80048, 80062, 80078, 80092, 80098, 80100, 80104, 80134, 80140, 80176, 80190, 80224, 80252, 80270, 80284, 80312, 80328, 80336, 80350, 80358, 80364, 80378, 80390, 80396, 80408, 80432, 80446, 80480, 80508, 80576, 80632, 80654, 80668, 80696, 80752, 80766, 80776, 80784, 80798, 80800, 80828, 80844, 80856, 80878, 80882, 80884, 80914, 80916, 80930, 80932, 80936, 80950, 80962, 80968, 80976, 80990, 80998, 81004, 81026, 81028, 81040, 81054, 81056, 81084, 81094, 81100, 81112, 81134, 81154, 81156, 81160, 81168, 81182, 81184, 81212, 81216, 81272, 81286, 81292, 81304, 81328, 81342, 81358, 81372, 81380, 81384, 81398, 81434, 81454, 81458, 81460, 81486, 81500, 81506, 81508, 81512, 81526, 81550, 81564, 81592, 81602, 81604, 81608, 81616, 81630, 81638, 81644, 81702, 81708, 81722, 81734, 81740, 81752, 81774, 81778, 81780, 82050, 82078, 82080, 82108, 82180, 82184, 82192, 82206, 82208, 82236, 82240, 82296, 82316, 82328, 82352, 82366, 82402, 82404, 82408, 82440, 82448, 82462, 82464, 82492, 82496, 82552, 82672, 82694, 82700, 82712, 82736, 82750, 82784, 82812, 82830, 82882, 82884, 82888, 82896, 82918, 82924, 82952, 82960, 82974, 82976, 83004, 83008, 83064, 83184, 83424, 83468, 83480, 83504, 83518, 83552, 83580, 83648, 83704, 83740, 83768, 83824, 83838, 83842, 83844, 83848, 83856, 83872, 83900, 83910, 83916, 83928, 83950, 83984, 84e3, 84028, 84032, 84088, 84208, 84448, 84928, 85040, 85054, 85088, 85116, 85184, 85240, 85488, 85560, 85616, 85630, 85728, 85756, 85764, 85768, 85776, 85790, 85792, 85820, 85824, 85880, 85894, 85900, 85912, 85936, 85966, 85980, 86048, 86080, 86136, 86256, 86496, 86976, 88160, 88188, 88256, 88312, 88560, 89056, 89200, 89214, 89312, 89340, 89536, 89592, 89608, 89616, 89632, 89664, 89720, 89840, 89868, 89880, 89904, 89952, 89980, 89998, 90012, 90040, 90190, 90204, 90254, 90268, 90296, 90306, 90308, 90312, 90334, 90382, 90396, 90424, 90480, 90494, 90500, 90504, 90512, 90526, 90528, 90556, 90566, 90572, 90584, 90610, 90612, 90638, 90652, 90680, 90736, 90750, 90848, 90876, 90884, 90888, 90896, 90910, 90912, 90940, 90944, 91e3, 91014, 91020, 91032, 91056, 91070, 91086, 91100, 91106, 91108, 91112, 91126, 91150, 91164, 91192, 91248, 91262, 91360, 91388, 91584, 91640, 91664, 91678, 91680, 91708, 91712, 91768, 91888, 91928, 91952, 91966, 92e3, 92028, 92046, 92060, 92088, 92098, 92100, 92104, 92112, 92126, 92134, 92140, 92188, 92216, 92272, 92384, 92412, 92608, 92664, 93168, 93200, 93214, 93216, 93244, 93248, 93304, 93424, 93664, 93720, 93744, 93758, 93792, 93820, 93888, 93944, 93980, 94008, 94064, 94078, 94084, 94088, 94096, 94110, 94112, 94140, 94150, 94156, 94168, 94246, 94252, 94278, 94284, 94296, 94318, 94342, 94348, 94360, 94384, 94398, 94414, 94428, 94440, 94470, 94476, 94488, 94512, 94526, 94560, 94588, 94606, 94620, 94648, 94658, 94660, 94664, 94672, 94686, 94694, 94700, 94714, 94726, 94732, 94744, 94768, 94782, 94816, 94844, 94912, 94968, 94990, 95004, 95032, 95088, 95102, 95112, 95120, 95134, 95136, 95164, 95180, 95192, 95214, 95218, 95220, 95244, 95256, 95280, 95294, 95328, 95356, 95424, 95480, 95728, 95758, 95772, 95800, 95856, 95870, 95968, 95996, 96008, 96016, 96030, 96032, 96060, 96064, 96120, 96152, 96176, 96190, 96220, 96226, 96228, 96232, 96290, 96292, 96296, 96310, 96322, 96324, 96328, 96336, 96350, 96358, 96364, 96386, 96388, 96392, 96400, 96414, 96416, 96444, 96454, 96460, 96472, 96494, 96498, 96500, 96514, 96516, 96520, 96528, 96542, 96544, 96572, 96576, 96632, 96646, 96652, 96664, 96688, 96702, 96718, 96732, 96738, 96740, 96744, 96758, 96772, 96776, 96784, 96798, 96800, 96828, 96832, 96888, 97008, 97030, 97036, 97048, 97072, 97086, 97120, 97148, 97166, 97180, 97208, 97220, 97224, 97232, 97246, 97254, 97260, 97326, 97330, 97332, 97358, 97372, 97378, 97380, 97384, 97398, 97422, 97436, 97464, 97474, 97476, 97480, 97488, 97502, 97510, 97516, 97550, 97564, 97592, 97648, 97666, 97668, 97672, 97680, 97694, 97696, 97724, 97734, 97740, 97752, 97774, 97830, 97836, 97850, 97862, 97868, 97880, 97902, 97906, 97908, 97926, 97932, 97944, 97968, 97998, 98012, 98018, 98020, 98024, 98038, 98618, 98674, 98676, 98838, 98854, 98874, 98892, 98904, 98926, 98930, 98932, 98968, 99006, 99042, 99044, 99048, 99062, 99166, 99194, 99246, 99286, 99350, 99366, 99372, 99386, 99398, 99416, 99438, 99442, 99444, 99462, 99504, 99518, 99534, 99548, 99554, 99556, 99560, 99574, 99590, 99596, 99608, 99632, 99646, 99680, 99708, 99726, 99740, 99768, 99778, 99780, 99784, 99792, 99806, 99814, 99820, 99834, 99858, 99860, 99874, 99880, 99894, 99906, 99920, 99934, 99962, 99970, 99972, 99976, 99984, 99998, 1e5, 100028, 100038, 100044, 100056, 100078, 100082, 100084, 100142, 100174, 100188, 100246, 100262, 100268, 100306, 100308, 100390, 100396, 100410, 100422, 100428, 100440, 100462, 100466, 100468, 100486, 100504, 100528, 100542, 100558, 100572, 100578, 100580, 100584, 100598, 100620, 100656, 100670, 100704, 100732, 100750, 100792, 100802, 100808, 100816, 100830, 100838, 100844, 100858, 100888, 100912, 100926, 100960, 100988, 101056, 101112, 101148, 101176, 101232, 101246, 101250, 101252, 101256, 101264, 101278, 101280, 101308, 101318, 101324, 101336, 101358, 101362, 101364, 101410, 101412, 101416, 101430, 101442, 101448, 101456, 101470, 101478, 101498, 101506, 101508, 101520, 101534, 101536, 101564, 101580, 101618, 101620, 101636, 101640, 101648, 101662, 101664, 101692, 101696, 101752, 101766, 101784, 101838, 101858, 101860, 101864, 101934, 101938, 101940, 101966, 101980, 101986, 101988, 101992, 102030, 102044, 102072, 102082, 102084, 102088, 102096, 102138, 102166, 102182, 102188, 102214, 102220, 102232, 102254, 102282, 102290, 102292, 102306, 102308, 102312, 102326, 102444, 102458, 102470, 102476, 102488, 102514, 102516, 102534, 102552, 102576, 102590, 102606, 102620, 102626, 102632, 102646, 102662, 102668, 102704, 102718, 102752, 102780, 102798, 102812, 102840, 102850, 102856, 102864, 102878, 102886, 102892, 102906, 102936, 102974, 103008, 103036, 103104, 103160, 103224, 103280, 103294, 103298, 103300, 103312, 103326, 103328, 103356, 103366, 103372, 103384, 103406, 103410, 103412, 103472, 103486, 103520, 103548, 103616, 103672, 103920, 103992, 104048, 104062, 104160, 104188, 104194, 104196, 104200, 104208, 104224, 104252, 104256, 104312, 104326, 104332, 104344, 104368, 104382, 104398, 104412, 104418, 104420, 104424, 104482, 104484, 104514, 104520, 104528, 104542, 104550, 104570, 104578, 104580, 104592, 104606, 104608, 104636, 104652, 104690, 104692, 104706, 104712, 104734, 104736, 104764, 104768, 104824, 104838, 104856, 104910, 104930, 104932, 104936, 104968, 104976, 104990, 104992, 105020, 105024, 105080, 105200, 105240, 105278, 105312, 105372, 105410, 105412, 105416, 105424, 105446, 105518, 105524, 105550, 105564, 105570, 105572, 105576, 105614, 105628, 105656, 105666, 105672, 105680, 105702, 105722, 105742, 105756, 105784, 105840, 105854, 105858, 105860, 105864, 105872, 105888, 105932, 105970, 105972, 106006, 106022, 106028, 106054, 106060, 106072, 106100, 106118, 106124, 106136, 106160, 106174, 106190, 106210, 106212, 106216, 106250, 106258, 106260, 106274, 106276, 106280, 106306, 106308, 106312, 106320, 106334, 106348, 106394, 106414, 106418, 106420, 106566, 106572, 106610, 106612, 106630, 106636, 106648, 106672, 106686, 106722, 106724, 106728, 106742, 106758, 106764, 106776, 106800, 106814, 106848, 106876, 106894, 106908, 106936, 106946, 106948, 106952, 106960, 106974, 106982, 106988, 107032, 107056, 107070, 107104, 107132, 107200, 107256, 107292, 107320, 107376, 107390, 107394, 107396, 107400, 107408, 107422, 107424, 107452, 107462, 107468, 107480, 107502, 107506, 107508, 107544, 107568, 107582, 107616, 107644, 107712, 107768, 108016, 108060, 108088, 108144, 108158, 108256, 108284, 108290, 108292, 108296, 108304, 108318, 108320, 108348, 108352, 108408, 108422, 108428, 108440, 108464, 108478, 108494, 108508, 108514, 108516, 108520, 108592, 108640, 108668, 108736, 108792, 109040, 109536, 109680, 109694, 109792, 109820, 110016, 110072, 110084, 110088, 110096, 110112, 110140, 110144, 110200, 110320, 110342, 110348, 110360, 110384, 110398, 110432, 110460, 110478, 110492, 110520, 110532, 110536, 110544, 110558, 110658, 110686, 110714, 110722, 110724, 110728, 110736, 110750, 110752, 110780, 110796, 110834, 110836, 110850, 110852, 110856, 110864, 110878, 110880, 110908, 110912, 110968, 110982, 111e3, 111054, 111074, 111076, 111080, 111108, 111112, 111120, 111134, 111136, 111164, 111168, 111224, 111344, 111372, 111422, 111456, 111516, 111554, 111556, 111560, 111568, 111590, 111632, 111646, 111648, 111676, 111680, 111736, 111856, 112096, 112152, 112224, 112252, 112320, 112440, 112514, 112516, 112520, 112528, 112542, 112544, 112588, 112686, 112718, 112732, 112782, 112796, 112824, 112834, 112836, 112840, 112848, 112870, 112890, 112910, 112924, 112952, 113008, 113022, 113026, 113028, 113032, 113040, 113054, 113056, 113100, 113138, 113140, 113166, 113180, 113208, 113264, 113278, 113376, 113404, 113416, 113424, 113440, 113468, 113472, 113560, 113614, 113634, 113636, 113640, 113686, 113702, 113708, 113734, 113740, 113752, 113778, 113780, 113798, 113804, 113816, 113840, 113854, 113870, 113890, 113892, 113896, 113926, 113932, 113944, 113968, 113982, 114016, 114044, 114076, 114114, 114116, 114120, 114128, 114150, 114170, 114194, 114196, 114210, 114212, 114216, 114242, 114244, 114248, 114256, 114270, 114278, 114306, 114308, 114312, 114320, 114334, 114336, 114364, 114380, 114420, 114458, 114478, 114482, 114484, 114510, 114524, 114530, 114532, 114536, 114842, 114866, 114868, 114970, 114994, 114996, 115042, 115044, 115048, 115062, 115130, 115226, 115250, 115252, 115278, 115292, 115298, 115300, 115304, 115318, 115342, 115394, 115396, 115400, 115408, 115422, 115430, 115436, 115450, 115478, 115494, 115514, 115526, 115532, 115570, 115572, 115738, 115758, 115762, 115764, 115790, 115804, 115810, 115812, 115816, 115830, 115854, 115868, 115896, 115906, 115912, 115920, 115934, 115942, 115948, 115962, 115996, 116024, 116080, 116094, 116098, 116100, 116104, 116112, 116126, 116128, 116156, 116166, 116172, 116184, 116206, 116210, 116212, 116246, 116262, 116268, 116282, 116294, 116300, 116312, 116334, 116338, 116340, 116358, 116364, 116376, 116400, 116414, 116430, 116444, 116450, 116452, 116456, 116498, 116500, 116514, 116520, 116534, 116546, 116548, 116552, 116560, 116574, 116582, 116588, 116602, 116654, 116694, 116714, 116762, 116782, 116786, 116788, 116814, 116828, 116834, 116836, 116840, 116854, 116878, 116892, 116920, 116930, 116936, 116944, 116958, 116966, 116972, 116986, 117006, 117048, 117104, 117118, 117122, 117124, 117136, 117150, 117152, 117180, 117190, 117196, 117208, 117230, 117234, 117236, 117304, 117360, 117374, 117472, 117500, 117506, 117508, 117512, 117520, 117536, 117564, 117568, 117624, 117638, 117644, 117656, 117680, 117694, 117710, 117724, 117730, 117732, 117736, 117750, 117782, 117798, 117804, 117818, 117830, 117848, 117874, 117876, 117894, 117936, 117950, 117966, 117986, 117988, 117992, 118022, 118028, 118040, 118064, 118078, 118112, 118140, 118172, 118210, 118212, 118216, 118224, 118238, 118246, 118266, 118306, 118312, 118338, 118352, 118366, 118374, 118394, 118402, 118404, 118408, 118416, 118430, 118432, 118460, 118476, 118514, 118516, 118574, 118578, 118580, 118606, 118620, 118626, 118628, 118632, 118678, 118694, 118700, 118730, 118738, 118740, 118830, 118834, 118836, 118862, 118876, 118882, 118884, 118888, 118902, 118926, 118940, 118968, 118978, 118980, 118984, 118992, 119006, 119014, 119020, 119034, 119068, 119096, 119152, 119166, 119170, 119172, 119176, 119184, 119198, 119200, 119228, 119238, 119244, 119256, 119278, 119282, 119284, 119324, 119352, 119408, 119422, 119520, 119548, 119554, 119556, 119560, 119568, 119582, 119584, 119612, 119616, 119672, 119686, 119692, 119704, 119728, 119742, 119758, 119772, 119778, 119780, 119784, 119798, 119920, 119934, 120032, 120060, 120256, 120312, 120324, 120328, 120336, 120352, 120384, 120440, 120560, 120582, 120588, 120600, 120624, 120638, 120672, 120700, 120718, 120732, 120760, 120770, 120772, 120776, 120784, 120798, 120806, 120812, 120870, 120876, 120890, 120902, 120908, 120920, 120946, 120948, 120966, 120972, 120984, 121008, 121022, 121038, 121058, 121060, 121064, 121078, 121100, 121112, 121136, 121150, 121184, 121212, 121244, 121282, 121284, 121288, 121296, 121318, 121338, 121356, 121368, 121392, 121406, 121440, 121468, 121536, 121592, 121656, 121730, 121732, 121736, 121744, 121758, 121760, 121804, 121842, 121844, 121890, 121922, 121924, 121928, 121936, 121950, 121958, 121978, 121986, 121988, 121992, 122e3, 122014, 122016, 122044, 122060, 122098, 122100, 122116, 122120, 122128, 122142, 122144, 122172, 122176, 122232, 122246, 122264, 122318, 122338, 122340, 122344, 122414, 122418, 122420, 122446, 122460, 122466, 122468, 122472, 122510, 122524, 122552, 122562, 122564, 122568, 122576, 122598, 122618, 122646, 122662, 122668, 122694, 122700, 122712, 122738, 122740, 122762, 122770, 122772, 122786, 122788, 122792, 123018, 123026, 123028, 123042, 123044, 123048, 123062, 123098, 123146, 123154, 123156, 123170, 123172, 123176, 123190, 123202, 123204, 123208, 123216, 123238, 123244, 123258, 123290, 123314, 123316, 123402, 123410, 123412, 123426, 123428, 123432, 123446, 123458, 123464, 123472, 123486, 123494, 123500, 123514, 123522, 123524, 123528, 123536, 123552, 123580, 123590, 123596, 123608, 123630, 123634, 123636, 123674, 123698, 123700, 123740, 123746, 123748, 123752, 123834, 123914, 123922, 123924, 123938, 123944, 123958, 123970, 123976, 123984, 123998, 124006, 124012, 124026, 124034, 124036, 124048, 124062, 124064, 124092, 124102, 124108, 124120, 124142, 124146, 124148, 124162, 124164, 124168, 124176, 124190, 124192, 124220, 124224, 124280, 124294, 124300, 124312, 124336, 124350, 124366, 124380, 124386, 124388, 124392, 124406, 124442, 124462, 124466, 124468, 124494, 124508, 124514, 124520, 124558, 124572, 124600, 124610, 124612, 124616, 124624, 124646, 124666, 124694, 124710, 124716, 124730, 124742, 124748, 124760, 124786, 124788, 124818, 124820, 124834, 124836, 124840, 124854, 124946, 124948, 124962, 124964, 124968, 124982, 124994, 124996, 125e3, 125008, 125022, 125030, 125036, 125050, 125058, 125060, 125064, 125072, 125086, 125088, 125116, 125126, 125132, 125144, 125166, 125170, 125172, 125186, 125188, 125192, 125200, 125216, 125244, 125248, 125304, 125318, 125324, 125336, 125360, 125374, 125390, 125404, 125410, 125412, 125416, 125430, 125444, 125448, 125456, 125472, 125504, 125560, 125680, 125702, 125708, 125720, 125744, 125758, 125792, 125820, 125838, 125852, 125880, 125890, 125892, 125896, 125904, 125918, 125926, 125932, 125978, 125998, 126002, 126004, 126030, 126044, 126050, 126052, 126056, 126094, 126108, 126136, 126146, 126148, 126152, 126160, 126182, 126202, 126222, 126236, 126264, 126320, 126334, 126338, 126340, 126344, 126352, 126366, 126368, 126412, 126450, 126452, 126486, 126502, 126508, 126522, 126534, 126540, 126552, 126574, 126578, 126580, 126598, 126604, 126616, 126640, 126654, 126670, 126684, 126690, 126692, 126696, 126738, 126754, 126756, 126760, 126774, 126786, 126788, 126792, 126800, 126814, 126822, 126828, 126842, 126894, 126898, 126900, 126934, 127126, 127142, 127148, 127162, 127178, 127186, 127188, 127254, 127270, 127276, 127290, 127302, 127308, 127320, 127342, 127346, 127348, 127370, 127378, 127380, 127394, 127396, 127400, 127450, 127510, 127526, 127532, 127546, 127558, 127576, 127598, 127602, 127604, 127622, 127628, 127640, 127664, 127678, 127694, 127708, 127714, 127716, 127720, 127734, 127754, 127762, 127764, 127778, 127784, 127810, 127812, 127816, 127824, 127838, 127846, 127866, 127898, 127918, 127922, 127924, 128022, 128038, 128044, 128058, 128070, 128076, 128088, 128110, 128114, 128116, 128134, 128140, 128152, 128176, 128190, 128206, 128220, 128226, 128228, 128232, 128246, 128262, 128268, 128280, 128304, 128318, 128352, 128380, 128398, 128412, 128440, 128450, 128452, 128456, 128464, 128478, 128486, 128492, 128506, 128522, 128530, 128532, 128546, 128548, 128552, 128566, 128578, 128580, 128584, 128592, 128606, 128614, 128634, 128642, 128644, 128648, 128656, 128670, 128672, 128700, 128716, 128754, 128756, 128794, 128814, 128818, 128820, 128846, 128860, 128866, 128868, 128872, 128886, 128918, 128934, 128940, 128954, 128978, 128980, 129178, 129198, 129202, 129204, 129238, 129258, 129306, 129326, 129330, 129332, 129358, 129372, 129378, 129380, 129384, 129398, 129430, 129446, 129452, 129466, 129482, 129490, 129492, 129562, 129582, 129586, 129588, 129614, 129628, 129634, 129636, 129640, 129654, 129678, 129692, 129720, 129730, 129732, 129736, 129744, 129758, 129766, 129772, 129814, 129830, 129836, 129850, 129862, 129868, 129880, 129902, 129906, 129908, 129930, 129938, 129940, 129954, 129956, 129960, 129974, 130010]),
    t.CODEWORD_TABLE = Int32Array.from([2627, 1819, 2622, 2621, 1813, 1812, 2729, 2724, 2723, 2779, 2774, 2773, 902, 896, 908, 868, 865, 861, 859, 2511, 873, 871, 1780, 835, 2493, 825, 2491, 842, 837, 844, 1764, 1762, 811, 810, 809, 2483, 807, 2482, 806, 2480, 815, 814, 813, 812, 2484, 817, 816, 1745, 1744, 1742, 1746, 2655, 2637, 2635, 2626, 2625, 2623, 2628, 1820, 2752, 2739, 2737, 2728, 2727, 2725, 2730, 2785, 2783, 2778, 2777, 2775, 2780, 787, 781, 747, 739, 736, 2413, 754, 752, 1719, 692, 689, 681, 2371, 678, 2369, 700, 697, 694, 703, 1688, 1686, 642, 638, 2343, 631, 2341, 627, 2338, 651, 646, 643, 2345, 654, 652, 1652, 1650, 1647, 1654, 601, 599, 2322, 596, 2321, 594, 2319, 2317, 611, 610, 608, 606, 2324, 603, 2323, 615, 614, 612, 1617, 1616, 1614, 1612, 616, 1619, 1618, 2575, 2538, 2536, 905, 901, 898, 909, 2509, 2507, 2504, 870, 867, 864, 860, 2512, 875, 872, 1781, 2490, 2489, 2487, 2485, 1748, 836, 834, 832, 830, 2494, 827, 2492, 843, 841, 839, 845, 1765, 1763, 2701, 2676, 2674, 2653, 2648, 2656, 2634, 2633, 2631, 2629, 1821, 2638, 2636, 2770, 2763, 2761, 2750, 2745, 2753, 2736, 2735, 2733, 2731, 1848, 2740, 2738, 2786, 2784, 591, 588, 576, 569, 566, 2296, 1590, 537, 534, 526, 2276, 522, 2274, 545, 542, 539, 548, 1572, 1570, 481, 2245, 466, 2242, 462, 2239, 492, 485, 482, 2249, 496, 494, 1534, 1531, 1528, 1538, 413, 2196, 406, 2191, 2188, 425, 419, 2202, 415, 2199, 432, 430, 427, 1472, 1467, 1464, 433, 1476, 1474, 368, 367, 2160, 365, 2159, 362, 2157, 2155, 2152, 378, 377, 375, 2166, 372, 2165, 369, 2162, 383, 381, 379, 2168, 1419, 1418, 1416, 1414, 385, 1411, 384, 1423, 1422, 1420, 1424, 2461, 802, 2441, 2439, 790, 786, 783, 794, 2409, 2406, 2403, 750, 742, 738, 2414, 756, 753, 1720, 2367, 2365, 2362, 2359, 1663, 693, 691, 684, 2373, 680, 2370, 702, 699, 696, 704, 1690, 1687, 2337, 2336, 2334, 2332, 1624, 2329, 1622, 640, 637, 2344, 634, 2342, 630, 2340, 650, 648, 645, 2346, 655, 653, 1653, 1651, 1649, 1655, 2612, 2597, 2595, 2571, 2568, 2565, 2576, 2534, 2529, 2526, 1787, 2540, 2537, 907, 904, 900, 910, 2503, 2502, 2500, 2498, 1768, 2495, 1767, 2510, 2508, 2506, 869, 866, 863, 2513, 876, 874, 1782, 2720, 2713, 2711, 2697, 2694, 2691, 2702, 2672, 2670, 2664, 1828, 2678, 2675, 2647, 2646, 2644, 2642, 1823, 2639, 1822, 2654, 2652, 2650, 2657, 2771, 1855, 2765, 2762, 1850, 1849, 2751, 2749, 2747, 2754, 353, 2148, 344, 342, 336, 2142, 332, 2140, 345, 1375, 1373, 306, 2130, 299, 2128, 295, 2125, 319, 314, 311, 2132, 1354, 1352, 1349, 1356, 262, 257, 2101, 253, 2096, 2093, 274, 273, 267, 2107, 263, 2104, 280, 278, 275, 1316, 1311, 1308, 1320, 1318, 2052, 202, 2050, 2044, 2040, 219, 2063, 212, 2060, 208, 2055, 224, 221, 2066, 1260, 1258, 1252, 231, 1248, 229, 1266, 1264, 1261, 1268, 155, 1998, 153, 1996, 1994, 1991, 1988, 165, 164, 2007, 162, 2006, 159, 2003, 2e3, 172, 171, 169, 2012, 166, 2010, 1186, 1184, 1182, 1179, 175, 1176, 173, 1192, 1191, 1189, 1187, 176, 1194, 1193, 2313, 2307, 2305, 592, 589, 2294, 2292, 2289, 578, 572, 568, 2297, 580, 1591, 2272, 2267, 2264, 1547, 538, 536, 529, 2278, 525, 2275, 547, 544, 541, 1574, 1571, 2237, 2235, 2229, 1493, 2225, 1489, 478, 2247, 470, 2244, 465, 2241, 493, 488, 484, 2250, 498, 495, 1536, 1533, 1530, 1539, 2187, 2186, 2184, 2182, 1432, 2179, 1430, 2176, 1427, 414, 412, 2197, 409, 2195, 405, 2193, 2190, 426, 424, 421, 2203, 418, 2201, 431, 429, 1473, 1471, 1469, 1466, 434, 1477, 1475, 2478, 2472, 2470, 2459, 2457, 2454, 2462, 803, 2437, 2432, 2429, 1726, 2443, 2440, 792, 789, 785, 2401, 2399, 2393, 1702, 2389, 1699, 2411, 2408, 2405, 745, 741, 2415, 758, 755, 1721, 2358, 2357, 2355, 2353, 1661, 2350, 1660, 2347, 1657, 2368, 2366, 2364, 2361, 1666, 690, 687, 2374, 683, 2372, 701, 698, 705, 1691, 1689, 2619, 2617, 2610, 2608, 2605, 2613, 2593, 2588, 2585, 1803, 2599, 2596, 2563, 2561, 2555, 1797, 2551, 1795, 2573, 2570, 2567, 2577, 2525, 2524, 2522, 2520, 1786, 2517, 1785, 2514, 1783, 2535, 2533, 2531, 2528, 1788, 2541, 2539, 906, 903, 911, 2721, 1844, 2715, 2712, 1838, 1836, 2699, 2696, 2693, 2703, 1827, 1826, 1824, 2673, 2671, 2669, 2666, 1829, 2679, 2677, 1858, 1857, 2772, 1854, 1853, 1851, 1856, 2766, 2764, 143, 1987, 139, 1986, 135, 133, 131, 1984, 128, 1983, 125, 1981, 138, 137, 136, 1985, 1133, 1132, 1130, 112, 110, 1974, 107, 1973, 104, 1971, 1969, 122, 121, 119, 117, 1977, 114, 1976, 124, 1115, 1114, 1112, 1110, 1117, 1116, 84, 83, 1953, 81, 1952, 78, 1950, 1948, 1945, 94, 93, 91, 1959, 88, 1958, 85, 1955, 99, 97, 95, 1961, 1086, 1085, 1083, 1081, 1078, 100, 1090, 1089, 1087, 1091, 49, 47, 1917, 44, 1915, 1913, 1910, 1907, 59, 1926, 56, 1925, 53, 1922, 1919, 66, 64, 1931, 61, 1929, 1042, 1040, 1038, 71, 1035, 70, 1032, 68, 1048, 1047, 1045, 1043, 1050, 1049, 12, 10, 1869, 1867, 1864, 1861, 21, 1880, 19, 1877, 1874, 1871, 28, 1888, 25, 1886, 22, 1883, 982, 980, 977, 974, 32, 30, 991, 989, 987, 984, 34, 995, 994, 992, 2151, 2150, 2147, 2146, 2144, 356, 355, 354, 2149, 2139, 2138, 2136, 2134, 1359, 343, 341, 338, 2143, 335, 2141, 348, 347, 346, 1376, 1374, 2124, 2123, 2121, 2119, 1326, 2116, 1324, 310, 308, 305, 2131, 302, 2129, 298, 2127, 320, 318, 316, 313, 2133, 322, 321, 1355, 1353, 1351, 1357, 2092, 2091, 2089, 2087, 1276, 2084, 1274, 2081, 1271, 259, 2102, 256, 2100, 252, 2098, 2095, 272, 269, 2108, 266, 2106, 281, 279, 277, 1317, 1315, 1313, 1310, 282, 1321, 1319, 2039, 2037, 2035, 2032, 1203, 2029, 1200, 1197, 207, 2053, 205, 2051, 201, 2049, 2046, 2043, 220, 218, 2064, 215, 2062, 211, 2059, 228, 226, 223, 2069, 1259, 1257, 1254, 232, 1251, 230, 1267, 1265, 1263, 2316, 2315, 2312, 2311, 2309, 2314, 2304, 2303, 2301, 2299, 1593, 2308, 2306, 590, 2288, 2287, 2285, 2283, 1578, 2280, 1577, 2295, 2293, 2291, 579, 577, 574, 571, 2298, 582, 581, 1592, 2263, 2262, 2260, 2258, 1545, 2255, 1544, 2252, 1541, 2273, 2271, 2269, 2266, 1550, 535, 532, 2279, 528, 2277, 546, 543, 549, 1575, 1573, 2224, 2222, 2220, 1486, 2217, 1485, 2214, 1482, 1479, 2238, 2236, 2234, 2231, 1496, 2228, 1492, 480, 477, 2248, 473, 2246, 469, 2243, 490, 487, 2251, 497, 1537, 1535, 1532, 2477, 2476, 2474, 2479, 2469, 2468, 2466, 2464, 1730, 2473, 2471, 2453, 2452, 2450, 2448, 1729, 2445, 1728, 2460, 2458, 2456, 2463, 805, 804, 2428, 2427, 2425, 2423, 1725, 2420, 1724, 2417, 1722, 2438, 2436, 2434, 2431, 1727, 2444, 2442, 793, 791, 788, 795, 2388, 2386, 2384, 1697, 2381, 1696, 2378, 1694, 1692, 2402, 2400, 2398, 2395, 1703, 2392, 1701, 2412, 2410, 2407, 751, 748, 744, 2416, 759, 757, 1807, 2620, 2618, 1806, 1805, 2611, 2609, 2607, 2614, 1802, 1801, 1799, 2594, 2592, 2590, 2587, 1804, 2600, 2598, 1794, 1793, 1791, 1789, 2564, 2562, 2560, 2557, 1798, 2554, 1796, 2574, 2572, 2569, 2578, 1847, 1846, 2722, 1843, 1842, 1840, 1845, 2716, 2714, 1835, 1834, 1832, 1830, 1839, 1837, 2700, 2698, 2695, 2704, 1817, 1811, 1810, 897, 862, 1777, 829, 826, 838, 1760, 1758, 808, 2481, 1741, 1740, 1738, 1743, 2624, 1818, 2726, 2776, 782, 740, 737, 1715, 686, 679, 695, 1682, 1680, 639, 628, 2339, 647, 644, 1645, 1643, 1640, 1648, 602, 600, 597, 595, 2320, 593, 2318, 609, 607, 604, 1611, 1610, 1608, 1606, 613, 1615, 1613, 2328, 926, 924, 892, 886, 899, 857, 850, 2505, 1778, 824, 823, 821, 819, 2488, 818, 2486, 833, 831, 828, 840, 1761, 1759, 2649, 2632, 2630, 2746, 2734, 2732, 2782, 2781, 570, 567, 1587, 531, 527, 523, 540, 1566, 1564, 476, 467, 463, 2240, 486, 483, 1524, 1521, 1518, 1529, 411, 403, 2192, 399, 2189, 423, 416, 1462, 1457, 1454, 428, 1468, 1465, 2210, 366, 363, 2158, 360, 2156, 357, 2153, 376, 373, 370, 2163, 1410, 1409, 1407, 1405, 382, 1402, 380, 1417, 1415, 1412, 1421, 2175, 2174, 777, 774, 771, 784, 732, 725, 722, 2404, 743, 1716, 676, 674, 668, 2363, 665, 2360, 685, 1684, 1681, 626, 624, 622, 2335, 620, 2333, 617, 2330, 641, 635, 649, 1646, 1644, 1642, 2566, 928, 925, 2530, 2527, 894, 891, 888, 2501, 2499, 2496, 858, 856, 854, 851, 1779, 2692, 2668, 2665, 2645, 2643, 2640, 2651, 2768, 2759, 2757, 2744, 2743, 2741, 2748, 352, 1382, 340, 337, 333, 1371, 1369, 307, 300, 296, 2126, 315, 312, 1347, 1342, 1350, 261, 258, 250, 2097, 246, 2094, 271, 268, 264, 1306, 1301, 1298, 276, 1312, 1309, 2115, 203, 2048, 195, 2045, 191, 2041, 213, 209, 2056, 1246, 1244, 1238, 225, 1234, 222, 1256, 1253, 1249, 1262, 2080, 2079, 154, 1997, 150, 1995, 147, 1992, 1989, 163, 160, 2004, 156, 2001, 1175, 1174, 1172, 1170, 1167, 170, 1164, 167, 1185, 1183, 1180, 1177, 174, 1190, 1188, 2025, 2024, 2022, 587, 586, 564, 559, 556, 2290, 573, 1588, 520, 518, 512, 2268, 508, 2265, 530, 1568, 1565, 461, 457, 2233, 450, 2230, 446, 2226, 479, 471, 489, 1526, 1523, 1520, 397, 395, 2185, 392, 2183, 389, 2180, 2177, 410, 2194, 402, 422, 1463, 1461, 1459, 1456, 1470, 2455, 799, 2433, 2430, 779, 776, 773, 2397, 2394, 2390, 734, 728, 724, 746, 1717, 2356, 2354, 2351, 2348, 1658, 677, 675, 673, 670, 667, 688, 1685, 1683, 2606, 2589, 2586, 2559, 2556, 2552, 927, 2523, 2521, 2518, 2515, 1784, 2532, 895, 893, 890, 2718, 2709, 2707, 2689, 2687, 2684, 2663, 2662, 2660, 2658, 1825, 2667, 2769, 1852, 2760, 2758, 142, 141, 1139, 1138, 134, 132, 129, 126, 1982, 1129, 1128, 1126, 1131, 113, 111, 108, 105, 1972, 101, 1970, 120, 118, 115, 1109, 1108, 1106, 1104, 123, 1113, 1111, 82, 79, 1951, 75, 1949, 72, 1946, 92, 89, 86, 1956, 1077, 1076, 1074, 1072, 98, 1069, 96, 1084, 1082, 1079, 1088, 1968, 1967, 48, 45, 1916, 42, 1914, 39, 1911, 1908, 60, 57, 54, 1923, 50, 1920, 1031, 1030, 1028, 1026, 67, 1023, 65, 1020, 62, 1041, 1039, 1036, 1033, 69, 1046, 1044, 1944, 1943, 1941, 11, 9, 1868, 7, 1865, 1862, 1859, 20, 1878, 16, 1875, 13, 1872, 970, 968, 966, 963, 29, 960, 26, 23, 983, 981, 978, 975, 33, 971, 31, 990, 988, 985, 1906, 1904, 1902, 993, 351, 2145, 1383, 331, 330, 328, 326, 2137, 323, 2135, 339, 1372, 1370, 294, 293, 291, 289, 2122, 286, 2120, 283, 2117, 309, 303, 317, 1348, 1346, 1344, 245, 244, 242, 2090, 239, 2088, 236, 2085, 2082, 260, 2099, 249, 270, 1307, 1305, 1303, 1300, 1314, 189, 2038, 186, 2036, 183, 2033, 2030, 2026, 206, 198, 2047, 194, 216, 1247, 1245, 1243, 1240, 227, 1237, 1255, 2310, 2302, 2300, 2286, 2284, 2281, 565, 563, 561, 558, 575, 1589, 2261, 2259, 2256, 2253, 1542, 521, 519, 517, 514, 2270, 511, 533, 1569, 1567, 2223, 2221, 2218, 2215, 1483, 2211, 1480, 459, 456, 453, 2232, 449, 474, 491, 1527, 1525, 1522, 2475, 2467, 2465, 2451, 2449, 2446, 801, 800, 2426, 2424, 2421, 2418, 1723, 2435, 780, 778, 775, 2387, 2385, 2382, 2379, 1695, 2375, 1693, 2396, 735, 733, 730, 727, 749, 1718, 2616, 2615, 2604, 2603, 2601, 2584, 2583, 2581, 2579, 1800, 2591, 2550, 2549, 2547, 2545, 1792, 2542, 1790, 2558, 929, 2719, 1841, 2710, 2708, 1833, 1831, 2690, 2688, 2686, 1815, 1809, 1808, 1774, 1756, 1754, 1737, 1736, 1734, 1739, 1816, 1711, 1676, 1674, 633, 629, 1638, 1636, 1633, 1641, 598, 1605, 1604, 1602, 1600, 605, 1609, 1607, 2327, 887, 853, 1775, 822, 820, 1757, 1755, 1584, 524, 1560, 1558, 468, 464, 1514, 1511, 1508, 1519, 408, 404, 400, 1452, 1447, 1444, 417, 1458, 1455, 2208, 364, 361, 358, 2154, 1401, 1400, 1398, 1396, 374, 1393, 371, 1408, 1406, 1403, 1413, 2173, 2172, 772, 726, 723, 1712, 672, 669, 666, 682, 1678, 1675, 625, 623, 621, 618, 2331, 636, 632, 1639, 1637, 1635, 920, 918, 884, 880, 889, 849, 848, 847, 846, 2497, 855, 852, 1776, 2641, 2742, 2787, 1380, 334, 1367, 1365, 301, 297, 1340, 1338, 1335, 1343, 255, 251, 247, 1296, 1291, 1288, 265, 1302, 1299, 2113, 204, 196, 192, 2042, 1232, 1230, 1224, 214, 1220, 210, 1242, 1239, 1235, 1250, 2077, 2075, 151, 148, 1993, 144, 1990, 1163, 1162, 1160, 1158, 1155, 161, 1152, 157, 1173, 1171, 1168, 1165, 168, 1181, 1178, 2021, 2020, 2018, 2023, 585, 560, 557, 1585, 516, 509, 1562, 1559, 458, 447, 2227, 472, 1516, 1513, 1510, 398, 396, 393, 390, 2181, 386, 2178, 407, 1453, 1451, 1449, 1446, 420, 1460, 2209, 769, 764, 720, 712, 2391, 729, 1713, 664, 663, 661, 659, 2352, 656, 2349, 671, 1679, 1677, 2553, 922, 919, 2519, 2516, 885, 883, 881, 2685, 2661, 2659, 2767, 2756, 2755, 140, 1137, 1136, 130, 127, 1125, 1124, 1122, 1127, 109, 106, 102, 1103, 1102, 1100, 1098, 116, 1107, 1105, 1980, 80, 76, 73, 1947, 1068, 1067, 1065, 1063, 90, 1060, 87, 1075, 1073, 1070, 1080, 1966, 1965, 46, 43, 40, 1912, 36, 1909, 1019, 1018, 1016, 1014, 58, 1011, 55, 1008, 51, 1029, 1027, 1024, 1021, 63, 1037, 1034, 1940, 1939, 1937, 1942, 8, 1866, 4, 1863, 1, 1860, 956, 954, 952, 949, 946, 17, 14, 969, 967, 964, 961, 27, 957, 24, 979, 976, 972, 1901, 1900, 1898, 1896, 986, 1905, 1903, 350, 349, 1381, 329, 327, 324, 1368, 1366, 292, 290, 287, 284, 2118, 304, 1341, 1339, 1337, 1345, 243, 240, 237, 2086, 233, 2083, 254, 1297, 1295, 1293, 1290, 1304, 2114, 190, 187, 184, 2034, 180, 2031, 177, 2027, 199, 1233, 1231, 1229, 1226, 217, 1223, 1241, 2078, 2076, 584, 555, 554, 552, 550, 2282, 562, 1586, 507, 506, 504, 502, 2257, 499, 2254, 515, 1563, 1561, 445, 443, 441, 2219, 438, 2216, 435, 2212, 460, 454, 475, 1517, 1515, 1512, 2447, 798, 797, 2422, 2419, 770, 768, 766, 2383, 2380, 2376, 721, 719, 717, 714, 731, 1714, 2602, 2582, 2580, 2548, 2546, 2543, 923, 921, 2717, 2706, 2705, 2683, 2682, 2680, 1771, 1752, 1750, 1733, 1732, 1731, 1735, 1814, 1707, 1670, 1668, 1631, 1629, 1626, 1634, 1599, 1598, 1596, 1594, 1603, 1601, 2326, 1772, 1753, 1751, 1581, 1554, 1552, 1504, 1501, 1498, 1509, 1442, 1437, 1434, 401, 1448, 1445, 2206, 1392, 1391, 1389, 1387, 1384, 359, 1399, 1397, 1394, 1404, 2171, 2170, 1708, 1672, 1669, 619, 1632, 1630, 1628, 1773, 1378, 1363, 1361, 1333, 1328, 1336, 1286, 1281, 1278, 248, 1292, 1289, 2111, 1218, 1216, 1210, 197, 1206, 193, 1228, 1225, 1221, 1236, 2073, 2071, 1151, 1150, 1148, 1146, 152, 1143, 149, 1140, 145, 1161, 1159, 1156, 1153, 158, 1169, 1166, 2017, 2016, 2014, 2019, 1582, 510, 1556, 1553, 452, 448, 1506, 1500, 394, 391, 387, 1443, 1441, 1439, 1436, 1450, 2207, 765, 716, 713, 1709, 662, 660, 657, 1673, 1671, 916, 914, 879, 878, 877, 882, 1135, 1134, 1121, 1120, 1118, 1123, 1097, 1096, 1094, 1092, 103, 1101, 1099, 1979, 1059, 1058, 1056, 1054, 77, 1051, 74, 1066, 1064, 1061, 1071, 1964, 1963, 1007, 1006, 1004, 1002, 999, 41, 996, 37, 1017, 1015, 1012, 1009, 52, 1025, 1022, 1936, 1935, 1933, 1938, 942, 940, 938, 935, 932, 5, 2, 955, 953, 950, 947, 18, 943, 15, 965, 962, 958, 1895, 1894, 1892, 1890, 973, 1899, 1897, 1379, 325, 1364, 1362, 288, 285, 1334, 1332, 1330, 241, 238, 234, 1287, 1285, 1283, 1280, 1294, 2112, 188, 185, 181, 178, 2028, 1219, 1217, 1215, 1212, 200, 1209, 1227, 2074, 2072, 583, 553, 551, 1583, 505, 503, 500, 513, 1557, 1555, 444, 442, 439, 436, 2213, 455, 451, 1507, 1505, 1502, 796, 763, 762, 760, 767, 711, 710, 708, 706, 2377, 718, 715, 1710, 2544, 917, 915, 2681, 1627, 1597, 1595, 2325, 1769, 1749, 1747, 1499, 1438, 1435, 2204, 1390, 1388, 1385, 1395, 2169, 2167, 1704, 1665, 1662, 1625, 1623, 1620, 1770, 1329, 1282, 1279, 2109, 1214, 1207, 1222, 2068, 2065, 1149, 1147, 1144, 1141, 146, 1157, 1154, 2013, 2011, 2008, 2015, 1579, 1549, 1546, 1495, 1487, 1433, 1431, 1428, 1425, 388, 1440, 2205, 1705, 658, 1667, 1664, 1119, 1095, 1093, 1978, 1057, 1055, 1052, 1062, 1962, 1960, 1005, 1003, 1e3, 997, 38, 1013, 1010, 1932, 1930, 1927, 1934, 941, 939, 936, 933, 6, 930, 3, 951, 948, 944, 1889, 1887, 1884, 1881, 959, 1893, 1891, 35, 1377, 1360, 1358, 1327, 1325, 1322, 1331, 1277, 1275, 1272, 1269, 235, 1284, 2110, 1205, 1204, 1201, 1198, 182, 1195, 179, 1213, 2070, 2067, 1580, 501, 1551, 1548, 440, 437, 1497, 1494, 1490, 1503, 761, 709, 707, 1706, 913, 912, 2198, 1386, 2164, 2161, 1621, 1766, 2103, 1208, 2058, 2054, 1145, 1142, 2005, 2002, 1999, 2009, 1488, 1429, 1426, 2200, 1698, 1659, 1656, 1975, 1053, 1957, 1954, 1001, 998, 1924, 1921, 1918, 1928, 937, 934, 931, 1879, 1876, 1873, 1870, 945, 1885, 1882, 1323, 1273, 1270, 2105, 1202, 1199, 1196, 1211, 2061, 2057, 1576, 1543, 1540, 1484, 1481, 1478, 1491, 1700]),
    t
}(), Xbe = function() {
    function t(e, r) {
        this.bits = e,
        this.points = r
    }
    return t.prototype.getBits = function() {
        return this.bits
    }
    ,
    t.prototype.getPoints = function() {
        return this.points
    }
    ,
    t
}(), Kbe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, qbe = function() {
    function t() {}
    return t.detectMultiple = function(e, r, n) {
        var i = e.getBlackMatrix()
          , o = t.detect(n, i);
        return o.length || (i = i.clone(),
        i.rotate180(),
        o = t.detect(n, i)),
        new Xbe(i,o)
    }
    ,
    t.detect = function(e, r) {
        for (var n, i, o = new Array, s = 0, a = 0, l = !1; s < r.getHeight(); ) {
            var c = t.findVertices(r, s, a);
            if (c[0] == null && c[3] == null) {
                if (!l)
                    break;
                l = !1,
                a = 0;
                try {
                    for (var u = (n = void 0,
                    Kbe(o)), f = u.next(); !f.done; f = u.next()) {
                        var d = f.value;
                        d[1] != null && (s = Math.trunc(Math.max(s, d[1].getY()))),
                        d[3] != null && (s = Math.max(s, Math.trunc(d[3].getY())))
                    }
                } catch (h) {
                    n = {
                        error: h
                    }
                } finally {
                    try {
                        f && !f.done && (i = u.return) && i.call(u)
                    } finally {
                        if (n)
                            throw n.error
                    }
                }
                s += t.ROW_STEP;
                continue
            }
            if (l = !0,
            o.push(c),
            !e)
                break;
            c[2] != null ? (a = Math.trunc(c[2].getX()),
            s = Math.trunc(c[2].getY())) : (a = Math.trunc(c[4].getX()),
            s = Math.trunc(c[4].getY()))
        }
        return o
    }
    ,
    t.findVertices = function(e, r, n) {
        var i = e.getHeight()
          , o = e.getWidth()
          , s = new Array(8);
        return t.copyToResult(s, t.findRowsWithPattern(e, i, o, r, n, t.START_PATTERN), t.INDEXES_START_PATTERN),
        s[4] != null && (n = Math.trunc(s[4].getX()),
        r = Math.trunc(s[4].getY())),
        t.copyToResult(s, t.findRowsWithPattern(e, i, o, r, n, t.STOP_PATTERN), t.INDEXES_STOP_PATTERN),
        s
    }
    ,
    t.copyToResult = function(e, r, n) {
        for (var i = 0; i < n.length; i++)
            e[n[i]] = r[i]
    }
    ,
    t.findRowsWithPattern = function(e, r, n, i, o, s) {
        for (var a = new Array(4), l = !1, c = new Int32Array(s.length); i < r; i += t.ROW_STEP) {
            var u = t.findGuardPattern(e, o, i, n, !1, s, c);
            if (u != null) {
                for (; i > 0; ) {
                    var f = t.findGuardPattern(e, o, --i, n, !1, s, c);
                    if (f != null)
                        u = f;
                    else {
                        i++;
                        break
                    }
                }
                a[0] = new Te(u[0],i),
                a[1] = new Te(u[1],i),
                l = !0;
                break
            }
        }
        var d = i + 1;
        if (l) {
            for (var h = 0, f = Int32Array.from([Math.trunc(a[0].getX()), Math.trunc(a[1].getX())]); d < r; d++) {
                var u = t.findGuardPattern(e, f[0], d, n, !1, s, c);
                if (u != null && Math.abs(f[0] - u[0]) < t.MAX_PATTERN_DRIFT && Math.abs(f[1] - u[1]) < t.MAX_PATTERN_DRIFT)
                    f = u,
                    h = 0;
                else {
                    if (h > t.SKIPPED_ROW_COUNT_MAX)
                        break;
                    h++
                }
            }
            d -= h + 1,
            a[2] = new Te(f[0],d),
            a[3] = new Te(f[1],d)
        }
        return d - i < t.BARCODE_MIN_HEIGHT && br.fill(a, null),
        a
    }
    ,
    t.findGuardPattern = function(e, r, n, i, o, s, a) {
        br.fillWithin(a, 0, a.length, 0);
        for (var l = r, c = 0; e.get(l, n) && l > 0 && c++ < t.MAX_PIXEL_DRIFT; )
            l--;
        for (var u = l, f = 0, d = s.length, h = o; u < i; u++) {
            var x = e.get(u, n);
            if (x !== h)
                a[f]++;
            else {
                if (f === d - 1) {
                    if (t.patternMatchVariance(a, s, t.MAX_INDIVIDUAL_VARIANCE) < t.MAX_AVG_VARIANCE)
                        return new Int32Array([l, u]);
                    l += a[0] + a[1],
                    Dt.arraycopy(a, 2, a, 0, f - 1),
                    a[f - 1] = 0,
                    a[f] = 0,
                    f--
                } else
                    f++;
                a[f] = 1,
                h = !h
            }
        }
        return f === d - 1 && t.patternMatchVariance(a, s, t.MAX_INDIVIDUAL_VARIANCE) < t.MAX_AVG_VARIANCE ? new Int32Array([l, u - 1]) : null
    }
    ,
    t.patternMatchVariance = function(e, r, n) {
        for (var i = e.length, o = 0, s = 0, a = 0; a < i; a++)
            o += e[a],
            s += r[a];
        if (o < s)
            return 1 / 0;
        var l = o / s;
        n *= l;
        for (var c = 0, u = 0; u < i; u++) {
            var f = e[u]
              , d = r[u] * l
              , h = f > d ? f - d : d - f;
            if (h > n)
                return 1 / 0;
            c += h
        }
        return c / o
    }
    ,
    t.INDEXES_START_PATTERN = Int32Array.from([0, 4, 1, 5]),
    t.INDEXES_STOP_PATTERN = Int32Array.from([6, 2, 7, 3]),
    t.MAX_AVG_VARIANCE = .42,
    t.MAX_INDIVIDUAL_VARIANCE = .8,
    t.START_PATTERN = Int32Array.from([8, 1, 1, 1, 1, 1, 1, 3]),
    t.STOP_PATTERN = Int32Array.from([7, 1, 1, 3, 1, 1, 1, 2, 1]),
    t.MAX_PIXEL_DRIFT = 3,
    t.MAX_PATTERN_DRIFT = 5,
    t.SKIPPED_ROW_COUNT_MAX = 25,
    t.ROW_STEP = 5,
    t.BARCODE_MIN_HEIGHT = 10,
    t
}(), Zbe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, Qa = function() {
    function t(e, r) {
        if (r.length === 0)
            throw new Me;
        this.field = e;
        var n = r.length;
        if (n > 1 && r[0] === 0) {
            for (var i = 1; i < n && r[i] === 0; )
                i++;
            i === n ? this.coefficients = new Int32Array([0]) : (this.coefficients = new Int32Array(n - i),
            Dt.arraycopy(r, i, this.coefficients, 0, this.coefficients.length))
        } else
            this.coefficients = r
    }
    return t.prototype.getCoefficients = function() {
        return this.coefficients
    }
    ,
    t.prototype.getDegree = function() {
        return this.coefficients.length - 1
    }
    ,
    t.prototype.isZero = function() {
        return this.coefficients[0] === 0
    }
    ,
    t.prototype.getCoefficient = function(e) {
        return this.coefficients[this.coefficients.length - 1 - e]
    }
    ,
    t.prototype.evaluateAt = function(e) {
        var r, n;
        if (e === 0)
            return this.getCoefficient(0);
        if (e === 1) {
            var i = 0;
            try {
                for (var o = Zbe(this.coefficients), s = o.next(); !s.done; s = o.next()) {
                    var a = s.value;
                    i = this.field.add(i, a)
                }
            } catch (f) {
                r = {
                    error: f
                }
            } finally {
                try {
                    s && !s.done && (n = o.return) && n.call(o)
                } finally {
                    if (r)
                        throw r.error
                }
            }
            return i
        }
        for (var l = this.coefficients[0], c = this.coefficients.length, u = 1; u < c; u++)
            l = this.field.add(this.field.multiply(e, l), this.coefficients[u]);
        return l
    }
    ,
    t.prototype.add = function(e) {
        if (!this.field.equals(e.field))
            throw new Me("ModulusPolys do not have same ModulusGF field");
        if (this.isZero())
            return e;
        if (e.isZero())
            return this;
        var r = this.coefficients
          , n = e.coefficients;
        if (r.length > n.length) {
            var i = r;
            r = n,
            n = i
        }
        var o = new Int32Array(n.length)
          , s = n.length - r.length;
        Dt.arraycopy(n, 0, o, 0, s);
        for (var a = s; a < n.length; a++)
            o[a] = this.field.add(r[a - s], n[a]);
        return new t(this.field,o)
    }
    ,
    t.prototype.subtract = function(e) {
        if (!this.field.equals(e.field))
            throw new Me("ModulusPolys do not have same ModulusGF field");
        return e.isZero() ? this : this.add(e.negative())
    }
    ,
    t.prototype.multiply = function(e) {
        return e instanceof t ? this.multiplyOther(e) : this.multiplyScalar(e)
    }
    ,
    t.prototype.multiplyOther = function(e) {
        if (!this.field.equals(e.field))
            throw new Me("ModulusPolys do not have same ModulusGF field");
        if (this.isZero() || e.isZero())
            return new t(this.field,new Int32Array([0]));
        for (var r = this.coefficients, n = r.length, i = e.coefficients, o = i.length, s = new Int32Array(n + o - 1), a = 0; a < n; a++)
            for (var l = r[a], c = 0; c < o; c++)
                s[a + c] = this.field.add(s[a + c], this.field.multiply(l, i[c]));
        return new t(this.field,s)
    }
    ,
    t.prototype.negative = function() {
        for (var e = this.coefficients.length, r = new Int32Array(e), n = 0; n < e; n++)
            r[n] = this.field.subtract(0, this.coefficients[n]);
        return new t(this.field,r)
    }
    ,
    t.prototype.multiplyScalar = function(e) {
        if (e === 0)
            return new t(this.field,new Int32Array([0]));
        if (e === 1)
            return this;
        for (var r = this.coefficients.length, n = new Int32Array(r), i = 0; i < r; i++)
            n[i] = this.field.multiply(this.coefficients[i], e);
        return new t(this.field,n)
    }
    ,
    t.prototype.multiplyByMonomial = function(e, r) {
        if (e < 0)
            throw new Me;
        if (r === 0)
            return new t(this.field,new Int32Array([0]));
        for (var n = this.coefficients.length, i = new Int32Array(n + e), o = 0; o < n; o++)
            i[o] = this.field.multiply(this.coefficients[o], r);
        return new t(this.field,i)
    }
    ,
    t.prototype.toString = function() {
        for (var e = new Ke, r = this.getDegree(); r >= 0; r--) {
            var n = this.getCoefficient(r);
            n !== 0 && (n < 0 ? (e.append(" - "),
            n = -n) : e.length() > 0 && e.append(" + "),
            (r === 0 || n !== 1) && e.append(n),
            r !== 0 && (r === 1 ? e.append("x") : (e.append("x^"),
            e.append(r))))
        }
        return e.toString()
    }
    ,
    t
}(), Jbe = function() {
    function t() {}
    return t.prototype.add = function(e, r) {
        return (e + r) % this.modulus
    }
    ,
    t.prototype.subtract = function(e, r) {
        return (this.modulus + e - r) % this.modulus
    }
    ,
    t.prototype.exp = function(e) {
        return this.expTable[e]
    }
    ,
    t.prototype.log = function(e) {
        if (e === 0)
            throw new Me;
        return this.logTable[e]
    }
    ,
    t.prototype.inverse = function(e) {
        if (e === 0)
            throw new lM;
        return this.expTable[this.modulus - this.logTable[e] - 1]
    }
    ,
    t.prototype.multiply = function(e, r) {
        return e === 0 || r === 0 ? 0 : this.expTable[(this.logTable[e] + this.logTable[r]) % (this.modulus - 1)]
    }
    ,
    t.prototype.getSize = function() {
        return this.modulus
    }
    ,
    t.prototype.equals = function(e) {
        return e === this
    }
    ,
    t
}(), Qbe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), eCe = function(t) {
    Qbe(e, t);
    function e(r, n) {
        var i = t.call(this) || this;
        i.modulus = r,
        i.expTable = new Int32Array(r),
        i.logTable = new Int32Array(r);
        for (var o = 1, s = 0; s < r; s++)
            i.expTable[s] = o,
            o = o * n % r;
        for (var s = 0; s < r - 1; s++)
            i.logTable[i.expTable[s]] = s;
        return i.zero = new Qa(i,new Int32Array([0])),
        i.one = new Qa(i,new Int32Array([1])),
        i
    }
    return e.prototype.getZero = function() {
        return this.zero
    }
    ,
    e.prototype.getOne = function() {
        return this.one
    }
    ,
    e.prototype.buildMonomial = function(r, n) {
        if (r < 0)
            throw new Me;
        if (n === 0)
            return this.zero;
        var i = new Int32Array(r + 1);
        return i[0] = n,
        new Qa(this,i)
    }
    ,
    e.PDF417_GF = new e(at.NUMBER_OF_CODEWORDS,3),
    e
}(Jbe), tCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, rCe = function() {
    function t() {
        this.field = eCe.PDF417_GF
    }
    return t.prototype.decode = function(e, r, n) {
        for (var i, o, s = new Qa(this.field,e), a = new Int32Array(r), l = !1, c = r; c > 0; c--) {
            var u = s.evaluateAt(this.field.exp(c));
            a[r - c] = u,
            u !== 0 && (l = !0)
        }
        if (!l)
            return 0;
        var f = this.field.getOne();
        if (n != null)
            try {
                for (var d = tCe(n), h = d.next(); !h.done; h = d.next()) {
                    var x = h.value
                      , y = this.field.exp(e.length - 1 - x)
                      , m = new Qa(this.field,new Int32Array([this.field.subtract(0, y), 1]));
                    f = f.multiply(m)
                }
            } catch (B) {
                i = {
                    error: B
                }
            } finally {
                try {
                    h && !h.done && (o = d.return) && o.call(d)
                } finally {
                    if (i)
                        throw i.error
                }
            }
        for (var E = new Qa(this.field,a), g = this.runEuclideanAlgorithm(this.field.buildMonomial(r, 1), E, r), p = g[0], v = g[1], _ = this.findErrorLocations(p), b = this.findErrorMagnitudes(v, p, _), c = 0; c < _.length; c++) {
            var C = e.length - 1 - this.field.log(_[c]);
            if (C < 0)
                throw fr.getChecksumInstance();
            e[C] = this.field.subtract(e[C], b[c])
        }
        return _.length
    }
    ,
    t.prototype.runEuclideanAlgorithm = function(e, r, n) {
        if (e.getDegree() < r.getDegree()) {
            var i = e;
            e = r,
            r = i
        }
        for (var o = e, s = r, a = this.field.getZero(), l = this.field.getOne(); s.getDegree() >= Math.round(n / 2); ) {
            var c = o
              , u = a;
            if (o = s,
            a = l,
            o.isZero())
                throw fr.getChecksumInstance();
            s = c;
            for (var f = this.field.getZero(), d = o.getCoefficient(o.getDegree()), h = this.field.inverse(d); s.getDegree() >= o.getDegree() && !s.isZero(); ) {
                var x = s.getDegree() - o.getDegree()
                  , y = this.field.multiply(s.getCoefficient(s.getDegree()), h);
                f = f.add(this.field.buildMonomial(x, y)),
                s = s.subtract(o.multiplyByMonomial(x, y))
            }
            l = f.multiply(a).subtract(u).negative()
        }
        var m = l.getCoefficient(0);
        if (m === 0)
            throw fr.getChecksumInstance();
        var E = this.field.inverse(m)
          , g = l.multiply(E)
          , p = s.multiply(E);
        return [g, p]
    }
    ,
    t.prototype.findErrorLocations = function(e) {
        for (var r = e.getDegree(), n = new Int32Array(r), i = 0, o = 1; o < this.field.getSize() && i < r; o++)
            e.evaluateAt(o) === 0 && (n[i] = this.field.inverse(o),
            i++);
        if (i !== r)
            throw fr.getChecksumInstance();
        return n
    }
    ,
    t.prototype.findErrorMagnitudes = function(e, r, n) {
        for (var i = r.getDegree(), o = new Int32Array(i), s = 1; s <= i; s++)
            o[i - s] = this.field.multiply(s, r.getCoefficient(s));
        for (var a = new Qa(this.field,o), l = n.length, c = new Int32Array(l), s = 0; s < l; s++) {
            var u = this.field.inverse(n[s])
              , f = this.field.subtract(0, e.evaluateAt(u))
              , d = this.field.inverse(a.evaluateAt(u));
            c[s] = this.field.multiply(f, d)
        }
        return c
    }
    ,
    t
}(), HE = function() {
    function t(e, r, n, i, o) {
        e instanceof t ? this.constructor_2(e) : this.constructor_1(e, r, n, i, o)
    }
    return t.prototype.constructor_1 = function(e, r, n, i, o) {
        var s = r == null || n == null
          , a = i == null || o == null;
        if (s && a)
            throw new le;
        s ? (r = new Te(0,i.getY()),
        n = new Te(0,o.getY())) : a && (i = new Te(e.getWidth() - 1,r.getY()),
        o = new Te(e.getWidth() - 1,n.getY())),
        this.image = e,
        this.topLeft = r,
        this.bottomLeft = n,
        this.topRight = i,
        this.bottomRight = o,
        this.minX = Math.trunc(Math.min(r.getX(), n.getX())),
        this.maxX = Math.trunc(Math.max(i.getX(), o.getX())),
        this.minY = Math.trunc(Math.min(r.getY(), i.getY())),
        this.maxY = Math.trunc(Math.max(n.getY(), o.getY()))
    }
    ,
    t.prototype.constructor_2 = function(e) {
        this.image = e.image,
        this.topLeft = e.getTopLeft(),
        this.bottomLeft = e.getBottomLeft(),
        this.topRight = e.getTopRight(),
        this.bottomRight = e.getBottomRight(),
        this.minX = e.getMinX(),
        this.maxX = e.getMaxX(),
        this.minY = e.getMinY(),
        this.maxY = e.getMaxY()
    }
    ,
    t.merge = function(e, r) {
        return e == null ? r : r == null ? e : new t(e.image,e.topLeft,e.bottomLeft,r.topRight,r.bottomRight)
    }
    ,
    t.prototype.addMissingRows = function(e, r, n) {
        var i = this.topLeft
          , o = this.bottomLeft
          , s = this.topRight
          , a = this.bottomRight;
        if (e > 0) {
            var l = n ? this.topLeft : this.topRight
              , c = Math.trunc(l.getY() - e);
            c < 0 && (c = 0);
            var u = new Te(l.getX(),c);
            n ? i = u : s = u
        }
        if (r > 0) {
            var f = n ? this.bottomLeft : this.bottomRight
              , d = Math.trunc(f.getY() + r);
            d >= this.image.getHeight() && (d = this.image.getHeight() - 1);
            var h = new Te(f.getX(),d);
            n ? o = h : a = h
        }
        return new t(this.image,i,o,s,a)
    }
    ,
    t.prototype.getMinX = function() {
        return this.minX
    }
    ,
    t.prototype.getMaxX = function() {
        return this.maxX
    }
    ,
    t.prototype.getMinY = function() {
        return this.minY
    }
    ,
    t.prototype.getMaxY = function() {
        return this.maxY
    }
    ,
    t.prototype.getTopLeft = function() {
        return this.topLeft
    }
    ,
    t.prototype.getTopRight = function() {
        return this.topRight
    }
    ,
    t.prototype.getBottomLeft = function() {
        return this.bottomLeft
    }
    ,
    t.prototype.getBottomRight = function() {
        return this.bottomRight
    }
    ,
    t
}(), nCe = function() {
    function t(e, r, n, i) {
        this.columnCount = e,
        this.errorCorrectionLevel = i,
        this.rowCountUpperPart = r,
        this.rowCountLowerPart = n,
        this.rowCount = r + n
    }
    return t.prototype.getColumnCount = function() {
        return this.columnCount
    }
    ,
    t.prototype.getErrorCorrectionLevel = function() {
        return this.errorCorrectionLevel
    }
    ,
    t.prototype.getRowCount = function() {
        return this.rowCount
    }
    ,
    t.prototype.getRowCountUpperPart = function() {
        return this.rowCountUpperPart
    }
    ,
    t.prototype.getRowCountLowerPart = function() {
        return this.rowCountLowerPart
    }
    ,
    t
}(), wC = function() {
    function t() {
        this.buffer = ""
    }
    return t.form = function(e, r) {
        var n = -1;
        function i(s, a, l, c, u, f) {
            if (s === "%%")
                return "%";
            if (r[++n] !== void 0) {
                s = c ? parseInt(c.substr(1)) : void 0;
                var d = u ? parseInt(u.substr(1)) : void 0, h;
                switch (f) {
                case "s":
                    h = r[n];
                    break;
                case "c":
                    h = r[n][0];
                    break;
                case "f":
                    h = parseFloat(r[n]).toFixed(s);
                    break;
                case "p":
                    h = parseFloat(r[n]).toPrecision(s);
                    break;
                case "e":
                    h = parseFloat(r[n]).toExponential(s);
                    break;
                case "x":
                    h = parseInt(r[n]).toString(d || 16);
                    break;
                case "d":
                    h = parseFloat(parseInt(r[n], d || 10).toPrecision(s)).toFixed(0);
                    break
                }
                h = typeof h == "object" ? JSON.stringify(h) : (+h).toString(d);
                for (var x = parseInt(l), y = l && l[0] + "" == "0" ? "0" : " "; h.length < x; )
                    h = a !== void 0 ? h + y : y + h;
                return h
            }
        }
        var o = /%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;
        return e.replace(o, i)
    }
    ,
    t.prototype.format = function(e) {
        for (var r = [], n = 1; n < arguments.length; n++)
            r[n - 1] = arguments[n];
        this.buffer += t.form(e, r)
    }
    ,
    t.prototype.toString = function() {
        return this.buffer
    }
    ,
    t
}(), iCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, gM = function() {
    function t(e) {
        this.boundingBox = new HE(e),
        this.codewords = new Array(e.getMaxY() - e.getMinY() + 1)
    }
    return t.prototype.getCodewordNearby = function(e) {
        var r = this.getCodeword(e);
        if (r != null)
            return r;
        for (var n = 1; n < t.MAX_NEARBY_DISTANCE; n++) {
            var i = this.imageRowToCodewordIndex(e) - n;
            if (i >= 0 && (r = this.codewords[i],
            r != null) || (i = this.imageRowToCodewordIndex(e) + n,
            i < this.codewords.length && (r = this.codewords[i],
            r != null)))
                return r
        }
        return null
    }
    ,
    t.prototype.imageRowToCodewordIndex = function(e) {
        return e - this.boundingBox.getMinY()
    }
    ,
    t.prototype.setCodeword = function(e, r) {
        this.codewords[this.imageRowToCodewordIndex(e)] = r
    }
    ,
    t.prototype.getCodeword = function(e) {
        return this.codewords[this.imageRowToCodewordIndex(e)]
    }
    ,
    t.prototype.getBoundingBox = function() {
        return this.boundingBox
    }
    ,
    t.prototype.getCodewords = function() {
        return this.codewords
    }
    ,
    t.prototype.toString = function() {
        var e, r, n = new wC, i = 0;
        try {
            for (var o = iCe(this.codewords), s = o.next(); !s.done; s = o.next()) {
                var a = s.value;
                if (a == null) {
                    n.format("%3d:    |   %n", i++);
                    continue
                }
                n.format("%3d: %3d|%3d%n", i++, a.getRowNumber(), a.getValue())
            }
        } catch (l) {
            e = {
                error: l
            }
        } finally {
            try {
                s && !s.done && (r = o.return) && r.call(o)
            } finally {
                if (e)
                    throw e.error
            }
        }
        return n.toString()
    }
    ,
    t.MAX_NEARBY_DISTANCE = 5,
    t
}(), oCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, sCe = globalThis && globalThis.__read || function(t, e) {
    var r = typeof Symbol == "function" && t[Symbol.iterator];
    if (!r)
        return t;
    var n = r.call(t), i, o = [], s;
    try {
        for (; (e === void 0 || e-- > 0) && !(i = n.next()).done; )
            o.push(i.value)
    } catch (a) {
        s = {
            error: a
        }
    } finally {
        try {
            i && !i.done && (r = n.return) && r.call(n)
        } finally {
            if (s)
                throw s.error
        }
    }
    return o
}
, p0 = function() {
    function t() {
        this.values = new Map
    }
    return t.prototype.setValue = function(e) {
        e = Math.trunc(e);
        var r = this.values.get(e);
        r == null && (r = 0),
        r++,
        this.values.set(e, r)
    }
    ,
    t.prototype.getValue = function() {
        var e, r, n = -1, i = new Array, o = function(f, d) {
            var h = {
                getKey: function() {
                    return f
                },
                getValue: function() {
                    return d
                }
            };
            h.getValue() > n ? (n = h.getValue(),
            i = [],
            i.push(h.getKey())) : h.getValue() === n && i.push(h.getKey())
        };
        try {
            for (var s = oCe(this.values.entries()), a = s.next(); !a.done; a = s.next()) {
                var l = sCe(a.value, 2)
                  , c = l[0]
                  , u = l[1];
                o(c, u)
            }
        } catch (f) {
            e = {
                error: f
            }
        } finally {
            try {
                a && !a.done && (r = s.return) && r.call(s)
            } finally {
                if (e)
                    throw e.error
            }
        }
        return at.toIntArray(i)
    }
    ,
    t.prototype.getConfidence = function(e) {
        return this.values.get(e)
    }
    ,
    t
}(), aCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), Ym = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, x6 = function(t) {
    aCe(e, t);
    function e(r, n) {
        var i = t.call(this, r) || this;
        return i._isLeft = n,
        i
    }
    return e.prototype.setRowNumbers = function() {
        var r, n;
        try {
            for (var i = Ym(this.getCodewords()), o = i.next(); !o.done; o = i.next()) {
                var s = o.value;
                s != null && s.setRowNumberAsRowIndicatorColumn()
            }
        } catch (a) {
            r = {
                error: a
            }
        } finally {
            try {
                o && !o.done && (n = i.return) && n.call(i)
            } finally {
                if (r)
                    throw r.error
            }
        }
    }
    ,
    e.prototype.adjustCompleteIndicatorColumnRowNumbers = function(r) {
        var n = this.getCodewords();
        this.setRowNumbers(),
        this.removeIncorrectCodewords(n, r);
        for (var i = this.getBoundingBox(), o = this._isLeft ? i.getTopLeft() : i.getTopRight(), s = this._isLeft ? i.getBottomLeft() : i.getBottomRight(), a = this.imageRowToCodewordIndex(Math.trunc(o.getY())), l = this.imageRowToCodewordIndex(Math.trunc(s.getY())), c = -1, u = 1, f = 0, d = a; d < l; d++)
            if (n[d] != null) {
                var h = n[d]
                  , x = h.getRowNumber() - c;
                if (x === 0)
                    f++;
                else if (x === 1)
                    u = Math.max(u, f),
                    f = 1,
                    c = h.getRowNumber();
                else if (x < 0 || h.getRowNumber() >= r.getRowCount() || x > d)
                    n[d] = null;
                else {
                    var y = void 0;
                    u > 2 ? y = (u - 2) * x : y = x;
                    for (var m = y >= d, E = 1; E <= y && !m; E++)
                        m = n[d - E] != null;
                    m ? n[d] = null : (c = h.getRowNumber(),
                    f = 1)
                }
            }
    }
    ,
    e.prototype.getRowHeights = function() {
        var r, n, i = this.getBarcodeMetadata();
        if (i == null)
            return null;
        this.adjustIncompleteIndicatorColumnRowNumbers(i);
        var o = new Int32Array(i.getRowCount());
        try {
            for (var s = Ym(this.getCodewords()), a = s.next(); !a.done; a = s.next()) {
                var l = a.value;
                if (l != null) {
                    var c = l.getRowNumber();
                    if (c >= o.length)
                        continue;
                    o[c]++
                }
            }
        } catch (u) {
            r = {
                error: u
            }
        } finally {
            try {
                a && !a.done && (n = s.return) && n.call(s)
            } finally {
                if (r)
                    throw r.error
            }
        }
        return o
    }
    ,
    e.prototype.adjustIncompleteIndicatorColumnRowNumbers = function(r) {
        for (var n = this.getBoundingBox(), i = this._isLeft ? n.getTopLeft() : n.getTopRight(), o = this._isLeft ? n.getBottomLeft() : n.getBottomRight(), s = this.imageRowToCodewordIndex(Math.trunc(i.getY())), a = this.imageRowToCodewordIndex(Math.trunc(o.getY())), l = this.getCodewords(), c = -1, u = s; u < a; u++)
            if (l[u] != null) {
                var f = l[u];
                f.setRowNumberAsRowIndicatorColumn();
                var d = f.getRowNumber() - c;
                d === 0 || (d === 1 ? c = f.getRowNumber() : f.getRowNumber() >= r.getRowCount() ? l[u] = null : c = f.getRowNumber())
            }
    }
    ,
    e.prototype.getBarcodeMetadata = function() {
        var r, n, i = this.getCodewords(), o = new p0, s = new p0, a = new p0, l = new p0;
        try {
            for (var c = Ym(i), u = c.next(); !u.done; u = c.next()) {
                var f = u.value;
                if (f != null) {
                    f.setRowNumberAsRowIndicatorColumn();
                    var d = f.getValue() % 30
                      , h = f.getRowNumber();
                    switch (this._isLeft || (h += 2),
                    h % 3) {
                    case 0:
                        s.setValue(d * 3 + 1);
                        break;
                    case 1:
                        l.setValue(d / 3),
                        a.setValue(d % 3);
                        break;
                    case 2:
                        o.setValue(d + 1);
                        break
                    }
                }
            }
        } catch (y) {
            r = {
                error: y
            }
        } finally {
            try {
                u && !u.done && (n = c.return) && n.call(c)
            } finally {
                if (r)
                    throw r.error
            }
        }
        if (o.getValue().length === 0 || s.getValue().length === 0 || a.getValue().length === 0 || l.getValue().length === 0 || o.getValue()[0] < 1 || s.getValue()[0] + a.getValue()[0] < at.MIN_ROWS_IN_BARCODE || s.getValue()[0] + a.getValue()[0] > at.MAX_ROWS_IN_BARCODE)
            return null;
        var x = new nCe(o.getValue()[0],s.getValue()[0],a.getValue()[0],l.getValue()[0]);
        return this.removeIncorrectCodewords(i, x),
        x
    }
    ,
    e.prototype.removeIncorrectCodewords = function(r, n) {
        for (var i = 0; i < r.length; i++) {
            var o = r[i];
            if (r[i] != null) {
                var s = o.getValue() % 30
                  , a = o.getRowNumber();
                if (a > n.getRowCount()) {
                    r[i] = null;
                    continue
                }
                switch (this._isLeft || (a += 2),
                a % 3) {
                case 0:
                    s * 3 + 1 !== n.getRowCountUpperPart() && (r[i] = null);
                    break;
                case 1:
                    (Math.trunc(s / 3) !== n.getErrorCorrectionLevel() || s % 3 !== n.getRowCountLowerPart()) && (r[i] = null);
                    break;
                case 2:
                    s + 1 !== n.getColumnCount() && (r[i] = null);
                    break
                }
            }
        }
    }
    ,
    e.prototype.isLeft = function() {
        return this._isLeft
    }
    ,
    e.prototype.toString = function() {
        return "IsLeft: " + this._isLeft + `
` + t.prototype.toString.call(this)
    }
    ,
    e
}(gM), lCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
, cCe = function() {
    function t(e, r) {
        this.ADJUST_ROW_NUMBER_SKIP = 2,
        this.barcodeMetadata = e,
        this.barcodeColumnCount = e.getColumnCount(),
        this.boundingBox = r,
        this.detectionResultColumns = new Array(this.barcodeColumnCount + 2)
    }
    return t.prototype.getDetectionResultColumns = function() {
        this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),
        this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount + 1]);
        var e = at.MAX_CODEWORDS_IN_BARCODE, r;
        do
            r = e,
            e = this.adjustRowNumbersAndGetCount();
        while (e > 0 && e < r);
        return this.detectionResultColumns
    }
    ,
    t.prototype.adjustIndicatorColumnRowNumbers = function(e) {
        e != null && e.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)
    }
    ,
    t.prototype.adjustRowNumbersAndGetCount = function() {
        var e = this.adjustRowNumbersByRow();
        if (e === 0)
            return 0;
        for (var r = 1; r < this.barcodeColumnCount + 1; r++)
            for (var n = this.detectionResultColumns[r].getCodewords(), i = 0; i < n.length; i++)
                n[i] != null && (n[i].hasValidRowNumber() || this.adjustRowNumbers(r, i, n));
        return e
    }
    ,
    t.prototype.adjustRowNumbersByRow = function() {
        this.adjustRowNumbersFromBothRI();
        var e = this.adjustRowNumbersFromLRI();
        return e + this.adjustRowNumbersFromRRI()
    }
    ,
    t.prototype.adjustRowNumbersFromBothRI = function() {
        if (!(this.detectionResultColumns[0] == null || this.detectionResultColumns[this.barcodeColumnCount + 1] == null)) {
            for (var e = this.detectionResultColumns[0].getCodewords(), r = this.detectionResultColumns[this.barcodeColumnCount + 1].getCodewords(), n = 0; n < e.length; n++)
                if (e[n] != null && r[n] != null && e[n].getRowNumber() === r[n].getRowNumber())
                    for (var i = 1; i <= this.barcodeColumnCount; i++) {
                        var o = this.detectionResultColumns[i].getCodewords()[n];
                        o != null && (o.setRowNumber(e[n].getRowNumber()),
                        o.hasValidRowNumber() || (this.detectionResultColumns[i].getCodewords()[n] = null))
                    }
        }
    }
    ,
    t.prototype.adjustRowNumbersFromRRI = function() {
        if (this.detectionResultColumns[this.barcodeColumnCount + 1] == null)
            return 0;
        for (var e = 0, r = this.detectionResultColumns[this.barcodeColumnCount + 1].getCodewords(), n = 0; n < r.length; n++)
            if (r[n] != null)
                for (var i = r[n].getRowNumber(), o = 0, s = this.barcodeColumnCount + 1; s > 0 && o < this.ADJUST_ROW_NUMBER_SKIP; s--) {
                    var a = this.detectionResultColumns[s].getCodewords()[n];
                    a != null && (o = t.adjustRowNumberIfValid(i, o, a),
                    a.hasValidRowNumber() || e++)
                }
        return e
    }
    ,
    t.prototype.adjustRowNumbersFromLRI = function() {
        if (this.detectionResultColumns[0] == null)
            return 0;
        for (var e = 0, r = this.detectionResultColumns[0].getCodewords(), n = 0; n < r.length; n++)
            if (r[n] != null)
                for (var i = r[n].getRowNumber(), o = 0, s = 1; s < this.barcodeColumnCount + 1 && o < this.ADJUST_ROW_NUMBER_SKIP; s++) {
                    var a = this.detectionResultColumns[s].getCodewords()[n];
                    a != null && (o = t.adjustRowNumberIfValid(i, o, a),
                    a.hasValidRowNumber() || e++)
                }
        return e
    }
    ,
    t.adjustRowNumberIfValid = function(e, r, n) {
        return n == null || n.hasValidRowNumber() || (n.isValidRowNumber(e) ? (n.setRowNumber(e),
        r = 0) : ++r),
        r
    }
    ,
    t.prototype.adjustRowNumbers = function(e, r, n) {
        var i, o;
        if (this.detectionResultColumns[e - 1] != null) {
            var s = n[r]
              , a = this.detectionResultColumns[e - 1].getCodewords()
              , l = a;
            this.detectionResultColumns[e + 1] != null && (l = this.detectionResultColumns[e + 1].getCodewords());
            var c = new Array(14);
            c[2] = a[r],
            c[3] = l[r],
            r > 0 && (c[0] = n[r - 1],
            c[4] = a[r - 1],
            c[5] = l[r - 1]),
            r > 1 && (c[8] = n[r - 2],
            c[10] = a[r - 2],
            c[11] = l[r - 2]),
            r < n.length - 1 && (c[1] = n[r + 1],
            c[6] = a[r + 1],
            c[7] = l[r + 1]),
            r < n.length - 2 && (c[9] = n[r + 2],
            c[12] = a[r + 2],
            c[13] = l[r + 2]);
            try {
                for (var u = lCe(c), f = u.next(); !f.done; f = u.next()) {
                    var d = f.value;
                    if (t.adjustRowNumber(s, d))
                        return
                }
            } catch (h) {
                i = {
                    error: h
                }
            } finally {
                try {
                    f && !f.done && (o = u.return) && o.call(u)
                } finally {
                    if (i)
                        throw i.error
                }
            }
        }
    }
    ,
    t.adjustRowNumber = function(e, r) {
        return r == null ? !1 : r.hasValidRowNumber() && r.getBucket() === e.getBucket() ? (e.setRowNumber(r.getRowNumber()),
        !0) : !1
    }
    ,
    t.prototype.getBarcodeColumnCount = function() {
        return this.barcodeColumnCount
    }
    ,
    t.prototype.getBarcodeRowCount = function() {
        return this.barcodeMetadata.getRowCount()
    }
    ,
    t.prototype.getBarcodeECLevel = function() {
        return this.barcodeMetadata.getErrorCorrectionLevel()
    }
    ,
    t.prototype.setBoundingBox = function(e) {
        this.boundingBox = e
    }
    ,
    t.prototype.getBoundingBox = function() {
        return this.boundingBox
    }
    ,
    t.prototype.setDetectionResultColumn = function(e, r) {
        this.detectionResultColumns[e] = r
    }
    ,
    t.prototype.getDetectionResultColumn = function(e) {
        return this.detectionResultColumns[e]
    }
    ,
    t.prototype.toString = function() {
        var e = this.detectionResultColumns[0];
        e == null && (e = this.detectionResultColumns[this.barcodeColumnCount + 1]);
        for (var r = new wC, n = 0; n < e.getCodewords().length; n++) {
            r.format("CW %3d:", n);
            for (var i = 0; i < this.barcodeColumnCount + 2; i++) {
                if (this.detectionResultColumns[i] == null) {
                    r.format("    |   ");
                    continue
                }
                var o = this.detectionResultColumns[i].getCodewords()[n];
                if (o == null) {
                    r.format("    |   ");
                    continue
                }
                r.format(" %3d|%3d", o.getRowNumber(), o.getValue())
            }
            r.format("%n")
        }
        return r.toString()
    }
    ,
    t
}(), uCe = function() {
    function t(e, r, n, i) {
        this.rowNumber = t.BARCODE_ROW_UNKNOWN,
        this.startX = Math.trunc(e),
        this.endX = Math.trunc(r),
        this.bucket = Math.trunc(n),
        this.value = Math.trunc(i)
    }
    return t.prototype.hasValidRowNumber = function() {
        return this.isValidRowNumber(this.rowNumber)
    }
    ,
    t.prototype.isValidRowNumber = function(e) {
        return e !== t.BARCODE_ROW_UNKNOWN && this.bucket === e % 3 * 3
    }
    ,
    t.prototype.setRowNumberAsRowIndicatorColumn = function() {
        this.rowNumber = Math.trunc(Math.trunc(this.value / 30) * 3 + Math.trunc(this.bucket / 3))
    }
    ,
    t.prototype.getWidth = function() {
        return this.endX - this.startX
    }
    ,
    t.prototype.getStartX = function() {
        return this.startX
    }
    ,
    t.prototype.getEndX = function() {
        return this.endX
    }
    ,
    t.prototype.getBucket = function() {
        return this.bucket
    }
    ,
    t.prototype.getValue = function() {
        return this.value
    }
    ,
    t.prototype.getRowNumber = function() {
        return this.rowNumber
    }
    ,
    t.prototype.setRowNumber = function(e) {
        this.rowNumber = e
    }
    ,
    t.prototype.toString = function() {
        return this.rowNumber + "|" + this.value
    }
    ,
    t.BARCODE_ROW_UNKNOWN = -1,
    t
}(), fCe = function() {
    function t() {}
    return t.initialize = function() {
        for (var e = 0; e < at.SYMBOL_TABLE.length; e++)
            for (var r = at.SYMBOL_TABLE[e], n = r & 1, i = 0; i < at.BARS_IN_MODULE; i++) {
                for (var o = 0; (r & 1) === n; )
                    o += 1,
                    r >>= 1;
                n = r & 1,
                t.RATIOS_TABLE[e] || (t.RATIOS_TABLE[e] = new Array(at.BARS_IN_MODULE)),
                t.RATIOS_TABLE[e][at.BARS_IN_MODULE - i - 1] = Math.fround(o / at.MODULES_IN_CODEWORD)
            }
        this.bSymbolTableReady = !0
    }
    ,
    t.getDecodedValue = function(e) {
        var r = t.getDecodedCodewordValue(t.sampleBitCounts(e));
        return r !== -1 ? r : t.getClosestDecodedValue(e)
    }
    ,
    t.sampleBitCounts = function(e) {
        for (var r = ft.sum(e), n = new Int32Array(at.BARS_IN_MODULE), i = 0, o = 0, s = 0; s < at.MODULES_IN_CODEWORD; s++) {
            var a = r / (2 * at.MODULES_IN_CODEWORD) + s * r / at.MODULES_IN_CODEWORD;
            o + e[i] <= a && (o += e[i],
            i++),
            n[i]++
        }
        return n
    }
    ,
    t.getDecodedCodewordValue = function(e) {
        var r = t.getBitValue(e);
        return at.getCodeword(r) === -1 ? -1 : r
    }
    ,
    t.getBitValue = function(e) {
        for (var r = 0, n = 0; n < e.length; n++)
            for (var i = 0; i < e[n]; i++)
                r = r << 1 | (n % 2 === 0 ? 1 : 0);
        return Math.trunc(r)
    }
    ,
    t.getClosestDecodedValue = function(e) {
        var r = ft.sum(e)
          , n = new Array(at.BARS_IN_MODULE);
        if (r > 1)
            for (var i = 0; i < n.length; i++)
                n[i] = Math.fround(e[i] / r);
        var o = $E.MAX_VALUE
          , s = -1;
        this.bSymbolTableReady || t.initialize();
        for (var a = 0; a < t.RATIOS_TABLE.length; a++) {
            for (var l = 0, c = t.RATIOS_TABLE[a], u = 0; u < at.BARS_IN_MODULE; u++) {
                var f = Math.fround(c[u] - n[u]);
                if (l += Math.fround(f * f),
                l >= o)
                    break
            }
            l < o && (o = l,
            s = at.SYMBOL_TABLE[a])
        }
        return s
    }
    ,
    t.bSymbolTableReady = !1,
    t.RATIOS_TABLE = new Array(at.SYMBOL_TABLE.length).map(function(e) {
        return new Array(at.BARS_IN_MODULE)
    }),
    t
}(), dCe = function() {
    function t() {
        this.segmentCount = -1,
        this.fileSize = -1,
        this.timestamp = -1,
        this.checksum = -1
    }
    return t.prototype.getSegmentIndex = function() {
        return this.segmentIndex
    }
    ,
    t.prototype.setSegmentIndex = function(e) {
        this.segmentIndex = e
    }
    ,
    t.prototype.getFileId = function() {
        return this.fileId
    }
    ,
    t.prototype.setFileId = function(e) {
        this.fileId = e
    }
    ,
    t.prototype.getOptionalData = function() {
        return this.optionalData
    }
    ,
    t.prototype.setOptionalData = function(e) {
        this.optionalData = e
    }
    ,
    t.prototype.isLastSegment = function() {
        return this.lastSegment
    }
    ,
    t.prototype.setLastSegment = function(e) {
        this.lastSegment = e
    }
    ,
    t.prototype.getSegmentCount = function() {
        return this.segmentCount
    }
    ,
    t.prototype.setSegmentCount = function(e) {
        this.segmentCount = e
    }
    ,
    t.prototype.getSender = function() {
        return this.sender || null
    }
    ,
    t.prototype.setSender = function(e) {
        this.sender = e
    }
    ,
    t.prototype.getAddressee = function() {
        return this.addressee || null
    }
    ,
    t.prototype.setAddressee = function(e) {
        this.addressee = e
    }
    ,
    t.prototype.getFileName = function() {
        return this.fileName
    }
    ,
    t.prototype.setFileName = function(e) {
        this.fileName = e
    }
    ,
    t.prototype.getFileSize = function() {
        return this.fileSize
    }
    ,
    t.prototype.setFileSize = function(e) {
        this.fileSize = e
    }
    ,
    t.prototype.getChecksum = function() {
        return this.checksum
    }
    ,
    t.prototype.setChecksum = function(e) {
        this.checksum = e
    }
    ,
    t.prototype.getTimestamp = function() {
        return this.timestamp
    }
    ,
    t.prototype.setTimestamp = function(e) {
        this.timestamp = e
    }
    ,
    t
}(), p6 = function() {
    function t() {}
    return t.parseLong = function(e, r) {
        return r === void 0 && (r = void 0),
        parseInt(e, r)
    }
    ,
    t
}(), hCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), xCe = function(t) {
    hCe(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "NullPointerException",
    e
}(Mn), pCe = function() {
    function t() {}
    return t.prototype.writeBytes = function(e) {
        this.writeBytesOffset(e, 0, e.length)
    }
    ,
    t.prototype.writeBytesOffset = function(e, r, n) {
        if (e == null)
            throw new xCe;
        if (r < 0 || r > e.length || n < 0 || r + n > e.length || r + n < 0)
            throw new _C;
        if (n === 0)
            return;
        for (var i = 0; i < n; i++)
            this.write(e[r + i])
    }
    ,
    t.prototype.flush = function() {}
    ,
    t.prototype.close = function() {}
    ,
    t
}(), gCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), mCe = function(t) {
    gCe(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e
}(Mn), vCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), yCe = function(t) {
    vCe(e, t);
    function e(r) {
        r === void 0 && (r = 32);
        var n = t.call(this) || this;
        if (n.count = 0,
        r < 0)
            throw new Me("Negative initial size: " + r);
        return n.buf = new Uint8Array(r),
        n
    }
    return e.prototype.ensureCapacity = function(r) {
        r - this.buf.length > 0 && this.grow(r)
    }
    ,
    e.prototype.grow = function(r) {
        var n = this.buf.length
          , i = n << 1;
        if (i - r < 0 && (i = r),
        i < 0) {
            if (r < 0)
                throw new mCe;
            i = qe.MAX_VALUE
        }
        this.buf = br.copyOfUint8Array(this.buf, i)
    }
    ,
    e.prototype.write = function(r) {
        this.ensureCapacity(this.count + 1),
        this.buf[this.count] = r,
        this.count += 1
    }
    ,
    e.prototype.writeBytesOffset = function(r, n, i) {
        if (n < 0 || n > r.length || i < 0 || n + i - r.length > 0)
            throw new _C;
        this.ensureCapacity(this.count + i),
        Dt.arraycopy(r, n, this.buf, this.count, i),
        this.count += i
    }
    ,
    e.prototype.writeTo = function(r) {
        r.writeBytesOffset(this.buf, 0, this.count)
    }
    ,
    e.prototype.reset = function() {
        this.count = 0
    }
    ,
    e.prototype.toByteArray = function() {
        return br.copyOfUint8Array(this.buf, this.count)
    }
    ,
    e.prototype.size = function() {
        return this.count
    }
    ,
    e.prototype.toString = function(r) {
        return r ? typeof r == "string" ? this.toString_string(r) : this.toString_number(r) : this.toString_void()
    }
    ,
    e.prototype.toString_void = function() {
        return new String(this.buf).toString()
    }
    ,
    e.prototype.toString_string = function(r) {
        return new String(this.buf).toString()
    }
    ,
    e.prototype.toString_number = function(r) {
        return new String(this.buf).toString()
    }
    ,
    e.prototype.close = function() {}
    ,
    e
}(pCe), _t;
(function(t) {
    t[t.ALPHA = 0] = "ALPHA",
    t[t.LOWER = 1] = "LOWER",
    t[t.MIXED = 2] = "MIXED",
    t[t.PUNCT = 3] = "PUNCT",
    t[t.ALPHA_SHIFT = 4] = "ALPHA_SHIFT",
    t[t.PUNCT_SHIFT = 5] = "PUNCT_SHIFT"
}
)(_t || (_t = {}));
function mM() {
    if (typeof window < "u")
        return window.BigInt || null;
    if (typeof global < "u")
        return global.BigInt || null;
    if (typeof self < "u")
        return self.BigInt || null;
    throw new Error("Can't search globals for BigInt!")
}
var Th;
function Ms(t) {
    if (typeof Th > "u" && (Th = mM()),
    Th === null)
        throw new Error("BigInt is not supported!");
    return Th(t)
}
function ECe() {
    var t = [];
    t[0] = Ms(1);
    var e = Ms(900);
    t[1] = e;
    for (var r = 2; r < 16; r++)
        t[r] = t[r - 1] * e;
    return t
}
var _Ce = function() {
    function t() {}
    return t.decode = function(e, r) {
        var n = new Ke("")
          , i = _r.ISO8859_1;
        n.enableDecoding(i);
        for (var o = 1, s = e[o++], a = new dCe; o < e[0]; ) {
            switch (s) {
            case t.TEXT_COMPACTION_MODE_LATCH:
                o = t.textCompaction(e, o, n);
                break;
            case t.BYTE_COMPACTION_MODE_LATCH:
            case t.BYTE_COMPACTION_MODE_LATCH_6:
                o = t.byteCompaction(s, e, i, o, n);
                break;
            case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
                n.append(e[o++]);
                break;
            case t.NUMERIC_COMPACTION_MODE_LATCH:
                o = t.numericCompaction(e, o, n);
                break;
            case t.ECI_CHARSET:
                _r.getCharacterSetECIByValue(e[o++]);
                break;
            case t.ECI_GENERAL_PURPOSE:
                o += 2;
                break;
            case t.ECI_USER_DEFINED:
                o++;
                break;
            case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:
                o = t.decodeMacroBlock(e, o, a);
                break;
            case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:
            case t.MACRO_PDF417_TERMINATOR:
                throw new ge;
            default:
                o--,
                o = t.textCompaction(e, o, n);
                break
            }
            if (o < e.length)
                s = e[o++];
            else
                throw ge.getFormatInstance()
        }
        if (n.length() === 0)
            throw ge.getFormatInstance();
        var l = new I1(null,n.toString(),null,r);
        return l.setOther(a),
        l
    }
    ,
    t.decodeMacroBlock = function(e, r, n) {
        if (r + t.NUMBER_OF_SEQUENCE_CODEWORDS > e[0])
            throw ge.getFormatInstance();
        for (var i = new Int32Array(t.NUMBER_OF_SEQUENCE_CODEWORDS), o = 0; o < t.NUMBER_OF_SEQUENCE_CODEWORDS; o++,
        r++)
            i[o] = e[r];
        n.setSegmentIndex(qe.parseInt(t.decodeBase900toBase10(i, t.NUMBER_OF_SEQUENCE_CODEWORDS)));
        var s = new Ke;
        r = t.textCompaction(e, r, s),
        n.setFileId(s.toString());
        var a = -1;
        for (e[r] === t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD && (a = r + 1); r < e[0]; )
            switch (e[r]) {
            case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:
                switch (r++,
                e[r]) {
                case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:
                    var l = new Ke;
                    r = t.textCompaction(e, r + 1, l),
                    n.setFileName(l.toString());
                    break;
                case t.MACRO_PDF417_OPTIONAL_FIELD_SENDER:
                    var c = new Ke;
                    r = t.textCompaction(e, r + 1, c),
                    n.setSender(c.toString());
                    break;
                case t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:
                    var u = new Ke;
                    r = t.textCompaction(e, r + 1, u),
                    n.setAddressee(u.toString());
                    break;
                case t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:
                    var f = new Ke;
                    r = t.numericCompaction(e, r + 1, f),
                    n.setSegmentCount(qe.parseInt(f.toString()));
                    break;
                case t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:
                    var d = new Ke;
                    r = t.numericCompaction(e, r + 1, d),
                    n.setTimestamp(p6.parseLong(d.toString()));
                    break;
                case t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:
                    var h = new Ke;
                    r = t.numericCompaction(e, r + 1, h),
                    n.setChecksum(qe.parseInt(h.toString()));
                    break;
                case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:
                    var x = new Ke;
                    r = t.numericCompaction(e, r + 1, x),
                    n.setFileSize(p6.parseLong(x.toString()));
                    break;
                default:
                    throw ge.getFormatInstance()
                }
                break;
            case t.MACRO_PDF417_TERMINATOR:
                r++,
                n.setLastSegment(!0);
                break;
            default:
                throw ge.getFormatInstance()
            }
        if (a !== -1) {
            var y = r - a;
            n.isLastSegment() && y--,
            n.setOptionalData(br.copyOfRange(e, a, a + y))
        }
        return r
    }
    ,
    t.textCompaction = function(e, r, n) {
        for (var i = new Int32Array((e[0] - r) * 2), o = new Int32Array((e[0] - r) * 2), s = 0, a = !1; r < e[0] && !a; ) {
            var l = e[r++];
            if (l < t.TEXT_COMPACTION_MODE_LATCH)
                i[s] = l / 30,
                i[s + 1] = l % 30,
                s += 2;
            else
                switch (l) {
                case t.TEXT_COMPACTION_MODE_LATCH:
                    i[s++] = t.TEXT_COMPACTION_MODE_LATCH;
                    break;
                case t.BYTE_COMPACTION_MODE_LATCH:
                case t.BYTE_COMPACTION_MODE_LATCH_6:
                case t.NUMERIC_COMPACTION_MODE_LATCH:
                case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:
                case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:
                case t.MACRO_PDF417_TERMINATOR:
                    r--,
                    a = !0;
                    break;
                case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
                    i[s] = t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,
                    l = e[r++],
                    o[s] = l,
                    s++;
                    break
                }
        }
        return t.decodeTextCompaction(i, o, s, n),
        r
    }
    ,
    t.decodeTextCompaction = function(e, r, n, i) {
        for (var o = _t.ALPHA, s = _t.ALPHA, a = 0; a < n; ) {
            var l = e[a]
              , c = "";
            switch (o) {
            case _t.ALPHA:
                if (l < 26)
                    c = String.fromCharCode(65 + l);
                else
                    switch (l) {
                    case 26:
                        c = " ";
                        break;
                    case t.LL:
                        o = _t.LOWER;
                        break;
                    case t.ML:
                        o = _t.MIXED;
                        break;
                    case t.PS:
                        s = o,
                        o = _t.PUNCT_SHIFT;
                        break;
                    case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
                        i.append(r[a]);
                        break;
                    case t.TEXT_COMPACTION_MODE_LATCH:
                        o = _t.ALPHA;
                        break
                    }
                break;
            case _t.LOWER:
                if (l < 26)
                    c = String.fromCharCode(97 + l);
                else
                    switch (l) {
                    case 26:
                        c = " ";
                        break;
                    case t.AS:
                        s = o,
                        o = _t.ALPHA_SHIFT;
                        break;
                    case t.ML:
                        o = _t.MIXED;
                        break;
                    case t.PS:
                        s = o,
                        o = _t.PUNCT_SHIFT;
                        break;
                    case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
                        i.append(r[a]);
                        break;
                    case t.TEXT_COMPACTION_MODE_LATCH:
                        o = _t.ALPHA;
                        break
                    }
                break;
            case _t.MIXED:
                if (l < t.PL)
                    c = t.MIXED_CHARS[l];
                else
                    switch (l) {
                    case t.PL:
                        o = _t.PUNCT;
                        break;
                    case 26:
                        c = " ";
                        break;
                    case t.LL:
                        o = _t.LOWER;
                        break;
                    case t.AL:
                        o = _t.ALPHA;
                        break;
                    case t.PS:
                        s = o,
                        o = _t.PUNCT_SHIFT;
                        break;
                    case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
                        i.append(r[a]);
                        break;
                    case t.TEXT_COMPACTION_MODE_LATCH:
                        o = _t.ALPHA;
                        break
                    }
                break;
            case _t.PUNCT:
                if (l < t.PAL)
                    c = t.PUNCT_CHARS[l];
                else
                    switch (l) {
                    case t.PAL:
                        o = _t.ALPHA;
                        break;
                    case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
                        i.append(r[a]);
                        break;
                    case t.TEXT_COMPACTION_MODE_LATCH:
                        o = _t.ALPHA;
                        break
                    }
                break;
            case _t.ALPHA_SHIFT:
                if (o = s,
                l < 26)
                    c = String.fromCharCode(65 + l);
                else
                    switch (l) {
                    case 26:
                        c = " ";
                        break;
                    case t.TEXT_COMPACTION_MODE_LATCH:
                        o = _t.ALPHA;
                        break
                    }
                break;
            case _t.PUNCT_SHIFT:
                if (o = s,
                l < t.PAL)
                    c = t.PUNCT_CHARS[l];
                else
                    switch (l) {
                    case t.PAL:
                        o = _t.ALPHA;
                        break;
                    case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:
                        i.append(r[a]);
                        break;
                    case t.TEXT_COMPACTION_MODE_LATCH:
                        o = _t.ALPHA;
                        break
                    }
                break
            }
            c !== "" && i.append(c),
            a++
        }
    }
    ,
    t.byteCompaction = function(e, r, n, i, o) {
        var s = new yCe
          , a = 0
          , l = 0
          , c = !1;
        switch (e) {
        case t.BYTE_COMPACTION_MODE_LATCH:
            for (var u = new Int32Array(6), f = r[i++]; i < r[0] && !c; )
                switch (u[a++] = f,
                l = 900 * l + f,
                f = r[i++],
                f) {
                case t.TEXT_COMPACTION_MODE_LATCH:
                case t.BYTE_COMPACTION_MODE_LATCH:
                case t.NUMERIC_COMPACTION_MODE_LATCH:
                case t.BYTE_COMPACTION_MODE_LATCH_6:
                case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:
                case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:
                case t.MACRO_PDF417_TERMINATOR:
                    i--,
                    c = !0;
                    break;
                default:
                    if (a % 5 === 0 && a > 0) {
                        for (var d = 0; d < 6; ++d)
                            s.write(Number(Ms(l) >> Ms(8 * (5 - d))));
                        l = 0,
                        a = 0
                    }
                    break
                }
            i === r[0] && f < t.TEXT_COMPACTION_MODE_LATCH && (u[a++] = f);
            for (var h = 0; h < a; h++)
                s.write(u[h]);
            break;
        case t.BYTE_COMPACTION_MODE_LATCH_6:
            for (; i < r[0] && !c; ) {
                var x = r[i++];
                if (x < t.TEXT_COMPACTION_MODE_LATCH)
                    a++,
                    l = 900 * l + x;
                else
                    switch (x) {
                    case t.TEXT_COMPACTION_MODE_LATCH:
                    case t.BYTE_COMPACTION_MODE_LATCH:
                    case t.NUMERIC_COMPACTION_MODE_LATCH:
                    case t.BYTE_COMPACTION_MODE_LATCH_6:
                    case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:
                    case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:
                    case t.MACRO_PDF417_TERMINATOR:
                        i--,
                        c = !0;
                        break
                    }
                if (a % 5 === 0 && a > 0) {
                    for (var d = 0; d < 6; ++d)
                        s.write(Number(Ms(l) >> Ms(8 * (5 - d))));
                    l = 0,
                    a = 0
                }
            }
            break
        }
        return o.append(mi.decode(s.toByteArray(), n)),
        i
    }
    ,
    t.numericCompaction = function(e, r, n) {
        for (var i = 0, o = !1, s = new Int32Array(t.MAX_NUMERIC_CODEWORDS); r < e[0] && !o; ) {
            var a = e[r++];
            if (r === e[0] && (o = !0),
            a < t.TEXT_COMPACTION_MODE_LATCH)
                s[i] = a,
                i++;
            else
                switch (a) {
                case t.TEXT_COMPACTION_MODE_LATCH:
                case t.BYTE_COMPACTION_MODE_LATCH:
                case t.BYTE_COMPACTION_MODE_LATCH_6:
                case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:
                case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:
                case t.MACRO_PDF417_TERMINATOR:
                    r--,
                    o = !0;
                    break
                }
            (i % t.MAX_NUMERIC_CODEWORDS === 0 || a === t.NUMERIC_COMPACTION_MODE_LATCH || o) && i > 0 && (n.append(t.decodeBase900toBase10(s, i)),
            i = 0)
        }
        return r
    }
    ,
    t.decodeBase900toBase10 = function(e, r) {
        for (var n = Ms(0), i = 0; i < r; i++)
            n += t.EXP900[r - i - 1] * Ms(e[i]);
        var o = n.toString();
        if (o.charAt(0) !== "1")
            throw new ge;
        return o.substring(1)
    }
    ,
    t.TEXT_COMPACTION_MODE_LATCH = 900,
    t.BYTE_COMPACTION_MODE_LATCH = 901,
    t.NUMERIC_COMPACTION_MODE_LATCH = 902,
    t.BYTE_COMPACTION_MODE_LATCH_6 = 924,
    t.ECI_USER_DEFINED = 925,
    t.ECI_GENERAL_PURPOSE = 926,
    t.ECI_CHARSET = 927,
    t.BEGIN_MACRO_PDF417_CONTROL_BLOCK = 928,
    t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD = 923,
    t.MACRO_PDF417_TERMINATOR = 922,
    t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE = 913,
    t.MAX_NUMERIC_CODEWORDS = 15,
    t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME = 0,
    t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT = 1,
    t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP = 2,
    t.MACRO_PDF417_OPTIONAL_FIELD_SENDER = 3,
    t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE = 4,
    t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE = 5,
    t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM = 6,
    t.PL = 25,
    t.LL = 27,
    t.AS = 27,
    t.ML = 28,
    t.AL = 28,
    t.PS = 29,
    t.PAL = 29,
    t.PUNCT_CHARS = `;<>@[\\]_\`~!\r	,:
-.$/"|*()?{}'`,
    t.MIXED_CHARS = "0123456789&\r	,:#-.$/+%*=^",
    t.EXP900 = mM() ? ECe() : [],
    t.NUMBER_OF_SEQUENCE_CODEWORDS = 2,
    t
}()
  , n0 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , bCe = function() {
    function t() {}
    return t.decode = function(e, r, n, i, o, s, a) {
        for (var l = new HE(e,r,n,i,o), c = null, u = null, f, d = !0; ; d = !1) {
            if (r != null && (c = t.getRowIndicatorColumn(e, l, r, !0, s, a)),
            i != null && (u = t.getRowIndicatorColumn(e, l, i, !1, s, a)),
            f = t.merge(c, u),
            f == null)
                throw le.getNotFoundInstance();
            var h = f.getBoundingBox();
            if (d && h != null && (h.getMinY() < l.getMinY() || h.getMaxY() > l.getMaxY()))
                l = h;
            else
                break
        }
        f.setBoundingBox(l);
        var x = f.getBarcodeColumnCount() + 1;
        f.setDetectionResultColumn(0, c),
        f.setDetectionResultColumn(x, u);
        for (var y = c != null, m = 1; m <= x; m++) {
            var E = y ? m : x - m;
            if (f.getDetectionResultColumn(E) === void 0) {
                var g = void 0;
                E === 0 || E === x ? g = new x6(l,E === 0) : g = new gM(l),
                f.setDetectionResultColumn(E, g);
                for (var p = -1, v = p, _ = l.getMinY(); _ <= l.getMaxY(); _++) {
                    if (p = t.getStartColumn(f, E, _, y),
                    p < 0 || p > l.getMaxX()) {
                        if (v === -1)
                            continue;
                        p = v
                    }
                    var b = t.detectCodeword(e, l.getMinX(), l.getMaxX(), y, p, _, s, a);
                    b != null && (g.setCodeword(_, b),
                    v = p,
                    s = Math.min(s, b.getWidth()),
                    a = Math.max(a, b.getWidth()))
                }
            }
        }
        return t.createDecoderResult(f)
    }
    ,
    t.merge = function(e, r) {
        if (e == null && r == null)
            return null;
        var n = t.getBarcodeMetadata(e, r);
        if (n == null)
            return null;
        var i = HE.merge(t.adjustBoundingBox(e), t.adjustBoundingBox(r));
        return new cCe(n,i)
    }
    ,
    t.adjustBoundingBox = function(e) {
        var r, n;
        if (e == null)
            return null;
        var i = e.getRowHeights();
        if (i == null)
            return null;
        var o = t.getMax(i)
          , s = 0;
        try {
            for (var a = n0(i), l = a.next(); !l.done; l = a.next()) {
                var c = l.value;
                if (s += o - c,
                c > 0)
                    break
            }
        } catch (h) {
            r = {
                error: h
            }
        } finally {
            try {
                l && !l.done && (n = a.return) && n.call(a)
            } finally {
                if (r)
                    throw r.error
            }
        }
        for (var u = e.getCodewords(), f = 0; s > 0 && u[f] == null; f++)
            s--;
        for (var d = 0, f = i.length - 1; f >= 0 && (d += o - i[f],
        !(i[f] > 0)); f--)
            ;
        for (var f = u.length - 1; d > 0 && u[f] == null; f--)
            d--;
        return e.getBoundingBox().addMissingRows(s, d, e.isLeft())
    }
    ,
    t.getMax = function(e) {
        var r, n, i = -1;
        try {
            for (var o = n0(e), s = o.next(); !s.done; s = o.next()) {
                var a = s.value;
                i = Math.max(i, a)
            }
        } catch (l) {
            r = {
                error: l
            }
        } finally {
            try {
                s && !s.done && (n = o.return) && n.call(o)
            } finally {
                if (r)
                    throw r.error
            }
        }
        return i
    }
    ,
    t.getBarcodeMetadata = function(e, r) {
        var n;
        if (e == null || (n = e.getBarcodeMetadata()) == null)
            return r == null ? null : r.getBarcodeMetadata();
        var i;
        return r == null || (i = r.getBarcodeMetadata()) == null ? n : n.getColumnCount() !== i.getColumnCount() && n.getErrorCorrectionLevel() !== i.getErrorCorrectionLevel() && n.getRowCount() !== i.getRowCount() ? null : n
    }
    ,
    t.getRowIndicatorColumn = function(e, r, n, i, o, s) {
        for (var a = new x6(r,i), l = 0; l < 2; l++)
            for (var c = l === 0 ? 1 : -1, u = Math.trunc(Math.trunc(n.getX())), f = Math.trunc(Math.trunc(n.getY())); f <= r.getMaxY() && f >= r.getMinY(); f += c) {
                var d = t.detectCodeword(e, 0, e.getWidth(), i, u, f, o, s);
                d != null && (a.setCodeword(f, d),
                i ? u = d.getStartX() : u = d.getEndX())
            }
        return a
    }
    ,
    t.adjustCodewordCount = function(e, r) {
        var n = r[0][1]
          , i = n.getValue()
          , o = e.getBarcodeColumnCount() * e.getBarcodeRowCount() - t.getNumberOfECCodeWords(e.getBarcodeECLevel());
        if (i.length === 0) {
            if (o < 1 || o > at.MAX_CODEWORDS_IN_BARCODE)
                throw le.getNotFoundInstance();
            n.setValue(o)
        } else
            i[0] !== o && n.setValue(o)
    }
    ,
    t.createDecoderResult = function(e) {
        var r = t.createBarcodeMatrix(e);
        t.adjustCodewordCount(e, r);
        for (var n = new Array, i = new Int32Array(e.getBarcodeRowCount() * e.getBarcodeColumnCount()), o = [], s = new Array, a = 0; a < e.getBarcodeRowCount(); a++)
            for (var l = 0; l < e.getBarcodeColumnCount(); l++) {
                var c = r[a][l + 1].getValue()
                  , u = a * e.getBarcodeColumnCount() + l;
                c.length === 0 ? n.push(u) : c.length === 1 ? i[u] = c[0] : (s.push(u),
                o.push(c))
            }
        for (var f = new Array(o.length), d = 0; d < f.length; d++)
            f[d] = o[d];
        return t.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(), i, at.toIntArray(n), at.toIntArray(s), f)
    }
    ,
    t.createDecoderResultFromAmbiguousValues = function(e, r, n, i, o) {
        for (var s = new Int32Array(i.length), a = 100; a-- > 0; ) {
            for (var l = 0; l < s.length; l++)
                r[i[l]] = o[l][s[l]];
            try {
                return t.decodeCodewords(r, e, n)
            } catch (u) {
                var c = u instanceof fr;
                if (!c)
                    throw u
            }
            if (s.length === 0)
                throw fr.getChecksumInstance();
            for (var l = 0; l < s.length; l++)
                if (s[l] < o[l].length - 1) {
                    s[l]++;
                    break
                } else if (s[l] = 0,
                l === s.length - 1)
                    throw fr.getChecksumInstance()
        }
        throw fr.getChecksumInstance()
    }
    ,
    t.createBarcodeMatrix = function(e) {
        for (var r, n, i, o, s = Array.from({
            length: e.getBarcodeRowCount()
        }, function() {
            return new Array(e.getBarcodeColumnCount() + 2)
        }), a = 0; a < s.length; a++)
            for (var l = 0; l < s[a].length; l++)
                s[a][l] = new p0;
        var c = 0;
        try {
            for (var u = n0(e.getDetectionResultColumns()), f = u.next(); !f.done; f = u.next()) {
                var d = f.value;
                if (d != null)
                    try {
                        for (var h = (i = void 0,
                        n0(d.getCodewords())), x = h.next(); !x.done; x = h.next()) {
                            var y = x.value;
                            if (y != null) {
                                var m = y.getRowNumber();
                                if (m >= 0) {
                                    if (m >= s.length)
                                        continue;
                                    s[m][c].setValue(y.getValue())
                                }
                            }
                        }
                    } catch (E) {
                        i = {
                            error: E
                        }
                    } finally {
                        try {
                            x && !x.done && (o = h.return) && o.call(h)
                        } finally {
                            if (i)
                                throw i.error
                        }
                    }
                c++
            }
        } catch (E) {
            r = {
                error: E
            }
        } finally {
            try {
                f && !f.done && (n = u.return) && n.call(u)
            } finally {
                if (r)
                    throw r.error
            }
        }
        return s
    }
    ,
    t.isValidBarcodeColumn = function(e, r) {
        return r >= 0 && r <= e.getBarcodeColumnCount() + 1
    }
    ,
    t.getStartColumn = function(e, r, n, i) {
        var o, s, a = i ? 1 : -1, l = null;
        if (t.isValidBarcodeColumn(e, r - a) && (l = e.getDetectionResultColumn(r - a).getCodeword(n)),
        l != null)
            return i ? l.getEndX() : l.getStartX();
        if (l = e.getDetectionResultColumn(r).getCodewordNearby(n),
        l != null)
            return i ? l.getStartX() : l.getEndX();
        if (t.isValidBarcodeColumn(e, r - a) && (l = e.getDetectionResultColumn(r - a).getCodewordNearby(n)),
        l != null)
            return i ? l.getEndX() : l.getStartX();
        for (var c = 0; t.isValidBarcodeColumn(e, r - a); ) {
            r -= a;
            try {
                for (var u = (o = void 0,
                n0(e.getDetectionResultColumn(r).getCodewords())), f = u.next(); !f.done; f = u.next()) {
                    var d = f.value;
                    if (d != null)
                        return (i ? d.getEndX() : d.getStartX()) + a * c * (d.getEndX() - d.getStartX())
                }
            } catch (h) {
                o = {
                    error: h
                }
            } finally {
                try {
                    f && !f.done && (s = u.return) && s.call(u)
                } finally {
                    if (o)
                        throw o.error
                }
            }
            c++
        }
        return i ? e.getBoundingBox().getMinX() : e.getBoundingBox().getMaxX()
    }
    ,
    t.detectCodeword = function(e, r, n, i, o, s, a, l) {
        o = t.adjustCodewordStartColumn(e, r, n, i, o, s);
        var c = t.getModuleBitCount(e, r, n, i, o, s);
        if (c == null)
            return null;
        var u, f = ft.sum(c);
        if (i)
            u = o + f;
        else {
            for (var d = 0; d < c.length / 2; d++) {
                var h = c[d];
                c[d] = c[c.length - 1 - d],
                c[c.length - 1 - d] = h
            }
            u = o,
            o = u - f
        }
        if (!t.checkCodewordSkew(f, a, l))
            return null;
        var x = fCe.getDecodedValue(c)
          , y = at.getCodeword(x);
        return y === -1 ? null : new uCe(o,u,t.getCodewordBucketNumber(x),y)
    }
    ,
    t.getModuleBitCount = function(e, r, n, i, o, s) {
        for (var a = o, l = new Int32Array(8), c = 0, u = i ? 1 : -1, f = i; (i ? a < n : a >= r) && c < l.length; )
            e.get(a, s) === f ? (l[c]++,
            a += u) : (c++,
            f = !f);
        return c === l.length || a === (i ? n : r) && c === l.length - 1 ? l : null
    }
    ,
    t.getNumberOfECCodeWords = function(e) {
        return 2 << e
    }
    ,
    t.adjustCodewordStartColumn = function(e, r, n, i, o, s) {
        for (var a = o, l = i ? -1 : 1, c = 0; c < 2; c++) {
            for (; (i ? a >= r : a < n) && i === e.get(a, s); ) {
                if (Math.abs(o - a) > t.CODEWORD_SKEW_SIZE)
                    return o;
                a += l
            }
            l = -l,
            i = !i
        }
        return a
    }
    ,
    t.checkCodewordSkew = function(e, r, n) {
        return r - t.CODEWORD_SKEW_SIZE <= e && e <= n + t.CODEWORD_SKEW_SIZE
    }
    ,
    t.decodeCodewords = function(e, r, n) {
        if (e.length === 0)
            throw ge.getFormatInstance();
        var i = 1 << r + 1
          , o = t.correctErrors(e, n, i);
        t.verifyCodewordCount(e, i);
        var s = _Ce.decode(e, "" + r);
        return s.setErrorsCorrected(o),
        s.setErasures(n.length),
        s
    }
    ,
    t.correctErrors = function(e, r, n) {
        if (r != null && r.length > n / 2 + t.MAX_ERRORS || n < 0 || n > t.MAX_EC_CODEWORDS)
            throw fr.getChecksumInstance();
        return t.errorCorrection.decode(e, n, r)
    }
    ,
    t.verifyCodewordCount = function(e, r) {
        if (e.length < 4)
            throw ge.getFormatInstance();
        var n = e[0];
        if (n > e.length)
            throw ge.getFormatInstance();
        if (n === 0)
            if (r < e.length)
                e[0] = e.length - r;
            else
                throw ge.getFormatInstance()
    }
    ,
    t.getBitCountForCodeword = function(e) {
        for (var r = new Int32Array(8), n = 0, i = r.length - 1; !((e & 1) !== n && (n = e & 1,
        i--,
        i < 0)); )
            r[i]++,
            e >>= 1;
        return r
    }
    ,
    t.getCodewordBucketNumber = function(e) {
        return e instanceof Int32Array ? this.getCodewordBucketNumber_Int32Array(e) : this.getCodewordBucketNumber_number(e)
    }
    ,
    t.getCodewordBucketNumber_number = function(e) {
        return t.getCodewordBucketNumber(t.getBitCountForCodeword(e))
    }
    ,
    t.getCodewordBucketNumber_Int32Array = function(e) {
        return (e[0] - e[2] + e[4] - e[6] + 9) % 9
    }
    ,
    t.toString = function(e) {
        for (var r = new wC, n = 0; n < e.length; n++) {
            r.format("Row %2d: ", n);
            for (var i = 0; i < e[n].length; i++) {
                var o = e[n][i];
                o.getValue().length === 0 ? r.format("        ", null) : r.format("%4d(%2d)", o.getValue()[0], o.getConfidence(o.getValue()[0]))
            }
            r.format("%n")
        }
        return r.toString()
    }
    ,
    t.CODEWORD_SKEW_SIZE = 2,
    t.MAX_ERRORS = 3,
    t.MAX_EC_CODEWORDS = 512,
    t.errorCorrection = new rCe,
    t
}()
  , CCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , rp = function() {
    function t() {}
    return t.prototype.decode = function(e, r) {
        r === void 0 && (r = null);
        var n = t.decode(e, r, !1);
        if (n == null || n.length === 0 || n[0] == null)
            throw le.getNotFoundInstance();
        return n[0]
    }
    ,
    t.prototype.decodeMultiple = function(e, r) {
        r === void 0 && (r = null);
        try {
            return t.decode(e, r, !0)
        } catch (n) {
            throw n instanceof ge || n instanceof fr ? le.getNotFoundInstance() : n
        }
    }
    ,
    t.decode = function(e, r, n) {
        var i, o, s = new Array, a = qbe.detectMultiple(e, r, n);
        try {
            for (var l = CCe(a.getPoints()), c = l.next(); !c.done; c = l.next()) {
                var u = c.value
                  , f = bCe.decode(a.getBits(), u[4], u[5], u[6], u[7], t.getMinCodewordWidth(u), t.getMaxCodewordWidth(u))
                  , d = new rn(f.getText(),f.getRawBytes(),void 0,u,ke.PDF_417);
                d.putMetadata(Hr.ERROR_CORRECTION_LEVEL, f.getECLevel());
                var h = f.getOther();
                h != null && d.putMetadata(Hr.PDF417_EXTRA_METADATA, h),
                s.push(d)
            }
        } catch (x) {
            i = {
                error: x
            }
        } finally {
            try {
                c && !c.done && (o = l.return) && o.call(l)
            } finally {
                if (i)
                    throw i.error
            }
        }
        return s.map(function(x) {
            return x
        })
    }
    ,
    t.getMaxWidth = function(e, r) {
        return e == null || r == null ? 0 : Math.trunc(Math.abs(e.getX() - r.getX()))
    }
    ,
    t.getMinWidth = function(e, r) {
        return e == null || r == null ? qe.MAX_VALUE : Math.trunc(Math.abs(e.getX() - r.getX()))
    }
    ,
    t.getMaxCodewordWidth = function(e) {
        return Math.floor(Math.max(Math.max(t.getMaxWidth(e[0], e[4]), t.getMaxWidth(e[6], e[2]) * at.MODULES_IN_CODEWORD / at.MODULES_IN_STOP_PATTERN), Math.max(t.getMaxWidth(e[1], e[5]), t.getMaxWidth(e[7], e[3]) * at.MODULES_IN_CODEWORD / at.MODULES_IN_STOP_PATTERN)))
    }
    ,
    t.getMinCodewordWidth = function(e) {
        return Math.floor(Math.min(Math.min(t.getMinWidth(e[0], e[4]), t.getMinWidth(e[6], e[2]) * at.MODULES_IN_CODEWORD / at.MODULES_IN_STOP_PATTERN), Math.min(t.getMinWidth(e[1], e[5]), t.getMinWidth(e[7], e[3]) * at.MODULES_IN_CODEWORD / at.MODULES_IN_STOP_PATTERN)))
    }
    ,
    t.prototype.reset = function() {}
    ,
    t
}()
  , ACe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , g6 = function(t) {
    ACe(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "ReaderException",
    e
}(Mn)
  , m6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , vM = function() {
    function t() {}
    return t.prototype.decode = function(e, r) {
        return this.setHints(r),
        this.decodeInternal(e)
    }
    ,
    t.prototype.decodeWithState = function(e) {
        return (this.readers === null || this.readers === void 0) && this.setHints(null),
        this.decodeInternal(e)
    }
    ,
    t.prototype.setHints = function(e) {
        this.hints = e;
        var r = e != null && e.get(Ft.TRY_HARDER) !== void 0
          , n = e == null ? null : e.get(Ft.POSSIBLE_FORMATS)
          , i = new Array;
        if (n != null) {
            var o = n.some(function(s) {
                return s === ke.UPC_A || s === ke.UPC_E || s === ke.EAN_13 || s === ke.EAN_8 || s === ke.CODABAR || s === ke.CODE_39 || s === ke.CODE_93 || s === ke.CODE_128 || s === ke.ITF || s === ke.RSS_14 || s === ke.RSS_EXPANDED
            });
            o && !r && i.push(new Bc(e)),
            n.includes(ke.QR_CODE) && i.push(new tp),
            n.includes(ke.DATA_MATRIX) && i.push(new ep),
            n.includes(ke.AZTEC) && i.push(new Jx),
            n.includes(ke.PDF_417) && i.push(new rp),
            o && r && i.push(new Bc(e))
        }
        i.length === 0 && (r || i.push(new Bc(e)),
        i.push(new tp),
        i.push(new ep),
        i.push(new Jx),
        i.push(new rp),
        r && i.push(new Bc(e))),
        this.readers = i
    }
    ,
    t.prototype.reset = function() {
        var e, r;
        if (this.readers !== null)
            try {
                for (var n = m6(this.readers), i = n.next(); !i.done; i = n.next()) {
                    var o = i.value;
                    o.reset()
                }
            } catch (s) {
                e = {
                    error: s
                }
            } finally {
                try {
                    i && !i.done && (r = n.return) && r.call(n)
                } finally {
                    if (e)
                        throw e.error
                }
            }
    }
    ,
    t.prototype.decodeInternal = function(e) {
        var r, n;
        if (this.readers === null)
            throw new g6("No readers where selected, nothing can be read.");
        try {
            for (var i = m6(this.readers), o = i.next(); !o.done; o = i.next()) {
                var s = o.value;
                try {
                    return s.decode(e, this.hints)
                } catch (a) {
                    if (a instanceof g6)
                        continue
                }
            }
        } catch (a) {
            r = {
                error: a
            }
        } finally {
            try {
                o && !o.done && (n = i.return) && n.call(i)
            } finally {
                if (r)
                    throw r.error
            }
        }
        throw new le("No MultiFormat Readers were able to detect the code.")
    }
    ,
    t
}()
  , wCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    wCe(e, t);
    function e(r, n) {
        r === void 0 && (r = null),
        n === void 0 && (n = 500);
        var i = this
          , o = new vM;
        return o.setHints(r),
        i = t.call(this, o, n) || this,
        i
    }
    return e.prototype.decodeBitmap = function(r) {
        return this.reader.decodeWithState(r)
    }
    ,
    e
}
)(Du);
var BCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    BCe(e, t);
    function e(r) {
        return r === void 0 && (r = 500),
        t.call(this, new rp, r) || this
    }
    return e
}
)(Du);
var SCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    SCe(e, t);
    function e(r) {
        return r === void 0 && (r = 500),
        t.call(this, new tp, r) || this
    }
    return e
}
)(Du);
var VE;
(function(t) {
    t[t.ERROR_CORRECTION = 0] = "ERROR_CORRECTION",
    t[t.CHARACTER_SET = 1] = "CHARACTER_SET",
    t[t.DATA_MATRIX_SHAPE = 2] = "DATA_MATRIX_SHAPE",
    t[t.DATA_MATRIX_COMPACT = 3] = "DATA_MATRIX_COMPACT",
    t[t.MIN_SIZE = 4] = "MIN_SIZE",
    t[t.MAX_SIZE = 5] = "MAX_SIZE",
    t[t.MARGIN = 6] = "MARGIN",
    t[t.PDF417_COMPACT = 7] = "PDF417_COMPACT",
    t[t.PDF417_COMPACTION = 8] = "PDF417_COMPACTION",
    t[t.PDF417_DIMENSIONS = 9] = "PDF417_DIMENSIONS",
    t[t.AZTEC_LAYERS = 10] = "AZTEC_LAYERS",
    t[t.QR_VERSION = 11] = "QR_VERSION",
    t[t.GS1_FORMAT = 12] = "GS1_FORMAT",
    t[t.FORCE_C40 = 13] = "FORCE_C40"
}
)(VE || (VE = {}));
const Dh = VE;
var yM = function() {
    function t(e) {
        this.field = e,
        this.cachedGenerators = [],
        this.cachedGenerators.push(new ta(e,Int32Array.from([1])))
    }
    return t.prototype.buildGenerator = function(e) {
        var r = this.cachedGenerators;
        if (e >= r.length)
            for (var n = r[r.length - 1], i = this.field, o = r.length; o <= e; o++) {
                var s = n.multiply(new ta(i,Int32Array.from([1, i.exp(o - 1 + i.getGeneratorBase())])));
                r.push(s),
                n = s
            }
        return r[e]
    }
    ,
    t.prototype.encode = function(e, r) {
        if (r === 0)
            throw new Me("No error correction bytes");
        var n = e.length - r;
        if (n <= 0)
            throw new Me("No data bytes provided");
        var i = this.buildGenerator(r)
          , o = new Int32Array(n);
        Dt.arraycopy(e, 0, o, 0, n);
        var s = new ta(this.field,o);
        s = s.multiplyByMonomial(r, 1);
        for (var a = s.divide(i)[1], l = a.getCoefficients(), c = r - l.length, u = 0; u < c; u++)
            e[n + u] = 0;
        Dt.arraycopy(l, 0, e, n + c, l.length)
    }
    ,
    t
}()
  , g0 = function() {
    function t() {}
    return t.applyMaskPenaltyRule1 = function(e) {
        return t.applyMaskPenaltyRule1Internal(e, !0) + t.applyMaskPenaltyRule1Internal(e, !1)
    }
    ,
    t.applyMaskPenaltyRule2 = function(e) {
        for (var r = 0, n = e.getArray(), i = e.getWidth(), o = e.getHeight(), s = 0; s < o - 1; s++)
            for (var a = n[s], l = 0; l < i - 1; l++) {
                var c = a[l];
                c === a[l + 1] && c === n[s + 1][l] && c === n[s + 1][l + 1] && r++
            }
        return t.N2 * r
    }
    ,
    t.applyMaskPenaltyRule3 = function(e) {
        for (var r = 0, n = e.getArray(), i = e.getWidth(), o = e.getHeight(), s = 0; s < o; s++)
            for (var a = 0; a < i; a++) {
                var l = n[s];
                a + 6 < i && l[a] === 1 && l[a + 1] === 0 && l[a + 2] === 1 && l[a + 3] === 1 && l[a + 4] === 1 && l[a + 5] === 0 && l[a + 6] === 1 && (t.isWhiteHorizontal(l, a - 4, a) || t.isWhiteHorizontal(l, a + 7, a + 11)) && r++,
                s + 6 < o && n[s][a] === 1 && n[s + 1][a] === 0 && n[s + 2][a] === 1 && n[s + 3][a] === 1 && n[s + 4][a] === 1 && n[s + 5][a] === 0 && n[s + 6][a] === 1 && (t.isWhiteVertical(n, a, s - 4, s) || t.isWhiteVertical(n, a, s + 7, s + 11)) && r++
            }
        return r * t.N3
    }
    ,
    t.isWhiteHorizontal = function(e, r, n) {
        r = Math.max(r, 0),
        n = Math.min(n, e.length);
        for (var i = r; i < n; i++)
            if (e[i] === 1)
                return !1;
        return !0
    }
    ,
    t.isWhiteVertical = function(e, r, n, i) {
        n = Math.max(n, 0),
        i = Math.min(i, e.length);
        for (var o = n; o < i; o++)
            if (e[o][r] === 1)
                return !1;
        return !0
    }
    ,
    t.applyMaskPenaltyRule4 = function(e) {
        for (var r = 0, n = e.getArray(), i = e.getWidth(), o = e.getHeight(), s = 0; s < o; s++)
            for (var a = n[s], l = 0; l < i; l++)
                a[l] === 1 && r++;
        var c = e.getHeight() * e.getWidth()
          , u = Math.floor(Math.abs(r * 2 - c) * 10 / c);
        return u * t.N4
    }
    ,
    t.getDataMaskBit = function(e, r, n) {
        var i, o;
        switch (e) {
        case 0:
            i = n + r & 1;
            break;
        case 1:
            i = n & 1;
            break;
        case 2:
            i = r % 3;
            break;
        case 3:
            i = (n + r) % 3;
            break;
        case 4:
            i = Math.floor(n / 2) + Math.floor(r / 3) & 1;
            break;
        case 5:
            o = n * r,
            i = (o & 1) + o % 3;
            break;
        case 6:
            o = n * r,
            i = (o & 1) + o % 3 & 1;
            break;
        case 7:
            o = n * r,
            i = o % 3 + (n + r & 1) & 1;
            break;
        default:
            throw new Me("Invalid mask pattern: " + e)
        }
        return i === 0
    }
    ,
    t.applyMaskPenaltyRule1Internal = function(e, r) {
        for (var n = 0, i = r ? e.getHeight() : e.getWidth(), o = r ? e.getWidth() : e.getHeight(), s = e.getArray(), a = 0; a < i; a++) {
            for (var l = 0, c = -1, u = 0; u < o; u++) {
                var f = r ? s[a][u] : s[u][a];
                f === c ? l++ : (l >= 5 && (n += t.N1 + (l - 5)),
                l = 1,
                c = f)
            }
            l >= 5 && (n += t.N1 + (l - 5))
        }
        return n
    }
    ,
    t.N1 = 3,
    t.N2 = 3,
    t.N3 = 40,
    t.N4 = 10,
    t
}()
  , TCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , DCe = function() {
    function t(e, r) {
        this.width = e,
        this.height = r;
        for (var n = new Array(r), i = 0; i !== r; i++)
            n[i] = new Uint8Array(e);
        this.bytes = n
    }
    return t.prototype.getHeight = function() {
        return this.height
    }
    ,
    t.prototype.getWidth = function() {
        return this.width
    }
    ,
    t.prototype.get = function(e, r) {
        return this.bytes[r][e]
    }
    ,
    t.prototype.getArray = function() {
        return this.bytes
    }
    ,
    t.prototype.setNumber = function(e, r, n) {
        this.bytes[r][e] = n
    }
    ,
    t.prototype.setBoolean = function(e, r, n) {
        this.bytes[r][e] = n ? 1 : 0
    }
    ,
    t.prototype.clear = function(e) {
        var r, n;
        try {
            for (var i = TCe(this.bytes), o = i.next(); !o.done; o = i.next()) {
                var s = o.value;
                br.fill(s, e)
            }
        } catch (a) {
            r = {
                error: a
            }
        } finally {
            try {
                o && !o.done && (n = i.return) && n.call(i)
            } finally {
                if (r)
                    throw r.error
            }
        }
    }
    ,
    t.prototype.equals = function(e) {
        if (!(e instanceof t))
            return !1;
        var r = e;
        if (this.width !== r.width || this.height !== r.height)
            return !1;
        for (var n = 0, i = this.height; n < i; ++n)
            for (var o = this.bytes[n], s = r.bytes[n], a = 0, l = this.width; a < l; ++a)
                if (o[a] !== s[a])
                    return !1;
        return !0
    }
    ,
    t.prototype.toString = function() {
        for (var e = new Ke, r = 0, n = this.height; r < n; ++r) {
            for (var i = this.bytes[r], o = 0, s = this.width; o < s; ++o)
                switch (i[o]) {
                case 0:
                    e.append(" 0");
                    break;
                case 1:
                    e.append(" 1");
                    break;
                default:
                    e.append("  ");
                    break
                }
            e.append(`
`)
        }
        return e.toString()
    }
    ,
    t
}()
  , zE = function() {
    function t() {
        this.maskPattern = -1
    }
    return t.prototype.getMode = function() {
        return this.mode
    }
    ,
    t.prototype.getECLevel = function() {
        return this.ecLevel
    }
    ,
    t.prototype.getVersion = function() {
        return this.version
    }
    ,
    t.prototype.getMaskPattern = function() {
        return this.maskPattern
    }
    ,
    t.prototype.getMatrix = function() {
        return this.matrix
    }
    ,
    t.prototype.toString = function() {
        var e = new Ke;
        return e.append(`<<
`),
        e.append(" mode: "),
        e.append(this.mode ? this.mode.toString() : "null"),
        e.append(`
 ecLevel: `),
        e.append(this.ecLevel ? this.ecLevel.toString() : "null"),
        e.append(`
 version: `),
        e.append(this.version ? this.version.toString() : "null"),
        e.append(`
 maskPattern: `),
        e.append(this.maskPattern.toString()),
        this.matrix ? (e.append(`
 matrix:
`),
        e.append(this.matrix.toString())) : e.append(`
 matrix: null
`),
        e.append(`>>
`),
        e.toString()
    }
    ,
    t.prototype.setMode = function(e) {
        this.mode = e
    }
    ,
    t.prototype.setECLevel = function(e) {
        this.ecLevel = e
    }
    ,
    t.prototype.setVersion = function(e) {
        this.version = e
    }
    ,
    t.prototype.setMaskPattern = function(e) {
        this.maskPattern = e
    }
    ,
    t.prototype.setMatrix = function(e) {
        this.matrix = e
    }
    ,
    t.isValidMaskPattern = function(e) {
        return e >= 0 && e < t.NUM_MASK_PATTERNS
    }
    ,
    t.NUM_MASK_PATTERNS = 8,
    t
}()
  , FCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , kt = function(t) {
    FCe(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.kind = "WriterException",
    e
}(Mn)
  , v6 = function() {
    function t() {}
    return t.clearMatrix = function(e) {
        e.clear(255)
    }
    ,
    t.buildMatrix = function(e, r, n, i, o) {
        t.clearMatrix(o),
        t.embedBasicPatterns(n, o),
        t.embedTypeInfo(r, i, o),
        t.maybeEmbedVersionInfo(n, o),
        t.embedDataBits(e, i, o)
    }
    ,
    t.embedBasicPatterns = function(e, r) {
        t.embedPositionDetectionPatternsAndSeparators(r),
        t.embedDarkDotAtLeftBottomCorner(r),
        t.maybeEmbedPositionAdjustmentPatterns(e, r),
        t.embedTimingPatterns(r)
    }
    ,
    t.embedTypeInfo = function(e, r, n) {
        var i = new kr;
        t.makeTypeInfoBits(e, r, i);
        for (var o = 0, s = i.getSize(); o < s; ++o) {
            var a = i.get(i.getSize() - 1 - o)
              , l = t.TYPE_INFO_COORDINATES[o]
              , c = l[0]
              , u = l[1];
            if (n.setBoolean(c, u, a),
            o < 8) {
                var f = n.getWidth() - o - 1
                  , d = 8;
                n.setBoolean(f, d, a)
            } else {
                var f = 8
                  , d = n.getHeight() - 7 + (o - 8);
                n.setBoolean(f, d, a)
            }
        }
    }
    ,
    t.maybeEmbedVersionInfo = function(e, r) {
        if (!(e.getVersionNumber() < 7)) {
            var n = new kr;
            t.makeVersionInfoBits(e, n);
            for (var i = 6 * 3 - 1, o = 0; o < 6; ++o)
                for (var s = 0; s < 3; ++s) {
                    var a = n.get(i);
                    i--,
                    r.setBoolean(o, r.getHeight() - 11 + s, a),
                    r.setBoolean(r.getHeight() - 11 + s, o, a)
                }
        }
    }
    ,
    t.embedDataBits = function(e, r, n) {
        for (var i = 0, o = -1, s = n.getWidth() - 1, a = n.getHeight() - 1; s > 0; ) {
            for (s === 6 && (s -= 1); a >= 0 && a < n.getHeight(); ) {
                for (var l = 0; l < 2; ++l) {
                    var c = s - l;
                    if (t.isEmpty(n.get(c, a))) {
                        var u = void 0;
                        i < e.getSize() ? (u = e.get(i),
                        ++i) : u = !1,
                        r !== 255 && g0.getDataMaskBit(r, c, a) && (u = !u),
                        n.setBoolean(c, a, u)
                    }
                }
                a += o
            }
            o = -o,
            a += o,
            s -= 2
        }
        if (i !== e.getSize())
            throw new kt("Not all bits consumed: " + i + "/" + e.getSize())
    }
    ,
    t.findMSBSet = function(e) {
        return 32 - qe.numberOfLeadingZeros(e)
    }
    ,
    t.calculateBCHCode = function(e, r) {
        if (r === 0)
            throw new Me("0 polynomial");
        var n = t.findMSBSet(r);
        for (e <<= n - 1; t.findMSBSet(e) >= n; )
            e ^= r << t.findMSBSet(e) - n;
        return e
    }
    ,
    t.makeTypeInfoBits = function(e, r, n) {
        if (!zE.isValidMaskPattern(r))
            throw new kt("Invalid mask pattern");
        var i = e.getBits() << 3 | r;
        n.appendBits(i, 5);
        var o = t.calculateBCHCode(i, t.TYPE_INFO_POLY);
        n.appendBits(o, 10);
        var s = new kr;
        if (s.appendBits(t.TYPE_INFO_MASK_PATTERN, 15),
        n.xor(s),
        n.getSize() !== 15)
            throw new kt("should not happen but we got: " + n.getSize())
    }
    ,
    t.makeVersionInfoBits = function(e, r) {
        r.appendBits(e.getVersionNumber(), 6);
        var n = t.calculateBCHCode(e.getVersionNumber(), t.VERSION_INFO_POLY);
        if (r.appendBits(n, 12),
        r.getSize() !== 18)
            throw new kt("should not happen but we got: " + r.getSize())
    }
    ,
    t.isEmpty = function(e) {
        return e === 255
    }
    ,
    t.embedTimingPatterns = function(e) {
        for (var r = 8; r < e.getWidth() - 8; ++r) {
            var n = (r + 1) % 2;
            t.isEmpty(e.get(r, 6)) && e.setNumber(r, 6, n),
            t.isEmpty(e.get(6, r)) && e.setNumber(6, r, n)
        }
    }
    ,
    t.embedDarkDotAtLeftBottomCorner = function(e) {
        if (e.get(8, e.getHeight() - 8) === 0)
            throw new kt;
        e.setNumber(8, e.getHeight() - 8, 1)
    }
    ,
    t.embedHorizontalSeparationPattern = function(e, r, n) {
        for (var i = 0; i < 8; ++i) {
            if (!t.isEmpty(n.get(e + i, r)))
                throw new kt;
            n.setNumber(e + i, r, 0)
        }
    }
    ,
    t.embedVerticalSeparationPattern = function(e, r, n) {
        for (var i = 0; i < 7; ++i) {
            if (!t.isEmpty(n.get(e, r + i)))
                throw new kt;
            n.setNumber(e, r + i, 0)
        }
    }
    ,
    t.embedPositionAdjustmentPattern = function(e, r, n) {
        for (var i = 0; i < 5; ++i)
            for (var o = t.POSITION_ADJUSTMENT_PATTERN[i], s = 0; s < 5; ++s)
                n.setNumber(e + s, r + i, o[s])
    }
    ,
    t.embedPositionDetectionPattern = function(e, r, n) {
        for (var i = 0; i < 7; ++i)
            for (var o = t.POSITION_DETECTION_PATTERN[i], s = 0; s < 7; ++s)
                n.setNumber(e + s, r + i, o[s])
    }
    ,
    t.embedPositionDetectionPatternsAndSeparators = function(e) {
        var r = t.POSITION_DETECTION_PATTERN[0].length;
        t.embedPositionDetectionPattern(0, 0, e),
        t.embedPositionDetectionPattern(e.getWidth() - r, 0, e),
        t.embedPositionDetectionPattern(0, e.getWidth() - r, e);
        var n = 8;
        t.embedHorizontalSeparationPattern(0, n - 1, e),
        t.embedHorizontalSeparationPattern(e.getWidth() - n, n - 1, e),
        t.embedHorizontalSeparationPattern(0, e.getWidth() - n, e);
        var i = 7;
        t.embedVerticalSeparationPattern(i, 0, e),
        t.embedVerticalSeparationPattern(e.getHeight() - i - 1, 0, e),
        t.embedVerticalSeparationPattern(i, e.getHeight() - i, e)
    }
    ,
    t.maybeEmbedPositionAdjustmentPatterns = function(e, r) {
        if (!(e.getVersionNumber() < 2))
            for (var n = e.getVersionNumber() - 1, i = t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[n], o = 0, s = i.length; o !== s; o++) {
                var a = i[o];
                if (a >= 0)
                    for (var l = 0; l !== s; l++) {
                        var c = i[l];
                        c >= 0 && t.isEmpty(r.get(c, a)) && t.embedPositionAdjustmentPattern(c - 2, a - 2, r)
                    }
            }
    }
    ,
    t.POSITION_DETECTION_PATTERN = Array.from([Int32Array.from([1, 1, 1, 1, 1, 1, 1]), Int32Array.from([1, 0, 0, 0, 0, 0, 1]), Int32Array.from([1, 0, 1, 1, 1, 0, 1]), Int32Array.from([1, 0, 1, 1, 1, 0, 1]), Int32Array.from([1, 0, 1, 1, 1, 0, 1]), Int32Array.from([1, 0, 0, 0, 0, 0, 1]), Int32Array.from([1, 1, 1, 1, 1, 1, 1])]),
    t.POSITION_ADJUSTMENT_PATTERN = Array.from([Int32Array.from([1, 1, 1, 1, 1]), Int32Array.from([1, 0, 0, 0, 1]), Int32Array.from([1, 0, 1, 0, 1]), Int32Array.from([1, 0, 0, 0, 1]), Int32Array.from([1, 1, 1, 1, 1])]),
    t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE = Array.from([Int32Array.from([-1, -1, -1, -1, -1, -1, -1]), Int32Array.from([6, 18, -1, -1, -1, -1, -1]), Int32Array.from([6, 22, -1, -1, -1, -1, -1]), Int32Array.from([6, 26, -1, -1, -1, -1, -1]), Int32Array.from([6, 30, -1, -1, -1, -1, -1]), Int32Array.from([6, 34, -1, -1, -1, -1, -1]), Int32Array.from([6, 22, 38, -1, -1, -1, -1]), Int32Array.from([6, 24, 42, -1, -1, -1, -1]), Int32Array.from([6, 26, 46, -1, -1, -1, -1]), Int32Array.from([6, 28, 50, -1, -1, -1, -1]), Int32Array.from([6, 30, 54, -1, -1, -1, -1]), Int32Array.from([6, 32, 58, -1, -1, -1, -1]), Int32Array.from([6, 34, 62, -1, -1, -1, -1]), Int32Array.from([6, 26, 46, 66, -1, -1, -1]), Int32Array.from([6, 26, 48, 70, -1, -1, -1]), Int32Array.from([6, 26, 50, 74, -1, -1, -1]), Int32Array.from([6, 30, 54, 78, -1, -1, -1]), Int32Array.from([6, 30, 56, 82, -1, -1, -1]), Int32Array.from([6, 30, 58, 86, -1, -1, -1]), Int32Array.from([6, 34, 62, 90, -1, -1, -1]), Int32Array.from([6, 28, 50, 72, 94, -1, -1]), Int32Array.from([6, 26, 50, 74, 98, -1, -1]), Int32Array.from([6, 30, 54, 78, 102, -1, -1]), Int32Array.from([6, 28, 54, 80, 106, -1, -1]), Int32Array.from([6, 32, 58, 84, 110, -1, -1]), Int32Array.from([6, 30, 58, 86, 114, -1, -1]), Int32Array.from([6, 34, 62, 90, 118, -1, -1]), Int32Array.from([6, 26, 50, 74, 98, 122, -1]), Int32Array.from([6, 30, 54, 78, 102, 126, -1]), Int32Array.from([6, 26, 52, 78, 104, 130, -1]), Int32Array.from([6, 30, 56, 82, 108, 134, -1]), Int32Array.from([6, 34, 60, 86, 112, 138, -1]), Int32Array.from([6, 30, 58, 86, 114, 142, -1]), Int32Array.from([6, 34, 62, 90, 118, 146, -1]), Int32Array.from([6, 30, 54, 78, 102, 126, 150]), Int32Array.from([6, 24, 50, 76, 102, 128, 154]), Int32Array.from([6, 28, 54, 80, 106, 132, 158]), Int32Array.from([6, 32, 58, 84, 110, 136, 162]), Int32Array.from([6, 26, 54, 82, 110, 138, 166]), Int32Array.from([6, 30, 58, 86, 114, 142, 170])]),
    t.TYPE_INFO_COORDINATES = Array.from([Int32Array.from([8, 0]), Int32Array.from([8, 1]), Int32Array.from([8, 2]), Int32Array.from([8, 3]), Int32Array.from([8, 4]), Int32Array.from([8, 5]), Int32Array.from([8, 7]), Int32Array.from([8, 8]), Int32Array.from([7, 8]), Int32Array.from([5, 8]), Int32Array.from([4, 8]), Int32Array.from([3, 8]), Int32Array.from([2, 8]), Int32Array.from([1, 8]), Int32Array.from([0, 8])]),
    t.VERSION_INFO_POLY = 7973,
    t.TYPE_INFO_POLY = 1335,
    t.TYPE_INFO_MASK_PATTERN = 21522,
    t
}()
  , PCe = function() {
    function t(e, r) {
        this.dataBytes = e,
        this.errorCorrectionBytes = r
    }
    return t.prototype.getDataBytes = function() {
        return this.dataBytes
    }
    ,
    t.prototype.getErrorCorrectionBytes = function() {
        return this.errorCorrectionBytes
    }
    ,
    t
}()
  , y6 = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
;
(function() {
    function t() {}
    return t.calculateMaskPenalty = function(e) {
        return g0.applyMaskPenaltyRule1(e) + g0.applyMaskPenaltyRule2(e) + g0.applyMaskPenaltyRule3(e) + g0.applyMaskPenaltyRule4(e)
    }
    ,
    t.encode = function(e, r, n) {
        n === void 0 && (n = null);
        var i = t.DEFAULT_BYTE_MODE_ENCODING
          , o = n !== null && n.get(Dh.CHARACTER_SET) !== void 0;
        o && (i = n.get(Dh.CHARACTER_SET).toString());
        var s = this.chooseMode(e, i)
          , a = new kr;
        if (s === Rt.BYTE && (o || t.DEFAULT_BYTE_MODE_ENCODING !== i)) {
            var l = _r.getCharacterSetECIByName(i);
            l !== void 0 && this.appendECI(l, a)
        }
        this.appendModeInfo(s, a);
        var c = new kr;
        this.appendBytes(e, s, c, i);
        var u;
        if (n !== null && n.get(Dh.QR_VERSION) !== void 0) {
            var f = Number.parseInt(n.get(Dh.QR_VERSION).toString(), 10);
            u = ul.getVersionForNumber(f);
            var d = this.calculateBitsNeeded(s, a, c, u);
            if (!this.willFit(d, u, r))
                throw new kt("Data too big for requested version")
        } else
            u = this.recommendVersion(r, s, a, c);
        var h = new kr;
        h.appendBitArray(a);
        var x = s === Rt.BYTE ? c.getSizeInBytes() : e.length;
        this.appendLengthInfo(x, u, s, h),
        h.appendBitArray(c);
        var y = u.getECBlocksForLevel(r)
          , m = u.getTotalCodewords() - y.getTotalECCodewords();
        this.terminateBits(m, h);
        var E = this.interleaveWithECBytes(h, u.getTotalCodewords(), m, y.getNumBlocks())
          , g = new zE;
        g.setECLevel(r),
        g.setMode(s),
        g.setVersion(u);
        var p = u.getDimensionForVersion()
          , v = new DCe(p,p)
          , _ = this.chooseMaskPattern(E, r, u, v);
        return g.setMaskPattern(_),
        v6.buildMatrix(E, r, u, _, v),
        g.setMatrix(v),
        g
    }
    ,
    t.recommendVersion = function(e, r, n, i) {
        var o = this.calculateBitsNeeded(r, n, i, ul.getVersionForNumber(1))
          , s = this.chooseVersion(o, e)
          , a = this.calculateBitsNeeded(r, n, i, s);
        return this.chooseVersion(a, e)
    }
    ,
    t.calculateBitsNeeded = function(e, r, n, i) {
        return r.getSize() + e.getCharacterCountBits(i) + n.getSize()
    }
    ,
    t.getAlphanumericCode = function(e) {
        return e < t.ALPHANUMERIC_TABLE.length ? t.ALPHANUMERIC_TABLE[e] : -1
    }
    ,
    t.chooseMode = function(e, r) {
        if (r === void 0 && (r = null),
        _r.SJIS.getName() === r && this.isOnlyDoubleByteKanji(e))
            return Rt.KANJI;
        for (var n = !1, i = !1, o = 0, s = e.length; o < s; ++o) {
            var a = e.charAt(o);
            if (t.isDigit(a))
                n = !0;
            else if (this.getAlphanumericCode(a.charCodeAt(0)) !== -1)
                i = !0;
            else
                return Rt.BYTE
        }
        return i ? Rt.ALPHANUMERIC : n ? Rt.NUMERIC : Rt.BYTE
    }
    ,
    t.isOnlyDoubleByteKanji = function(e) {
        var r;
        try {
            r = mi.encode(e, _r.SJIS)
        } catch {
            return !1
        }
        var n = r.length;
        if (n % 2 !== 0)
            return !1;
        for (var i = 0; i < n; i += 2) {
            var o = r[i] & 255;
            if ((o < 129 || o > 159) && (o < 224 || o > 235))
                return !1
        }
        return !0
    }
    ,
    t.chooseMaskPattern = function(e, r, n, i) {
        for (var o = Number.MAX_SAFE_INTEGER, s = -1, a = 0; a < zE.NUM_MASK_PATTERNS; a++) {
            v6.buildMatrix(e, r, n, a, i);
            var l = this.calculateMaskPenalty(i);
            l < o && (o = l,
            s = a)
        }
        return s
    }
    ,
    t.chooseVersion = function(e, r) {
        for (var n = 1; n <= 40; n++) {
            var i = ul.getVersionForNumber(n);
            if (t.willFit(e, i, r))
                return i
        }
        throw new kt("Data too big")
    }
    ,
    t.willFit = function(e, r, n) {
        var i = r.getTotalCodewords()
          , o = r.getECBlocksForLevel(n)
          , s = o.getTotalECCodewords()
          , a = i - s
          , l = (e + 7) / 8;
        return a >= l
    }
    ,
    t.terminateBits = function(e, r) {
        var n = e * 8;
        if (r.getSize() > n)
            throw new kt("data bits cannot fit in the QR Code" + r.getSize() + " > " + n);
        for (var i = 0; i < 4 && r.getSize() < n; ++i)
            r.appendBit(!1);
        var o = r.getSize() & 7;
        if (o > 0)
            for (var i = o; i < 8; i++)
                r.appendBit(!1);
        for (var s = e - r.getSizeInBytes(), i = 0; i < s; ++i)
            r.appendBits(i & 1 ? 17 : 236, 8);
        if (r.getSize() !== n)
            throw new kt("Bits size does not equal capacity")
    }
    ,
    t.getNumDataBytesAndNumECBytesForBlockID = function(e, r, n, i, o, s) {
        if (i >= n)
            throw new kt("Block ID too large");
        var a = e % n
          , l = n - a
          , c = Math.floor(e / n)
          , u = c + 1
          , f = Math.floor(r / n)
          , d = f + 1
          , h = c - f
          , x = u - d;
        if (h !== x)
            throw new kt("EC bytes mismatch");
        if (n !== l + a)
            throw new kt("RS blocks mismatch");
        if (e !== (f + h) * l + (d + x) * a)
            throw new kt("Total bytes mismatch");
        i < l ? (o[0] = f,
        s[0] = h) : (o[0] = d,
        s[0] = x)
    }
    ,
    t.interleaveWithECBytes = function(e, r, n, i) {
        var o, s, a, l;
        if (e.getSizeInBytes() !== n)
            throw new kt("Number of bits and data bytes does not match");
        for (var c = 0, u = 0, f = 0, d = new Array, h = 0; h < i; ++h) {
            var x = new Int32Array(1)
              , y = new Int32Array(1);
            t.getNumDataBytesAndNumECBytesForBlockID(r, n, i, h, x, y);
            var m = x[0]
              , E = new Uint8Array(m);
            e.toBytes(8 * c, E, 0, m);
            var g = t.generateECBytes(E, y[0]);
            d.push(new PCe(E,g)),
            u = Math.max(u, m),
            f = Math.max(f, g.length),
            c += x[0]
        }
        if (n !== c)
            throw new kt("Data bytes does not match offset");
        for (var p = new kr, h = 0; h < u; ++h)
            try {
                for (var v = (o = void 0,
                y6(d)), _ = v.next(); !_.done; _ = v.next()) {
                    var b = _.value
                      , E = b.getDataBytes();
                    h < E.length && p.appendBits(E[h], 8)
                }
            } catch (A) {
                o = {
                    error: A
                }
            } finally {
                try {
                    _ && !_.done && (s = v.return) && s.call(v)
                } finally {
                    if (o)
                        throw o.error
                }
            }
        for (var h = 0; h < f; ++h)
            try {
                for (var C = (a = void 0,
                y6(d)), B = C.next(); !B.done; B = C.next()) {
                    var b = B.value
                      , g = b.getErrorCorrectionBytes();
                    h < g.length && p.appendBits(g[h], 8)
                }
            } catch (A) {
                a = {
                    error: A
                }
            } finally {
                try {
                    B && !B.done && (l = C.return) && l.call(C)
                } finally {
                    if (a)
                        throw a.error
                }
            }
        if (r !== p.getSizeInBytes())
            throw new kt("Interleaving error: " + r + " and " + p.getSizeInBytes() + " differ.");
        return p
    }
    ,
    t.generateECBytes = function(e, r) {
        for (var n = e.length, i = new Int32Array(n + r), o = 0; o < n; o++)
            i[o] = e[o] & 255;
        new yM(wn.QR_CODE_FIELD_256).encode(i, r);
        for (var s = new Uint8Array(r), o = 0; o < r; o++)
            s[o] = i[n + o];
        return s
    }
    ,
    t.appendModeInfo = function(e, r) {
        r.appendBits(e.getBits(), 4)
    }
    ,
    t.appendLengthInfo = function(e, r, n, i) {
        var o = n.getCharacterCountBits(r);
        if (e >= 1 << o)
            throw new kt(e + " is bigger than " + ((1 << o) - 1));
        i.appendBits(e, o)
    }
    ,
    t.appendBytes = function(e, r, n, i) {
        switch (r) {
        case Rt.NUMERIC:
            t.appendNumericBytes(e, n);
            break;
        case Rt.ALPHANUMERIC:
            t.appendAlphanumericBytes(e, n);
            break;
        case Rt.BYTE:
            t.append8BitBytes(e, n, i);
            break;
        case Rt.KANJI:
            t.appendKanjiBytes(e, n);
            break;
        default:
            throw new kt("Invalid mode: " + r)
        }
    }
    ,
    t.getDigit = function(e) {
        return e.charCodeAt(0) - 48
    }
    ,
    t.isDigit = function(e) {
        var r = t.getDigit(e);
        return r >= 0 && r <= 9
    }
    ,
    t.appendNumericBytes = function(e, r) {
        for (var n = e.length, i = 0; i < n; ) {
            var o = t.getDigit(e.charAt(i));
            if (i + 2 < n) {
                var s = t.getDigit(e.charAt(i + 1))
                  , a = t.getDigit(e.charAt(i + 2));
                r.appendBits(o * 100 + s * 10 + a, 10),
                i += 3
            } else if (i + 1 < n) {
                var s = t.getDigit(e.charAt(i + 1));
                r.appendBits(o * 10 + s, 7),
                i += 2
            } else
                r.appendBits(o, 4),
                i++
        }
    }
    ,
    t.appendAlphanumericBytes = function(e, r) {
        for (var n = e.length, i = 0; i < n; ) {
            var o = t.getAlphanumericCode(e.charCodeAt(i));
            if (o === -1)
                throw new kt;
            if (i + 1 < n) {
                var s = t.getAlphanumericCode(e.charCodeAt(i + 1));
                if (s === -1)
                    throw new kt;
                r.appendBits(o * 45 + s, 11),
                i += 2
            } else
                r.appendBits(o, 6),
                i++
        }
    }
    ,
    t.append8BitBytes = function(e, r, n) {
        var i;
        try {
            i = mi.encode(e, n)
        } catch (l) {
            throw new kt(l)
        }
        for (var o = 0, s = i.length; o !== s; o++) {
            var a = i[o];
            r.appendBits(a, 8)
        }
    }
    ,
    t.appendKanjiBytes = function(e, r) {
        var n;
        try {
            n = mi.encode(e, _r.SJIS)
        } catch (f) {
            throw new kt(f)
        }
        for (var i = n.length, o = 0; o < i; o += 2) {
            var s = n[o] & 255
              , a = n[o + 1] & 255
              , l = s << 8 & 4294967295 | a
              , c = -1;
            if (l >= 33088 && l <= 40956 ? c = l - 33088 : l >= 57408 && l <= 60351 && (c = l - 49472),
            c === -1)
                throw new kt("Invalid byte sequence");
            var u = (c >> 8) * 192 + (c & 255);
            r.appendBits(u, 13)
        }
    }
    ,
    t.appendECI = function(e, r) {
        r.appendBits(Rt.ECI.getBits(), 4),
        r.appendBits(e.getValue(), 8)
    }
    ,
    t.ALPHANUMERIC_TABLE = Int32Array.from([-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, 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1]),
    t.DEFAULT_BYTE_MODE_ENCODING = _r.UTF8.getName(),
    t
}
)();
var ICe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    ICe(e, t);
    function e(r, n, i, o, s, a, l, c) {
        var u = t.call(this, a, l) || this;
        if (u.yuvData = r,
        u.dataWidth = n,
        u.dataHeight = i,
        u.left = o,
        u.top = s,
        o + a > n || s + l > i)
            throw new Me("Crop rectangle does not fit within image data.");
        return c && u.reverseHorizontal(a, l),
        u
    }
    return e.prototype.getRow = function(r, n) {
        if (r < 0 || r >= this.getHeight())
            throw new Me("Requested row is outside the image: " + r);
        var i = this.getWidth();
        (n == null || n.length < i) && (n = new Uint8ClampedArray(i));
        var o = (r + this.top) * this.dataWidth + this.left;
        return Dt.arraycopy(this.yuvData, o, n, 0, i),
        n
    }
    ,
    e.prototype.getMatrix = function() {
        var r = this.getWidth()
          , n = this.getHeight();
        if (r === this.dataWidth && n === this.dataHeight)
            return this.yuvData;
        var i = r * n
          , o = new Uint8ClampedArray(i)
          , s = this.top * this.dataWidth + this.left;
        if (r === this.dataWidth)
            return Dt.arraycopy(this.yuvData, s, o, 0, i),
            o;
        for (var a = 0; a < n; a++) {
            var l = a * r;
            Dt.arraycopy(this.yuvData, s, o, l, r),
            s += this.dataWidth
        }
        return o
    }
    ,
    e.prototype.isCropSupported = function() {
        return !0
    }
    ,
    e.prototype.crop = function(r, n, i, o) {
        return new e(this.yuvData,this.dataWidth,this.dataHeight,this.left + r,this.top + n,i,o,!1)
    }
    ,
    e.prototype.renderThumbnail = function() {
        for (var r = this.getWidth() / e.THUMBNAIL_SCALE_FACTOR, n = this.getHeight() / e.THUMBNAIL_SCALE_FACTOR, i = new Int32Array(r * n), o = this.yuvData, s = this.top * this.dataWidth + this.left, a = 0; a < n; a++) {
            for (var l = a * r, c = 0; c < r; c++) {
                var u = o[s + c * e.THUMBNAIL_SCALE_FACTOR] & 255;
                i[l + c] = 4278190080 | u * 65793
            }
            s += this.dataWidth * e.THUMBNAIL_SCALE_FACTOR
        }
        return i
    }
    ,
    e.prototype.getThumbnailWidth = function() {
        return this.getWidth() / e.THUMBNAIL_SCALE_FACTOR
    }
    ,
    e.prototype.getThumbnailHeight = function() {
        return this.getHeight() / e.THUMBNAIL_SCALE_FACTOR
    }
    ,
    e.prototype.reverseHorizontal = function(r, n) {
        for (var i = this.yuvData, o = 0, s = this.top * this.dataWidth + this.left; o < n; o++,
        s += this.dataWidth)
            for (var a = s + r / 2, l = s, c = s + r - 1; l < a; l++,
            c--) {
                var u = i[l];
                i[l] = i[c],
                i[c] = u
            }
    }
    ,
    e.prototype.invert = function() {
        return new P1(this)
    }
    ,
    e.THUMBNAIL_SCALE_FACTOR = 2,
    e
}
)(yd);
var OCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    OCe(e, t);
    function e(r, n, i, o, s, a, l) {
        var c = t.call(this, n, i) || this;
        if (c.dataWidth = o,
        c.dataHeight = s,
        c.left = a,
        c.top = l,
        r.BYTES_PER_ELEMENT === 4) {
            for (var u = n * i, f = new Uint8ClampedArray(u), d = 0; d < u; d++) {
                var h = r[d]
                  , x = h >> 16 & 255
                  , y = h >> 7 & 510
                  , m = h & 255;
                f[d] = (x + y + m) / 4 & 255
            }
            c.luminances = f
        } else
            c.luminances = r;
        if (o === void 0 && (c.dataWidth = n),
        s === void 0 && (c.dataHeight = i),
        a === void 0 && (c.left = 0),
        l === void 0 && (c.top = 0),
        c.left + n > c.dataWidth || c.top + i > c.dataHeight)
            throw new Me("Crop rectangle does not fit within image data.");
        return c
    }
    return e.prototype.getRow = function(r, n) {
        if (r < 0 || r >= this.getHeight())
            throw new Me("Requested row is outside the image: " + r);
        var i = this.getWidth();
        (n == null || n.length < i) && (n = new Uint8ClampedArray(i));
        var o = (r + this.top) * this.dataWidth + this.left;
        return Dt.arraycopy(this.luminances, o, n, 0, i),
        n
    }
    ,
    e.prototype.getMatrix = function() {
        var r = this.getWidth()
          , n = this.getHeight();
        if (r === this.dataWidth && n === this.dataHeight)
            return this.luminances;
        var i = r * n
          , o = new Uint8ClampedArray(i)
          , s = this.top * this.dataWidth + this.left;
        if (r === this.dataWidth)
            return Dt.arraycopy(this.luminances, s, o, 0, i),
            o;
        for (var a = 0; a < n; a++) {
            var l = a * r;
            Dt.arraycopy(this.luminances, s, o, l, r),
            s += this.dataWidth
        }
        return o
    }
    ,
    e.prototype.isCropSupported = function() {
        return !0
    }
    ,
    e.prototype.crop = function(r, n, i, o) {
        return new e(this.luminances,i,o,this.dataWidth,this.dataHeight,this.left + r,this.top + n)
    }
    ,
    e.prototype.invert = function() {
        return new P1(this)
    }
    ,
    e
}
)(yd);
var kCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}(), RCe = function(t) {
    kCe(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.forName = function(r) {
        return this.getCharacterSetECIByName(r)
    }
    ,
    e
}(_r), MCe = function() {
    function t() {}
    return t.ISO_8859_1 = _r.ISO8859_1,
    t
}(), jE, NCe = 301, LCe = function(t, e) {
    for (var r = 1, n = 0; n < 255; n++)
        e[n] = r,
        t[r] = n,
        r *= 2,
        r >= 256 && (r ^= NCe);
    return {
        LOG: t,
        ALOG: e
    }
};
jE = LCe([], []),
jE.LOG;
jE.ALOG;
var E6;
(function(t) {
    t[t.FORCE_NONE = 0] = "FORCE_NONE",
    t[t.FORCE_SQUARE = 1] = "FORCE_SQUARE",
    t[t.FORCE_RECTANGLE = 2] = "FORCE_RECTANGLE"
}
)(E6 || (E6 = {}));
var _6 = 129
  , EM = 230
  , $Ce = 231
  , UCe = 235
  , GCe = 236
  , HCe = 237
  , VCe = 238
  , zCe = 239
  , jCe = 240
  , Xm = 254
  , WCe = 254
  , b6 = "[)>05"
  , C6 = "[)>06"
  , A6 = ""
  , yt = 0
  , Lr = 1
  , ln = 2
  , mr = 3
  , Dr = 4
  , Yr = 5
  , YCe = function() {
    function t() {}
    return t.prototype.getEncodingMode = function() {
        return yt
    }
    ,
    t.prototype.encode = function(e) {
        var r = Ii.determineConsecutiveDigitCount(e.getMessage(), e.pos);
        if (r >= 2)
            e.writeCodeword(this.encodeASCIIDigits(e.getMessage().charCodeAt(e.pos), e.getMessage().charCodeAt(e.pos + 1))),
            e.pos += 2;
        else {
            var n = e.getCurrentChar()
              , i = Ii.lookAheadTest(e.getMessage(), e.pos, this.getEncodingMode());
            if (i !== this.getEncodingMode())
                switch (i) {
                case Yr:
                    e.writeCodeword($Ce),
                    e.signalEncoderChange(Yr);
                    return;
                case Lr:
                    e.writeCodeword(EM),
                    e.signalEncoderChange(Lr);
                    return;
                case mr:
                    e.writeCodeword(VCe),
                    e.signalEncoderChange(mr);
                    break;
                case ln:
                    e.writeCodeword(zCe),
                    e.signalEncoderChange(ln);
                    break;
                case Dr:
                    e.writeCodeword(jCe),
                    e.signalEncoderChange(Dr);
                    break;
                default:
                    throw new Error("Illegal mode: " + i)
                }
            else
                Ii.isExtendedASCII(n) ? (e.writeCodeword(UCe),
                e.writeCodeword(n - 128 + 1),
                e.pos++) : (e.writeCodeword(n + 1),
                e.pos++)
        }
    }
    ,
    t.prototype.encodeASCIIDigits = function(e, r) {
        if (Ii.isDigit(e) && Ii.isDigit(r)) {
            var n = (e - 48) * 10 + (r - 48);
            return n + 130
        }
        throw new Error("not digits: " + e + r)
    }
    ,
    t
}()
  , XCe = function() {
    function t() {}
    return t.prototype.getEncodingMode = function() {
        return Yr
    }
    ,
    t.prototype.encode = function(e) {
        var r = new Ke;
        for (r.append(0); e.hasMoreCharacters(); ) {
            var n = e.getCurrentChar();
            r.append(n),
            e.pos++;
            var i = Ii.lookAheadTest(e.getMessage(), e.pos, this.getEncodingMode());
            if (i !== this.getEncodingMode()) {
                e.signalEncoderChange(yt);
                break
            }
        }
        var o = r.length() - 1
          , s = 1
          , a = e.getCodewordCount() + o + s;
        e.updateSymbolInfo(a);
        var l = e.getSymbolInfo().getDataCapacity() - a > 0;
        if (e.hasMoreCharacters() || l)
            if (o <= 249)
                r.setCharAt(0, nt.getCharAt(o));
            else if (o <= 1555)
                r.setCharAt(0, nt.getCharAt(Math.floor(o / 250) + 249)),
                r.insert(1, nt.getCharAt(o % 250));
            else
                throw new Error("Message length not in valid ranges: " + o);
        for (var c = 0, n = r.length(); c < n; c++)
            e.writeCodeword(this.randomize255State(r.charAt(c).charCodeAt(0), e.getCodewordCount() + 1))
    }
    ,
    t.prototype.randomize255State = function(e, r) {
        var n = 149 * r % 255 + 1
          , i = e + n;
        return i <= 255 ? i : i - 256
    }
    ,
    t
}()
  , BC = function() {
    function t() {}
    return t.prototype.getEncodingMode = function() {
        return Lr
    }
    ,
    t.prototype.encodeMaximal = function(e) {
        for (var r = new Ke, n = 0, i = e.pos, o = 0; e.hasMoreCharacters(); ) {
            var s = e.getCurrentChar();
            e.pos++,
            n = this.encodeChar(s, r),
            r.length() % 3 === 0 && (i = e.pos,
            o = r.length())
        }
        if (o !== r.length()) {
            var a = Math.floor(r.length() / 3 * 2)
              , l = Math.floor(e.getCodewordCount() + a + 1);
            e.updateSymbolInfo(l);
            var c = e.getSymbolInfo().getDataCapacity() - l
              , u = Math.floor(r.length() % 3);
            (u === 2 && c !== 2 || u === 1 && (n > 3 || c !== 1)) && (e.pos = i)
        }
        r.length() > 0 && e.writeCodeword(EM),
        this.handleEOD(e, r)
    }
    ,
    t.prototype.encode = function(e) {
        for (var r = new Ke; e.hasMoreCharacters(); ) {
            var n = e.getCurrentChar();
            e.pos++;
            var i = this.encodeChar(n, r)
              , o = Math.floor(r.length() / 3) * 2
              , s = e.getCodewordCount() + o;
            e.updateSymbolInfo(s);
            var a = e.getSymbolInfo().getDataCapacity() - s;
            if (!e.hasMoreCharacters()) {
                var l = new Ke;
                for (r.length() % 3 === 2 && a !== 2 && (i = this.backtrackOneCharacter(e, r, l, i)); r.length() % 3 === 1 && (i > 3 || a !== 1); )
                    i = this.backtrackOneCharacter(e, r, l, i);
                break
            }
            var c = r.length();
            if (c % 3 === 0) {
                var u = Ii.lookAheadTest(e.getMessage(), e.pos, this.getEncodingMode());
                if (u !== this.getEncodingMode()) {
                    e.signalEncoderChange(yt);
                    break
                }
            }
        }
        this.handleEOD(e, r)
    }
    ,
    t.prototype.backtrackOneCharacter = function(e, r, n, i) {
        var o = r.length()
          , s = r.toString().substring(0, o - i);
        r.setLengthToZero(),
        r.append(s),
        e.pos--;
        var a = e.getCurrentChar();
        return i = this.encodeChar(a, n),
        e.resetSymbolInfo(),
        i
    }
    ,
    t.prototype.writeNextTriplet = function(e, r) {
        e.writeCodewords(this.encodeToCodewords(r.toString()));
        var n = r.toString().substring(3);
        r.setLengthToZero(),
        r.append(n)
    }
    ,
    t.prototype.handleEOD = function(e, r) {
        var n = Math.floor(r.length() / 3 * 2)
          , i = r.length() % 3
          , o = e.getCodewordCount() + n;
        e.updateSymbolInfo(o);
        var s = e.getSymbolInfo().getDataCapacity() - o;
        if (i === 2) {
            for (r.append("\0"); r.length() >= 3; )
                this.writeNextTriplet(e, r);
            e.hasMoreCharacters() && e.writeCodeword(Xm)
        } else if (s === 1 && i === 1) {
            for (; r.length() >= 3; )
                this.writeNextTriplet(e, r);
            e.hasMoreCharacters() && e.writeCodeword(Xm),
            e.pos--
        } else if (i === 0) {
            for (; r.length() >= 3; )
                this.writeNextTriplet(e, r);
            (s > 0 || e.hasMoreCharacters()) && e.writeCodeword(Xm)
        } else
            throw new Error("Unexpected case. Please report!");
        e.signalEncoderChange(yt)
    }
    ,
    t.prototype.encodeChar = function(e, r) {
        if (e === " ".charCodeAt(0))
            return r.append(3),
            1;
        if (e >= "0".charCodeAt(0) && e <= "9".charCodeAt(0))
            return r.append(e - 48 + 4),
            1;
        if (e >= "A".charCodeAt(0) && e <= "Z".charCodeAt(0))
            return r.append(e - 65 + 14),
            1;
        if (e < " ".charCodeAt(0))
            return r.append(0),
            r.append(e),
            2;
        if (e <= "/".charCodeAt(0))
            return r.append(1),
            r.append(e - 33),
            2;
        if (e <= "@".charCodeAt(0))
            return r.append(1),
            r.append(e - 58 + 15),
            2;
        if (e <= "_".charCodeAt(0))
            return r.append(1),
            r.append(e - 91 + 22),
            2;
        if (e <= 127)
            return r.append(2),
            r.append(e - 96),
            2;
        r.append("1");
        var n = 2;
        return n += this.encodeChar(e - 128, r),
        n
    }
    ,
    t.prototype.encodeToCodewords = function(e) {
        var r = 1600 * e.charCodeAt(0) + 40 * e.charCodeAt(1) + e.charCodeAt(2) + 1
          , n = r / 256
          , i = r % 256
          , o = new Ke;
        return o.append(n),
        o.append(i),
        o.toString()
    }
    ,
    t
}()
  , KCe = function() {
    function t() {}
    return t.prototype.getEncodingMode = function() {
        return Dr
    }
    ,
    t.prototype.encode = function(e) {
        for (var r = new Ke; e.hasMoreCharacters(); ) {
            var n = e.getCurrentChar();
            this.encodeChar(n, r),
            e.pos++;
            var i = r.length();
            if (i >= 4) {
                e.writeCodewords(this.encodeToCodewords(r.toString()));
                var o = r.toString().substring(4);
                r.setLengthToZero(),
                r.append(o);
                var s = Ii.lookAheadTest(e.getMessage(), e.pos, this.getEncodingMode());
                if (s !== this.getEncodingMode()) {
                    e.signalEncoderChange(yt);
                    break
                }
            }
        }
        r.append(nt.getCharAt(31)),
        this.handleEOD(e, r)
    }
    ,
    t.prototype.handleEOD = function(e, r) {
        try {
            var n = r.length();
            if (n === 0)
                return;
            if (n === 1) {
                e.updateSymbolInfo();
                var i = e.getSymbolInfo().getDataCapacity() - e.getCodewordCount()
                  , o = e.getRemainingCharacters();
                if (o > i && (e.updateSymbolInfo(e.getCodewordCount() + 1),
                i = e.getSymbolInfo().getDataCapacity() - e.getCodewordCount()),
                o <= i && i <= 2)
                    return
            }
            if (n > 4)
                throw new Error("Count must not exceed 4");
            var s = n - 1
              , a = this.encodeToCodewords(r.toString())
              , l = !e.hasMoreCharacters()
              , c = l && s <= 2;
            if (s <= 2) {
                e.updateSymbolInfo(e.getCodewordCount() + s);
                var i = e.getSymbolInfo().getDataCapacity() - e.getCodewordCount();
                i >= 3 && (c = !1,
                e.updateSymbolInfo(e.getCodewordCount() + a.length))
            }
            c ? (e.resetSymbolInfo(),
            e.pos -= s) : e.writeCodewords(a)
        } finally {
            e.signalEncoderChange(yt)
        }
    }
    ,
    t.prototype.encodeChar = function(e, r) {
        e >= " ".charCodeAt(0) && e <= "?".charCodeAt(0) ? r.append(e) : e >= "@".charCodeAt(0) && e <= "^".charCodeAt(0) ? r.append(nt.getCharAt(e - 64)) : Ii.illegalCharacter(nt.getCharAt(e))
    }
    ,
    t.prototype.encodeToCodewords = function(e) {
        var r = e.length;
        if (r === 0)
            throw new Error("StringBuilder must not be empty");
        var n = e.charAt(0).charCodeAt(0)
          , i = r >= 2 ? e.charAt(1).charCodeAt(0) : 0
          , o = r >= 3 ? e.charAt(2).charCodeAt(0) : 0
          , s = r >= 4 ? e.charAt(3).charCodeAt(0) : 0
          , a = (n << 18) + (i << 12) + (o << 6) + s
          , l = a >> 16 & 255
          , c = a >> 8 & 255
          , u = a & 255
          , f = new Ke;
        return f.append(l),
        r >= 2 && f.append(c),
        r >= 3 && f.append(u),
        f.toString()
    }
    ,
    t
}()
  , qCe = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , ZCe = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , ht = function() {
    function t(e, r, n, i, o, s, a, l) {
        a === void 0 && (a = 0),
        l === void 0 && (l = 0),
        this.rectangular = e,
        this.dataCapacity = r,
        this.errorCodewords = n,
        this.matrixWidth = i,
        this.matrixHeight = o,
        this.dataRegions = s,
        this.rsBlockData = a,
        this.rsBlockError = l
    }
    return t.lookup = function(e, r, n, i, o) {
        var s, a;
        r === void 0 && (r = 0),
        n === void 0 && (n = null),
        i === void 0 && (i = null),
        o === void 0 && (o = !0);
        try {
            for (var l = ZCe(QCe), c = l.next(); !c.done; c = l.next()) {
                var u = c.value;
                if (!(r === 1 && u.rectangular) && !(r === 2 && !u.rectangular) && !(n != null && (u.getSymbolWidth() < n.getWidth() || u.getSymbolHeight() < n.getHeight())) && !(i != null && (u.getSymbolWidth() > i.getWidth() || u.getSymbolHeight() > i.getHeight())) && e <= u.dataCapacity)
                    return u
            }
        } catch (f) {
            s = {
                error: f
            }
        } finally {
            try {
                c && !c.done && (a = l.return) && a.call(l)
            } finally {
                if (s)
                    throw s.error
            }
        }
        if (o)
            throw new Error("Can't find a symbol arrangement that matches the message. Data codewords: " + e);
        return null
    }
    ,
    t.prototype.getHorizontalDataRegions = function() {
        switch (this.dataRegions) {
        case 1:
            return 1;
        case 2:
        case 4:
            return 2;
        case 16:
            return 4;
        case 36:
            return 6;
        default:
            throw new Error("Cannot handle this number of data regions")
        }
    }
    ,
    t.prototype.getVerticalDataRegions = function() {
        switch (this.dataRegions) {
        case 1:
        case 2:
            return 1;
        case 4:
            return 2;
        case 16:
            return 4;
        case 36:
            return 6;
        default:
            throw new Error("Cannot handle this number of data regions")
        }
    }
    ,
    t.prototype.getSymbolDataWidth = function() {
        return this.getHorizontalDataRegions() * this.matrixWidth
    }
    ,
    t.prototype.getSymbolDataHeight = function() {
        return this.getVerticalDataRegions() * this.matrixHeight
    }
    ,
    t.prototype.getSymbolWidth = function() {
        return this.getSymbolDataWidth() + this.getHorizontalDataRegions() * 2
    }
    ,
    t.prototype.getSymbolHeight = function() {
        return this.getSymbolDataHeight() + this.getVerticalDataRegions() * 2
    }
    ,
    t.prototype.getCodewordCount = function() {
        return this.dataCapacity + this.errorCodewords
    }
    ,
    t.prototype.getInterleavedBlockCount = function() {
        return this.rsBlockData ? this.dataCapacity / this.rsBlockData : 1
    }
    ,
    t.prototype.getDataCapacity = function() {
        return this.dataCapacity
    }
    ,
    t.prototype.getErrorCodewords = function() {
        return this.errorCodewords
    }
    ,
    t.prototype.getDataLengthForInterleavedBlock = function(e) {
        return this.rsBlockData
    }
    ,
    t.prototype.getErrorLengthForInterleavedBlock = function(e) {
        return this.rsBlockError
    }
    ,
    t
}()
  , JCe = function(t) {
    qCe(e, t);
    function e() {
        return t.call(this, !1, 1558, 620, 22, 22, 36, -1, 62) || this
    }
    return e.prototype.getInterleavedBlockCount = function() {
        return 10
    }
    ,
    e.prototype.getDataLengthForInterleavedBlock = function(r) {
        return r <= 8 ? 156 : 155
    }
    ,
    e
}(ht)
  , QCe = [new ht(!1,3,5,8,8,1), new ht(!1,5,7,10,10,1), new ht(!0,5,7,16,6,1), new ht(!1,8,10,12,12,1), new ht(!0,10,11,14,6,2), new ht(!1,12,12,14,14,1), new ht(!0,16,14,24,10,1), new ht(!1,18,14,16,16,1), new ht(!1,22,18,18,18,1), new ht(!0,22,18,16,10,2), new ht(!1,30,20,20,20,1), new ht(!0,32,24,16,14,2), new ht(!1,36,24,22,22,1), new ht(!1,44,28,24,24,1), new ht(!0,49,28,22,14,2), new ht(!1,62,36,14,14,4), new ht(!1,86,42,16,16,4), new ht(!1,114,48,18,18,4), new ht(!1,144,56,20,20,4), new ht(!1,174,68,22,22,4), new ht(!1,204,84,24,24,4,102,42), new ht(!1,280,112,14,14,16,140,56), new ht(!1,368,144,16,16,16,92,36), new ht(!1,456,192,18,18,16,114,48), new ht(!1,576,224,20,20,16,144,56), new ht(!1,696,272,22,22,16,174,68), new ht(!1,816,336,24,24,16,136,56), new ht(!1,1050,408,18,18,36,175,68), new ht(!1,1304,496,20,20,36,163,62), new JCe]
  , e8e = function() {
    function t(e) {
        this.msg = e,
        this.pos = 0,
        this.skipAtEnd = 0;
        for (var r = e.split("").map(function(a) {
            return a.charCodeAt(0)
        }), n = new Ke, i = 0, o = r.length; i < o; i++) {
            var s = String.fromCharCode(r[i] & 255);
            if (s === "?" && e.charAt(i) !== "?")
                throw new Error("Message contains characters outside ISO-8859-1 encoding.");
            n.append(s)
        }
        this.msg = n.toString(),
        this.shape = 0,
        this.codewords = new Ke,
        this.newEncoding = -1
    }
    return t.prototype.setSymbolShape = function(e) {
        this.shape = e
    }
    ,
    t.prototype.setSizeConstraints = function(e, r) {
        this.minSize = e,
        this.maxSize = r
    }
    ,
    t.prototype.getMessage = function() {
        return this.msg
    }
    ,
    t.prototype.setSkipAtEnd = function(e) {
        this.skipAtEnd = e
    }
    ,
    t.prototype.getCurrentChar = function() {
        return this.msg.charCodeAt(this.pos)
    }
    ,
    t.prototype.getCurrent = function() {
        return this.msg.charCodeAt(this.pos)
    }
    ,
    t.prototype.getCodewords = function() {
        return this.codewords
    }
    ,
    t.prototype.writeCodewords = function(e) {
        this.codewords.append(e)
    }
    ,
    t.prototype.writeCodeword = function(e) {
        this.codewords.append(e)
    }
    ,
    t.prototype.getCodewordCount = function() {
        return this.codewords.length()
    }
    ,
    t.prototype.getNewEncoding = function() {
        return this.newEncoding
    }
    ,
    t.prototype.signalEncoderChange = function(e) {
        this.newEncoding = e
    }
    ,
    t.prototype.resetEncoderSignal = function() {
        this.newEncoding = -1
    }
    ,
    t.prototype.hasMoreCharacters = function() {
        return this.pos < this.getTotalMessageCharCount()
    }
    ,
    t.prototype.getTotalMessageCharCount = function() {
        return this.msg.length - this.skipAtEnd
    }
    ,
    t.prototype.getRemainingCharacters = function() {
        return this.getTotalMessageCharCount() - this.pos
    }
    ,
    t.prototype.getSymbolInfo = function() {
        return this.symbolInfo
    }
    ,
    t.prototype.updateSymbolInfo = function(e) {
        e === void 0 && (e = this.getCodewordCount()),
        (this.symbolInfo == null || e > this.symbolInfo.getDataCapacity()) && (this.symbolInfo = ht.lookup(e, this.shape, this.minSize, this.maxSize, !0))
    }
    ,
    t.prototype.resetSymbolInfo = function() {
        this.symbolInfo = null
    }
    ,
    t
}()
  , t8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , r8e = function(t) {
    t8e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.prototype.getEncodingMode = function() {
        return mr
    }
    ,
    e.prototype.encode = function(r) {
        for (var n = new Ke; r.hasMoreCharacters(); ) {
            var i = r.getCurrentChar();
            r.pos++,
            this.encodeChar(i, n);
            var o = n.length();
            if (o % 3 === 0) {
                this.writeNextTriplet(r, n);
                var s = Ii.lookAheadTest(r.getMessage(), r.pos, this.getEncodingMode());
                if (s !== this.getEncodingMode()) {
                    r.signalEncoderChange(yt);
                    break
                }
            }
        }
        this.handleEOD(r, n)
    }
    ,
    e.prototype.encodeChar = function(r, n) {
        switch (r) {
        case 13:
            n.append(0);
            break;
        case "*".charCodeAt(0):
            n.append(1);
            break;
        case ">".charCodeAt(0):
            n.append(2);
            break;
        case " ".charCodeAt(0):
            n.append(3);
            break;
        default:
            r >= "0".charCodeAt(0) && r <= "9".charCodeAt(0) ? n.append(r - 48 + 4) : r >= "A".charCodeAt(0) && r <= "Z".charCodeAt(0) ? n.append(r - 65 + 14) : Ii.illegalCharacter(nt.getCharAt(r));
            break
        }
        return 1
    }
    ,
    e.prototype.handleEOD = function(r, n) {
        r.updateSymbolInfo();
        var i = r.getSymbolInfo().getDataCapacity() - r.getCodewordCount()
          , o = n.length();
        r.pos -= o,
        (r.getRemainingCharacters() > 1 || i > 1 || r.getRemainingCharacters() !== i) && r.writeCodeword(WCe),
        r.getNewEncoding() < 0 && r.signalEncoderChange(yt)
    }
    ,
    e
}(BC)
  , n8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , i8e = function(t) {
    n8e(e, t);
    function e() {
        return t !== null && t.apply(this, arguments) || this
    }
    return e.prototype.getEncodingMode = function() {
        return ln
    }
    ,
    e.prototype.encodeChar = function(r, n) {
        if (r === " ".charCodeAt(0))
            return n.append(3),
            1;
        if (r >= "0".charCodeAt(0) && r <= "9".charCodeAt(0))
            return n.append(r - 48 + 4),
            1;
        if (r >= "a".charCodeAt(0) && r <= "z".charCodeAt(0))
            return n.append(r - 97 + 14),
            1;
        if (r < " ".charCodeAt(0))
            return n.append(0),
            n.append(r),
            2;
        if (r <= "/".charCodeAt(0))
            return n.append(1),
            n.append(r - 33),
            2;
        if (r <= "@".charCodeAt(0))
            return n.append(1),
            n.append(r - 58 + 15),
            2;
        if (r >= "[".charCodeAt(0) && r <= "_".charCodeAt(0))
            return n.append(1),
            n.append(r - 91 + 22),
            2;
        if (r === "`".charCodeAt(0))
            return n.append(2),
            n.append(0),
            2;
        if (r <= "Z".charCodeAt(0))
            return n.append(2),
            n.append(r - 65 + 1),
            2;
        if (r <= 127)
            return n.append(2),
            n.append(r - 123 + 27),
            2;
        n.append("1");
        var i = 2;
        return i += this.encodeChar(r - 128, n),
        i
    }
    ,
    e
}(BC)
  , o8e = function() {
    function t() {}
    return t.randomize253State = function(e) {
        var r = 149 * e % 253 + 1
          , n = _6 + r;
        return n <= 254 ? n : n - 254
    }
    ,
    t.encodeHighLevel = function(e, r, n, i, o) {
        r === void 0 && (r = 0),
        n === void 0 && (n = null),
        i === void 0 && (i = null),
        o === void 0 && (o = !1);
        var s = new BC
          , a = [new YCe, s, new i8e, new r8e, new KCe, new XCe]
          , l = new e8e(e);
        l.setSymbolShape(r),
        l.setSizeConstraints(n, i),
        e.startsWith(b6) && e.endsWith(A6) ? (l.writeCodeword(GCe),
        l.setSkipAtEnd(2),
        l.pos += b6.length) : e.startsWith(C6) && e.endsWith(A6) && (l.writeCodeword(HCe),
        l.setSkipAtEnd(2),
        l.pos += C6.length);
        var c = yt;
        for (o && (s.encodeMaximal(l),
        c = l.getNewEncoding(),
        l.resetEncoderSignal()); l.hasMoreCharacters(); )
            a[c].encode(l),
            l.getNewEncoding() >= 0 && (c = l.getNewEncoding(),
            l.resetEncoderSignal());
        var u = l.getCodewordCount();
        l.updateSymbolInfo();
        var f = l.getSymbolInfo().getDataCapacity();
        u < f && c !== yt && c !== Yr && c !== Dr && l.writeCodeword("þ");
        var d = l.getCodewords();
        for (d.length() < f && d.append(_6); d.length() < f; )
            d.append(this.randomize253State(d.length() + 1));
        return l.getCodewords().toString()
    }
    ,
    t.lookAheadTest = function(e, r, n) {
        var i = this.lookAheadTestIntern(e, r, n);
        if (n === mr && i === mr) {
            for (var o = Math.min(r + 3, e.length), s = r; s < o; s++)
                if (!this.isNativeX12(e.charCodeAt(s)))
                    return yt
        } else if (n === Dr && i === Dr) {
            for (var o = Math.min(r + 4, e.length), s = r; s < o; s++)
                if (!this.isNativeEDIFACT(e.charCodeAt(s)))
                    return yt
        }
        return i
    }
    ,
    t.lookAheadTestIntern = function(e, r, n) {
        if (r >= e.length)
            return n;
        var i;
        n === yt ? i = [0, 1, 1, 1, 1, 1.25] : (i = [1, 2, 2, 2, 2, 2.25],
        i[n] = 0);
        for (var o = 0, s = new Uint8Array(6), a = []; ; ) {
            if (r + o === e.length) {
                br.fill(s, 0),
                br.fill(a, 0);
                var l = this.findMinimums(i, a, qe.MAX_VALUE, s)
                  , c = this.getMinimumCount(s);
                if (a[yt] === l)
                    return yt;
                if (c === 1) {
                    if (s[Yr] > 0)
                        return Yr;
                    if (s[Dr] > 0)
                        return Dr;
                    if (s[ln] > 0)
                        return ln;
                    if (s[mr] > 0)
                        return mr
                }
                return Lr
            }
            var u = e.charCodeAt(r + o);
            if (o++,
            this.isDigit(u) ? i[yt] += .5 : this.isExtendedASCII(u) ? (i[yt] = Math.ceil(i[yt]),
            i[yt] += 2) : (i[yt] = Math.ceil(i[yt]),
            i[yt]++),
            this.isNativeC40(u) ? i[Lr] += 2 / 3 : this.isExtendedASCII(u) ? i[Lr] += 8 / 3 : i[Lr] += 4 / 3,
            this.isNativeText(u) ? i[ln] += 2 / 3 : this.isExtendedASCII(u) ? i[ln] += 8 / 3 : i[ln] += 4 / 3,
            this.isNativeX12(u) ? i[mr] += 2 / 3 : this.isExtendedASCII(u) ? i[mr] += 13 / 3 : i[mr] += 10 / 3,
            this.isNativeEDIFACT(u) ? i[Dr] += 3 / 4 : this.isExtendedASCII(u) ? i[Dr] += 17 / 4 : i[Dr] += 13 / 4,
            this.isSpecialB256(u) ? i[Yr] += 4 : i[Yr]++,
            o >= 4) {
                if (br.fill(s, 0),
                br.fill(a, 0),
                this.findMinimums(i, a, qe.MAX_VALUE, s),
                a[yt] < this.min(a[Yr], a[Lr], a[ln], a[mr], a[Dr]))
                    return yt;
                if (a[Yr] < a[yt] || a[Yr] + 1 < this.min(a[Lr], a[ln], a[mr], a[Dr]))
                    return Yr;
                if (a[Dr] + 1 < this.min(a[Yr], a[Lr], a[ln], a[mr], a[yt]))
                    return Dr;
                if (a[ln] + 1 < this.min(a[Yr], a[Lr], a[Dr], a[mr], a[yt]))
                    return ln;
                if (a[mr] + 1 < this.min(a[Yr], a[Lr], a[Dr], a[ln], a[yt]))
                    return mr;
                if (a[Lr] + 1 < this.min(a[yt], a[Yr], a[Dr], a[ln])) {
                    if (a[Lr] < a[mr])
                        return Lr;
                    if (a[Lr] === a[mr]) {
                        for (var f = r + o + 1; f < e.length; ) {
                            var d = e.charCodeAt(f);
                            if (this.isX12TermSep(d))
                                return mr;
                            if (!this.isNativeX12(d))
                                break;
                            f++
                        }
                        return Lr
                    }
                }
            }
        }
    }
    ,
    t.min = function(e, r, n, i, o) {
        var s = Math.min(e, Math.min(r, Math.min(n, i)));
        return o === void 0 ? s : Math.min(s, o)
    }
    ,
    t.findMinimums = function(e, r, n, i) {
        for (var o = 0; o < 6; o++) {
            var s = r[o] = Math.ceil(e[o]);
            n > s && (n = s,
            br.fill(i, 0)),
            n === s && (i[o] = i[o] + 1)
        }
        return n
    }
    ,
    t.getMinimumCount = function(e) {
        for (var r = 0, n = 0; n < 6; n++)
            r += e[n];
        return r || 0
    }
    ,
    t.isDigit = function(e) {
        return e >= "0".charCodeAt(0) && e <= "9".charCodeAt(0)
    }
    ,
    t.isExtendedASCII = function(e) {
        return e >= 128 && e <= 255
    }
    ,
    t.isNativeC40 = function(e) {
        return e === " ".charCodeAt(0) || e >= "0".charCodeAt(0) && e <= "9".charCodeAt(0) || e >= "A".charCodeAt(0) && e <= "Z".charCodeAt(0)
    }
    ,
    t.isNativeText = function(e) {
        return e === " ".charCodeAt(0) || e >= "0".charCodeAt(0) && e <= "9".charCodeAt(0) || e >= "a".charCodeAt(0) && e <= "z".charCodeAt(0)
    }
    ,
    t.isNativeX12 = function(e) {
        return this.isX12TermSep(e) || e === " ".charCodeAt(0) || e >= "0".charCodeAt(0) && e <= "9".charCodeAt(0) || e >= "A".charCodeAt(0) && e <= "Z".charCodeAt(0)
    }
    ,
    t.isX12TermSep = function(e) {
        return e === 13 || e === "*".charCodeAt(0) || e === ">".charCodeAt(0)
    }
    ,
    t.isNativeEDIFACT = function(e) {
        return e >= " ".charCodeAt(0) && e <= "^".charCodeAt(0)
    }
    ,
    t.isSpecialB256 = function(e) {
        return !1
    }
    ,
    t.determineConsecutiveDigitCount = function(e, r) {
        r === void 0 && (r = 0);
        for (var n = e.length, i = r; i < n && this.isDigit(e.charCodeAt(i)); )
            i++;
        return i - r
    }
    ,
    t.illegalCharacter = function(e) {
        var r = qe.toHexString(e.charCodeAt(0));
        throw r = "0000".substring(0, 4 - r.length) + r,
        new Error("Illegal character: " + e + " (0x" + r + ")")
    }
    ,
    t
}();
const Ii = o8e;
var Km = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , w6 = function() {
    function t(e) {
        this.charset = e,
        this.name = e.name
    }
    return t.prototype.canEncode = function(e) {
        try {
            return mi.encode(e, this.charset) != null
        } catch {
            return !1
        }
    }
    ,
    t
}()
  , s8e = function() {
    function t(e, r, n) {
        var i, o, s, a, l, c;
        this.ENCODERS = ["IBM437", "ISO-8859-2", "ISO-8859-3", "ISO-8859-4", "ISO-8859-5", "ISO-8859-6", "ISO-8859-7", "ISO-8859-8", "ISO-8859-9", "ISO-8859-10", "ISO-8859-11", "ISO-8859-13", "ISO-8859-14", "ISO-8859-15", "ISO-8859-16", "windows-1250", "windows-1251", "windows-1252", "windows-1256", "Shift_JIS"].map(function(T) {
            return new w6(RCe.forName(T))
        }),
        this.encoders = [];
        var u = [];
        u.push(new w6(MCe.ISO_8859_1));
        for (var f = r != null && r.name.startsWith("UTF"), d = 0; d < e.length; d++) {
            var h = !1;
            try {
                for (var x = (i = void 0,
                Km(u)), y = x.next(); !y.done; y = x.next()) {
                    var m = y.value
                      , E = e.charAt(d)
                      , g = E.charCodeAt(0);
                    if (g === n || m.canEncode(E)) {
                        h = !0;
                        break
                    }
                }
            } catch (T) {
                i = {
                    error: T
                }
            } finally {
                try {
                    y && !y.done && (o = x.return) && o.call(x)
                } finally {
                    if (i)
                        throw i.error
                }
            }
            if (!h)
                try {
                    for (var p = (s = void 0,
                    Km(this.ENCODERS)), v = p.next(); !v.done; v = p.next()) {
                        var m = v.value;
                        if (m.canEncode(e.charAt(d))) {
                            u.push(m),
                            h = !0;
                            break
                        }
                    }
                } catch (T) {
                    s = {
                        error: T
                    }
                } finally {
                    try {
                        v && !v.done && (a = p.return) && a.call(p)
                    } finally {
                        if (s)
                            throw s.error
                    }
                }
            h || (f = !0)
        }
        if (u.length === 1 && !f)
            this.encoders = [u[0]];
        else {
            this.encoders = [];
            var _ = 0;
            try {
                for (var b = Km(u), C = b.next(); !C.done; C = b.next()) {
                    var m = C.value;
                    this.encoders[_++] = m
                }
            } catch (T) {
                l = {
                    error: T
                }
            } finally {
                try {
                    C && !C.done && (c = b.return) && c.call(b)
                } finally {
                    if (l)
                        throw l.error
                }
            }
        }
        var B = -1;
        if (r != null) {
            for (var d = 0; d < this.encoders.length; d++)
                if (this.encoders[d] != null && r.name === this.encoders[d].name) {
                    B = d;
                    break
                }
        }
        this.priorityEncoderIndex = B
    }
    return t.prototype.length = function() {
        return this.encoders.length
    }
    ,
    t.prototype.getCharsetName = function(e) {
        if (!(e < this.length()))
            throw new Error("index must be less than length");
        return this.encoders[e].name
    }
    ,
    t.prototype.getCharset = function(e) {
        if (!(e < this.length()))
            throw new Error("index must be less than length");
        return this.encoders[e].charset
    }
    ,
    t.prototype.getECIValue = function(e) {
        return this.encoders[e].charset.getValueIdentifier()
    }
    ,
    t.prototype.getPriorityEncoderIndex = function() {
        return this.priorityEncoderIndex
    }
    ,
    t.prototype.canEncode = function(e, r) {
        if (!(r < this.length()))
            throw new Error("index must be less than length");
        return !0
    }
    ,
    t.prototype.encode = function(e, r) {
        if (!(r < this.length()))
            throw new Error("index must be less than length");
        return mi.encode(nt.getCharAt(e), this.encoders[r].name)
    }
    ,
    t
}()
  , a8e = 3
  , l8e = function() {
    function t(e, r, n) {
        this.fnc1 = n;
        var i = new s8e(e,r,n);
        if (i.length() === 1)
            for (var o = 0; o < this.bytes.length; o++) {
                var s = e.charAt(o).charCodeAt(0);
                this.bytes[o] = s === n ? 1e3 : s
            }
        else
            this.bytes = this.encodeMinimally(e, i, n)
    }
    return t.prototype.getFNC1Character = function() {
        return this.fnc1
    }
    ,
    t.prototype.length = function() {
        return this.bytes.length
    }
    ,
    t.prototype.haveNCharacters = function(e, r) {
        if (e + r - 1 >= this.bytes.length)
            return !1;
        for (var n = 0; n < r; n++)
            if (this.isECI(e + n))
                return !1;
        return !0
    }
    ,
    t.prototype.charAt = function(e) {
        if (e < 0 || e >= this.length())
            throw new Error("" + e);
        if (this.isECI(e))
            throw new Error("value at " + e + " is not a character but an ECI");
        return this.isFNC1(e) ? this.fnc1 : this.bytes[e]
    }
    ,
    t.prototype.subSequence = function(e, r) {
        if (e < 0 || e > r || r > this.length())
            throw new Error("" + e);
        for (var n = new Ke, i = e; i < r; i++) {
            if (this.isECI(i))
                throw new Error("value at " + i + " is not a character but an ECI");
            n.append(this.charAt(i))
        }
        return n.toString()
    }
    ,
    t.prototype.isECI = function(e) {
        if (e < 0 || e >= this.length())
            throw new Error("" + e);
        return this.bytes[e] > 255 && this.bytes[e] <= 999
    }
    ,
    t.prototype.isFNC1 = function(e) {
        if (e < 0 || e >= this.length())
            throw new Error("" + e);
        return this.bytes[e] === 1e3
    }
    ,
    t.prototype.getECIValue = function(e) {
        if (e < 0 || e >= this.length())
            throw new Error("" + e);
        if (!this.isECI(e))
            throw new Error("value at " + e + " is not an ECI but a character");
        return this.bytes[e] - 256
    }
    ,
    t.prototype.addEdge = function(e, r, n) {
        (e[r][n.encoderIndex] == null || e[r][n.encoderIndex].cachedTotalSize > n.cachedTotalSize) && (e[r][n.encoderIndex] = n)
    }
    ,
    t.prototype.addEdges = function(e, r, n, i, o, s) {
        var a = e.charAt(i).charCodeAt(0)
          , l = 0
          , c = r.length();
        r.getPriorityEncoderIndex() >= 0 && (a === s || r.canEncode(a, r.getPriorityEncoderIndex())) && (l = r.getPriorityEncoderIndex(),
        c = l + 1);
        for (var u = l; u < c; u++)
            (a === s || r.canEncode(a, u)) && this.addEdge(n, i + 1, new B6(a,r,u,o,s))
    }
    ,
    t.prototype.encodeMinimally = function(e, r, n) {
        var i = e.length
          , o = new B6[i + 1][r.length()];
        this.addEdges(e, r, o, 0, null, n);
        for (var s = 1; s <= i; s++) {
            for (var a = 0; a < r.length(); a++)
                o[s][a] != null && s < i && this.addEdges(e, r, o, s, o[s][a], n);
            for (var a = 0; a < r.length(); a++)
                o[s - 1][a] = null
        }
        for (var l = -1, c = qe.MAX_VALUE, a = 0; a < r.length(); a++)
            if (o[i][a] != null) {
                var u = o[i][a];
                u.cachedTotalSize < c && (c = u.cachedTotalSize,
                l = a)
            }
        if (l < 0)
            throw new Error('Failed to encode "' + e + '"');
        for (var f = [], d = o[i][l]; d != null; ) {
            if (d.isFNC1())
                f.unshift(1e3);
            else
                for (var h = r.encode(d.c, d.encoderIndex), s = h.length - 1; s >= 0; s--)
                    f.unshift(h[s] & 255);
            var x = d.previous === null ? 0 : d.previous.encoderIndex;
            x !== d.encoderIndex && f.unshift(256 + r.getECIValue(d.encoderIndex)),
            d = d.previous
        }
        for (var y = [], s = 0; s < y.length; s++)
            y[s] = f[s];
        return y
    }
    ,
    t
}()
  , B6 = function() {
    function t(e, r, n, i, o) {
        this.c = e,
        this.encoderSet = r,
        this.encoderIndex = n,
        this.previous = i,
        this.fnc1 = o,
        this.c = e === o ? 1e3 : e;
        var s = this.isFNC1() ? 1 : r.encode(e, n).length
          , a = i === null ? 0 : i.encoderIndex;
        a !== n && (s += a8e),
        i != null && (s += i.cachedTotalSize),
        this.cachedTotalSize = s
    }
    return t.prototype.isFNC1 = function() {
        return this.c === 1e3
    }
    ,
    t
}()
  , c8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
globalThis && globalThis.__values;
var u8e = globalThis && globalThis.__read || function(t, e) {
    var r = typeof Symbol == "function" && t[Symbol.iterator];
    if (!r)
        return t;
    var n = r.call(t), i, o = [], s;
    try {
        for (; (e === void 0 || e-- > 0) && !(i = n.next()).done; )
            o.push(i.value)
    } catch (a) {
        s = {
            error: a
        }
    } finally {
        try {
            i && !i.done && (r = n.return) && r.call(n)
        } finally {
            if (s)
                throw s.error
        }
    }
    return o
}
;
globalThis && globalThis.__spread;
var S6;
(function(t) {
    t[t.ASCII = 0] = "ASCII",
    t[t.C40 = 1] = "C40",
    t[t.TEXT = 2] = "TEXT",
    t[t.X12 = 3] = "X12",
    t[t.EDF = 4] = "EDF",
    t[t.B256 = 5] = "B256"
}
)(S6 || (S6 = {}));
(function(t) {
    c8e(e, t);
    function e(r, n, i, o, s) {
        var a = t.call(this, r, n, i) || this;
        return a.shape = o,
        a.macroId = s,
        a
    }
    return e.prototype.getMacroId = function() {
        return this.macroId
    }
    ,
    e.prototype.getShapeHint = function() {
        return this.shape
    }
    ,
    e
}
)(l8e);
var f8e = function() {
    function t() {}
    return t.prototype.isCompact = function() {
        return this.compact
    }
    ,
    t.prototype.setCompact = function(e) {
        this.compact = e
    }
    ,
    t.prototype.getSize = function() {
        return this.size
    }
    ,
    t.prototype.setSize = function(e) {
        this.size = e
    }
    ,
    t.prototype.getLayers = function() {
        return this.layers
    }
    ,
    t.prototype.setLayers = function(e) {
        this.layers = e
    }
    ,
    t.prototype.getCodeWords = function() {
        return this.codeWords
    }
    ,
    t.prototype.setCodeWords = function(e) {
        this.codeWords = e
    }
    ,
    t.prototype.getMatrix = function() {
        return this.matrix
    }
    ,
    t.prototype.setMatrix = function(e) {
        this.matrix = e
    }
    ,
    t
}()
  , T6 = function() {
    function t() {}
    return t.singletonList = function(e) {
        return [e]
    }
    ,
    t.min = function(e, r) {
        return e.sort(r)[0]
    }
    ,
    t
}()
  , d8e = function() {
    function t(e) {
        this.previous = e
    }
    return t.prototype.getPrevious = function() {
        return this.previous
    }
    ,
    t
}()
  , h8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , SC = function(t) {
    h8e(e, t);
    function e(r, n, i) {
        var o = t.call(this, r) || this;
        return o.value = n,
        o.bitCount = i,
        o
    }
    return e.prototype.appendTo = function(r, n) {
        r.appendBits(this.value, this.bitCount)
    }
    ,
    e.prototype.add = function(r, n) {
        return new e(this,r,n)
    }
    ,
    e.prototype.addBinaryShift = function(r, n) {
        return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),
        new e(this,r,n)
    }
    ,
    e.prototype.toString = function() {
        var r = this.value & (1 << this.bitCount) - 1;
        return r |= 1 << this.bitCount,
        "<" + qe.toBinaryString(r | 1 << this.bitCount).substring(1) + ">"
    }
    ,
    e
}(d8e)
  , x8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                i.hasOwnProperty(o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , p8e = function(t) {
    x8e(e, t);
    function e(r, n, i) {
        var o = t.call(this, r, 0, 0) || this;
        return o.binaryShiftStart = n,
        o.binaryShiftByteCount = i,
        o
    }
    return e.prototype.appendTo = function(r, n) {
        for (var i = 0; i < this.binaryShiftByteCount; i++)
            (i === 0 || i === 31 && this.binaryShiftByteCount <= 62) && (r.appendBits(31, 5),
            this.binaryShiftByteCount > 62 ? r.appendBits(this.binaryShiftByteCount - 31, 16) : i === 0 ? r.appendBits(Math.min(this.binaryShiftByteCount, 31), 5) : r.appendBits(this.binaryShiftByteCount - 31, 5)),
            r.appendBits(n[this.binaryShiftStart + i], 8)
    }
    ,
    e.prototype.addBinaryShift = function(r, n) {
        return new e(this,r,n)
    }
    ,
    e.prototype.toString = function() {
        return "<" + this.binaryShiftStart + "::" + (this.binaryShiftStart + this.binaryShiftByteCount - 1) + ">"
    }
    ,
    e
}(SC);
function g8e(t, e, r) {
    return new p8e(t,e,r)
}
function i0(t, e, r) {
    return new SC(t,e,r)
}
var m8e = ["UPPER", "LOWER", "DIGIT", "MIXED", "PUNCT"]
  , ra = 0
  , np = 1
  , di = 2
  , _M = 3
  , co = 4
  , v8e = new SC(null,0,0)
  , qm = [Int32Array.from([0, (5 << 16) + 28, (5 << 16) + 30, (5 << 16) + 29, 655360 + 928 + 30]), Int32Array.from([(9 << 16) + 480 + 14, 0, (5 << 16) + 30, (5 << 16) + 29, 655360 + 928 + 30]), Int32Array.from([(4 << 16) + 14, (9 << 16) + 448 + 28, 0, (9 << 16) + 448 + 29, 917504 + 14336 + 928 + 30]), Int32Array.from([(5 << 16) + 29, (5 << 16) + 28, 655360 + 928 + 30, 0, (5 << 16) + 30]), Int32Array.from([(5 << 16) + 31, 655360 + 992 + 28, 655360 + 992 + 30, 655360 + 992 + 29, 0])]
  , y8e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
;
function E8e(t) {
    var e, r;
    try {
        for (var n = y8e(t), i = n.next(); !i.done; i = n.next()) {
            var o = i.value;
            br.fill(o, -1)
        }
    } catch (s) {
        e = {
            error: s
        }
    } finally {
        try {
            i && !i.done && (r = n.return) && r.call(n)
        } finally {
            if (e)
                throw e.error
        }
    }
    return t[ra][co] = 0,
    t[np][co] = 0,
    t[np][ra] = 28,
    t[_M][co] = 0,
    t[di][co] = 0,
    t[di][ra] = 15,
    t
}
var bM = E8e(br.createInt32Array(6, 6))
  , _8e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , b8e = function() {
    function t(e, r, n, i) {
        this.token = e,
        this.mode = r,
        this.binaryShiftByteCount = n,
        this.bitCount = i
    }
    return t.prototype.getMode = function() {
        return this.mode
    }
    ,
    t.prototype.getToken = function() {
        return this.token
    }
    ,
    t.prototype.getBinaryShiftByteCount = function() {
        return this.binaryShiftByteCount
    }
    ,
    t.prototype.getBitCount = function() {
        return this.bitCount
    }
    ,
    t.prototype.latchAndAppend = function(e, r) {
        var n = this.bitCount
          , i = this.token;
        if (e !== this.mode) {
            var o = qm[this.mode][e];
            i = i0(i, o & 65535, o >> 16),
            n += o >> 16
        }
        var s = e === di ? 4 : 5;
        return i = i0(i, r, s),
        new t(i,e,0,n + s)
    }
    ,
    t.prototype.shiftAndAppend = function(e, r) {
        var n = this.token
          , i = this.mode === di ? 4 : 5;
        return n = i0(n, bM[this.mode][e], i),
        n = i0(n, r, 5),
        new t(n,this.mode,0,this.bitCount + i + 5)
    }
    ,
    t.prototype.addBinaryShiftChar = function(e) {
        var r = this.token
          , n = this.mode
          , i = this.bitCount;
        if (this.mode === co || this.mode === di) {
            var o = qm[n][ra];
            r = i0(r, o & 65535, o >> 16),
            i += o >> 16,
            n = ra
        }
        var s = this.binaryShiftByteCount === 0 || this.binaryShiftByteCount === 31 ? 18 : this.binaryShiftByteCount === 62 ? 9 : 8
          , a = new t(r,n,this.binaryShiftByteCount + 1,i + s);
        return a.binaryShiftByteCount === 2047 + 31 && (a = a.endBinaryShift(e + 1)),
        a
    }
    ,
    t.prototype.endBinaryShift = function(e) {
        if (this.binaryShiftByteCount === 0)
            return this;
        var r = this.token;
        return r = g8e(r, e - this.binaryShiftByteCount, this.binaryShiftByteCount),
        new t(r,this.mode,0,this.bitCount)
    }
    ,
    t.prototype.isBetterThanOrEqualTo = function(e) {
        var r = this.bitCount + (qm[this.mode][e.mode] >> 16);
        return this.binaryShiftByteCount < e.binaryShiftByteCount ? r += t.calculateBinaryShiftCost(e) - t.calculateBinaryShiftCost(this) : this.binaryShiftByteCount > e.binaryShiftByteCount && e.binaryShiftByteCount > 0 && (r += 10),
        r <= e.bitCount
    }
    ,
    t.prototype.toBitArray = function(e) {
        for (var r, n, i = [], o = this.endBinaryShift(e.length).token; o !== null; o = o.getPrevious())
            i.unshift(o);
        var s = new kr;
        try {
            for (var a = _8e(i), l = a.next(); !l.done; l = a.next()) {
                var c = l.value;
                c.appendTo(s, e)
            }
        } catch (u) {
            r = {
                error: u
            }
        } finally {
            try {
                l && !l.done && (n = a.return) && n.call(a)
            } finally {
                if (r)
                    throw r.error
            }
        }
        return s
    }
    ,
    t.prototype.toString = function() {
        return nt.format("%s bits=%d bytes=%d", m8e[this.mode], this.bitCount, this.binaryShiftByteCount)
    }
    ,
    t.calculateBinaryShiftCost = function(e) {
        return e.binaryShiftByteCount > 62 ? 21 : e.binaryShiftByteCount > 31 ? 20 : e.binaryShiftByteCount > 0 ? 10 : 0
    }
    ,
    t.INITIAL_STATE = new t(v8e,ra,0,0),
    t
}();
function C8e(t) {
    var e = nt.getCharCode(" ")
      , r = nt.getCharCode(".")
      , n = nt.getCharCode(",");
    t[ra][e] = 1;
    for (var i = nt.getCharCode("Z"), o = nt.getCharCode("A"), s = o; s <= i; s++)
        t[ra][s] = s - o + 2;
    t[np][e] = 1;
    for (var a = nt.getCharCode("z"), l = nt.getCharCode("a"), s = l; s <= a; s++)
        t[np][s] = s - l + 2;
    t[di][e] = 1;
    for (var c = nt.getCharCode("9"), u = nt.getCharCode("0"), s = u; s <= c; s++)
        t[di][s] = s - u + 2;
    t[di][n] = 12,
    t[di][r] = 13;
    for (var f = ["\0", " ", "", "", "", "", "", "", "\x07", "\b", "	", `
`, "\v", "\f", "\r", "\x1B", "", "", "", "", "@", "\\", "^", "_", "`", "|", "~", ""], d = 0; d < f.length; d++)
        t[_M][nt.getCharCode(f[d])] = d;
    for (var h = ["\0", "\r", "\0", "\0", "\0", "\0", "!", "'", "#", "$", "%", "&", "'", "(", ")", "*", "+", ",", "-", ".", "/", ":", ";", "<", "=", ">", "?", "[", "]", "{", "}"], d = 0; d < h.length; d++)
        nt.getCharCode(h[d]) > 0 && (t[co][nt.getCharCode(h[d])] = d);
    return t
}
var Zm = C8e(br.createInt32Array(5, 256))
  , Fh = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , A8e = function() {
    function t(e) {
        this.text = e
    }
    return t.prototype.encode = function() {
        for (var e = nt.getCharCode(" "), r = nt.getCharCode(`
`), n = T6.singletonList(b8e.INITIAL_STATE), i = 0; i < this.text.length; i++) {
            var o = void 0
              , s = i + 1 < this.text.length ? this.text[i + 1] : 0;
            switch (this.text[i]) {
            case nt.getCharCode("\r"):
                o = s === r ? 2 : 0;
                break;
            case nt.getCharCode("."):
                o = s === e ? 3 : 0;
                break;
            case nt.getCharCode(","):
                o = s === e ? 4 : 0;
                break;
            case nt.getCharCode(":"):
                o = s === e ? 5 : 0;
                break;
            default:
                o = 0
            }
            o > 0 ? (n = t.updateStateListForPair(n, i, o),
            i++) : n = this.updateStateListForChar(n, i)
        }
        var a = T6.min(n, function(l, c) {
            return l.getBitCount() - c.getBitCount()
        });
        return a.toBitArray(this.text)
    }
    ,
    t.prototype.updateStateListForChar = function(e, r) {
        var n, i, o = [];
        try {
            for (var s = Fh(e), a = s.next(); !a.done; a = s.next()) {
                var l = a.value;
                this.updateStateForChar(l, r, o)
            }
        } catch (c) {
            n = {
                error: c
            }
        } finally {
            try {
                a && !a.done && (i = s.return) && i.call(s)
            } finally {
                if (n)
                    throw n.error
            }
        }
        return t.simplifyStates(o)
    }
    ,
    t.prototype.updateStateForChar = function(e, r, n) {
        for (var i = this.text[r] & 255, o = Zm[e.getMode()][i] > 0, s = null, a = 0; a <= co; a++) {
            var l = Zm[a][i];
            if (l > 0) {
                if (s == null && (s = e.endBinaryShift(r)),
                !o || a === e.getMode() || a === di) {
                    var c = s.latchAndAppend(a, l);
                    n.push(c)
                }
                if (!o && bM[e.getMode()][a] >= 0) {
                    var u = s.shiftAndAppend(a, l);
                    n.push(u)
                }
            }
        }
        if (e.getBinaryShiftByteCount() > 0 || Zm[e.getMode()][i] === 0) {
            var f = e.addBinaryShiftChar(r);
            n.push(f)
        }
    }
    ,
    t.updateStateListForPair = function(e, r, n) {
        var i, o, s = [];
        try {
            for (var a = Fh(e), l = a.next(); !l.done; l = a.next()) {
                var c = l.value;
                this.updateStateForPair(c, r, n, s)
            }
        } catch (u) {
            i = {
                error: u
            }
        } finally {
            try {
                l && !l.done && (o = a.return) && o.call(a)
            } finally {
                if (i)
                    throw i.error
            }
        }
        return this.simplifyStates(s)
    }
    ,
    t.updateStateForPair = function(e, r, n, i) {
        var o = e.endBinaryShift(r);
        if (i.push(o.latchAndAppend(co, n)),
        e.getMode() !== co && i.push(o.shiftAndAppend(co, n)),
        n === 3 || n === 4) {
            var s = o.latchAndAppend(di, 16 - n).latchAndAppend(di, 1);
            i.push(s)
        }
        if (e.getBinaryShiftByteCount() > 0) {
            var a = e.addBinaryShiftChar(r).addBinaryShiftChar(r + 1);
            i.push(a)
        }
    }
    ,
    t.simplifyStates = function(e) {
        var r, n, i, o, s = [];
        try {
            for (var a = Fh(e), l = a.next(); !l.done; l = a.next()) {
                var c = l.value
                  , u = !0
                  , f = function(m) {
                    if (m.isBetterThanOrEqualTo(c))
                        return u = !1,
                        "break";
                    c.isBetterThanOrEqualTo(m) && (s = s.filter(function(E) {
                        return E !== m
                    }))
                };
                try {
                    for (var d = (i = void 0,
                    Fh(s)), h = d.next(); !h.done; h = d.next()) {
                        var x = h.value
                          , y = f(x);
                        if (y === "break")
                            break
                    }
                } catch (m) {
                    i = {
                        error: m
                    }
                } finally {
                    try {
                        h && !h.done && (o = d.return) && o.call(d)
                    } finally {
                        if (i)
                            throw i.error
                    }
                }
                u && s.push(c)
            }
        } catch (m) {
            r = {
                error: m
            }
        } finally {
            try {
                l && !l.done && (n = a.return) && n.call(a)
            } finally {
                if (r)
                    throw r.error
            }
        }
        return s
    }
    ,
    t
}()
  , w8e = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
;
(function() {
    function t() {}
    return t.encodeBytes = function(e) {
        return t.encode(e, t.DEFAULT_EC_PERCENT, t.DEFAULT_AZTEC_LAYERS)
    }
    ,
    t.encode = function(e, r, n) {
        var i = new A8e(e).encode(), o = qe.truncDivision(i.getSize() * r, 100) + 11, s = i.getSize() + o, a, l, c, u, f;
        if (n !== t.DEFAULT_AZTEC_LAYERS) {
            if (a = n < 0,
            l = Math.abs(n),
            l > (a ? t.MAX_NB_BITS_COMPACT : t.MAX_NB_BITS))
                throw new Me(nt.format("Illegal value %s for layers", n));
            c = t.totalBitsInLayer(l, a),
            u = t.WORD_SIZE[l];
            var d = c - c % u;
            if (f = t.stuffBits(i, u),
            f.getSize() + o > d)
                throw new Me("Data to large for user specified layer");
            if (a && f.getSize() > u * 64)
                throw new Me("Data to large for user specified layer")
        } else {
            u = 0,
            f = null;
            for (var h = 0; ; h++) {
                if (h > t.MAX_NB_BITS)
                    throw new Me("Data too large for an Aztec code");
                if (a = h <= 3,
                l = a ? h + 1 : h,
                c = t.totalBitsInLayer(l, a),
                !(s > c)) {
                    (f == null || u !== t.WORD_SIZE[l]) && (u = t.WORD_SIZE[l],
                    f = t.stuffBits(i, u));
                    var d = c - c % u;
                    if (!(a && f.getSize() > u * 64) && f.getSize() + o <= d)
                        break
                }
            }
        }
        var x = t.generateCheckWords(f, c, u), y = f.getSize() / u, m = t.generateModeMessage(a, l, y), E = (a ? 11 : 14) + l * 4, g = new Int32Array(E), p;
        if (a) {
            p = E;
            for (var h = 0; h < g.length; h++)
                g[h] = h
        } else {
            p = E + 1 + 2 * qe.truncDivision(qe.truncDivision(E, 2) - 1, 15);
            for (var v = qe.truncDivision(E, 2), _ = qe.truncDivision(p, 2), h = 0; h < v; h++) {
                var b = h + qe.truncDivision(h, 15);
                g[v - h - 1] = _ - b - 1,
                g[v + h] = _ + b + 1
            }
        }
        for (var C = new Ao(p), h = 0, B = 0; h < l; h++) {
            for (var T = (l - h) * 4 + (a ? 9 : 12), A = 0; A < T; A++)
                for (var w = A * 2, S = 0; S < 2; S++)
                    x.get(B + w + S) && C.set(g[h * 2 + S], g[h * 2 + A]),
                    x.get(B + T * 2 + w + S) && C.set(g[h * 2 + A], g[E - 1 - h * 2 - S]),
                    x.get(B + T * 4 + w + S) && C.set(g[E - 1 - h * 2 - S], g[E - 1 - h * 2 - A]),
                    x.get(B + T * 6 + w + S) && C.set(g[E - 1 - h * 2 - A], g[h * 2 + S]);
            B += T * 8
        }
        if (t.drawModeMessage(C, a, p, m),
        a)
            t.drawBullsEye(C, qe.truncDivision(p, 2), 5);
        else {
            t.drawBullsEye(C, qe.truncDivision(p, 2), 7);
            for (var h = 0, A = 0; h < qe.truncDivision(E, 2) - 1; h += 15,
            A += 16)
                for (var S = qe.truncDivision(p, 2) & 1; S < p; S += 2)
                    C.set(qe.truncDivision(p, 2) - A, S),
                    C.set(qe.truncDivision(p, 2) + A, S),
                    C.set(S, qe.truncDivision(p, 2) - A),
                    C.set(S, qe.truncDivision(p, 2) + A)
        }
        var D = new f8e;
        return D.setCompact(a),
        D.setSize(p),
        D.setLayers(l),
        D.setCodeWords(y),
        D.setMatrix(C),
        D
    }
    ,
    t.drawBullsEye = function(e, r, n) {
        for (var i = 0; i < n; i += 2)
            for (var o = r - i; o <= r + i; o++)
                e.set(o, r - i),
                e.set(o, r + i),
                e.set(r - i, o),
                e.set(r + i, o);
        e.set(r - n, r - n),
        e.set(r - n + 1, r - n),
        e.set(r - n, r - n + 1),
        e.set(r + n, r - n),
        e.set(r + n, r - n + 1),
        e.set(r + n, r + n - 1)
    }
    ,
    t.generateModeMessage = function(e, r, n) {
        var i = new kr;
        return e ? (i.appendBits(r - 1, 2),
        i.appendBits(n - 1, 6),
        i = t.generateCheckWords(i, 28, 4)) : (i.appendBits(r - 1, 5),
        i.appendBits(n - 1, 11),
        i = t.generateCheckWords(i, 40, 4)),
        i
    }
    ,
    t.drawModeMessage = function(e, r, n, i) {
        var o = qe.truncDivision(n, 2);
        if (r)
            for (var s = 0; s < 7; s++) {
                var a = o - 3 + s;
                i.get(s) && e.set(a, o - 5),
                i.get(s + 7) && e.set(o + 5, a),
                i.get(20 - s) && e.set(a, o + 5),
                i.get(27 - s) && e.set(o - 5, a)
            }
        else
            for (var s = 0; s < 10; s++) {
                var a = o - 5 + s + qe.truncDivision(s, 5);
                i.get(s) && e.set(a, o - 7),
                i.get(s + 10) && e.set(o + 7, a),
                i.get(29 - s) && e.set(a, o + 7),
                i.get(39 - s) && e.set(o - 7, a)
            }
    }
    ,
    t.generateCheckWords = function(e, r, n) {
        var i, o, s = e.getSize() / n, a = new yM(t.getGF(n)), l = qe.truncDivision(r, n), c = t.bitsToWords(e, n, l);
        a.encode(c, l - s);
        var u = r % n
          , f = new kr;
        f.appendBits(0, u);
        try {
            for (var d = w8e(Array.from(c)), h = d.next(); !h.done; h = d.next()) {
                var x = h.value;
                f.appendBits(x, n)
            }
        } catch (y) {
            i = {
                error: y
            }
        } finally {
            try {
                h && !h.done && (o = d.return) && o.call(d)
            } finally {
                if (i)
                    throw i.error
            }
        }
        return f
    }
    ,
    t.bitsToWords = function(e, r, n) {
        var i = new Int32Array(n), o, s;
        for (o = 0,
        s = e.getSize() / r; o < s; o++) {
            for (var a = 0, l = 0; l < r; l++)
                a |= e.get(o * r + l) ? 1 << r - l - 1 : 0;
            i[o] = a
        }
        return i
    }
    ,
    t.getGF = function(e) {
        switch (e) {
        case 4:
            return wn.AZTEC_PARAM;
        case 6:
            return wn.AZTEC_DATA_6;
        case 8:
            return wn.AZTEC_DATA_8;
        case 10:
            return wn.AZTEC_DATA_10;
        case 12:
            return wn.AZTEC_DATA_12;
        default:
            throw new Me("Unsupported word size " + e)
        }
    }
    ,
    t.stuffBits = function(e, r) {
        for (var n = new kr, i = e.getSize(), o = (1 << r) - 2, s = 0; s < i; s += r) {
            for (var a = 0, l = 0; l < r; l++)
                (s + l >= i || e.get(s + l)) && (a |= 1 << r - 1 - l);
            (a & o) === o ? (n.appendBits(a & o, r),
            s--) : a & o ? n.appendBits(a, r) : (n.appendBits(a | 1, r),
            s--)
        }
        return n
    }
    ,
    t.totalBitsInLayer = function(e, r) {
        return ((r ? 88 : 112) + 16 * e) * e
    }
    ,
    t.DEFAULT_EC_PERCENT = 33,
    t.DEFAULT_AZTEC_LAYERS = 0,
    t.MAX_NB_BITS = 32,
    t.MAX_NB_BITS_COMPACT = 4,
    t.WORD_SIZE = Int32Array.from([4, 6, 6, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12]),
    t
}
)();
var B8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        if (typeof r != "function" && r !== null)
            throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , S8e = function(t) {
    B8e(e, t);
    function e(r) {
        var n = t.call(this, r.width, r.height) || this;
        return n.canvas = r,
        n.tempCanvasElement = null,
        n.buffer = e.makeBufferFromCanvasImageData(r),
        n
    }
    return e.makeBufferFromCanvasImageData = function(r) {
        var n;
        try {
            n = r.getContext("2d", {
                willReadFrequently: !0
            })
        } catch {
            n = r.getContext("2d")
        }
        if (!n)
            throw new Error("Couldn't get canvas context.");
        var i = n.getImageData(0, 0, r.width, r.height);
        return e.toGrayscaleBuffer(i.data, r.width, r.height)
    }
    ,
    e.toGrayscaleBuffer = function(r, n, i) {
        for (var o = new Uint8ClampedArray(n * i), s = 0, a = 0, l = r.length; s < l; s += 4,
        a++) {
            var c = void 0
              , u = r[s + 3];
            if (u === 0)
                c = 255;
            else {
                var f = r[s]
                  , d = r[s + 1]
                  , h = r[s + 2];
                c = 306 * f + 601 * d + 117 * h + 512 >> 10
            }
            o[a] = c
        }
        return o
    }
    ,
    e.prototype.getRow = function(r, n) {
        if (r < 0 || r >= this.getHeight())
            throw new Me("Requested row is outside the image: " + r);
        var i = this.getWidth()
          , o = r * i;
        return n === null ? n = this.buffer.slice(o, o + i) : (n.length < i && (n = new Uint8ClampedArray(i)),
        n.set(this.buffer.slice(o, o + i))),
        n
    }
    ,
    e.prototype.getMatrix = function() {
        return this.buffer
    }
    ,
    e.prototype.isCropSupported = function() {
        return !0
    }
    ,
    e.prototype.crop = function(r, n, i, o) {
        return t.prototype.crop.call(this, r, n, i, o),
        this
    }
    ,
    e.prototype.isRotateSupported = function() {
        return !0
    }
    ,
    e.prototype.rotateCounterClockwise = function() {
        return this.rotate(-90),
        this
    }
    ,
    e.prototype.rotateCounterClockwise45 = function() {
        return this.rotate(-45),
        this
    }
    ,
    e.prototype.invert = function() {
        return new P1(this)
    }
    ,
    e.prototype.getTempCanvasElement = function() {
        if (this.tempCanvasElement === null) {
            var r = this.canvas.ownerDocument.createElement("canvas");
            r.width = this.canvas.width,
            r.height = this.canvas.height,
            this.tempCanvasElement = r
        }
        return this.tempCanvasElement
    }
    ,
    e.prototype.rotate = function(r) {
        var n = this.getTempCanvasElement();
        if (!n)
            throw new Error("Could not create a Canvas element.");
        var i = r * e.DEGREE_TO_RADIANS
          , o = this.canvas.width
          , s = this.canvas.height
          , a = Math.ceil(Math.abs(Math.cos(i)) * o + Math.abs(Math.sin(i)) * s)
          , l = Math.ceil(Math.abs(Math.sin(i)) * o + Math.abs(Math.cos(i)) * s);
        n.width = a,
        n.height = l;
        var c = n.getContext("2d");
        if (!c)
            throw new Error("Could not create a Canvas Context element.");
        return c.translate(a / 2, l / 2),
        c.rotate(i),
        c.drawImage(this.canvas, o / -2, s / -2),
        this.buffer = e.makeBufferFromCanvasImageData(n),
        this
    }
    ,
    e.DEGREE_TO_RADIANS = Math.PI / 180,
    e
}(yd);
function CM() {
    return typeof navigator < "u"
}
function T8e() {
    return CM() && !!navigator.mediaDevices
}
function D8e() {
    return !!(T8e() && navigator.mediaDevices.enumerateDevices)
}
var Tc = globalThis && globalThis.__assign || function() {
    return Tc = Object.assign || function(t) {
        for (var e, r = 1, n = arguments.length; r < n; r++) {
            e = arguments[r];
            for (var i in e)
                Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i])
        }
        return t
    }
    ,
    Tc.apply(this, arguments)
}
  , zt = globalThis && globalThis.__awaiter || function(t, e, r, n) {
    function i(o) {
        return o instanceof r ? o : new r(function(s) {
            s(o)
        }
        )
    }
    return new (r || (r = Promise))(function(o, s) {
        function a(u) {
            try {
                c(n.next(u))
            } catch (f) {
                s(f)
            }
        }
        function l(u) {
            try {
                c(n.throw(u))
            } catch (f) {
                s(f)
            }
        }
        function c(u) {
            u.done ? o(u.value) : i(u.value).then(a, l)
        }
        c((n = n.apply(t, e || [])).next())
    }
    )
}
  , jt = globalThis && globalThis.__generator || function(t, e) {
    var r = {
        label: 0,
        sent: function() {
            if (o[0] & 1)
                throw o[1];
            return o[1]
        },
        trys: [],
        ops: []
    }, n, i, o, s;
    return s = {
        next: a(0),
        throw: a(1),
        return: a(2)
    },
    typeof Symbol == "function" && (s[Symbol.iterator] = function() {
        return this
    }
    ),
    s;
    function a(c) {
        return function(u) {
            return l([c, u])
        }
    }
    function l(c) {
        if (n)
            throw new TypeError("Generator is already executing.");
        for (; r; )
            try {
                if (n = 1,
                i && (o = c[0] & 2 ? i.return : c[0] ? i.throw || ((o = i.return) && o.call(i),
                0) : i.next) && !(o = o.call(i, c[1])).done)
                    return o;
                switch (i = 0,
                o && (c = [c[0] & 2, o.value]),
                c[0]) {
                case 0:
                case 1:
                    o = c;
                    break;
                case 4:
                    return r.label++,
                    {
                        value: c[1],
                        done: !1
                    };
                case 5:
                    r.label++,
                    i = c[1],
                    c = [0];
                    continue;
                case 7:
                    c = r.ops.pop(),
                    r.trys.pop();
                    continue;
                default:
                    if (o = r.trys,
                    !(o = o.length > 0 && o[o.length - 1]) && (c[0] === 6 || c[0] === 2)) {
                        r = 0;
                        continue
                    }
                    if (c[0] === 3 && (!o || c[1] > o[0] && c[1] < o[3])) {
                        r.label = c[1];
                        break
                    }
                    if (c[0] === 6 && r.label < o[1]) {
                        r.label = o[1],
                        o = c;
                        break
                    }
                    if (o && r.label < o[2]) {
                        r.label = o[2],
                        r.ops.push(c);
                        break
                    }
                    o[2] && r.ops.pop(),
                    r.trys.pop();
                    continue
                }
                c = e.call(t, r)
            } catch (u) {
                c = [6, u],
                i = 0
            } finally {
                n = o = 0
            }
        if (c[0] & 5)
            throw c[1];
        return {
            value: c[0] ? c[1] : void 0,
            done: !0
        }
    }
}
  , Jm = globalThis && globalThis.__values || function(t) {
    var e = typeof Symbol == "function" && Symbol.iterator
      , r = e && t[e]
      , n = 0;
    if (r)
        return r.call(t);
    if (t && typeof t.length == "number")
        return {
            next: function() {
                return t && n >= t.length && (t = void 0),
                {
                    value: t && t[n++],
                    done: !t
                }
            }
        };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
}
  , F8e = {
    delayBetweenScanAttempts: 500,
    delayBetweenScanSuccess: 500,
    tryPlayVideoTimeout: 5e3
}
  , Fu = function() {
    function t(e, r, n) {
        r === void 0 && (r = new Map),
        n === void 0 && (n = {}),
        this.reader = e,
        this.hints = r,
        this.options = Tc(Tc({}, F8e), n)
    }
    return Object.defineProperty(t.prototype, "possibleFormats", {
        set: function(e) {
            this.hints.set(Ft.POSSIBLE_FORMATS, e)
        },
        enumerable: !1,
        configurable: !0
    }),
    t.addVideoSource = function(e, r) {
        try {
            e.srcObject = r
        } catch {
            console.error("got interrupted by new loading request")
        }
    }
    ,
    t.mediaStreamSetTorch = function(e, r) {
        return zt(this, void 0, void 0, function() {
            return jt(this, function(n) {
                switch (n.label) {
                case 0:
                    return [4, e.applyConstraints({
                        advanced: [{
                            fillLightMode: r ? "flash" : "off",
                            torch: !!r
                        }]
                    })];
                case 1:
                    return n.sent(),
                    [2]
                }
            })
        })
    }
    ,
    t.mediaStreamIsTorchCompatible = function(e) {
        var r, n, i = e.getVideoTracks();
        try {
            for (var o = Jm(i), s = o.next(); !s.done; s = o.next()) {
                var a = s.value;
                if (t.mediaStreamIsTorchCompatibleTrack(a))
                    return !0
            }
        } catch (l) {
            r = {
                error: l
            }
        } finally {
            try {
                s && !s.done && (n = o.return) && n.call(o)
            } finally {
                if (r)
                    throw r.error
            }
        }
        return !1
    }
    ,
    t.mediaStreamIsTorchCompatibleTrack = function(e) {
        try {
            var r = e.getCapabilities();
            return "torch"in r
        } catch (n) {
            return console.error(n),
            console.warn("Your browser may be not fully compatible with WebRTC and/or ImageCapture specs. Torch will not be available."),
            !1
        }
    }
    ,
    t.isVideoPlaying = function(e) {
        return e.currentTime > 0 && !e.paused && e.readyState > 2
    }
    ,
    t.getMediaElement = function(e, r) {
        var n = document.getElementById(e);
        if (!n)
            throw new ir("element with id '".concat(e, "' not found"));
        if (n.nodeName.toLowerCase() !== r.toLowerCase())
            throw new ir("element with id '".concat(e, "' must be an ").concat(r, " element"));
        return n
    }
    ,
    t.createVideoElement = function(e) {
        if (e instanceof HTMLVideoElement)
            return e;
        if (typeof e == "string")
            return t.getMediaElement(e, "video");
        if (!e && typeof document < "u") {
            var r = document.createElement("video");
            return r.width = 200,
            r.height = 200,
            r
        }
        throw new Error("Couldn't get videoElement from videoSource!")
    }
    ,
    t.prepareImageElement = function(e) {
        if (e instanceof HTMLImageElement)
            return e;
        if (typeof e == "string")
            return t.getMediaElement(e, "img");
        if (typeof e > "u") {
            var r = document.createElement("img");
            return r.width = 200,
            r.height = 200,
            r
        }
        throw new Error("Couldn't get imageElement from imageSource!")
    }
    ,
    t.prepareVideoElement = function(e) {
        var r = t.createVideoElement(e);
        return r.setAttribute("autoplay", "true"),
        r.setAttribute("muted", "true"),
        r.setAttribute("playsinline", "true"),
        r
    }
    ,
    t.isImageLoaded = function(e) {
        return !(!e.complete || e.naturalWidth === 0)
    }
    ,
    t.createBinaryBitmapFromCanvas = function(e) {
        var r = new S8e(e)
          , n = new aM(r);
        return new sM(n)
    }
    ,
    t.drawImageOnCanvas = function(e, r) {
        e.drawImage(r, 0, 0)
    }
    ,
    t.getMediaElementDimensions = function(e) {
        if (e instanceof HTMLVideoElement)
            return {
                height: e.videoHeight,
                width: e.videoWidth
            };
        if (e instanceof HTMLImageElement)
            return {
                height: e.naturalHeight || e.height,
                width: e.naturalWidth || e.width
            };
        throw new Error("Couldn't find the Source's dimensions!")
    }
    ,
    t.createCaptureCanvas = function(e) {
        if (!e)
            throw new ir("Cannot create a capture canvas without a media element.");
        if (typeof document > "u")
            throw new Error(`The page "Document" is undefined, make sure you're running in a browser.`);
        var r = document.createElement("canvas")
          , n = t.getMediaElementDimensions(e)
          , i = n.width
          , o = n.height;
        return r.style.width = i + "px",
        r.style.height = o + "px",
        r.width = i,
        r.height = o,
        r
    }
    ,
    t.tryPlayVideo = function(e) {
        return zt(this, void 0, void 0, function() {
            var r;
            return jt(this, function(n) {
                switch (n.label) {
                case 0:
                    if (e != null && e.ended)
                        return console.error("Trying to play video that has ended."),
                        [2, !1];
                    if (t.isVideoPlaying(e))
                        return console.warn("Trying to play video that is already playing."),
                        [2, !0];
                    n.label = 1;
                case 1:
                    return n.trys.push([1, 3, , 4]),
                    [4, e.play()];
                case 2:
                    return n.sent(),
                    [2, !0];
                case 3:
                    return r = n.sent(),
                    console.warn("It was not possible to play the video.", r),
                    [2, !1];
                case 4:
                    return [2]
                }
            })
        })
    }
    ,
    t.createCanvasFromMediaElement = function(e) {
        var r = t.createCaptureCanvas(e)
          , n = r.getContext("2d");
        if (!n)
            throw new Error("Couldn't find Canvas 2D Context.");
        return t.drawImageOnCanvas(n, e),
        r
    }
    ,
    t.createBinaryBitmapFromMediaElem = function(e) {
        var r = t.createCanvasFromMediaElement(e);
        return t.createBinaryBitmapFromCanvas(r)
    }
    ,
    t.destroyImageElement = function(e) {
        e.src = "",
        e.removeAttribute("src"),
        e = void 0
    }
    ,
    t.listVideoInputDevices = function() {
        return zt(this, void 0, void 0, function() {
            var e, r, n, i, o, s, a, l, c, u, f, d;
            return jt(this, function(h) {
                switch (h.label) {
                case 0:
                    if (!CM())
                        throw new Error("Can't enumerate devices, navigator is not present.");
                    if (!D8e())
                        throw new Error("Can't enumerate devices, method not supported.");
                    return [4, navigator.mediaDevices.enumerateDevices()];
                case 1:
                    e = h.sent(),
                    r = [];
                    try {
                        for (n = Jm(e),
                        i = n.next(); !i.done; i = n.next())
                            o = i.value,
                            s = o.kind === "video" ? "videoinput" : o.kind,
                            s === "videoinput" && (a = o.deviceId || o.id,
                            l = o.label || "Video device ".concat(r.length + 1),
                            c = o.groupId,
                            u = {
                                deviceId: a,
                                label: l,
                                kind: s,
                                groupId: c
                            },
                            r.push(u))
                    } catch (x) {
                        f = {
                            error: x
                        }
                    } finally {
                        try {
                            i && !i.done && (d = n.return) && d.call(n)
                        } finally {
                            if (f)
                                throw f.error
                        }
                    }
                    return [2, r]
                }
            })
        })
    }
    ,
    t.findDeviceById = function(e) {
        return zt(this, void 0, void 0, function() {
            var r;
            return jt(this, function(n) {
                switch (n.label) {
                case 0:
                    return [4, t.listVideoInputDevices()];
                case 1:
                    return r = n.sent(),
                    r ? [2, r.find(function(i) {
                        return i.deviceId === e
                    })] : [2]
                }
            })
        })
    }
    ,
    t.cleanVideoSource = function(e) {
        if (e) {
            try {
                e.srcObject = null
            } catch {
                e.src = ""
            }
            e && e.removeAttribute("src")
        }
    }
    ,
    t.releaseAllStreams = function() {
        t.streamTracker.length !== 0 && t.streamTracker.forEach(function(e) {
            e.getTracks().forEach(function(r) {
                return r.stop()
            })
        }),
        t.streamTracker = []
    }
    ,
    t.playVideoOnLoadAsync = function(e, r) {
        return zt(this, void 0, void 0, function() {
            var n;
            return jt(this, function(i) {
                switch (i.label) {
                case 0:
                    return [4, t.tryPlayVideo(e)];
                case 1:
                    return n = i.sent(),
                    n ? [2, !0] : [2, new Promise(function(o, s) {
                        var a = setTimeout(function() {
                            t.isVideoPlaying(e) || (s(!1),
                            e.removeEventListener("canplay", l))
                        }, r)
                          , l = function() {
                            t.tryPlayVideo(e).then(function(c) {
                                clearTimeout(a),
                                e.removeEventListener("canplay", l),
                                o(c)
                            })
                        };
                        e.addEventListener("canplay", l)
                    }
                    )]
                }
            })
        })
    }
    ,
    t.attachStreamToVideo = function(e, r, n) {
        return n === void 0 && (n = 5e3),
        zt(this, void 0, void 0, function() {
            var i;
            return jt(this, function(o) {
                switch (o.label) {
                case 0:
                    return i = t.prepareVideoElement(r),
                    t.addVideoSource(i, e),
                    [4, t.playVideoOnLoadAsync(i, n)];
                case 1:
                    return o.sent(),
                    [2, i]
                }
            })
        })
    }
    ,
    t._waitImageLoad = function(e) {
        return new Promise(function(r, n) {
            var i = 1e4
              , o = setTimeout(function() {
                t.isImageLoaded(e) || (e.removeEventListener("load", s),
                n())
            }, i)
              , s = function() {
                clearTimeout(o),
                e.removeEventListener("load", s),
                r()
            };
            e.addEventListener("load", s)
        }
        )
    }
    ,
    t.checkCallbackFnOrThrow = function(e) {
        if (!e)
            throw new ir("`callbackFn` is a required parameter, you cannot capture results without it.")
    }
    ,
    t.disposeMediaStream = function(e) {
        e.getVideoTracks().forEach(function(r) {
            return r.stop()
        }),
        e = void 0
    }
    ,
    t.prototype.decode = function(e) {
        var r = t.createCanvasFromMediaElement(e);
        return this.decodeFromCanvas(r)
    }
    ,
    t.prototype.decodeBitmap = function(e) {
        return this.reader.decode(e, this.hints)
    }
    ,
    t.prototype.decodeFromCanvas = function(e) {
        var r = t.createBinaryBitmapFromCanvas(e);
        return this.decodeBitmap(r)
    }
    ,
    t.prototype.decodeFromImageElement = function(e) {
        return zt(this, void 0, void 0, function() {
            var r;
            return jt(this, function(n) {
                switch (n.label) {
                case 0:
                    if (!e)
                        throw new ir("An image element must be provided.");
                    return r = t.prepareImageElement(e),
                    [4, this._decodeOnLoadImage(r)];
                case 1:
                    return [2, n.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromImageUrl = function(e) {
        return zt(this, void 0, void 0, function() {
            var r;
            return jt(this, function(n) {
                switch (n.label) {
                case 0:
                    if (!e)
                        throw new ir("An URL must be provided.");
                    r = t.prepareImageElement(),
                    r.src = e,
                    n.label = 1;
                case 1:
                    return n.trys.push([1, , 3, 4]),
                    [4, this.decodeFromImageElement(r)];
                case 2:
                    return [2, n.sent()];
                case 3:
                    return t.destroyImageElement(r),
                    [7];
                case 4:
                    return [2]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromConstraints = function(e, r, n) {
        return zt(this, void 0, void 0, function() {
            var i, o;
            return jt(this, function(s) {
                switch (s.label) {
                case 0:
                    return t.checkCallbackFnOrThrow(n),
                    [4, this.getUserMedia(e)];
                case 1:
                    i = s.sent(),
                    s.label = 2;
                case 2:
                    return s.trys.push([2, 4, , 5]),
                    [4, this.decodeFromStream(i, r, n)];
                case 3:
                    return [2, s.sent()];
                case 4:
                    throw o = s.sent(),
                    t.disposeMediaStream(i),
                    o;
                case 5:
                    return [2]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromStream = function(e, r, n) {
        return zt(this, void 0, void 0, function() {
            var i, o, s, a, l, c, u, f, d, h = this;
            return jt(this, function(x) {
                switch (x.label) {
                case 0:
                    return t.checkCallbackFnOrThrow(n),
                    i = this.options.tryPlayVideoTimeout,
                    [4, t.attachStreamToVideo(e, r, i)];
                case 1:
                    return o = x.sent(),
                    s = function() {
                        t.disposeMediaStream(e),
                        t.cleanVideoSource(o)
                    }
                    ,
                    a = this.scan(o, n, s),
                    l = e.getVideoTracks(),
                    c = Tc(Tc({}, a), {
                        stop: function() {
                            a.stop()
                        },
                        streamVideoConstraintsApply: function(y, m) {
                            return zt(this, void 0, void 0, function() {
                                var E, g, p, v, _, b, C;
                                return jt(this, function(B) {
                                    switch (B.label) {
                                    case 0:
                                        E = m ? l.filter(m) : l,
                                        B.label = 1;
                                    case 1:
                                        B.trys.push([1, 6, 7, 8]),
                                        g = Jm(E),
                                        p = g.next(),
                                        B.label = 2;
                                    case 2:
                                        return p.done ? [3, 5] : (v = p.value,
                                        [4, v.applyConstraints(y)]);
                                    case 3:
                                        B.sent(),
                                        B.label = 4;
                                    case 4:
                                        return p = g.next(),
                                        [3, 2];
                                    case 5:
                                        return [3, 8];
                                    case 6:
                                        return _ = B.sent(),
                                        b = {
                                            error: _
                                        },
                                        [3, 8];
                                    case 7:
                                        try {
                                            p && !p.done && (C = g.return) && C.call(g)
                                        } finally {
                                            if (b)
                                                throw b.error
                                        }
                                        return [7];
                                    case 8:
                                        return [2]
                                    }
                                })
                            })
                        },
                        streamVideoConstraintsGet: function(y) {
                            return l.find(y).getConstraints()
                        },
                        streamVideoSettingsGet: function(y) {
                            return l.find(y).getSettings()
                        },
                        streamVideoCapabilitiesGet: function(y) {
                            return l.find(y).getCapabilities()
                        }
                    }),
                    u = t.mediaStreamIsTorchCompatible(e),
                    u && (f = l == null ? void 0 : l.find(function(y) {
                        return t.mediaStreamIsTorchCompatibleTrack(y)
                    }),
                    d = function(y) {
                        return zt(h, void 0, void 0, function() {
                            return jt(this, function(m) {
                                switch (m.label) {
                                case 0:
                                    return [4, t.mediaStreamSetTorch(f, y)];
                                case 1:
                                    return m.sent(),
                                    [2]
                                }
                            })
                        })
                    }
                    ,
                    c.switchTorch = d,
                    c.stop = function() {
                        return zt(h, void 0, void 0, function() {
                            return jt(this, function(y) {
                                switch (y.label) {
                                case 0:
                                    return a.stop(),
                                    [4, d(!1)];
                                case 1:
                                    return y.sent(),
                                    [2]
                                }
                            })
                        })
                    }
                    ),
                    [2, c]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromVideoDevice = function(e, r, n) {
        return zt(this, void 0, void 0, function() {
            var i, o;
            return jt(this, function(s) {
                switch (s.label) {
                case 0:
                    return t.checkCallbackFnOrThrow(n),
                    e ? i = {
                        deviceId: {
                            exact: e
                        }
                    } : i = {
                        facingMode: "environment"
                    },
                    o = {
                        video: i
                    },
                    [4, this.decodeFromConstraints(o, r, n)];
                case 1:
                    return [2, s.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromVideoElement = function(e, r) {
        return zt(this, void 0, void 0, function() {
            var n, i;
            return jt(this, function(o) {
                switch (o.label) {
                case 0:
                    if (t.checkCallbackFnOrThrow(r),
                    !e)
                        throw new ir("A video element must be provided.");
                    return n = t.prepareVideoElement(e),
                    i = this.options.tryPlayVideoTimeout,
                    [4, t.playVideoOnLoadAsync(n, i)];
                case 1:
                    return o.sent(),
                    [2, this.scan(n, r)]
                }
            })
        })
    }
    ,
    t.prototype.decodeFromVideoUrl = function(e, r) {
        return zt(this, void 0, void 0, function() {
            var n, i, o, s;
            return jt(this, function(a) {
                switch (a.label) {
                case 0:
                    if (t.checkCallbackFnOrThrow(r),
                    !e)
                        throw new ir("An URL must be provided.");
                    return n = t.prepareVideoElement(),
                    n.src = e,
                    i = function() {
                        t.cleanVideoSource(n)
                    }
                    ,
                    o = this.options.tryPlayVideoTimeout,
                    [4, t.playVideoOnLoadAsync(n, o)];
                case 1:
                    return a.sent(),
                    s = this.scan(n, r, i),
                    [2, s]
                }
            })
        })
    }
    ,
    t.prototype.decodeOnceFromConstraints = function(e, r) {
        return zt(this, void 0, void 0, function() {
            var n;
            return jt(this, function(i) {
                switch (i.label) {
                case 0:
                    return [4, this.getUserMedia(e)];
                case 1:
                    return n = i.sent(),
                    [4, this.decodeOnceFromStream(n, r)];
                case 2:
                    return [2, i.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeOnceFromStream = function(e, r) {
        return zt(this, void 0, void 0, function() {
            var n, i, o;
            return jt(this, function(s) {
                switch (s.label) {
                case 0:
                    return n = !!r,
                    [4, t.attachStreamToVideo(e, r)];
                case 1:
                    i = s.sent(),
                    s.label = 2;
                case 2:
                    return s.trys.push([2, , 4, 5]),
                    [4, this.scanOneResult(i)];
                case 3:
                    return o = s.sent(),
                    [2, o];
                case 4:
                    return n || t.cleanVideoSource(i),
                    [7];
                case 5:
                    return [2]
                }
            })
        })
    }
    ,
    t.prototype.decodeOnceFromVideoDevice = function(e, r) {
        return zt(this, void 0, void 0, function() {
            var n, i;
            return jt(this, function(o) {
                switch (o.label) {
                case 0:
                    return e ? n = {
                        deviceId: {
                            exact: e
                        }
                    } : n = {
                        facingMode: "environment"
                    },
                    i = {
                        video: n
                    },
                    [4, this.decodeOnceFromConstraints(i, r)];
                case 1:
                    return [2, o.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeOnceFromVideoElement = function(e) {
        return zt(this, void 0, void 0, function() {
            var r, n;
            return jt(this, function(i) {
                switch (i.label) {
                case 0:
                    if (!e)
                        throw new ir("A video element must be provided.");
                    return r = t.prepareVideoElement(e),
                    n = this.options.tryPlayVideoTimeout,
                    [4, t.playVideoOnLoadAsync(r, n)];
                case 1:
                    return i.sent(),
                    [4, this.scanOneResult(r)];
                case 2:
                    return [2, i.sent()]
                }
            })
        })
    }
    ,
    t.prototype.decodeOnceFromVideoUrl = function(e) {
        return zt(this, void 0, void 0, function() {
            var r, n;
            return jt(this, function(i) {
                switch (i.label) {
                case 0:
                    if (!e)
                        throw new ir("An URL must be provided.");
                    r = t.prepareVideoElement(),
                    r.src = e,
                    n = this.decodeOnceFromVideoElement(r),
                    i.label = 1;
                case 1:
                    return i.trys.push([1, , 3, 4]),
                    [4, n];
                case 2:
                    return [2, i.sent()];
                case 3:
                    return t.cleanVideoSource(r),
                    [7];
                case 4:
                    return [2]
                }
            })
        })
    }
    ,
    t.prototype.scanOneResult = function(e, r, n, i) {
        var o = this;
        return r === void 0 && (r = !0),
        n === void 0 && (n = !0),
        i === void 0 && (i = !0),
        new Promise(function(s, a) {
            o.scan(e, function(l, c, u) {
                if (l) {
                    s(l),
                    u.stop();
                    return
                }
                if (c) {
                    if (c instanceof le && r || c instanceof fr && n || c instanceof ge && i)
                        return;
                    u.stop(),
                    a(c)
                }
            })
        }
        )
    }
    ,
    t.prototype.scan = function(e, r, n) {
        var i = this;
        t.checkCallbackFnOrThrow(r);
        var o = t.createCaptureCanvas(e), s;
        try {
            s = o.getContext("2d", {
                willReadFrequently: !0
            })
        } catch {
            s = o.getContext("2d")
        }
        if (!s)
            throw new Error("Couldn't create canvas for visual element scan.");
        var a = function() {
            s = void 0,
            o = void 0
        }, l = !1, c, u = function() {
            l = !0,
            clearTimeout(c),
            a(),
            n && n()
        }, f = {
            stop: u
        }, d = function() {
            if (!l)
                try {
                    t.drawImageOnCanvas(s, e);
                    var h = i.decodeFromCanvas(o);
                    r(h, void 0, f),
                    c = setTimeout(d, i.options.delayBetweenScanSuccess)
                } catch (E) {
                    r(void 0, E, f);
                    var x = E instanceof fr
                      , y = E instanceof ge
                      , m = E instanceof le;
                    if (x || y || m) {
                        c = setTimeout(d, i.options.delayBetweenScanAttempts);
                        return
                    }
                    a(),
                    n && n(E)
                }
        };
        return d(),
        f
    }
    ,
    t.prototype._decodeOnLoadImage = function(e) {
        return zt(this, void 0, void 0, function() {
            var r;
            return jt(this, function(n) {
                switch (n.label) {
                case 0:
                    return r = t.isImageLoaded(e),
                    r ? [3, 2] : [4, t._waitImageLoad(e)];
                case 1:
                    n.sent(),
                    n.label = 2;
                case 2:
                    return [2, this.decode(e)]
                }
            })
        })
    }
    ,
    t.prototype.getUserMedia = function(e) {
        return zt(this, void 0, void 0, function() {
            var r;
            return jt(this, function(n) {
                switch (n.label) {
                case 0:
                    return [4, navigator.mediaDevices.getUserMedia(e)];
                case 1:
                    return r = n.sent(),
                    t.streamTracker.push(r),
                    [2, r]
                }
            })
        })
    }
    ,
    t.streamTracker = [],
    t
}()
  , P8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        if (typeof r != "function" && r !== null)
            throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    P8e(e, t);
    function e(r, n) {
        return t.call(this, new Jx, r, n) || this
    }
    return e
}
)(Fu);
var I8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        if (typeof r != "function" && r !== null)
            throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    I8e(e, t);
    function e(r, n) {
        return t.call(this, new Bc(r), r, n) || this
    }
    return e
}
)(Fu);
var O8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        if (typeof r != "function" && r !== null)
            throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    O8e(e, t);
    function e(r, n) {
        return t.call(this, new ep, r, n) || this
    }
    return e
}
)(Fu);
var k8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        if (typeof r != "function" && r !== null)
            throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    k8e(e, t);
    function e(r, n) {
        var i = this
          , o = new vM;
        return o.setHints(r),
        i = t.call(this, o, r, n) || this,
        i.reader = o,
        i
    }
    return Object.defineProperty(e.prototype, "possibleFormats", {
        set: function(r) {
            this.hints.set(Ft.POSSIBLE_FORMATS, r),
            this.reader.setHints(this.hints)
        },
        enumerable: !1,
        configurable: !0
    }),
    e.prototype.decodeBitmap = function(r) {
        return this.reader.decodeWithState(r)
    }
    ,
    e.prototype.setHints = function(r) {
        this.hints = r,
        this.reader.setHints(this.hints)
    }
    ,
    e
}
)(Fu);
var R8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        if (typeof r != "function" && r !== null)
            throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}();
(function(t) {
    R8e(e, t);
    function e(r, n) {
        return t.call(this, new rp, r, n) || this
    }
    return e
}
)(Fu);
var M8e = globalThis && globalThis.__extends || function() {
    var t = function(e, r) {
        return t = Object.setPrototypeOf || {
            __proto__: []
        }instanceof Array && function(n, i) {
            n.__proto__ = i
        }
        || function(n, i) {
            for (var o in i)
                Object.prototype.hasOwnProperty.call(i, o) && (n[o] = i[o])
        }
        ,
        t(e, r)
    };
    return function(e, r) {
        if (typeof r != "function" && r !== null)
            throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
        t(e, r);
        function n() {
            this.constructor = e
        }
        e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype,
        new n)
    }
}()
  , L6e = function(t) {
    M8e(e, t);
    function e(r, n) {
        return t.call(this, new tp, r, n) || this
    }
    return e
}(Fu);
const AM = new Set
  , Xn = new WeakMap
  , $c = new WeakMap
  , Fl = new WeakMap
  , WE = new WeakMap
  , N8e = new WeakMap
  , hu = new WeakMap
  , ip = new WeakMap;
let da;
const el = "__aa_tgt"
  , YE = "__aa_del"
  , L8e = t => {
    const e = V8e(t);
    e && e.forEach(r => z8e(r))
}
  , $8e = t => {
    t.forEach(e => {
        e.target === da && G8e(),
        Xn.has(e.target) && Vl(e.target)
    }
    )
}
;
function U8e(t) {
    const e = WE.get(t);
    e == null || e.disconnect();
    let r = Xn.get(t)
      , n = 0;
    const i = 5;
    r || (r = xu(t),
    Xn.set(t, r));
    const {offsetWidth: o, offsetHeight: s} = da
      , l = [r.top - i, o - (r.left + i + r.width), s - (r.top + i + r.height), r.left - i].map(u => `${-1 * Math.floor(u)}px`).join(" ")
      , c = new IntersectionObserver( () => {
        ++n > 1 && Vl(t)
    }
    ,{
        root: da,
        threshold: 1,
        rootMargin: l
    });
    c.observe(t),
    WE.set(t, c)
}
function Vl(t) {
    clearTimeout(ip.get(t));
    const e = k1(t)
      , r = typeof e == "function" ? 500 : e.duration;
    ip.set(t, setTimeout( () => {
        const n = Fl.get(t);
        (!n || n.finished) && (Xn.set(t, xu(t)),
        U8e(t))
    }
    , r))
}
function G8e() {
    clearTimeout(ip.get(da)),
    ip.set(da, setTimeout( () => {
        AM.forEach(t => SM(t, e => wM( () => Vl(e))))
    }
    , 100))
}
function H8e(t) {
    setTimeout( () => {
        N8e.set(t, setInterval( () => wM(Vl.bind(null, t)), 2e3))
    }
    , Math.round(2e3 * Math.random()))
}
function wM(t) {
    typeof requestIdleCallback == "function" ? requestIdleCallback( () => t()) : requestAnimationFrame( () => t())
}
let XE, Dc;
typeof window < "u" && (da = document.documentElement,
XE = new MutationObserver(L8e),
Dc = new ResizeObserver($8e),
Dc.observe(da));
function V8e(t) {
    return t.reduce( (e, r) => {
        if (e === !1)
            return !1;
        if (r.target instanceof Element) {
            if (Qm(r.target),
            !e.has(r.target)) {
                e.add(r.target);
                for (let n = 0; n < r.target.children.length; n++) {
                    const i = r.target.children.item(n);
                    if (i) {
                        if (YE in i)
                            return !1;
                        Qm(r.target, i),
                        e.add(i)
                    }
                }
            }
            if (r.removedNodes.length)
                for (let n = 0; n < r.removedNodes.length; n++) {
                    const i = r.removedNodes[n];
                    if (YE in i)
                        return !1;
                    i instanceof Element && (e.add(i),
                    Qm(r.target, i),
                    $c.set(i, [r.previousSibling, r.nextSibling]))
                }
        }
        return e
    }
    , new Set)
}
function Qm(t, e) {
    !e && !(el in t) ? Object.defineProperty(t, el, {
        value: t
    }) : e && !(el in e) && Object.defineProperty(e, el, {
        value: t
    })
}
function z8e(t) {
    var e;
    const r = da.contains(t)
      , n = Xn.has(t);
    r && $c.has(t) && $c.delete(t),
    Fl.has(t) && ((e = Fl.get(t)) === null || e === void 0 || e.cancel()),
    n && r ? j8e(t) : n && !r ? Y8e(t) : W8e(t)
}
function to(t) {
    return Number(t.replace(/[^0-9.\-]/g, ""))
}
function xu(t) {
    const e = t.getBoundingClientRect();
    return {
        top: e.top + window.scrollY,
        left: e.left + window.scrollX,
        width: e.width,
        height: e.height
    }
}
function BM(t, e, r) {
    let n = e.width
      , i = e.height
      , o = r.width
      , s = r.height;
    const a = getComputedStyle(t);
    if (a.getPropertyValue("box-sizing") === "content-box") {
        const c = to(a.paddingTop) + to(a.paddingBottom) + to(a.borderTopWidth) + to(a.borderBottomWidth)
          , u = to(a.paddingLeft) + to(a.paddingRight) + to(a.borderRightWidth) + to(a.borderLeftWidth);
        n -= u,
        o -= u,
        i -= c,
        s -= c
    }
    return [n, o, i, s].map(Math.round)
}
function k1(t) {
    return el in t && hu.has(t[el]) ? hu.get(t[el]) : {
        duration: 250,
        easing: "ease-in-out"
    }
}
function SM(t, ...e) {
    e.forEach(r => r(t, hu.has(t)));
    for (let r = 0; r < t.children.length; r++) {
        const n = t.children.item(r);
        n && e.forEach(i => i(n, hu.has(n)))
    }
}
function j8e(t) {
    const e = Xn.get(t)
      , r = xu(t);
    let n;
    if (!e)
        return;
    const i = k1(t);
    if (typeof i != "function") {
        const o = e.left - r.left
          , s = e.top - r.top
          , [a,l,c,u] = BM(t, e, r)
          , f = {
            transform: `translate(${o}px, ${s}px)`
        }
          , d = {
            transform: "translate(0, 0)"
        };
        a !== l && (f.width = `${a}px`,
        d.width = `${l}px`),
        c !== u && (f.height = `${c}px`,
        d.height = `${u}px`),
        n = t.animate([f, d], i)
    } else
        n = new Animation(i(t, "remain", e, r)),
        n.play();
    Fl.set(t, n),
    Xn.set(t, r),
    n.addEventListener("finish", Vl.bind(null, t))
}
function W8e(t) {
    const e = xu(t);
    Xn.set(t, e);
    const r = k1(t);
    let n;
    typeof r != "function" ? n = t.animate([{
        transform: "scale(.98)",
        opacity: 0
    }, {
        transform: "scale(0.98)",
        opacity: 0,
        offset: .5
    }, {
        transform: "scale(1)",
        opacity: 1
    }], {
        duration: r.duration * 1.5,
        easing: "ease-in"
    }) : (n = new Animation(r(t, "add", e)),
    n.play()),
    Fl.set(t, n),
    n.addEventListener("finish", Vl.bind(null, t))
}
function Y8e(t) {
    if (!$c.has(t) || !Xn.has(t))
        return;
    const [e,r] = $c.get(t);
    Object.defineProperty(t, YE, {
        value: !0
    }),
    r && r.parentNode && r.parentNode instanceof Element ? r.parentNode.insertBefore(t, r) : e && e.parentNode && e.parentNode.appendChild(t);
    const [n,i,o,s] = X8e(t)
      , a = k1(t)
      , l = Xn.get(t);
    let c;
    Object.assign(t.style, {
        position: "absolute",
        top: `${n}px`,
        left: `${i}px`,
        width: `${o}px`,
        height: `${s}px`,
        margin: 0,
        pointerEvents: "none",
        transformOrigin: "center",
        zIndex: 100
    }),
    typeof a != "function" ? c = t.animate([{
        transform: "scale(1)",
        opacity: 1
    }, {
        transform: "scale(.98)",
        opacity: 0
    }], {
        duration: a.duration,
        easing: "ease-out"
    }) : (c = new Animation(a(t, "remove", l)),
    c.play()),
    Fl.set(t, c),
    c.addEventListener("finish", () => {
        var u;
        t.remove(),
        Xn.delete(t),
        $c.delete(t),
        Fl.delete(t),
        (u = WE.get(t)) === null || u === void 0 || u.disconnect()
    }
    )
}
function X8e(t) {
    const e = Xn.get(t)
      , [r,,n] = BM(t, e, xu(t));
    let i = t.parentElement;
    for (; i && (getComputedStyle(i).position === "static" || i instanceof HTMLBodyElement); )
        i = i.parentElement;
    i || (i = document.body);
    const o = getComputedStyle(i)
      , s = Xn.get(i) || xu(i)
      , a = Math.round(e.top - s.top) - to(o.borderTopWidth)
      , l = Math.round(e.left - s.left) - to(o.borderLeftWidth);
    return [a, l, r, n]
}
function $6e(t, e={}) {
    XE && Dc && (getComputedStyle(t).position === "static" && Object.assign(t.style, {
        position: "relative"
    }),
    SM(t, Vl, H8e, r => Dc == null ? void 0 : Dc.observe(r)),
    typeof e == "function" ? hu.set(t, e) : hu.set(t, {
        duration: 250,
        easing: "ease-in-out",
        ...e
    }),
    XE.observe(t, {
        childList: !0
    }),
    AM.add(t))
}
var Pu = TypeError
  , TC = typeof Map == "function" && Map.prototype
  , ev = Object.getOwnPropertyDescriptor && TC ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null
  , op = TC && ev && typeof ev.get == "function" ? ev.get : null
  , D6 = TC && Map.prototype.forEach
  , DC = typeof Set == "function" && Set.prototype
  , tv = Object.getOwnPropertyDescriptor && DC ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null
  , sp = DC && tv && typeof tv.get == "function" ? tv.get : null
  , F6 = DC && Set.prototype.forEach
  , K8e = typeof WeakMap == "function" && WeakMap.prototype
  , z0 = K8e ? WeakMap.prototype.has : null
  , q8e = typeof WeakSet == "function" && WeakSet.prototype
  , j0 = q8e ? WeakSet.prototype.has : null
  , Z8e = typeof WeakRef == "function" && WeakRef.prototype
  , P6 = Z8e ? WeakRef.prototype.deref : null
  , J8e = Boolean.prototype.valueOf
  , Q8e = Object.prototype.toString
  , e9e = Function.prototype.toString
  , t9e = String.prototype.match
  , FC = String.prototype.slice
  , Ys = String.prototype.replace
  , r9e = String.prototype.toUpperCase
  , I6 = String.prototype.toLowerCase
  , TM = RegExp.prototype.test
  , O6 = Array.prototype.concat
  , io = Array.prototype.join
  , n9e = Array.prototype.slice
  , k6 = Math.floor
  , KE = typeof BigInt == "function" ? BigInt.prototype.valueOf : null
  , rv = Object.getOwnPropertySymbols
  , qE = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null
  , pu = typeof Symbol == "function" && typeof Symbol.iterator == "object"
  , W0 = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === pu || "symbol") ? Symbol.toStringTag : null
  , DM = Object.prototype.propertyIsEnumerable
  , R6 = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) {
    return t.__proto__
}
: null);
function M6(t, e) {
    if (t === 1 / 0 || t === -1 / 0 || t !== t || t && t > -1e3 && t < 1e3 || TM.call(/e/, e))
        return e;
    var r = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
    if (typeof t == "number") {
        var n = t < 0 ? -k6(-t) : k6(t);
        if (n !== t) {
            var i = String(n)
              , o = FC.call(e, i.length + 1);
            return Ys.call(i, r, "$&_") + "." + Ys.call(Ys.call(o, /([0-9]{3})/g, "$&_"), /_$/, "")
        }
    }
    return Ys.call(e, r, "$&_")
}
var ZE = NR
  , N6 = ZE.custom
  , L6 = IM(N6) ? N6 : null
  , FM = {
    __proto__: null,
    double: '"',
    single: "'"
}
  , i9e = {
    __proto__: null,
    double: /(["\\])/g,
    single: /(['\\])/g
}
  , R1 = function t(e, r, n, i) {
    var o = r || {};
    if (Go(o, "quoteStyle") && !Go(FM, o.quoteStyle))
        throw new TypeError('option "quoteStyle" must be "single" or "double"');
    if (Go(o, "maxStringLength") && (typeof o.maxStringLength == "number" ? o.maxStringLength < 0 && o.maxStringLength !== 1 / 0 : o.maxStringLength !== null))
        throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
    var s = Go(o, "customInspect") ? o.customInspect : !0;
    if (typeof s != "boolean" && s !== "symbol")
        throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
    if (Go(o, "indent") && o.indent !== null && o.indent !== "	" && !(parseInt(o.indent, 10) === o.indent && o.indent > 0))
        throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
    if (Go(o, "numericSeparator") && typeof o.numericSeparator != "boolean")
        throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
    var a = o.numericSeparator;
    if (typeof e > "u")
        return "undefined";
    if (e === null)
        return "null";
    if (typeof e == "boolean")
        return e ? "true" : "false";
    if (typeof e == "string")
        return kM(e, o);
    if (typeof e == "number") {
        if (e === 0)
            return 1 / 0 / e > 0 ? "0" : "-0";
        var l = String(e);
        return a ? M6(e, l) : l
    }
    if (typeof e == "bigint") {
        var c = String(e) + "n";
        return a ? M6(e, c) : c
    }
    var u = typeof o.depth > "u" ? 5 : o.depth;
    if (typeof n > "u" && (n = 0),
    n >= u && u > 0 && typeof e == "object")
        return JE(e) ? "[Array]" : "[Object]";
    var f = b9e(o, n);
    if (typeof i > "u")
        i = [];
    else if (OM(i, e) >= 0)
        return "[Circular]";
    function d(D, F, R) {
        if (F && (i = n9e.call(i),
        i.push(F)),
        R) {
            var P = {
                depth: o.depth
            };
            return Go(o, "quoteStyle") && (P.quoteStyle = o.quoteStyle),
            t(D, P, n + 1, i)
        }
        return t(D, o, n + 1, i)
    }
    if (typeof e == "function" && !$6(e)) {
        var h = h9e(e)
          , x = Ph(e, d);
        return "[Function" + (h ? ": " + h : " (anonymous)") + "]" + (x.length > 0 ? " { " + io.call(x, ", ") + " }" : "")
    }
    if (IM(e)) {
        var y = pu ? Ys.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : qE.call(e);
        return typeof e == "object" && !pu ? o0(y) : y
    }
    if (y9e(e)) {
        for (var m = "<" + I6.call(String(e.nodeName)), E = e.attributes || [], g = 0; g < E.length; g++)
            m += " " + E[g].name + "=" + PM(o9e(E[g].value), "double", o);
        return m += ">",
        e.childNodes && e.childNodes.length && (m += "..."),
        m += "</" + I6.call(String(e.nodeName)) + ">",
        m
    }
    if (JE(e)) {
        if (e.length === 0)
            return "[]";
        var p = Ph(e, d);
        return f && !_9e(p) ? "[" + QE(p, f) + "]" : "[ " + io.call(p, ", ") + " ]"
    }
    if (a9e(e)) {
        var v = Ph(e, d);
        return !("cause"in Error.prototype) && "cause"in e && !DM.call(e, "cause") ? "{ [" + String(e) + "] " + io.call(O6.call("[cause]: " + d(e.cause), v), ", ") + " }" : v.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + io.call(v, ", ") + " }"
    }
    if (typeof e == "object" && s) {
        if (L6 && typeof e[L6] == "function" && ZE)
            return ZE(e, {
                depth: u - n
            });
        if (s !== "symbol" && typeof e.inspect == "function")
            return e.inspect()
    }
    if (x9e(e)) {
        var _ = [];
        return D6 && D6.call(e, function(D, F) {
            _.push(d(F, e, !0) + " => " + d(D, e))
        }),
        U6("Map", op.call(e), _, f)
    }
    if (m9e(e)) {
        var b = [];
        return F6 && F6.call(e, function(D) {
            b.push(d(D, e))
        }),
        U6("Set", sp.call(e), b, f)
    }
    if (p9e(e))
        return nv("WeakMap");
    if (v9e(e))
        return nv("WeakSet");
    if (g9e(e))
        return nv("WeakRef");
    if (c9e(e))
        return o0(d(Number(e)));
    if (f9e(e))
        return o0(d(KE.call(e)));
    if (u9e(e))
        return o0(J8e.call(e));
    if (l9e(e))
        return o0(d(String(e)));
    if (typeof window < "u" && e === window)
        return "{ [object Window] }";
    if (typeof globalThis < "u" && e === globalThis || typeof er < "u" && e === er)
        return "{ [object globalThis] }";
    if (!s9e(e) && !$6(e)) {
        var C = Ph(e, d)
          , B = R6 ? R6(e) === Object.prototype : e instanceof Object || e.constructor === Object
          , T = e instanceof Object ? "" : "null prototype"
          , A = !B && W0 && Object(e) === e && W0 in e ? FC.call(ba(e), 8, -1) : T ? "Object" : ""
          , w = B || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : ""
          , S = w + (A || T ? "[" + io.call(O6.call([], A || [], T || []), ": ") + "] " : "");
        return C.length === 0 ? S + "{}" : f ? S + "{" + QE(C, f) + "}" : S + "{ " + io.call(C, ", ") + " }"
    }
    return String(e)
};
function PM(t, e, r) {
    var n = r.quoteStyle || e
      , i = FM[n];
    return i + t + i
}
function o9e(t) {
    return Ys.call(String(t), /"/g, "&quot;")
}
function zl(t) {
    return !W0 || !(typeof t == "object" && (W0 in t || typeof t[W0] < "u"))
}
function JE(t) {
    return ba(t) === "[object Array]" && zl(t)
}
function s9e(t) {
    return ba(t) === "[object Date]" && zl(t)
}
function $6(t) {
    return ba(t) === "[object RegExp]" && zl(t)
}
function a9e(t) {
    return ba(t) === "[object Error]" && zl(t)
}
function l9e(t) {
    return ba(t) === "[object String]" && zl(t)
}
function c9e(t) {
    return ba(t) === "[object Number]" && zl(t)
}
function u9e(t) {
    return ba(t) === "[object Boolean]" && zl(t)
}
function IM(t) {
    if (pu)
        return t && typeof t == "object" && t instanceof Symbol;
    if (typeof t == "symbol")
        return !0;
    if (!t || typeof t != "object" || !qE)
        return !1;
    try {
        return qE.call(t),
        !0
    } catch {}
    return !1
}
function f9e(t) {
    if (!t || typeof t != "object" || !KE)
        return !1;
    try {
        return KE.call(t),
        !0
    } catch {}
    return !1
}
var d9e = Object.prototype.hasOwnProperty || function(t) {
    return t in this
}
;
function Go(t, e) {
    return d9e.call(t, e)
}
function ba(t) {
    return Q8e.call(t)
}
function h9e(t) {
    if (t.name)
        return t.name;
    var e = t9e.call(e9e.call(t), /^function\s*([\w$]+)/);
    return e ? e[1] : null
}
function OM(t, e) {
    if (t.indexOf)
        return t.indexOf(e);
    for (var r = 0, n = t.length; r < n; r++)
        if (t[r] === e)
            return r;
    return -1
}
function x9e(t) {
    if (!op || !t || typeof t != "object")
        return !1;
    try {
        op.call(t);
        try {
            sp.call(t)
        } catch {
            return !0
        }
        return t instanceof Map
    } catch {}
    return !1
}
function p9e(t) {
    if (!z0 || !t || typeof t != "object")
        return !1;
    try {
        z0.call(t, z0);
        try {
            j0.call(t, j0)
        } catch {
            return !0
        }
        return t instanceof WeakMap
    } catch {}
    return !1
}
function g9e(t) {
    if (!P6 || !t || typeof t != "object")
        return !1;
    try {
        return P6.call(t),
        !0
    } catch {}
    return !1
}
function m9e(t) {
    if (!sp || !t || typeof t != "object")
        return !1;
    try {
        sp.call(t);
        try {
            op.call(t)
        } catch {
            return !0
        }
        return t instanceof Set
    } catch {}
    return !1
}
function v9e(t) {
    if (!j0 || !t || typeof t != "object")
        return !1;
    try {
        j0.call(t, j0);
        try {
            z0.call(t, z0)
        } catch {
            return !0
        }
        return t instanceof WeakSet
    } catch {}
    return !1
}
function y9e(t) {
    return !t || typeof t != "object" ? !1 : typeof HTMLElement < "u" && t instanceof HTMLElement ? !0 : typeof t.nodeName == "string" && typeof t.getAttribute == "function"
}
function kM(t, e) {
    if (t.length > e.maxStringLength) {
        var r = t.length - e.maxStringLength
          , n = "... " + r + " more character" + (r > 1 ? "s" : "");
        return kM(FC.call(t, 0, e.maxStringLength), e) + n
    }
    var i = i9e[e.quoteStyle || "single"];
    i.lastIndex = 0;
    var o = Ys.call(Ys.call(t, i, "\\$1"), /[\x00-\x1f]/g, E9e);
    return PM(o, "single", e)
}
function E9e(t) {
    var e = t.charCodeAt(0)
      , r = {
        8: "b",
        9: "t",
        10: "n",
        12: "f",
        13: "r"
    }[e];
    return r ? "\\" + r : "\\x" + (e < 16 ? "0" : "") + r9e.call(e.toString(16))
}
function o0(t) {
    return "Object(" + t + ")"
}
function nv(t) {
    return t + " { ? }"
}
function U6(t, e, r, n) {
    var i = n ? QE(r, n) : io.call(r, ", ");
    return t + " (" + e + ") {" + i + "}"
}
function _9e(t) {
    for (var e = 0; e < t.length; e++)
        if (OM(t[e], `
`) >= 0)
            return !1;
    return !0
}
function b9e(t, e) {
    var r;
    if (t.indent === "	")
        r = "	";
    else if (typeof t.indent == "number" && t.indent > 0)
        r = io.call(Array(t.indent + 1), " ");
    else
        return null;
    return {
        base: r,
        prev: io.call(Array(e + 1), r)
    }
}
function QE(t, e) {
    if (t.length === 0)
        return "";
    var r = `
` + e.prev + e.base;
    return r + io.call(t, "," + r) + `
` + e.prev
}
function Ph(t, e) {
    var r = JE(t)
      , n = [];
    if (r) {
        n.length = t.length;
        for (var i = 0; i < t.length; i++)
            n[i] = Go(t, i) ? e(t[i], t) : ""
    }
    var o = typeof rv == "function" ? rv(t) : [], s;
    if (pu) {
        s = {};
        for (var a = 0; a < o.length; a++)
            s["$" + o[a]] = o[a]
    }
    for (var l in t)
        Go(t, l) && (r && String(Number(l)) === l && l < t.length || pu && s["$" + l]instanceof Symbol || (TM.call(/[^\w$]/, l) ? n.push(e(l, t) + ": " + e(t[l], t)) : n.push(l + ": " + e(t[l], t))));
    if (typeof rv == "function")
        for (var c = 0; c < o.length; c++)
            DM.call(t, o[c]) && n.push("[" + e(o[c]) + "]: " + e(t[o[c]], t));
    return n
}
var C9e = R1
  , A9e = Pu
  , M1 = function(t, e, r) {
    for (var n = t, i; (i = n.next) != null; n = i)
        if (i.key === e)
            return n.next = i.next,
            r || (i.next = t.next,
            t.next = i),
            i
}
  , w9e = function(t, e) {
    if (t) {
        var r = M1(t, e);
        return r && r.value
    }
}
  , B9e = function(t, e, r) {
    var n = M1(t, e);
    n ? n.value = r : t.next = {
        key: e,
        next: t.next,
        value: r
    }
}
  , S9e = function(t, e) {
    return t ? !!M1(t, e) : !1
}
  , T9e = function(t, e) {
    if (t)
        return M1(t, e, !0)
}
  , D9e = function() {
    var e, r = {
        assert: function(n) {
            if (!r.has(n))
                throw new A9e("Side channel does not contain " + C9e(n))
        },
        delete: function(n) {
            var i = e && e.next
              , o = T9e(e, n);
            return o && i && i === o && (e = void 0),
            !!o
        },
        get: function(n) {
            return w9e(e, n)
        },
        has: function(n) {
            return S9e(e, n)
        },
        set: function(n, i) {
            e || (e = {
                next: void 0
            }),
            B9e(e, n, i)
        }
    };
    return r
}
  , RM = Object
  , F9e = Error
  , P9e = EvalError
  , I9e = RangeError
  , O9e = ReferenceError
  , k9e = SyntaxError
  , R9e = URIError
  , M9e = Math.abs
  , N9e = Math.floor
  , L9e = Math.max
  , $9e = Math.min
  , U9e = Math.pow
  , G9e = Math.round
  , H9e = Number.isNaN || function(e) {
    return e !== e
}
  , V9e = H9e
  , z9e = function(e) {
    return V9e(e) || e === 0 ? e : e < 0 ? -1 : 1
}
  , j9e = Object.getOwnPropertyDescriptor
  , ox = j9e;
if (ox)
    try {
        ox([], "length")
    } catch {
        ox = null
    }
var MM = ox
  , sx = Object.defineProperty || !1;
if (sx)
    try {
        sx({}, "a", {
            value: 1
        })
    } catch {
        sx = !1
    }
var W9e = sx, iv, G6;
function Y9e() {
    return G6 || (G6 = 1,
    iv = function() {
        if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
            return !1;
        if (typeof Symbol.iterator == "symbol")
            return !0;
        var e = {}
          , r = Symbol("test")
          , n = Object(r);
        if (typeof r == "string" || Object.prototype.toString.call(r) !== "[object Symbol]" || Object.prototype.toString.call(n) !== "[object Symbol]")
            return !1;
        var i = 42;
        e[r] = i;
        for (var o in e)
            return !1;
        if (typeof Object.keys == "function" && Object.keys(e).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(e).length !== 0)
            return !1;
        var s = Object.getOwnPropertySymbols(e);
        if (s.length !== 1 || s[0] !== r || !Object.prototype.propertyIsEnumerable.call(e, r))
            return !1;
        if (typeof Object.getOwnPropertyDescriptor == "function") {
            var a = Object.getOwnPropertyDescriptor(e, r);
            if (a.value !== i || a.enumerable !== !0)
                return !1
        }
        return !0
    }
    ),
    iv
}
var ov, H6;
function X9e() {
    if (H6)
        return ov;
    H6 = 1;
    var t = typeof Symbol < "u" && Symbol
      , e = Y9e();
    return ov = function() {
        return typeof t != "function" || typeof Symbol != "function" || typeof t("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : e()
    }
    ,
    ov
}
var sv, V6;
function NM() {
    return V6 || (V6 = 1,
    sv = typeof Reflect < "u" && Reflect.getPrototypeOf || null),
    sv
}
var av, z6;
function LM() {
    if (z6)
        return av;
    z6 = 1;
    var t = RM;
    return av = t.getPrototypeOf || null,
    av
}
var lv, j6;
function K9e() {
    if (j6)
        return lv;
    j6 = 1;
    var t = "Function.prototype.bind called on incompatible "
      , e = Object.prototype.toString
      , r = Math.max
      , n = "[object Function]"
      , i = function(l, c) {
        for (var u = [], f = 0; f < l.length; f += 1)
            u[f] = l[f];
        for (var d = 0; d < c.length; d += 1)
            u[d + l.length] = c[d];
        return u
    }
      , o = function(l, c) {
        for (var u = [], f = c || 0, d = 0; f < l.length; f += 1,
        d += 1)
            u[d] = l[f];
        return u
    }
      , s = function(a, l) {
        for (var c = "", u = 0; u < a.length; u += 1)
            c += a[u],
            u + 1 < a.length && (c += l);
        return c
    };
    return lv = function(l) {
        var c = this;
        if (typeof c != "function" || e.apply(c) !== n)
            throw new TypeError(t + c);
        for (var u = o(arguments, 1), f, d = function() {
            if (this instanceof f) {
                var E = c.apply(this, i(u, arguments));
                return Object(E) === E ? E : this
            }
            return c.apply(l, i(u, arguments))
        }, h = r(0, c.length - u.length), x = [], y = 0; y < h; y++)
            x[y] = "$" + y;
        if (f = Function("binder", "return function (" + s(x, ",") + "){ return binder.apply(this,arguments); }")(d),
        c.prototype) {
            var m = function() {};
            m.prototype = c.prototype,
            f.prototype = new m,
            m.prototype = null
        }
        return f
    }
    ,
    lv
}
var cv, W6;
function N1() {
    if (W6)
        return cv;
    W6 = 1;
    var t = K9e();
    return cv = Function.prototype.bind || t,
    cv
}
var uv, Y6;
function PC() {
    return Y6 || (Y6 = 1,
    uv = Function.prototype.call),
    uv
}
var fv, X6;
function $M() {
    return X6 || (X6 = 1,
    fv = Function.prototype.apply),
    fv
}
var q9e = typeof Reflect < "u" && Reflect && Reflect.apply, Z9e = N1(), J9e = $M(), Q9e = PC(), eAe = q9e, tAe = eAe || Z9e.call(Q9e, J9e), rAe = N1(), nAe = Pu, iAe = PC(), oAe = tAe, UM = function(e) {
    if (e.length < 1 || typeof e[0] != "function")
        throw new nAe("a function is required");
    return oAe(rAe, iAe, e)
}, dv, K6;
function sAe() {
    if (K6)
        return dv;
    K6 = 1;
    var t = UM, e = MM, r;
    try {
        r = [].__proto__ === Array.prototype
    } catch (s) {
        if (!s || typeof s != "object" || !("code"in s) || s.code !== "ERR_PROTO_ACCESS")
            throw s
    }
    var n = !!r && e && e(Object.prototype, "__proto__")
      , i = Object
      , o = i.getPrototypeOf;
    return dv = n && typeof n.get == "function" ? t([n.get]) : typeof o == "function" ? function(a) {
        return o(a == null ? a : i(a))
    }
    : !1,
    dv
}
var hv, q6;
function aAe() {
    if (q6)
        return hv;
    q6 = 1;
    var t = NM()
      , e = LM()
      , r = sAe();
    return hv = t ? function(i) {
        return t(i)
    }
    : e ? function(i) {
        if (!i || typeof i != "object" && typeof i != "function")
            throw new TypeError("getProto: not an object");
        return e(i)
    }
    : r ? function(i) {
        return r(i)
    }
    : null,
    hv
}
var xv, Z6;
function lAe() {
    if (Z6)
        return xv;
    Z6 = 1;
    var t = Function.prototype.call
      , e = Object.prototype.hasOwnProperty
      , r = N1();
    return xv = r.call(t, e),
    xv
}
var Je, cAe = RM, uAe = F9e, fAe = P9e, dAe = I9e, hAe = O9e, gu = k9e, Uc = Pu, xAe = R9e, pAe = M9e, gAe = N9e, mAe = L9e, vAe = $9e, yAe = U9e, EAe = G9e, _Ae = z9e, GM = Function, pv = function(t) {
    try {
        return GM('"use strict"; return (' + t + ").constructor;")()
    } catch {}
}, Of = MM, bAe = W9e, gv = function() {
    throw new Uc
}, CAe = Of ? function() {
    try {
        return arguments.callee,
        gv
    } catch {
        try {
            return Of(arguments, "callee").get
        } catch {
            return gv
        }
    }
}() : gv, uc = X9e()(), Fr = aAe(), AAe = LM(), wAe = NM(), HM = $M(), _d = PC(), yc = {}, BAe = typeof Uint8Array > "u" || !Fr ? Je : Fr(Uint8Array), fl = {
    __proto__: null,
    "%AggregateError%": typeof AggregateError > "u" ? Je : AggregateError,
    "%Array%": Array,
    "%ArrayBuffer%": typeof ArrayBuffer > "u" ? Je : ArrayBuffer,
    "%ArrayIteratorPrototype%": uc && Fr ? Fr([][Symbol.iterator]()) : Je,
    "%AsyncFromSyncIteratorPrototype%": Je,
    "%AsyncFunction%": yc,
    "%AsyncGenerator%": yc,
    "%AsyncGeneratorFunction%": yc,
    "%AsyncIteratorPrototype%": yc,
    "%Atomics%": typeof Atomics > "u" ? Je : Atomics,
    "%BigInt%": typeof BigInt > "u" ? Je : BigInt,
    "%BigInt64Array%": typeof BigInt64Array > "u" ? Je : BigInt64Array,
    "%BigUint64Array%": typeof BigUint64Array > "u" ? Je : BigUint64Array,
    "%Boolean%": Boolean,
    "%DataView%": typeof DataView > "u" ? Je : DataView,
    "%Date%": Date,
    "%decodeURI%": decodeURI,
    "%decodeURIComponent%": decodeURIComponent,
    "%encodeURI%": encodeURI,
    "%encodeURIComponent%": encodeURIComponent,
    "%Error%": uAe,
    "%eval%": eval,
    "%EvalError%": fAe,
    "%Float16Array%": typeof Float16Array > "u" ? Je : Float16Array,
    "%Float32Array%": typeof Float32Array > "u" ? Je : Float32Array,
    "%Float64Array%": typeof Float64Array > "u" ? Je : Float64Array,
    "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? Je : FinalizationRegistry,
    "%Function%": GM,
    "%GeneratorFunction%": yc,
    "%Int8Array%": typeof Int8Array > "u" ? Je : Int8Array,
    "%Int16Array%": typeof Int16Array > "u" ? Je : Int16Array,
    "%Int32Array%": typeof Int32Array > "u" ? Je : Int32Array,
    "%isFinite%": isFinite,
    "%isNaN%": isNaN,
    "%IteratorPrototype%": uc && Fr ? Fr(Fr([][Symbol.iterator]())) : Je,
    "%JSON%": typeof JSON == "object" ? JSON : Je,
    "%Map%": typeof Map > "u" ? Je : Map,
    "%MapIteratorPrototype%": typeof Map > "u" || !uc || !Fr ? Je : Fr(new Map()[Symbol.iterator]()),
    "%Math%": Math,
    "%Number%": Number,
    "%Object%": cAe,
    "%Object.getOwnPropertyDescriptor%": Of,
    "%parseFloat%": parseFloat,
    "%parseInt%": parseInt,
    "%Promise%": typeof Promise > "u" ? Je : Promise,
    "%Proxy%": typeof Proxy > "u" ? Je : Proxy,
    "%RangeError%": dAe,
    "%ReferenceError%": hAe,
    "%Reflect%": typeof Reflect > "u" ? Je : Reflect,
    "%RegExp%": RegExp,
    "%Set%": typeof Set > "u" ? Je : Set,
    "%SetIteratorPrototype%": typeof Set > "u" || !uc || !Fr ? Je : Fr(new Set()[Symbol.iterator]()),
    "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? Je : SharedArrayBuffer,
    "%String%": String,
    "%StringIteratorPrototype%": uc && Fr ? Fr(""[Symbol.iterator]()) : Je,
    "%Symbol%": uc ? Symbol : Je,
    "%SyntaxError%": gu,
    "%ThrowTypeError%": CAe,
    "%TypedArray%": BAe,
    "%TypeError%": Uc,
    "%Uint8Array%": typeof Uint8Array > "u" ? Je : Uint8Array,
    "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? Je : Uint8ClampedArray,
    "%Uint16Array%": typeof Uint16Array > "u" ? Je : Uint16Array,
    "%Uint32Array%": typeof Uint32Array > "u" ? Je : Uint32Array,
    "%URIError%": xAe,
    "%WeakMap%": typeof WeakMap > "u" ? Je : WeakMap,
    "%WeakRef%": typeof WeakRef > "u" ? Je : WeakRef,
    "%WeakSet%": typeof WeakSet > "u" ? Je : WeakSet,
    "%Function.prototype.call%": _d,
    "%Function.prototype.apply%": HM,
    "%Object.defineProperty%": bAe,
    "%Object.getPrototypeOf%": AAe,
    "%Math.abs%": pAe,
    "%Math.floor%": gAe,
    "%Math.max%": mAe,
    "%Math.min%": vAe,
    "%Math.pow%": yAe,
    "%Math.round%": EAe,
    "%Math.sign%": _Ae,
    "%Reflect.getPrototypeOf%": wAe
};
if (Fr)
    try {
        null.error
    } catch (t) {
        var SAe = Fr(Fr(t));
        fl["%Error.prototype%"] = SAe
    }
var TAe = function t(e) {
    var r;
    if (e === "%AsyncFunction%")
        r = pv("async function () {}");
    else if (e === "%GeneratorFunction%")
        r = pv("function* () {}");
    else if (e === "%AsyncGeneratorFunction%")
        r = pv("async function* () {}");
    else if (e === "%AsyncGenerator%") {
        var n = t("%AsyncGeneratorFunction%");
        n && (r = n.prototype)
    } else if (e === "%AsyncIteratorPrototype%") {
        var i = t("%AsyncGenerator%");
        i && Fr && (r = Fr(i.prototype))
    }
    return fl[e] = r,
    r
}
  , J6 = {
    __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"]
}
  , bd = N1()
  , ap = lAe()
  , DAe = bd.call(_d, Array.prototype.concat)
  , FAe = bd.call(HM, Array.prototype.splice)
  , Q6 = bd.call(_d, String.prototype.replace)
  , lp = bd.call(_d, String.prototype.slice)
  , PAe = bd.call(_d, RegExp.prototype.exec)
  , IAe = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g
  , OAe = /\\(\\)?/g
  , kAe = function(e) {
    var r = lp(e, 0, 1)
      , n = lp(e, -1);
    if (r === "%" && n !== "%")
        throw new gu("invalid intrinsic syntax, expected closing `%`");
    if (n === "%" && r !== "%")
        throw new gu("invalid intrinsic syntax, expected opening `%`");
    var i = [];
    return Q6(e, IAe, function(o, s, a, l) {
        i[i.length] = a ? Q6(l, OAe, "$1") : s || o
    }),
    i
}
  , RAe = function(e, r) {
    var n = e, i;
    if (ap(J6, n) && (i = J6[n],
    n = "%" + i[0] + "%"),
    ap(fl, n)) {
        var o = fl[n];
        if (o === yc && (o = TAe(n)),
        typeof o > "u" && !r)
            throw new Uc("intrinsic " + e + " exists, but is not available. Please file an issue!");
        return {
            alias: i,
            name: n,
            value: o
        }
    }
    throw new gu("intrinsic " + e + " does not exist!")
}
  , IC = function(e, r) {
    if (typeof e != "string" || e.length === 0)
        throw new Uc("intrinsic name must be a non-empty string");
    if (arguments.length > 1 && typeof r != "boolean")
        throw new Uc('"allowMissing" argument must be a boolean');
    if (PAe(/^%?[^%]*%?$/, e) === null)
        throw new gu("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
    var n = kAe(e)
      , i = n.length > 0 ? n[0] : ""
      , o = RAe("%" + i + "%", r)
      , s = o.name
      , a = o.value
      , l = !1
      , c = o.alias;
    c && (i = c[0],
    FAe(n, DAe([0, 1], c)));
    for (var u = 1, f = !0; u < n.length; u += 1) {
        var d = n[u]
          , h = lp(d, 0, 1)
          , x = lp(d, -1);
        if ((h === '"' || h === "'" || h === "`" || x === '"' || x === "'" || x === "`") && h !== x)
            throw new gu("property names with quotes must have matching quotes");
        if ((d === "constructor" || !f) && (l = !0),
        i += "." + d,
        s = "%" + i + "%",
        ap(fl, s))
            a = fl[s];
        else if (a != null) {
            if (!(d in a)) {
                if (!r)
                    throw new Uc("base intrinsic for " + e + " exists, but the property is not available.");
                return
            }
            if (Of && u + 1 >= n.length) {
                var y = Of(a, d);
                f = !!y,
                f && "get"in y && !("originalValue"in y.get) ? a = y.get : a = a[d]
            } else
                f = ap(a, d),
                a = a[d];
            f && !l && (fl[s] = a)
        }
    }
    return a
}
  , VM = IC
  , zM = UM
  , MAe = zM([VM("%String.prototype.indexOf%")])
  , jM = function(e, r) {
    var n = VM(e, !!r);
    return typeof n == "function" && MAe(e, ".prototype.") > -1 ? zM([n]) : n
}
  , NAe = IC
  , Cd = jM
  , LAe = R1
  , $Ae = Pu
  , e5 = NAe("%Map%", !0)
  , UAe = Cd("Map.prototype.get", !0)
  , GAe = Cd("Map.prototype.set", !0)
  , HAe = Cd("Map.prototype.has", !0)
  , VAe = Cd("Map.prototype.delete", !0)
  , zAe = Cd("Map.prototype.size", !0)
  , WM = !!e5 && function() {
    var e, r = {
        assert: function(n) {
            if (!r.has(n))
                throw new $Ae("Side channel does not contain " + LAe(n))
        },
        delete: function(n) {
            if (e) {
                var i = VAe(e, n);
                return zAe(e) === 0 && (e = void 0),
                i
            }
            return !1
        },
        get: function(n) {
            if (e)
                return UAe(e, n)
        },
        has: function(n) {
            return e ? HAe(e, n) : !1
        },
        set: function(n, i) {
            e || (e = new e5),
            GAe(e, n, i)
        }
    };
    return r
}
  , jAe = IC
  , L1 = jM
  , WAe = R1
  , Ih = WM
  , YAe = Pu
  , fc = jAe("%WeakMap%", !0)
  , XAe = L1("WeakMap.prototype.get", !0)
  , KAe = L1("WeakMap.prototype.set", !0)
  , qAe = L1("WeakMap.prototype.has", !0)
  , ZAe = L1("WeakMap.prototype.delete", !0)
  , JAe = fc ? function() {
    var e, r, n = {
        assert: function(i) {
            if (!n.has(i))
                throw new YAe("Side channel does not contain " + WAe(i))
        },
        delete: function(i) {
            if (fc && i && (typeof i == "object" || typeof i == "function")) {
                if (e)
                    return ZAe(e, i)
            } else if (Ih && r)
                return r.delete(i);
            return !1
        },
        get: function(i) {
            return fc && i && (typeof i == "object" || typeof i == "function") && e ? XAe(e, i) : r && r.get(i)
        },
        has: function(i) {
            return fc && i && (typeof i == "object" || typeof i == "function") && e ? qAe(e, i) : !!r && r.has(i)
        },
        set: function(i, o) {
            fc && i && (typeof i == "object" || typeof i == "function") ? (e || (e = new fc),
            KAe(e, i, o)) : Ih && (r || (r = Ih()),
            r.set(i, o))
        }
    };
    return n
}
: Ih
  , QAe = Pu
  , ewe = R1
  , twe = D9e
  , rwe = WM
  , nwe = JAe
  , iwe = nwe || rwe || twe
  , owe = function() {
    var e, r = {
        assert: function(n) {
            if (!r.has(n))
                throw new QAe("Side channel does not contain " + ewe(n))
        },
        delete: function(n) {
            return !!e && e.delete(n)
        },
        get: function(n) {
            return e && e.get(n)
        },
        has: function(n) {
            return !!e && e.has(n)
        },
        set: function(n, i) {
            e || (e = iwe()),
            e.set(n, i)
        }
    };
    return r
}
  , swe = String.prototype.replace
  , awe = /%20/g
  , mv = {
    RFC1738: "RFC1738",
    RFC3986: "RFC3986"
}
  , OC = {
    default: mv.RFC3986,
    formatters: {
        RFC1738: function(t) {
            return swe.call(t, awe, "+")
        },
        RFC3986: function(t) {
            return String(t)
        }
    },
    RFC1738: mv.RFC1738,
    RFC3986: mv.RFC3986
}
  , lwe = OC
  , vv = Object.prototype.hasOwnProperty
  , Va = Array.isArray
  , Zi = function() {
    for (var t = [], e = 0; e < 256; ++e)
        t.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase());
    return t
}()
  , cwe = function(e) {
    for (; e.length > 1; ) {
        var r = e.pop()
          , n = r.obj[r.prop];
        if (Va(n)) {
            for (var i = [], o = 0; o < n.length; ++o)
                typeof n[o] < "u" && i.push(n[o]);
            r.obj[r.prop] = i
        }
    }
}
  , YM = function(e, r) {
    for (var n = r && r.plainObjects ? {
        __proto__: null
    } : {}, i = 0; i < e.length; ++i)
        typeof e[i] < "u" && (n[i] = e[i]);
    return n
}
  , uwe = function t(e, r, n) {
    if (!r)
        return e;
    if (typeof r != "object" && typeof r != "function") {
        if (Va(e))
            e.push(r);
        else if (e && typeof e == "object")
            (n && (n.plainObjects || n.allowPrototypes) || !vv.call(Object.prototype, r)) && (e[r] = !0);
        else
            return [e, r];
        return e
    }
    if (!e || typeof e != "object")
        return [e].concat(r);
    var i = e;
    return Va(e) && !Va(r) && (i = YM(e, n)),
    Va(e) && Va(r) ? (r.forEach(function(o, s) {
        if (vv.call(e, s)) {
            var a = e[s];
            a && typeof a == "object" && o && typeof o == "object" ? e[s] = t(a, o, n) : e.push(o)
        } else
            e[s] = o
    }),
    e) : Object.keys(r).reduce(function(o, s) {
        var a = r[s];
        return vv.call(o, s) ? o[s] = t(o[s], a, n) : o[s] = a,
        o
    }, i)
}
  , fwe = function(e, r) {
    return Object.keys(r).reduce(function(n, i) {
        return n[i] = r[i],
        n
    }, e)
}
  , dwe = function(t, e, r) {
    var n = t.replace(/\+/g, " ");
    if (r === "iso-8859-1")
        return n.replace(/%[0-9a-f]{2}/gi, unescape);
    try {
        return decodeURIComponent(n)
    } catch {
        return n
    }
}
  , yv = 1024
  , hwe = function(e, r, n, i, o) {
    if (e.length === 0)
        return e;
    var s = e;
    if (typeof e == "symbol" ? s = Symbol.prototype.toString.call(e) : typeof e != "string" && (s = String(e)),
    n === "iso-8859-1")
        return escape(s).replace(/%u[0-9a-f]{4}/gi, function(h) {
            return "%26%23" + parseInt(h.slice(2), 16) + "%3B"
        });
    for (var a = "", l = 0; l < s.length; l += yv) {
        for (var c = s.length >= yv ? s.slice(l, l + yv) : s, u = [], f = 0; f < c.length; ++f) {
            var d = c.charCodeAt(f);
            if (d === 45 || d === 46 || d === 95 || d === 126 || d >= 48 && d <= 57 || d >= 65 && d <= 90 || d >= 97 && d <= 122 || o === lwe.RFC1738 && (d === 40 || d === 41)) {
                u[u.length] = c.charAt(f);
                continue
            }
            if (d < 128) {
                u[u.length] = Zi[d];
                continue
            }
            if (d < 2048) {
                u[u.length] = Zi[192 | d >> 6] + Zi[128 | d & 63];
                continue
            }
            if (d < 55296 || d >= 57344) {
                u[u.length] = Zi[224 | d >> 12] + Zi[128 | d >> 6 & 63] + Zi[128 | d & 63];
                continue
            }
            f += 1,
            d = 65536 + ((d & 1023) << 10 | c.charCodeAt(f) & 1023),
            u[u.length] = Zi[240 | d >> 18] + Zi[128 | d >> 12 & 63] + Zi[128 | d >> 6 & 63] + Zi[128 | d & 63]
        }
        a += u.join("")
    }
    return a
}
  , xwe = function(e) {
    for (var r = [{
        obj: {
            o: e
        },
        prop: "o"
    }], n = [], i = 0; i < r.length; ++i)
        for (var o = r[i], s = o.obj[o.prop], a = Object.keys(s), l = 0; l < a.length; ++l) {
            var c = a[l]
              , u = s[c];
            typeof u == "object" && u !== null && n.indexOf(u) === -1 && (r.push({
                obj: s,
                prop: c
            }),
            n.push(u))
        }
    return cwe(r),
    e
}
  , pwe = function(e) {
    return Object.prototype.toString.call(e) === "[object RegExp]"
}
  , gwe = function(e) {
    return !e || typeof e != "object" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e))
}
  , mwe = function(e, r) {
    return [].concat(e, r)
}
  , vwe = function(e, r) {
    if (Va(e)) {
        for (var n = [], i = 0; i < e.length; i += 1)
            n.push(r(e[i]));
        return n
    }
    return r(e)
}
  , XM = {
    arrayToObject: YM,
    assign: fwe,
    combine: mwe,
    compact: xwe,
    decode: dwe,
    encode: hwe,
    isBuffer: gwe,
    isRegExp: pwe,
    maybeMap: vwe,
    merge: uwe
}
  , KM = owe
  , ax = XM
  , Y0 = OC
  , ywe = Object.prototype.hasOwnProperty
  , qM = {
    brackets: function(e) {
        return e + "[]"
    },
    comma: "comma",
    indices: function(e, r) {
        return e + "[" + r + "]"
    },
    repeat: function(e) {
        return e
    }
}
  , no = Array.isArray
  , Ewe = Array.prototype.push
  , ZM = function(t, e) {
    Ewe.apply(t, no(e) ? e : [e])
}
  , _we = Date.prototype.toISOString
  , t5 = Y0.default
  , vr = {
    addQueryPrefix: !1,
    allowDots: !1,
    allowEmptyArrays: !1,
    arrayFormat: "indices",
    charset: "utf-8",
    charsetSentinel: !1,
    commaRoundTrip: !1,
    delimiter: "&",
    encode: !0,
    encodeDotInKeys: !1,
    encoder: ax.encode,
    encodeValuesOnly: !1,
    filter: void 0,
    format: t5,
    formatter: Y0.formatters[t5],
    indices: !1,
    serializeDate: function(e) {
        return _we.call(e)
    },
    skipNulls: !1,
    strictNullHandling: !1
}
  , bwe = function(e) {
    return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint"
}
  , Ev = {}
  , Cwe = function t(e, r, n, i, o, s, a, l, c, u, f, d, h, x, y, m, E, g) {
    for (var p = e, v = g, _ = 0, b = !1; (v = v.get(Ev)) !== void 0 && !b; ) {
        var C = v.get(e);
        if (_ += 1,
        typeof C < "u") {
            if (C === _)
                throw new RangeError("Cyclic object value");
            b = !0
        }
        typeof v.get(Ev) > "u" && (_ = 0)
    }
    if (typeof u == "function" ? p = u(r, p) : p instanceof Date ? p = h(p) : n === "comma" && no(p) && (p = ax.maybeMap(p, function(oe) {
        return oe instanceof Date ? h(oe) : oe
    })),
    p === null) {
        if (s)
            return c && !m ? c(r, vr.encoder, E, "key", x) : r;
        p = ""
    }
    if (bwe(p) || ax.isBuffer(p)) {
        if (c) {
            var B = m ? r : c(r, vr.encoder, E, "key", x);
            return [y(B) + "=" + y(c(p, vr.encoder, E, "value", x))]
        }
        return [y(r) + "=" + y(String(p))]
    }
    var T = [];
    if (typeof p > "u")
        return T;
    var A;
    if (n === "comma" && no(p))
        m && c && (p = ax.maybeMap(p, c)),
        A = [{
            value: p.length > 0 ? p.join(",") || null : void 0
        }];
    else if (no(u))
        A = u;
    else {
        var w = Object.keys(p);
        A = f ? w.sort(f) : w
    }
    var S = l ? String(r).replace(/\./g, "%2E") : String(r)
      , D = i && no(p) && p.length === 1 ? S + "[]" : S;
    if (o && no(p) && p.length === 0)
        return D + "[]";
    for (var F = 0; F < A.length; ++F) {
        var R = A[F]
          , P = typeof R == "object" && R && typeof R.value < "u" ? R.value : p[R];
        if (!(a && P === null)) {
            var N = d && l ? String(R).replace(/\./g, "%2E") : String(R)
              , j = no(p) ? typeof n == "function" ? n(D, N) : D : D + (d ? "." + N : "[" + N + "]");
            g.set(e, _);
            var K = KM();
            K.set(Ev, g),
            ZM(T, t(P, j, n, i, o, s, a, l, n === "comma" && m && no(p) ? null : c, u, f, d, h, x, y, m, E, K))
        }
    }
    return T
}
  , Awe = function(e) {
    if (!e)
        return vr;
    if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
        throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
    if (typeof e.encodeDotInKeys < "u" && typeof e.encodeDotInKeys != "boolean")
        throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
    if (e.encoder !== null && typeof e.encoder < "u" && typeof e.encoder != "function")
        throw new TypeError("Encoder has to be a function.");
    var r = e.charset || vr.charset;
    if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
        throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
    var n = Y0.default;
    if (typeof e.format < "u") {
        if (!ywe.call(Y0.formatters, e.format))
            throw new TypeError("Unknown format option provided.");
        n = e.format
    }
    var i = Y0.formatters[n]
      , o = vr.filter;
    (typeof e.filter == "function" || no(e.filter)) && (o = e.filter);
    var s;
    if (e.arrayFormat in qM ? s = e.arrayFormat : "indices"in e ? s = e.indices ? "indices" : "repeat" : s = vr.arrayFormat,
    "commaRoundTrip"in e && typeof e.commaRoundTrip != "boolean")
        throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
    var a = typeof e.allowDots > "u" ? e.encodeDotInKeys === !0 ? !0 : vr.allowDots : !!e.allowDots;
    return {
        addQueryPrefix: typeof e.addQueryPrefix == "boolean" ? e.addQueryPrefix : vr.addQueryPrefix,
        allowDots: a,
        allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : vr.allowEmptyArrays,
        arrayFormat: s,
        charset: r,
        charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : vr.charsetSentinel,
        commaRoundTrip: !!e.commaRoundTrip,
        delimiter: typeof e.delimiter > "u" ? vr.delimiter : e.delimiter,
        encode: typeof e.encode == "boolean" ? e.encode : vr.encode,
        encodeDotInKeys: typeof e.encodeDotInKeys == "boolean" ? e.encodeDotInKeys : vr.encodeDotInKeys,
        encoder: typeof e.encoder == "function" ? e.encoder : vr.encoder,
        encodeValuesOnly: typeof e.encodeValuesOnly == "boolean" ? e.encodeValuesOnly : vr.encodeValuesOnly,
        filter: o,
        format: n,
        formatter: i,
        serializeDate: typeof e.serializeDate == "function" ? e.serializeDate : vr.serializeDate,
        skipNulls: typeof e.skipNulls == "boolean" ? e.skipNulls : vr.skipNulls,
        sort: typeof e.sort == "function" ? e.sort : null,
        strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : vr.strictNullHandling
    }
}
  , wwe = function(t, e) {
    var r = t, n = Awe(e), i, o;
    typeof n.filter == "function" ? (o = n.filter,
    r = o("", r)) : no(n.filter) && (o = n.filter,
    i = o);
    var s = [];
    if (typeof r != "object" || r === null)
        return "";
    var a = qM[n.arrayFormat]
      , l = a === "comma" && n.commaRoundTrip;
    i || (i = Object.keys(r)),
    n.sort && i.sort(n.sort);
    for (var c = KM(), u = 0; u < i.length; ++u) {
        var f = i[u]
          , d = r[f];
        n.skipNulls && d === null || ZM(s, Cwe(d, f, a, l, n.allowEmptyArrays, n.strictNullHandling, n.skipNulls, n.encodeDotInKeys, n.encode ? n.encoder : null, n.filter, n.sort, n.allowDots, n.serializeDate, n.format, n.formatter, n.encodeValuesOnly, n.charset, c))
    }
    var h = s.join(n.delimiter)
      , x = n.addQueryPrefix === !0 ? "?" : "";
    return n.charsetSentinel && (n.charset === "iso-8859-1" ? x += "utf8=%26%2310003%3B&" : x += "utf8=%E2%9C%93&"),
    h.length > 0 ? x + h : ""
}
  , Pl = XM
  , e_ = Object.prototype.hasOwnProperty
  , r5 = Array.isArray
  , qt = {
    allowDots: !1,
    allowEmptyArrays: !1,
    allowPrototypes: !1,
    allowSparse: !1,
    arrayLimit: 20,
    charset: "utf-8",
    charsetSentinel: !1,
    comma: !1,
    decodeDotInKeys: !1,
    decoder: Pl.decode,
    delimiter: "&",
    depth: 5,
    duplicates: "combine",
    ignoreQueryPrefix: !1,
    interpretNumericEntities: !1,
    parameterLimit: 1e3,
    parseArrays: !0,
    plainObjects: !1,
    strictDepth: !1,
    strictNullHandling: !1,
    throwOnLimitExceeded: !1
}
  , Bwe = function(t) {
    return t.replace(/&#(\d+);/g, function(e, r) {
        return String.fromCharCode(parseInt(r, 10))
    })
}
  , JM = function(t, e, r) {
    if (t && typeof t == "string" && e.comma && t.indexOf(",") > -1)
        return t.split(",");
    if (e.throwOnLimitExceeded && r >= e.arrayLimit)
        throw new RangeError("Array limit exceeded. Only " + e.arrayLimit + " element" + (e.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
    return t
}
  , Swe = "utf8=%26%2310003%3B"
  , Twe = "utf8=%E2%9C%93"
  , Dwe = function(e, r) {
    var n = {
        __proto__: null
    }
      , i = r.ignoreQueryPrefix ? e.replace(/^\?/, "") : e;
    i = i.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
    var o = r.parameterLimit === 1 / 0 ? void 0 : r.parameterLimit
      , s = i.split(r.delimiter, r.throwOnLimitExceeded ? o + 1 : o);
    if (r.throwOnLimitExceeded && s.length > o)
        throw new RangeError("Parameter limit exceeded. Only " + o + " parameter" + (o === 1 ? "" : "s") + " allowed.");
    var a = -1, l, c = r.charset;
    if (r.charsetSentinel)
        for (l = 0; l < s.length; ++l)
            s[l].indexOf("utf8=") === 0 && (s[l] === Twe ? c = "utf-8" : s[l] === Swe && (c = "iso-8859-1"),
            a = l,
            l = s.length);
    for (l = 0; l < s.length; ++l)
        if (l !== a) {
            var u = s[l], f = u.indexOf("]="), d = f === -1 ? u.indexOf("=") : f + 1, h, x;
            d === -1 ? (h = r.decoder(u, qt.decoder, c, "key"),
            x = r.strictNullHandling ? null : "") : (h = r.decoder(u.slice(0, d), qt.decoder, c, "key"),
            x = Pl.maybeMap(JM(u.slice(d + 1), r, r5(n[h]) ? n[h].length : 0), function(m) {
                return r.decoder(m, qt.decoder, c, "value")
            })),
            x && r.interpretNumericEntities && c === "iso-8859-1" && (x = Bwe(String(x))),
            u.indexOf("[]=") > -1 && (x = r5(x) ? [x] : x);
            var y = e_.call(n, h);
            y && r.duplicates === "combine" ? n[h] = Pl.combine(n[h], x) : (!y || r.duplicates === "last") && (n[h] = x)
        }
    return n
}
  , Fwe = function(t, e, r, n) {
    var i = 0;
    if (t.length > 0 && t[t.length - 1] === "[]") {
        var o = t.slice(0, -1).join("");
        i = Array.isArray(e) && e[o] ? e[o].length : 0
    }
    for (var s = n ? e : JM(e, r, i), a = t.length - 1; a >= 0; --a) {
        var l, c = t[a];
        if (c === "[]" && r.parseArrays)
            l = r.allowEmptyArrays && (s === "" || r.strictNullHandling && s === null) ? [] : Pl.combine([], s);
        else {
            l = r.plainObjects ? {
                __proto__: null
            } : {};
            var u = c.charAt(0) === "[" && c.charAt(c.length - 1) === "]" ? c.slice(1, -1) : c
              , f = r.decodeDotInKeys ? u.replace(/%2E/g, ".") : u
              , d = parseInt(f, 10);
            !r.parseArrays && f === "" ? l = {
                0: s
            } : !isNaN(d) && c !== f && String(d) === f && d >= 0 && r.parseArrays && d <= r.arrayLimit ? (l = [],
            l[d] = s) : f !== "__proto__" && (l[f] = s)
        }
        s = l
    }
    return s
}
  , Pwe = function(e, r, n, i) {
    if (e) {
        var o = n.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e
          , s = /(\[[^[\]]*])/
          , a = /(\[[^[\]]*])/g
          , l = n.depth > 0 && s.exec(o)
          , c = l ? o.slice(0, l.index) : o
          , u = [];
        if (c) {
            if (!n.plainObjects && e_.call(Object.prototype, c) && !n.allowPrototypes)
                return;
            u.push(c)
        }
        for (var f = 0; n.depth > 0 && (l = a.exec(o)) !== null && f < n.depth; ) {
            if (f += 1,
            !n.plainObjects && e_.call(Object.prototype, l[1].slice(1, -1)) && !n.allowPrototypes)
                return;
            u.push(l[1])
        }
        if (l) {
            if (n.strictDepth === !0)
                throw new RangeError("Input depth exceeded depth option of " + n.depth + " and strictDepth is true");
            u.push("[" + o.slice(l.index) + "]")
        }
        return Fwe(u, r, n, i)
    }
}
  , Iwe = function(e) {
    if (!e)
        return qt;
    if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
        throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
    if (typeof e.decodeDotInKeys < "u" && typeof e.decodeDotInKeys != "boolean")
        throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
    if (e.decoder !== null && typeof e.decoder < "u" && typeof e.decoder != "function")
        throw new TypeError("Decoder has to be a function.");
    if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
        throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
    if (typeof e.throwOnLimitExceeded < "u" && typeof e.throwOnLimitExceeded != "boolean")
        throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
    var r = typeof e.charset > "u" ? qt.charset : e.charset
      , n = typeof e.duplicates > "u" ? qt.duplicates : e.duplicates;
    if (n !== "combine" && n !== "first" && n !== "last")
        throw new TypeError("The duplicates option must be either combine, first, or last");
    var i = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 : qt.allowDots : !!e.allowDots;
    return {
        allowDots: i,
        allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : qt.allowEmptyArrays,
        allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : qt.allowPrototypes,
        allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : qt.allowSparse,
        arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : qt.arrayLimit,
        charset: r,
        charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : qt.charsetSentinel,
        comma: typeof e.comma == "boolean" ? e.comma : qt.comma,
        decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : qt.decodeDotInKeys,
        decoder: typeof e.decoder == "function" ? e.decoder : qt.decoder,
        delimiter: typeof e.delimiter == "string" || Pl.isRegExp(e.delimiter) ? e.delimiter : qt.delimiter,
        depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : qt.depth,
        duplicates: n,
        ignoreQueryPrefix: e.ignoreQueryPrefix === !0,
        interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : qt.interpretNumericEntities,
        parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : qt.parameterLimit,
        parseArrays: e.parseArrays !== !1,
        plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : qt.plainObjects,
        strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth : qt.strictDepth,
        strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : qt.strictNullHandling,
        throwOnLimitExceeded: typeof e.throwOnLimitExceeded == "boolean" ? e.throwOnLimitExceeded : !1
    }
}
  , Owe = function(t, e) {
    var r = Iwe(e);
    if (t === "" || t === null || typeof t > "u")
        return r.plainObjects ? {
            __proto__: null
        } : {};
    for (var n = typeof t == "string" ? Dwe(t, r) : t, i = r.plainObjects ? {
        __proto__: null
    } : {}, o = Object.keys(n), s = 0; s < o.length; ++s) {
        var a = o[s]
          , l = Pwe(a, n[a], r, typeof t == "string");
        i = Pl.merge(i, l, r)
    }
    return r.allowSparse === !0 ? i : Pl.compact(i)
}
  , kwe = wwe
  , Rwe = Owe
  , Mwe = OC
  , Nwe = {
    formats: Mwe,
    parse: Rwe,
    stringify: kwe
};
const U6e = Gi(Nwe);
var QM = {
    exports: {}
};
(function(t, e) {
    (function(n, i) {
        t.exports = i()
    }
    )(typeof self < "u" ? self : er, function() {
        return function(r) {
            var n = {};
            function i(o) {
                if (n[o])
                    return n[o].exports;
                var s = n[o] = {
                    i: o,
                    l: !1,
                    exports: {}
                };
                return r[o].call(s.exports, s, s.exports, i),
                s.l = !0,
                s.exports
            }
            return i.m = r,
            i.c = n,
            i.d = function(o, s, a) {
                i.o(o, s) || Object.defineProperty(o, s, {
                    configurable: !1,
                    enumerable: !0,
                    get: a
                })
            }
            ,
            i.n = function(o) {
                var s = o && o.__esModule ? function() {
                    return o.default
                }
                : function() {
                    return o
                }
                ;
                return i.d(s, "a", s),
                s
            }
            ,
            i.o = function(o, s) {
                return Object.prototype.hasOwnProperty.call(o, s)
            }
            ,
            i.p = "",
            i(i.s = 3)
        }([function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = function() {
                function s(a, l) {
                    this.width = l,
                    this.height = a.length / l,
                    this.data = a
                }
                return s.createEmpty = function(a, l) {
                    return new s(new Uint8ClampedArray(a * l),a)
                }
                ,
                s.prototype.get = function(a, l) {
                    return a < 0 || a >= this.width || l < 0 || l >= this.height ? !1 : !!this.data[l * this.width + a]
                }
                ,
                s.prototype.set = function(a, l, c) {
                    this.data[l * this.width + a] = c ? 1 : 0
                }
                ,
                s.prototype.setRegion = function(a, l, c, u, f) {
                    for (var d = l; d < l + u; d++)
                        for (var h = a; h < a + c; h++)
                            this.set(h, d, !!f)
                }
                ,
                s
            }();
            n.BitMatrix = o
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = i(2);
            function s(l, c) {
                return l ^ c
            }
            n.addOrSubtractGF = s;
            var a = function() {
                function l(c, u, f) {
                    this.primitive = c,
                    this.size = u,
                    this.generatorBase = f,
                    this.expTable = new Array(this.size),
                    this.logTable = new Array(this.size);
                    for (var d = 1, h = 0; h < this.size; h++)
                        this.expTable[h] = d,
                        d = d * 2,
                        d >= this.size && (d = (d ^ this.primitive) & this.size - 1);
                    for (var h = 0; h < this.size - 1; h++)
                        this.logTable[this.expTable[h]] = h;
                    this.zero = new o.default(this,Uint8ClampedArray.from([0])),
                    this.one = new o.default(this,Uint8ClampedArray.from([1]))
                }
                return l.prototype.multiply = function(c, u) {
                    return c === 0 || u === 0 ? 0 : this.expTable[(this.logTable[c] + this.logTable[u]) % (this.size - 1)]
                }
                ,
                l.prototype.inverse = function(c) {
                    if (c === 0)
                        throw new Error("Can't invert 0");
                    return this.expTable[this.size - this.logTable[c] - 1]
                }
                ,
                l.prototype.buildMonomial = function(c, u) {
                    if (c < 0)
                        throw new Error("Invalid monomial degree less than 0");
                    if (u === 0)
                        return this.zero;
                    var f = new Uint8ClampedArray(c + 1);
                    return f[0] = u,
                    new o.default(this,f)
                }
                ,
                l.prototype.log = function(c) {
                    if (c === 0)
                        throw new Error("Can't take log(0)");
                    return this.logTable[c]
                }
                ,
                l.prototype.exp = function(c) {
                    return this.expTable[c]
                }
                ,
                l
            }();
            n.default = a
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = i(1)
              , s = function() {
                function a(l, c) {
                    if (c.length === 0)
                        throw new Error("No coefficients.");
                    this.field = l;
                    var u = c.length;
                    if (u > 1 && c[0] === 0) {
                        for (var f = 1; f < u && c[f] === 0; )
                            f++;
                        if (f === u)
                            this.coefficients = l.zero.coefficients;
                        else {
                            this.coefficients = new Uint8ClampedArray(u - f);
                            for (var d = 0; d < this.coefficients.length; d++)
                                this.coefficients[d] = c[f + d]
                        }
                    } else
                        this.coefficients = c
                }
                return a.prototype.degree = function() {
                    return this.coefficients.length - 1
                }
                ,
                a.prototype.isZero = function() {
                    return this.coefficients[0] === 0
                }
                ,
                a.prototype.getCoefficient = function(l) {
                    return this.coefficients[this.coefficients.length - 1 - l]
                }
                ,
                a.prototype.addOrSubtract = function(l) {
                    var c;
                    if (this.isZero())
                        return l;
                    if (l.isZero())
                        return this;
                    var u = this.coefficients
                      , f = l.coefficients;
                    u.length > f.length && (c = [f, u],
                    u = c[0],
                    f = c[1]);
                    for (var d = new Uint8ClampedArray(f.length), h = f.length - u.length, x = 0; x < h; x++)
                        d[x] = f[x];
                    for (var x = h; x < f.length; x++)
                        d[x] = o.addOrSubtractGF(u[x - h], f[x]);
                    return new a(this.field,d)
                }
                ,
                a.prototype.multiply = function(l) {
                    if (l === 0)
                        return this.field.zero;
                    if (l === 1)
                        return this;
                    for (var c = this.coefficients.length, u = new Uint8ClampedArray(c), f = 0; f < c; f++)
                        u[f] = this.field.multiply(this.coefficients[f], l);
                    return new a(this.field,u)
                }
                ,
                a.prototype.multiplyPoly = function(l) {
                    if (this.isZero() || l.isZero())
                        return this.field.zero;
                    for (var c = this.coefficients, u = c.length, f = l.coefficients, d = f.length, h = new Uint8ClampedArray(u + d - 1), x = 0; x < u; x++)
                        for (var y = c[x], m = 0; m < d; m++)
                            h[x + m] = o.addOrSubtractGF(h[x + m], this.field.multiply(y, f[m]));
                    return new a(this.field,h)
                }
                ,
                a.prototype.multiplyByMonomial = function(l, c) {
                    if (l < 0)
                        throw new Error("Invalid degree less than 0");
                    if (c === 0)
                        return this.field.zero;
                    for (var u = this.coefficients.length, f = new Uint8ClampedArray(u + l), d = 0; d < u; d++)
                        f[d] = this.field.multiply(this.coefficients[d], c);
                    return new a(this.field,f)
                }
                ,
                a.prototype.evaluateAt = function(l) {
                    var c = 0;
                    if (l === 0)
                        return this.getCoefficient(0);
                    var u = this.coefficients.length;
                    if (l === 1)
                        return this.coefficients.forEach(function(d) {
                            c = o.addOrSubtractGF(c, d)
                        }),
                        c;
                    c = this.coefficients[0];
                    for (var f = 1; f < u; f++)
                        c = o.addOrSubtractGF(this.field.multiply(l, c), this.coefficients[f]);
                    return c
                }
                ,
                a
            }();
            n.default = s
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = i(4)
              , s = i(5)
              , a = i(11)
              , l = i(12);
            function c(d) {
                var h = l.locate(d);
                if (!h)
                    return null;
                for (var x = 0, y = h; x < y.length; x++) {
                    var m = y[x]
                      , E = a.extract(d, m)
                      , g = s.decode(E.matrix);
                    if (g)
                        return {
                            binaryData: g.bytes,
                            data: g.text,
                            chunks: g.chunks,
                            version: g.version,
                            location: {
                                topRightCorner: E.mappingFunction(m.dimension, 0),
                                topLeftCorner: E.mappingFunction(0, 0),
                                bottomRightCorner: E.mappingFunction(m.dimension, m.dimension),
                                bottomLeftCorner: E.mappingFunction(0, m.dimension),
                                topRightFinderPattern: m.topRight,
                                topLeftFinderPattern: m.topLeft,
                                bottomLeftFinderPattern: m.bottomLeft,
                                bottomRightAlignmentPattern: m.alignmentPattern
                            }
                        }
                }
                return null
            }
            var u = {
                inversionAttempts: "attemptBoth"
            };
            function f(d, h, x, y) {
                y === void 0 && (y = {});
                var m = u;
                Object.keys(m || {}).forEach(function(C) {
                    m[C] = y[C] || m[C]
                });
                var E = m.inversionAttempts === "attemptBoth" || m.inversionAttempts === "invertFirst"
                  , g = m.inversionAttempts === "onlyInvert" || m.inversionAttempts === "invertFirst"
                  , p = o.binarize(d, h, x, E)
                  , v = p.binarized
                  , _ = p.inverted
                  , b = c(g ? _ : v);
                return !b && (m.inversionAttempts === "attemptBoth" || m.inversionAttempts === "invertFirst") && (b = c(g ? v : _)),
                b
            }
            f.default = f,
            n.default = f
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = i(0)
              , s = 8
              , a = 24;
            function l(f, d, h) {
                return f < d ? d : f > h ? h : f
            }
            var c = function() {
                function f(d, h) {
                    this.width = d,
                    this.data = new Uint8ClampedArray(d * h)
                }
                return f.prototype.get = function(d, h) {
                    return this.data[h * this.width + d]
                }
                ,
                f.prototype.set = function(d, h, x) {
                    this.data[h * this.width + d] = x
                }
                ,
                f
            }();
            function u(f, d, h, x) {
                if (f.length !== d * h * 4)
                    throw new Error("Malformed data passed to binarizer.");
                for (var y = new c(d,h), m = 0; m < d; m++)
                    for (var E = 0; E < h; E++) {
                        var g = f[(E * d + m) * 4 + 0]
                          , p = f[(E * d + m) * 4 + 1]
                          , v = f[(E * d + m) * 4 + 2];
                        y.set(m, E, .2126 * g + .7152 * p + .0722 * v)
                    }
                for (var _ = Math.ceil(d / s), b = Math.ceil(h / s), C = new c(_,b), B = 0; B < b; B++)
                    for (var T = 0; T < _; T++) {
                        for (var A = 0, w = 1 / 0, S = 0, E = 0; E < s; E++)
                            for (var m = 0; m < s; m++) {
                                var D = y.get(T * s + m, B * s + E);
                                A += D,
                                w = Math.min(w, D),
                                S = Math.max(S, D)
                            }
                        var F = A / Math.pow(s, 2);
                        if (S - w <= a && (F = w / 2,
                        B > 0 && T > 0)) {
                            var R = (C.get(T, B - 1) + 2 * C.get(T - 1, B) + C.get(T - 1, B - 1)) / 4;
                            w < R && (F = R)
                        }
                        C.set(T, B, F)
                    }
                var P = o.BitMatrix.createEmpty(d, h)
                  , N = null;
                x && (N = o.BitMatrix.createEmpty(d, h));
                for (var B = 0; B < b; B++)
                    for (var T = 0; T < _; T++) {
                        for (var j = l(T, 2, _ - 3), K = l(B, 2, b - 3), A = 0, oe = -2; oe <= 2; oe++)
                            for (var U = -2; U <= 2; U++)
                                A += C.get(j + oe, K + U);
                        for (var $ = A / 25, oe = 0; oe < s; oe++)
                            for (var U = 0; U < s; U++) {
                                var m = T * s + oe
                                  , E = B * s + U
                                  , V = y.get(m, E);
                                P.set(m, E, V <= $),
                                x && N.set(m, E, !(V <= $))
                            }
                    }
                return x ? {
                    binarized: P,
                    inverted: N
                } : {
                    binarized: P
                }
            }
            n.binarize = u
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = i(0)
              , s = i(6)
              , a = i(9)
              , l = i(10);
            function c(v, _) {
                for (var b = v ^ _, C = 0; b; )
                    C++,
                    b &= b - 1;
                return C
            }
            function u(v, _) {
                return _ << 1 | v
            }
            var f = [{
                bits: 21522,
                formatInfo: {
                    errorCorrectionLevel: 1,
                    dataMask: 0
                }
            }, {
                bits: 20773,
                formatInfo: {
                    errorCorrectionLevel: 1,
                    dataMask: 1
                }
            }, {
                bits: 24188,
                formatInfo: {
                    errorCorrectionLevel: 1,
                    dataMask: 2
                }
            }, {
                bits: 23371,
                formatInfo: {
                    errorCorrectionLevel: 1,
                    dataMask: 3
                }
            }, {
                bits: 17913,
                formatInfo: {
                    errorCorrectionLevel: 1,
                    dataMask: 4
                }
            }, {
                bits: 16590,
                formatInfo: {
                    errorCorrectionLevel: 1,
                    dataMask: 5
                }
            }, {
                bits: 20375,
                formatInfo: {
                    errorCorrectionLevel: 1,
                    dataMask: 6
                }
            }, {
                bits: 19104,
                formatInfo: {
                    errorCorrectionLevel: 1,
                    dataMask: 7
                }
            }, {
                bits: 30660,
                formatInfo: {
                    errorCorrectionLevel: 0,
                    dataMask: 0
                }
            }, {
                bits: 29427,
                formatInfo: {
                    errorCorrectionLevel: 0,
                    dataMask: 1
                }
            }, {
                bits: 32170,
                formatInfo: {
                    errorCorrectionLevel: 0,
                    dataMask: 2
                }
            }, {
                bits: 30877,
                formatInfo: {
                    errorCorrectionLevel: 0,
                    dataMask: 3
                }
            }, {
                bits: 26159,
                formatInfo: {
                    errorCorrectionLevel: 0,
                    dataMask: 4
                }
            }, {
                bits: 25368,
                formatInfo: {
                    errorCorrectionLevel: 0,
                    dataMask: 5
                }
            }, {
                bits: 27713,
                formatInfo: {
                    errorCorrectionLevel: 0,
                    dataMask: 6
                }
            }, {
                bits: 26998,
                formatInfo: {
                    errorCorrectionLevel: 0,
                    dataMask: 7
                }
            }, {
                bits: 5769,
                formatInfo: {
                    errorCorrectionLevel: 3,
                    dataMask: 0
                }
            }, {
                bits: 5054,
                formatInfo: {
                    errorCorrectionLevel: 3,
                    dataMask: 1
                }
            }, {
                bits: 7399,
                formatInfo: {
                    errorCorrectionLevel: 3,
                    dataMask: 2
                }
            }, {
                bits: 6608,
                formatInfo: {
                    errorCorrectionLevel: 3,
                    dataMask: 3
                }
            }, {
                bits: 1890,
                formatInfo: {
                    errorCorrectionLevel: 3,
                    dataMask: 4
                }
            }, {
                bits: 597,
                formatInfo: {
                    errorCorrectionLevel: 3,
                    dataMask: 5
                }
            }, {
                bits: 3340,
                formatInfo: {
                    errorCorrectionLevel: 3,
                    dataMask: 6
                }
            }, {
                bits: 2107,
                formatInfo: {
                    errorCorrectionLevel: 3,
                    dataMask: 7
                }
            }, {
                bits: 13663,
                formatInfo: {
                    errorCorrectionLevel: 2,
                    dataMask: 0
                }
            }, {
                bits: 12392,
                formatInfo: {
                    errorCorrectionLevel: 2,
                    dataMask: 1
                }
            }, {
                bits: 16177,
                formatInfo: {
                    errorCorrectionLevel: 2,
                    dataMask: 2
                }
            }, {
                bits: 14854,
                formatInfo: {
                    errorCorrectionLevel: 2,
                    dataMask: 3
                }
            }, {
                bits: 9396,
                formatInfo: {
                    errorCorrectionLevel: 2,
                    dataMask: 4
                }
            }, {
                bits: 8579,
                formatInfo: {
                    errorCorrectionLevel: 2,
                    dataMask: 5
                }
            }, {
                bits: 11994,
                formatInfo: {
                    errorCorrectionLevel: 2,
                    dataMask: 6
                }
            }, {
                bits: 11245,
                formatInfo: {
                    errorCorrectionLevel: 2,
                    dataMask: 7
                }
            }]
              , d = [function(v) {
                return (v.y + v.x) % 2 === 0
            }
            , function(v) {
                return v.y % 2 === 0
            }
            , function(v) {
                return v.x % 3 === 0
            }
            , function(v) {
                return (v.y + v.x) % 3 === 0
            }
            , function(v) {
                return (Math.floor(v.y / 2) + Math.floor(v.x / 3)) % 2 === 0
            }
            , function(v) {
                return v.x * v.y % 2 + v.x * v.y % 3 === 0
            }
            , function(v) {
                return (v.y * v.x % 2 + v.y * v.x % 3) % 2 === 0
            }
            , function(v) {
                return ((v.y + v.x) % 2 + v.y * v.x % 3) % 2 === 0
            }
            ];
            function h(v) {
                var _ = 17 + 4 * v.versionNumber
                  , b = o.BitMatrix.createEmpty(_, _);
                b.setRegion(0, 0, 9, 9, !0),
                b.setRegion(_ - 8, 0, 8, 9, !0),
                b.setRegion(0, _ - 8, 9, 8, !0);
                for (var C = 0, B = v.alignmentPatternCenters; C < B.length; C++)
                    for (var T = B[C], A = 0, w = v.alignmentPatternCenters; A < w.length; A++) {
                        var S = w[A];
                        T === 6 && S === 6 || T === 6 && S === _ - 7 || T === _ - 7 && S === 6 || b.setRegion(T - 2, S - 2, 5, 5, !0)
                    }
                return b.setRegion(6, 9, 1, _ - 17, !0),
                b.setRegion(9, 6, _ - 17, 1, !0),
                v.versionNumber > 6 && (b.setRegion(_ - 11, 0, 3, 6, !0),
                b.setRegion(0, _ - 11, 6, 3, !0)),
                b
            }
            function x(v, _, b) {
                for (var C = d[b.dataMask], B = v.height, T = h(_), A = [], w = 0, S = 0, D = !0, F = B - 1; F > 0; F -= 2) {
                    F === 6 && F--;
                    for (var R = 0; R < B; R++)
                        for (var P = D ? B - 1 - R : R, N = 0; N < 2; N++) {
                            var j = F - N;
                            if (!T.get(j, P)) {
                                S++;
                                var K = v.get(j, P);
                                C({
                                    y: P,
                                    x: j
                                }) && (K = !K),
                                w = u(K, w),
                                S === 8 && (A.push(w),
                                S = 0,
                                w = 0)
                            }
                        }
                    D = !D
                }
                return A
            }
            function y(v) {
                var _ = v.height
                  , b = Math.floor((_ - 17) / 4);
                if (b <= 6)
                    return l.VERSIONS[b - 1];
                for (var C = 0, B = 5; B >= 0; B--)
                    for (var T = _ - 9; T >= _ - 11; T--)
                        C = u(v.get(T, B), C);
                for (var A = 0, T = 5; T >= 0; T--)
                    for (var B = _ - 9; B >= _ - 11; B--)
                        A = u(v.get(T, B), A);
                for (var w = 1 / 0, S, D = 0, F = l.VERSIONS; D < F.length; D++) {
                    var R = F[D];
                    if (R.infoBits === C || R.infoBits === A)
                        return R;
                    var P = c(C, R.infoBits);
                    P < w && (S = R,
                    w = P),
                    P = c(A, R.infoBits),
                    P < w && (S = R,
                    w = P)
                }
                if (w <= 3)
                    return S
            }
            function m(v) {
                for (var _ = 0, b = 0; b <= 8; b++)
                    b !== 6 && (_ = u(v.get(b, 8), _));
                for (var C = 7; C >= 0; C--)
                    C !== 6 && (_ = u(v.get(8, C), _));
                for (var B = v.height, T = 0, C = B - 1; C >= B - 7; C--)
                    T = u(v.get(8, C), T);
                for (var b = B - 8; b < B; b++)
                    T = u(v.get(b, 8), T);
                for (var A = 1 / 0, w = null, S = 0, D = f; S < D.length; S++) {
                    var F = D[S]
                      , R = F.bits
                      , P = F.formatInfo;
                    if (R === _ || R === T)
                        return P;
                    var N = c(_, R);
                    N < A && (w = P,
                    A = N),
                    _ !== T && (N = c(T, R),
                    N < A && (w = P,
                    A = N))
                }
                return A <= 3 ? w : null
            }
            function E(v, _, b) {
                var C = _.errorCorrectionLevels[b]
                  , B = []
                  , T = 0;
                if (C.ecBlocks.forEach(function(K) {
                    for (var oe = 0; oe < K.numBlocks; oe++)
                        B.push({
                            numDataCodewords: K.dataCodewordsPerBlock,
                            codewords: []
                        }),
                        T += K.dataCodewordsPerBlock + C.ecCodewordsPerBlock
                }),
                v.length < T)
                    return null;
                v = v.slice(0, T);
                for (var A = C.ecBlocks[0].dataCodewordsPerBlock, w = 0; w < A; w++)
                    for (var S = 0, D = B; S < D.length; S++) {
                        var F = D[S];
                        F.codewords.push(v.shift())
                    }
                if (C.ecBlocks.length > 1)
                    for (var R = C.ecBlocks[0].numBlocks, P = C.ecBlocks[1].numBlocks, w = 0; w < P; w++)
                        B[R + w].codewords.push(v.shift());
                for (; v.length > 0; )
                    for (var N = 0, j = B; N < j.length; N++) {
                        var F = j[N];
                        F.codewords.push(v.shift())
                    }
                return B
            }
            function g(v) {
                var _ = y(v);
                if (!_)
                    return null;
                var b = m(v);
                if (!b)
                    return null;
                var C = x(v, _, b)
                  , B = E(C, _, b.errorCorrectionLevel);
                if (!B)
                    return null;
                for (var T = B.reduce(function(N, j) {
                    return N + j.numDataCodewords
                }, 0), A = new Uint8ClampedArray(T), w = 0, S = 0, D = B; S < D.length; S++) {
                    var F = D[S]
                      , R = a.decode(F.codewords, F.codewords.length - F.numDataCodewords);
                    if (!R)
                        return null;
                    for (var P = 0; P < F.numDataCodewords; P++)
                        A[w++] = R[P]
                }
                try {
                    return s.decode(A, _.versionNumber)
                } catch {
                    return null
                }
            }
            function p(v) {
                if (v == null)
                    return null;
                var _ = g(v);
                if (_)
                    return _;
                for (var b = 0; b < v.width; b++)
                    for (var C = b + 1; C < v.height; C++)
                        v.get(b, C) !== v.get(C, b) && (v.set(b, C, !v.get(b, C)),
                        v.set(C, b, !v.get(C, b)));
                return g(v)
            }
            n.decode = p
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = i(7), s = i(8), a;
            (function(y) {
                y.Numeric = "numeric",
                y.Alphanumeric = "alphanumeric",
                y.Byte = "byte",
                y.Kanji = "kanji",
                y.ECI = "eci"
            }
            )(a = n.Mode || (n.Mode = {}));
            var l;
            (function(y) {
                y[y.Terminator = 0] = "Terminator",
                y[y.Numeric = 1] = "Numeric",
                y[y.Alphanumeric = 2] = "Alphanumeric",
                y[y.Byte = 4] = "Byte",
                y[y.Kanji = 8] = "Kanji",
                y[y.ECI = 7] = "ECI"
            }
            )(l || (l = {}));
            function c(y, m) {
                for (var E = [], g = "", p = [10, 12, 14][m], v = y.readBits(p); v >= 3; ) {
                    var _ = y.readBits(10);
                    if (_ >= 1e3)
                        throw new Error("Invalid numeric value above 999");
                    var b = Math.floor(_ / 100)
                      , C = Math.floor(_ / 10) % 10
                      , B = _ % 10;
                    E.push(48 + b, 48 + C, 48 + B),
                    g += b.toString() + C.toString() + B.toString(),
                    v -= 3
                }
                if (v === 2) {
                    var _ = y.readBits(7);
                    if (_ >= 100)
                        throw new Error("Invalid numeric value above 99");
                    var b = Math.floor(_ / 10)
                      , C = _ % 10;
                    E.push(48 + b, 48 + C),
                    g += b.toString() + C.toString()
                } else if (v === 1) {
                    var _ = y.readBits(4);
                    if (_ >= 10)
                        throw new Error("Invalid numeric value above 9");
                    E.push(48 + _),
                    g += _.toString()
                }
                return {
                    bytes: E,
                    text: g
                }
            }
            var u = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", " ", "$", "%", "*", "+", "-", ".", "/", ":"];
            function f(y, m) {
                for (var E = [], g = "", p = [9, 11, 13][m], v = y.readBits(p); v >= 2; ) {
                    var _ = y.readBits(11)
                      , b = Math.floor(_ / 45)
                      , C = _ % 45;
                    E.push(u[b].charCodeAt(0), u[C].charCodeAt(0)),
                    g += u[b] + u[C],
                    v -= 2
                }
                if (v === 1) {
                    var b = y.readBits(6);
                    E.push(u[b].charCodeAt(0)),
                    g += u[b]
                }
                return {
                    bytes: E,
                    text: g
                }
            }
            function d(y, m) {
                for (var E = [], g = "", p = [8, 16, 16][m], v = y.readBits(p), _ = 0; _ < v; _++) {
                    var b = y.readBits(8);
                    E.push(b)
                }
                try {
                    g += decodeURIComponent(E.map(function(C) {
                        return "%" + ("0" + C.toString(16)).substr(-2)
                    }).join(""))
                } catch {}
                return {
                    bytes: E,
                    text: g
                }
            }
            function h(y, m) {
                for (var E = [], g = "", p = [8, 10, 12][m], v = y.readBits(p), _ = 0; _ < v; _++) {
                    var b = y.readBits(13)
                      , C = Math.floor(b / 192) << 8 | b % 192;
                    C < 7936 ? C += 33088 : C += 49472,
                    E.push(C >> 8, C & 255),
                    g += String.fromCharCode(s.shiftJISTable[C])
                }
                return {
                    bytes: E,
                    text: g
                }
            }
            function x(y, m) {
                for (var E, g, p, v, _ = new o.BitStream(y), b = m <= 9 ? 0 : m <= 26 ? 1 : 2, C = {
                    text: "",
                    bytes: [],
                    chunks: [],
                    version: m
                }; _.available() >= 4; ) {
                    var B = _.readBits(4);
                    if (B === l.Terminator)
                        return C;
                    if (B === l.ECI)
                        _.readBits(1) === 0 ? C.chunks.push({
                            type: a.ECI,
                            assignmentNumber: _.readBits(7)
                        }) : _.readBits(1) === 0 ? C.chunks.push({
                            type: a.ECI,
                            assignmentNumber: _.readBits(14)
                        }) : _.readBits(1) === 0 ? C.chunks.push({
                            type: a.ECI,
                            assignmentNumber: _.readBits(21)
                        }) : C.chunks.push({
                            type: a.ECI,
                            assignmentNumber: -1
                        });
                    else if (B === l.Numeric) {
                        var T = c(_, b);
                        C.text += T.text,
                        (E = C.bytes).push.apply(E, T.bytes),
                        C.chunks.push({
                            type: a.Numeric,
                            text: T.text
                        })
                    } else if (B === l.Alphanumeric) {
                        var A = f(_, b);
                        C.text += A.text,
                        (g = C.bytes).push.apply(g, A.bytes),
                        C.chunks.push({
                            type: a.Alphanumeric,
                            text: A.text
                        })
                    } else if (B === l.Byte) {
                        var w = d(_, b);
                        C.text += w.text,
                        (p = C.bytes).push.apply(p, w.bytes),
                        C.chunks.push({
                            type: a.Byte,
                            bytes: w.bytes,
                            text: w.text
                        })
                    } else if (B === l.Kanji) {
                        var S = h(_, b);
                        C.text += S.text,
                        (v = C.bytes).push.apply(v, S.bytes),
                        C.chunks.push({
                            type: a.Kanji,
                            bytes: S.bytes,
                            text: S.text
                        })
                    }
                }
                if (_.available() === 0 || _.readBits(_.available()) === 0)
                    return C
            }
            n.decode = x
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = function() {
                function s(a) {
                    this.byteOffset = 0,
                    this.bitOffset = 0,
                    this.bytes = a
                }
                return s.prototype.readBits = function(a) {
                    if (a < 1 || a > 32 || a > this.available())
                        throw new Error("Cannot read " + a.toString() + " bits");
                    var l = 0;
                    if (this.bitOffset > 0) {
                        var c = 8 - this.bitOffset
                          , u = a < c ? a : c
                          , f = c - u
                          , d = 255 >> 8 - u << f;
                        l = (this.bytes[this.byteOffset] & d) >> f,
                        a -= u,
                        this.bitOffset += u,
                        this.bitOffset === 8 && (this.bitOffset = 0,
                        this.byteOffset++)
                    }
                    if (a > 0) {
                        for (; a >= 8; )
                            l = l << 8 | this.bytes[this.byteOffset] & 255,
                            this.byteOffset++,
                            a -= 8;
                        if (a > 0) {
                            var f = 8 - a
                              , d = 255 >> f << f;
                            l = l << a | (this.bytes[this.byteOffset] & d) >> f,
                            this.bitOffset += a
                        }
                    }
                    return l
                }
                ,
                s.prototype.available = function() {
                    return 8 * (this.bytes.length - this.byteOffset) - this.bitOffset
                }
                ,
                s
            }();
            n.BitStream = o
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            }),
            n.shiftJISTable = {
                32: 32,
                33: 33,
                34: 34,
                35: 35,
                36: 36,
                37: 37,
                38: 38,
                39: 39,
                40: 40,
                41: 41,
                42: 42,
                43: 43,
                44: 44,
                45: 45,
                46: 46,
                47: 47,
                48: 48,
                49: 49,
                50: 50,
                51: 51,
                52: 52,
                53: 53,
                54: 54,
                55: 55,
                56: 56,
                57: 57,
                58: 58,
                59: 59,
                60: 60,
                61: 61,
                62: 62,
                63: 63,
                64: 64,
                65: 65,
                66: 66,
                67: 67,
                68: 68,
                69: 69,
                70: 70,
                71: 71,
                72: 72,
                73: 73,
                74: 74,
                75: 75,
                76: 76,
                77: 77,
                78: 78,
                79: 79,
                80: 80,
                81: 81,
                82: 82,
                83: 83,
                84: 84,
                85: 85,
                86: 86,
                87: 87,
                88: 88,
                89: 89,
                90: 90,
                91: 91,
                92: 165,
                93: 93,
                94: 94,
                95: 95,
                96: 96,
                97: 97,
                98: 98,
                99: 99,
                100: 100,
                101: 101,
                102: 102,
                103: 103,
                104: 104,
                105: 105,
                106: 106,
                107: 107,
                108: 108,
                109: 109,
                110: 110,
                111: 111,
                112: 112,
                113: 113,
                114: 114,
                115: 115,
                116: 116,
                117: 117,
                118: 118,
                119: 119,
                120: 120,
                121: 121,
                122: 122,
                123: 123,
                124: 124,
                125: 125,
                126: 8254,
                33088: 12288,
                33089: 12289,
                33090: 12290,
                33091: 65292,
                33092: 65294,
                33093: 12539,
                33094: 65306,
                33095: 65307,
                33096: 65311,
                33097: 65281,
                33098: 12443,
                33099: 12444,
                33100: 180,
                33101: 65344,
                33102: 168,
                33103: 65342,
                33104: 65507,
                33105: 65343,
                33106: 12541,
                33107: 12542,
                33108: 12445,
                33109: 12446,
                33110: 12291,
                33111: 20189,
                33112: 12293,
                33113: 12294,
                33114: 12295,
                33115: 12540,
                33116: 8213,
                33117: 8208,
                33118: 65295,
                33119: 92,
                33120: 12316,
                33121: 8214,
                33122: 65372,
                33123: 8230,
                33124: 8229,
                33125: 8216,
                33126: 8217,
                33127: 8220,
                33128: 8221,
                33129: 65288,
                33130: 65289,
                33131: 12308,
                33132: 12309,
                33133: 65339,
                33134: 65341,
                33135: 65371,
                33136: 65373,
                33137: 12296,
                33138: 12297,
                33139: 12298,
                33140: 12299,
                33141: 12300,
                33142: 12301,
                33143: 12302,
                33144: 12303,
                33145: 12304,
                33146: 12305,
                33147: 65291,
                33148: 8722,
                33149: 177,
                33150: 215,
                33152: 247,
                33153: 65309,
                33154: 8800,
                33155: 65308,
                33156: 65310,
                33157: 8806,
                33158: 8807,
                33159: 8734,
                33160: 8756,
                33161: 9794,
                33162: 9792,
                33163: 176,
                33164: 8242,
                33165: 8243,
                33166: 8451,
                33167: 65509,
                33168: 65284,
                33169: 162,
                33170: 163,
                33171: 65285,
                33172: 65283,
                33173: 65286,
                33174: 65290,
                33175: 65312,
                33176: 167,
                33177: 9734,
                33178: 9733,
                33179: 9675,
                33180: 9679,
                33181: 9678,
                33182: 9671,
                33183: 9670,
                33184: 9633,
                33185: 9632,
                33186: 9651,
                33187: 9650,
                33188: 9661,
                33189: 9660,
                33190: 8251,
                33191: 12306,
                33192: 8594,
                33193: 8592,
                33194: 8593,
                33195: 8595,
                33196: 12307,
                33208: 8712,
                33209: 8715,
                33210: 8838,
                33211: 8839,
                33212: 8834,
                33213: 8835,
                33214: 8746,
                33215: 8745,
                33224: 8743,
                33225: 8744,
                33226: 172,
                33227: 8658,
                33228: 8660,
                33229: 8704,
                33230: 8707,
                33242: 8736,
                33243: 8869,
                33244: 8978,
                33245: 8706,
                33246: 8711,
                33247: 8801,
                33248: 8786,
                33249: 8810,
                33250: 8811,
                33251: 8730,
                33252: 8765,
                33253: 8733,
                33254: 8757,
                33255: 8747,
                33256: 8748,
                33264: 8491,
                33265: 8240,
                33266: 9839,
                33267: 9837,
                33268: 9834,
                33269: 8224,
                33270: 8225,
                33271: 182,
                33276: 9711,
                33359: 65296,
                33360: 65297,
                33361: 65298,
                33362: 65299,
                33363: 65300,
                33364: 65301,
                33365: 65302,
                33366: 65303,
                33367: 65304,
                33368: 65305,
                33376: 65313,
                33377: 65314,
                33378: 65315,
                33379: 65316,
                33380: 65317,
                33381: 65318,
                33382: 65319,
                33383: 65320,
                33384: 65321,
                33385: 65322,
                33386: 65323,
                33387: 65324,
                33388: 65325,
                33389: 65326,
                33390: 65327,
                33391: 65328,
                33392: 65329,
                33393: 65330,
                33394: 65331,
                33395: 65332,
                33396: 65333,
                33397: 65334,
                33398: 65335,
                33399: 65336,
                33400: 65337,
                33401: 65338,
                33409: 65345,
                33410: 65346,
                33411: 65347,
                33412: 65348,
                33413: 65349,
                33414: 65350,
                33415: 65351,
                33416: 65352,
                33417: 65353,
                33418: 65354,
                33419: 65355,
                33420: 65356,
                33421: 65357,
                33422: 65358,
                33423: 65359,
                33424: 65360,
                33425: 65361,
                33426: 65362,
                33427: 65363,
                33428: 65364,
                33429: 65365,
                33430: 65366,
                33431: 65367,
                33432: 65368,
                33433: 65369,
                33434: 65370,
                33439: 12353,
                33440: 12354,
                33441: 12355,
                33442: 12356,
                33443: 12357,
                33444: 12358,
                33445: 12359,
                33446: 12360,
                33447: 12361,
                33448: 12362,
                33449: 12363,
                33450: 12364,
                33451: 12365,
                33452: 12366,
                33453: 12367,
                33454: 12368,
                33455: 12369,
                33456: 12370,
                33457: 12371,
                33458: 12372,
                33459: 12373,
                33460: 12374,
                33461: 12375,
                33462: 12376,
                33463: 12377,
                33464: 12378,
                33465: 12379,
                33466: 12380,
                33467: 12381,
                33468: 12382,
                33469: 12383,
                33470: 12384,
                33471: 12385,
                33472: 12386,
                33473: 12387,
                33474: 12388,
                33475: 12389,
                33476: 12390,
                33477: 12391,
                33478: 12392,
                33479: 12393,
                33480: 12394,
                33481: 12395,
                33482: 12396,
                33483: 12397,
                33484: 12398,
                33485: 12399,
                33486: 12400,
                33487: 12401,
                33488: 12402,
                33489: 12403,
                33490: 12404,
                33491: 12405,
                33492: 12406,
                33493: 12407,
                33494: 12408,
                33495: 12409,
                33496: 12410,
                33497: 12411,
                33498: 12412,
                33499: 12413,
                33500: 12414,
                33501: 12415,
                33502: 12416,
                33503: 12417,
                33504: 12418,
                33505: 12419,
                33506: 12420,
                33507: 12421,
                33508: 12422,
                33509: 12423,
                33510: 12424,
                33511: 12425,
                33512: 12426,
                33513: 12427,
                33514: 12428,
                33515: 12429,
                33516: 12430,
                33517: 12431,
                33518: 12432,
                33519: 12433,
                33520: 12434,
                33521: 12435,
                33600: 12449,
                33601: 12450,
                33602: 12451,
                33603: 12452,
                33604: 12453,
                33605: 12454,
                33606: 12455,
                33607: 12456,
                33608: 12457,
                33609: 12458,
                33610: 12459,
                33611: 12460,
                33612: 12461,
                33613: 12462,
                33614: 12463,
                33615: 12464,
                33616: 12465,
                33617: 12466,
                33618: 12467,
                33619: 12468,
                33620: 12469,
                33621: 12470,
                33622: 12471,
                33623: 12472,
                33624: 12473,
                33625: 12474,
                33626: 12475,
                33627: 12476,
                33628: 12477,
                33629: 12478,
                33630: 12479,
                33631: 12480,
                33632: 12481,
                33633: 12482,
                33634: 12483,
                33635: 12484,
                33636: 12485,
                33637: 12486,
                33638: 12487,
                33639: 12488,
                33640: 12489,
                33641: 12490,
                33642: 12491,
                33643: 12492,
                33644: 12493,
                33645: 12494,
                33646: 12495,
                33647: 12496,
                33648: 12497,
                33649: 12498,
                33650: 12499,
                33651: 12500,
                33652: 12501,
                33653: 12502,
                33654: 12503,
                33655: 12504,
                33656: 12505,
                33657: 12506,
                33658: 12507,
                33659: 12508,
                33660: 12509,
                33661: 12510,
                33662: 12511,
                33664: 12512,
                33665: 12513,
                33666: 12514,
                33667: 12515,
                33668: 12516,
                33669: 12517,
                33670: 12518,
                33671: 12519,
                33672: 12520,
                33673: 12521,
                33674: 12522,
                33675: 12523,
                33676: 12524,
                33677: 12525,
                33678: 12526,
                33679: 12527,
                33680: 12528,
                33681: 12529,
                33682: 12530,
                33683: 12531,
                33684: 12532,
                33685: 12533,
                33686: 12534,
                33695: 913,
                33696: 914,
                33697: 915,
                33698: 916,
                33699: 917,
                33700: 918,
                33701: 919,
                33702: 920,
                33703: 921,
                33704: 922,
                33705: 923,
                33706: 924,
                33707: 925,
                33708: 926,
                33709: 927,
                33710: 928,
                33711: 929,
                33712: 931,
                33713: 932,
                33714: 933,
                33715: 934,
                33716: 935,
                33717: 936,
                33718: 937,
                33727: 945,
                33728: 946,
                33729: 947,
                33730: 948,
                33731: 949,
                33732: 950,
                33733: 951,
                33734: 952,
                33735: 953,
                33736: 954,
                33737: 955,
                33738: 956,
                33739: 957,
                33740: 958,
                33741: 959,
                33742: 960,
                33743: 961,
                33744: 963,
                33745: 964,
                33746: 965,
                33747: 966,
                33748: 967,
                33749: 968,
                33750: 969,
                33856: 1040,
                33857: 1041,
                33858: 1042,
                33859: 1043,
                33860: 1044,
                33861: 1045,
                33862: 1025,
                33863: 1046,
                33864: 1047,
                33865: 1048,
                33866: 1049,
                33867: 1050,
                33868: 1051,
                33869: 1052,
                33870: 1053,
                33871: 1054,
                33872: 1055,
                33873: 1056,
                33874: 1057,
                33875: 1058,
                33876: 1059,
                33877: 1060,
                33878: 1061,
                33879: 1062,
                33880: 1063,
                33881: 1064,
                33882: 1065,
                33883: 1066,
                33884: 1067,
                33885: 1068,
                33886: 1069,
                33887: 1070,
                33888: 1071,
                33904: 1072,
                33905: 1073,
                33906: 1074,
                33907: 1075,
                33908: 1076,
                33909: 1077,
                33910: 1105,
                33911: 1078,
                33912: 1079,
                33913: 1080,
                33914: 1081,
                33915: 1082,
                33916: 1083,
                33917: 1084,
                33918: 1085,
                33920: 1086,
                33921: 1087,
                33922: 1088,
                33923: 1089,
                33924: 1090,
                33925: 1091,
                33926: 1092,
                33927: 1093,
                33928: 1094,
                33929: 1095,
                33930: 1096,
                33931: 1097,
                33932: 1098,
                33933: 1099,
                33934: 1100,
                33935: 1101,
                33936: 1102,
                33937: 1103,
                33951: 9472,
                33952: 9474,
                33953: 9484,
                33954: 9488,
                33955: 9496,
                33956: 9492,
                33957: 9500,
                33958: 9516,
                33959: 9508,
                33960: 9524,
                33961: 9532,
                33962: 9473,
                33963: 9475,
                33964: 9487,
                33965: 9491,
                33966: 9499,
                33967: 9495,
                33968: 9507,
                33969: 9523,
                33970: 9515,
                33971: 9531,
                33972: 9547,
                33973: 9504,
                33974: 9519,
                33975: 9512,
                33976: 9527,
                33977: 9535,
                33978: 9501,
                33979: 9520,
                33980: 9509,
                33981: 9528,
                33982: 9538,
                34975: 20124,
                34976: 21782,
                34977: 23043,
                34978: 38463,
                34979: 21696,
                34980: 24859,
                34981: 25384,
                34982: 23030,
                34983: 36898,
                34984: 33909,
                34985: 33564,
                34986: 31312,
                34987: 24746,
                34988: 25569,
                34989: 28197,
                34990: 26093,
                34991: 33894,
                34992: 33446,
                34993: 39925,
                34994: 26771,
                34995: 22311,
                34996: 26017,
                34997: 25201,
                34998: 23451,
                34999: 22992,
                35e3: 34427,
                35001: 39156,
                35002: 32098,
                35003: 32190,
                35004: 39822,
                35005: 25110,
                35006: 31903,
                35007: 34999,
                35008: 23433,
                35009: 24245,
                35010: 25353,
                35011: 26263,
                35012: 26696,
                35013: 38343,
                35014: 38797,
                35015: 26447,
                35016: 20197,
                35017: 20234,
                35018: 20301,
                35019: 20381,
                35020: 20553,
                35021: 22258,
                35022: 22839,
                35023: 22996,
                35024: 23041,
                35025: 23561,
                35026: 24799,
                35027: 24847,
                35028: 24944,
                35029: 26131,
                35030: 26885,
                35031: 28858,
                35032: 30031,
                35033: 30064,
                35034: 31227,
                35035: 32173,
                35036: 32239,
                35037: 32963,
                35038: 33806,
                35039: 34915,
                35040: 35586,
                35041: 36949,
                35042: 36986,
                35043: 21307,
                35044: 20117,
                35045: 20133,
                35046: 22495,
                35047: 32946,
                35048: 37057,
                35049: 30959,
                35050: 19968,
                35051: 22769,
                35052: 28322,
                35053: 36920,
                35054: 31282,
                35055: 33576,
                35056: 33419,
                35057: 39983,
                35058: 20801,
                35059: 21360,
                35060: 21693,
                35061: 21729,
                35062: 22240,
                35063: 23035,
                35064: 24341,
                35065: 39154,
                35066: 28139,
                35067: 32996,
                35068: 34093,
                35136: 38498,
                35137: 38512,
                35138: 38560,
                35139: 38907,
                35140: 21515,
                35141: 21491,
                35142: 23431,
                35143: 28879,
                35144: 32701,
                35145: 36802,
                35146: 38632,
                35147: 21359,
                35148: 40284,
                35149: 31418,
                35150: 19985,
                35151: 30867,
                35152: 33276,
                35153: 28198,
                35154: 22040,
                35155: 21764,
                35156: 27421,
                35157: 34074,
                35158: 39995,
                35159: 23013,
                35160: 21417,
                35161: 28006,
                35162: 29916,
                35163: 38287,
                35164: 22082,
                35165: 20113,
                35166: 36939,
                35167: 38642,
                35168: 33615,
                35169: 39180,
                35170: 21473,
                35171: 21942,
                35172: 23344,
                35173: 24433,
                35174: 26144,
                35175: 26355,
                35176: 26628,
                35177: 27704,
                35178: 27891,
                35179: 27945,
                35180: 29787,
                35181: 30408,
                35182: 31310,
                35183: 38964,
                35184: 33521,
                35185: 34907,
                35186: 35424,
                35187: 37613,
                35188: 28082,
                35189: 30123,
                35190: 30410,
                35191: 39365,
                35192: 24742,
                35193: 35585,
                35194: 36234,
                35195: 38322,
                35196: 27022,
                35197: 21421,
                35198: 20870,
                35200: 22290,
                35201: 22576,
                35202: 22852,
                35203: 23476,
                35204: 24310,
                35205: 24616,
                35206: 25513,
                35207: 25588,
                35208: 27839,
                35209: 28436,
                35210: 28814,
                35211: 28948,
                35212: 29017,
                35213: 29141,
                35214: 29503,
                35215: 32257,
                35216: 33398,
                35217: 33489,
                35218: 34199,
                35219: 36960,
                35220: 37467,
                35221: 40219,
                35222: 22633,
                35223: 26044,
                35224: 27738,
                35225: 29989,
                35226: 20985,
                35227: 22830,
                35228: 22885,
                35229: 24448,
                35230: 24540,
                35231: 25276,
                35232: 26106,
                35233: 27178,
                35234: 27431,
                35235: 27572,
                35236: 29579,
                35237: 32705,
                35238: 35158,
                35239: 40236,
                35240: 40206,
                35241: 40644,
                35242: 23713,
                35243: 27798,
                35244: 33659,
                35245: 20740,
                35246: 23627,
                35247: 25014,
                35248: 33222,
                35249: 26742,
                35250: 29281,
                35251: 20057,
                35252: 20474,
                35253: 21368,
                35254: 24681,
                35255: 28201,
                35256: 31311,
                35257: 38899,
                35258: 19979,
                35259: 21270,
                35260: 20206,
                35261: 20309,
                35262: 20285,
                35263: 20385,
                35264: 20339,
                35265: 21152,
                35266: 21487,
                35267: 22025,
                35268: 22799,
                35269: 23233,
                35270: 23478,
                35271: 23521,
                35272: 31185,
                35273: 26247,
                35274: 26524,
                35275: 26550,
                35276: 27468,
                35277: 27827,
                35278: 28779,
                35279: 29634,
                35280: 31117,
                35281: 31166,
                35282: 31292,
                35283: 31623,
                35284: 33457,
                35285: 33499,
                35286: 33540,
                35287: 33655,
                35288: 33775,
                35289: 33747,
                35290: 34662,
                35291: 35506,
                35292: 22057,
                35293: 36008,
                35294: 36838,
                35295: 36942,
                35296: 38686,
                35297: 34442,
                35298: 20420,
                35299: 23784,
                35300: 25105,
                35301: 29273,
                35302: 30011,
                35303: 33253,
                35304: 33469,
                35305: 34558,
                35306: 36032,
                35307: 38597,
                35308: 39187,
                35309: 39381,
                35310: 20171,
                35311: 20250,
                35312: 35299,
                35313: 22238,
                35314: 22602,
                35315: 22730,
                35316: 24315,
                35317: 24555,
                35318: 24618,
                35319: 24724,
                35320: 24674,
                35321: 25040,
                35322: 25106,
                35323: 25296,
                35324: 25913,
                35392: 39745,
                35393: 26214,
                35394: 26800,
                35395: 28023,
                35396: 28784,
                35397: 30028,
                35398: 30342,
                35399: 32117,
                35400: 33445,
                35401: 34809,
                35402: 38283,
                35403: 38542,
                35404: 35997,
                35405: 20977,
                35406: 21182,
                35407: 22806,
                35408: 21683,
                35409: 23475,
                35410: 23830,
                35411: 24936,
                35412: 27010,
                35413: 28079,
                35414: 30861,
                35415: 33995,
                35416: 34903,
                35417: 35442,
                35418: 37799,
                35419: 39608,
                35420: 28012,
                35421: 39336,
                35422: 34521,
                35423: 22435,
                35424: 26623,
                35425: 34510,
                35426: 37390,
                35427: 21123,
                35428: 22151,
                35429: 21508,
                35430: 24275,
                35431: 25313,
                35432: 25785,
                35433: 26684,
                35434: 26680,
                35435: 27579,
                35436: 29554,
                35437: 30906,
                35438: 31339,
                35439: 35226,
                35440: 35282,
                35441: 36203,
                35442: 36611,
                35443: 37101,
                35444: 38307,
                35445: 38548,
                35446: 38761,
                35447: 23398,
                35448: 23731,
                35449: 27005,
                35450: 38989,
                35451: 38990,
                35452: 25499,
                35453: 31520,
                35454: 27179,
                35456: 27263,
                35457: 26806,
                35458: 39949,
                35459: 28511,
                35460: 21106,
                35461: 21917,
                35462: 24688,
                35463: 25324,
                35464: 27963,
                35465: 28167,
                35466: 28369,
                35467: 33883,
                35468: 35088,
                35469: 36676,
                35470: 19988,
                35471: 39993,
                35472: 21494,
                35473: 26907,
                35474: 27194,
                35475: 38788,
                35476: 26666,
                35477: 20828,
                35478: 31427,
                35479: 33970,
                35480: 37340,
                35481: 37772,
                35482: 22107,
                35483: 40232,
                35484: 26658,
                35485: 33541,
                35486: 33841,
                35487: 31909,
                35488: 21e3,
                35489: 33477,
                35490: 29926,
                35491: 20094,
                35492: 20355,
                35493: 20896,
                35494: 23506,
                35495: 21002,
                35496: 21208,
                35497: 21223,
                35498: 24059,
                35499: 21914,
                35500: 22570,
                35501: 23014,
                35502: 23436,
                35503: 23448,
                35504: 23515,
                35505: 24178,
                35506: 24185,
                35507: 24739,
                35508: 24863,
                35509: 24931,
                35510: 25022,
                35511: 25563,
                35512: 25954,
                35513: 26577,
                35514: 26707,
                35515: 26874,
                35516: 27454,
                35517: 27475,
                35518: 27735,
                35519: 28450,
                35520: 28567,
                35521: 28485,
                35522: 29872,
                35523: 29976,
                35524: 30435,
                35525: 30475,
                35526: 31487,
                35527: 31649,
                35528: 31777,
                35529: 32233,
                35530: 32566,
                35531: 32752,
                35532: 32925,
                35533: 33382,
                35534: 33694,
                35535: 35251,
                35536: 35532,
                35537: 36011,
                35538: 36996,
                35539: 37969,
                35540: 38291,
                35541: 38289,
                35542: 38306,
                35543: 38501,
                35544: 38867,
                35545: 39208,
                35546: 33304,
                35547: 20024,
                35548: 21547,
                35549: 23736,
                35550: 24012,
                35551: 29609,
                35552: 30284,
                35553: 30524,
                35554: 23721,
                35555: 32747,
                35556: 36107,
                35557: 38593,
                35558: 38929,
                35559: 38996,
                35560: 39e3,
                35561: 20225,
                35562: 20238,
                35563: 21361,
                35564: 21916,
                35565: 22120,
                35566: 22522,
                35567: 22855,
                35568: 23305,
                35569: 23492,
                35570: 23696,
                35571: 24076,
                35572: 24190,
                35573: 24524,
                35574: 25582,
                35575: 26426,
                35576: 26071,
                35577: 26082,
                35578: 26399,
                35579: 26827,
                35580: 26820,
                35648: 27231,
                35649: 24112,
                35650: 27589,
                35651: 27671,
                35652: 27773,
                35653: 30079,
                35654: 31048,
                35655: 23395,
                35656: 31232,
                35657: 32e3,
                35658: 24509,
                35659: 35215,
                35660: 35352,
                35661: 36020,
                35662: 36215,
                35663: 36556,
                35664: 36637,
                35665: 39138,
                35666: 39438,
                35667: 39740,
                35668: 20096,
                35669: 20605,
                35670: 20736,
                35671: 22931,
                35672: 23452,
                35673: 25135,
                35674: 25216,
                35675: 25836,
                35676: 27450,
                35677: 29344,
                35678: 30097,
                35679: 31047,
                35680: 32681,
                35681: 34811,
                35682: 35516,
                35683: 35696,
                35684: 25516,
                35685: 33738,
                35686: 38816,
                35687: 21513,
                35688: 21507,
                35689: 21931,
                35690: 26708,
                35691: 27224,
                35692: 35440,
                35693: 30759,
                35694: 26485,
                35695: 40653,
                35696: 21364,
                35697: 23458,
                35698: 33050,
                35699: 34384,
                35700: 36870,
                35701: 19992,
                35702: 20037,
                35703: 20167,
                35704: 20241,
                35705: 21450,
                35706: 21560,
                35707: 23470,
                35708: 24339,
                35709: 24613,
                35710: 25937,
                35712: 26429,
                35713: 27714,
                35714: 27762,
                35715: 27875,
                35716: 28792,
                35717: 29699,
                35718: 31350,
                35719: 31406,
                35720: 31496,
                35721: 32026,
                35722: 31998,
                35723: 32102,
                35724: 26087,
                35725: 29275,
                35726: 21435,
                35727: 23621,
                35728: 24040,
                35729: 25298,
                35730: 25312,
                35731: 25369,
                35732: 28192,
                35733: 34394,
                35734: 35377,
                35735: 36317,
                35736: 37624,
                35737: 28417,
                35738: 31142,
                35739: 39770,
                35740: 20136,
                35741: 20139,
                35742: 20140,
                35743: 20379,
                35744: 20384,
                35745: 20689,
                35746: 20807,
                35747: 31478,
                35748: 20849,
                35749: 20982,
                35750: 21332,
                35751: 21281,
                35752: 21375,
                35753: 21483,
                35754: 21932,
                35755: 22659,
                35756: 23777,
                35757: 24375,
                35758: 24394,
                35759: 24623,
                35760: 24656,
                35761: 24685,
                35762: 25375,
                35763: 25945,
                35764: 27211,
                35765: 27841,
                35766: 29378,
                35767: 29421,
                35768: 30703,
                35769: 33016,
                35770: 33029,
                35771: 33288,
                35772: 34126,
                35773: 37111,
                35774: 37857,
                35775: 38911,
                35776: 39255,
                35777: 39514,
                35778: 20208,
                35779: 20957,
                35780: 23597,
                35781: 26241,
                35782: 26989,
                35783: 23616,
                35784: 26354,
                35785: 26997,
                35786: 29577,
                35787: 26704,
                35788: 31873,
                35789: 20677,
                35790: 21220,
                35791: 22343,
                35792: 24062,
                35793: 37670,
                35794: 26020,
                35795: 27427,
                35796: 27453,
                35797: 29748,
                35798: 31105,
                35799: 31165,
                35800: 31563,
                35801: 32202,
                35802: 33465,
                35803: 33740,
                35804: 34943,
                35805: 35167,
                35806: 35641,
                35807: 36817,
                35808: 37329,
                35809: 21535,
                35810: 37504,
                35811: 20061,
                35812: 20534,
                35813: 21477,
                35814: 21306,
                35815: 29399,
                35816: 29590,
                35817: 30697,
                35818: 33510,
                35819: 36527,
                35820: 39366,
                35821: 39368,
                35822: 39378,
                35823: 20855,
                35824: 24858,
                35825: 34398,
                35826: 21936,
                35827: 31354,
                35828: 20598,
                35829: 23507,
                35830: 36935,
                35831: 38533,
                35832: 20018,
                35833: 27355,
                35834: 37351,
                35835: 23633,
                35836: 23624,
                35904: 25496,
                35905: 31391,
                35906: 27795,
                35907: 38772,
                35908: 36705,
                35909: 31402,
                35910: 29066,
                35911: 38536,
                35912: 31874,
                35913: 26647,
                35914: 32368,
                35915: 26705,
                35916: 37740,
                35917: 21234,
                35918: 21531,
                35919: 34219,
                35920: 35347,
                35921: 32676,
                35922: 36557,
                35923: 37089,
                35924: 21350,
                35925: 34952,
                35926: 31041,
                35927: 20418,
                35928: 20670,
                35929: 21009,
                35930: 20804,
                35931: 21843,
                35932: 22317,
                35933: 29674,
                35934: 22411,
                35935: 22865,
                35936: 24418,
                35937: 24452,
                35938: 24693,
                35939: 24950,
                35940: 24935,
                35941: 25001,
                35942: 25522,
                35943: 25658,
                35944: 25964,
                35945: 26223,
                35946: 26690,
                35947: 28179,
                35948: 30054,
                35949: 31293,
                35950: 31995,
                35951: 32076,
                35952: 32153,
                35953: 32331,
                35954: 32619,
                35955: 33550,
                35956: 33610,
                35957: 34509,
                35958: 35336,
                35959: 35427,
                35960: 35686,
                35961: 36605,
                35962: 38938,
                35963: 40335,
                35964: 33464,
                35965: 36814,
                35966: 39912,
                35968: 21127,
                35969: 25119,
                35970: 25731,
                35971: 28608,
                35972: 38553,
                35973: 26689,
                35974: 20625,
                35975: 27424,
                35976: 27770,
                35977: 28500,
                35978: 31348,
                35979: 32080,
                35980: 34880,
                35981: 35363,
                35982: 26376,
                35983: 20214,
                35984: 20537,
                35985: 20518,
                35986: 20581,
                35987: 20860,
                35988: 21048,
                35989: 21091,
                35990: 21927,
                35991: 22287,
                35992: 22533,
                35993: 23244,
                35994: 24314,
                35995: 25010,
                35996: 25080,
                35997: 25331,
                35998: 25458,
                35999: 26908,
                36e3: 27177,
                36001: 29309,
                36002: 29356,
                36003: 29486,
                36004: 30740,
                36005: 30831,
                36006: 32121,
                36007: 30476,
                36008: 32937,
                36009: 35211,
                36010: 35609,
                36011: 36066,
                36012: 36562,
                36013: 36963,
                36014: 37749,
                36015: 38522,
                36016: 38997,
                36017: 39443,
                36018: 40568,
                36019: 20803,
                36020: 21407,
                36021: 21427,
                36022: 24187,
                36023: 24358,
                36024: 28187,
                36025: 28304,
                36026: 29572,
                36027: 29694,
                36028: 32067,
                36029: 33335,
                36030: 35328,
                36031: 35578,
                36032: 38480,
                36033: 20046,
                36034: 20491,
                36035: 21476,
                36036: 21628,
                36037: 22266,
                36038: 22993,
                36039: 23396,
                36040: 24049,
                36041: 24235,
                36042: 24359,
                36043: 25144,
                36044: 25925,
                36045: 26543,
                36046: 28246,
                36047: 29392,
                36048: 31946,
                36049: 34996,
                36050: 32929,
                36051: 32993,
                36052: 33776,
                36053: 34382,
                36054: 35463,
                36055: 36328,
                36056: 37431,
                36057: 38599,
                36058: 39015,
                36059: 40723,
                36060: 20116,
                36061: 20114,
                36062: 20237,
                36063: 21320,
                36064: 21577,
                36065: 21566,
                36066: 23087,
                36067: 24460,
                36068: 24481,
                36069: 24735,
                36070: 26791,
                36071: 27278,
                36072: 29786,
                36073: 30849,
                36074: 35486,
                36075: 35492,
                36076: 35703,
                36077: 37264,
                36078: 20062,
                36079: 39881,
                36080: 20132,
                36081: 20348,
                36082: 20399,
                36083: 20505,
                36084: 20502,
                36085: 20809,
                36086: 20844,
                36087: 21151,
                36088: 21177,
                36089: 21246,
                36090: 21402,
                36091: 21475,
                36092: 21521,
                36160: 21518,
                36161: 21897,
                36162: 22353,
                36163: 22434,
                36164: 22909,
                36165: 23380,
                36166: 23389,
                36167: 23439,
                36168: 24037,
                36169: 24039,
                36170: 24055,
                36171: 24184,
                36172: 24195,
                36173: 24218,
                36174: 24247,
                36175: 24344,
                36176: 24658,
                36177: 24908,
                36178: 25239,
                36179: 25304,
                36180: 25511,
                36181: 25915,
                36182: 26114,
                36183: 26179,
                36184: 26356,
                36185: 26477,
                36186: 26657,
                36187: 26775,
                36188: 27083,
                36189: 27743,
                36190: 27946,
                36191: 28009,
                36192: 28207,
                36193: 28317,
                36194: 30002,
                36195: 30343,
                36196: 30828,
                36197: 31295,
                36198: 31968,
                36199: 32005,
                36200: 32024,
                36201: 32094,
                36202: 32177,
                36203: 32789,
                36204: 32771,
                36205: 32943,
                36206: 32945,
                36207: 33108,
                36208: 33167,
                36209: 33322,
                36210: 33618,
                36211: 34892,
                36212: 34913,
                36213: 35611,
                36214: 36002,
                36215: 36092,
                36216: 37066,
                36217: 37237,
                36218: 37489,
                36219: 30783,
                36220: 37628,
                36221: 38308,
                36222: 38477,
                36224: 38917,
                36225: 39321,
                36226: 39640,
                36227: 40251,
                36228: 21083,
                36229: 21163,
                36230: 21495,
                36231: 21512,
                36232: 22741,
                36233: 25335,
                36234: 28640,
                36235: 35946,
                36236: 36703,
                36237: 40633,
                36238: 20811,
                36239: 21051,
                36240: 21578,
                36241: 22269,
                36242: 31296,
                36243: 37239,
                36244: 40288,
                36245: 40658,
                36246: 29508,
                36247: 28425,
                36248: 33136,
                36249: 29969,
                36250: 24573,
                36251: 24794,
                36252: 39592,
                36253: 29403,
                36254: 36796,
                36255: 27492,
                36256: 38915,
                36257: 20170,
                36258: 22256,
                36259: 22372,
                36260: 22718,
                36261: 23130,
                36262: 24680,
                36263: 25031,
                36264: 26127,
                36265: 26118,
                36266: 26681,
                36267: 26801,
                36268: 28151,
                36269: 30165,
                36270: 32058,
                36271: 33390,
                36272: 39746,
                36273: 20123,
                36274: 20304,
                36275: 21449,
                36276: 21766,
                36277: 23919,
                36278: 24038,
                36279: 24046,
                36280: 26619,
                36281: 27801,
                36282: 29811,
                36283: 30722,
                36284: 35408,
                36285: 37782,
                36286: 35039,
                36287: 22352,
                36288: 24231,
                36289: 25387,
                36290: 20661,
                36291: 20652,
                36292: 20877,
                36293: 26368,
                36294: 21705,
                36295: 22622,
                36296: 22971,
                36297: 23472,
                36298: 24425,
                36299: 25165,
                36300: 25505,
                36301: 26685,
                36302: 27507,
                36303: 28168,
                36304: 28797,
                36305: 37319,
                36306: 29312,
                36307: 30741,
                36308: 30758,
                36309: 31085,
                36310: 25998,
                36311: 32048,
                36312: 33756,
                36313: 35009,
                36314: 36617,
                36315: 38555,
                36316: 21092,
                36317: 22312,
                36318: 26448,
                36319: 32618,
                36320: 36001,
                36321: 20916,
                36322: 22338,
                36323: 38442,
                36324: 22586,
                36325: 27018,
                36326: 32948,
                36327: 21682,
                36328: 23822,
                36329: 22524,
                36330: 30869,
                36331: 40442,
                36332: 20316,
                36333: 21066,
                36334: 21643,
                36335: 25662,
                36336: 26152,
                36337: 26388,
                36338: 26613,
                36339: 31364,
                36340: 31574,
                36341: 32034,
                36342: 37679,
                36343: 26716,
                36344: 39853,
                36345: 31545,
                36346: 21273,
                36347: 20874,
                36348: 21047,
                36416: 23519,
                36417: 25334,
                36418: 25774,
                36419: 25830,
                36420: 26413,
                36421: 27578,
                36422: 34217,
                36423: 38609,
                36424: 30352,
                36425: 39894,
                36426: 25420,
                36427: 37638,
                36428: 39851,
                36429: 30399,
                36430: 26194,
                36431: 19977,
                36432: 20632,
                36433: 21442,
                36434: 23665,
                36435: 24808,
                36436: 25746,
                36437: 25955,
                36438: 26719,
                36439: 29158,
                36440: 29642,
                36441: 29987,
                36442: 31639,
                36443: 32386,
                36444: 34453,
                36445: 35715,
                36446: 36059,
                36447: 37240,
                36448: 39184,
                36449: 26028,
                36450: 26283,
                36451: 27531,
                36452: 20181,
                36453: 20180,
                36454: 20282,
                36455: 20351,
                36456: 21050,
                36457: 21496,
                36458: 21490,
                36459: 21987,
                36460: 22235,
                36461: 22763,
                36462: 22987,
                36463: 22985,
                36464: 23039,
                36465: 23376,
                36466: 23629,
                36467: 24066,
                36468: 24107,
                36469: 24535,
                36470: 24605,
                36471: 25351,
                36472: 25903,
                36473: 23388,
                36474: 26031,
                36475: 26045,
                36476: 26088,
                36477: 26525,
                36478: 27490,
                36480: 27515,
                36481: 27663,
                36482: 29509,
                36483: 31049,
                36484: 31169,
                36485: 31992,
                36486: 32025,
                36487: 32043,
                36488: 32930,
                36489: 33026,
                36490: 33267,
                36491: 35222,
                36492: 35422,
                36493: 35433,
                36494: 35430,
                36495: 35468,
                36496: 35566,
                36497: 36039,
                36498: 36060,
                36499: 38604,
                36500: 39164,
                36501: 27503,
                36502: 20107,
                36503: 20284,
                36504: 20365,
                36505: 20816,
                36506: 23383,
                36507: 23546,
                36508: 24904,
                36509: 25345,
                36510: 26178,
                36511: 27425,
                36512: 28363,
                36513: 27835,
                36514: 29246,
                36515: 29885,
                36516: 30164,
                36517: 30913,
                36518: 31034,
                36519: 32780,
                36520: 32819,
                36521: 33258,
                36522: 33940,
                36523: 36766,
                36524: 27728,
                36525: 40575,
                36526: 24335,
                36527: 35672,
                36528: 40235,
                36529: 31482,
                36530: 36600,
                36531: 23437,
                36532: 38635,
                36533: 19971,
                36534: 21489,
                36535: 22519,
                36536: 22833,
                36537: 23241,
                36538: 23460,
                36539: 24713,
                36540: 28287,
                36541: 28422,
                36542: 30142,
                36543: 36074,
                36544: 23455,
                36545: 34048,
                36546: 31712,
                36547: 20594,
                36548: 26612,
                36549: 33437,
                36550: 23649,
                36551: 34122,
                36552: 32286,
                36553: 33294,
                36554: 20889,
                36555: 23556,
                36556: 25448,
                36557: 36198,
                36558: 26012,
                36559: 29038,
                36560: 31038,
                36561: 32023,
                36562: 32773,
                36563: 35613,
                36564: 36554,
                36565: 36974,
                36566: 34503,
                36567: 37034,
                36568: 20511,
                36569: 21242,
                36570: 23610,
                36571: 26451,
                36572: 28796,
                36573: 29237,
                36574: 37196,
                36575: 37320,
                36576: 37675,
                36577: 33509,
                36578: 23490,
                36579: 24369,
                36580: 24825,
                36581: 20027,
                36582: 21462,
                36583: 23432,
                36584: 25163,
                36585: 26417,
                36586: 27530,
                36587: 29417,
                36588: 29664,
                36589: 31278,
                36590: 33131,
                36591: 36259,
                36592: 37202,
                36593: 39318,
                36594: 20754,
                36595: 21463,
                36596: 21610,
                36597: 23551,
                36598: 25480,
                36599: 27193,
                36600: 32172,
                36601: 38656,
                36602: 22234,
                36603: 21454,
                36604: 21608,
                36672: 23447,
                36673: 23601,
                36674: 24030,
                36675: 20462,
                36676: 24833,
                36677: 25342,
                36678: 27954,
                36679: 31168,
                36680: 31179,
                36681: 32066,
                36682: 32333,
                36683: 32722,
                36684: 33261,
                36685: 33311,
                36686: 33936,
                36687: 34886,
                36688: 35186,
                36689: 35728,
                36690: 36468,
                36691: 36655,
                36692: 36913,
                36693: 37195,
                36694: 37228,
                36695: 38598,
                36696: 37276,
                36697: 20160,
                36698: 20303,
                36699: 20805,
                36700: 21313,
                36701: 24467,
                36702: 25102,
                36703: 26580,
                36704: 27713,
                36705: 28171,
                36706: 29539,
                36707: 32294,
                36708: 37325,
                36709: 37507,
                36710: 21460,
                36711: 22809,
                36712: 23487,
                36713: 28113,
                36714: 31069,
                36715: 32302,
                36716: 31899,
                36717: 22654,
                36718: 29087,
                36719: 20986,
                36720: 34899,
                36721: 36848,
                36722: 20426,
                36723: 23803,
                36724: 26149,
                36725: 30636,
                36726: 31459,
                36727: 33308,
                36728: 39423,
                36729: 20934,
                36730: 24490,
                36731: 26092,
                36732: 26991,
                36733: 27529,
                36734: 28147,
                36736: 28310,
                36737: 28516,
                36738: 30462,
                36739: 32020,
                36740: 24033,
                36741: 36981,
                36742: 37255,
                36743: 38918,
                36744: 20966,
                36745: 21021,
                36746: 25152,
                36747: 26257,
                36748: 26329,
                36749: 28186,
                36750: 24246,
                36751: 32210,
                36752: 32626,
                36753: 26360,
                36754: 34223,
                36755: 34295,
                36756: 35576,
                36757: 21161,
                36758: 21465,
                36759: 22899,
                36760: 24207,
                36761: 24464,
                36762: 24661,
                36763: 37604,
                36764: 38500,
                36765: 20663,
                36766: 20767,
                36767: 21213,
                36768: 21280,
                36769: 21319,
                36770: 21484,
                36771: 21736,
                36772: 21830,
                36773: 21809,
                36774: 22039,
                36775: 22888,
                36776: 22974,
                36777: 23100,
                36778: 23477,
                36779: 23558,
                36780: 23567,
                36781: 23569,
                36782: 23578,
                36783: 24196,
                36784: 24202,
                36785: 24288,
                36786: 24432,
                36787: 25215,
                36788: 25220,
                36789: 25307,
                36790: 25484,
                36791: 25463,
                36792: 26119,
                36793: 26124,
                36794: 26157,
                36795: 26230,
                36796: 26494,
                36797: 26786,
                36798: 27167,
                36799: 27189,
                36800: 27836,
                36801: 28040,
                36802: 28169,
                36803: 28248,
                36804: 28988,
                36805: 28966,
                36806: 29031,
                36807: 30151,
                36808: 30465,
                36809: 30813,
                36810: 30977,
                36811: 31077,
                36812: 31216,
                36813: 31456,
                36814: 31505,
                36815: 31911,
                36816: 32057,
                36817: 32918,
                36818: 33750,
                36819: 33931,
                36820: 34121,
                36821: 34909,
                36822: 35059,
                36823: 35359,
                36824: 35388,
                36825: 35412,
                36826: 35443,
                36827: 35937,
                36828: 36062,
                36829: 37284,
                36830: 37478,
                36831: 37758,
                36832: 37912,
                36833: 38556,
                36834: 38808,
                36835: 19978,
                36836: 19976,
                36837: 19998,
                36838: 20055,
                36839: 20887,
                36840: 21104,
                36841: 22478,
                36842: 22580,
                36843: 22732,
                36844: 23330,
                36845: 24120,
                36846: 24773,
                36847: 25854,
                36848: 26465,
                36849: 26454,
                36850: 27972,
                36851: 29366,
                36852: 30067,
                36853: 31331,
                36854: 33976,
                36855: 35698,
                36856: 37304,
                36857: 37664,
                36858: 22065,
                36859: 22516,
                36860: 39166,
                36928: 25325,
                36929: 26893,
                36930: 27542,
                36931: 29165,
                36932: 32340,
                36933: 32887,
                36934: 33394,
                36935: 35302,
                36936: 39135,
                36937: 34645,
                36938: 36785,
                36939: 23611,
                36940: 20280,
                36941: 20449,
                36942: 20405,
                36943: 21767,
                36944: 23072,
                36945: 23517,
                36946: 23529,
                36947: 24515,
                36948: 24910,
                36949: 25391,
                36950: 26032,
                36951: 26187,
                36952: 26862,
                36953: 27035,
                36954: 28024,
                36955: 28145,
                36956: 30003,
                36957: 30137,
                36958: 30495,
                36959: 31070,
                36960: 31206,
                36961: 32051,
                36962: 33251,
                36963: 33455,
                36964: 34218,
                36965: 35242,
                36966: 35386,
                36967: 36523,
                36968: 36763,
                36969: 36914,
                36970: 37341,
                36971: 38663,
                36972: 20154,
                36973: 20161,
                36974: 20995,
                36975: 22645,
                36976: 22764,
                36977: 23563,
                36978: 29978,
                36979: 23613,
                36980: 33102,
                36981: 35338,
                36982: 36805,
                36983: 38499,
                36984: 38765,
                36985: 31525,
                36986: 35535,
                36987: 38920,
                36988: 37218,
                36989: 22259,
                36990: 21416,
                36992: 36887,
                36993: 21561,
                36994: 22402,
                36995: 24101,
                36996: 25512,
                36997: 27700,
                36998: 28810,
                36999: 30561,
                37e3: 31883,
                37001: 32736,
                37002: 34928,
                37003: 36930,
                37004: 37204,
                37005: 37648,
                37006: 37656,
                37007: 38543,
                37008: 29790,
                37009: 39620,
                37010: 23815,
                37011: 23913,
                37012: 25968,
                37013: 26530,
                37014: 36264,
                37015: 38619,
                37016: 25454,
                37017: 26441,
                37018: 26905,
                37019: 33733,
                37020: 38935,
                37021: 38592,
                37022: 35070,
                37023: 28548,
                37024: 25722,
                37025: 23544,
                37026: 19990,
                37027: 28716,
                37028: 30045,
                37029: 26159,
                37030: 20932,
                37031: 21046,
                37032: 21218,
                37033: 22995,
                37034: 24449,
                37035: 24615,
                37036: 25104,
                37037: 25919,
                37038: 25972,
                37039: 26143,
                37040: 26228,
                37041: 26866,
                37042: 26646,
                37043: 27491,
                37044: 28165,
                37045: 29298,
                37046: 29983,
                37047: 30427,
                37048: 31934,
                37049: 32854,
                37050: 22768,
                37051: 35069,
                37052: 35199,
                37053: 35488,
                37054: 35475,
                37055: 35531,
                37056: 36893,
                37057: 37266,
                37058: 38738,
                37059: 38745,
                37060: 25993,
                37061: 31246,
                37062: 33030,
                37063: 38587,
                37064: 24109,
                37065: 24796,
                37066: 25114,
                37067: 26021,
                37068: 26132,
                37069: 26512,
                37070: 30707,
                37071: 31309,
                37072: 31821,
                37073: 32318,
                37074: 33034,
                37075: 36012,
                37076: 36196,
                37077: 36321,
                37078: 36447,
                37079: 30889,
                37080: 20999,
                37081: 25305,
                37082: 25509,
                37083: 25666,
                37084: 25240,
                37085: 35373,
                37086: 31363,
                37087: 31680,
                37088: 35500,
                37089: 38634,
                37090: 32118,
                37091: 33292,
                37092: 34633,
                37093: 20185,
                37094: 20808,
                37095: 21315,
                37096: 21344,
                37097: 23459,
                37098: 23554,
                37099: 23574,
                37100: 24029,
                37101: 25126,
                37102: 25159,
                37103: 25776,
                37104: 26643,
                37105: 26676,
                37106: 27849,
                37107: 27973,
                37108: 27927,
                37109: 26579,
                37110: 28508,
                37111: 29006,
                37112: 29053,
                37113: 26059,
                37114: 31359,
                37115: 31661,
                37116: 32218,
                37184: 32330,
                37185: 32680,
                37186: 33146,
                37187: 33307,
                37188: 33337,
                37189: 34214,
                37190: 35438,
                37191: 36046,
                37192: 36341,
                37193: 36984,
                37194: 36983,
                37195: 37549,
                37196: 37521,
                37197: 38275,
                37198: 39854,
                37199: 21069,
                37200: 21892,
                37201: 28472,
                37202: 28982,
                37203: 20840,
                37204: 31109,
                37205: 32341,
                37206: 33203,
                37207: 31950,
                37208: 22092,
                37209: 22609,
                37210: 23720,
                37211: 25514,
                37212: 26366,
                37213: 26365,
                37214: 26970,
                37215: 29401,
                37216: 30095,
                37217: 30094,
                37218: 30990,
                37219: 31062,
                37220: 31199,
                37221: 31895,
                37222: 32032,
                37223: 32068,
                37224: 34311,
                37225: 35380,
                37226: 38459,
                37227: 36961,
                37228: 40736,
                37229: 20711,
                37230: 21109,
                37231: 21452,
                37232: 21474,
                37233: 20489,
                37234: 21930,
                37235: 22766,
                37236: 22863,
                37237: 29245,
                37238: 23435,
                37239: 23652,
                37240: 21277,
                37241: 24803,
                37242: 24819,
                37243: 25436,
                37244: 25475,
                37245: 25407,
                37246: 25531,
                37248: 25805,
                37249: 26089,
                37250: 26361,
                37251: 24035,
                37252: 27085,
                37253: 27133,
                37254: 28437,
                37255: 29157,
                37256: 20105,
                37257: 30185,
                37258: 30456,
                37259: 31379,
                37260: 31967,
                37261: 32207,
                37262: 32156,
                37263: 32865,
                37264: 33609,
                37265: 33624,
                37266: 33900,
                37267: 33980,
                37268: 34299,
                37269: 35013,
                37270: 36208,
                37271: 36865,
                37272: 36973,
                37273: 37783,
                37274: 38684,
                37275: 39442,
                37276: 20687,
                37277: 22679,
                37278: 24974,
                37279: 33235,
                37280: 34101,
                37281: 36104,
                37282: 36896,
                37283: 20419,
                37284: 20596,
                37285: 21063,
                37286: 21363,
                37287: 24687,
                37288: 25417,
                37289: 26463,
                37290: 28204,
                37291: 36275,
                37292: 36895,
                37293: 20439,
                37294: 23646,
                37295: 36042,
                37296: 26063,
                37297: 32154,
                37298: 21330,
                37299: 34966,
                37300: 20854,
                37301: 25539,
                37302: 23384,
                37303: 23403,
                37304: 23562,
                37305: 25613,
                37306: 26449,
                37307: 36956,
                37308: 20182,
                37309: 22810,
                37310: 22826,
                37311: 27760,
                37312: 35409,
                37313: 21822,
                37314: 22549,
                37315: 22949,
                37316: 24816,
                37317: 25171,
                37318: 26561,
                37319: 33333,
                37320: 26965,
                37321: 38464,
                37322: 39364,
                37323: 39464,
                37324: 20307,
                37325: 22534,
                37326: 23550,
                37327: 32784,
                37328: 23729,
                37329: 24111,
                37330: 24453,
                37331: 24608,
                37332: 24907,
                37333: 25140,
                37334: 26367,
                37335: 27888,
                37336: 28382,
                37337: 32974,
                37338: 33151,
                37339: 33492,
                37340: 34955,
                37341: 36024,
                37342: 36864,
                37343: 36910,
                37344: 38538,
                37345: 40667,
                37346: 39899,
                37347: 20195,
                37348: 21488,
                37349: 22823,
                37350: 31532,
                37351: 37261,
                37352: 38988,
                37353: 40441,
                37354: 28381,
                37355: 28711,
                37356: 21331,
                37357: 21828,
                37358: 23429,
                37359: 25176,
                37360: 25246,
                37361: 25299,
                37362: 27810,
                37363: 28655,
                37364: 29730,
                37365: 35351,
                37366: 37944,
                37367: 28609,
                37368: 35582,
                37369: 33592,
                37370: 20967,
                37371: 34552,
                37372: 21482,
                37440: 21481,
                37441: 20294,
                37442: 36948,
                37443: 36784,
                37444: 22890,
                37445: 33073,
                37446: 24061,
                37447: 31466,
                37448: 36799,
                37449: 26842,
                37450: 35895,
                37451: 29432,
                37452: 40008,
                37453: 27197,
                37454: 35504,
                37455: 20025,
                37456: 21336,
                37457: 22022,
                37458: 22374,
                37459: 25285,
                37460: 25506,
                37461: 26086,
                37462: 27470,
                37463: 28129,
                37464: 28251,
                37465: 28845,
                37466: 30701,
                37467: 31471,
                37468: 31658,
                37469: 32187,
                37470: 32829,
                37471: 32966,
                37472: 34507,
                37473: 35477,
                37474: 37723,
                37475: 22243,
                37476: 22727,
                37477: 24382,
                37478: 26029,
                37479: 26262,
                37480: 27264,
                37481: 27573,
                37482: 30007,
                37483: 35527,
                37484: 20516,
                37485: 30693,
                37486: 22320,
                37487: 24347,
                37488: 24677,
                37489: 26234,
                37490: 27744,
                37491: 30196,
                37492: 31258,
                37493: 32622,
                37494: 33268,
                37495: 34584,
                37496: 36933,
                37497: 39347,
                37498: 31689,
                37499: 30044,
                37500: 31481,
                37501: 31569,
                37502: 33988,
                37504: 36880,
                37505: 31209,
                37506: 31378,
                37507: 33590,
                37508: 23265,
                37509: 30528,
                37510: 20013,
                37511: 20210,
                37512: 23449,
                37513: 24544,
                37514: 25277,
                37515: 26172,
                37516: 26609,
                37517: 27880,
                37518: 34411,
                37519: 34935,
                37520: 35387,
                37521: 37198,
                37522: 37619,
                37523: 39376,
                37524: 27159,
                37525: 28710,
                37526: 29482,
                37527: 33511,
                37528: 33879,
                37529: 36015,
                37530: 19969,
                37531: 20806,
                37532: 20939,
                37533: 21899,
                37534: 23541,
                37535: 24086,
                37536: 24115,
                37537: 24193,
                37538: 24340,
                37539: 24373,
                37540: 24427,
                37541: 24500,
                37542: 25074,
                37543: 25361,
                37544: 26274,
                37545: 26397,
                37546: 28526,
                37547: 29266,
                37548: 30010,
                37549: 30522,
                37550: 32884,
                37551: 33081,
                37552: 33144,
                37553: 34678,
                37554: 35519,
                37555: 35548,
                37556: 36229,
                37557: 36339,
                37558: 37530,
                37559: 38263,
                37560: 38914,
                37561: 40165,
                37562: 21189,
                37563: 25431,
                37564: 30452,
                37565: 26389,
                37566: 27784,
                37567: 29645,
                37568: 36035,
                37569: 37806,
                37570: 38515,
                37571: 27941,
                37572: 22684,
                37573: 26894,
                37574: 27084,
                37575: 36861,
                37576: 37786,
                37577: 30171,
                37578: 36890,
                37579: 22618,
                37580: 26626,
                37581: 25524,
                37582: 27131,
                37583: 20291,
                37584: 28460,
                37585: 26584,
                37586: 36795,
                37587: 34086,
                37588: 32180,
                37589: 37716,
                37590: 26943,
                37591: 28528,
                37592: 22378,
                37593: 22775,
                37594: 23340,
                37595: 32044,
                37596: 29226,
                37597: 21514,
                37598: 37347,
                37599: 40372,
                37600: 20141,
                37601: 20302,
                37602: 20572,
                37603: 20597,
                37604: 21059,
                37605: 35998,
                37606: 21576,
                37607: 22564,
                37608: 23450,
                37609: 24093,
                37610: 24213,
                37611: 24237,
                37612: 24311,
                37613: 24351,
                37614: 24716,
                37615: 25269,
                37616: 25402,
                37617: 25552,
                37618: 26799,
                37619: 27712,
                37620: 30855,
                37621: 31118,
                37622: 31243,
                37623: 32224,
                37624: 33351,
                37625: 35330,
                37626: 35558,
                37627: 36420,
                37628: 36883,
                37696: 37048,
                37697: 37165,
                37698: 37336,
                37699: 40718,
                37700: 27877,
                37701: 25688,
                37702: 25826,
                37703: 25973,
                37704: 28404,
                37705: 30340,
                37706: 31515,
                37707: 36969,
                37708: 37841,
                37709: 28346,
                37710: 21746,
                37711: 24505,
                37712: 25764,
                37713: 36685,
                37714: 36845,
                37715: 37444,
                37716: 20856,
                37717: 22635,
                37718: 22825,
                37719: 23637,
                37720: 24215,
                37721: 28155,
                37722: 32399,
                37723: 29980,
                37724: 36028,
                37725: 36578,
                37726: 39003,
                37727: 28857,
                37728: 20253,
                37729: 27583,
                37730: 28593,
                37731: 3e4,
                37732: 38651,
                37733: 20814,
                37734: 21520,
                37735: 22581,
                37736: 22615,
                37737: 22956,
                37738: 23648,
                37739: 24466,
                37740: 26007,
                37741: 26460,
                37742: 28193,
                37743: 30331,
                37744: 33759,
                37745: 36077,
                37746: 36884,
                37747: 37117,
                37748: 37709,
                37749: 30757,
                37750: 30778,
                37751: 21162,
                37752: 24230,
                37753: 22303,
                37754: 22900,
                37755: 24594,
                37756: 20498,
                37757: 20826,
                37758: 20908,
                37760: 20941,
                37761: 20992,
                37762: 21776,
                37763: 22612,
                37764: 22616,
                37765: 22871,
                37766: 23445,
                37767: 23798,
                37768: 23947,
                37769: 24764,
                37770: 25237,
                37771: 25645,
                37772: 26481,
                37773: 26691,
                37774: 26812,
                37775: 26847,
                37776: 30423,
                37777: 28120,
                37778: 28271,
                37779: 28059,
                37780: 28783,
                37781: 29128,
                37782: 24403,
                37783: 30168,
                37784: 31095,
                37785: 31561,
                37786: 31572,
                37787: 31570,
                37788: 31958,
                37789: 32113,
                37790: 21040,
                37791: 33891,
                37792: 34153,
                37793: 34276,
                37794: 35342,
                37795: 35588,
                37796: 35910,
                37797: 36367,
                37798: 36867,
                37799: 36879,
                37800: 37913,
                37801: 38518,
                37802: 38957,
                37803: 39472,
                37804: 38360,
                37805: 20685,
                37806: 21205,
                37807: 21516,
                37808: 22530,
                37809: 23566,
                37810: 24999,
                37811: 25758,
                37812: 27934,
                37813: 30643,
                37814: 31461,
                37815: 33012,
                37816: 33796,
                37817: 36947,
                37818: 37509,
                37819: 23776,
                37820: 40199,
                37821: 21311,
                37822: 24471,
                37823: 24499,
                37824: 28060,
                37825: 29305,
                37826: 30563,
                37827: 31167,
                37828: 31716,
                37829: 27602,
                37830: 29420,
                37831: 35501,
                37832: 26627,
                37833: 27233,
                37834: 20984,
                37835: 31361,
                37836: 26932,
                37837: 23626,
                37838: 40182,
                37839: 33515,
                37840: 23493,
                37841: 37193,
                37842: 28702,
                37843: 22136,
                37844: 23663,
                37845: 24775,
                37846: 25958,
                37847: 27788,
                37848: 35930,
                37849: 36929,
                37850: 38931,
                37851: 21585,
                37852: 26311,
                37853: 37389,
                37854: 22856,
                37855: 37027,
                37856: 20869,
                37857: 20045,
                37858: 20970,
                37859: 34201,
                37860: 35598,
                37861: 28760,
                37862: 25466,
                37863: 37707,
                37864: 26978,
                37865: 39348,
                37866: 32260,
                37867: 30071,
                37868: 21335,
                37869: 26976,
                37870: 36575,
                37871: 38627,
                37872: 27741,
                37873: 20108,
                37874: 23612,
                37875: 24336,
                37876: 36841,
                37877: 21250,
                37878: 36049,
                37879: 32905,
                37880: 34425,
                37881: 24319,
                37882: 26085,
                37883: 20083,
                37884: 20837,
                37952: 22914,
                37953: 23615,
                37954: 38894,
                37955: 20219,
                37956: 22922,
                37957: 24525,
                37958: 35469,
                37959: 28641,
                37960: 31152,
                37961: 31074,
                37962: 23527,
                37963: 33905,
                37964: 29483,
                37965: 29105,
                37966: 24180,
                37967: 24565,
                37968: 25467,
                37969: 25754,
                37970: 29123,
                37971: 31896,
                37972: 20035,
                37973: 24316,
                37974: 20043,
                37975: 22492,
                37976: 22178,
                37977: 24745,
                37978: 28611,
                37979: 32013,
                37980: 33021,
                37981: 33075,
                37982: 33215,
                37983: 36786,
                37984: 35223,
                37985: 34468,
                37986: 24052,
                37987: 25226,
                37988: 25773,
                37989: 35207,
                37990: 26487,
                37991: 27874,
                37992: 27966,
                37993: 29750,
                37994: 30772,
                37995: 23110,
                37996: 32629,
                37997: 33453,
                37998: 39340,
                37999: 20467,
                38e3: 24259,
                38001: 25309,
                38002: 25490,
                38003: 25943,
                38004: 26479,
                38005: 30403,
                38006: 29260,
                38007: 32972,
                38008: 32954,
                38009: 36649,
                38010: 37197,
                38011: 20493,
                38012: 22521,
                38013: 23186,
                38014: 26757,
                38016: 26995,
                38017: 29028,
                38018: 29437,
                38019: 36023,
                38020: 22770,
                38021: 36064,
                38022: 38506,
                38023: 36889,
                38024: 34687,
                38025: 31204,
                38026: 30695,
                38027: 33833,
                38028: 20271,
                38029: 21093,
                38030: 21338,
                38031: 25293,
                38032: 26575,
                38033: 27850,
                38034: 30333,
                38035: 31636,
                38036: 31893,
                38037: 33334,
                38038: 34180,
                38039: 36843,
                38040: 26333,
                38041: 28448,
                38042: 29190,
                38043: 32283,
                38044: 33707,
                38045: 39361,
                38046: 40614,
                38047: 20989,
                38048: 31665,
                38049: 30834,
                38050: 31672,
                38051: 32903,
                38052: 31560,
                38053: 27368,
                38054: 24161,
                38055: 32908,
                38056: 30033,
                38057: 30048,
                38058: 20843,
                38059: 37474,
                38060: 28300,
                38061: 30330,
                38062: 37271,
                38063: 39658,
                38064: 20240,
                38065: 32624,
                38066: 25244,
                38067: 31567,
                38068: 38309,
                38069: 40169,
                38070: 22138,
                38071: 22617,
                38072: 34532,
                38073: 38588,
                38074: 20276,
                38075: 21028,
                38076: 21322,
                38077: 21453,
                38078: 21467,
                38079: 24070,
                38080: 25644,
                38081: 26001,
                38082: 26495,
                38083: 27710,
                38084: 27726,
                38085: 29256,
                38086: 29359,
                38087: 29677,
                38088: 30036,
                38089: 32321,
                38090: 33324,
                38091: 34281,
                38092: 36009,
                38093: 31684,
                38094: 37318,
                38095: 29033,
                38096: 38930,
                38097: 39151,
                38098: 25405,
                38099: 26217,
                38100: 30058,
                38101: 30436,
                38102: 30928,
                38103: 34115,
                38104: 34542,
                38105: 21290,
                38106: 21329,
                38107: 21542,
                38108: 22915,
                38109: 24199,
                38110: 24444,
                38111: 24754,
                38112: 25161,
                38113: 25209,
                38114: 25259,
                38115: 26e3,
                38116: 27604,
                38117: 27852,
                38118: 30130,
                38119: 30382,
                38120: 30865,
                38121: 31192,
                38122: 32203,
                38123: 32631,
                38124: 32933,
                38125: 34987,
                38126: 35513,
                38127: 36027,
                38128: 36991,
                38129: 38750,
                38130: 39131,
                38131: 27147,
                38132: 31800,
                38133: 20633,
                38134: 23614,
                38135: 24494,
                38136: 26503,
                38137: 27608,
                38138: 29749,
                38139: 30473,
                38140: 32654,
                38208: 40763,
                38209: 26570,
                38210: 31255,
                38211: 21305,
                38212: 30091,
                38213: 39661,
                38214: 24422,
                38215: 33181,
                38216: 33777,
                38217: 32920,
                38218: 24380,
                38219: 24517,
                38220: 30050,
                38221: 31558,
                38222: 36924,
                38223: 26727,
                38224: 23019,
                38225: 23195,
                38226: 32016,
                38227: 30334,
                38228: 35628,
                38229: 20469,
                38230: 24426,
                38231: 27161,
                38232: 27703,
                38233: 28418,
                38234: 29922,
                38235: 31080,
                38236: 34920,
                38237: 35413,
                38238: 35961,
                38239: 24287,
                38240: 25551,
                38241: 30149,
                38242: 31186,
                38243: 33495,
                38244: 37672,
                38245: 37618,
                38246: 33948,
                38247: 34541,
                38248: 39981,
                38249: 21697,
                38250: 24428,
                38251: 25996,
                38252: 27996,
                38253: 28693,
                38254: 36007,
                38255: 36051,
                38256: 38971,
                38257: 25935,
                38258: 29942,
                38259: 19981,
                38260: 20184,
                38261: 22496,
                38262: 22827,
                38263: 23142,
                38264: 23500,
                38265: 20904,
                38266: 24067,
                38267: 24220,
                38268: 24598,
                38269: 25206,
                38270: 25975,
                38272: 26023,
                38273: 26222,
                38274: 28014,
                38275: 29238,
                38276: 31526,
                38277: 33104,
                38278: 33178,
                38279: 33433,
                38280: 35676,
                38281: 36e3,
                38282: 36070,
                38283: 36212,
                38284: 38428,
                38285: 38468,
                38286: 20398,
                38287: 25771,
                38288: 27494,
                38289: 33310,
                38290: 33889,
                38291: 34154,
                38292: 37096,
                38293: 23553,
                38294: 26963,
                38295: 39080,
                38296: 33914,
                38297: 34135,
                38298: 20239,
                38299: 21103,
                38300: 24489,
                38301: 24133,
                38302: 26381,
                38303: 31119,
                38304: 33145,
                38305: 35079,
                38306: 35206,
                38307: 28149,
                38308: 24343,
                38309: 25173,
                38310: 27832,
                38311: 20175,
                38312: 29289,
                38313: 39826,
                38314: 20998,
                38315: 21563,
                38316: 22132,
                38317: 22707,
                38318: 24996,
                38319: 25198,
                38320: 28954,
                38321: 22894,
                38322: 31881,
                38323: 31966,
                38324: 32027,
                38325: 38640,
                38326: 25991,
                38327: 32862,
                38328: 19993,
                38329: 20341,
                38330: 20853,
                38331: 22592,
                38332: 24163,
                38333: 24179,
                38334: 24330,
                38335: 26564,
                38336: 20006,
                38337: 34109,
                38338: 38281,
                38339: 38491,
                38340: 31859,
                38341: 38913,
                38342: 20731,
                38343: 22721,
                38344: 30294,
                38345: 30887,
                38346: 21029,
                38347: 30629,
                38348: 34065,
                38349: 31622,
                38350: 20559,
                38351: 22793,
                38352: 29255,
                38353: 31687,
                38354: 32232,
                38355: 36794,
                38356: 36820,
                38357: 36941,
                38358: 20415,
                38359: 21193,
                38360: 23081,
                38361: 24321,
                38362: 38829,
                38363: 20445,
                38364: 33303,
                38365: 37610,
                38366: 22275,
                38367: 25429,
                38368: 27497,
                38369: 29995,
                38370: 35036,
                38371: 36628,
                38372: 31298,
                38373: 21215,
                38374: 22675,
                38375: 24917,
                38376: 25098,
                38377: 26286,
                38378: 27597,
                38379: 31807,
                38380: 33769,
                38381: 20515,
                38382: 20472,
                38383: 21253,
                38384: 21574,
                38385: 22577,
                38386: 22857,
                38387: 23453,
                38388: 23792,
                38389: 23791,
                38390: 23849,
                38391: 24214,
                38392: 25265,
                38393: 25447,
                38394: 25918,
                38395: 26041,
                38396: 26379,
                38464: 27861,
                38465: 27873,
                38466: 28921,
                38467: 30770,
                38468: 32299,
                38469: 32990,
                38470: 33459,
                38471: 33804,
                38472: 34028,
                38473: 34562,
                38474: 35090,
                38475: 35370,
                38476: 35914,
                38477: 37030,
                38478: 37586,
                38479: 39165,
                38480: 40179,
                38481: 40300,
                38482: 20047,
                38483: 20129,
                38484: 20621,
                38485: 21078,
                38486: 22346,
                38487: 22952,
                38488: 24125,
                38489: 24536,
                38490: 24537,
                38491: 25151,
                38492: 26292,
                38493: 26395,
                38494: 26576,
                38495: 26834,
                38496: 20882,
                38497: 32033,
                38498: 32938,
                38499: 33192,
                38500: 35584,
                38501: 35980,
                38502: 36031,
                38503: 37502,
                38504: 38450,
                38505: 21536,
                38506: 38956,
                38507: 21271,
                38508: 20693,
                38509: 21340,
                38510: 22696,
                38511: 25778,
                38512: 26420,
                38513: 29287,
                38514: 30566,
                38515: 31302,
                38516: 37350,
                38517: 21187,
                38518: 27809,
                38519: 27526,
                38520: 22528,
                38521: 24140,
                38522: 22868,
                38523: 26412,
                38524: 32763,
                38525: 20961,
                38526: 30406,
                38528: 25705,
                38529: 30952,
                38530: 39764,
                38531: 40635,
                38532: 22475,
                38533: 22969,
                38534: 26151,
                38535: 26522,
                38536: 27598,
                38537: 21737,
                38538: 27097,
                38539: 24149,
                38540: 33180,
                38541: 26517,
                38542: 39850,
                38543: 26622,
                38544: 40018,
                38545: 26717,
                38546: 20134,
                38547: 20451,
                38548: 21448,
                38549: 25273,
                38550: 26411,
                38551: 27819,
                38552: 36804,
                38553: 20397,
                38554: 32365,
                38555: 40639,
                38556: 19975,
                38557: 24930,
                38558: 28288,
                38559: 28459,
                38560: 34067,
                38561: 21619,
                38562: 26410,
                38563: 39749,
                38564: 24051,
                38565: 31637,
                38566: 23724,
                38567: 23494,
                38568: 34588,
                38569: 28234,
                38570: 34001,
                38571: 31252,
                38572: 33032,
                38573: 22937,
                38574: 31885,
                38575: 27665,
                38576: 30496,
                38577: 21209,
                38578: 22818,
                38579: 28961,
                38580: 29279,
                38581: 30683,
                38582: 38695,
                38583: 40289,
                38584: 26891,
                38585: 23167,
                38586: 23064,
                38587: 20901,
                38588: 21517,
                38589: 21629,
                38590: 26126,
                38591: 30431,
                38592: 36855,
                38593: 37528,
                38594: 40180,
                38595: 23018,
                38596: 29277,
                38597: 28357,
                38598: 20813,
                38599: 26825,
                38600: 32191,
                38601: 32236,
                38602: 38754,
                38603: 40634,
                38604: 25720,
                38605: 27169,
                38606: 33538,
                38607: 22916,
                38608: 23391,
                38609: 27611,
                38610: 29467,
                38611: 30450,
                38612: 32178,
                38613: 32791,
                38614: 33945,
                38615: 20786,
                38616: 26408,
                38617: 40665,
                38618: 30446,
                38619: 26466,
                38620: 21247,
                38621: 39173,
                38622: 23588,
                38623: 25147,
                38624: 31870,
                38625: 36016,
                38626: 21839,
                38627: 24758,
                38628: 32011,
                38629: 38272,
                38630: 21249,
                38631: 20063,
                38632: 20918,
                38633: 22812,
                38634: 29242,
                38635: 32822,
                38636: 37326,
                38637: 24357,
                38638: 30690,
                38639: 21380,
                38640: 24441,
                38641: 32004,
                38642: 34220,
                38643: 35379,
                38644: 36493,
                38645: 38742,
                38646: 26611,
                38647: 34222,
                38648: 37971,
                38649: 24841,
                38650: 24840,
                38651: 27833,
                38652: 30290,
                38720: 35565,
                38721: 36664,
                38722: 21807,
                38723: 20305,
                38724: 20778,
                38725: 21191,
                38726: 21451,
                38727: 23461,
                38728: 24189,
                38729: 24736,
                38730: 24962,
                38731: 25558,
                38732: 26377,
                38733: 26586,
                38734: 28263,
                38735: 28044,
                38736: 29494,
                38737: 29495,
                38738: 30001,
                38739: 31056,
                38740: 35029,
                38741: 35480,
                38742: 36938,
                38743: 37009,
                38744: 37109,
                38745: 38596,
                38746: 34701,
                38747: 22805,
                38748: 20104,
                38749: 20313,
                38750: 19982,
                38751: 35465,
                38752: 36671,
                38753: 38928,
                38754: 20653,
                38755: 24188,
                38756: 22934,
                38757: 23481,
                38758: 24248,
                38759: 25562,
                38760: 25594,
                38761: 25793,
                38762: 26332,
                38763: 26954,
                38764: 27096,
                38765: 27915,
                38766: 28342,
                38767: 29076,
                38768: 29992,
                38769: 31407,
                38770: 32650,
                38771: 32768,
                38772: 33865,
                38773: 33993,
                38774: 35201,
                38775: 35617,
                38776: 36362,
                38777: 36965,
                38778: 38525,
                38779: 39178,
                38780: 24958,
                38781: 25233,
                38782: 27442,
                38784: 27779,
                38785: 28020,
                38786: 32716,
                38787: 32764,
                38788: 28096,
                38789: 32645,
                38790: 34746,
                38791: 35064,
                38792: 26469,
                38793: 33713,
                38794: 38972,
                38795: 38647,
                38796: 27931,
                38797: 32097,
                38798: 33853,
                38799: 37226,
                38800: 20081,
                38801: 21365,
                38802: 23888,
                38803: 27396,
                38804: 28651,
                38805: 34253,
                38806: 34349,
                38807: 35239,
                38808: 21033,
                38809: 21519,
                38810: 23653,
                38811: 26446,
                38812: 26792,
                38813: 29702,
                38814: 29827,
                38815: 30178,
                38816: 35023,
                38817: 35041,
                38818: 37324,
                38819: 38626,
                38820: 38520,
                38821: 24459,
                38822: 29575,
                38823: 31435,
                38824: 33870,
                38825: 25504,
                38826: 30053,
                38827: 21129,
                38828: 27969,
                38829: 28316,
                38830: 29705,
                38831: 30041,
                38832: 30827,
                38833: 31890,
                38834: 38534,
                38835: 31452,
                38836: 40845,
                38837: 20406,
                38838: 24942,
                38839: 26053,
                38840: 34396,
                38841: 20102,
                38842: 20142,
                38843: 20698,
                38844: 20001,
                38845: 20940,
                38846: 23534,
                38847: 26009,
                38848: 26753,
                38849: 28092,
                38850: 29471,
                38851: 30274,
                38852: 30637,
                38853: 31260,
                38854: 31975,
                38855: 33391,
                38856: 35538,
                38857: 36988,
                38858: 37327,
                38859: 38517,
                38860: 38936,
                38861: 21147,
                38862: 32209,
                38863: 20523,
                38864: 21400,
                38865: 26519,
                38866: 28107,
                38867: 29136,
                38868: 29747,
                38869: 33256,
                38870: 36650,
                38871: 38563,
                38872: 40023,
                38873: 40607,
                38874: 29792,
                38875: 22593,
                38876: 28057,
                38877: 32047,
                38878: 39006,
                38879: 20196,
                38880: 20278,
                38881: 20363,
                38882: 20919,
                38883: 21169,
                38884: 23994,
                38885: 24604,
                38886: 29618,
                38887: 31036,
                38888: 33491,
                38889: 37428,
                38890: 38583,
                38891: 38646,
                38892: 38666,
                38893: 40599,
                38894: 40802,
                38895: 26278,
                38896: 27508,
                38897: 21015,
                38898: 21155,
                38899: 28872,
                38900: 35010,
                38901: 24265,
                38902: 24651,
                38903: 24976,
                38904: 28451,
                38905: 29001,
                38906: 31806,
                38907: 32244,
                38908: 32879,
                38976: 34030,
                38977: 36899,
                38978: 37676,
                38979: 21570,
                38980: 39791,
                38981: 27347,
                38982: 28809,
                38983: 36034,
                38984: 36335,
                38985: 38706,
                38986: 21172,
                38987: 23105,
                38988: 24266,
                38989: 24324,
                38990: 26391,
                38991: 27004,
                38992: 27028,
                38993: 28010,
                38994: 28431,
                38995: 29282,
                38996: 29436,
                38997: 31725,
                38998: 32769,
                38999: 32894,
                39e3: 34635,
                39001: 37070,
                39002: 20845,
                39003: 40595,
                39004: 31108,
                39005: 32907,
                39006: 37682,
                39007: 35542,
                39008: 20525,
                39009: 21644,
                39010: 35441,
                39011: 27498,
                39012: 36036,
                39013: 33031,
                39014: 24785,
                39015: 26528,
                39016: 40434,
                39017: 20121,
                39018: 20120,
                39019: 39952,
                39020: 35435,
                39021: 34241,
                39022: 34152,
                39023: 26880,
                39024: 28286,
                39025: 30871,
                39026: 33109,
                39071: 24332,
                39072: 19984,
                39073: 19989,
                39074: 20010,
                39075: 20017,
                39076: 20022,
                39077: 20028,
                39078: 20031,
                39079: 20034,
                39080: 20054,
                39081: 20056,
                39082: 20098,
                39083: 20101,
                39084: 35947,
                39085: 20106,
                39086: 33298,
                39087: 24333,
                39088: 20110,
                39089: 20126,
                39090: 20127,
                39091: 20128,
                39092: 20130,
                39093: 20144,
                39094: 20147,
                39095: 20150,
                39096: 20174,
                39097: 20173,
                39098: 20164,
                39099: 20166,
                39100: 20162,
                39101: 20183,
                39102: 20190,
                39103: 20205,
                39104: 20191,
                39105: 20215,
                39106: 20233,
                39107: 20314,
                39108: 20272,
                39109: 20315,
                39110: 20317,
                39111: 20311,
                39112: 20295,
                39113: 20342,
                39114: 20360,
                39115: 20367,
                39116: 20376,
                39117: 20347,
                39118: 20329,
                39119: 20336,
                39120: 20369,
                39121: 20335,
                39122: 20358,
                39123: 20374,
                39124: 20760,
                39125: 20436,
                39126: 20447,
                39127: 20430,
                39128: 20440,
                39129: 20443,
                39130: 20433,
                39131: 20442,
                39132: 20432,
                39133: 20452,
                39134: 20453,
                39135: 20506,
                39136: 20520,
                39137: 20500,
                39138: 20522,
                39139: 20517,
                39140: 20485,
                39141: 20252,
                39142: 20470,
                39143: 20513,
                39144: 20521,
                39145: 20524,
                39146: 20478,
                39147: 20463,
                39148: 20497,
                39149: 20486,
                39150: 20547,
                39151: 20551,
                39152: 26371,
                39153: 20565,
                39154: 20560,
                39155: 20552,
                39156: 20570,
                39157: 20566,
                39158: 20588,
                39159: 20600,
                39160: 20608,
                39161: 20634,
                39162: 20613,
                39163: 20660,
                39164: 20658,
                39232: 20681,
                39233: 20682,
                39234: 20659,
                39235: 20674,
                39236: 20694,
                39237: 20702,
                39238: 20709,
                39239: 20717,
                39240: 20707,
                39241: 20718,
                39242: 20729,
                39243: 20725,
                39244: 20745,
                39245: 20737,
                39246: 20738,
                39247: 20758,
                39248: 20757,
                39249: 20756,
                39250: 20762,
                39251: 20769,
                39252: 20794,
                39253: 20791,
                39254: 20796,
                39255: 20795,
                39256: 20799,
                39257: 20800,
                39258: 20818,
                39259: 20812,
                39260: 20820,
                39261: 20834,
                39262: 31480,
                39263: 20841,
                39264: 20842,
                39265: 20846,
                39266: 20864,
                39267: 20866,
                39268: 22232,
                39269: 20876,
                39270: 20873,
                39271: 20879,
                39272: 20881,
                39273: 20883,
                39274: 20885,
                39275: 20886,
                39276: 20900,
                39277: 20902,
                39278: 20898,
                39279: 20905,
                39280: 20906,
                39281: 20907,
                39282: 20915,
                39283: 20913,
                39284: 20914,
                39285: 20912,
                39286: 20917,
                39287: 20925,
                39288: 20933,
                39289: 20937,
                39290: 20955,
                39291: 20960,
                39292: 34389,
                39293: 20969,
                39294: 20973,
                39296: 20976,
                39297: 20981,
                39298: 20990,
                39299: 20996,
                39300: 21003,
                39301: 21012,
                39302: 21006,
                39303: 21031,
                39304: 21034,
                39305: 21038,
                39306: 21043,
                39307: 21049,
                39308: 21071,
                39309: 21060,
                39310: 21067,
                39311: 21068,
                39312: 21086,
                39313: 21076,
                39314: 21098,
                39315: 21108,
                39316: 21097,
                39317: 21107,
                39318: 21119,
                39319: 21117,
                39320: 21133,
                39321: 21140,
                39322: 21138,
                39323: 21105,
                39324: 21128,
                39325: 21137,
                39326: 36776,
                39327: 36775,
                39328: 21164,
                39329: 21165,
                39330: 21180,
                39331: 21173,
                39332: 21185,
                39333: 21197,
                39334: 21207,
                39335: 21214,
                39336: 21219,
                39337: 21222,
                39338: 39149,
                39339: 21216,
                39340: 21235,
                39341: 21237,
                39342: 21240,
                39343: 21241,
                39344: 21254,
                39345: 21256,
                39346: 30008,
                39347: 21261,
                39348: 21264,
                39349: 21263,
                39350: 21269,
                39351: 21274,
                39352: 21283,
                39353: 21295,
                39354: 21297,
                39355: 21299,
                39356: 21304,
                39357: 21312,
                39358: 21318,
                39359: 21317,
                39360: 19991,
                39361: 21321,
                39362: 21325,
                39363: 20950,
                39364: 21342,
                39365: 21353,
                39366: 21358,
                39367: 22808,
                39368: 21371,
                39369: 21367,
                39370: 21378,
                39371: 21398,
                39372: 21408,
                39373: 21414,
                39374: 21413,
                39375: 21422,
                39376: 21424,
                39377: 21430,
                39378: 21443,
                39379: 31762,
                39380: 38617,
                39381: 21471,
                39382: 26364,
                39383: 29166,
                39384: 21486,
                39385: 21480,
                39386: 21485,
                39387: 21498,
                39388: 21505,
                39389: 21565,
                39390: 21568,
                39391: 21548,
                39392: 21549,
                39393: 21564,
                39394: 21550,
                39395: 21558,
                39396: 21545,
                39397: 21533,
                39398: 21582,
                39399: 21647,
                39400: 21621,
                39401: 21646,
                39402: 21599,
                39403: 21617,
                39404: 21623,
                39405: 21616,
                39406: 21650,
                39407: 21627,
                39408: 21632,
                39409: 21622,
                39410: 21636,
                39411: 21648,
                39412: 21638,
                39413: 21703,
                39414: 21666,
                39415: 21688,
                39416: 21669,
                39417: 21676,
                39418: 21700,
                39419: 21704,
                39420: 21672,
                39488: 21675,
                39489: 21698,
                39490: 21668,
                39491: 21694,
                39492: 21692,
                39493: 21720,
                39494: 21733,
                39495: 21734,
                39496: 21775,
                39497: 21780,
                39498: 21757,
                39499: 21742,
                39500: 21741,
                39501: 21754,
                39502: 21730,
                39503: 21817,
                39504: 21824,
                39505: 21859,
                39506: 21836,
                39507: 21806,
                39508: 21852,
                39509: 21829,
                39510: 21846,
                39511: 21847,
                39512: 21816,
                39513: 21811,
                39514: 21853,
                39515: 21913,
                39516: 21888,
                39517: 21679,
                39518: 21898,
                39519: 21919,
                39520: 21883,
                39521: 21886,
                39522: 21912,
                39523: 21918,
                39524: 21934,
                39525: 21884,
                39526: 21891,
                39527: 21929,
                39528: 21895,
                39529: 21928,
                39530: 21978,
                39531: 21957,
                39532: 21983,
                39533: 21956,
                39534: 21980,
                39535: 21988,
                39536: 21972,
                39537: 22036,
                39538: 22007,
                39539: 22038,
                39540: 22014,
                39541: 22013,
                39542: 22043,
                39543: 22009,
                39544: 22094,
                39545: 22096,
                39546: 29151,
                39547: 22068,
                39548: 22070,
                39549: 22066,
                39550: 22072,
                39552: 22123,
                39553: 22116,
                39554: 22063,
                39555: 22124,
                39556: 22122,
                39557: 22150,
                39558: 22144,
                39559: 22154,
                39560: 22176,
                39561: 22164,
                39562: 22159,
                39563: 22181,
                39564: 22190,
                39565: 22198,
                39566: 22196,
                39567: 22210,
                39568: 22204,
                39569: 22209,
                39570: 22211,
                39571: 22208,
                39572: 22216,
                39573: 22222,
                39574: 22225,
                39575: 22227,
                39576: 22231,
                39577: 22254,
                39578: 22265,
                39579: 22272,
                39580: 22271,
                39581: 22276,
                39582: 22281,
                39583: 22280,
                39584: 22283,
                39585: 22285,
                39586: 22291,
                39587: 22296,
                39588: 22294,
                39589: 21959,
                39590: 22300,
                39591: 22310,
                39592: 22327,
                39593: 22328,
                39594: 22350,
                39595: 22331,
                39596: 22336,
                39597: 22351,
                39598: 22377,
                39599: 22464,
                39600: 22408,
                39601: 22369,
                39602: 22399,
                39603: 22409,
                39604: 22419,
                39605: 22432,
                39606: 22451,
                39607: 22436,
                39608: 22442,
                39609: 22448,
                39610: 22467,
                39611: 22470,
                39612: 22484,
                39613: 22482,
                39614: 22483,
                39615: 22538,
                39616: 22486,
                39617: 22499,
                39618: 22539,
                39619: 22553,
                39620: 22557,
                39621: 22642,
                39622: 22561,
                39623: 22626,
                39624: 22603,
                39625: 22640,
                39626: 27584,
                39627: 22610,
                39628: 22589,
                39629: 22649,
                39630: 22661,
                39631: 22713,
                39632: 22687,
                39633: 22699,
                39634: 22714,
                39635: 22750,
                39636: 22715,
                39637: 22712,
                39638: 22702,
                39639: 22725,
                39640: 22739,
                39641: 22737,
                39642: 22743,
                39643: 22745,
                39644: 22744,
                39645: 22757,
                39646: 22748,
                39647: 22756,
                39648: 22751,
                39649: 22767,
                39650: 22778,
                39651: 22777,
                39652: 22779,
                39653: 22780,
                39654: 22781,
                39655: 22786,
                39656: 22794,
                39657: 22800,
                39658: 22811,
                39659: 26790,
                39660: 22821,
                39661: 22828,
                39662: 22829,
                39663: 22834,
                39664: 22840,
                39665: 22846,
                39666: 31442,
                39667: 22869,
                39668: 22864,
                39669: 22862,
                39670: 22874,
                39671: 22872,
                39672: 22882,
                39673: 22880,
                39674: 22887,
                39675: 22892,
                39676: 22889,
                39744: 22904,
                39745: 22913,
                39746: 22941,
                39747: 20318,
                39748: 20395,
                39749: 22947,
                39750: 22962,
                39751: 22982,
                39752: 23016,
                39753: 23004,
                39754: 22925,
                39755: 23001,
                39756: 23002,
                39757: 23077,
                39758: 23071,
                39759: 23057,
                39760: 23068,
                39761: 23049,
                39762: 23066,
                39763: 23104,
                39764: 23148,
                39765: 23113,
                39766: 23093,
                39767: 23094,
                39768: 23138,
                39769: 23146,
                39770: 23194,
                39771: 23228,
                39772: 23230,
                39773: 23243,
                39774: 23234,
                39775: 23229,
                39776: 23267,
                39777: 23255,
                39778: 23270,
                39779: 23273,
                39780: 23254,
                39781: 23290,
                39782: 23291,
                39783: 23308,
                39784: 23307,
                39785: 23318,
                39786: 23346,
                39787: 23248,
                39788: 23338,
                39789: 23350,
                39790: 23358,
                39791: 23363,
                39792: 23365,
                39793: 23360,
                39794: 23377,
                39795: 23381,
                39796: 23386,
                39797: 23387,
                39798: 23397,
                39799: 23401,
                39800: 23408,
                39801: 23411,
                39802: 23413,
                39803: 23416,
                39804: 25992,
                39805: 23418,
                39806: 23424,
                39808: 23427,
                39809: 23462,
                39810: 23480,
                39811: 23491,
                39812: 23495,
                39813: 23497,
                39814: 23508,
                39815: 23504,
                39816: 23524,
                39817: 23526,
                39818: 23522,
                39819: 23518,
                39820: 23525,
                39821: 23531,
                39822: 23536,
                39823: 23542,
                39824: 23539,
                39825: 23557,
                39826: 23559,
                39827: 23560,
                39828: 23565,
                39829: 23571,
                39830: 23584,
                39831: 23586,
                39832: 23592,
                39833: 23608,
                39834: 23609,
                39835: 23617,
                39836: 23622,
                39837: 23630,
                39838: 23635,
                39839: 23632,
                39840: 23631,
                39841: 23409,
                39842: 23660,
                39843: 23662,
                39844: 20066,
                39845: 23670,
                39846: 23673,
                39847: 23692,
                39848: 23697,
                39849: 23700,
                39850: 22939,
                39851: 23723,
                39852: 23739,
                39853: 23734,
                39854: 23740,
                39855: 23735,
                39856: 23749,
                39857: 23742,
                39858: 23751,
                39859: 23769,
                39860: 23785,
                39861: 23805,
                39862: 23802,
                39863: 23789,
                39864: 23948,
                39865: 23786,
                39866: 23819,
                39867: 23829,
                39868: 23831,
                39869: 23900,
                39870: 23839,
                39871: 23835,
                39872: 23825,
                39873: 23828,
                39874: 23842,
                39875: 23834,
                39876: 23833,
                39877: 23832,
                39878: 23884,
                39879: 23890,
                39880: 23886,
                39881: 23883,
                39882: 23916,
                39883: 23923,
                39884: 23926,
                39885: 23943,
                39886: 23940,
                39887: 23938,
                39888: 23970,
                39889: 23965,
                39890: 23980,
                39891: 23982,
                39892: 23997,
                39893: 23952,
                39894: 23991,
                39895: 23996,
                39896: 24009,
                39897: 24013,
                39898: 24019,
                39899: 24018,
                39900: 24022,
                39901: 24027,
                39902: 24043,
                39903: 24050,
                39904: 24053,
                39905: 24075,
                39906: 24090,
                39907: 24089,
                39908: 24081,
                39909: 24091,
                39910: 24118,
                39911: 24119,
                39912: 24132,
                39913: 24131,
                39914: 24128,
                39915: 24142,
                39916: 24151,
                39917: 24148,
                39918: 24159,
                39919: 24162,
                39920: 24164,
                39921: 24135,
                39922: 24181,
                39923: 24182,
                39924: 24186,
                39925: 40636,
                39926: 24191,
                39927: 24224,
                39928: 24257,
                39929: 24258,
                39930: 24264,
                39931: 24272,
                39932: 24271,
                4e4: 24278,
                40001: 24291,
                40002: 24285,
                40003: 24282,
                40004: 24283,
                40005: 24290,
                40006: 24289,
                40007: 24296,
                40008: 24297,
                40009: 24300,
                40010: 24305,
                40011: 24307,
                40012: 24304,
                40013: 24308,
                40014: 24312,
                40015: 24318,
                40016: 24323,
                40017: 24329,
                40018: 24413,
                40019: 24412,
                40020: 24331,
                40021: 24337,
                40022: 24342,
                40023: 24361,
                40024: 24365,
                40025: 24376,
                40026: 24385,
                40027: 24392,
                40028: 24396,
                40029: 24398,
                40030: 24367,
                40031: 24401,
                40032: 24406,
                40033: 24407,
                40034: 24409,
                40035: 24417,
                40036: 24429,
                40037: 24435,
                40038: 24439,
                40039: 24451,
                40040: 24450,
                40041: 24447,
                40042: 24458,
                40043: 24456,
                40044: 24465,
                40045: 24455,
                40046: 24478,
                40047: 24473,
                40048: 24472,
                40049: 24480,
                40050: 24488,
                40051: 24493,
                40052: 24508,
                40053: 24534,
                40054: 24571,
                40055: 24548,
                40056: 24568,
                40057: 24561,
                40058: 24541,
                40059: 24755,
                40060: 24575,
                40061: 24609,
                40062: 24672,
                40064: 24601,
                40065: 24592,
                40066: 24617,
                40067: 24590,
                40068: 24625,
                40069: 24603,
                40070: 24597,
                40071: 24619,
                40072: 24614,
                40073: 24591,
                40074: 24634,
                40075: 24666,
                40076: 24641,
                40077: 24682,
                40078: 24695,
                40079: 24671,
                40080: 24650,
                40081: 24646,
                40082: 24653,
                40083: 24675,
                40084: 24643,
                40085: 24676,
                40086: 24642,
                40087: 24684,
                40088: 24683,
                40089: 24665,
                40090: 24705,
                40091: 24717,
                40092: 24807,
                40093: 24707,
                40094: 24730,
                40095: 24708,
                40096: 24731,
                40097: 24726,
                40098: 24727,
                40099: 24722,
                40100: 24743,
                40101: 24715,
                40102: 24801,
                40103: 24760,
                40104: 24800,
                40105: 24787,
                40106: 24756,
                40107: 24560,
                40108: 24765,
                40109: 24774,
                40110: 24757,
                40111: 24792,
                40112: 24909,
                40113: 24853,
                40114: 24838,
                40115: 24822,
                40116: 24823,
                40117: 24832,
                40118: 24820,
                40119: 24826,
                40120: 24835,
                40121: 24865,
                40122: 24827,
                40123: 24817,
                40124: 24845,
                40125: 24846,
                40126: 24903,
                40127: 24894,
                40128: 24872,
                40129: 24871,
                40130: 24906,
                40131: 24895,
                40132: 24892,
                40133: 24876,
                40134: 24884,
                40135: 24893,
                40136: 24898,
                40137: 24900,
                40138: 24947,
                40139: 24951,
                40140: 24920,
                40141: 24921,
                40142: 24922,
                40143: 24939,
                40144: 24948,
                40145: 24943,
                40146: 24933,
                40147: 24945,
                40148: 24927,
                40149: 24925,
                40150: 24915,
                40151: 24949,
                40152: 24985,
                40153: 24982,
                40154: 24967,
                40155: 25004,
                40156: 24980,
                40157: 24986,
                40158: 24970,
                40159: 24977,
                40160: 25003,
                40161: 25006,
                40162: 25036,
                40163: 25034,
                40164: 25033,
                40165: 25079,
                40166: 25032,
                40167: 25027,
                40168: 25030,
                40169: 25018,
                40170: 25035,
                40171: 32633,
                40172: 25037,
                40173: 25062,
                40174: 25059,
                40175: 25078,
                40176: 25082,
                40177: 25076,
                40178: 25087,
                40179: 25085,
                40180: 25084,
                40181: 25086,
                40182: 25088,
                40183: 25096,
                40184: 25097,
                40185: 25101,
                40186: 25100,
                40187: 25108,
                40188: 25115,
                40256: 25118,
                40257: 25121,
                40258: 25130,
                40259: 25134,
                40260: 25136,
                40261: 25138,
                40262: 25139,
                40263: 25153,
                40264: 25166,
                40265: 25182,
                40266: 25187,
                40267: 25179,
                40268: 25184,
                40269: 25192,
                40270: 25212,
                40271: 25218,
                40272: 25225,
                40273: 25214,
                40274: 25234,
                40275: 25235,
                40276: 25238,
                40277: 25300,
                40278: 25219,
                40279: 25236,
                40280: 25303,
                40281: 25297,
                40282: 25275,
                40283: 25295,
                40284: 25343,
                40285: 25286,
                40286: 25812,
                40287: 25288,
                40288: 25308,
                40289: 25292,
                40290: 25290,
                40291: 25282,
                40292: 25287,
                40293: 25243,
                40294: 25289,
                40295: 25356,
                40296: 25326,
                40297: 25329,
                40298: 25383,
                40299: 25346,
                40300: 25352,
                40301: 25327,
                40302: 25333,
                40303: 25424,
                40304: 25406,
                40305: 25421,
                40306: 25628,
                40307: 25423,
                40308: 25494,
                40309: 25486,
                40310: 25472,
                40311: 25515,
                40312: 25462,
                40313: 25507,
                40314: 25487,
                40315: 25481,
                40316: 25503,
                40317: 25525,
                40318: 25451,
                40320: 25449,
                40321: 25534,
                40322: 25577,
                40323: 25536,
                40324: 25542,
                40325: 25571,
                40326: 25545,
                40327: 25554,
                40328: 25590,
                40329: 25540,
                40330: 25622,
                40331: 25652,
                40332: 25606,
                40333: 25619,
                40334: 25638,
                40335: 25654,
                40336: 25885,
                40337: 25623,
                40338: 25640,
                40339: 25615,
                40340: 25703,
                40341: 25711,
                40342: 25718,
                40343: 25678,
                40344: 25898,
                40345: 25749,
                40346: 25747,
                40347: 25765,
                40348: 25769,
                40349: 25736,
                40350: 25788,
                40351: 25818,
                40352: 25810,
                40353: 25797,
                40354: 25799,
                40355: 25787,
                40356: 25816,
                40357: 25794,
                40358: 25841,
                40359: 25831,
                40360: 33289,
                40361: 25824,
                40362: 25825,
                40363: 25260,
                40364: 25827,
                40365: 25839,
                40366: 25900,
                40367: 25846,
                40368: 25844,
                40369: 25842,
                40370: 25850,
                40371: 25856,
                40372: 25853,
                40373: 25880,
                40374: 25884,
                40375: 25861,
                40376: 25892,
                40377: 25891,
                40378: 25899,
                40379: 25908,
                40380: 25909,
                40381: 25911,
                40382: 25910,
                40383: 25912,
                40384: 30027,
                40385: 25928,
                40386: 25942,
                40387: 25941,
                40388: 25933,
                40389: 25944,
                40390: 25950,
                40391: 25949,
                40392: 25970,
                40393: 25976,
                40394: 25986,
                40395: 25987,
                40396: 35722,
                40397: 26011,
                40398: 26015,
                40399: 26027,
                40400: 26039,
                40401: 26051,
                40402: 26054,
                40403: 26049,
                40404: 26052,
                40405: 26060,
                40406: 26066,
                40407: 26075,
                40408: 26073,
                40409: 26080,
                40410: 26081,
                40411: 26097,
                40412: 26482,
                40413: 26122,
                40414: 26115,
                40415: 26107,
                40416: 26483,
                40417: 26165,
                40418: 26166,
                40419: 26164,
                40420: 26140,
                40421: 26191,
                40422: 26180,
                40423: 26185,
                40424: 26177,
                40425: 26206,
                40426: 26205,
                40427: 26212,
                40428: 26215,
                40429: 26216,
                40430: 26207,
                40431: 26210,
                40432: 26224,
                40433: 26243,
                40434: 26248,
                40435: 26254,
                40436: 26249,
                40437: 26244,
                40438: 26264,
                40439: 26269,
                40440: 26305,
                40441: 26297,
                40442: 26313,
                40443: 26302,
                40444: 26300,
                40512: 26308,
                40513: 26296,
                40514: 26326,
                40515: 26330,
                40516: 26336,
                40517: 26175,
                40518: 26342,
                40519: 26345,
                40520: 26352,
                40521: 26357,
                40522: 26359,
                40523: 26383,
                40524: 26390,
                40525: 26398,
                40526: 26406,
                40527: 26407,
                40528: 38712,
                40529: 26414,
                40530: 26431,
                40531: 26422,
                40532: 26433,
                40533: 26424,
                40534: 26423,
                40535: 26438,
                40536: 26462,
                40537: 26464,
                40538: 26457,
                40539: 26467,
                40540: 26468,
                40541: 26505,
                40542: 26480,
                40543: 26537,
                40544: 26492,
                40545: 26474,
                40546: 26508,
                40547: 26507,
                40548: 26534,
                40549: 26529,
                40550: 26501,
                40551: 26551,
                40552: 26607,
                40553: 26548,
                40554: 26604,
                40555: 26547,
                40556: 26601,
                40557: 26552,
                40558: 26596,
                40559: 26590,
                40560: 26589,
                40561: 26594,
                40562: 26606,
                40563: 26553,
                40564: 26574,
                40565: 26566,
                40566: 26599,
                40567: 27292,
                40568: 26654,
                40569: 26694,
                40570: 26665,
                40571: 26688,
                40572: 26701,
                40573: 26674,
                40574: 26702,
                40576: 26803,
                40577: 26667,
                40578: 26713,
                40579: 26723,
                40580: 26743,
                40581: 26751,
                40582: 26783,
                40583: 26767,
                40584: 26797,
                40585: 26772,
                40586: 26781,
                40587: 26779,
                40588: 26755,
                40589: 27310,
                40590: 26809,
                40591: 26740,
                40592: 26805,
                40593: 26784,
                40594: 26810,
                40595: 26895,
                40596: 26765,
                40597: 26750,
                40598: 26881,
                40599: 26826,
                40600: 26888,
                40601: 26840,
                40602: 26914,
                40603: 26918,
                40604: 26849,
                40605: 26892,
                40606: 26829,
                40607: 26836,
                40608: 26855,
                40609: 26837,
                40610: 26934,
                40611: 26898,
                40612: 26884,
                40613: 26839,
                40614: 26851,
                40615: 26917,
                40616: 26873,
                40617: 26848,
                40618: 26863,
                40619: 26920,
                40620: 26922,
                40621: 26906,
                40622: 26915,
                40623: 26913,
                40624: 26822,
                40625: 27001,
                40626: 26999,
                40627: 26972,
                40628: 27e3,
                40629: 26987,
                40630: 26964,
                40631: 27006,
                40632: 26990,
                40633: 26937,
                40634: 26996,
                40635: 26941,
                40636: 26969,
                40637: 26928,
                40638: 26977,
                40639: 26974,
                40640: 26973,
                40641: 27009,
                40642: 26986,
                40643: 27058,
                40644: 27054,
                40645: 27088,
                40646: 27071,
                40647: 27073,
                40648: 27091,
                40649: 27070,
                40650: 27086,
                40651: 23528,
                40652: 27082,
                40653: 27101,
                40654: 27067,
                40655: 27075,
                40656: 27047,
                40657: 27182,
                40658: 27025,
                40659: 27040,
                40660: 27036,
                40661: 27029,
                40662: 27060,
                40663: 27102,
                40664: 27112,
                40665: 27138,
                40666: 27163,
                40667: 27135,
                40668: 27402,
                40669: 27129,
                40670: 27122,
                40671: 27111,
                40672: 27141,
                40673: 27057,
                40674: 27166,
                40675: 27117,
                40676: 27156,
                40677: 27115,
                40678: 27146,
                40679: 27154,
                40680: 27329,
                40681: 27171,
                40682: 27155,
                40683: 27204,
                40684: 27148,
                40685: 27250,
                40686: 27190,
                40687: 27256,
                40688: 27207,
                40689: 27234,
                40690: 27225,
                40691: 27238,
                40692: 27208,
                40693: 27192,
                40694: 27170,
                40695: 27280,
                40696: 27277,
                40697: 27296,
                40698: 27268,
                40699: 27298,
                40700: 27299,
                40768: 27287,
                40769: 34327,
                40770: 27323,
                40771: 27331,
                40772: 27330,
                40773: 27320,
                40774: 27315,
                40775: 27308,
                40776: 27358,
                40777: 27345,
                40778: 27359,
                40779: 27306,
                40780: 27354,
                40781: 27370,
                40782: 27387,
                40783: 27397,
                40784: 34326,
                40785: 27386,
                40786: 27410,
                40787: 27414,
                40788: 39729,
                40789: 27423,
                40790: 27448,
                40791: 27447,
                40792: 30428,
                40793: 27449,
                40794: 39150,
                40795: 27463,
                40796: 27459,
                40797: 27465,
                40798: 27472,
                40799: 27481,
                40800: 27476,
                40801: 27483,
                40802: 27487,
                40803: 27489,
                40804: 27512,
                40805: 27513,
                40806: 27519,
                40807: 27520,
                40808: 27524,
                40809: 27523,
                40810: 27533,
                40811: 27544,
                40812: 27541,
                40813: 27550,
                40814: 27556,
                40815: 27562,
                40816: 27563,
                40817: 27567,
                40818: 27570,
                40819: 27569,
                40820: 27571,
                40821: 27575,
                40822: 27580,
                40823: 27590,
                40824: 27595,
                40825: 27603,
                40826: 27615,
                40827: 27628,
                40828: 27627,
                40829: 27635,
                40830: 27631,
                40832: 40638,
                40833: 27656,
                40834: 27667,
                40835: 27668,
                40836: 27675,
                40837: 27684,
                40838: 27683,
                40839: 27742,
                40840: 27733,
                40841: 27746,
                40842: 27754,
                40843: 27778,
                40844: 27789,
                40845: 27802,
                40846: 27777,
                40847: 27803,
                40848: 27774,
                40849: 27752,
                40850: 27763,
                40851: 27794,
                40852: 27792,
                40853: 27844,
                40854: 27889,
                40855: 27859,
                40856: 27837,
                40857: 27863,
                40858: 27845,
                40859: 27869,
                40860: 27822,
                40861: 27825,
                40862: 27838,
                40863: 27834,
                40864: 27867,
                40865: 27887,
                40866: 27865,
                40867: 27882,
                40868: 27935,
                40869: 34893,
                40870: 27958,
                40871: 27947,
                40872: 27965,
                40873: 27960,
                40874: 27929,
                40875: 27957,
                40876: 27955,
                40877: 27922,
                40878: 27916,
                40879: 28003,
                40880: 28051,
                40881: 28004,
                40882: 27994,
                40883: 28025,
                40884: 27993,
                40885: 28046,
                40886: 28053,
                40887: 28644,
                40888: 28037,
                40889: 28153,
                40890: 28181,
                40891: 28170,
                40892: 28085,
                40893: 28103,
                40894: 28134,
                40895: 28088,
                40896: 28102,
                40897: 28140,
                40898: 28126,
                40899: 28108,
                40900: 28136,
                40901: 28114,
                40902: 28101,
                40903: 28154,
                40904: 28121,
                40905: 28132,
                40906: 28117,
                40907: 28138,
                40908: 28142,
                40909: 28205,
                40910: 28270,
                40911: 28206,
                40912: 28185,
                40913: 28274,
                40914: 28255,
                40915: 28222,
                40916: 28195,
                40917: 28267,
                40918: 28203,
                40919: 28278,
                40920: 28237,
                40921: 28191,
                40922: 28227,
                40923: 28218,
                40924: 28238,
                40925: 28196,
                40926: 28415,
                40927: 28189,
                40928: 28216,
                40929: 28290,
                40930: 28330,
                40931: 28312,
                40932: 28361,
                40933: 28343,
                40934: 28371,
                40935: 28349,
                40936: 28335,
                40937: 28356,
                40938: 28338,
                40939: 28372,
                40940: 28373,
                40941: 28303,
                40942: 28325,
                40943: 28354,
                40944: 28319,
                40945: 28481,
                40946: 28433,
                40947: 28748,
                40948: 28396,
                40949: 28408,
                40950: 28414,
                40951: 28479,
                40952: 28402,
                40953: 28465,
                40954: 28399,
                40955: 28466,
                40956: 28364,
                161: 65377,
                162: 65378,
                163: 65379,
                164: 65380,
                165: 65381,
                166: 65382,
                167: 65383,
                168: 65384,
                169: 65385,
                170: 65386,
                171: 65387,
                172: 65388,
                173: 65389,
                174: 65390,
                175: 65391,
                176: 65392,
                177: 65393,
                178: 65394,
                179: 65395,
                180: 65396,
                181: 65397,
                182: 65398,
                183: 65399,
                184: 65400,
                185: 65401,
                186: 65402,
                187: 65403,
                188: 65404,
                189: 65405,
                190: 65406,
                191: 65407,
                192: 65408,
                193: 65409,
                194: 65410,
                195: 65411,
                196: 65412,
                197: 65413,
                198: 65414,
                199: 65415,
                200: 65416,
                201: 65417,
                202: 65418,
                203: 65419,
                204: 65420,
                205: 65421,
                206: 65422,
                207: 65423,
                208: 65424,
                209: 65425,
                210: 65426,
                211: 65427,
                212: 65428,
                213: 65429,
                214: 65430,
                215: 65431,
                216: 65432,
                217: 65433,
                218: 65434,
                219: 65435,
                220: 65436,
                221: 65437,
                222: 65438,
                223: 65439,
                57408: 28478,
                57409: 28435,
                57410: 28407,
                57411: 28550,
                57412: 28538,
                57413: 28536,
                57414: 28545,
                57415: 28544,
                57416: 28527,
                57417: 28507,
                57418: 28659,
                57419: 28525,
                57420: 28546,
                57421: 28540,
                57422: 28504,
                57423: 28558,
                57424: 28561,
                57425: 28610,
                57426: 28518,
                57427: 28595,
                57428: 28579,
                57429: 28577,
                57430: 28580,
                57431: 28601,
                57432: 28614,
                57433: 28586,
                57434: 28639,
                57435: 28629,
                57436: 28652,
                57437: 28628,
                57438: 28632,
                57439: 28657,
                57440: 28654,
                57441: 28635,
                57442: 28681,
                57443: 28683,
                57444: 28666,
                57445: 28689,
                57446: 28673,
                57447: 28687,
                57448: 28670,
                57449: 28699,
                57450: 28698,
                57451: 28532,
                57452: 28701,
                57453: 28696,
                57454: 28703,
                57455: 28720,
                57456: 28734,
                57457: 28722,
                57458: 28753,
                57459: 28771,
                57460: 28825,
                57461: 28818,
                57462: 28847,
                57463: 28913,
                57464: 28844,
                57465: 28856,
                57466: 28851,
                57467: 28846,
                57468: 28895,
                57469: 28875,
                57470: 28893,
                57472: 28889,
                57473: 28937,
                57474: 28925,
                57475: 28956,
                57476: 28953,
                57477: 29029,
                57478: 29013,
                57479: 29064,
                57480: 29030,
                57481: 29026,
                57482: 29004,
                57483: 29014,
                57484: 29036,
                57485: 29071,
                57486: 29179,
                57487: 29060,
                57488: 29077,
                57489: 29096,
                57490: 29100,
                57491: 29143,
                57492: 29113,
                57493: 29118,
                57494: 29138,
                57495: 29129,
                57496: 29140,
                57497: 29134,
                57498: 29152,
                57499: 29164,
                57500: 29159,
                57501: 29173,
                57502: 29180,
                57503: 29177,
                57504: 29183,
                57505: 29197,
                57506: 29200,
                57507: 29211,
                57508: 29224,
                57509: 29229,
                57510: 29228,
                57511: 29232,
                57512: 29234,
                57513: 29243,
                57514: 29244,
                57515: 29247,
                57516: 29248,
                57517: 29254,
                57518: 29259,
                57519: 29272,
                57520: 29300,
                57521: 29310,
                57522: 29314,
                57523: 29313,
                57524: 29319,
                57525: 29330,
                57526: 29334,
                57527: 29346,
                57528: 29351,
                57529: 29369,
                57530: 29362,
                57531: 29379,
                57532: 29382,
                57533: 29380,
                57534: 29390,
                57535: 29394,
                57536: 29410,
                57537: 29408,
                57538: 29409,
                57539: 29433,
                57540: 29431,
                57541: 20495,
                57542: 29463,
                57543: 29450,
                57544: 29468,
                57545: 29462,
                57546: 29469,
                57547: 29492,
                57548: 29487,
                57549: 29481,
                57550: 29477,
                57551: 29502,
                57552: 29518,
                57553: 29519,
                57554: 40664,
                57555: 29527,
                57556: 29546,
                57557: 29544,
                57558: 29552,
                57559: 29560,
                57560: 29557,
                57561: 29563,
                57562: 29562,
                57563: 29640,
                57564: 29619,
                57565: 29646,
                57566: 29627,
                57567: 29632,
                57568: 29669,
                57569: 29678,
                57570: 29662,
                57571: 29858,
                57572: 29701,
                57573: 29807,
                57574: 29733,
                57575: 29688,
                57576: 29746,
                57577: 29754,
                57578: 29781,
                57579: 29759,
                57580: 29791,
                57581: 29785,
                57582: 29761,
                57583: 29788,
                57584: 29801,
                57585: 29808,
                57586: 29795,
                57587: 29802,
                57588: 29814,
                57589: 29822,
                57590: 29835,
                57591: 29854,
                57592: 29863,
                57593: 29898,
                57594: 29903,
                57595: 29908,
                57596: 29681,
                57664: 29920,
                57665: 29923,
                57666: 29927,
                57667: 29929,
                57668: 29934,
                57669: 29938,
                57670: 29936,
                57671: 29937,
                57672: 29944,
                57673: 29943,
                57674: 29956,
                57675: 29955,
                57676: 29957,
                57677: 29964,
                57678: 29966,
                57679: 29965,
                57680: 29973,
                57681: 29971,
                57682: 29982,
                57683: 29990,
                57684: 29996,
                57685: 30012,
                57686: 30020,
                57687: 30029,
                57688: 30026,
                57689: 30025,
                57690: 30043,
                57691: 30022,
                57692: 30042,
                57693: 30057,
                57694: 30052,
                57695: 30055,
                57696: 30059,
                57697: 30061,
                57698: 30072,
                57699: 30070,
                57700: 30086,
                57701: 30087,
                57702: 30068,
                57703: 30090,
                57704: 30089,
                57705: 30082,
                57706: 30100,
                57707: 30106,
                57708: 30109,
                57709: 30117,
                57710: 30115,
                57711: 30146,
                57712: 30131,
                57713: 30147,
                57714: 30133,
                57715: 30141,
                57716: 30136,
                57717: 30140,
                57718: 30129,
                57719: 30157,
                57720: 30154,
                57721: 30162,
                57722: 30169,
                57723: 30179,
                57724: 30174,
                57725: 30206,
                57726: 30207,
                57728: 30204,
                57729: 30209,
                57730: 30192,
                57731: 30202,
                57732: 30194,
                57733: 30195,
                57734: 30219,
                57735: 30221,
                57736: 30217,
                57737: 30239,
                57738: 30247,
                57739: 30240,
                57740: 30241,
                57741: 30242,
                57742: 30244,
                57743: 30260,
                57744: 30256,
                57745: 30267,
                57746: 30279,
                57747: 30280,
                57748: 30278,
                57749: 30300,
                57750: 30296,
                57751: 30305,
                57752: 30306,
                57753: 30312,
                57754: 30313,
                57755: 30314,
                57756: 30311,
                57757: 30316,
                57758: 30320,
                57759: 30322,
                57760: 30326,
                57761: 30328,
                57762: 30332,
                57763: 30336,
                57764: 30339,
                57765: 30344,
                57766: 30347,
                57767: 30350,
                57768: 30358,
                57769: 30355,
                57770: 30361,
                57771: 30362,
                57772: 30384,
                57773: 30388,
                57774: 30392,
                57775: 30393,
                57776: 30394,
                57777: 30402,
                57778: 30413,
                57779: 30422,
                57780: 30418,
                57781: 30430,
                57782: 30433,
                57783: 30437,
                57784: 30439,
                57785: 30442,
                57786: 34351,
                57787: 30459,
                57788: 30472,
                57789: 30471,
                57790: 30468,
                57791: 30505,
                57792: 30500,
                57793: 30494,
                57794: 30501,
                57795: 30502,
                57796: 30491,
                57797: 30519,
                57798: 30520,
                57799: 30535,
                57800: 30554,
                57801: 30568,
                57802: 30571,
                57803: 30555,
                57804: 30565,
                57805: 30591,
                57806: 30590,
                57807: 30585,
                57808: 30606,
                57809: 30603,
                57810: 30609,
                57811: 30624,
                57812: 30622,
                57813: 30640,
                57814: 30646,
                57815: 30649,
                57816: 30655,
                57817: 30652,
                57818: 30653,
                57819: 30651,
                57820: 30663,
                57821: 30669,
                57822: 30679,
                57823: 30682,
                57824: 30684,
                57825: 30691,
                57826: 30702,
                57827: 30716,
                57828: 30732,
                57829: 30738,
                57830: 31014,
                57831: 30752,
                57832: 31018,
                57833: 30789,
                57834: 30862,
                57835: 30836,
                57836: 30854,
                57837: 30844,
                57838: 30874,
                57839: 30860,
                57840: 30883,
                57841: 30901,
                57842: 30890,
                57843: 30895,
                57844: 30929,
                57845: 30918,
                57846: 30923,
                57847: 30932,
                57848: 30910,
                57849: 30908,
                57850: 30917,
                57851: 30922,
                57852: 30956,
                57920: 30951,
                57921: 30938,
                57922: 30973,
                57923: 30964,
                57924: 30983,
                57925: 30994,
                57926: 30993,
                57927: 31001,
                57928: 31020,
                57929: 31019,
                57930: 31040,
                57931: 31072,
                57932: 31063,
                57933: 31071,
                57934: 31066,
                57935: 31061,
                57936: 31059,
                57937: 31098,
                57938: 31103,
                57939: 31114,
                57940: 31133,
                57941: 31143,
                57942: 40779,
                57943: 31146,
                57944: 31150,
                57945: 31155,
                57946: 31161,
                57947: 31162,
                57948: 31177,
                57949: 31189,
                57950: 31207,
                57951: 31212,
                57952: 31201,
                57953: 31203,
                57954: 31240,
                57955: 31245,
                57956: 31256,
                57957: 31257,
                57958: 31264,
                57959: 31263,
                57960: 31104,
                57961: 31281,
                57962: 31291,
                57963: 31294,
                57964: 31287,
                57965: 31299,
                57966: 31319,
                57967: 31305,
                57968: 31329,
                57969: 31330,
                57970: 31337,
                57971: 40861,
                57972: 31344,
                57973: 31353,
                57974: 31357,
                57975: 31368,
                57976: 31383,
                57977: 31381,
                57978: 31384,
                57979: 31382,
                57980: 31401,
                57981: 31432,
                57982: 31408,
                57984: 31414,
                57985: 31429,
                57986: 31428,
                57987: 31423,
                57988: 36995,
                57989: 31431,
                57990: 31434,
                57991: 31437,
                57992: 31439,
                57993: 31445,
                57994: 31443,
                57995: 31449,
                57996: 31450,
                57997: 31453,
                57998: 31457,
                57999: 31458,
                58e3: 31462,
                58001: 31469,
                58002: 31472,
                58003: 31490,
                58004: 31503,
                58005: 31498,
                58006: 31494,
                58007: 31539,
                58008: 31512,
                58009: 31513,
                58010: 31518,
                58011: 31541,
                58012: 31528,
                58013: 31542,
                58014: 31568,
                58015: 31610,
                58016: 31492,
                58017: 31565,
                58018: 31499,
                58019: 31564,
                58020: 31557,
                58021: 31605,
                58022: 31589,
                58023: 31604,
                58024: 31591,
                58025: 31600,
                58026: 31601,
                58027: 31596,
                58028: 31598,
                58029: 31645,
                58030: 31640,
                58031: 31647,
                58032: 31629,
                58033: 31644,
                58034: 31642,
                58035: 31627,
                58036: 31634,
                58037: 31631,
                58038: 31581,
                58039: 31641,
                58040: 31691,
                58041: 31681,
                58042: 31692,
                58043: 31695,
                58044: 31668,
                58045: 31686,
                58046: 31709,
                58047: 31721,
                58048: 31761,
                58049: 31764,
                58050: 31718,
                58051: 31717,
                58052: 31840,
                58053: 31744,
                58054: 31751,
                58055: 31763,
                58056: 31731,
                58057: 31735,
                58058: 31767,
                58059: 31757,
                58060: 31734,
                58061: 31779,
                58062: 31783,
                58063: 31786,
                58064: 31775,
                58065: 31799,
                58066: 31787,
                58067: 31805,
                58068: 31820,
                58069: 31811,
                58070: 31828,
                58071: 31823,
                58072: 31808,
                58073: 31824,
                58074: 31832,
                58075: 31839,
                58076: 31844,
                58077: 31830,
                58078: 31845,
                58079: 31852,
                58080: 31861,
                58081: 31875,
                58082: 31888,
                58083: 31908,
                58084: 31917,
                58085: 31906,
                58086: 31915,
                58087: 31905,
                58088: 31912,
                58089: 31923,
                58090: 31922,
                58091: 31921,
                58092: 31918,
                58093: 31929,
                58094: 31933,
                58095: 31936,
                58096: 31941,
                58097: 31938,
                58098: 31960,
                58099: 31954,
                58100: 31964,
                58101: 31970,
                58102: 39739,
                58103: 31983,
                58104: 31986,
                58105: 31988,
                58106: 31990,
                58107: 31994,
                58108: 32006,
                58176: 32002,
                58177: 32028,
                58178: 32021,
                58179: 32010,
                58180: 32069,
                58181: 32075,
                58182: 32046,
                58183: 32050,
                58184: 32063,
                58185: 32053,
                58186: 32070,
                58187: 32115,
                58188: 32086,
                58189: 32078,
                58190: 32114,
                58191: 32104,
                58192: 32110,
                58193: 32079,
                58194: 32099,
                58195: 32147,
                58196: 32137,
                58197: 32091,
                58198: 32143,
                58199: 32125,
                58200: 32155,
                58201: 32186,
                58202: 32174,
                58203: 32163,
                58204: 32181,
                58205: 32199,
                58206: 32189,
                58207: 32171,
                58208: 32317,
                58209: 32162,
                58210: 32175,
                58211: 32220,
                58212: 32184,
                58213: 32159,
                58214: 32176,
                58215: 32216,
                58216: 32221,
                58217: 32228,
                58218: 32222,
                58219: 32251,
                58220: 32242,
                58221: 32225,
                58222: 32261,
                58223: 32266,
                58224: 32291,
                58225: 32289,
                58226: 32274,
                58227: 32305,
                58228: 32287,
                58229: 32265,
                58230: 32267,
                58231: 32290,
                58232: 32326,
                58233: 32358,
                58234: 32315,
                58235: 32309,
                58236: 32313,
                58237: 32323,
                58238: 32311,
                58240: 32306,
                58241: 32314,
                58242: 32359,
                58243: 32349,
                58244: 32342,
                58245: 32350,
                58246: 32345,
                58247: 32346,
                58248: 32377,
                58249: 32362,
                58250: 32361,
                58251: 32380,
                58252: 32379,
                58253: 32387,
                58254: 32213,
                58255: 32381,
                58256: 36782,
                58257: 32383,
                58258: 32392,
                58259: 32393,
                58260: 32396,
                58261: 32402,
                58262: 32400,
                58263: 32403,
                58264: 32404,
                58265: 32406,
                58266: 32398,
                58267: 32411,
                58268: 32412,
                58269: 32568,
                58270: 32570,
                58271: 32581,
                58272: 32588,
                58273: 32589,
                58274: 32590,
                58275: 32592,
                58276: 32593,
                58277: 32597,
                58278: 32596,
                58279: 32600,
                58280: 32607,
                58281: 32608,
                58282: 32616,
                58283: 32617,
                58284: 32615,
                58285: 32632,
                58286: 32642,
                58287: 32646,
                58288: 32643,
                58289: 32648,
                58290: 32647,
                58291: 32652,
                58292: 32660,
                58293: 32670,
                58294: 32669,
                58295: 32666,
                58296: 32675,
                58297: 32687,
                58298: 32690,
                58299: 32697,
                58300: 32686,
                58301: 32694,
                58302: 32696,
                58303: 35697,
                58304: 32709,
                58305: 32710,
                58306: 32714,
                58307: 32725,
                58308: 32724,
                58309: 32737,
                58310: 32742,
                58311: 32745,
                58312: 32755,
                58313: 32761,
                58314: 39132,
                58315: 32774,
                58316: 32772,
                58317: 32779,
                58318: 32786,
                58319: 32792,
                58320: 32793,
                58321: 32796,
                58322: 32801,
                58323: 32808,
                58324: 32831,
                58325: 32827,
                58326: 32842,
                58327: 32838,
                58328: 32850,
                58329: 32856,
                58330: 32858,
                58331: 32863,
                58332: 32866,
                58333: 32872,
                58334: 32883,
                58335: 32882,
                58336: 32880,
                58337: 32886,
                58338: 32889,
                58339: 32893,
                58340: 32895,
                58341: 32900,
                58342: 32902,
                58343: 32901,
                58344: 32923,
                58345: 32915,
                58346: 32922,
                58347: 32941,
                58348: 20880,
                58349: 32940,
                58350: 32987,
                58351: 32997,
                58352: 32985,
                58353: 32989,
                58354: 32964,
                58355: 32986,
                58356: 32982,
                58357: 33033,
                58358: 33007,
                58359: 33009,
                58360: 33051,
                58361: 33065,
                58362: 33059,
                58363: 33071,
                58364: 33099,
                58432: 38539,
                58433: 33094,
                58434: 33086,
                58435: 33107,
                58436: 33105,
                58437: 33020,
                58438: 33137,
                58439: 33134,
                58440: 33125,
                58441: 33126,
                58442: 33140,
                58443: 33155,
                58444: 33160,
                58445: 33162,
                58446: 33152,
                58447: 33154,
                58448: 33184,
                58449: 33173,
                58450: 33188,
                58451: 33187,
                58452: 33119,
                58453: 33171,
                58454: 33193,
                58455: 33200,
                58456: 33205,
                58457: 33214,
                58458: 33208,
                58459: 33213,
                58460: 33216,
                58461: 33218,
                58462: 33210,
                58463: 33225,
                58464: 33229,
                58465: 33233,
                58466: 33241,
                58467: 33240,
                58468: 33224,
                58469: 33242,
                58470: 33247,
                58471: 33248,
                58472: 33255,
                58473: 33274,
                58474: 33275,
                58475: 33278,
                58476: 33281,
                58477: 33282,
                58478: 33285,
                58479: 33287,
                58480: 33290,
                58481: 33293,
                58482: 33296,
                58483: 33302,
                58484: 33321,
                58485: 33323,
                58486: 33336,
                58487: 33331,
                58488: 33344,
                58489: 33369,
                58490: 33368,
                58491: 33373,
                58492: 33370,
                58493: 33375,
                58494: 33380,
                58496: 33378,
                58497: 33384,
                58498: 33386,
                58499: 33387,
                58500: 33326,
                58501: 33393,
                58502: 33399,
                58503: 33400,
                58504: 33406,
                58505: 33421,
                58506: 33426,
                58507: 33451,
                58508: 33439,
                58509: 33467,
                58510: 33452,
                58511: 33505,
                58512: 33507,
                58513: 33503,
                58514: 33490,
                58515: 33524,
                58516: 33523,
                58517: 33530,
                58518: 33683,
                58519: 33539,
                58520: 33531,
                58521: 33529,
                58522: 33502,
                58523: 33542,
                58524: 33500,
                58525: 33545,
                58526: 33497,
                58527: 33589,
                58528: 33588,
                58529: 33558,
                58530: 33586,
                58531: 33585,
                58532: 33600,
                58533: 33593,
                58534: 33616,
                58535: 33605,
                58536: 33583,
                58537: 33579,
                58538: 33559,
                58539: 33560,
                58540: 33669,
                58541: 33690,
                58542: 33706,
                58543: 33695,
                58544: 33698,
                58545: 33686,
                58546: 33571,
                58547: 33678,
                58548: 33671,
                58549: 33674,
                58550: 33660,
                58551: 33717,
                58552: 33651,
                58553: 33653,
                58554: 33696,
                58555: 33673,
                58556: 33704,
                58557: 33780,
                58558: 33811,
                58559: 33771,
                58560: 33742,
                58561: 33789,
                58562: 33795,
                58563: 33752,
                58564: 33803,
                58565: 33729,
                58566: 33783,
                58567: 33799,
                58568: 33760,
                58569: 33778,
                58570: 33805,
                58571: 33826,
                58572: 33824,
                58573: 33725,
                58574: 33848,
                58575: 34054,
                58576: 33787,
                58577: 33901,
                58578: 33834,
                58579: 33852,
                58580: 34138,
                58581: 33924,
                58582: 33911,
                58583: 33899,
                58584: 33965,
                58585: 33902,
                58586: 33922,
                58587: 33897,
                58588: 33862,
                58589: 33836,
                58590: 33903,
                58591: 33913,
                58592: 33845,
                58593: 33994,
                58594: 33890,
                58595: 33977,
                58596: 33983,
                58597: 33951,
                58598: 34009,
                58599: 33997,
                58600: 33979,
                58601: 34010,
                58602: 34e3,
                58603: 33985,
                58604: 33990,
                58605: 34006,
                58606: 33953,
                58607: 34081,
                58608: 34047,
                58609: 34036,
                58610: 34071,
                58611: 34072,
                58612: 34092,
                58613: 34079,
                58614: 34069,
                58615: 34068,
                58616: 34044,
                58617: 34112,
                58618: 34147,
                58619: 34136,
                58620: 34120,
                58688: 34113,
                58689: 34306,
                58690: 34123,
                58691: 34133,
                58692: 34176,
                58693: 34212,
                58694: 34184,
                58695: 34193,
                58696: 34186,
                58697: 34216,
                58698: 34157,
                58699: 34196,
                58700: 34203,
                58701: 34282,
                58702: 34183,
                58703: 34204,
                58704: 34167,
                58705: 34174,
                58706: 34192,
                58707: 34249,
                58708: 34234,
                58709: 34255,
                58710: 34233,
                58711: 34256,
                58712: 34261,
                58713: 34269,
                58714: 34277,
                58715: 34268,
                58716: 34297,
                58717: 34314,
                58718: 34323,
                58719: 34315,
                58720: 34302,
                58721: 34298,
                58722: 34310,
                58723: 34338,
                58724: 34330,
                58725: 34352,
                58726: 34367,
                58727: 34381,
                58728: 20053,
                58729: 34388,
                58730: 34399,
                58731: 34407,
                58732: 34417,
                58733: 34451,
                58734: 34467,
                58735: 34473,
                58736: 34474,
                58737: 34443,
                58738: 34444,
                58739: 34486,
                58740: 34479,
                58741: 34500,
                58742: 34502,
                58743: 34480,
                58744: 34505,
                58745: 34851,
                58746: 34475,
                58747: 34516,
                58748: 34526,
                58749: 34537,
                58750: 34540,
                58752: 34527,
                58753: 34523,
                58754: 34543,
                58755: 34578,
                58756: 34566,
                58757: 34568,
                58758: 34560,
                58759: 34563,
                58760: 34555,
                58761: 34577,
                58762: 34569,
                58763: 34573,
                58764: 34553,
                58765: 34570,
                58766: 34612,
                58767: 34623,
                58768: 34615,
                58769: 34619,
                58770: 34597,
                58771: 34601,
                58772: 34586,
                58773: 34656,
                58774: 34655,
                58775: 34680,
                58776: 34636,
                58777: 34638,
                58778: 34676,
                58779: 34647,
                58780: 34664,
                58781: 34670,
                58782: 34649,
                58783: 34643,
                58784: 34659,
                58785: 34666,
                58786: 34821,
                58787: 34722,
                58788: 34719,
                58789: 34690,
                58790: 34735,
                58791: 34763,
                58792: 34749,
                58793: 34752,
                58794: 34768,
                58795: 38614,
                58796: 34731,
                58797: 34756,
                58798: 34739,
                58799: 34759,
                58800: 34758,
                58801: 34747,
                58802: 34799,
                58803: 34802,
                58804: 34784,
                58805: 34831,
                58806: 34829,
                58807: 34814,
                58808: 34806,
                58809: 34807,
                58810: 34830,
                58811: 34770,
                58812: 34833,
                58813: 34838,
                58814: 34837,
                58815: 34850,
                58816: 34849,
                58817: 34865,
                58818: 34870,
                58819: 34873,
                58820: 34855,
                58821: 34875,
                58822: 34884,
                58823: 34882,
                58824: 34898,
                58825: 34905,
                58826: 34910,
                58827: 34914,
                58828: 34923,
                58829: 34945,
                58830: 34942,
                58831: 34974,
                58832: 34933,
                58833: 34941,
                58834: 34997,
                58835: 34930,
                58836: 34946,
                58837: 34967,
                58838: 34962,
                58839: 34990,
                58840: 34969,
                58841: 34978,
                58842: 34957,
                58843: 34980,
                58844: 34992,
                58845: 35007,
                58846: 34993,
                58847: 35011,
                58848: 35012,
                58849: 35028,
                58850: 35032,
                58851: 35033,
                58852: 35037,
                58853: 35065,
                58854: 35074,
                58855: 35068,
                58856: 35060,
                58857: 35048,
                58858: 35058,
                58859: 35076,
                58860: 35084,
                58861: 35082,
                58862: 35091,
                58863: 35139,
                58864: 35102,
                58865: 35109,
                58866: 35114,
                58867: 35115,
                58868: 35137,
                58869: 35140,
                58870: 35131,
                58871: 35126,
                58872: 35128,
                58873: 35148,
                58874: 35101,
                58875: 35168,
                58876: 35166,
                58944: 35174,
                58945: 35172,
                58946: 35181,
                58947: 35178,
                58948: 35183,
                58949: 35188,
                58950: 35191,
                58951: 35198,
                58952: 35203,
                58953: 35208,
                58954: 35210,
                58955: 35219,
                58956: 35224,
                58957: 35233,
                58958: 35241,
                58959: 35238,
                58960: 35244,
                58961: 35247,
                58962: 35250,
                58963: 35258,
                58964: 35261,
                58965: 35263,
                58966: 35264,
                58967: 35290,
                58968: 35292,
                58969: 35293,
                58970: 35303,
                58971: 35316,
                58972: 35320,
                58973: 35331,
                58974: 35350,
                58975: 35344,
                58976: 35340,
                58977: 35355,
                58978: 35357,
                58979: 35365,
                58980: 35382,
                58981: 35393,
                58982: 35419,
                58983: 35410,
                58984: 35398,
                58985: 35400,
                58986: 35452,
                58987: 35437,
                58988: 35436,
                58989: 35426,
                58990: 35461,
                58991: 35458,
                58992: 35460,
                58993: 35496,
                58994: 35489,
                58995: 35473,
                58996: 35493,
                58997: 35494,
                58998: 35482,
                58999: 35491,
                59e3: 35524,
                59001: 35533,
                59002: 35522,
                59003: 35546,
                59004: 35563,
                59005: 35571,
                59006: 35559,
                59008: 35556,
                59009: 35569,
                59010: 35604,
                59011: 35552,
                59012: 35554,
                59013: 35575,
                59014: 35550,
                59015: 35547,
                59016: 35596,
                59017: 35591,
                59018: 35610,
                59019: 35553,
                59020: 35606,
                59021: 35600,
                59022: 35607,
                59023: 35616,
                59024: 35635,
                59025: 38827,
                59026: 35622,
                59027: 35627,
                59028: 35646,
                59029: 35624,
                59030: 35649,
                59031: 35660,
                59032: 35663,
                59033: 35662,
                59034: 35657,
                59035: 35670,
                59036: 35675,
                59037: 35674,
                59038: 35691,
                59039: 35679,
                59040: 35692,
                59041: 35695,
                59042: 35700,
                59043: 35709,
                59044: 35712,
                59045: 35724,
                59046: 35726,
                59047: 35730,
                59048: 35731,
                59049: 35734,
                59050: 35737,
                59051: 35738,
                59052: 35898,
                59053: 35905,
                59054: 35903,
                59055: 35912,
                59056: 35916,
                59057: 35918,
                59058: 35920,
                59059: 35925,
                59060: 35938,
                59061: 35948,
                59062: 35960,
                59063: 35962,
                59064: 35970,
                59065: 35977,
                59066: 35973,
                59067: 35978,
                59068: 35981,
                59069: 35982,
                59070: 35988,
                59071: 35964,
                59072: 35992,
                59073: 25117,
                59074: 36013,
                59075: 36010,
                59076: 36029,
                59077: 36018,
                59078: 36019,
                59079: 36014,
                59080: 36022,
                59081: 36040,
                59082: 36033,
                59083: 36068,
                59084: 36067,
                59085: 36058,
                59086: 36093,
                59087: 36090,
                59088: 36091,
                59089: 36100,
                59090: 36101,
                59091: 36106,
                59092: 36103,
                59093: 36111,
                59094: 36109,
                59095: 36112,
                59096: 40782,
                59097: 36115,
                59098: 36045,
                59099: 36116,
                59100: 36118,
                59101: 36199,
                59102: 36205,
                59103: 36209,
                59104: 36211,
                59105: 36225,
                59106: 36249,
                59107: 36290,
                59108: 36286,
                59109: 36282,
                59110: 36303,
                59111: 36314,
                59112: 36310,
                59113: 36300,
                59114: 36315,
                59115: 36299,
                59116: 36330,
                59117: 36331,
                59118: 36319,
                59119: 36323,
                59120: 36348,
                59121: 36360,
                59122: 36361,
                59123: 36351,
                59124: 36381,
                59125: 36382,
                59126: 36368,
                59127: 36383,
                59128: 36418,
                59129: 36405,
                59130: 36400,
                59131: 36404,
                59132: 36426,
                59200: 36423,
                59201: 36425,
                59202: 36428,
                59203: 36432,
                59204: 36424,
                59205: 36441,
                59206: 36452,
                59207: 36448,
                59208: 36394,
                59209: 36451,
                59210: 36437,
                59211: 36470,
                59212: 36466,
                59213: 36476,
                59214: 36481,
                59215: 36487,
                59216: 36485,
                59217: 36484,
                59218: 36491,
                59219: 36490,
                59220: 36499,
                59221: 36497,
                59222: 36500,
                59223: 36505,
                59224: 36522,
                59225: 36513,
                59226: 36524,
                59227: 36528,
                59228: 36550,
                59229: 36529,
                59230: 36542,
                59231: 36549,
                59232: 36552,
                59233: 36555,
                59234: 36571,
                59235: 36579,
                59236: 36604,
                59237: 36603,
                59238: 36587,
                59239: 36606,
                59240: 36618,
                59241: 36613,
                59242: 36629,
                59243: 36626,
                59244: 36633,
                59245: 36627,
                59246: 36636,
                59247: 36639,
                59248: 36635,
                59249: 36620,
                59250: 36646,
                59251: 36659,
                59252: 36667,
                59253: 36665,
                59254: 36677,
                59255: 36674,
                59256: 36670,
                59257: 36684,
                59258: 36681,
                59259: 36678,
                59260: 36686,
                59261: 36695,
                59262: 36700,
                59264: 36706,
                59265: 36707,
                59266: 36708,
                59267: 36764,
                59268: 36767,
                59269: 36771,
                59270: 36781,
                59271: 36783,
                59272: 36791,
                59273: 36826,
                59274: 36837,
                59275: 36834,
                59276: 36842,
                59277: 36847,
                59278: 36999,
                59279: 36852,
                59280: 36869,
                59281: 36857,
                59282: 36858,
                59283: 36881,
                59284: 36885,
                59285: 36897,
                59286: 36877,
                59287: 36894,
                59288: 36886,
                59289: 36875,
                59290: 36903,
                59291: 36918,
                59292: 36917,
                59293: 36921,
                59294: 36856,
                59295: 36943,
                59296: 36944,
                59297: 36945,
                59298: 36946,
                59299: 36878,
                59300: 36937,
                59301: 36926,
                59302: 36950,
                59303: 36952,
                59304: 36958,
                59305: 36968,
                59306: 36975,
                59307: 36982,
                59308: 38568,
                59309: 36978,
                59310: 36994,
                59311: 36989,
                59312: 36993,
                59313: 36992,
                59314: 37002,
                59315: 37001,
                59316: 37007,
                59317: 37032,
                59318: 37039,
                59319: 37041,
                59320: 37045,
                59321: 37090,
                59322: 37092,
                59323: 25160,
                59324: 37083,
                59325: 37122,
                59326: 37138,
                59327: 37145,
                59328: 37170,
                59329: 37168,
                59330: 37194,
                59331: 37206,
                59332: 37208,
                59333: 37219,
                59334: 37221,
                59335: 37225,
                59336: 37235,
                59337: 37234,
                59338: 37259,
                59339: 37257,
                59340: 37250,
                59341: 37282,
                59342: 37291,
                59343: 37295,
                59344: 37290,
                59345: 37301,
                59346: 37300,
                59347: 37306,
                59348: 37312,
                59349: 37313,
                59350: 37321,
                59351: 37323,
                59352: 37328,
                59353: 37334,
                59354: 37343,
                59355: 37345,
                59356: 37339,
                59357: 37372,
                59358: 37365,
                59359: 37366,
                59360: 37406,
                59361: 37375,
                59362: 37396,
                59363: 37420,
                59364: 37397,
                59365: 37393,
                59366: 37470,
                59367: 37463,
                59368: 37445,
                59369: 37449,
                59370: 37476,
                59371: 37448,
                59372: 37525,
                59373: 37439,
                59374: 37451,
                59375: 37456,
                59376: 37532,
                59377: 37526,
                59378: 37523,
                59379: 37531,
                59380: 37466,
                59381: 37583,
                59382: 37561,
                59383: 37559,
                59384: 37609,
                59385: 37647,
                59386: 37626,
                59387: 37700,
                59388: 37678,
                59456: 37657,
                59457: 37666,
                59458: 37658,
                59459: 37667,
                59460: 37690,
                59461: 37685,
                59462: 37691,
                59463: 37724,
                59464: 37728,
                59465: 37756,
                59466: 37742,
                59467: 37718,
                59468: 37808,
                59469: 37804,
                59470: 37805,
                59471: 37780,
                59472: 37817,
                59473: 37846,
                59474: 37847,
                59475: 37864,
                59476: 37861,
                59477: 37848,
                59478: 37827,
                59479: 37853,
                59480: 37840,
                59481: 37832,
                59482: 37860,
                59483: 37914,
                59484: 37908,
                59485: 37907,
                59486: 37891,
                59487: 37895,
                59488: 37904,
                59489: 37942,
                59490: 37931,
                59491: 37941,
                59492: 37921,
                59493: 37946,
                59494: 37953,
                59495: 37970,
                59496: 37956,
                59497: 37979,
                59498: 37984,
                59499: 37986,
                59500: 37982,
                59501: 37994,
                59502: 37417,
                59503: 38e3,
                59504: 38005,
                59505: 38007,
                59506: 38013,
                59507: 37978,
                59508: 38012,
                59509: 38014,
                59510: 38017,
                59511: 38015,
                59512: 38274,
                59513: 38279,
                59514: 38282,
                59515: 38292,
                59516: 38294,
                59517: 38296,
                59518: 38297,
                59520: 38304,
                59521: 38312,
                59522: 38311,
                59523: 38317,
                59524: 38332,
                59525: 38331,
                59526: 38329,
                59527: 38334,
                59528: 38346,
                59529: 28662,
                59530: 38339,
                59531: 38349,
                59532: 38348,
                59533: 38357,
                59534: 38356,
                59535: 38358,
                59536: 38364,
                59537: 38369,
                59538: 38373,
                59539: 38370,
                59540: 38433,
                59541: 38440,
                59542: 38446,
                59543: 38447,
                59544: 38466,
                59545: 38476,
                59546: 38479,
                59547: 38475,
                59548: 38519,
                59549: 38492,
                59550: 38494,
                59551: 38493,
                59552: 38495,
                59553: 38502,
                59554: 38514,
                59555: 38508,
                59556: 38541,
                59557: 38552,
                59558: 38549,
                59559: 38551,
                59560: 38570,
                59561: 38567,
                59562: 38577,
                59563: 38578,
                59564: 38576,
                59565: 38580,
                59566: 38582,
                59567: 38584,
                59568: 38585,
                59569: 38606,
                59570: 38603,
                59571: 38601,
                59572: 38605,
                59573: 35149,
                59574: 38620,
                59575: 38669,
                59576: 38613,
                59577: 38649,
                59578: 38660,
                59579: 38662,
                59580: 38664,
                59581: 38675,
                59582: 38670,
                59583: 38673,
                59584: 38671,
                59585: 38678,
                59586: 38681,
                59587: 38692,
                59588: 38698,
                59589: 38704,
                59590: 38713,
                59591: 38717,
                59592: 38718,
                59593: 38724,
                59594: 38726,
                59595: 38728,
                59596: 38722,
                59597: 38729,
                59598: 38748,
                59599: 38752,
                59600: 38756,
                59601: 38758,
                59602: 38760,
                59603: 21202,
                59604: 38763,
                59605: 38769,
                59606: 38777,
                59607: 38789,
                59608: 38780,
                59609: 38785,
                59610: 38778,
                59611: 38790,
                59612: 38795,
                59613: 38799,
                59614: 38800,
                59615: 38812,
                59616: 38824,
                59617: 38822,
                59618: 38819,
                59619: 38835,
                59620: 38836,
                59621: 38851,
                59622: 38854,
                59623: 38856,
                59624: 38859,
                59625: 38876,
                59626: 38893,
                59627: 40783,
                59628: 38898,
                59629: 31455,
                59630: 38902,
                59631: 38901,
                59632: 38927,
                59633: 38924,
                59634: 38968,
                59635: 38948,
                59636: 38945,
                59637: 38967,
                59638: 38973,
                59639: 38982,
                59640: 38991,
                59641: 38987,
                59642: 39019,
                59643: 39023,
                59644: 39024,
                59712: 39025,
                59713: 39028,
                59714: 39027,
                59715: 39082,
                59716: 39087,
                59717: 39089,
                59718: 39094,
                59719: 39108,
                59720: 39107,
                59721: 39110,
                59722: 39145,
                59723: 39147,
                59724: 39171,
                59725: 39177,
                59726: 39186,
                59727: 39188,
                59728: 39192,
                59729: 39201,
                59730: 39197,
                59731: 39198,
                59732: 39204,
                59733: 39200,
                59734: 39212,
                59735: 39214,
                59736: 39229,
                59737: 39230,
                59738: 39234,
                59739: 39241,
                59740: 39237,
                59741: 39248,
                59742: 39243,
                59743: 39249,
                59744: 39250,
                59745: 39244,
                59746: 39253,
                59747: 39319,
                59748: 39320,
                59749: 39333,
                59750: 39341,
                59751: 39342,
                59752: 39356,
                59753: 39391,
                59754: 39387,
                59755: 39389,
                59756: 39384,
                59757: 39377,
                59758: 39405,
                59759: 39406,
                59760: 39409,
                59761: 39410,
                59762: 39419,
                59763: 39416,
                59764: 39425,
                59765: 39439,
                59766: 39429,
                59767: 39394,
                59768: 39449,
                59769: 39467,
                59770: 39479,
                59771: 39493,
                59772: 39490,
                59773: 39488,
                59774: 39491,
                59776: 39486,
                59777: 39509,
                59778: 39501,
                59779: 39515,
                59780: 39511,
                59781: 39519,
                59782: 39522,
                59783: 39525,
                59784: 39524,
                59785: 39529,
                59786: 39531,
                59787: 39530,
                59788: 39597,
                59789: 39600,
                59790: 39612,
                59791: 39616,
                59792: 39631,
                59793: 39633,
                59794: 39635,
                59795: 39636,
                59796: 39646,
                59797: 39647,
                59798: 39650,
                59799: 39651,
                59800: 39654,
                59801: 39663,
                59802: 39659,
                59803: 39662,
                59804: 39668,
                59805: 39665,
                59806: 39671,
                59807: 39675,
                59808: 39686,
                59809: 39704,
                59810: 39706,
                59811: 39711,
                59812: 39714,
                59813: 39715,
                59814: 39717,
                59815: 39719,
                59816: 39720,
                59817: 39721,
                59818: 39722,
                59819: 39726,
                59820: 39727,
                59821: 39730,
                59822: 39748,
                59823: 39747,
                59824: 39759,
                59825: 39757,
                59826: 39758,
                59827: 39761,
                59828: 39768,
                59829: 39796,
                59830: 39827,
                59831: 39811,
                59832: 39825,
                59833: 39830,
                59834: 39831,
                59835: 39839,
                59836: 39840,
                59837: 39848,
                59838: 39860,
                59839: 39872,
                59840: 39882,
                59841: 39865,
                59842: 39878,
                59843: 39887,
                59844: 39889,
                59845: 39890,
                59846: 39907,
                59847: 39906,
                59848: 39908,
                59849: 39892,
                59850: 39905,
                59851: 39994,
                59852: 39922,
                59853: 39921,
                59854: 39920,
                59855: 39957,
                59856: 39956,
                59857: 39945,
                59858: 39955,
                59859: 39948,
                59860: 39942,
                59861: 39944,
                59862: 39954,
                59863: 39946,
                59864: 39940,
                59865: 39982,
                59866: 39963,
                59867: 39973,
                59868: 39972,
                59869: 39969,
                59870: 39984,
                59871: 40007,
                59872: 39986,
                59873: 40006,
                59874: 39998,
                59875: 40026,
                59876: 40032,
                59877: 40039,
                59878: 40054,
                59879: 40056,
                59880: 40167,
                59881: 40172,
                59882: 40176,
                59883: 40201,
                59884: 40200,
                59885: 40171,
                59886: 40195,
                59887: 40198,
                59888: 40234,
                59889: 40230,
                59890: 40367,
                59891: 40227,
                59892: 40223,
                59893: 40260,
                59894: 40213,
                59895: 40210,
                59896: 40257,
                59897: 40255,
                59898: 40254,
                59899: 40262,
                59900: 40264,
                59968: 40285,
                59969: 40286,
                59970: 40292,
                59971: 40273,
                59972: 40272,
                59973: 40281,
                59974: 40306,
                59975: 40329,
                59976: 40327,
                59977: 40363,
                59978: 40303,
                59979: 40314,
                59980: 40346,
                59981: 40356,
                59982: 40361,
                59983: 40370,
                59984: 40388,
                59985: 40385,
                59986: 40379,
                59987: 40376,
                59988: 40378,
                59989: 40390,
                59990: 40399,
                59991: 40386,
                59992: 40409,
                59993: 40403,
                59994: 40440,
                59995: 40422,
                59996: 40429,
                59997: 40431,
                59998: 40445,
                59999: 40474,
                6e4: 40475,
                60001: 40478,
                60002: 40565,
                60003: 40569,
                60004: 40573,
                60005: 40577,
                60006: 40584,
                60007: 40587,
                60008: 40588,
                60009: 40594,
                60010: 40597,
                60011: 40593,
                60012: 40605,
                60013: 40613,
                60014: 40617,
                60015: 40632,
                60016: 40618,
                60017: 40621,
                60018: 38753,
                60019: 40652,
                60020: 40654,
                60021: 40655,
                60022: 40656,
                60023: 40660,
                60024: 40668,
                60025: 40670,
                60026: 40669,
                60027: 40672,
                60028: 40677,
                60029: 40680,
                60030: 40687,
                60032: 40692,
                60033: 40694,
                60034: 40695,
                60035: 40697,
                60036: 40699,
                60037: 40700,
                60038: 40701,
                60039: 40711,
                60040: 40712,
                60041: 30391,
                60042: 40725,
                60043: 40737,
                60044: 40748,
                60045: 40766,
                60046: 40778,
                60047: 40786,
                60048: 40788,
                60049: 40803,
                60050: 40799,
                60051: 40800,
                60052: 40801,
                60053: 40806,
                60054: 40807,
                60055: 40812,
                60056: 40810,
                60057: 40823,
                60058: 40818,
                60059: 40822,
                60060: 40853,
                60061: 40860,
                60062: 40864,
                60063: 22575,
                60064: 27079,
                60065: 36953,
                60066: 29796,
                60067: 20956,
                60068: 29081
            }
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = i(1)
              , s = i(2);
            function a(f, d, h, x) {
                var y;
                d.degree() < h.degree() && (y = [h, d],
                d = y[0],
                h = y[1]);
                for (var m = d, E = h, g = f.zero, p = f.one; E.degree() >= x / 2; ) {
                    var v = m
                      , _ = g;
                    if (m = E,
                    g = p,
                    m.isZero())
                        return null;
                    E = v;
                    for (var b = f.zero, C = m.getCoefficient(m.degree()), B = f.inverse(C); E.degree() >= m.degree() && !E.isZero(); ) {
                        var T = E.degree() - m.degree()
                          , A = f.multiply(E.getCoefficient(E.degree()), B);
                        b = b.addOrSubtract(f.buildMonomial(T, A)),
                        E = E.addOrSubtract(m.multiplyByMonomial(T, A))
                    }
                    if (p = b.multiplyPoly(g).addOrSubtract(_),
                    E.degree() >= m.degree())
                        return null
                }
                var w = p.getCoefficient(0);
                if (w === 0)
                    return null;
                var S = f.inverse(w);
                return [p.multiply(S), E.multiply(S)]
            }
            function l(f, d) {
                var h = d.degree();
                if (h === 1)
                    return [d.getCoefficient(1)];
                for (var x = new Array(h), y = 0, m = 1; m < f.size && y < h; m++)
                    d.evaluateAt(m) === 0 && (x[y] = f.inverse(m),
                    y++);
                return y !== h ? null : x
            }
            function c(f, d, h) {
                for (var x = h.length, y = new Array(x), m = 0; m < x; m++) {
                    for (var E = f.inverse(h[m]), g = 1, p = 0; p < x; p++)
                        m !== p && (g = f.multiply(g, o.addOrSubtractGF(1, f.multiply(h[p], E))));
                    y[m] = f.multiply(d.evaluateAt(E), f.inverse(g)),
                    f.generatorBase !== 0 && (y[m] = f.multiply(y[m], E))
                }
                return y
            }
            function u(f, d) {
                var h = new Uint8ClampedArray(f.length);
                h.set(f);
                for (var x = new o.default(285,256,0), y = new s.default(x,h), m = new Uint8ClampedArray(d), E = !1, g = 0; g < d; g++) {
                    var p = y.evaluateAt(x.exp(g + x.generatorBase));
                    m[m.length - 1 - g] = p,
                    p !== 0 && (E = !0)
                }
                if (!E)
                    return h;
                var v = new s.default(x,m)
                  , _ = a(x, x.buildMonomial(d, 1), v, d);
                if (_ === null)
                    return null;
                var b = l(x, _[0]);
                if (b == null)
                    return null;
                for (var C = c(x, _[1], b), B = 0; B < b.length; B++) {
                    var T = h.length - 1 - x.log(b[B]);
                    if (T < 0)
                        return null;
                    h[T] = o.addOrSubtractGF(h[T], C[B])
                }
                return h
            }
            n.decode = u
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            }),
            n.VERSIONS = [{
                infoBits: null,
                versionNumber: 1,
                alignmentPatternCenters: [],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 7,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 19
                    }]
                }, {
                    ecCodewordsPerBlock: 10,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 16
                    }]
                }, {
                    ecCodewordsPerBlock: 13,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 13
                    }]
                }, {
                    ecCodewordsPerBlock: 17,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 9
                    }]
                }]
            }, {
                infoBits: null,
                versionNumber: 2,
                alignmentPatternCenters: [6, 18],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 10,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 34
                    }]
                }, {
                    ecCodewordsPerBlock: 16,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 28
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 22
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: null,
                versionNumber: 3,
                alignmentPatternCenters: [6, 22],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 15,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 55
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 44
                    }]
                }, {
                    ecCodewordsPerBlock: 18,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 17
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 13
                    }]
                }]
            }, {
                infoBits: null,
                versionNumber: 4,
                alignmentPatternCenters: [6, 26],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 20,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 80
                    }]
                }, {
                    ecCodewordsPerBlock: 18,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 32
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 24
                    }]
                }, {
                    ecCodewordsPerBlock: 16,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 9
                    }]
                }]
            }, {
                infoBits: null,
                versionNumber: 5,
                alignmentPatternCenters: [6, 30],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 108
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 43
                    }]
                }, {
                    ecCodewordsPerBlock: 18,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 16
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 11
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 12
                    }]
                }]
            }, {
                infoBits: null,
                versionNumber: 6,
                alignmentPatternCenters: [6, 34],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 18,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 68
                    }]
                }, {
                    ecCodewordsPerBlock: 16,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 27
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 19
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 15
                    }]
                }]
            }, {
                infoBits: 31892,
                versionNumber: 7,
                alignmentPatternCenters: [6, 22, 38],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 20,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 78
                    }]
                }, {
                    ecCodewordsPerBlock: 18,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 31
                    }]
                }, {
                    ecCodewordsPerBlock: 18,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 14
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 15
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 13
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 14
                    }]
                }]
            }, {
                infoBits: 34236,
                versionNumber: 8,
                alignmentPatternCenters: [6, 24, 42],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 97
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 38
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 39
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 18
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 19
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 14
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 15
                    }]
                }]
            }, {
                infoBits: 39577,
                versionNumber: 9,
                alignmentPatternCenters: [6, 26, 46],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 116
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 36
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 37
                    }]
                }, {
                    ecCodewordsPerBlock: 20,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 16
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 17
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 12
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 13
                    }]
                }]
            }, {
                infoBits: 42195,
                versionNumber: 10,
                alignmentPatternCenters: [6, 28, 50],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 18,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 68
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 69
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 43
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 44
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 6,
                        dataCodewordsPerBlock: 19
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 20
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 6,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 48118,
                versionNumber: 11,
                alignmentPatternCenters: [6, 30, 54],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 20,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 81
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 50
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 51
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 22
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 23
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 12
                    }, {
                        numBlocks: 8,
                        dataCodewordsPerBlock: 13
                    }]
                }]
            }, {
                infoBits: 51042,
                versionNumber: 12,
                alignmentPatternCenters: [6, 32, 58],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 92
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 93
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 6,
                        dataCodewordsPerBlock: 36
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 37
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 20
                    }, {
                        numBlocks: 6,
                        dataCodewordsPerBlock: 21
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 7,
                        dataCodewordsPerBlock: 14
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 15
                    }]
                }]
            }, {
                infoBits: 55367,
                versionNumber: 13,
                alignmentPatternCenters: [6, 34, 62],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 107
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 8,
                        dataCodewordsPerBlock: 37
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 38
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 8,
                        dataCodewordsPerBlock: 20
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 21
                    }]
                }, {
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 12,
                        dataCodewordsPerBlock: 11
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 12
                    }]
                }]
            }, {
                infoBits: 58893,
                versionNumber: 14,
                alignmentPatternCenters: [6, 26, 46, 66],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 115
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 116
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 40
                    }, {
                        numBlocks: 5,
                        dataCodewordsPerBlock: 41
                    }]
                }, {
                    ecCodewordsPerBlock: 20,
                    ecBlocks: [{
                        numBlocks: 11,
                        dataCodewordsPerBlock: 16
                    }, {
                        numBlocks: 5,
                        dataCodewordsPerBlock: 17
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 11,
                        dataCodewordsPerBlock: 12
                    }, {
                        numBlocks: 5,
                        dataCodewordsPerBlock: 13
                    }]
                }]
            }, {
                infoBits: 63784,
                versionNumber: 15,
                alignmentPatternCenters: [6, 26, 48, 70],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 22,
                    ecBlocks: [{
                        numBlocks: 5,
                        dataCodewordsPerBlock: 87
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 88
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 5,
                        dataCodewordsPerBlock: 41
                    }, {
                        numBlocks: 5,
                        dataCodewordsPerBlock: 42
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 5,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 7,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 11,
                        dataCodewordsPerBlock: 12
                    }, {
                        numBlocks: 7,
                        dataCodewordsPerBlock: 13
                    }]
                }]
            }, {
                infoBits: 68472,
                versionNumber: 16,
                alignmentPatternCenters: [6, 26, 50, 74],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 5,
                        dataCodewordsPerBlock: 98
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 99
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 7,
                        dataCodewordsPerBlock: 45
                    }, {
                        numBlocks: 3,
                        dataCodewordsPerBlock: 46
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 15,
                        dataCodewordsPerBlock: 19
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 20
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 13,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 70749,
                versionNumber: 17,
                alignmentPatternCenters: [6, 30, 54, 78],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 107
                    }, {
                        numBlocks: 5,
                        dataCodewordsPerBlock: 108
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 10,
                        dataCodewordsPerBlock: 46
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 47
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 22
                    }, {
                        numBlocks: 15,
                        dataCodewordsPerBlock: 23
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 14
                    }, {
                        numBlocks: 17,
                        dataCodewordsPerBlock: 15
                    }]
                }]
            }, {
                infoBits: 76311,
                versionNumber: 18,
                alignmentPatternCenters: [6, 30, 56, 82],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 5,
                        dataCodewordsPerBlock: 120
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 121
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 9,
                        dataCodewordsPerBlock: 43
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 44
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 17,
                        dataCodewordsPerBlock: 22
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 23
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 14
                    }, {
                        numBlocks: 19,
                        dataCodewordsPerBlock: 15
                    }]
                }]
            }, {
                infoBits: 79154,
                versionNumber: 19,
                alignmentPatternCenters: [6, 30, 58, 86],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 113
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 114
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 44
                    }, {
                        numBlocks: 11,
                        dataCodewordsPerBlock: 45
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 17,
                        dataCodewordsPerBlock: 21
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 22
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 9,
                        dataCodewordsPerBlock: 13
                    }, {
                        numBlocks: 16,
                        dataCodewordsPerBlock: 14
                    }]
                }]
            }, {
                infoBits: 84390,
                versionNumber: 20,
                alignmentPatternCenters: [6, 34, 62, 90],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 107
                    }, {
                        numBlocks: 5,
                        dataCodewordsPerBlock: 108
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 41
                    }, {
                        numBlocks: 13,
                        dataCodewordsPerBlock: 42
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 15,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 5,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 15,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 10,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 87683,
                versionNumber: 21,
                alignmentPatternCenters: [6, 28, 50, 72, 94],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 116
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 117
                    }]
                }, {
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 17,
                        dataCodewordsPerBlock: 42
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 17,
                        dataCodewordsPerBlock: 22
                    }, {
                        numBlocks: 6,
                        dataCodewordsPerBlock: 23
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 19,
                        dataCodewordsPerBlock: 16
                    }, {
                        numBlocks: 6,
                        dataCodewordsPerBlock: 17
                    }]
                }]
            }, {
                infoBits: 92361,
                versionNumber: 22,
                alignmentPatternCenters: [6, 26, 50, 74, 98],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 111
                    }, {
                        numBlocks: 7,
                        dataCodewordsPerBlock: 112
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 17,
                        dataCodewordsPerBlock: 46
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 7,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 16,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 24,
                    ecBlocks: [{
                        numBlocks: 34,
                        dataCodewordsPerBlock: 13
                    }]
                }]
            }, {
                infoBits: 96236,
                versionNumber: 23,
                alignmentPatternCenters: [6, 30, 54, 74, 102],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 121
                    }, {
                        numBlocks: 5,
                        dataCodewordsPerBlock: 122
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 47
                    }, {
                        numBlocks: 14,
                        dataCodewordsPerBlock: 48
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 11,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 14,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 16,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 14,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 102084,
                versionNumber: 24,
                alignmentPatternCenters: [6, 28, 54, 80, 106],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 6,
                        dataCodewordsPerBlock: 117
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 118
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 6,
                        dataCodewordsPerBlock: 45
                    }, {
                        numBlocks: 14,
                        dataCodewordsPerBlock: 46
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 11,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 16,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 30,
                        dataCodewordsPerBlock: 16
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 17
                    }]
                }]
            }, {
                infoBits: 102881,
                versionNumber: 25,
                alignmentPatternCenters: [6, 32, 58, 84, 110],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 26,
                    ecBlocks: [{
                        numBlocks: 8,
                        dataCodewordsPerBlock: 106
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 107
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 8,
                        dataCodewordsPerBlock: 47
                    }, {
                        numBlocks: 13,
                        dataCodewordsPerBlock: 48
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 7,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 22,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 22,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 13,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 110507,
                versionNumber: 26,
                alignmentPatternCenters: [6, 30, 58, 86, 114],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 10,
                        dataCodewordsPerBlock: 114
                    }, {
                        numBlocks: 2,
                        dataCodewordsPerBlock: 115
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 19,
                        dataCodewordsPerBlock: 46
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 47
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 28,
                        dataCodewordsPerBlock: 22
                    }, {
                        numBlocks: 6,
                        dataCodewordsPerBlock: 23
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 33,
                        dataCodewordsPerBlock: 16
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 17
                    }]
                }]
            }, {
                infoBits: 110734,
                versionNumber: 27,
                alignmentPatternCenters: [6, 34, 62, 90, 118],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 8,
                        dataCodewordsPerBlock: 122
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 123
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 22,
                        dataCodewordsPerBlock: 45
                    }, {
                        numBlocks: 3,
                        dataCodewordsPerBlock: 46
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 8,
                        dataCodewordsPerBlock: 23
                    }, {
                        numBlocks: 26,
                        dataCodewordsPerBlock: 24
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 12,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 28,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 117786,
                versionNumber: 28,
                alignmentPatternCenters: [6, 26, 50, 74, 98, 122],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 117
                    }, {
                        numBlocks: 10,
                        dataCodewordsPerBlock: 118
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 3,
                        dataCodewordsPerBlock: 45
                    }, {
                        numBlocks: 23,
                        dataCodewordsPerBlock: 46
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 31,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 11,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 31,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 119615,
                versionNumber: 29,
                alignmentPatternCenters: [6, 30, 54, 78, 102, 126],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 7,
                        dataCodewordsPerBlock: 116
                    }, {
                        numBlocks: 7,
                        dataCodewordsPerBlock: 117
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 21,
                        dataCodewordsPerBlock: 45
                    }, {
                        numBlocks: 7,
                        dataCodewordsPerBlock: 46
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 1,
                        dataCodewordsPerBlock: 23
                    }, {
                        numBlocks: 37,
                        dataCodewordsPerBlock: 24
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 19,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 26,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 126325,
                versionNumber: 30,
                alignmentPatternCenters: [6, 26, 52, 78, 104, 130],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 5,
                        dataCodewordsPerBlock: 115
                    }, {
                        numBlocks: 10,
                        dataCodewordsPerBlock: 116
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 19,
                        dataCodewordsPerBlock: 47
                    }, {
                        numBlocks: 10,
                        dataCodewordsPerBlock: 48
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 15,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 25,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 23,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 25,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 127568,
                versionNumber: 31,
                alignmentPatternCenters: [6, 30, 56, 82, 108, 134],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 13,
                        dataCodewordsPerBlock: 115
                    }, {
                        numBlocks: 3,
                        dataCodewordsPerBlock: 116
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 46
                    }, {
                        numBlocks: 29,
                        dataCodewordsPerBlock: 47
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 42,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 23,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 28,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 133589,
                versionNumber: 32,
                alignmentPatternCenters: [6, 34, 60, 86, 112, 138],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 17,
                        dataCodewordsPerBlock: 115
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 10,
                        dataCodewordsPerBlock: 46
                    }, {
                        numBlocks: 23,
                        dataCodewordsPerBlock: 47
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 10,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 35,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 19,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 35,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 136944,
                versionNumber: 33,
                alignmentPatternCenters: [6, 30, 58, 86, 114, 142],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 17,
                        dataCodewordsPerBlock: 115
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 116
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 14,
                        dataCodewordsPerBlock: 46
                    }, {
                        numBlocks: 21,
                        dataCodewordsPerBlock: 47
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 29,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 19,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 11,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 46,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 141498,
                versionNumber: 34,
                alignmentPatternCenters: [6, 34, 62, 90, 118, 146],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 13,
                        dataCodewordsPerBlock: 115
                    }, {
                        numBlocks: 6,
                        dataCodewordsPerBlock: 116
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 14,
                        dataCodewordsPerBlock: 46
                    }, {
                        numBlocks: 23,
                        dataCodewordsPerBlock: 47
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 44,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 7,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 59,
                        dataCodewordsPerBlock: 16
                    }, {
                        numBlocks: 1,
                        dataCodewordsPerBlock: 17
                    }]
                }]
            }, {
                infoBits: 145311,
                versionNumber: 35,
                alignmentPatternCenters: [6, 30, 54, 78, 102, 126, 150],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 12,
                        dataCodewordsPerBlock: 121
                    }, {
                        numBlocks: 7,
                        dataCodewordsPerBlock: 122
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 12,
                        dataCodewordsPerBlock: 47
                    }, {
                        numBlocks: 26,
                        dataCodewordsPerBlock: 48
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 39,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 14,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 22,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 41,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 150283,
                versionNumber: 36,
                alignmentPatternCenters: [6, 24, 50, 76, 102, 128, 154],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 6,
                        dataCodewordsPerBlock: 121
                    }, {
                        numBlocks: 14,
                        dataCodewordsPerBlock: 122
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 6,
                        dataCodewordsPerBlock: 47
                    }, {
                        numBlocks: 34,
                        dataCodewordsPerBlock: 48
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 46,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 10,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 2,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 64,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 152622,
                versionNumber: 37,
                alignmentPatternCenters: [6, 28, 54, 80, 106, 132, 158],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 17,
                        dataCodewordsPerBlock: 122
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 123
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 29,
                        dataCodewordsPerBlock: 46
                    }, {
                        numBlocks: 14,
                        dataCodewordsPerBlock: 47
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 49,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 10,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 24,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 46,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 158308,
                versionNumber: 38,
                alignmentPatternCenters: [6, 32, 58, 84, 110, 136, 162],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 4,
                        dataCodewordsPerBlock: 122
                    }, {
                        numBlocks: 18,
                        dataCodewordsPerBlock: 123
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 13,
                        dataCodewordsPerBlock: 46
                    }, {
                        numBlocks: 32,
                        dataCodewordsPerBlock: 47
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 48,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 14,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 42,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 32,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 161089,
                versionNumber: 39,
                alignmentPatternCenters: [6, 26, 54, 82, 110, 138, 166],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 20,
                        dataCodewordsPerBlock: 117
                    }, {
                        numBlocks: 4,
                        dataCodewordsPerBlock: 118
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 40,
                        dataCodewordsPerBlock: 47
                    }, {
                        numBlocks: 7,
                        dataCodewordsPerBlock: 48
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 43,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 22,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 10,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 67,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }, {
                infoBits: 167017,
                versionNumber: 40,
                alignmentPatternCenters: [6, 30, 58, 86, 114, 142, 170],
                errorCorrectionLevels: [{
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 19,
                        dataCodewordsPerBlock: 118
                    }, {
                        numBlocks: 6,
                        dataCodewordsPerBlock: 119
                    }]
                }, {
                    ecCodewordsPerBlock: 28,
                    ecBlocks: [{
                        numBlocks: 18,
                        dataCodewordsPerBlock: 47
                    }, {
                        numBlocks: 31,
                        dataCodewordsPerBlock: 48
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 34,
                        dataCodewordsPerBlock: 24
                    }, {
                        numBlocks: 34,
                        dataCodewordsPerBlock: 25
                    }]
                }, {
                    ecCodewordsPerBlock: 30,
                    ecBlocks: [{
                        numBlocks: 20,
                        dataCodewordsPerBlock: 15
                    }, {
                        numBlocks: 61,
                        dataCodewordsPerBlock: 16
                    }]
                }]
            }]
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = i(0);
            function s(u, f, d, h) {
                var x = u.x - f.x + d.x - h.x
                  , y = u.y - f.y + d.y - h.y;
                if (x === 0 && y === 0)
                    return {
                        a11: f.x - u.x,
                        a12: f.y - u.y,
                        a13: 0,
                        a21: d.x - f.x,
                        a22: d.y - f.y,
                        a23: 0,
                        a31: u.x,
                        a32: u.y,
                        a33: 1
                    };
                var m = f.x - d.x
                  , E = h.x - d.x
                  , g = f.y - d.y
                  , p = h.y - d.y
                  , v = m * p - E * g
                  , _ = (x * p - E * y) / v
                  , b = (m * y - x * g) / v;
                return {
                    a11: f.x - u.x + _ * f.x,
                    a12: f.y - u.y + _ * f.y,
                    a13: _,
                    a21: h.x - u.x + b * h.x,
                    a22: h.y - u.y + b * h.y,
                    a23: b,
                    a31: u.x,
                    a32: u.y,
                    a33: 1
                }
            }
            function a(u, f, d, h) {
                var x = s(u, f, d, h);
                return {
                    a11: x.a22 * x.a33 - x.a23 * x.a32,
                    a12: x.a13 * x.a32 - x.a12 * x.a33,
                    a13: x.a12 * x.a23 - x.a13 * x.a22,
                    a21: x.a23 * x.a31 - x.a21 * x.a33,
                    a22: x.a11 * x.a33 - x.a13 * x.a31,
                    a23: x.a13 * x.a21 - x.a11 * x.a23,
                    a31: x.a21 * x.a32 - x.a22 * x.a31,
                    a32: x.a12 * x.a31 - x.a11 * x.a32,
                    a33: x.a11 * x.a22 - x.a12 * x.a21
                }
            }
            function l(u, f) {
                return {
                    a11: u.a11 * f.a11 + u.a21 * f.a12 + u.a31 * f.a13,
                    a12: u.a12 * f.a11 + u.a22 * f.a12 + u.a32 * f.a13,
                    a13: u.a13 * f.a11 + u.a23 * f.a12 + u.a33 * f.a13,
                    a21: u.a11 * f.a21 + u.a21 * f.a22 + u.a31 * f.a23,
                    a22: u.a12 * f.a21 + u.a22 * f.a22 + u.a32 * f.a23,
                    a23: u.a13 * f.a21 + u.a23 * f.a22 + u.a33 * f.a23,
                    a31: u.a11 * f.a31 + u.a21 * f.a32 + u.a31 * f.a33,
                    a32: u.a12 * f.a31 + u.a22 * f.a32 + u.a32 * f.a33,
                    a33: u.a13 * f.a31 + u.a23 * f.a32 + u.a33 * f.a33
                }
            }
            function c(u, f) {
                for (var d = a({
                    x: 3.5,
                    y: 3.5
                }, {
                    x: f.dimension - 3.5,
                    y: 3.5
                }, {
                    x: f.dimension - 6.5,
                    y: f.dimension - 6.5
                }, {
                    x: 3.5,
                    y: f.dimension - 3.5
                }), h = s(f.topLeft, f.topRight, f.alignmentPattern, f.bottomLeft), x = l(h, d), y = o.BitMatrix.createEmpty(f.dimension, f.dimension), m = function(b, C) {
                    var B = x.a13 * b + x.a23 * C + x.a33;
                    return {
                        x: (x.a11 * b + x.a21 * C + x.a31) / B,
                        y: (x.a12 * b + x.a22 * C + x.a32) / B
                    }
                }, E = 0; E < f.dimension; E++)
                    for (var g = 0; g < f.dimension; g++) {
                        var p = g + .5
                          , v = E + .5
                          , _ = m(p, v);
                        y.set(g, E, u.get(Math.floor(_.x), Math.floor(_.y)))
                    }
                return {
                    matrix: y,
                    mappingFunction: m
                }
            }
            n.extract = c
        }
        , function(r, n, i) {
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var o = 4
              , s = .5
              , a = 1.5
              , l = function(p, v) {
                return Math.sqrt(Math.pow(v.x - p.x, 2) + Math.pow(v.y - p.y, 2))
            };
            function c(p) {
                return p.reduce(function(v, _) {
                    return v + _
                })
            }
            function u(p, v, _) {
                var b, C, B, T, A = l(p, v), w = l(v, _), S = l(p, _), D, F, R;
                return w >= A && w >= S ? (b = [v, p, _],
                D = b[0],
                F = b[1],
                R = b[2]) : S >= w && S >= A ? (C = [p, v, _],
                D = C[0],
                F = C[1],
                R = C[2]) : (B = [p, _, v],
                D = B[0],
                F = B[1],
                R = B[2]),
                (R.x - F.x) * (D.y - F.y) - (R.y - F.y) * (D.x - F.x) < 0 && (T = [R, D],
                D = T[0],
                R = T[1]),
                {
                    bottomLeft: D,
                    topLeft: F,
                    topRight: R
                }
            }
            function f(p, v, _, b) {
                var C = (c(h(p, _, b, 5)) / 7 + c(h(p, v, b, 5)) / 7 + c(h(_, p, b, 5)) / 7 + c(h(v, p, b, 5)) / 7) / 4;
                if (C < 1)
                    throw new Error("Invalid module size");
                var B = Math.round(l(p, v) / C)
                  , T = Math.round(l(p, _) / C)
                  , A = Math.floor((B + T) / 2) + 7;
                switch (A % 4) {
                case 0:
                    A++;
                    break;
                case 2:
                    A--;
                    break
                }
                return {
                    dimension: A,
                    moduleSize: C
                }
            }
            function d(p, v, _, b) {
                var C = [{
                    x: Math.floor(p.x),
                    y: Math.floor(p.y)
                }], B = Math.abs(v.y - p.y) > Math.abs(v.x - p.x), T, A, w, S;
                B ? (T = Math.floor(p.y),
                A = Math.floor(p.x),
                w = Math.floor(v.y),
                S = Math.floor(v.x)) : (T = Math.floor(p.x),
                A = Math.floor(p.y),
                w = Math.floor(v.x),
                S = Math.floor(v.y));
                for (var D = Math.abs(w - T), F = Math.abs(S - A), R = Math.floor(-D / 2), P = T < w ? 1 : -1, N = A < S ? 1 : -1, j = !0, K = T, oe = A; K !== w + P; K += P) {
                    var U = B ? oe : K
                      , $ = B ? K : oe;
                    if (_.get(U, $) !== j && (j = !j,
                    C.push({
                        x: U,
                        y: $
                    }),
                    C.length === b + 1))
                        break;
                    if (R += F,
                    R > 0) {
                        if (oe === S)
                            break;
                        oe += N,
                        R -= D
                    }
                }
                for (var V = [], W = 0; W < b; W++)
                    C[W] && C[W + 1] ? V.push(l(C[W], C[W + 1])) : V.push(0);
                return V
            }
            function h(p, v, _, b) {
                var C, B = v.y - p.y, T = v.x - p.x, A = d(p, v, _, Math.ceil(b / 2)), w = d(p, {
                    x: p.x - T,
                    y: p.y - B
                }, _, Math.ceil(b / 2)), S = A.shift() + w.shift() - 1;
                return (C = w.concat(S)).concat.apply(C, A)
            }
            function x(p, v) {
                var _ = c(p) / c(v)
                  , b = 0;
                return v.forEach(function(C, B) {
                    b += Math.pow(p[B] - C * _, 2)
                }),
                {
                    averageSize: _,
                    error: b
                }
            }
            function y(p, v, _) {
                try {
                    var b = h(p, {
                        x: -1,
                        y: p.y
                    }, _, v.length)
                      , C = h(p, {
                        x: p.x,
                        y: -1
                    }, _, v.length)
                      , B = {
                        x: Math.max(0, p.x - p.y) - 1,
                        y: Math.max(0, p.y - p.x) - 1
                    }
                      , T = h(p, B, _, v.length)
                      , A = {
                        x: Math.min(_.width, p.x + p.y) + 1,
                        y: Math.min(_.height, p.y + p.x) + 1
                    }
                      , w = h(p, A, _, v.length)
                      , S = x(b, v)
                      , D = x(C, v)
                      , F = x(T, v)
                      , R = x(w, v)
                      , P = Math.sqrt(S.error * S.error + D.error * D.error + F.error * F.error + R.error * R.error)
                      , N = (S.averageSize + D.averageSize + F.averageSize + R.averageSize) / 4
                      , j = (Math.pow(S.averageSize - N, 2) + Math.pow(D.averageSize - N, 2) + Math.pow(F.averageSize - N, 2) + Math.pow(R.averageSize - N, 2)) / N;
                    return P + j
                } catch {
                    return 1 / 0
                }
            }
            function m(p, v) {
                for (var _ = Math.round(v.x); p.get(_, Math.round(v.y)); )
                    _--;
                for (var b = Math.round(v.x); p.get(b, Math.round(v.y)); )
                    b++;
                for (var C = (_ + b) / 2, B = Math.round(v.y); p.get(Math.round(C), B); )
                    B--;
                for (var T = Math.round(v.y); p.get(Math.round(C), T); )
                    T++;
                var A = (B + T) / 2;
                return {
                    x: C,
                    y: A
                }
            }
            function E(p) {
                for (var v = [], _ = [], b = [], C = [], B = function(U) {
                    for (var $ = 0, V = !1, W = [0, 0, 0, 0, 0], H = function(G) {
                        var re = p.get(G, U);
                        if (re === V)
                            $++;
                        else {
                            W = [W[1], W[2], W[3], W[4], $],
                            $ = 1,
                            V = re;
                            var te = c(W) / 7
                              , he = Math.abs(W[0] - te) < te && Math.abs(W[1] - te) < te && Math.abs(W[2] - 3 * te) < 3 * te && Math.abs(W[3] - te) < te && Math.abs(W[4] - te) < te && !re
                              , xe = c(W.slice(-3)) / 3
                              , ve = Math.abs(W[2] - xe) < xe && Math.abs(W[3] - xe) < xe && Math.abs(W[4] - xe) < xe && re;
                            if (he) {
                                var I = G - W[3] - W[4]
                                  , z = I - W[2]
                                  , q = {
                                    startX: z,
                                    endX: I,
                                    y: U
                                }
                                  , ce = _.filter(function(L) {
                                    return z >= L.bottom.startX && z <= L.bottom.endX || I >= L.bottom.startX && z <= L.bottom.endX || z <= L.bottom.startX && I >= L.bottom.endX && W[2] / (L.bottom.endX - L.bottom.startX) < a && W[2] / (L.bottom.endX - L.bottom.startX) > s
                                });
                                ce.length > 0 ? ce[0].bottom = q : _.push({
                                    top: q,
                                    bottom: q
                                })
                            }
                            if (ve) {
                                var fe = G - W[4]
                                  , k = fe - W[3]
                                  , q = {
                                    startX: k,
                                    y: U,
                                    endX: fe
                                }
                                  , ce = C.filter(function(ee) {
                                    return k >= ee.bottom.startX && k <= ee.bottom.endX || fe >= ee.bottom.startX && k <= ee.bottom.endX || k <= ee.bottom.startX && fe >= ee.bottom.endX && W[2] / (ee.bottom.endX - ee.bottom.startX) < a && W[2] / (ee.bottom.endX - ee.bottom.startX) > s
                                });
                                ce.length > 0 ? ce[0].bottom = q : C.push({
                                    top: q,
                                    bottom: q
                                })
                            }
                        }
                    }, Q = -1; Q <= p.width; Q++)
                        H(Q);
                    v.push.apply(v, _.filter(function(G) {
                        return G.bottom.y !== U && G.bottom.y - G.top.y >= 2
                    })),
                    _ = _.filter(function(G) {
                        return G.bottom.y === U
                    }),
                    b.push.apply(b, C.filter(function(G) {
                        return G.bottom.y !== U
                    })),
                    C = C.filter(function(G) {
                        return G.bottom.y === U
                    })
                }, T = 0; T <= p.height; T++)
                    B(T);
                v.push.apply(v, _.filter(function(U) {
                    return U.bottom.y - U.top.y >= 2
                })),
                b.push.apply(b, C);
                var A = v.filter(function(U) {
                    return U.bottom.y - U.top.y >= 2
                }).map(function(U) {
                    var $ = (U.top.startX + U.top.endX + U.bottom.startX + U.bottom.endX) / 4
                      , V = (U.top.y + U.bottom.y + 1) / 2;
                    if (p.get(Math.round($), Math.round(V))) {
                        var W = [U.top.endX - U.top.startX, U.bottom.endX - U.bottom.startX, U.bottom.y - U.top.y + 1]
                          , H = c(W) / W.length
                          , Q = y({
                            x: Math.round($),
                            y: Math.round(V)
                        }, [1, 1, 3, 1, 1], p);
                        return {
                            score: Q,
                            x: $,
                            y: V,
                            size: H
                        }
                    }
                }).filter(function(U) {
                    return !!U
                }).sort(function(U, $) {
                    return U.score - $.score
                }).map(function(U, $, V) {
                    if ($ > o)
                        return null;
                    var W = V.filter(function(Q, G) {
                        return $ !== G
                    }).map(function(Q) {
                        return {
                            x: Q.x,
                            y: Q.y,
                            score: Q.score + Math.pow(Q.size - U.size, 2) / U.size,
                            size: Q.size
                        }
                    }).sort(function(Q, G) {
                        return Q.score - G.score
                    });
                    if (W.length < 2)
                        return null;
                    var H = U.score + W[0].score + W[1].score;
                    return {
                        points: [U].concat(W.slice(0, 2)),
                        score: H
                    }
                }).filter(function(U) {
                    return !!U
                }).sort(function(U, $) {
                    return U.score - $.score
                });
                if (A.length === 0)
                    return null;
                var w = u(A[0].points[0], A[0].points[1], A[0].points[2])
                  , S = w.topRight
                  , D = w.topLeft
                  , F = w.bottomLeft
                  , R = g(p, b, S, D, F)
                  , P = [];
                R && P.push({
                    alignmentPattern: {
                        x: R.alignmentPattern.x,
                        y: R.alignmentPattern.y
                    },
                    bottomLeft: {
                        x: F.x,
                        y: F.y
                    },
                    dimension: R.dimension,
                    topLeft: {
                        x: D.x,
                        y: D.y
                    },
                    topRight: {
                        x: S.x,
                        y: S.y
                    }
                });
                var N = m(p, S)
                  , j = m(p, D)
                  , K = m(p, F)
                  , oe = g(p, b, N, j, K);
                return oe && P.push({
                    alignmentPattern: {
                        x: oe.alignmentPattern.x,
                        y: oe.alignmentPattern.y
                    },
                    bottomLeft: {
                        x: K.x,
                        y: K.y
                    },
                    topLeft: {
                        x: j.x,
                        y: j.y
                    },
                    topRight: {
                        x: N.x,
                        y: N.y
                    },
                    dimension: oe.dimension
                }),
                P.length === 0 ? null : P
            }
            n.locate = E;
            function g(p, v, _, b, C) {
                var B, T, A;
                try {
                    B = f(b, _, C, p),
                    T = B.dimension,
                    A = B.moduleSize
                } catch {
                    return null
                }
                var w = {
                    x: _.x - b.x + C.x,
                    y: _.y - b.y + C.y
                }
                  , S = (l(b, C) + l(b, _)) / 2 / A
                  , D = 1 - 3 / S
                  , F = {
                    x: b.x + D * (w.x - b.x),
                    y: b.y + D * (w.y - b.y)
                }
                  , R = v.map(function(N) {
                    var j = (N.top.startX + N.top.endX + N.bottom.startX + N.bottom.endX) / 4
                      , K = (N.top.y + N.bottom.y + 1) / 2;
                    if (p.get(Math.floor(j), Math.floor(K))) {
                        var oe = [N.top.endX - N.top.startX, N.bottom.endX - N.bottom.startX, N.bottom.y - N.top.y + 1];
                        c(oe) / oe.length;
                        var U = y({
                            x: Math.floor(j),
                            y: Math.floor(K)
                        }, [1, 1, 1], p)
                          , $ = U + l({
                            x: j,
                            y: K
                        }, F);
                        return {
                            x: j,
                            y: K,
                            score: $
                        }
                    }
                }).filter(function(N) {
                    return !!N
                }).sort(function(N, j) {
                    return N.score - j.score
                })
                  , P = S >= 15 && R.length ? R[0] : F;
                return {
                    alignmentPattern: P,
                    dimension: T
                }
            }
        }
        ]).default
    })
}
)(QM);
var Lwe = QM.exports;
const G6e = Gi(Lwe);
class $we extends n1 {
    constructor() {
        super(),
        this.handleVisibilityChange = () => {
            const e = {
                isActive: document.hidden !== !0
            };
            this.notifyListeners("appStateChange", e),
            document.hidden ? this.notifyListeners("pause", null) : this.notifyListeners("resume", null)
        }
        ,
        document.addEventListener("visibilitychange", this.handleVisibilityChange, !1)
    }
    exitApp() {
        throw this.unimplemented("Not implemented on web.")
    }
    async getInfo() {
        throw this.unimplemented("Not implemented on web.")
    }
    async getLaunchUrl() {
        return {
            url: ""
        }
    }
    async getState() {
        return {
            isActive: document.hidden !== !0
        }
    }
    async minimizeApp() {
        throw this.unimplemented("Not implemented on web.")
    }
    async toggleBackButtonHandler() {
        throw this.unimplemented("Not implemented on web.")
    }
}
const Uwe = Object.freeze(Object.defineProperty({
    __proto__: null,
    AppWeb: $we
}, Symbol.toStringTag, {
    value: "Module"
}));
var n5 = function() {
    return n5 = Object.assign || function(e) {
        for (var r, n = 1, i = arguments.length; n < i; n++) {
            r = arguments[n];
            for (var o in r)
                Object.prototype.hasOwnProperty.call(r, o) && (e[o] = r[o])
        }
        return e
    }
    ,
    n5.apply(this, arguments)
};
function H6e(t, e, r, n) {
    function i(o) {
        return o instanceof r ? o : new r(function(s) {
            s(o)
        }
        )
    }
    return new (r || (r = Promise))(function(o, s) {
        function a(u) {
            try {
                c(n.next(u))
            } catch (f) {
                s(f)
            }
        }
        function l(u) {
            try {
                c(n.throw(u))
            } catch (f) {
                s(f)
            }
        }
        function c(u) {
            u.done ? o(u.value) : i(u.value).then(a, l)
        }
        c((n = n.apply(t, e || [])).next())
    }
    )
}
function V6e(t, e) {
    var r = {
        label: 0,
        sent: function() {
            if (o[0] & 1)
                throw o[1];
            return o[1]
        },
        trys: [],
        ops: []
    }, n, i, o, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
    return s.next = a(0),
    s.throw = a(1),
    s.return = a(2),
    typeof Symbol == "function" && (s[Symbol.iterator] = function() {
        return this
    }
    ),
    s;
    function a(c) {
        return function(u) {
            return l([c, u])
        }
    }
    function l(c) {
        if (n)
            throw new TypeError("Generator is already executing.");
        for (; s && (s = 0,
        c[0] && (r = 0)),
        r; )
            try {
                if (n = 1,
                i && (o = c[0] & 2 ? i.return : c[0] ? i.throw || ((o = i.return) && o.call(i),
                0) : i.next) && !(o = o.call(i, c[1])).done)
                    return o;
                switch (i = 0,
                o && (c = [c[0] & 2, o.value]),
                c[0]) {
                case 0:
                case 1:
                    o = c;
                    break;
                case 4:
                    return r.label++,
                    {
                        value: c[1],
                        done: !1
                    };
                case 5:
                    r.label++,
                    i = c[1],
                    c = [0];
                    continue;
                case 7:
                    c = r.ops.pop(),
                    r.trys.pop();
                    continue;
                default:
                    if (o = r.trys,
                    !(o = o.length > 0 && o[o.length - 1]) && (c[0] === 6 || c[0] === 2)) {
                        r = 0;
                        continue
                    }
                    if (c[0] === 3 && (!o || c[1] > o[0] && c[1] < o[3])) {
                        r.label = c[1];
                        break
                    }
                    if (c[0] === 6 && r.label < o[1]) {
                        r.label = o[1],
                        o = c;
                        break
                    }
                    if (o && r.label < o[2]) {
                        r.label = o[2],
                        r.ops.push(c);
                        break
                    }
                    o[2] && r.ops.pop(),
                    r.trys.pop();
                    continue
                }
                c = e.call(t, r)
            } catch (u) {
                c = [6, u],
                i = 0
            } finally {
                n = o = 0
            }
        if (c[0] & 5)
            throw c[1];
        return {
            value: c[0] ? c[1] : void 0,
            done: !0
        }
    }
}
function z6e(t, e, r) {
    if (r || arguments.length === 2)
        for (var n = 0, i = e.length, o; n < i; n++)
            (o || !(n in e)) && (o || (o = Array.prototype.slice.call(e, 0, n)),
            o[n] = e[n]);
    return t.concat(o || Array.prototype.slice.call(e))
}
function Gwe(t, e) {
    if (t.match(/^[a-z]+:\/\//i))
        return t;
    if (t.match(/^\/\//))
        return window.location.protocol + t;
    if (t.match(/^[a-z]+:/i))
        return t;
    const r = document.implementation.createHTMLDocument()
      , n = r.createElement("base")
      , i = r.createElement("a");
    return r.head.appendChild(n),
    r.body.appendChild(i),
    e && (n.href = e),
    i.href = t,
    i.href
}
const Hwe = ( () => {
    let t = 0;
    const e = () => `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4);
    return () => (t += 1,
    `u${e()}${t}`)
}
)();
function na(t) {
    const e = [];
    for (let r = 0, n = t.length; r < n; r++)
        e.push(t[r]);
    return e
}
let dc = null;
function eN(t={}) {
    return dc || (t.includeStyleProperties ? (dc = t.includeStyleProperties,
    dc) : (dc = na(window.getComputedStyle(document.documentElement)),
    dc))
}
function cp(t, e) {
    const n = (t.ownerDocument.defaultView || window).getComputedStyle(t).getPropertyValue(e);
    return n ? parseFloat(n.replace("px", "")) : 0
}
function Vwe(t) {
    const e = cp(t, "border-left-width")
      , r = cp(t, "border-right-width");
    return t.clientWidth + e + r
}
function zwe(t) {
    const e = cp(t, "border-top-width")
      , r = cp(t, "border-bottom-width");
    return t.clientHeight + e + r
}
function kC(t, e={}) {
    const r = e.width || Vwe(t)
      , n = e.height || zwe(t);
    return {
        width: r,
        height: n
    }
}
function jwe() {
    let t, e;
    try {
        e = process
    } catch {}
    const r = e && e.env ? e.env.devicePixelRatio : null;
    return r && (t = parseInt(r, 10),
    Number.isNaN(t) && (t = 1)),
    t || window.devicePixelRatio || 1
}
const Nn = 16384;
function Wwe(t) {
    (t.width > Nn || t.height > Nn) && (t.width > Nn && t.height > Nn ? t.width > t.height ? (t.height *= Nn / t.width,
    t.width = Nn) : (t.width *= Nn / t.height,
    t.height = Nn) : t.width > Nn ? (t.height *= Nn / t.width,
    t.width = Nn) : (t.width *= Nn / t.height,
    t.height = Nn))
}
function Ywe(t, e={}) {
    return t.toBlob ? new Promise(r => {
        t.toBlob(r, e.type ? e.type : "image/png", e.quality ? e.quality : 1)
    }
    ) : new Promise(r => {
        const n = window.atob(t.toDataURL(e.type ? e.type : void 0, e.quality ? e.quality : void 0).split(",")[1])
          , i = n.length
          , o = new Uint8Array(i);
        for (let s = 0; s < i; s += 1)
            o[s] = n.charCodeAt(s);
        r(new Blob([o],{
            type: e.type ? e.type : "image/png"
        }))
    }
    )
}
function up(t) {
    return new Promise( (e, r) => {
        const n = new Image;
        n.onload = () => {
            n.decode().then( () => {
                requestAnimationFrame( () => e(n))
            }
            )
        }
        ,
        n.onerror = r,
        n.crossOrigin = "anonymous",
        n.decoding = "async",
        n.src = t
    }
    )
}
async function Xwe(t) {
    return Promise.resolve().then( () => new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then(e => `data:image/svg+xml;charset=utf-8,${e}`)
}
async function Kwe(t, e, r) {
    const n = "http://www.w3.org/2000/svg"
      , i = document.createElementNS(n, "svg")
      , o = document.createElementNS(n, "foreignObject");
    return i.setAttribute("width", `${e}`),
    i.setAttribute("height", `${r}`),
    i.setAttribute("viewBox", `0 0 ${e} ${r}`),
    o.setAttribute("width", "100%"),
    o.setAttribute("height", "100%"),
    o.setAttribute("x", "0"),
    o.setAttribute("y", "0"),
    o.setAttribute("externalResourcesRequired", "true"),
    i.appendChild(o),
    o.appendChild(t),
    Xwe(i)
}
const Pn = (t, e) => {
    if (t instanceof e)
        return !0;
    const r = Object.getPrototypeOf(t);
    return r === null ? !1 : r.constructor.name === e.name || Pn(r, e)
}
;
function qwe(t) {
    const e = t.getPropertyValue("content");
    return `${t.cssText} content: '${e.replace(/'|"/g, "")}';`
}
function Zwe(t, e) {
    return eN(e).map(r => {
        const n = t.getPropertyValue(r)
          , i = t.getPropertyPriority(r);
        return `${r}: ${n}${i ? " !important" : ""};`
    }
    ).join(" ")
}
function Jwe(t, e, r, n) {
    const i = `.${t}:${e}`
      , o = r.cssText ? qwe(r) : Zwe(r, n);
    return document.createTextNode(`${i}{${o}}`)
}
function i5(t, e, r, n) {
    const i = window.getComputedStyle(t, r)
      , o = i.getPropertyValue("content");
    if (o === "" || o === "none")
        return;
    const s = Hwe();
    try {
        e.className = `${e.className} ${s}`
    } catch {
        return
    }
    const a = document.createElement("style");
    a.appendChild(Jwe(s, r, i, n)),
    e.appendChild(a)
}
function Qwe(t, e, r) {
    i5(t, e, ":before", r),
    i5(t, e, ":after", r)
}
const o5 = "application/font-woff"
  , s5 = "image/jpeg"
  , e3e = {
    woff: o5,
    woff2: o5,
    ttf: "application/font-truetype",
    eot: "application/vnd.ms-fontobject",
    png: "image/png",
    jpg: s5,
    jpeg: s5,
    gif: "image/gif",
    tiff: "image/tiff",
    svg: "image/svg+xml",
    webp: "image/webp"
};
function t3e(t) {
    const e = /\.([^./]*?)$/g.exec(t);
    return e ? e[1] : ""
}
function RC(t) {
    const e = t3e(t).toLowerCase();
    return e3e[e] || ""
}
function r3e(t) {
    return t.split(/,/)[1]
}
function t_(t) {
    return t.search(/^(data:)/) !== -1
}
function tN(t, e) {
    return `data:${e};base64,${t}`
}
async function rN(t, e, r) {
    const n = await fetch(t, e);
    if (n.status === 404)
        throw new Error(`Resource "${n.url}" not found`);
    const i = await n.blob();
    return new Promise( (o, s) => {
        const a = new FileReader;
        a.onerror = s,
        a.onloadend = () => {
            try {
                o(r({
                    res: n,
                    result: a.result
                }))
            } catch (l) {
                s(l)
            }
        }
        ,
        a.readAsDataURL(i)
    }
    )
}
const _v = {};
function n3e(t, e, r) {
    let n = t.replace(/\?.*/, "");
    return r && (n = t),
    /ttf|otf|eot|woff2?/i.test(n) && (n = n.replace(/.*\//, "")),
    e ? `[${e}]${n}` : n
}
async function MC(t, e, r) {
    const n = n3e(t, e, r.includeQueryParams);
    if (_v[n] != null)
        return _v[n];
    r.cacheBust && (t += (/\?/.test(t) ? "&" : "?") + new Date().getTime());
    let i;
    try {
        const o = await rN(t, r.fetchRequestInit, ({res: s, result: a}) => (e || (e = s.headers.get("Content-Type") || ""),
        r3e(a)));
        i = tN(o, e)
    } catch (o) {
        i = r.imagePlaceholder || "";
        let s = `Failed to fetch resource: ${t}`;
        o && (s = typeof o == "string" ? o : o.message),
        s && console.warn(s)
    }
    return _v[n] = i,
    i
}
async function i3e(t) {
    const e = t.toDataURL();
    return e === "data:," ? t.cloneNode(!1) : up(e)
}
async function o3e(t, e) {
    if (t.currentSrc) {
        const o = document.createElement("canvas")
          , s = o.getContext("2d");
        o.width = t.clientWidth,
        o.height = t.clientHeight,
        s == null || s.drawImage(t, 0, 0, o.width, o.height);
        const a = o.toDataURL();
        return up(a)
    }
    const r = t.poster
      , n = RC(r)
      , i = await MC(r, n, e);
    return up(i)
}
async function s3e(t, e) {
    var r;
    try {
        if (!((r = t == null ? void 0 : t.contentDocument) === null || r === void 0) && r.body)
            return await $1(t.contentDocument.body, e, !0)
    } catch {}
    return t.cloneNode(!1)
}
async function a3e(t, e) {
    return Pn(t, HTMLCanvasElement) ? i3e(t) : Pn(t, HTMLVideoElement) ? o3e(t, e) : Pn(t, HTMLIFrameElement) ? s3e(t, e) : t.cloneNode(nN(t))
}
const l3e = t => t.tagName != null && t.tagName.toUpperCase() === "SLOT"
  , nN = t => t.tagName != null && t.tagName.toUpperCase() === "SVG";
async function c3e(t, e, r) {
    var n, i;
    if (nN(e))
        return e;
    let o = [];
    return l3e(t) && t.assignedNodes ? o = na(t.assignedNodes()) : Pn(t, HTMLIFrameElement) && (!((n = t.contentDocument) === null || n === void 0) && n.body) ? o = na(t.contentDocument.body.childNodes) : o = na(((i = t.shadowRoot) !== null && i !== void 0 ? i : t).childNodes),
    o.length === 0 || Pn(t, HTMLVideoElement) || await o.reduce( (s, a) => s.then( () => $1(a, r)).then(l => {
        l && e.appendChild(l)
    }
    ), Promise.resolve()),
    e
}
function u3e(t, e, r) {
    const n = e.style;
    if (!n)
        return;
    const i = window.getComputedStyle(t);
    i.cssText ? (n.cssText = i.cssText,
    n.transformOrigin = i.transformOrigin) : eN(r).forEach(o => {
        let s = i.getPropertyValue(o);
        o === "font-size" && s.endsWith("px") && (s = `${Math.floor(parseFloat(s.substring(0, s.length - 2))) - .1}px`),
        Pn(t, HTMLIFrameElement) && o === "display" && s === "inline" && (s = "block"),
        o === "d" && e.getAttribute("d") && (s = `path(${e.getAttribute("d")})`),
        n.setProperty(o, s, i.getPropertyPriority(o))
    }
    )
}
function f3e(t, e) {
    Pn(t, HTMLTextAreaElement) && (e.innerHTML = t.value),
    Pn(t, HTMLInputElement) && e.setAttribute("value", t.value)
}
function d3e(t, e) {
    if (Pn(t, HTMLSelectElement)) {
        const r = e
          , n = Array.from(r.children).find(i => t.value === i.getAttribute("value"));
        n && n.setAttribute("selected", "")
    }
}
function h3e(t, e, r) {
    return Pn(e, Element) && (u3e(t, e, r),
    Qwe(t, e, r),
    f3e(t, e),
    d3e(t, e)),
    e
}
async function x3e(t, e) {
    const r = t.querySelectorAll ? t.querySelectorAll("use") : [];
    if (r.length === 0)
        return t;
    const n = {};
    for (let o = 0; o < r.length; o++) {
        const a = r[o].getAttribute("xlink:href");
        if (a) {
            const l = t.querySelector(a)
              , c = document.querySelector(a);
            !l && c && !n[a] && (n[a] = await $1(c, e, !0))
        }
    }
    const i = Object.values(n);
    if (i.length) {
        const o = "http://www.w3.org/1999/xhtml"
          , s = document.createElementNS(o, "svg");
        s.setAttribute("xmlns", o),
        s.style.position = "absolute",
        s.style.width = "0",
        s.style.height = "0",
        s.style.overflow = "hidden",
        s.style.display = "none";
        const a = document.createElementNS(o, "defs");
        s.appendChild(a);
        for (let l = 0; l < i.length; l++)
            a.appendChild(i[l]);
        t.appendChild(s)
    }
    return t
}
async function $1(t, e, r) {
    return !r && e.filter && !e.filter(t) ? null : Promise.resolve(t).then(n => a3e(n, e)).then(n => c3e(t, n, e)).then(n => h3e(t, n, e)).then(n => x3e(n, e))
}
const iN = /url\((['"]?)([^'"]+?)\1\)/g
  , p3e = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g
  , g3e = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
function m3e(t) {
    const e = t.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
    return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`,"g")
}
function v3e(t) {
    const e = [];
    return t.replace(iN, (r, n, i) => (e.push(i),
    r)),
    e.filter(r => !t_(r))
}
async function y3e(t, e, r, n, i) {
    try {
        const o = r ? Gwe(e, r) : e
          , s = RC(e);
        let a;
        if (i) {
            const l = await i(o);
            a = tN(l, s)
        } else
            a = await MC(o, s, n);
        return t.replace(m3e(e), `$1${a}$3`)
    } catch {}
    return t
}
function E3e(t, {preferredFontFormat: e}) {
    return e ? t.replace(g3e, r => {
        for (; ; ) {
            const [n,,i] = p3e.exec(r) || [];
            if (!i)
                return "";
            if (i === e)
                return `src: ${n};`
        }
    }
    ) : t
}
function oN(t) {
    return t.search(iN) !== -1
}
async function sN(t, e, r) {
    if (!oN(t))
        return t;
    const n = E3e(t, r);
    return v3e(n).reduce( (o, s) => o.then(a => y3e(a, s, e, r)), Promise.resolve(n))
}
async function hc(t, e, r) {
    var n;
    const i = (n = e.style) === null || n === void 0 ? void 0 : n.getPropertyValue(t);
    if (i) {
        const o = await sN(i, null, r);
        return e.style.setProperty(t, o, e.style.getPropertyPriority(t)),
        !0
    }
    return !1
}
async function _3e(t, e) {
    await hc("background", t, e) || await hc("background-image", t, e),
    await hc("mask", t, e) || await hc("-webkit-mask", t, e) || await hc("mask-image", t, e) || await hc("-webkit-mask-image", t, e)
}
async function b3e(t, e) {
    const r = Pn(t, HTMLImageElement);
    if (!(r && !t_(t.src)) && !(Pn(t, SVGImageElement) && !t_(t.href.baseVal)))
        return;
    const n = r ? t.src : t.href.baseVal
      , i = await MC(n, RC(n), e);
    await new Promise( (o, s) => {
        t.onload = o,
        t.onerror = e.onImageErrorHandler ? (...l) => {
            try {
                o(e.onImageErrorHandler(...l))
            } catch (c) {
                s(c)
            }
        }
        : s;
        const a = t;
        a.decode && (a.decode = o),
        a.loading === "lazy" && (a.loading = "eager"),
        r ? (t.srcset = "",
        t.src = i) : t.href.baseVal = i
    }
    )
}
async function C3e(t, e) {
    const n = na(t.childNodes).map(i => aN(i, e));
    await Promise.all(n).then( () => t)
}
async function aN(t, e) {
    Pn(t, Element) && (await _3e(t, e),
    await b3e(t, e),
    await C3e(t, e))
}
function A3e(t, e) {
    const {style: r} = t;
    e.backgroundColor && (r.backgroundColor = e.backgroundColor),
    e.width && (r.width = `${e.width}px`),
    e.height && (r.height = `${e.height}px`);
    const n = e.style;
    return n != null && Object.keys(n).forEach(i => {
        r[i] = n[i]
    }
    ),
    t
}
const a5 = {};
async function l5(t) {
    let e = a5[t];
    if (e != null)
        return e;
    const n = await (await fetch(t)).text();
    return e = {
        url: t,
        cssText: n
    },
    a5[t] = e,
    e
}
async function c5(t, e) {
    let r = t.cssText;
    const n = /url\(["']?([^"')]+)["']?\)/g
      , o = (r.match(/url\([^)]+\)/g) || []).map(async s => {
        let a = s.replace(n, "$1");
        return a.startsWith("https://") || (a = new URL(a,t.url).href),
        rN(a, e.fetchRequestInit, ({result: l}) => (r = r.replace(s, `url(${l})`),
        [s, l]))
    }
    );
    return Promise.all(o).then( () => r)
}
function u5(t) {
    if (t == null)
        return [];
    const e = []
      , r = /(\/\*[\s\S]*?\*\/)/gi;
    let n = t.replace(r, "");
    const i = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");
    for (; ; ) {
        const l = i.exec(n);
        if (l === null)
            break;
        e.push(l[0])
    }
    n = n.replace(i, "");
    const o = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi
      , s = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})"
      , a = new RegExp(s,"gi");
    for (; ; ) {
        let l = o.exec(n);
        if (l === null) {
            if (l = a.exec(n),
            l === null)
                break;
            o.lastIndex = a.lastIndex
        } else
            a.lastIndex = o.lastIndex;
        e.push(l[0])
    }
    return e
}
async function w3e(t, e) {
    const r = []
      , n = [];
    return t.forEach(i => {
        if ("cssRules"in i)
            try {
                na(i.cssRules || []).forEach( (o, s) => {
                    if (o.type === CSSRule.IMPORT_RULE) {
                        let a = s + 1;
                        const l = o.href
                          , c = l5(l).then(u => c5(u, e)).then(u => u5(u).forEach(f => {
                            try {
                                i.insertRule(f, f.startsWith("@import") ? a += 1 : i.cssRules.length)
                            } catch (d) {
                                console.error("Error inserting rule from remote css", {
                                    rule: f,
                                    error: d
                                })
                            }
                        }
                        )).catch(u => {
                            console.error("Error loading remote css", u.toString())
                        }
                        );
                        n.push(c)
                    }
                }
                )
            } catch (o) {
                const s = t.find(a => a.href == null) || document.styleSheets[0];
                i.href != null && n.push(l5(i.href).then(a => c5(a, e)).then(a => u5(a).forEach(l => {
                    s.insertRule(l, s.cssRules.length)
                }
                )).catch(a => {
                    console.error("Error loading remote stylesheet", a)
                }
                )),
                console.error("Error inlining remote css file", o)
            }
    }
    ),
    Promise.all(n).then( () => (t.forEach(i => {
        if ("cssRules"in i)
            try {
                na(i.cssRules || []).forEach(o => {
                    r.push(o)
                }
                )
            } catch (o) {
                console.error(`Error while reading CSS rules from ${i.href}`, o)
            }
    }
    ),
    r))
}
function B3e(t) {
    return t.filter(e => e.type === CSSRule.FONT_FACE_RULE).filter(e => oN(e.style.getPropertyValue("src")))
}
async function S3e(t, e) {
    if (t.ownerDocument == null)
        throw new Error("Provided element is not within a Document");
    const r = na(t.ownerDocument.styleSheets)
      , n = await w3e(r, e);
    return B3e(n)
}
function lN(t) {
    return t.trim().replace(/["']/g, "")
}
function T3e(t) {
    const e = new Set;
    function r(n) {
        (n.style.fontFamily || getComputedStyle(n).fontFamily).split(",").forEach(o => {
            e.add(lN(o))
        }
        ),
        Array.from(n.children).forEach(o => {
            o instanceof HTMLElement && r(o)
        }
        )
    }
    return r(t),
    e
}
async function cN(t, e) {
    const r = await S3e(t, e)
      , n = T3e(t);
    return (await Promise.all(r.filter(o => n.has(lN(o.style.fontFamily))).map(o => {
        const s = o.parentStyleSheet ? o.parentStyleSheet.href : null;
        return sN(o.cssText, s, e)
    }
    ))).join(`
`)
}
async function D3e(t, e) {
    const r = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : await cN(t, e);
    if (r) {
        const n = document.createElement("style")
          , i = document.createTextNode(r);
        n.appendChild(i),
        t.firstChild ? t.insertBefore(n, t.firstChild) : t.appendChild(n)
    }
}
async function uN(t, e={}) {
    const {width: r, height: n} = kC(t, e)
      , i = await $1(t, e, !0);
    return await D3e(i, e),
    await aN(i, e),
    A3e(i, e),
    await Kwe(i, r, n)
}
async function Ad(t, e={}) {
    const {width: r, height: n} = kC(t, e)
      , i = await uN(t, e)
      , o = await up(i)
      , s = document.createElement("canvas")
      , a = s.getContext("2d")
      , l = e.pixelRatio || jwe()
      , c = e.canvasWidth || r
      , u = e.canvasHeight || n;
    return s.width = c * l,
    s.height = u * l,
    e.skipAutoScale || Wwe(s),
    s.style.width = `${c}`,
    s.style.height = `${u}`,
    e.backgroundColor && (a.fillStyle = e.backgroundColor,
    a.fillRect(0, 0, s.width, s.height)),
    a.drawImage(o, 0, 0, s.width, s.height),
    s
}
async function F3e(t, e={}) {
    const {width: r, height: n} = kC(t, e);
    return (await Ad(t, e)).getContext("2d").getImageData(0, 0, r, n).data
}
async function P3e(t, e={}) {
    return (await Ad(t, e)).toDataURL()
}
async function I3e(t, e={}) {
    return (await Ad(t, e)).toDataURL("image/jpeg", e.quality || 1)
}
async function O3e(t, e={}) {
    const r = await Ad(t, e);
    return await Ywe(r)
}
async function k3e(t, e={}) {
    return cN(t, e)
}
const j6e = Object.freeze(Object.defineProperty({
    __proto__: null,
    getFontEmbedCSS: k3e,
    toBlob: O3e,
    toCanvas: Ad,
    toJpeg: I3e,
    toPixelData: F3e,
    toPng: P3e,
    toSvg: uN
}, Symbol.toStringTag, {
    value: "Module"
}));
export {me as $, Pt as A, ae as B, Ht as C, wS as D, Zn as E, K3e as F, be as G, f$ as H, sU as I, P_ as J, Nt as K, iq as L, h$ as M, Sp as N, hn as O, _L as P, O as Q, d6e as R, $3e as S, h6e as T, Gi as U, Xe as V, gs as W, vs as X, wo as Y, xt as Z, H6e as _, V6e as a, M6e as a$, RQ as a0, d4e as a1, Z4e as a2, j4e as a3, t6e as a4, Z3e as a5, i6e as a6, xi as a7, W4e as a8, mp as a9, Dp as aA, VL as aB, zL as aC, s$ as aD, vx as aE, $7 as aF, k7 as aG, aG as aH, L_e as aI, u6e as aJ, D6e as aK, X4e as aL, P6e as aM, F6e as aN, I6e as aO, O6e as aP, boe as aQ, L6e as aR, dr as aS, v0 as aT, K4e as aU, Y4e as aV, $6e as aW, d$ as aX, o6e as aY, Jr as aZ, _G as a_, kle as aa, mh as ab, kn as ac, _l as ad, m6e as ae, E6e as af, r6e as ag, f6e as ah, c6e as ai, _6e as aj, V4e as ak, oF as al, b6e as am, fU as an, Vf as ao, uU as ap, p$ as aq, N6e as ar, e6e as as, F_ as at, E_ as au, l6e as av, hi as aw, pi as ax, Hf as ay, oB as az, n5 as b, b4e as b$, R6e as b0, k6e as b1, q4e as b2, gd as b3, ZB as b4, eF as b5, JN as b6, ca as b7, la as b8, z4e as b9, n6e as bA, Bp as bB, st as bC, U6e as bD, nee as bE, G6e as bF, x$ as bG, A6e as bH, C6e as bI, Dse as bJ, ege as bK, w6e as bL, B6e as bM, S6e as bN, T6e as bO, y4e as bP, H3e as bQ, n4e as bR, t4e as bS, w4e as bT, B4e as bU, g4e as bV, m4e as bW, i4e as bX, SZ as bY, V3e as bZ, z3e as b_, Nwe as ba, er as bb, ZN as bc, Kf as bd, Wq as be, rr as bf, e4e as bg, Ax as bh, E4e as bi, W3e as bj, Y3e as bk, l$ as bl, ZL as bm, Gr as bn, g6e as bo, Ux as bp, Gt as bq, R0e as br, y6e as bs, Be as bt, v6e as bu, F4e as bv, mu as bw, Or as bx, Zv as by, It as bz, z6e as c, h4e as c0, x4e as c1, l4e as c2, c4e as c3, ys as c4, s4e as c5, f4e as c6, a4e as c7, A4e as c8, T4e as c9, v4e as ca, Q3e as cb, Gl as cc, XZ as cd, u4e as ce, S4e as cf, P4e as cg, o4e as ch, C4e as ci, Wp as cj, _4e as ck, q7 as cl, D4e as cm, p4e as cn, rS as co, R3e as cp, N3e as cq, s6e as cr, kl as cs, Q4e as ct, a6e as cu, H4e as cv, j6e as cw, O4e as d, k4e as e, R4e as f, M4e as g, N4e as h, L4e as i, $4e as j, U4e as k, G4e as l, I4e as m, X0 as n, td as o, J3e as p, my as q, ie as r, nq as s, X3e as t, q3e as u, L3e as v, U3e as w, J4e as x, M3e as y, q2 as z};
