UNPKG

flickrgallery

Version:
1,516 lines 100 kB
import { hasInjectionContext as es, inject as ts, getCurrentInstance as ss, ref as Et, reactive as ns, markRaw as ee, effectScope as rs, isRef as oe, isReactive as je, toRef as Pe, toRaw as is, nextTick as We, computed as wt, getCurrentScope as os, onScopeDispose as as, watch as ls, toRefs as Je, createElementBlock as j, openBlock as $, createElementVNode as z, normalizeClass as cs, resolveComponent as us, createVNode as Ke, createCommentVNode as Ne, Transition as ds, withCtx as hs, normalizeStyle as fs, toDisplayString as Ae, Fragment as ps, renderList as ms, withKeys as Ge, defineAsyncComponent as gs } from "vue"; /*! * pinia v3.0.2 * (c) 2025 Eduardo San Martin Morote * @license MIT */ let te; const ae = (e) => te = e, ys = process.env.NODE_ENV !== "production" ? Symbol("pinia") : ( /* istanbul ignore next */ Symbol() ); function H(e) { return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function"; } var ie; (function(e) { e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function"; })(ie || (ie = {})); const se = typeof window < "u"; function bt(e, t) { for (const n in t) { const s = t[n]; if (!(n in e)) continue; const r = e[n]; H(r) && H(s) && !oe(s) && !je(s) ? e[n] = bt(r, s) : e[n] = s; } return e; } const _t = () => { }; function Xe(e, t, n, s = _t) { e.push(t); const r = () => { const i = e.indexOf(t); i > -1 && (e.splice(i, 1), s()); }; return !n && os() && as(r), r; } function J(e, ...t) { e.slice().forEach((n) => { n(...t); }); } const Es = (e) => e(), Ze = Symbol(), ve = Symbol(); function De(e, t) { e instanceof Map && t instanceof Map ? t.forEach((n, s) => e.set(s, n)) : e instanceof Set && t instanceof Set && t.forEach(e.add, e); for (const n in t) { if (!t.hasOwnProperty(n)) continue; const s = t[n], r = e[n]; H(r) && H(s) && e.hasOwnProperty(n) && !oe(s) && !je(s) ? e[n] = De(r, s) : e[n] = s; } return e; } const ws = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : ( /* istanbul ignore next */ Symbol() ); function bs(e) { return !H(e) || !Object.prototype.hasOwnProperty.call(e, ws); } const { assign: F } = Object; function Ye(e) { return !!(oe(e) && e.effect); } function Qe(e, t, n, s) { const { state: r, actions: i, getters: o } = t, a = n.state.value[e]; let d; function u() { !a && (process.env.NODE_ENV === "production" || !s) && (n.state.value[e] = r ? r() : {}); const c = process.env.NODE_ENV !== "production" && s ? ( // use ref() to unwrap refs inside state TODO: check if this is still necessary Je(Et(r ? r() : {}).value) ) : Je(n.state.value[e]); return F(c, i, Object.keys(o || {}).reduce((h, b) => (process.env.NODE_ENV !== "production" && b in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${b}" in store "${e}".`), h[b] = ee(wt(() => { ae(n); const _ = n._s.get(e); return o[b].call(_, _); })), h), {})); } return d = ke(e, u, t, n, s, !0), d; } function ke(e, t, n = {}, s, r, i) { let o; const a = F({ actions: {} }, n); if (process.env.NODE_ENV !== "production" && !s._e.active) throw new Error("Pinia destroyed"); const d = { deep: !0 }; process.env.NODE_ENV !== "production" && (d.onTrigger = (g) => { u ? _ = g : u == !1 && !y._hotUpdating && (Array.isArray(_) ? _.push(g) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.")); }); let u, c, h = [], b = [], _; const f = s.state.value[e]; !i && !f && (process.env.NODE_ENV === "production" || !r) && (s.state.value[e] = {}); const E = Et({}); let m; function S(g) { let p; u = c = !1, process.env.NODE_ENV !== "production" && (_ = []), typeof g == "function" ? (g(s.state.value[e]), p = { type: ie.patchFunction, storeId: e, events: _ }) : (De(s.state.value[e], g), p = { type: ie.patchObject, payload: g, storeId: e, events: _ }); const O = m = Symbol(); We().then(() => { m === O && (u = !0); }), c = !0, J(h, p, s.state.value[e]); } const R = i ? function() { const { state: p } = n, O = p ? p() : {}; this.$patch((D) => { F(D, O); }); } : ( /* istanbul ignore next */ process.env.NODE_ENV !== "production" ? () => { throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`); } : _t ); function N() { o.stop(), h = [], b = [], s._s.delete(e); } const x = (g, p = "") => { if (Ze in g) return g[ve] = p, g; const O = function() { ae(s); const D = Array.from(arguments), Z = [], Re = []; function Yt(k) { Z.push(k); } function Qt(k) { Re.push(k); } J(b, { args: D, name: O[ve], store: y, after: Yt, onError: Qt }); let Y; try { Y = g.apply(this && this.$id === e ? this : y, D); } catch (k) { throw J(Re, k), k; } return Y instanceof Promise ? Y.then((k) => (J(Z, k), k)).catch((k) => (J(Re, k), Promise.reject(k))) : (J(Z, Y), Y); }; return O[Ze] = !0, O[ve] = p, O; }, A = /* @__PURE__ */ ee({ actions: {}, getters: {}, state: [], hotState: E }), L = { _p: s, // _s: scope, $id: e, $onAction: Xe.bind(null, b), $patch: S, $reset: R, $subscribe(g, p = {}) { const O = Xe(h, g, p.detached, () => D()), D = o.run(() => ls(() => s.state.value[e], (Z) => { (p.flush === "sync" ? c : u) && g({ storeId: e, type: ie.direct, events: _ }, Z); }, F({}, d, p))); return O; }, $dispose: N }, y = ns(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && se ? F( { _hmrPayload: A, _customProperties: ee(/* @__PURE__ */ new Set()) // devtools custom properties }, L // must be added later // setupStore ) : L); s._s.set(e, y); const U = (s._a && s._a.runWithContext || Es)(() => s._e.run(() => (o = rs()).run(() => t({ action: x })))); for (const g in U) { const p = U[g]; if (oe(p) && !Ye(p) || je(p)) process.env.NODE_ENV !== "production" && r ? E.value[g] = Pe(U, g) : i || (f && bs(p) && (oe(p) ? p.value = f[g] : De(p, f[g])), s.state.value[e][g] = p), process.env.NODE_ENV !== "production" && A.state.push(g); else if (typeof p == "function") { const O = process.env.NODE_ENV !== "production" && r ? p : x(p, g); U[g] = O, process.env.NODE_ENV !== "production" && (A.actions[g] = p), a.actions[g] = p; } else process.env.NODE_ENV !== "production" && Ye(p) && (A.getters[g] = i ? ( // @ts-expect-error n.getters[g] ) : p, se && (U._getters || // @ts-expect-error: same (U._getters = ee([]))).push(g)); } if (F(y, U), F(is(y), U), Object.defineProperty(y, "$state", { get: () => process.env.NODE_ENV !== "production" && r ? E.value : s.state.value[e], set: (g) => { if (process.env.NODE_ENV !== "production" && r) throw new Error("cannot set hotState"); S((p) => { F(p, g); }); } }), process.env.NODE_ENV !== "production" && (y._hotUpdate = ee((g) => { y._hotUpdating = !0, g._hmrPayload.state.forEach((p) => { if (p in y.$state) { const O = g.$state[p], D = y.$state[p]; typeof O == "object" && H(O) && H(D) ? bt(O, D) : g.$state[p] = D; } y[p] = Pe(g.$state, p); }), Object.keys(y.$state).forEach((p) => { p in g.$state || delete y[p]; }), u = !1, c = !1, s.state.value[e] = Pe(g._hmrPayload, "hotState"), c = !0, We().then(() => { u = !0; }); for (const p in g._hmrPayload.actions) { const O = g[p]; y[p] = // x(O, p); } for (const p in g._hmrPayload.getters) { const O = g._hmrPayload.getters[p], D = i ? ( // special handling of options api wt(() => (ae(s), O.call(y, y))) ) : O; y[p] = // D; } Object.keys(y._hmrPayload.getters).forEach((p) => { p in g._hmrPayload.getters || delete y[p]; }), Object.keys(y._hmrPayload.actions).forEach((p) => { p in g._hmrPayload.actions || delete y[p]; }), y._hmrPayload = g._hmrPayload, y._getters = g._getters, y._hotUpdating = !1; })), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && se) { const g = { writable: !0, configurable: !0, // avoid warning on devtools trying to display this property enumerable: !1 }; ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((p) => { Object.defineProperty(y, p, F({ value: y[p] }, g)); }); } return s._p.forEach((g) => { if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && se) { const p = o.run(() => g({ store: y, app: s._a, pinia: s, options: a })); Object.keys(p || {}).forEach((O) => y._customProperties.add(O)), F(y, p); } else F(y, o.run(() => g({ store: y, app: s._a, pinia: s, options: a }))); }), process.env.NODE_ENV !== "production" && y.$state && typeof y.$state == "object" && typeof y.$state.constructor == "function" && !y.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be state: () => new MyClass() Found in store "${y.$id}".`), f && i && n.hydrate && n.hydrate(y.$state, f), u = !0, c = !0, y; } /*! #__NO_SIDE_EFFECTS__ */ // @__NO_SIDE_EFFECTS__ function _s(e, t, n) { let s; const r = typeof t == "function"; s = r ? n : t; function i(o, a) { const d = es(); if (o = // in test mode, ignore the argument provided as we can always retrieve a // pinia instance with getActivePinia() (process.env.NODE_ENV === "test" && te && te._testing ? null : o) || (d ? ts(ys, null) : null), o && ae(o), process.env.NODE_ENV !== "production" && !te) 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.`); o = te, o._s.has(e) || (r ? ke(e, t, s, o) : Qe(e, s, o), process.env.NODE_ENV !== "production" && (i._pinia = o)); const u = o._s.get(e); if (process.env.NODE_ENV !== "production" && a) { const c = "__hot:" + e, h = r ? ke(c, t, s, o, !0) : Qe(c, F({}, s), o, !0); a._hotUpdate(h), delete o.state.value[c], o._s.delete(c); } if (process.env.NODE_ENV !== "production" && se) { const c = ss(); if (c && c.proxy && // avoid adding stores that are just built for hot module replacement !a) { const h = c.proxy, b = "_pStores" in h ? h._pStores : h._pStores = {}; b[e] = u; } } return u; } return i.$id = e, i; } function Ss(e) { ae(e); } const Os = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/, Rs = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/, Ps = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/; function Ns(e, t) { if (e === "__proto__" || e === "constructor" && t && typeof t == "object" && "prototype" in t) { As(e); return; } return t; } function As(e) { console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`); } function vs(e, t = {}) { if (typeof e != "string") return e; if (e[0] === '"' && e[e.length - 1] === '"' && e.indexOf("\\") === -1) return e.slice(1, -1); const n = e.trim(); if (n.length <= 9) switch (n.toLowerCase()) { case "true": return !0; case "false": return !1; case "undefined": return; case "null": return null; case "nan": return Number.NaN; case "infinity": return Number.POSITIVE_INFINITY; case "-infinity": return Number.NEGATIVE_INFINITY; } if (!Ps.test(e)) { if (t.strict) throw new SyntaxError("[destr] Invalid JSON"); return e; } try { if (Os.test(e) || Rs.test(e)) { if (t.strict) throw new Error("[destr] Possible prototype pollution"); return JSON.parse(e, Ns); } return JSON.parse(e); } catch (s) { if (t.strict) throw s; return e; } } function Cs(e, t) { if (e == null) return; let n = e; for (let s = 0; s < t.length; s++) { if (n == null || n[t[s]] == null) return; n = n[t[s]]; } return n; } function $e(e, t, n) { if (n.length === 0) return t; const s = n[0]; return n.length > 1 && (t = $e( typeof e != "object" || e === null || !Object.prototype.hasOwnProperty.call(e, s) ? Number.isInteger(Number(n[1])) ? [] : {} : e[s], t, Array.prototype.slice.call(n, 1) )), Number.isInteger(Number(s)) && Array.isArray(e) ? e.slice()[s] : Object.assign({}, e, { [s]: t }); } function St(e, t) { if (e == null || t.length === 0) return e; if (t.length === 1) { if (e == null) return e; if (Number.isInteger(t[0]) && Array.isArray(e)) return Array.prototype.slice.call(e, 0).splice(t[0], 1); const n = {}; for (const s in e) n[s] = e[s]; return delete n[t[0]], n; } if (e[t[0]] == null) { if (Number.isInteger(t[0]) && Array.isArray(e)) return Array.prototype.concat.call([], e); const n = {}; for (const s in e) n[s] = e[s]; return n; } return $e( e, St( e[t[0]], Array.prototype.slice.call(t, 1) ), [t[0]] ); } function Ot(e, t) { return t.map((n) => n.split(".")).map((n) => [n, Cs(e, n)]).filter((n) => n[1] !== void 0).reduce((n, s) => $e(n, s[1], s[0]), {}); } function Rt(e, t) { return t.map((n) => n.split(".")).reduce((n, s) => St(n, s), e); } function et(e, { storage: t, serializer: n, key: s, debug: r, pick: i, omit: o, beforeHydrate: a, afterHydrate: d }, u, c = !0) { try { c && (a == null || a(u)); const h = t.getItem(s); if (h) { const b = n.deserialize(h), _ = i ? Ot(b, i) : b, f = o ? Rt(_, o) : _; e.$patch(f); } c && (d == null || d(u)); } catch (h) { r && console.error("[pinia-plugin-persistedstate]", h); } } function tt(e, { storage: t, serializer: n, key: s, debug: r, pick: i, omit: o }) { try { const a = i ? Ot(e, i) : e, d = o ? Rt(a, o) : a, u = n.serialize(d); t.setItem(s, u); } catch (a) { r && console.error("[pinia-plugin-persistedstate]", a); } } function Ts(e, t, n) { const { pinia: s, store: r, options: { persist: i = n } } = e; if (!i) return; if (!(r.$id in s.state.value)) { const d = s._s.get(r.$id.replace("__hot:", "")); d && Promise.resolve().then(() => d.$persist()); return; } const a = (Array.isArray(i) ? i : i === !0 ? [{}] : [i]).map(t); r.$hydrate = ({ runHooks: d = !0 } = {}) => { a.forEach((u) => { et(r, u, e, d); }); }, r.$persist = () => { a.forEach((d) => { tt(r.$state, d); }); }, a.forEach((d) => { et(r, d, e), r.$subscribe( (u, c) => tt(c, d), { detached: !0 } ); }); } function xs(e = {}) { return function(t) { Ts( t, (n) => ({ key: (e.key ? e.key : (s) => s)(n.key ?? t.store.$id), debug: n.debug ?? e.debug ?? !1, serializer: n.serializer ?? e.serializer ?? { serialize: (s) => JSON.stringify(s), deserialize: (s) => vs(s) }, storage: n.storage ?? e.storage ?? window.localStorage, beforeHydrate: n.beforeHydrate, afterHydrate: n.afterHydrate, pick: n.pick, omit: n.omit }), e.auto ?? !1 ); }; } var st = xs(); /*! * PhotoSwipe Lightbox 5.4.4 - https://photoswipe.com * (c) 2024 Dmytro Semenov */ function ne(e, t, n) { const s = document.createElement(t); return e && (s.className = e), n && n.appendChild(s), s; } function Ds(e, t, n) { let s = `translate3d(${e}px,0px,0)`; return n !== void 0 && (s += ` scale3d(${n},${n},1)`), s; } function Ie(e, t, n) { e.style.width = typeof t == "number" ? `${t}px` : t, e.style.height = typeof n == "number" ? `${n}px` : n; } const I = { IDLE: "idle", LOADING: "loading", LOADED: "loaded", ERROR: "error" }; function ks(e) { return "button" in e && e.button === 1 || e.ctrlKey || e.metaKey || e.altKey || e.shiftKey; } function re(e, t, n = document) { let s = []; if (e instanceof Element) s = [e]; else if (e instanceof NodeList || Array.isArray(e)) s = Array.from(e); else { const r = typeof e == "string" ? e : t; r && (s = Array.from(n.querySelectorAll(r))); } return s; } function Is(e) { return typeof e == "function" && e.prototype && e.prototype.goTo; } function nt() { return !!(navigator.vendor && navigator.vendor.match(/apple/i)); } class Fs { /** * @param {T} type * @param {PhotoSwipeEventsMap[T]} [details] */ constructor(t, n) { this.type = t, this.defaultPrevented = !1, n && Object.assign(this, n); } preventDefault() { this.defaultPrevented = !0; } } class Ls { constructor() { this._listeners = {}, this._filters = {}, this.pswp = void 0, this.options = void 0; } /** * @template {keyof PhotoSwipeFiltersMap} T * @param {T} name * @param {PhotoSwipeFiltersMap[T]} fn * @param {number} priority */ addFilter(t, n, s = 100) { var r, i, o; this._filters[t] || (this._filters[t] = []), (r = this._filters[t]) === null || r === void 0 || r.push({ fn: n, priority: s }), (i = this._filters[t]) === null || i === void 0 || i.sort((a, d) => a.priority - d.priority), (o = this.pswp) === null || o === void 0 || o.addFilter(t, n, s); } /** * @template {keyof PhotoSwipeFiltersMap} T * @param {T} name * @param {PhotoSwipeFiltersMap[T]} fn */ removeFilter(t, n) { this._filters[t] && (this._filters[t] = this._filters[t].filter((s) => s.fn !== n)), this.pswp && this.pswp.removeFilter(t, n); } /** * @template {keyof PhotoSwipeFiltersMap} T * @param {T} name * @param {Parameters<PhotoSwipeFiltersMap[T]>} args * @returns {Parameters<PhotoSwipeFiltersMap[T]>[0]} */ applyFilters(t, ...n) { var s; return (s = this._filters[t]) === null || s === void 0 || s.forEach((r) => { n[0] = r.fn.apply(this, n); }), n[0]; } /** * @template {keyof PhotoSwipeEventsMap} T * @param {T} name * @param {EventCallback<T>} fn */ on(t, n) { var s, r; this._listeners[t] || (this._listeners[t] = []), (s = this._listeners[t]) === null || s === void 0 || s.push(n), (r = this.pswp) === null || r === void 0 || r.on(t, n); } /** * @template {keyof PhotoSwipeEventsMap} T * @param {T} name * @param {EventCallback<T>} fn */ off(t, n) { var s; this._listeners[t] && (this._listeners[t] = this._listeners[t].filter((r) => n !== r)), (s = this.pswp) === null || s === void 0 || s.off(t, n); } /** * @template {keyof PhotoSwipeEventsMap} T * @param {T} name * @param {PhotoSwipeEventsMap[T]} [details] * @returns {AugmentedEvent<T>} */ dispatch(t, n) { var s; if (this.pswp) return this.pswp.dispatch(t, n); const r = ( /** @type {AugmentedEvent<T>} */ new Fs(t, n) ); return (s = this._listeners[t]) === null || s === void 0 || s.forEach((i) => { i.call(this, r); }), r; } } class Us { /** * @param {string | false} imageSrc * @param {HTMLElement} container */ constructor(t, n) { if (this.element = ne("pswp__img pswp__img--placeholder", t ? "img" : "div", n), t) { const s = ( /** @type {HTMLImageElement} */ this.element ); s.decoding = "async", s.alt = "", s.src = t, s.setAttribute("role", "presentation"); } this.element.setAttribute("aria-hidden", "true"); } /** * @param {number} width * @param {number} height */ setDisplayedSize(t, n) { this.element && (this.element.tagName === "IMG" ? (Ie(this.element, 250, "auto"), this.element.style.transformOrigin = "0 0", this.element.style.transform = Ds(0, 0, t / 250)) : Ie(this.element, t, n)); } destroy() { var t; (t = this.element) !== null && t !== void 0 && t.parentNode && this.element.remove(), this.element = null; } } class Bs { /** * @param {SlideData} itemData Slide data * @param {PhotoSwipeBase} instance PhotoSwipe or PhotoSwipeLightbox instance * @param {number} index */ constructor(t, n, s) { this.instance = n, this.data = t, this.index = s, this.element = void 0, this.placeholder = void 0, this.slide = void 0, this.displayedImageWidth = 0, this.displayedImageHeight = 0, this.width = Number(this.data.w) || Number(this.data.width) || 0, this.height = Number(this.data.h) || Number(this.data.height) || 0, this.isAttached = !1, this.hasSlide = !1, this.isDecoding = !1, this.state = I.IDLE, this.data.type ? this.type = this.data.type : this.data.src ? this.type = "image" : this.type = "html", this.instance.dispatch("contentInit", { content: this }); } removePlaceholder() { this.placeholder && !this.keepPlaceholder() && setTimeout(() => { this.placeholder && (this.placeholder.destroy(), this.placeholder = void 0); }, 1e3); } /** * Preload content * * @param {boolean} isLazy * @param {boolean} [reload] */ load(t, n) { if (this.slide && this.usePlaceholder()) if (this.placeholder) { const s = this.placeholder.element; s && !s.parentElement && this.slide.container.prepend(s); } else { const s = this.instance.applyFilters( "placeholderSrc", // use image-based placeholder only for the first slide, // as rendering (even small stretched thumbnail) is an expensive operation this.data.msrc && this.slide.isFirstSlide ? this.data.msrc : !1, this ); this.placeholder = new Us(s, this.slide.container); } this.element && !n || this.instance.dispatch("contentLoad", { content: this, isLazy: t }).defaultPrevented || (this.isImageContent() ? (this.element = ne("pswp__img", "img"), this.displayedImageWidth && this.loadImage(t)) : (this.element = ne("pswp__content", "div"), this.element.innerHTML = this.data.html || ""), n && this.slide && this.slide.updateContentSize(!0)); } /** * Preload image * * @param {boolean} isLazy */ loadImage(t) { var n, s; if (!this.isImageContent() || !this.element || this.instance.dispatch("contentLoadImage", { content: this, isLazy: t }).defaultPrevented) return; const r = ( /** @type HTMLImageElement */ this.element ); this.updateSrcsetSizes(), this.data.srcset && (r.srcset = this.data.srcset), r.src = (n = this.data.src) !== null && n !== void 0 ? n : "", r.alt = (s = this.data.alt) !== null && s !== void 0 ? s : "", this.state = I.LOADING, r.complete ? this.onLoaded() : (r.onload = () => { this.onLoaded(); }, r.onerror = () => { this.onError(); }); } /** * Assign slide to content * * @param {Slide} slide */ setSlide(t) { this.slide = t, this.hasSlide = !0, this.instance = t.pswp; } /** * Content load success handler */ onLoaded() { this.state = I.LOADED, this.slide && this.element && (this.instance.dispatch("loadComplete", { slide: this.slide, content: this }), this.slide.isActive && this.slide.heavyAppended && !this.element.parentNode && (this.append(), this.slide.updateContentSize(!0)), (this.state === I.LOADED || this.state === I.ERROR) && this.removePlaceholder()); } /** * Content load error handler */ onError() { this.state = I.ERROR, this.slide && (this.displayError(), this.instance.dispatch("loadComplete", { slide: this.slide, isError: !0, content: this }), this.instance.dispatch("loadError", { slide: this.slide, content: this })); } /** * @returns {Boolean} If the content is currently loading */ isLoading() { return this.instance.applyFilters("isContentLoading", this.state === I.LOADING, this); } /** * @returns {Boolean} If the content is in error state */ isError() { return this.state === I.ERROR; } /** * @returns {boolean} If the content is image */ isImageContent() { return this.type === "image"; } /** * Update content size * * @param {Number} width * @param {Number} height */ setDisplayedSize(t, n) { if (this.element && (this.placeholder && this.placeholder.setDisplayedSize(t, n), !this.instance.dispatch("contentResize", { content: this, width: t, height: n }).defaultPrevented && (Ie(this.element, t, n), this.isImageContent() && !this.isError()))) { const s = !this.displayedImageWidth && t; this.displayedImageWidth = t, this.displayedImageHeight = n, s ? this.loadImage(!1) : this.updateSrcsetSizes(), this.slide && this.instance.dispatch("imageSizeChange", { slide: this.slide, width: t, height: n, content: this }); } } /** * @returns {boolean} If the content can be zoomed */ isZoomable() { return this.instance.applyFilters("isContentZoomable", this.isImageContent() && this.state !== I.ERROR, this); } /** * Update image srcset sizes attribute based on width and height */ updateSrcsetSizes() { if (!this.isImageContent() || !this.element || !this.data.srcset) return; const t = ( /** @type HTMLImageElement */ this.element ), n = this.instance.applyFilters("srcsetSizesWidth", this.displayedImageWidth, this); (!t.dataset.largestUsedSize || n > parseInt(t.dataset.largestUsedSize, 10)) && (t.sizes = n + "px", t.dataset.largestUsedSize = String(n)); } /** * @returns {boolean} If content should use a placeholder (from msrc by default) */ usePlaceholder() { return this.instance.applyFilters("useContentPlaceholder", this.isImageContent(), this); } /** * Preload content with lazy-loading param */ lazyLoad() { this.instance.dispatch("contentLazyLoad", { content: this }).defaultPrevented || this.load(!0); } /** * @returns {boolean} If placeholder should be kept after content is loaded */ keepPlaceholder() { return this.instance.applyFilters("isKeepingPlaceholder", this.isLoading(), this); } /** * Destroy the content */ destroy() { this.hasSlide = !1, this.slide = void 0, !this.instance.dispatch("contentDestroy", { content: this }).defaultPrevented && (this.remove(), this.placeholder && (this.placeholder.destroy(), this.placeholder = void 0), this.isImageContent() && this.element && (this.element.onload = null, this.element.onerror = null, this.element = void 0)); } /** * Display error message */ displayError() { if (this.slide) { var t, n; let s = ne("pswp__error-msg", "div"); s.innerText = (t = (n = this.instance.options) === null || n === void 0 ? void 0 : n.errorMsg) !== null && t !== void 0 ? t : "", s = /** @type {HTMLDivElement} */ this.instance.applyFilters("contentErrorElement", s, this), this.element = ne("pswp__content pswp__error-msg-container", "div"), this.element.appendChild(s), this.slide.container.innerText = "", this.slide.container.appendChild(this.element), this.slide.updateContentSize(!0), this.removePlaceholder(); } } /** * Append the content */ append() { if (this.isAttached || !this.element) return; if (this.isAttached = !0, this.state === I.ERROR) { this.displayError(); return; } if (this.instance.dispatch("contentAppend", { content: this }).defaultPrevented) return; const t = "decode" in this.element; this.isImageContent() ? t && this.slide && (!this.slide.isActive || nt()) ? (this.isDecoding = !0, this.element.decode().catch(() => { }).finally(() => { this.isDecoding = !1, this.appendImage(); })) : this.appendImage() : this.slide && !this.element.parentNode && this.slide.container.appendChild(this.element); } /** * Activate the slide, * active slide is generally the current one, * meaning the user can see it. */ activate() { this.instance.dispatch("contentActivate", { content: this }).defaultPrevented || !this.slide || (this.isImageContent() && this.isDecoding && !nt() ? this.appendImage() : this.isError() && this.load(!1, !0), this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "false")); } /** * Deactivate the content */ deactivate() { this.instance.dispatch("contentDeactivate", { content: this }), this.slide && this.slide.holderElement && this.slide.holderElement.setAttribute("aria-hidden", "true"); } /** * Remove the content from DOM */ remove() { this.isAttached = !1, !this.instance.dispatch("contentRemove", { content: this }).defaultPrevented && (this.element && this.element.parentNode && this.element.remove(), this.placeholder && this.placeholder.element && this.placeholder.element.remove()); } /** * Append the image content to slide container */ appendImage() { this.isAttached && (this.instance.dispatch("contentAppendImage", { content: this }).defaultPrevented || (this.slide && this.element && !this.element.parentNode && this.slide.container.appendChild(this.element), (this.state === I.LOADED || this.state === I.ERROR) && this.removePlaceholder())); } } function Ms(e, t) { if (e.getViewportSizeFn) { const n = e.getViewportSizeFn(e, t); if (n) return n; } return { x: document.documentElement.clientWidth, // TODO: height on mobile is very incosistent due to toolbar // find a way to improve this // // document.documentElement.clientHeight - doesn't seem to work well y: window.innerHeight }; } function de(e, t, n, s, r) { let i = 0; if (t.paddingFn) i = t.paddingFn(n, s, r)[e]; else if (t.padding) i = t.padding[e]; else { const o = "padding" + e[0].toUpperCase() + e.slice(1); t[o] && (i = t[o]); } return Number(i) || 0; } function zs(e, t, n, s) { return { x: t.x - de("left", e, t, n, s) - de("right", e, t, n, s), y: t.y - de("top", e, t, n, s) - de("bottom", e, t, n, s) }; } const rt = 4e3; class js { /** * @param {PhotoSwipeOptions} options PhotoSwipe options * @param {SlideData} itemData Slide data * @param {number} index Slide index * @param {PhotoSwipe} [pswp] PhotoSwipe instance, can be undefined if not initialized yet */ constructor(t, n, s, r) { this.pswp = r, this.options = t, this.itemData = n, this.index = s, this.panAreaSize = null, this.elementSize = null, this.fit = 1, this.fill = 1, this.vFill = 1, this.initial = 1, this.secondary = 1, this.max = 1, this.min = 1; } /** * Calculate initial, secondary and maximum zoom level for the specified slide. * * It should be called when either image or viewport size changes. * * @param {number} maxWidth * @param {number} maxHeight * @param {Point} panAreaSize */ update(t, n, s) { const r = { x: t, y: n }; this.elementSize = r, this.panAreaSize = s; const i = s.x / r.x, o = s.y / r.y; this.fit = Math.min(1, i < o ? i : o), this.fill = Math.min(1, i > o ? i : o), this.vFill = Math.min(1, o), this.initial = this._getInitial(), this.secondary = this._getSecondary(), this.max = Math.max(this.initial, this.secondary, this._getMax()), this.min = Math.min(this.fit, this.initial, this.secondary), this.pswp && this.pswp.dispatch("zoomLevelsUpdate", { zoomLevels: this, slideData: this.itemData }); } /** * Parses user-defined zoom option. * * @private * @param {'initial' | 'secondary' | 'max'} optionPrefix Zoom level option prefix (initial, secondary, max) * @returns { number | undefined } */ _parseZoomLevelOption(t) { const n = ( /** @type {'initialZoomLevel' | 'secondaryZoomLevel' | 'maxZoomLevel'} */ t + "ZoomLevel" ), s = this.options[n]; if (s) return typeof s == "function" ? s(this) : s === "fill" ? this.fill : s === "fit" ? this.fit : Number(s); } /** * Get zoom level to which image will be zoomed after double-tap gesture, * or when user clicks on zoom icon, * or mouse-click on image itself. * If you return 1 image will be zoomed to its original size. * * @private * @return {number} */ _getSecondary() { let t = this._parseZoomLevelOption("secondary"); return t || (t = Math.min(1, this.fit * 3), this.elementSize && t * this.elementSize.x > rt && (t = rt / this.elementSize.x), t); } /** * Get initial image zoom level. * * @private * @return {number} */ _getInitial() { return this._parseZoomLevelOption("initial") || this.fit; } /** * Maximum zoom level when user zooms * via zoom/pinch gesture, * via cmd/ctrl-wheel or via trackpad. * * @private * @return {number} */ _getMax() { return this._parseZoomLevelOption("max") || Math.max(1, this.fit * 4); } } function Pt(e, t, n) { const s = t.createContentFromData(e, n); let r; const { options: i } = t; if (i) { r = new js(i, e, -1); let o; t.pswp ? o = t.pswp.viewportSize : o = Ms(i, t); const a = zs(i, o, e, n); r.update(s.width, s.height, a); } return s.lazyLoad(), r && s.setDisplayedSize(Math.ceil(s.width * r.initial), Math.ceil(s.height * r.initial)), s; } function $s(e, t) { const n = t.getItemData(e); if (!t.dispatch("lazyLoadSlide", { index: e, itemData: n }).defaultPrevented) return Pt(n, t, e); } class Vs extends Ls { /** * Get total number of slides * * @returns {number} */ getNumItems() { var t; let n = 0; const s = (t = this.options) === null || t === void 0 ? void 0 : t.dataSource; s && "length" in s ? n = s.length : s && "gallery" in s && (s.items || (s.items = this._getGalleryDOMElements(s.gallery)), s.items && (n = s.items.length)); const r = this.dispatch("numItems", { dataSource: s, numItems: n }); return this.applyFilters("numItems", r.numItems, s); } /** * @param {SlideData} slideData * @param {number} index * @returns {Content} */ createContentFromData(t, n) { return new Bs(t, this, n); } /** * Get item data by index. * * "item data" should contain normalized information that PhotoSwipe needs to generate a slide. * For example, it may contain properties like * `src`, `srcset`, `w`, `h`, which will be used to generate a slide with image. * * @param {number} index * @returns {SlideData} */ getItemData(t) { var n; const s = (n = this.options) === null || n === void 0 ? void 0 : n.dataSource; let r = {}; Array.isArray(s) ? r = s[t] : s && "gallery" in s && (s.items || (s.items = this._getGalleryDOMElements(s.gallery)), r = s.items[t]); let i = r; i instanceof Element && (i = this._domElementToItemData(i)); const o = this.dispatch("itemData", { itemData: i || {}, index: t }); return this.applyFilters("itemData", o.itemData, t); } /** * Get array of gallery DOM elements, * based on childSelector and gallery element. * * @param {HTMLElement} galleryElement * @returns {HTMLElement[]} */ _getGalleryDOMElements(t) { var n, s; return (n = this.options) !== null && n !== void 0 && n.children || (s = this.options) !== null && s !== void 0 && s.childSelector ? re(this.options.children, this.options.childSelector, t) || [] : [t]; } /** * Converts DOM element to item data object. * * @param {HTMLElement} element DOM element * @returns {SlideData} */ _domElementToItemData(t) { const n = { element: t }, s = ( /** @type {HTMLAnchorElement} */ t.tagName === "A" ? t : t.querySelector("a") ); if (s) { n.src = s.dataset.pswpSrc || s.href, s.dataset.pswpSrcset && (n.srcset = s.dataset.pswpSrcset), n.width = s.dataset.pswpWidth ? parseInt(s.dataset.pswpWidth, 10) : 0, n.height = s.dataset.pswpHeight ? parseInt(s.dataset.pswpHeight, 10) : 0, n.w = n.width, n.h = n.height, s.dataset.pswpType && (n.type = s.dataset.pswpType); const i = t.querySelector("img"); if (i) { var r; n.msrc = i.currentSrc || i.src, n.alt = (r = i.getAttribute("alt")) !== null && r !== void 0 ? r : ""; } (s.dataset.pswpCropped || s.dataset.cropped) && (n.thumbCropped = !0); } return this.applyFilters("domItemData", n, t, s); } /** * Lazy-load by slide data * * @param {SlideData} itemData Data about the slide * @param {number} index * @returns {Content} Image that is being decoded or false. */ lazyLoadData(t, n) { return Pt(t, this, n); } } class qs extends Vs { /** * @param {PhotoSwipeOptions} [options] */ constructor(t) { super(), this.options = t || {}, this._uid = 0, this.shouldOpen = !1, this._preloadedContent = void 0, this.onThumbnailsClick = this.onThumbnailsClick.bind(this); } /** * Initialize lightbox, should be called only once. * It's not included in the main constructor, so you may bind events before it. */ init() { re(this.options.gallery, this.options.gallerySelector).forEach((t) => { t.addEventListener("click", this.onThumbnailsClick, !1); }); } /** * @param {MouseEvent} e */ onThumbnailsClick(t) { if (ks(t) || window.pswp) return; let n = { x: t.clientX, y: t.clientY }; !n.x && !n.y && (n = null); let s = this.getClickedIndex(t); s = this.applyFilters("clickedIndex", s, t, this); const r = { gallery: ( /** @type {HTMLElement} */ t.currentTarget ) }; s >= 0 && (t.preventDefault(), this.loadAndOpen(s, r, n)); } /** * Get index of gallery item that was clicked. * * @param {MouseEvent} e click event * @returns {number} */ getClickedIndex(t) { if (this.options.getClickedIndexFn) return this.options.getClickedIndexFn.call(this, t); const n = ( /** @type {HTMLElement} */ t.target ), r = re( this.options.children, this.options.childSelector, /** @type {HTMLElement} */ t.currentTarget ).findIndex((i) => i === n || i.contains(n)); return r !== -1 ? r : this.options.children || this.options.childSelector ? -1 : 0; } /** * Load and open PhotoSwipe * * @param {number} index * @param {DataSource} [dataSource] * @param {Point | null} [initialPoint] * @returns {boolean} */ loadAndOpen(t, n, s) { if (window.pswp || !this.options) return !1; if (!n && this.options.gallery && this.options.children) { const r = re(this.options.gallery); r[0] && (n = { gallery: r[0] }); } return this.options.index = t, this.options.initialPointerPos = s, this.shouldOpen = !0, this.preload(t, n), !0; } /** * Load the main module and the slide content by index * * @param {number} index * @param {DataSource} [dataSource] */ preload(t, n) { const { options: s } = this; n && (s.dataSource = n); const r = [], i = typeof s.pswpModule; if (Is(s.pswpModule)) r.push(Promise.resolve( /** @type {Type<PhotoSwipe>} */ s.pswpModule )); else { if (i === "string") throw new Error("pswpModule as string is no longer supported"); if (i === "function") r.push( /** @type {() => Promise<Type<PhotoSwipe>>} */ s.pswpModule() ); else throw new Error("pswpModule is not valid"); } typeof s.openPromise == "function" && r.push(s.openPromise()), s.preloadFirstSlide !== !1 && t >= 0 && (this._preloadedContent = $s(t, this)); const o = ++this._uid; Promise.all(r).then((a) => { if (this.shouldOpen) { const d = a[0]; this._openPhotoswipe(d, o); } }); } /** * @private * @param {Type<PhotoSwipe> | { default: Type<PhotoSwipe> }} module * @param {number} uid */ _openPhotoswipe(t, n) { if (n !== this._uid && this.shouldOpen || (this.shouldOpen = !1, window.pswp)) return; const s = typeof t == "object" ? new t.default(this.options) : new t(this.options); this.pswp = s, window.pswp = s, Object.keys(this._listeners).forEach((r) => { var i; (i = this._listeners[r]) === null || i === void 0 || i.forEach((o) => { s.on( r, /** @type {EventCallback<typeof name>} */ o ); }); }), Object.keys(this._filters).forEach((r) => { var i; (i = this._filters[r]) === null || i === void 0 || i.forEach((o) => { s.addFilter(r, o.fn, o.priority); }); }), this._preloadedContent && (s.contentLoader.addToCache(this._preloadedContent), this._preloadedContent = void 0), s.on("destroy", () => { this.pswp = void 0, delete window.pswp; }), s.init(); } /** * Unbinds all events, closes PhotoSwipe if it's open. */ destroy() { var t; (t = this.pswp) === null || t === void 0 || t.destroy(), this.shouldOpen = !1, this._listeners = {}, re(this.options.gallery, this.options.gallerySelector).forEach((n) => { n.removeEventListener("click", this.onThumbnailsClick, !1); }); } } function Nt(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: Hs } = Object.prototype, { getPrototypeOf: Ve } = Object, { iterator: ye, toStringTag: At } = Symbol, Ee = /* @__PURE__ */ ((e) => (t) => { const n = Hs.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), B = (e) => (e = e.toLowerCase(), (t) => Ee(t) === e), we = (e) => (t) => typeof t === e, { isArray: K } = Array, le = we("undefined"); function Ws(e) { return e !== null && !le(e) && e.constructor !== null && !le(e.constructor) && C(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const vt = B("ArrayBuffer"); function Js(e) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && vt(e.buffer), t; } const Ks = we("string"), C = we("function"), Ct = we("number"), be = (e) => e !== null && typeof e == "object", Gs = (e) => e === !0 || e === !1, he = (e) => { if (Ee(e) !== "object") return !1; const t = Ve(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(At in e) && !(ye in e); }, Xs = B("Date"), Zs = B("File"), Ys = B("Blob"), Qs = B("FileList"), en = (e) => be(e) && C(e.pipe), tn = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || C(e.append) && ((t = Ee(e)) === "formdata" || // detect form-data instance t === "object" && C(e.toString) && e.toString() === "[object FormData]")); }, sn = B("URLSearchParams"), [nn, rn, on, an] = ["ReadableStream", "Request", "Response", "Headers"].map(B), ln = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function ce(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let s, r; if (typeof e != "object" && (e = [e]), K(e)) for (s = 0, r = e.length; s < r; s++) t.call(null, e[s], s, e); else { const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length; let a; for (s = 0; s < o; s++) a = i[s], t.call(null, e[a], a, e); } } function Tt(e, t) { t = t.toLowerCase(); const n = Object.keys(e); let s = n.length, r; for (; s-- > 0; ) if (r = n[s], t === r.toLowerCase()) return r; return null; } const V = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, xt = (e) => !le(e) && e !== V; function Fe() { const { caseless: e } = xt(this) && this || {}, t = {}, n = (s, r) => { const i = e && Tt(t, r) || r; he(t[i]) && he(s) ? t[i] = Fe(t[i], s) : he(s) ? t[i] = Fe({}, s) : K(s) ? t[i] = s.slice() : t[i] = s; }; for (let s = 0, r = arguments.length; s < r; s++) arguments[s] && ce(arguments[s], n); return t; } const cn = (e, t, n, { allOwnKeys: s } = {}) => (ce(t, (r, i) => { n && C(r) ? e[i] = Nt(r, n) : e[i] = r; }, { allOwnKeys: s }), e), un = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), dn = (e, t, n, s) => { e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n); }, hn = (e, t, n, s) => { let r, i, o; const a = {}; if (t = t || {}, e == null) return t; do { for (r = Object.getOwnPropertyNames(e), i = r.length; i-- > 0; ) o = r[i], (!s || s(o, e, t)) && !a[o] && (t[o] = e[o], a[o] = !0); e = n !== !1 && Ve(e); } while (e && (!n || n(e, t)) && e !== Object.prototype); return t; }, fn = (e, t, n) => { e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length; const s = e.indexOf(t, n); return s !== -1 && s === n; }, pn = (e) => { if (!e) return null; if (K(e)) return e; let t = e.length; if (!Ct(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, mn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ve(Uint8Array)), gn = (e, t) => { const s = (e && e[ye]).call(e); let r; for (; (r = s.next()) && !r.done; ) { const i = r.value; t.call(e, i[0], i[1]); } }, yn = (e, t) => { let n; const s = []; for (; (n = e.exec(t)) !== null; ) s.push(n); return s; }, En = B("HTMLFormElement"), wn = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(n, s, r) { return s.toUpperCase() + r; } ), it = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), bn = B("RegExp"), Dt = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), s = {}; ce(n, (r, i) => { let o; (o = t(r, i, e)) !== !1 && (s[i] = o || r); }), Object.defineProperties(e, s); }, _n = (e) => { Dt(e, (t, n) => { if (C(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const s = e[n]; if (C(s)) { if (t.enumerable = !1, "writable" in t) { t.writable = !1; return; } t.set || (t.set = () => { throw Error("Can not rewrite read-only method '" + n + "'"); }); } }); }, Sn = (e, t) => { const n = {}, s = (r) => { r.forEach((i) => { n[i] = !0; }); }; return K(e) ? s(e) : s(String(e).split(t)), n; }, On = () => { }, Rn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t; function Pn(e) { return !!(e && C(e.append) && e[At] === "FormData" && e[ye]); } const Nn = (e) => { const t = new Array(10), n = (s, r) => { if (be(s)) { if (t.indexOf(s) >= 0) return; if (!("toJSON" in s)) { t[r] = s; const i = K(s) ? [] : {}; return ce(s, (o, a) => { const d = n(o, r + 1); !le(d) && (i[a] = d); }), t[r] = void 0, i; } } return s; }; return n(e, 0); }, An = B("AsyncFunction"), vn = (e) => e && (be(e) || C(e)) && C(e.then) && C(e.catch), kt = ((e, t) => e ? setImmediate : t ? ((n, s) => (V.addEventListener("message", ({ source: r, data: i }) => { r === V && i === n && s.length && s.shift()(); }, !1), (r) => { s.push(r), V.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", C(V.postMessage) ), Cn = typeof queueMicrotask < "u" ? queueMicrotask.bind(V) : typeof process < "u" && process.nextTick || kt, Tn = (e) => e != null && C(e[ye]), l = { isArray: K, isArrayBuffer: vt, isBuffer: Ws, isFormData: tn, isArrayBufferView: Js, isString: Ks, isNumber: Ct, isBoolean: Gs, isObject: be, isPlainObject: he, isReadableStream: nn, isRequest: rn, isResponse: on, isHeaders: an, isUndefined: le, isDate: Xs, isFile: Zs, isBlob: Ys, isRegExp: bn, isFunction: C, isStream: en, isURLSearchParams: sn, isTypedArray: mn, isFileList: Qs, forEach: ce, merge: Fe, extend: cn, trim: ln, stripBOM: un, inherits: dn, toFlatObject: hn, kindOf: Ee, kindOfTest: B, endsWith: fn, toArray: pn, forEachEntry: gn, matchAll: yn, isHTMLForm: En, hasOwnProperty: it, hasOwnProp: it, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: Dt, freezeMethods: _n, toObjectSet: Sn, toCamelCase: wn, noop: On, toFiniteNumber: Rn, findKey: Tt, global: V, isContextDefined: xt, isSpecCompliantForm: Pn, toJSONObject: Nn, isAsyncFn: An, isThenable: vn, setImmediate: kt, asap: Cn, isIterable: Tn }; function w(e, t, n, s, r) { Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), s && (this.request = s), r && (this.response = r, this.status = r.status ? r.status : null); } l.inherits(w, Error, { toJSON: function() { return { // Standard message: this.message, name: this.name, //