From 1a7d5dc4cc3492193461bdddc14565b8fe4e7534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Haz=20=C3=86=2041?= <4405263+hazae41@users.noreply.github.com> Date: Wed, 5 Oct 2022 16:44:24 +0200 Subject: [PATCH] update deps, clean tsconfig --- dist/index.esm.js | 2678 +------------ dist/index.js | 2684 +------------ dist/mods/react/contexts/core.d.ts | 2 +- package-lock.json | 5971 ++++++---------------------- package.json | 20 +- src/mods/react/contexts/core.tsx | 3 +- test/next/package-lock.json | 17 - test/next/package.json | 1 - tsconfig.json | 10 +- 9 files changed, 1272 insertions(+), 10114 deletions(-) diff --git a/dist/index.esm.js b/dist/index.esm.js index 8390eeb7..926c08f2 100644 --- a/dist/index.esm.js +++ b/dist/index.esm.js @@ -1,2677 +1 @@ -import React, { createContext, useContext, useRef, useEffect, useMemo, useState, useCallback } from 'react'; - -/*! ***************************************************************************** -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. -***************************************************************************** */ -/* global Reflect, Promise */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; - -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} - -function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -} - -function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} - -function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -} - -function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || from); -} - -function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -} - -/** - * Map of arrays data structure - */ -var MapOfArrays = /** @class */ (function () { - function MapOfArrays() { - this.map = new Map(); - } - MapOfArrays.prototype.get = function (key) { - return this.map.get(key); - }; - MapOfArrays.prototype.push = function (key, value) { - var values = this.map.get(key); - if (!values) - this.map.set(key, [value]); - else - values.push(value); - }; - MapOfArrays.prototype.erase = function (key, value) { - var values = this.map.get(key); - if (!values) - return; - var values2 = values - .filter(function (it) { return it !== value; }); - if (values2.length) - this.map.set(key, values2); - else - this.map.delete(key); - }; - return MapOfArrays; -}()); -/** - * Orthogonal state publisher - */ -var Ortho = /** @class */ (function () { - function Ortho() { - this.listeners = new MapOfArrays(); - } - Ortho.prototype.publish = function (key, value) { - var e_1, _a; - var listeners = this.listeners.get(key); - if (!listeners) - return; - try { - for (var listeners_1 = __values(listeners), listeners_1_1 = listeners_1.next(); !listeners_1_1.done; listeners_1_1 = listeners_1.next()) { - var listener = listeners_1_1.value; - listener(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (listeners_1_1 && !listeners_1_1.done && (_a = listeners_1.return)) _a.call(listeners_1); - } - finally { if (e_1) throw e_1.error; } - } - }; - Ortho.prototype.on = function (key, listener) { - this.listeners.push(key, listener); - }; - Ortho.prototype.off = function (key, listener) { - this.listeners.erase(key, listener); - }; - return Ortho; -}()); - -function lastOf(array) { - if (array.length) - return array[array.length - 1]; -} - -function getTimeFromDelay(delay) { - if (delay === -1) - return; - return Date.now() + delay; -} - -var AbortError = /** @class */ (function (_super) { - __extends(AbortError, _super); - function AbortError(signal) { - return _super.call(this, "Aborted: ".concat(signal.reason), { cause: signal }) || this; - } - return AbortError; -}(Error)); -function isAbortError(e) { - if (e instanceof AbortError) - return true; - if (e instanceof DOMException && e.name === "AbortError") - return true; - return false; -} - -function refEquals(a, b) { - return a === b; -} -function jsonEquals(a, b) { - if (a === b) - return true; - if (typeof a !== typeof b) - return false; - return JSON.stringify(a) === JSON.stringify(b); -} -function shallowEquals(a, b) { - var e_1, _a; - if (a === b) - return true; - if (typeof a !== typeof b) - return false; - var ka = Object.keys(a); - var kb = Object.keys(b); - if (ka.length !== kb.length) - return false; - try { - for (var ka_1 = __values(ka), ka_1_1 = ka_1.next(); !ka_1_1.done; ka_1_1 = ka_1.next()) { - var key = ka_1_1.value; - if (a[key] !== b[key]) - return false; - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (ka_1_1 && !ka_1_1.done && (_a = ka_1.return)) _a.call(ka_1); - } - finally { if (e_1) throw e_1.error; } - } - return true; -} - -var DEFAULT_EQUALS = jsonEquals; -var DEFAULT_SERIALIZER = JSON; -var DEFAULT_COOLDOWN = 1 * 1000; -var DEFAULT_EXPIRATION = -1; -var DEFAULT_TIMEOUT = 5 * 1000; - -var ScrollHelper = /** @class */ (function () { - function ScrollHelper(core) { - this.core = core; - } - /** - * Fetch first page - * @param skey Storage key - * @param scroller Key scroller - * @param fetcher Resource fetcher - * @param aborter AbortController - * @param tparams Time parameters - * @param force Should ignore cooldown - * @returns The new state - */ - ScrollHelper.prototype.first = function (skey, scroller, fetcher, aborter, params, force, ignore) { - var _a; - if (aborter === void 0) { aborter = new AbortController(); } - if (params === void 0) { params = {}; } - if (force === void 0) { force = false; } - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var _b, current, skip, first, _c, equals, _d, dcooldown, _e, dexpiration, _f, dtimeout, timeout, signal, _g, data, error, _h, time_1, _j, cooldown_1, _k, expiration_1, state_1, norm, error_1; - var _this = this; - return __generator(this, function (_l) { - switch (_l.label) { - case 0: - if (skey === undefined) - return [2 /*return*/]; - return [4 /*yield*/, this.core.lock(skey, function () { return __awaiter(_this, void 0, void 0, function () { - var current, first; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.core.get(skey, params)]; - case 1: - current = _a.sent(); - if (current === null || current === void 0 ? void 0 : current.optimistic) - return [2 /*return*/, { current: current, skip: true }]; - if ((current === null || current === void 0 ? void 0 : current.aborter) && !force) - return [2 /*return*/, { current: current, skip: true }]; - if ((current === null || current === void 0 ? void 0 : current.aborter) && force) - current.aborter.abort("Replaced"); - if (this.core.shouldCooldown(current) && !ignore) - return [2 /*return*/, { current: current, skip: true }]; - first = scroller(undefined); - if (first === undefined) - return [2 /*return*/, { current: current, skip: true }]; - return [4 /*yield*/, this.core.mutate(skey, current, function (c) { return ({ time: c === null || c === void 0 ? void 0 : c.time, aborter: aborter }); }, params)]; - case 2: - current = _a.sent(); - return [2 /*return*/, { current: current, first: first }]; - } - }); - }); })]; - case 1: - _b = _l.sent(), current = _b.current, skip = _b.skip, first = _b.first; - if (skip) - return [2 /*return*/, current]; - if (first === undefined) - throw new Error("Undefined first"); - _c = params.equals, equals = _c === void 0 ? DEFAULT_EQUALS : _c, _d = params.cooldown, dcooldown = _d === void 0 ? DEFAULT_COOLDOWN : _d, _e = params.expiration, dexpiration = _e === void 0 ? DEFAULT_EXPIRATION : _e, _f = params.timeout, dtimeout = _f === void 0 ? DEFAULT_TIMEOUT : _f; - timeout = setTimeout(function () { - aborter.abort("First timed out"); - }, dtimeout); - _l.label = 2; - case 2: - _l.trys.push([2, 8, 11, 12]); - signal = aborter.signal; - return [4 /*yield*/, fetcher(first, { signal: signal })]; - case 3: - _g = _l.sent(), data = _g.data, error = _g.error, _h = _g.time, time_1 = _h === void 0 ? Date.now() : _h, _j = _g.cooldown, cooldown_1 = _j === void 0 ? getTimeFromDelay(dcooldown) : _j, _k = _g.expiration, expiration_1 = _k === void 0 ? getTimeFromDelay(dexpiration) : _k; - if (signal.aborted) - throw new AbortError(signal); - return [4 /*yield*/, this.core.get(skey, params)]; - case 4: - current = _l.sent(); - state_1 = {}; - if (data !== undefined) - state_1.data = [data]; - state_1.error = error; - if (!(data !== undefined)) return [3 /*break*/, 6]; - return [4 /*yield*/, this.core.normalize(true, { data: [data] }, params)]; - case 5: - norm = _l.sent(); - if (equals(norm === null || norm === void 0 ? void 0 : norm[0], (_a = current === null || current === void 0 ? void 0 : current.data) === null || _a === void 0 ? void 0 : _a[0])) - delete state_1.data; - _l.label = 6; - case 6: return [4 /*yield*/, this.core.mutate(skey, current, function () { return (__assign({ time: time_1, cooldown: cooldown_1, expiration: expiration_1, aborter: undefined }, state_1)); }, params)]; - case 7: return [2 /*return*/, _l.sent()]; - case 8: - error_1 = _l.sent(); - return [4 /*yield*/, this.core.get(skey, params)]; - case 9: - current = _l.sent(); - if ((current === null || current === void 0 ? void 0 : current.aborter) !== aborter) - return [2 /*return*/, current]; - return [4 /*yield*/, this.core.mutate(skey, current, function () { return ({ aborter: undefined, error: error_1 }); }, params)]; - case 10: return [2 /*return*/, _l.sent()]; - case 11: - clearTimeout(timeout); - return [7 /*endfinally*/]; - case 12: return [2 /*return*/]; - } - }); - }); - }; - /** - * Scroll to the next page - * @param skey Storage key - * @param scroller Key scroller - * @param fetcher Resource fetcher - * @param aborter AbortController - * @param tparams Time parameters - * @param force Should ignore cooldown - * @returns The new state - */ - ScrollHelper.prototype.scroll = function (skey, scroller, fetcher, aborter, params, force, ignore) { - var _a; - if (aborter === void 0) { aborter = new AbortController(); } - if (params === void 0) { params = {}; } - if (force === void 0) { force = false; } - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var _b, current, skip, last, _c, dcooldown, _d, dexpiration, _e, dtimeout, timeout, signal, _f, data, error, _g, time_2, _h, cooldown_2, _j, expiration_2, state_2, error_2; - var _this = this; - return __generator(this, function (_k) { - switch (_k.label) { - case 0: - if (skey === undefined) - return [2 /*return*/]; - return [4 /*yield*/, this.core.lock(skey, function () { return __awaiter(_this, void 0, void 0, function () { - var current, pages, last; - var _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: return [4 /*yield*/, this.core.get(skey, params)]; - case 1: - current = _b.sent(); - if (current === null || current === void 0 ? void 0 : current.optimistic) - return [2 /*return*/, { current: current, skip: true }]; - if ((current === null || current === void 0 ? void 0 : current.aborter) && !force) - return [2 /*return*/, { current: current, skip: true }]; - if ((current === null || current === void 0 ? void 0 : current.aborter) && force) - current.aborter.abort("Replaced"); - if (this.core.shouldCooldown(current) && !ignore) - return [2 /*return*/, { current: current, skip: true }]; - pages = (_a = current === null || current === void 0 ? void 0 : current.data) !== null && _a !== void 0 ? _a : []; - last = scroller(lastOf(pages)); - if (last === undefined) - return [2 /*return*/, { current: current, skip: true }]; - return [4 /*yield*/, this.core.mutate(skey, current, function (c) { return ({ time: c === null || c === void 0 ? void 0 : c.time, aborter: aborter }); }, params)]; - case 2: - current = _b.sent(); - return [2 /*return*/, { current: current, last: last }]; - } - }); - }); })]; - case 1: - _b = _k.sent(), current = _b.current, skip = _b.skip, last = _b.last; - if (skip) - return [2 /*return*/, current]; - if (last === undefined) - throw new Error("Undefined last"); - _c = params.cooldown, dcooldown = _c === void 0 ? DEFAULT_COOLDOWN : _c, _d = params.expiration, dexpiration = _d === void 0 ? DEFAULT_EXPIRATION : _d, _e = params.timeout, dtimeout = _e === void 0 ? DEFAULT_TIMEOUT : _e; - timeout = setTimeout(function () { - aborter.abort("Scroll timed out"); - }, dtimeout); - _k.label = 2; - case 2: - _k.trys.push([2, 6, 9, 10]); - signal = aborter.signal; - return [4 /*yield*/, fetcher(last, { signal: signal })]; - case 3: - _f = _k.sent(), data = _f.data, error = _f.error, _g = _f.time, time_2 = _g === void 0 ? Date.now() : _g, _h = _f.cooldown, cooldown_2 = _h === void 0 ? getTimeFromDelay(dcooldown) : _h, _j = _f.expiration, expiration_2 = _j === void 0 ? getTimeFromDelay(dexpiration) : _j; - if (signal.aborted) - throw new AbortError(signal); - if (expiration_2 !== undefined && (current === null || current === void 0 ? void 0 : current.expiration) !== undefined) - expiration_2 = Math.min(expiration_2, current === null || current === void 0 ? void 0 : current.expiration); - return [4 /*yield*/, this.core.get(skey, params)]; - case 4: - current = _k.sent(); - state_2 = {}; - if (data !== undefined) - state_2.data = __spreadArray(__spreadArray([], __read(((_a = current === null || current === void 0 ? void 0 : current.data) !== null && _a !== void 0 ? _a : [])), false), [data], false); - state_2.error = error; - return [4 /*yield*/, this.core.mutate(skey, current, function () { return (__assign({ time: time_2, cooldown: cooldown_2, expiration: expiration_2, aborter: undefined }, state_2)); }, params)]; - case 5: return [2 /*return*/, _k.sent()]; - case 6: - error_2 = _k.sent(); - return [4 /*yield*/, this.core.get(skey, params)]; - case 7: - current = _k.sent(); - if ((current === null || current === void 0 ? void 0 : current.aborter) !== aborter) - return [2 /*return*/, current]; - return [4 /*yield*/, this.core.mutate(skey, current, function () { return ({ aborter: undefined, error: error_2 }); }, params)]; - case 8: return [2 /*return*/, _k.sent()]; - case 9: - clearTimeout(timeout); - return [7 /*endfinally*/]; - case 10: return [2 /*return*/]; - } - }); - }); - }; - return ScrollHelper; -}()); - -function getScrollStorageKey(key, params) { - if (key === undefined) - return undefined; - if (typeof key === "string") - return key; - var _a = params.serializer, serializer = _a === void 0 ? DEFAULT_SERIALIZER : _a; - return "scroll:".concat(serializer.stringify(key)); -} -/** - * Non-React version of ScrollHandle - */ -var ScrollObject = /** @class */ (function () { - function ScrollObject(core, scroller, fetcher, params) { - if (params === void 0) { params = {}; } - this.core = core; - this.scroller = scroller; - this.fetcher = fetcher; - this.params = params; - this.mparams = __assign(__assign({}, core.params), params); - this.key = scroller(); - this.skey = getScrollStorageKey(this.key, this.mparams); - this.loadSync(); - this.subscribe(); - } - Object.defineProperty(ScrollObject.prototype, "init", { - get: function () { return this._init; }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ScrollObject.prototype, "state", { - get: function () { return this._state; }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ScrollObject.prototype, "ready", { - get: function () { return this._state !== null; }, - enumerable: false, - configurable: true - }); - ScrollObject.prototype.loadSync = function () { - var _a = this, core = _a.core, skey = _a.skey, mparams = _a.mparams; - this._state = core.getSync(skey, mparams); - }; - ScrollObject.prototype.loadAsync = function () { - return __awaiter(this, void 0, void 0, function () { - var _a, core, skey, mparams, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - if (this.ready) - return [2 /*return*/]; - _a = this, core = _a.core, skey = _a.skey, mparams = _a.mparams; - _b = this; - return [4 /*yield*/, core.get(skey, mparams)]; - case 1: - _b._state = _c.sent(); - return [2 /*return*/]; - } - }); - }); - }; - ScrollObject.prototype.subscribe = function () { - var _this = this; - var _a = this, core = _a.core, skey = _a.skey; - var setter = function (state) { - return _this._state = state; - }; - core.on(skey, setter); - new FinalizationRegistry(function () { - core.off(skey, setter); - }).register(this, undefined); - }; - ScrollObject.prototype.mutate = function (mutator) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var _b, core, skey, mparams, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = this, core = _b.core, skey = _b.skey, mparams = _b.mparams; - if (!(this._state === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, ((_a = this._init) !== null && _a !== void 0 ? _a : (this._init = this.loadAsync()))]; - case 1: - _d.sent(); - _d.label = 2; - case 2: - if (this._state === null) - throw new Error("Null state after init"); - _c = this; - return [4 /*yield*/, core.mutate(skey, this._state, mutator, mparams)]; - case 3: return [2 /*return*/, _c._state = _d.sent()]; - } - }); - }); - }; - ScrollObject.prototype.fetch = function (aborter) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var _b, core, scroller, skey, fetcher, mparams, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = this, core = _b.core, scroller = _b.scroller, skey = _b.skey, fetcher = _b.fetcher, mparams = _b.mparams; - if (!(this._state === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, ((_a = this._init) !== null && _a !== void 0 ? _a : (this._init = this.loadAsync()))]; - case 1: - _d.sent(); - _d.label = 2; - case 2: - if (this._state === null) - throw new Error("Null state after init"); - if (fetcher === undefined) - return [2 /*return*/, this._state]; - _c = this; - return [4 /*yield*/, core.scroll.first(skey, scroller, fetcher, aborter, mparams)]; - case 3: return [2 /*return*/, _c._state = _d.sent()]; - } - }); - }); - }; - ScrollObject.prototype.refetch = function (aborter) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var _b, core, scroller, skey, fetcher, mparams, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = this, core = _b.core, scroller = _b.scroller, skey = _b.skey, fetcher = _b.fetcher, mparams = _b.mparams; - if (!(this._state === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, ((_a = this._init) !== null && _a !== void 0 ? _a : (this._init = this.loadAsync()))]; - case 1: - _d.sent(); - _d.label = 2; - case 2: - if (this._state === null) - throw new Error("Null state after init"); - if (fetcher === undefined) - return [2 /*return*/, this._state]; - _c = this; - return [4 /*yield*/, core.scroll.first(skey, scroller, fetcher, aborter, mparams, true, true)]; - case 3: return [2 /*return*/, _c._state = _d.sent()]; - } - }); - }); - }; - ScrollObject.prototype.scroll = function (aborter) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var _b, core, scroller, skey, fetcher, mparams, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = this, core = _b.core, scroller = _b.scroller, skey = _b.skey, fetcher = _b.fetcher, mparams = _b.mparams; - if (!(this._state === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, ((_a = this._init) !== null && _a !== void 0 ? _a : (this._init = this.loadAsync()))]; - case 1: - _d.sent(); - _d.label = 2; - case 2: - if (this._state === null) - throw new Error("Null state after init"); - if (fetcher === undefined) - return [2 /*return*/, this._state]; - _c = this; - return [4 /*yield*/, core.scroll.scroll(skey, scroller, fetcher, aborter, mparams, true, true)]; - case 3: return [2 /*return*/, _c._state = _d.sent()]; - } - }); - }); - }; - ScrollObject.prototype.clear = function () { - return __awaiter(this, void 0, void 0, function () { - var _a, core, skey, mparams; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _a = this, core = _a.core, skey = _a.skey, mparams = _a.mparams; - return [4 /*yield*/, core.delete(skey, mparams)]; - case 1: - _b.sent(); - delete this._state; - return [2 /*return*/]; - } - }); - }); - }; - return ScrollObject; -}()); - -function scroll(scroller, fetcher, params) { - if (params === void 0) { params = {}; } - return new ScrollSchema(scroller, fetcher, params); -} -var ScrollSchema = /** @class */ (function () { - function ScrollSchema(scroller, fetcher, params) { - if (params === void 0) { params = {}; } - this.scroller = scroller; - this.fetcher = fetcher; - this.params = params; - } - ScrollSchema.prototype.make = function (core) { - var _a = this, scroller = _a.scroller, fetcher = _a.fetcher, params = _a.params; - return new ScrollObject(core, scroller, fetcher, params); - }; - ScrollSchema.prototype.normalize = function (data, more) { - return __awaiter(this, void 0, void 0, function () { - var _a, time, cooldown, expiration, optimistic, state; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - if (more.shallow) - return [2 /*return*/]; - _a = more.root, time = _a.time, cooldown = _a.cooldown, expiration = _a.expiration, optimistic = _a.optimistic; - state = { data: data, time: time, cooldown: cooldown, expiration: expiration, optimistic: optimistic }; - return [4 /*yield*/, this.make(more.core).mutate(function () { return state; })]; - case 1: - _b.sent(); - return [2 /*return*/]; - } - }); - }); - }; - return ScrollSchema; -}()); - -function returnOf(generator) { - return __awaiter(this, void 0, void 0, function () { - var next; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, generator.next()]; - case 1: - next = _a.sent(); - if (next.done) - return [2 /*return*/, next.value]; - return [2 /*return*/]; - } - }); - }); -} - -var SingleHelper = /** @class */ (function () { - function SingleHelper(core) { - this.core = core; - } - /** - * Fetch - * @param key Key (passed to fetcher) - * @param skey Storage key - * @param fetcher Resource fetcher - * @param aborter AbortController - * @param tparams Time parameters - * @param force Should ignore cooldown - * @returns The new state - */ - SingleHelper.prototype.fetch = function (key, skey, fetcher, aborter, params, force, ignore) { - if (aborter === void 0) { aborter = new AbortController(); } - if (params === void 0) { params = {}; } - if (force === void 0) { force = false; } - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var _a, current, skip, _b, dcooldown, _c, dexpiration, _d, dtimeout, timeout, signal, _e, data, error, _f, time_1, _g, cooldown_1, _h, expiration_1, state_1, error_1; - var _this = this; - return __generator(this, function (_j) { - switch (_j.label) { - case 0: - if (key === undefined) - return [2 /*return*/]; - if (skey === undefined) - return [2 /*return*/]; - return [4 /*yield*/, this.core.lock(skey, function () { return __awaiter(_this, void 0, void 0, function () { - var current; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.core.get(skey, params)]; - case 1: - current = _a.sent(); - if (current === null || current === void 0 ? void 0 : current.optimistic) - return [2 /*return*/, { current: current, skip: true }]; - if ((current === null || current === void 0 ? void 0 : current.aborter) && !force) - return [2 /*return*/, { current: current, skip: true }]; - if ((current === null || current === void 0 ? void 0 : current.aborter) && force) - current.aborter.abort("Replaced"); - if (this.core.shouldCooldown(current) && !ignore) - return [2 /*return*/, { current: current, skip: true }]; - return [4 /*yield*/, this.core.mutate(skey, current, function (c) { return ({ time: c === null || c === void 0 ? void 0 : c.time, aborter: aborter }); }, params)]; - case 2: - current = _a.sent(); - return [2 /*return*/, { current: current }]; - } - }); - }); })]; - case 1: - _a = _j.sent(), current = _a.current, skip = _a.skip; - if (skip) - return [2 /*return*/, current]; - _b = params.cooldown, dcooldown = _b === void 0 ? DEFAULT_COOLDOWN : _b, _c = params.expiration, dexpiration = _c === void 0 ? DEFAULT_EXPIRATION : _c, _d = params.timeout, dtimeout = _d === void 0 ? DEFAULT_TIMEOUT : _d; - timeout = setTimeout(function () { - aborter.abort("Fetch timed out"); - }, dtimeout); - _j.label = 2; - case 2: - _j.trys.push([2, 6, 9, 10]); - signal = aborter.signal; - return [4 /*yield*/, fetcher(key, { signal: signal })]; - case 3: - _e = _j.sent(), data = _e.data, error = _e.error, _f = _e.time, time_1 = _f === void 0 ? Date.now() : _f, _g = _e.cooldown, cooldown_1 = _g === void 0 ? getTimeFromDelay(dcooldown) : _g, _h = _e.expiration, expiration_1 = _h === void 0 ? getTimeFromDelay(dexpiration) : _h; - if (signal.aborted) - throw new AbortError(signal); - return [4 /*yield*/, this.core.get(skey, params)]; - case 4: - current = _j.sent(); - state_1 = {}; - if (data !== undefined) - state_1.data = data; - state_1.error = error; - return [4 /*yield*/, this.core.mutate(skey, current, function () { return (__assign({ time: time_1, cooldown: cooldown_1, expiration: expiration_1, aborter: undefined }, state_1)); }, params)]; - case 5: return [2 /*return*/, _j.sent()]; - case 6: - error_1 = _j.sent(); - return [4 /*yield*/, this.core.get(skey, params)]; - case 7: - current = _j.sent(); - if ((current === null || current === void 0 ? void 0 : current.aborter) !== aborter) - return [2 /*return*/, current]; - return [4 /*yield*/, this.core.mutate(skey, current, function () { return ({ aborter: undefined, error: error_1 }); }, params)]; - case 8: return [2 /*return*/, _j.sent()]; - case 9: - clearTimeout(timeout); - return [7 /*endfinally*/]; - case 10: return [2 /*return*/]; - } - }); - }); - }; - /** - * Optimistic update - * @param key Key (:K) (passed to poster) - * @param skey Storage key - * @param fetcher Resource poster - * @param updater Mutation function - * @param aborter AbortController - * @param tparams Time parameters - * @returns The new state - * @throws Error - */ - SingleHelper.prototype.update = function (key, skey, fetcher, updater, aborter, params) { - var e_1, _a; - if (aborter === void 0) { aborter = new AbortController(); } - if (params === void 0) { params = {}; } - return __awaiter(this, void 0, void 0, function () { - var _b, current, skip, _c, dcooldown, _d, dexpiration, _e, dtimeout, timeout, signal, generator, _loop_1, this_1, generator_1, generator_1_1, e_1_1, result, data, error_3, _f, time_2, _g, cooldown_2, _h, expiration_2, state_2, error_2; - var _this = this; - return __generator(this, function (_j) { - switch (_j.label) { - case 0: - if (key === undefined) - return [2 /*return*/]; - if (skey === undefined) - return [2 /*return*/]; - return [4 /*yield*/, this.core.lock(skey, function () { return __awaiter(_this, void 0, void 0, function () { - var current; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.core.get(skey, params)]; - case 1: - current = _a.sent(); - if (current === null || current === void 0 ? void 0 : current.optimistic) - return [2 /*return*/, { current: current, skip: true }]; - if (current === null || current === void 0 ? void 0 : current.aborter) - current.aborter.abort("Replaced"); - return [4 /*yield*/, this.core.mutate(skey, current, function (c) { return ({ time: c === null || c === void 0 ? void 0 : c.time, aborter: aborter }); }, params)]; - case 2: - current = _a.sent(); - return [2 /*return*/, { current: current }]; - } - }); - }); })]; - case 1: - _b = _j.sent(), current = _b.current, skip = _b.skip; - if (skip) - return [2 /*return*/, current]; - _c = params.cooldown, dcooldown = _c === void 0 ? DEFAULT_COOLDOWN : _c, _d = params.expiration, dexpiration = _d === void 0 ? DEFAULT_EXPIRATION : _d, _e = params.timeout, dtimeout = _e === void 0 ? DEFAULT_TIMEOUT : _e; - timeout = setTimeout(function () { - aborter.abort("Update timed out"); - }, dtimeout); - _j.label = 2; - case 2: - _j.trys.push([2, 23, 26, 27]); - signal = aborter.signal; - generator = updater(current, { signal: signal }); - _j.label = 3; - case 3: - _j.trys.push([3, 9, 10, 15]); - _loop_1 = function () { - var _k, data_1, error_4, optimistic; - return __generator(this, function (_l) { - switch (_l.label) { - case 0: - _k = generator_1_1.value, data_1 = _k.data, error_4 = _k.error; - if (signal.aborted) - throw new AbortError(signal); - optimistic = {}; - if (data_1 !== undefined) - optimistic.data = data_1; - optimistic.error = error_4; - return [4 /*yield*/, this_1.core.mutate(skey, current, function (c) { return (__assign({ time: c === null || c === void 0 ? void 0 : c.time, aborter: aborter, optimistic: true }, optimistic)); }, params)]; - case 1: - current = _l.sent(); - return [2 /*return*/]; - } - }); - }; - this_1 = this; - generator_1 = __asyncValues(generator); - _j.label = 4; - case 4: return [4 /*yield*/, generator_1.next()]; - case 5: - if (!(generator_1_1 = _j.sent(), !generator_1_1.done)) return [3 /*break*/, 8]; - return [5 /*yield**/, _loop_1()]; - case 6: - _j.sent(); - _j.label = 7; - case 7: return [3 /*break*/, 4]; - case 8: return [3 /*break*/, 15]; - case 9: - e_1_1 = _j.sent(); - e_1 = { error: e_1_1 }; - return [3 /*break*/, 15]; - case 10: - _j.trys.push([10, , 13, 14]); - if (!(generator_1_1 && !generator_1_1.done && (_a = generator_1.return))) return [3 /*break*/, 12]; - return [4 /*yield*/, _a.call(generator_1)]; - case 11: - _j.sent(); - _j.label = 12; - case 12: return [3 /*break*/, 14]; - case 13: - if (e_1) throw e_1.error; - return [7 /*endfinally*/]; - case 14: return [7 /*endfinally*/]; - case 15: return [4 /*yield*/, returnOf(generator)]; - case 16: - result = _j.sent(); - if (!(result === undefined)) return [3 /*break*/, 18]; - if (fetcher === undefined) - throw new Error("Updater returned nothing and undefined fetcher"); - return [4 /*yield*/, fetcher(key, { signal: signal, cache: "reload" })]; - case 17: - result = _j.sent(); - _j.label = 18; - case 18: - data = result.data, error_3 = result.error, _f = result.time, time_2 = _f === void 0 ? Date.now() : _f, _g = result.cooldown, cooldown_2 = _g === void 0 ? getTimeFromDelay(dcooldown) : _g, _h = result.expiration, expiration_2 = _h === void 0 ? getTimeFromDelay(dexpiration) : _h; - if (signal.aborted) - throw new AbortError(signal); - return [4 /*yield*/, this.core.get(skey, params)]; - case 19: - current = _j.sent(); - if (!(error_3 !== undefined)) return [3 /*break*/, 21]; - if ((current === null || current === void 0 ? void 0 : current.aborter) !== aborter) - return [2 /*return*/, current]; - return [4 /*yield*/, this.core.mutate(skey, current, function (c) { return ({ time: c === null || c === void 0 ? void 0 : c.time, cooldown: cooldown_2, expiration: expiration_2, aborter: undefined, optimistic: false, data: c === null || c === void 0 ? void 0 : c.data, error: error_3 }); }, params)]; - case 20: return [2 /*return*/, _j.sent()]; - case 21: - state_2 = {}; - if (data !== undefined) - state_2.data = data; - state_2.error = error_3; - return [4 /*yield*/, this.core.mutate(skey, current, function () { return (__assign({ time: time_2, cooldown: cooldown_2, expiration: expiration_2, aborter: undefined, optimistic: false }, state_2)); }, params)]; - case 22: return [2 /*return*/, _j.sent()]; - case 23: - error_2 = _j.sent(); - return [4 /*yield*/, this.core.get(skey, params)]; - case 24: - current = _j.sent(); - if ((current === null || current === void 0 ? void 0 : current.aborter) !== aborter) - return [2 /*return*/, current]; - return [4 /*yield*/, this.core.mutate(skey, current, function (c) { return ({ time: c === null || c === void 0 ? void 0 : c.time, aborter: undefined, optimistic: false, data: c === null || c === void 0 ? void 0 : c.data, error: error_2 }); }, params)]; - case 25: return [2 /*return*/, _j.sent()]; - case 26: - clearTimeout(timeout); - return [7 /*endfinally*/]; - case 27: return [2 /*return*/]; - } - }); - }); - }; - return SingleHelper; -}()); - -function getSingleStorageKey(key, params) { - if (key === undefined) - return undefined; - if (typeof key === "string") - return key; - var _a = params.serializer, serializer = _a === void 0 ? DEFAULT_SERIALIZER : _a; - return serializer.stringify(key); -} -/** - * Non-React version of SingleHandle - */ -var SingleObject = /** @class */ (function () { - function SingleObject(core, key, fetcher, params) { - if (params === void 0) { params = {}; } - this.core = core; - this.key = key; - this.fetcher = fetcher; - this.params = params; - this.mparams = __assign(__assign({}, core.params), params); - this.skey = getSingleStorageKey(key, this.mparams); - this.loadSync(); - this.subscribe(); - } - Object.defineProperty(SingleObject.prototype, "init", { - get: function () { return this._init; }, - enumerable: false, - configurable: true - }); - Object.defineProperty(SingleObject.prototype, "state", { - get: function () { return this._state; }, - enumerable: false, - configurable: true - }); - Object.defineProperty(SingleObject.prototype, "ready", { - get: function () { return this._state !== null; }, - enumerable: false, - configurable: true - }); - SingleObject.prototype.loadSync = function () { - var _a = this, core = _a.core, skey = _a.skey, mparams = _a.mparams; - this._state = core.getSync(skey, mparams); - }; - SingleObject.prototype.loadAsync = function () { - return __awaiter(this, void 0, void 0, function () { - var _a, core, skey, mparams, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - if (this.ready) - return [2 /*return*/]; - _a = this, core = _a.core, skey = _a.skey, mparams = _a.mparams; - _b = this; - return [4 /*yield*/, core.get(skey, mparams)]; - case 1: - _b._state = _c.sent(); - return [2 /*return*/]; - } - }); - }); - }; - SingleObject.prototype.subscribe = function () { - var _this = this; - var _a = this, core = _a.core, skey = _a.skey; - var setter = function (state) { - return _this._state = state; - }; - core.on(this.skey, setter); - new FinalizationRegistry(function () { - core.off(skey, setter); - }).register(this, undefined); - }; - SingleObject.prototype.mutate = function (mutator) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var _b, core, skey, mparams, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = this, core = _b.core, skey = _b.skey, mparams = _b.mparams; - if (!(this._state === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, ((_a = this._init) !== null && _a !== void 0 ? _a : (this._init = this.loadAsync()))]; - case 1: - _d.sent(); - _d.label = 2; - case 2: - if (this._state === null) - throw new Error("Null state after init"); - _c = this; - return [4 /*yield*/, core.mutate(skey, this._state, mutator, mparams)]; - case 3: return [2 /*return*/, _c._state = _d.sent()]; - } - }); - }); - }; - SingleObject.prototype.fetch = function (aborter) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var _b, core, key, skey, fetcher, mparams, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = this, core = _b.core, key = _b.key, skey = _b.skey, fetcher = _b.fetcher, mparams = _b.mparams; - if (!(this._state === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, ((_a = this._init) !== null && _a !== void 0 ? _a : (this._init = this.loadAsync()))]; - case 1: - _d.sent(); - _d.label = 2; - case 2: - if (this._state === null) - throw new Error("Null state after init"); - if (fetcher === undefined) - return [2 /*return*/, this._state]; - _c = this; - return [4 /*yield*/, core.single.fetch(key, skey, fetcher, aborter, mparams)]; - case 3: return [2 /*return*/, _c._state = _d.sent()]; - } - }); - }); - }; - SingleObject.prototype.refetch = function (aborter) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var _b, core, key, skey, fetcher, mparams, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = this, core = _b.core, key = _b.key, skey = _b.skey, fetcher = _b.fetcher, mparams = _b.mparams; - if (!(this._state === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, ((_a = this._init) !== null && _a !== void 0 ? _a : (this._init = this.loadAsync()))]; - case 1: - _d.sent(); - _d.label = 2; - case 2: - if (this._state === null) - throw new Error("Null state after init"); - if (fetcher === undefined) - return [2 /*return*/, this._state]; - _c = this; - return [4 /*yield*/, core.single.fetch(key, skey, fetcher, aborter, mparams, true, true)]; - case 3: return [2 /*return*/, _c._state = _d.sent()]; - } - }); - }); - }; - SingleObject.prototype.update = function (updater, uparams, aborter) { - var _a; - if (uparams === void 0) { uparams = {}; } - return __awaiter(this, void 0, void 0, function () { - var _b, core, key, skey, fetcher, mparams, fparams, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = this, core = _b.core, key = _b.key, skey = _b.skey, fetcher = _b.fetcher, mparams = _b.mparams; - if (!(this._state === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, ((_a = this._init) !== null && _a !== void 0 ? _a : (this._init = this.loadAsync()))]; - case 1: - _d.sent(); - _d.label = 2; - case 2: - if (this._state === null) - throw new Error("Null state after init"); - fparams = __assign(__assign({}, mparams), uparams); - _c = this; - return [4 /*yield*/, core.single.update(key, skey, fetcher, updater, aborter, fparams)]; - case 3: return [2 /*return*/, _c._state = _d.sent()]; - } - }); - }); - }; - SingleObject.prototype.clear = function () { - return __awaiter(this, void 0, void 0, function () { - var _a, core, skey, mparams; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _a = this, core = _a.core, skey = _a.skey, mparams = _a.mparams; - return [4 /*yield*/, core.delete(skey, mparams)]; - case 1: - _b.sent(); - delete this._state; - return [2 /*return*/]; - } - }); - }); - }; - return SingleObject; -}()); - -function single(key, fetcher, params) { - if (params === void 0) { params = {}; } - return new SingleSchema(key, fetcher, params); -} -var SingleSchema = /** @class */ (function () { - function SingleSchema(key, fetcher, params) { - if (params === void 0) { params = {}; } - this.key = key; - this.fetcher = fetcher; - this.params = params; - } - SingleSchema.prototype.make = function (core) { - var _a = this, key = _a.key, fetcher = _a.fetcher, params = _a.params; - return new SingleObject(core, key, fetcher, params); - }; - SingleSchema.prototype.normalize = function (data, more) { - return __awaiter(this, void 0, void 0, function () { - var _a, time, cooldown, expiration, optimistic, state; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - if (more.shallow) - return [2 /*return*/]; - _a = more.root, time = _a.time, cooldown = _a.cooldown, expiration = _a.expiration, optimistic = _a.optimistic; - state = { data: data, time: time, cooldown: cooldown, expiration: expiration, optimistic: optimistic }; - return [4 /*yield*/, this.make(more.core).mutate(function () { return state; })]; - case 1: - _b.sent(); - return [2 /*return*/]; - } - }); - }); - }; - return SingleSchema; -}()); - -function isAsyncStorage(storage) { - return Boolean(storage.async); -} - -var Lock = /** @class */ (function () { - function Lock() { - } - Lock.prototype.lock = function (callback) { - return __awaiter(this, void 0, void 0, function () { - var promise; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!this.mutex) return [3 /*break*/, 2]; - return [4 /*yield*/, this.mutex]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - promise = callback(); - this.mutex = promise; - return [4 /*yield*/, promise]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - return Lock; -}()); - -var Core = /** @class */ (function (_super) { - __extends(Core, _super); - function Core(params) { - var _this = _super.call(this) || this; - _this.params = params; - _this.single = new SingleHelper(_this); - _this.scroll = new ScrollHelper(_this); - _this.cache = new Map(); - _this.locks = new Map(); - _this._mounted = true; - _this.counts = new Map(); - _this.timeouts = new Map(); - return _this; - } - Object.defineProperty(Core.prototype, "mounted", { - get: function () { return this._mounted; }, - enumerable: false, - configurable: true - }); - Core.prototype.unmount = function () { - var e_1, _a; - try { - for (var _b = __values(this.timeouts.values()), _c = _b.next(); !_c.done; _c = _b.next()) { - var timeout = _c.value; - clearTimeout(timeout); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - this._mounted = false; - }; - Core.prototype.lock = function (skey, callback) { - return __awaiter(this, void 0, void 0, function () { - var lock, lock2; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - lock = this.locks.get(skey); - if (!(lock !== undefined)) return [3 /*break*/, 2]; - return [4 /*yield*/, lock.lock(callback)]; - case 1: return [2 /*return*/, _a.sent()]; - case 2: - lock2 = new Lock(); - this.locks.set(skey, lock2); - return [4 /*yield*/, lock2.lock(callback)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - Core.prototype.getSync = function (skey, params) { - if (params === void 0) { params = {}; } - if (skey === undefined) - return; - var cached = this.cache.get(skey); - if (cached !== undefined) - return cached; - var storage = params.storage; - if (!storage) - return; - if (isAsyncStorage(storage)) - return null; - var state = storage.get(skey); - this.cache.set(skey, state); - return state; - }; - Core.prototype.get = function (skey, params, ignore) { - if (params === void 0) { params = {}; } - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var cached, storage, state; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (skey === undefined) - return [2 /*return*/]; - cached = this.cache.get(skey); - if (cached !== undefined) - return [2 /*return*/, cached]; - storage = params.storage; - if (!storage) - return [2 /*return*/]; - return [4 /*yield*/, storage.get(skey, ignore)]; - case 1: - state = _a.sent(); - this.cache.set(skey, state); - return [2 /*return*/, state]; - } - }); - }); - }; - /** - * Force set a key to a state and publish it - * No check, no merge - * @param skey Key - * @param state New state - * @returns - */ - Core.prototype.set = function (skey, state, params) { - if (params === void 0) { params = {}; } - return __awaiter(this, void 0, void 0, function () { - var storage, data, time, cooldown, expiration; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (skey === undefined) - return [2 /*return*/]; - this.cache.set(skey, state); - this.publish(skey, state); - storage = params.storage; - if (!storage) - return [2 /*return*/]; - data = state.data, time = state.time, cooldown = state.cooldown, expiration = state.expiration; - return [4 /*yield*/, storage.set(skey, { data: data, time: time, cooldown: cooldown, expiration: expiration })]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); - }; - /** - * Delete key and publish undefined - * @param skey - * @returns - */ - Core.prototype.delete = function (skey, params) { - if (params === void 0) { params = {}; } - return __awaiter(this, void 0, void 0, function () { - var storage; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!skey) - return [2 /*return*/]; - this.cache.delete(skey); - this.locks.delete(skey); - this.publish(skey, undefined); - storage = params.storage; - if (!storage) - return [2 /*return*/]; - return [4 /*yield*/, storage.delete(skey)]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); - }; - Core.prototype.mutate = function (skey, current, mutator, params) { - var _a; - if (params === void 0) { params = {}; } - return __awaiter(this, void 0, void 0, function () { - var state, next, _b, _c, equals; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - if (skey === undefined) - return [2 /*return*/]; - state = mutator(current); - if (!!state) return [3 /*break*/, 2]; - return [4 /*yield*/, this.delete(skey, params)]; - case 1: - _d.sent(); - return [2 /*return*/]; - case 2: - if (state.time !== undefined && state.time < ((_a = current === null || current === void 0 ? void 0 : current.time) !== null && _a !== void 0 ? _a : 0)) - return [2 /*return*/, current]; - if (state.optimistic === undefined && (current === null || current === void 0 ? void 0 : current.optimistic)) - return [2 /*return*/, current]; - next = __assign(__assign({}, current), state); - if (next.time === undefined) - next.time = Date.now(); - _b = next; - return [4 /*yield*/, this.normalize(false, next, params)]; - case 3: - _b.data = _d.sent(); - _c = params.equals, equals = _c === void 0 ? DEFAULT_EQUALS : _c; - if (equals(next.data, current === null || current === void 0 ? void 0 : current.data)) // Prevent some renders if the data is the same - next.data = current === null || current === void 0 ? void 0 : current.data; - if (shallowEquals(next, current)) // Shallow comparison because aborter is not serializable - return [2 /*return*/, current]; - return [4 /*yield*/, this.set(skey, next, params)]; - case 4: - _d.sent(); - return [2 /*return*/, next]; - } - }); - }); - }; - Core.prototype.normalize = function (shallow, root, params) { - if (params === void 0) { params = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (root.data === undefined) - return [2 /*return*/]; - if (params.normalizer === undefined) - return [2 /*return*/, root.data]; - return [4 /*yield*/, params.normalizer(root.data, { core: this, shallow: shallow, root: root })]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * True if we should cooldown this resource - */ - Core.prototype.shouldCooldown = function (current) { - if ((current === null || current === void 0 ? void 0 : current.cooldown) === undefined) - return false; - return Date.now() < current.cooldown; - }; - Core.prototype.once = function (key, listener, params) { - var _this = this; - if (params === void 0) { params = {}; } - if (!key) - return; - var f = function (x) { - _this.off(key, f, params); - listener(x); - }; - this.on(key, f, params); - }; - Core.prototype.on = function (key, listener, params) { - var _a; - if (!key) - return; - _super.prototype.on.call(this, key, listener); - var count = (_a = this.counts.get(key)) !== null && _a !== void 0 ? _a : 0; - this.counts.set(key, count + 1); - var timeout = this.timeouts.get(key); - if (timeout === undefined) - return; - clearTimeout(timeout); - this.timeouts.delete(key); - }; - Core.prototype.off = function (key, listener, params) { - if (params === void 0) { params = {}; } - return __awaiter(this, void 0, void 0, function () { - var count, current, erase, delay, timeout; - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!key) - return [2 /*return*/]; - _super.prototype.off.call(this, key, listener); - count = this.counts.get(key); - if (count === undefined) - throw new Error("Undefined count"); - if (count > 1) { - this.counts.set(key, count - 1); - return [2 /*return*/]; - } - this.counts.delete(key); - return [4 /*yield*/, this.get(key, params, true)]; - case 1: - current = _a.sent(); - if ((current === null || current === void 0 ? void 0 : current.expiration) === undefined) - return [2 /*return*/]; - if ((current === null || current === void 0 ? void 0 : current.expiration) === -1) - return [2 /*return*/]; - erase = function () { return __awaiter(_this, void 0, void 0, function () { - var count; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!this._mounted) - return [2 /*return*/]; - count = this.counts.get(key); - if (count !== undefined) - return [2 /*return*/]; - this.timeouts.delete(key); - return [4 /*yield*/, this.delete(key, params)]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); }; - if (!(Date.now() > current.expiration)) return [3 /*break*/, 3]; - return [4 /*yield*/, erase()]; - case 2: - _a.sent(); - return [2 /*return*/]; - case 3: - delay = current.expiration - Date.now(); - timeout = setTimeout(erase, delay); - this.timeouts.set(key, timeout); - return [2 /*return*/]; - } - }); - }); - }; - return Core; -}(Ortho)); - -var CoreContext = createContext(undefined); -function useCore() { - var core = useContext(CoreContext); - if (core === undefined) - throw new Error("Undefined core"); - return core; -} -function useCoreProvider(params) { - var coreRef = useRef(); - if (coreRef.current === undefined) - coreRef.current = new Core(params); - useEffect(function () { return function () { - var _a; - (_a = coreRef.current) === null || _a === void 0 ? void 0 : _a.unmount(); - }; }, []); - return coreRef.current; -} -function CoreProvider(props) { - var children = props.children, params = __rest(props, ["children"]); - var core = useCoreProvider(params); - return React.createElement(CoreContext.Provider, { value: core }, children); -} - -/** - * Show handle in console when it changes - * @param handle - */ -function useDebug(handle, label) { - var data = handle.data, error = handle.error, time = handle.time; - useEffect(function () { - console.debug(label, handle); - }, [data, error, time]); -} - -/** - * Call a function on error - * @param handle - * @param callback - */ -function useError(handle, callback) { - var error = handle.error; - useEffect(function () { - if (error !== undefined) - callback(error); - }, [error]); -} - -/** - * Fallback to given data/error if there is no data/error - * @example You got some data/error using SSR/ISR and want to display it on first render - * @example You still want to display something even if the fetcher returned nothing - * @param handle - * @param state - */ -function useFallback(handle, state) { - var data = handle.data, error = handle.error; - if (data !== undefined) - return; - if (error !== undefined) - return; - Object.assign(handle, state); -} - -/** - * Do a request on mount and url change - * @see useMount for doing a request on mount only - * @see useOnce for doing a request only if there is no data yet - * @param handle - */ -function useFetch(handle) { - var fetch = handle.fetch; - useEffect(function () { - fetch(); - }, [fetch]); -} - -/** - * Do a request on interval - * @see useRetry for error retry - * @param handle - * @param options - */ -function useInterval(handle, interval) { - var ready = handle.ready, fetch = handle.fetch; - useEffect(function () { - if (!ready) - return; - if (!interval) - return; - var i = setInterval(fetch, interval); - return function () { return clearInterval(i); }; - }, [fetch, interval]); -} - -/** - * Do a request on mount only - * @see useFetch for doing a request on url change - * @see useOnce for doing a request only if there is no data yet - * @param handle - */ -function useMount(handle) { - var fetch = handle.fetch; - useEffect(function () { - fetch(); - }, []); -} - -/** - * Do a request on mount and url change only if there is no data yet - * @warning Will still try to fetch is there is an error - * @param handle - * @example You want to get some data once and share it in multiple components - */ -function useOnce(handle) { - var data = handle.data, fetch = handle.fetch; - useEffect(function () { - if (data === undefined) - fetch(); - }, [data, fetch]); -} - -function useAutoRef(current) { - var ref = useRef(current); - ref.current = current; - return ref; -} - -/** - * Do a request when the browser is online - * @param handle - */ -function useOnline(handle) { - var ready = handle.ready, fetch = handle.fetch; - var fetchRef = useAutoRef(fetch); - useEffect(function () { - if (!ready) - return; - var f = function () { return fetchRef.current(); }; - addEventListener("online", f); - return function () { return removeEventListener("online", f); }; - }, [ready]); -} - -/** - * Retry request on error using exponential backoff - * @see useInterval for interval based requests - * @param handle - * @param options - * @param options.init Initial timeout to be multiplied (in milliseconds) - * @param options.base Exponent base (2 means the next timeout will be 2 times longer) - * @param options.max Maximum count (3 means do not retry after 3 retries) - * @see https://en.wikipedia.org/wiki/Exponential_backoff - * @see https://en.wikipedia.org/wiki/Geometric_progression - */ -function useRetry(handle, options) { - if (options === void 0) { options = {}; } - var ready = handle.ready, skey = handle.skey, refetch = handle.refetch, error = handle.error; - var _a = options.init, init = _a === void 0 ? 1000 : _a, _b = options.base, base = _b === void 0 ? 2 : _b, _c = options.max, max = _c === void 0 ? 3 : _c; - var count = useRef(0); - useEffect(function () { - count.current = 0; - }, [skey]); - var refetchRef = useAutoRef(refetch); - useEffect(function () { - if (!ready) - return; - if (error === undefined) { - count.current = 0; - return; - } - if (count.current >= max) - return; - var ratio = Math.pow(base, count.current); - function f() { - count.current++; - refetchRef.current(); - } - var t = setTimeout(f, init * ratio); - return function () { return clearTimeout(t); }; - }, [ready, error]); -} - -/** - * Do a request when the tab is visible - * @param handle - */ -function useVisible(handle) { - var ready = handle.ready, fetch = handle.fetch; - var fetchRef = useAutoRef(fetch); - useEffect(function () { - if (!ready) - return; - var f = function () { return !document.hidden && fetchRef.current(); }; - document.addEventListener("visibilitychange", f); - return function () { return document.removeEventListener("visibilitychange", f); }; - }, [ready]); -} - -/** - * Scrolling resource handle factory - * @param scroller Key scroller (memoized) - * @param fetcher Resource fetcher (unmemoized) - * @param cparams Parameters (unmemoized) - * @returns Scrolling handle - */ -function useScroll(scroller, fetcher, params) { - var _this = this; - if (params === void 0) { params = {}; } - var core = useCore(); - var mparams = __assign(__assign({}, core.params), params); - var scrollerRef = useAutoRef(scroller); - var fetcherRef = useAutoRef(fetcher); - var paramsRef = useAutoRef(mparams); - var key = useMemo(function () { - return scroller(); - }, [scroller]); - var skey = useMemo(function () { - return getScrollStorageKey(key, paramsRef.current); - }, [key]); - var _a = __read(useState(0), 2), setCounter = _a[1]; - var stateRef = useRef(); - useMemo(function () { - stateRef.current = core.getSync(skey, paramsRef.current); - }, [core, skey]); - var setState = useCallback(function (state) { - stateRef.current = state; - setCounter(function (c) { return c + 1; }); - }, []); - var initRef = useRef(); - useEffect(function () { - if (stateRef.current !== null) - return; - initRef.current = core.get(skey, paramsRef.current).then(setState); - }, [core, skey]); - useEffect(function () { - if (!skey) - return; - core.on(skey, setState, paramsRef.current); - return function () { return void core.off(skey, setState, paramsRef.current); }; - }, [core, skey]); - var mutate = useCallback(function (mutator) { return __awaiter(_this, void 0, void 0, function () { - var state, params; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - state = stateRef.current; - params = paramsRef.current; - return [4 /*yield*/, core.mutate(skey, state, mutator, params)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); }, [core, skey]); - var clear = useCallback(function () { return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - return [4 /*yield*/, core.delete(skey, paramsRef.current)]; - case 3: - _a.sent(); - return [2 /*return*/]; - } - }); - }); }, [core, skey]); - var fetch = useCallback(function (aborter) { return __awaiter(_this, void 0, void 0, function () { - var scroller, fetcher, params; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof window === "undefined") - throw new Error("Fetch on SSR"); - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - if (fetcherRef.current === undefined) - return [2 /*return*/, stateRef.current]; - scroller = scrollerRef.current; - fetcher = fetcherRef.current; - params = paramsRef.current; - return [4 /*yield*/, core.scroll.first(skey, scroller, fetcher, aborter, params)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); }, [core, skey]); - var refetch = useCallback(function (aborter) { return __awaiter(_this, void 0, void 0, function () { - var scroller, fetcher, params; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof window === "undefined") - throw new Error("Refetch on SSR"); - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - if (fetcherRef.current === undefined) - return [2 /*return*/, stateRef.current]; - scroller = scrollerRef.current; - fetcher = fetcherRef.current; - params = paramsRef.current; - return [4 /*yield*/, core.scroll.first(skey, scroller, fetcher, aborter, params, true, true)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); }, [core, skey]); - var scroll = useCallback(function (aborter) { return __awaiter(_this, void 0, void 0, function () { - var scroller, fetcher, params; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof window === "undefined") - throw new Error("Scroll on SSR"); - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - if (fetcherRef.current === undefined) - return [2 /*return*/, stateRef.current]; - scroller = scrollerRef.current; - fetcher = fetcherRef.current; - params = paramsRef.current; - return [4 /*yield*/, core.scroll.scroll(skey, scroller, fetcher, aborter, params, true, true)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); }, [core, skey]); - var suspend = useCallback(function () { - if (typeof window === "undefined") - throw new Error("Suspend on SSR"); - return (function () { return __awaiter(_this, void 0, void 0, function () { - var scroller, fetcher, params, background; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - if (fetcherRef.current === undefined) - throw new Error("No fetcher"); - scroller = scrollerRef.current; - fetcher = fetcherRef.current; - params = paramsRef.current; - background = new Promise(function (ok) { return core.once(skey, function () { return ok(); }, params); }); - return [4 /*yield*/, core.scroll.first(skey, scroller, fetcher, undefined, params, false, true)]; - case 3: - _a.sent(); - return [4 /*yield*/, background]; - case 4: - _a.sent(); - return [2 /*return*/]; - } - }); - }); })(); - }, [core, skey]); - var state = stateRef.current; - var _b = state !== null && state !== void 0 ? state : {}, data = _b.data, error = _b.error, time = _b.time, cooldown = _b.cooldown, expiration = _b.expiration, aborter = _b.aborter, optimistic = _b.optimistic; - var ready = state !== null; - var loading = Boolean(aborter); - return { key: key, skey: skey, data: data, error: error, time: time, cooldown: cooldown, expiration: expiration, aborter: aborter, optimistic: optimistic, loading: loading, ready: ready, mutate: mutate, fetch: fetch, refetch: refetch, scroll: scroll, clear: clear, suspend: suspend }; -} - -/** - * Single resource handle factory - * @param key Key (memoized) - * @param fetcher Resource fetcher (unmemoized) - * @param cparams Parameters (unmemoized) - * @returns Single handle - */ -function useSingle(key, fetcher, params) { - var _this = this; - if (params === void 0) { params = {}; } - var core = useCore(); - var mparams = __assign(__assign({}, core.params), params); - var keyRef = useAutoRef(key); - var fetcherRef = useAutoRef(fetcher); - var mparamsRef = useAutoRef(mparams); - var skey = useMemo(function () { - return getSingleStorageKey(key, mparamsRef.current); - }, [key]); - var _a = __read(useState(0), 2), setCounter = _a[1]; - var stateRef = useRef(); - useMemo(function () { - stateRef.current = core.getSync(skey, mparamsRef.current); - }, [core, skey]); - var setState = useCallback(function (state) { - stateRef.current = state; - setCounter(function (c) { return c + 1; }); - }, []); - var initRef = useRef(); - useEffect(function () { - if (stateRef.current !== null) - return; - initRef.current = core.get(skey, mparamsRef.current).then(setState); - }, [core, skey]); - useEffect(function () { - if (!skey) - return; - core.on(skey, setState, mparamsRef.current); - return function () { return void core.off(skey, setState, mparamsRef.current); }; - }, [core, skey]); - var mutate = useCallback(function (mutator) { return __awaiter(_this, void 0, void 0, function () { - var state, params; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - state = stateRef.current; - params = mparamsRef.current; - return [4 /*yield*/, core.mutate(skey, state, mutator, params)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); }, [core, skey]); - var clear = useCallback(function () { return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - return [4 /*yield*/, core.delete(skey, mparamsRef.current)]; - case 3: - _a.sent(); - return [2 /*return*/]; - } - }); - }); }, [core, skey]); - var fetch = useCallback(function (aborter) { return __awaiter(_this, void 0, void 0, function () { - var key, fetcher, params; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof window === "undefined") - throw new Error("Fetch on SSR"); - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - if (fetcherRef.current === undefined) - return [2 /*return*/, stateRef.current]; - key = keyRef.current; - fetcher = fetcherRef.current; - params = mparamsRef.current; - return [4 /*yield*/, core.single.fetch(key, skey, fetcher, aborter, params)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); }, [core, skey]); - var refetch = useCallback(function (aborter) { return __awaiter(_this, void 0, void 0, function () { - var key, fetcher, params; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof window === "undefined") - throw new Error("Refetch on SSR"); - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - if (fetcherRef.current === undefined) - return [2 /*return*/, stateRef.current]; - key = keyRef.current; - fetcher = fetcherRef.current; - params = mparamsRef.current; - return [4 /*yield*/, core.single.fetch(key, skey, fetcher, aborter, params, true, true)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); }, [core, skey]); - var update = useCallback(function (updater, uparams, aborter) { - if (uparams === void 0) { uparams = {}; } - return __awaiter(_this, void 0, void 0, function () { - var key, fetcher, params, fparams; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof window === "undefined") - throw new Error("Update on SSR"); - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - key = keyRef.current; - fetcher = fetcherRef.current; - params = mparamsRef.current; - fparams = __assign(__assign({}, params), uparams); - return [4 /*yield*/, core.single.update(key, skey, fetcher, updater, aborter, fparams)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); - }, [core, skey]); - var suspend = useCallback(function () { - if (typeof window === "undefined") - throw new Error("Suspend on SSR"); - return (function () { return __awaiter(_this, void 0, void 0, function () { - var key, fetcher, params, background; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - if (fetcherRef.current === undefined) - throw new Error("No fetcher"); - key = keyRef.current; - fetcher = fetcherRef.current; - params = mparamsRef.current; - background = new Promise(function (ok) { return core.once(skey, function () { return ok(); }, params); }); - return [4 /*yield*/, core.single.fetch(key, skey, fetcher, undefined, params, false, true)]; - case 3: - _a.sent(); - return [4 /*yield*/, background]; - case 4: - _a.sent(); - return [2 /*return*/]; - } - }); - }); })(); - }, [core, skey]); - var state = stateRef.current; - var _b = state !== null && state !== void 0 ? state : {}, data = _b.data, error = _b.error, time = _b.time, cooldown = _b.cooldown, expiration = _b.expiration, aborter = _b.aborter, optimistic = _b.optimistic; - var ready = state !== null; - var loading = Boolean(aborter); - return { key: key, skey: skey, data: data, error: error, time: time, cooldown: cooldown, expiration: expiration, aborter: aborter, optimistic: optimistic, loading: loading, ready: ready, mutate: mutate, fetch: fetch, refetch: refetch, update: update, clear: clear, suspend: suspend }; -} - -function use(factory, deps) { - var schema = useMemo(function () { - return factory.apply(void 0, __spreadArray([], __read(deps), false)); - }, deps); - if (schema instanceof SingleSchema) { - var key = schema.key, fetcher = schema.fetcher, params = schema.params; - return useSingle(key, fetcher, params); - } - if (schema instanceof ScrollSchema) { - var scroller = schema.scroller, fetcher = schema.fetcher, params = schema.params; - return useScroll(scroller, fetcher, params); - } - throw new Error("Invalid resource schema"); -} - -function useXSWR() { - var core = useCore(); - var make = useCallback(function (schema) { - return schema.make(core); - }, [core]); - return { core: core, make: make }; -} - -function useIDBStorage(name) { - var storage = useRef(); - if (storage.current === undefined) - storage.current = new IDBStorage(name); - useEffect(function () { return function () { - var _a; - (_a = storage.current) === null || _a === void 0 ? void 0 : _a.unmount(); - }; }, []); - return storage.current; -} -var IDBStorage = /** @class */ (function () { - function IDBStorage(name) { - var _this = this; - this.name = name; - this.async = true; - this.keys = new Set(); - if (typeof indexedDB === "undefined") - return; - this.initialization = this.load(); - this.onunload = function () { return _this.unload(); }; - addEventListener("beforeunload", this.onunload); - } - Object.defineProperty(IDBStorage.prototype, "database", { - get: function () { return this._database; }, - enumerable: false, - configurable: true - }); - IDBStorage.prototype.load = function () { - return __awaiter(this, void 0, void 0, function () { - var _a, item, keys; - var _this = this; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - if (typeof indexedDB === "undefined") - return [2 /*return*/]; - _a = this; - return [4 /*yield*/, new Promise(function (ok, err) { - var req = indexedDB.open(_this.name, 1); - req.onupgradeneeded = function () { - return req.result.createObjectStore("keyval", {}); - }; - req.onblocked = function () { return err("blocked"); }; - req.onsuccess = function () { return ok(req.result); }; - req.onerror = function () { return err(req.error); }; - })]; - case 1: - _a._database = _b.sent(); - if (typeof Storage === "undefined") - return [2 /*return*/]; - item = localStorage.getItem("idb.".concat(this.name, ".keys")); - if (!item) - return [2 /*return*/]; - keys = JSON.parse(item); - keys.forEach(function (key) { return _this.keys.add(key); }); - localStorage.removeItem("idb.".concat(this.name, ".keys")); - return [4 /*yield*/, this.collect().catch(console.error)]; - case 2: - _b.sent(); - return [2 /*return*/]; - } - }); - }); - }; - IDBStorage.prototype.unmount = function () { - if (typeof indexedDB === "undefined") - return; - if (this.onunload !== undefined) - removeEventListener("beforeunload", this.onunload); - this.collect().catch(console.error); - }; - IDBStorage.prototype.unload = function () { - if (typeof Storage === "undefined") - return; - var item = JSON.stringify(__spreadArray([], __read(this.keys), false)); - localStorage.setItem("idb.".concat(this.name, ".keys"), item); - }; - IDBStorage.prototype.collect = function () { - return __awaiter(this, void 0, void 0, function () { - var _a, _b, key, state, e_1_1; - var e_1, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - if (typeof indexedDB === "undefined") - return [2 /*return*/]; - _d.label = 1; - case 1: - _d.trys.push([1, 6, 7, 8]); - _a = __values(this.keys), _b = _a.next(); - _d.label = 2; - case 2: - if (!!_b.done) return [3 /*break*/, 5]; - key = _b.value; - return [4 /*yield*/, this.get(key, true)]; - case 3: - state = _d.sent(); - if ((state === null || state === void 0 ? void 0 : state.expiration) === undefined) - return [3 /*break*/, 4]; - if (state.expiration > Date.now()) - return [3 /*break*/, 4]; - this.delete(key, false); - _d.label = 4; - case 4: - _b = _a.next(); - return [3 /*break*/, 2]; - case 5: return [3 /*break*/, 8]; - case 6: - e_1_1 = _d.sent(); - e_1 = { error: e_1_1 }; - return [3 /*break*/, 8]; - case 7: - try { - if (_b && !_b.done && (_c = _a.return)) _c.call(_a); - } - finally { if (e_1) throw e_1.error; } - return [7 /*endfinally*/]; - case 8: return [2 /*return*/]; - } - }); - }); - }; - IDBStorage.prototype.transact = function (callback, mode) { - return __awaiter(this, void 0, void 0, function () { - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof indexedDB === "undefined") - return [2 /*return*/]; - if (!(this.database === undefined)) return [3 /*break*/, 2]; - return [4 /*yield*/, this.initialization]; - case 1: - _a.sent(); - _a.label = 2; - case 2: return [4 /*yield*/, new Promise(function (ok, err) { - if (_this.database === undefined) - throw new Error("Undefined database"); - var tx = _this.database.transaction("keyval", mode); - tx.onerror = function () { return err(tx.error); }; - tx.oncomplete = function () { return ok(result); }; - var result; - callback(tx.objectStore("keyval")) - .then(function (x) { return result = x; }) - .then(function () { return tx.commit(); }) - .catch(err); - })]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - IDBStorage.prototype.get = function (key, ignore) { - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof indexedDB === "undefined") - return [2 /*return*/]; - if (!ignore && !this.keys.has(key)) - this.keys.add(key); - return [4 /*yield*/, this.transact(function (store) { return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, new Promise(function (ok, err) { - var req = store.get(key); - req.onerror = function () { return err(req.error); }; - req.onsuccess = function () { return ok(req.result); }; - })]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); }, "readonly")]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - IDBStorage.prototype.set = function (key, value, ignore) { - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof indexedDB === "undefined") - return [2 /*return*/]; - if (!ignore && !this.keys.has(key)) - this.keys.add(key); - return [4 /*yield*/, this.transact(function (store) { return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, new Promise(function (ok, err) { - var req = store.put(value, key); - req.onerror = function () { return err(req.error); }; - req.onsuccess = function () { return ok(); }; - })]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); }, "readwrite")]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - IDBStorage.prototype.delete = function (key, ignore) { - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof indexedDB === "undefined") - return [2 /*return*/]; - if (!ignore && this.keys.has(key)) - this.keys.delete(key); - return [4 /*yield*/, this.transact(function (store) { return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, new Promise(function (ok, err) { - var req = store.delete(key); - req.onerror = function () { return err(req.error); }; - req.onsuccess = function () { return ok(); }; - })]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); }, "readwrite")]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - return IDBStorage; -}()); - -/** - * Asynchronous local storage - * - * Use for compatibility with SSR - * Use for storing large objects - * - * Won't display data on first render or hydratation, you can either: - * - use SyncLocalStorage - * - use useFallback - * - * @see SyncLocalStorage - * @see useFallback - */ -function useAsyncLocalStorage(prefix, serializer) { - var storage = useRef(); - if (storage.current === undefined) - storage.current = new AsyncLocalStorage(prefix, serializer); - useEffect(function () { return function () { - var _a; - (_a = storage.current) === null || _a === void 0 ? void 0 : _a.unmount(); - }; }, []); - return storage.current; -} -/** - * Asynchronous local storage - * - * Use for compatibility with SSR - * Use for storing large objects - * - * Won't display data on first render or hydratation, you can either: - * - use SyncLocalStorage - * - use useFallback - * - * @see SyncLocalStorage - * @see useFallback - */ -var AsyncLocalStorage = /** @class */ (function () { - function AsyncLocalStorage(prefix, serializer) { - if (prefix === void 0) { prefix = "xswr:"; } - if (serializer === void 0) { serializer = JSON; } - var _this = this; - this.prefix = prefix; - this.serializer = serializer; - this.async = true; - this.keys = new Set(); - if (typeof Storage === "undefined") - return; - this.onunload = function () { return _this.collect(); }; - addEventListener("beforeunload", this.onunload); - } - AsyncLocalStorage.prototype.unmount = function () { - var _this = this; - if (typeof Storage === "undefined") - return; - if (this.onunload) - removeEventListener("beforeunload", this.onunload); - (function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) { - return [2 /*return*/, this.collect()]; - }); }); })().catch(console.error); - }; - AsyncLocalStorage.prototype.collect = function () { - var e_1, _a; - if (typeof Storage === "undefined") - return; - try { - for (var _b = __values(this.keys), _c = _b.next(); !_c.done; _c = _b.next()) { - var key = _c.value; - var state = this.getSync(key, true); - if ((state === null || state === void 0 ? void 0 : state.expiration) === undefined) - continue; - if (state.expiration > Date.now()) - continue; - this.delete(key, false); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - }; - AsyncLocalStorage.prototype.getSync = function (key, ignore) { - if (ignore === void 0) { ignore = false; } - if (typeof Storage === "undefined") - return; - if (!ignore && !this.keys.has(key)) - this.keys.add(key); - var item = localStorage.getItem(this.prefix + key); - if (item) - return this.serializer.parse(item); - }; - AsyncLocalStorage.prototype.get = function (key, ignore) { - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var item; - return __generator(this, function (_a) { - if (typeof Storage === "undefined") - return [2 /*return*/]; - if (!ignore && !this.keys.has(key)) - this.keys.add(key); - item = localStorage.getItem(this.prefix + key); - if (item) - return [2 /*return*/, this.serializer.parse(item)]; - return [2 /*return*/]; - }); - }); - }; - AsyncLocalStorage.prototype.set = function (key, value, ignore) { - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var item; - return __generator(this, function (_a) { - if (typeof Storage === "undefined") - return [2 /*return*/]; - if (!ignore && !this.keys.has(key)) - this.keys.add(key); - item = this.serializer.stringify(value); - localStorage.setItem(this.prefix + key, item); - return [2 /*return*/]; - }); - }); - }; - AsyncLocalStorage.prototype.delete = function (key, ignore) { - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - if (typeof Storage === "undefined") - return [2 /*return*/]; - if (!ignore && this.keys.has(key)) - this.keys.delete(key); - localStorage.removeItem(this.prefix + key); - return [2 /*return*/]; - }); - }); - }; - return AsyncLocalStorage; -}()); - -/** - * Synchronous local storage - * - * Do NOT use with SSR, it will create hydratation errors - * Do NOT use for storing large objects, it will harm performances - * - * Will display data on first render - * - * @see AsyncLocalStorage - */ -function useSyncLocalStorage(prefix, serializer) { - var storage = useRef(); - if (!storage.current) - storage.current = new SyncLocalStorage(prefix, serializer); - useEffect(function () { return function () { - var _a; - (_a = storage.current) === null || _a === void 0 ? void 0 : _a.unmount(); - }; }, []); - return storage.current; -} -/** - * Synchronous local storage - * - * Do NOT use with SSR, it will create hydratation errors - * Do NOT use for storing large objects, it will harm performances - * - * Will display data on first render - * - * @see AsyncLocalStorage - */ -var SyncLocalStorage = /** @class */ (function () { - function SyncLocalStorage(prefix, serializer) { - if (prefix === void 0) { prefix = "xswr:"; } - if (serializer === void 0) { serializer = JSON; } - var _this = this; - this.prefix = prefix; - this.serializer = serializer; - this.async = false; - this.keys = new Set(); - if (typeof Storage === "undefined") - return; - this.onunload = function () { return _this.collect(); }; - addEventListener("beforeunload", this.onunload); - } - SyncLocalStorage.prototype.unmount = function () { - var _this = this; - if (typeof Storage === "undefined") - return; - removeEventListener("beforeunload", this.onunload); - (function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) { - return [2 /*return*/, this.collect()]; - }); }); })().catch(console.error); - }; - SyncLocalStorage.prototype.collect = function () { - var e_1, _a; - if (typeof Storage === "undefined") - return; - try { - for (var _b = __values(this.keys), _c = _b.next(); !_c.done; _c = _b.next()) { - var key = _c.value; - var state = this.get(key, true); - if ((state === null || state === void 0 ? void 0 : state.expiration) === undefined) - continue; - if (state.expiration > Date.now()) - continue; - this.delete(key, false); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - }; - SyncLocalStorage.prototype.get = function (key, ignore) { - if (ignore === void 0) { ignore = false; } - if (typeof Storage === "undefined") - return; - if (!ignore && !this.keys.has(key)) - this.keys.add(key); - var item = localStorage.getItem(this.prefix + key); - if (item) - return this.serializer.parse(item); - }; - SyncLocalStorage.prototype.set = function (key, value, ignore) { - if (ignore === void 0) { ignore = false; } - if (typeof Storage === "undefined") - return; - if (!ignore && !this.keys.has(key)) - this.keys.add(key); - var item = this.serializer.stringify(value); - localStorage.setItem(this.prefix + key, item); - }; - SyncLocalStorage.prototype.delete = function (key, ignore) { - if (ignore === void 0) { ignore = false; } - if (typeof Storage === "undefined") - return; - if (!ignore && this.keys.has(key)) - this.keys.delete(key); - localStorage.removeItem(this.prefix + key); - }; - return SyncLocalStorage; -}()); - -var index = { - __proto__: null, - Core: Core, - AbortError: AbortError, - isAbortError: isAbortError, - CoreContext: CoreContext, - useCore: useCore, - useCoreProvider: useCoreProvider, - CoreProvider: CoreProvider, - useDebug: useDebug, - useError: useError, - useFallback: useFallback, - useFetch: useFetch, - useInterval: useInterval, - useMount: useMount, - useOnce: useOnce, - useOnline: useOnline, - useRetry: useRetry, - useVisible: useVisible, - use: use, - useScroll: useScroll, - useSingle: useSingle, - useXSWR: useXSWR, - ScrollHelper: ScrollHelper, - getScrollStorageKey: getScrollStorageKey, - ScrollObject: ScrollObject, - scroll: scroll, - ScrollSchema: ScrollSchema, - SingleHelper: SingleHelper, - getSingleStorageKey: getSingleStorageKey, - SingleObject: SingleObject, - single: single, - SingleSchema: SingleSchema, - useIDBStorage: useIDBStorage, - IDBStorage: IDBStorage, - useAsyncLocalStorage: useAsyncLocalStorage, - AsyncLocalStorage: AsyncLocalStorage, - useSyncLocalStorage: useSyncLocalStorage, - SyncLocalStorage: SyncLocalStorage, - isAsyncStorage: isAsyncStorage, - DEFAULT_EQUALS: DEFAULT_EQUALS, - DEFAULT_SERIALIZER: DEFAULT_SERIALIZER, - DEFAULT_COOLDOWN: DEFAULT_COOLDOWN, - DEFAULT_EXPIRATION: DEFAULT_EXPIRATION, - DEFAULT_TIMEOUT: DEFAULT_TIMEOUT, - refEquals: refEquals, - jsonEquals: jsonEquals, - shallowEquals: shallowEquals -}; - -export { index as XSWR }; +import*as t from"react";import{createContext as e,useContext as r,useRef as n,useEffect as i,useMemo as o,useState as u,useCallback as s}from"react";function a(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}var c=function(t,e){return(c=Object.setPrototypeOf||a({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function l(t,e){var r=function(){this.constructor=t};if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");c(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var f=function(){return(f=Object.assign||function(t){for(var e,r=1,n=arguments.length;re.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(t);ie.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function h(t,e,r,n){var i=function(t){return a(t,r)?t:new r(function(e){e(t)})};return new(r||(r=Promise))(function(r,o){var u=function(t){try{a(n.next(t))}catch(e){o(e)}},s=function(t){try{a(n.throw(t))}catch(e){o(e)}},a=function(t){t.done?r(t.value):i(t.value).then(u,s)};a((n=n.apply(t,e||[])).next())})}function v(t,e){var r,n,i,o,u=function(t){return function(e){return s([t,e])}},s=function(o){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u}function m(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i1)return this.counts.set(e,i-1),[2];return this.counts.delete(e),[4,this.get(e,n,!0)];case 1:if((null==(o=s.sent())?void 0:o.expiration)===void 0||(null==o?void 0:o.expiration)===-1)return[2];if(u=function(){return h(c,void 0,void 0,function(){var t;return v(this,function(t){switch(t.label){case 0:if(!this._mounted||void 0!==this.counts.get(e))return[2];return this.timeouts.delete(e),[4,this.delete(e,n)];case 1:return t.sent(),[2]}})})},!(Date.now()>o.expiration))return[3,3];return[4,u()];case 2:return s.sent(),[2];case 3:return a=setTimeout(u,o.expiration-Date.now()),this.timeouts.set(e,a),[2]}})})},e}(g),Q=e(void 0);function V(){var t=r(Q);if(void 0===t)throw Error("Undefined core");return t}function Z(t){var e=n();return void 0===e.current&&(e.current=new G(t)),i(function(){return function(){var t;null===(t=e.current)||void 0===t||t.unmount()}},[]),e.current}function Y(e){var r=e.children,n=d(e,["children"]),i=Z(n);return t.createElement(Q.Provider,{value:i},r)}function $(t,e){var r=t.data;i(function(){console.debug(e,t)},[r,t.error,t.time])}function tt(t,e){var r=t.error;i(function(){void 0!==r&&e(r)},[r])}function te(t,e){var r=t.data,n=t.error;void 0===r&&void 0===n&&Object.assign(t,e)}function tr(t){var e=t.fetch;i(function(){e()},[e])}function tn(t,e){var r=t.ready,n=t.fetch;i(function(){if(r&&e){var t=setInterval(n,e);return function(){return clearInterval(t)}}},[n,e])}function ti(t){var e=t.fetch;i(function(){e()},[])}function to(t){var e=t.data,r=t.fetch;i(function(){void 0===e&&r()},[e,r])}function tu(t){var e=n(t);return e.current=t,e}function ts(t){var e=t.ready,r=tu(t.fetch);i(function(){if(e){var t=function(){return r.current()};return addEventListener("online",t),function(){return removeEventListener("online",t)}}},[e])}function ta(t,e){void 0===e&&(e={});var r=t.ready,o=t.skey,u=t.refetch,s=t.error,a=e.init,c=void 0===a?1e3:a,l=e.base,f=void 0===l?2:l,d=e.max,h=void 0===d?3:d,v=n(0);i(function(){v.current=0},[o]);var p=tu(u);i(function(){var t=function(){v.current++,p.current()};if(r){if(void 0===s){v.current=0;return}if(!(v.current>=h)){var e=setTimeout(t,c*Math.pow(f,v.current));return function(){return clearTimeout(e)}}}},[r,s])}function tc(t){var e=t.ready,r=tu(t.fetch);i(function(){if(e){var t=function(){return!document.hidden&&r.current()};return document.addEventListener("visibilitychange",t),function(){return document.removeEventListener("visibilitychange",t)}}},[e])}function tl(t,e,r){var a=this;void 0===r&&(r={});var c=V(),l=f(f({},c.params),r),d=tu(t),p=tu(e),m=tu(l),b=o(function(){return t()},[t]),w=o(function(){return z(b,m.current)},[b]),g=y(u(0),2)[1],S=n();o(function(){S.current=c.getSync(w,m.current)},[c,w]);var k=s(function(t){S.current=t,g(function(t){return t+1})},[]),x=n();i(function(){null===S.current&&(x.current=c.get(w,m.current).then(k))},[c,w]),i(function(){if(w)return c.on(w,k,m.current),function(){c.off(w,k,m.current)}},[c,w]);var _=s(function(t){return h(a,void 0,void 0,function(){var e,r;return v(this,function(n){switch(n.label){case 0:if(null!==S.current)return[3,2];return[4,x.current];case 1:n.sent(),n.label=2;case 2:if(null===S.current)throw Error("Null state after init");return e=S.current,r=m.current,[4,c.mutate(w,e,t,r)];case 3:return[2,n.sent()]}})})},[c,w]),E=s(function(){return h(a,void 0,void 0,function(){return v(this,function(t){switch(t.label){case 0:if(null!==S.current)return[3,2];return[4,x.current];case 1:t.sent(),t.label=2;case 2:if(null===S.current)throw Error("Null state after init");return[4,c.delete(w,m.current)];case 3:return t.sent(),[2]}})})},[c,w]),O=s(function(t){return h(a,void 0,void 0,function(){var e,r,n;return v(this,function(i){switch(i.label){case 0:if("undefined"==typeof window)throw Error("Fetch on SSR");if(null!==S.current)return[3,2];return[4,x.current];case 1:i.sent(),i.label=2;case 2:if(null===S.current)throw Error("Null state after init");if(void 0===p.current)return[2,S.current];return e=d.current,r=p.current,n=m.current,[4,c.scroll.first(w,e,r,t,n)];case 3:return[2,i.sent()]}})})},[c,w]),A=s(function(t){return h(a,void 0,void 0,function(){var e,r,n;return v(this,function(i){switch(i.label){case 0:if("undefined"==typeof window)throw Error("Refetch on SSR");if(null!==S.current)return[3,2];return[4,x.current];case 1:i.sent(),i.label=2;case 2:if(null===S.current)throw Error("Null state after init");if(void 0===p.current)return[2,S.current];return e=d.current,r=p.current,n=m.current,[4,c.scroll.first(w,e,r,t,n,!0,!0)];case 3:return[2,i.sent()]}})})},[c,w]),I=s(function(t){return h(a,void 0,void 0,function(){var e,r,n;return v(this,function(i){switch(i.label){case 0:if("undefined"==typeof window)throw Error("Scroll on SSR");if(null!==S.current)return[3,2];return[4,x.current];case 1:i.sent(),i.label=2;case 2:if(null===S.current)throw Error("Null state after init");if(void 0===p.current)return[2,S.current];return e=d.current,r=p.current,n=m.current,[4,c.scroll.scroll(w,e,r,t,n,!0,!0)];case 3:return[2,i.sent()]}})})},[c,w]),D=s(function(){if("undefined"==typeof window)throw Error("Suspend on SSR");return h(a,void 0,void 0,function(){var t,e,r,n;return v(this,function(i){switch(i.label){case 0:if(null!==S.current)return[3,2];return[4,x.current];case 1:i.sent(),i.label=2;case 2:if(null===S.current)throw Error("Null state after init");if(void 0===p.current)throw Error("No fetcher");return t=d.current,e=p.current,r=m.current,n=new Promise(function(t){return c.once(w,function(){return t()},r)}),[4,c.scroll.first(w,t,e,void 0,r,!1,!0)];case 3:return i.sent(),[4,n];case 4:return i.sent(),[2]}})})},[c,w]),N=S.current,P=null!=N?N:{},j=P.data,T=P.error,L=P.time,R=P.cooldown,C=P.expiration,U=P.aborter,B=P.optimistic,F=Boolean(U);return{key:b,skey:w,data:j,error:T,time:L,cooldown:R,expiration:C,aborter:U,optimistic:B,loading:F,ready:null!==N,mutate:_,fetch:O,refetch:A,scroll:I,clear:E,suspend:D}}function tf(t,e,r){var a=this;void 0===r&&(r={});var c=V(),l=f(f({},c.params),r),d=tu(t),p=tu(e),m=tu(l),b=o(function(){return J(t,m.current)},[t]),w=y(u(0),2)[1],g=n();o(function(){g.current=c.getSync(b,m.current)},[c,b]);var S=s(function(t){g.current=t,w(function(t){return t+1})},[]),k=n();i(function(){null===g.current&&(k.current=c.get(b,m.current).then(S))},[c,b]),i(function(){if(b)return c.on(b,S,m.current),function(){c.off(b,S,m.current)}},[c,b]);var x=s(function(t){return h(a,void 0,void 0,function(){var e,r;return v(this,function(n){switch(n.label){case 0:if(null!==g.current)return[3,2];return[4,k.current];case 1:n.sent(),n.label=2;case 2:if(null===g.current)throw Error("Null state after init");return e=g.current,r=m.current,[4,c.mutate(b,e,t,r)];case 3:return[2,n.sent()]}})})},[c,b]),_=s(function(){return h(a,void 0,void 0,function(){return v(this,function(t){switch(t.label){case 0:if(null!==g.current)return[3,2];return[4,k.current];case 1:t.sent(),t.label=2;case 2:if(null===g.current)throw Error("Null state after init");return[4,c.delete(b,m.current)];case 3:return t.sent(),[2]}})})},[c,b]),E=s(function(t){return h(a,void 0,void 0,function(){var e,r,n;return v(this,function(i){switch(i.label){case 0:if("undefined"==typeof window)throw Error("Fetch on SSR");if(null!==g.current)return[3,2];return[4,k.current];case 1:i.sent(),i.label=2;case 2:if(null===g.current)throw Error("Null state after init");if(void 0===p.current)return[2,g.current];return e=d.current,r=p.current,n=m.current,[4,c.single.fetch(e,b,r,t,n)];case 3:return[2,i.sent()]}})})},[c,b]),O=s(function(t){return h(a,void 0,void 0,function(){var e,r,n;return v(this,function(i){switch(i.label){case 0:if("undefined"==typeof window)throw Error("Refetch on SSR");if(null!==g.current)return[3,2];return[4,k.current];case 1:i.sent(),i.label=2;case 2:if(null===g.current)throw Error("Null state after init");if(void 0===p.current)return[2,g.current];return e=d.current,r=p.current,n=m.current,[4,c.single.fetch(e,b,r,t,n,!0,!0)];case 3:return[2,i.sent()]}})})},[c,b]),A=s(function(t,e,r){return void 0===e&&(e={}),h(a,void 0,void 0,function(){var n,i,o,u;return v(this,function(o){switch(o.label){case 0:if("undefined"==typeof window)throw Error("Update on SSR");if(null!==g.current)return[3,2];return[4,k.current];case 1:o.sent(),o.label=2;case 2:if(null===g.current)throw Error("Null state after init");return n=d.current,i=p.current,u=f(f({},m.current),e),[4,c.single.update(n,b,i,t,r,u)];case 3:return[2,o.sent()]}})})},[c,b]),I=s(function(){if("undefined"==typeof window)throw Error("Suspend on SSR");return h(a,void 0,void 0,function(){var t,e,r,n;return v(this,function(i){switch(i.label){case 0:if(null!==g.current)return[3,2];return[4,k.current];case 1:i.sent(),i.label=2;case 2:if(null===g.current)throw Error("Null state after init");if(void 0===p.current)throw Error("No fetcher");return t=d.current,e=p.current,r=m.current,n=new Promise(function(t){return c.once(b,function(){return t()},r)}),[4,c.single.fetch(t,b,e,void 0,r,!1,!0)];case 3:return i.sent(),[4,n];case 4:return i.sent(),[2]}})})},[c,b]),D=g.current,N=null!=D?D:{},P=N.data,j=N.error,T=N.time,L=N.cooldown,R=N.expiration,z=N.aborter,C=N.optimistic,U=Boolean(z);return{key:t,skey:b,data:P,error:j,time:T,cooldown:L,expiration:R,aborter:z,optimistic:C,loading:U,ready:null!==D,mutate:x,fetch:E,refetch:O,update:A,clear:_,suspend:I}}function td(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function th(t,e){var r=o(function(){return t.apply(void 0,m([],y(e),!1))},e);if(td(r,X)){var n=r.key,i=r.fetcher,u=r.params;return tf(n,i,u)}if(td(r,B)){var s=r.scroller,i=r.fetcher,u=r.params;return tl(s,i,u)}throw Error("Invalid resource schema")}function tv(){var t=V(),e=s(function(e){return e.make(t)},[t]);return{core:t,make:e}}function tp(t){var e=n();return void 0===e.current&&(e.current=new ty(t)),i(function(){return function(){var t;null===(t=e.current)||void 0===t||t.unmount()}},[]),e.current}var ty=function(){var t=function(t){var e=this;this.name=t,this.async=!0,this.keys=new Set,"undefined"!=typeof indexedDB&&(this.initialization=this.load(),this.onunload=function(){return e.unload()},addEventListener("beforeunload",this.onunload))};return Object.defineProperty(t.prototype,"database",{get:function(){return this._database},enumerable:!1,configurable:!0}),t.prototype.load=function(){return h(this,void 0,void 0,function(){var t,e,r,n=this;return v(this,function(r){switch(r.label){case 0:if("undefined"==typeof indexedDB)return[2];return t=this,[4,new Promise(function(t,e){var r=indexedDB.open(n.name,1);r.onupgradeneeded=function(){return r.result.createObjectStore("keyval",{})},r.onblocked=function(){return e("blocked")},r.onsuccess=function(){return t(r.result)},r.onerror=function(){return e(r.error)}})];case 1:if(t._database=r.sent(),"undefined"==typeof Storage||!(e=localStorage.getItem("idb.".concat(this.name,".keys"))))return[2];return JSON.parse(e).forEach(function(t){return n.keys.add(t)}),localStorage.removeItem("idb.".concat(this.name,".keys")),[4,this.collect().catch(console.error)];case 2:return r.sent(),[2]}})})},t.prototype.unmount=function(){"undefined"!=typeof indexedDB&&(void 0!==this.onunload&&removeEventListener("beforeunload",this.onunload),this.collect().catch(console.error))},t.prototype.unload=function(){if("undefined"!=typeof Storage){var t=JSON.stringify(m([],y(this.keys),!1));localStorage.setItem("idb.".concat(this.name,".keys"),t)}},t.prototype.collect=function(){return h(this,void 0,void 0,function(){var t,e,r,n,i,o,u;return v(this,function(i){switch(i.label){case 0:if("undefined"==typeof indexedDB)return[2];i.label=1;case 1:i.trys.push([1,6,7,8]),e=(t=p(this.keys)).next(),i.label=2;case 2:if(e.done)return[3,5];return r=e.value,[4,this.get(r,!0)];case 3:if((null==(n=i.sent())?void 0:n.expiration)===void 0||n.expiration>Date.now())return[3,4];this.delete(r,!1),i.label=4;case 4:return e=t.next(),[3,2];case 5:return[3,8];case 6:return o={error:i.sent()},[3,8];case 7:try{e&&!e.done&&(u=t.return)&&u.call(t)}finally{if(o)throw o.error}return[7];case 8:return[2]}})})},t.prototype.transact=function(t,e){return h(this,void 0,void 0,function(){var r=this;return v(this,function(n){switch(n.label){case 0:if("undefined"==typeof indexedDB)return[2];if(void 0!==this.database)return[3,2];return[4,this.initialization];case 1:n.sent(),n.label=2;case 2:return[4,new Promise(function(n,i){if(void 0===r.database)throw Error("Undefined database");var o,u=r.database.transaction("keyval",e);u.onerror=function(){return i(u.error)},u.oncomplete=function(){return n(o)},t(u.objectStore("keyval")).then(function(t){return o=t}).then(function(){return u.commit()}).catch(i)})];case 3:return[2,n.sent()]}})})},t.prototype.get=function(t,e){return void 0===e&&(e=!1),h(this,void 0,void 0,function(){var r=this;return v(this,function(n){switch(n.label){case 0:if("undefined"==typeof indexedDB)return[2];return e||this.keys.has(t)||this.keys.add(t),[4,this.transact(function(e){return h(r,void 0,void 0,function(){return v(this,function(r){switch(r.label){case 0:return[4,new Promise(function(r,n){var i=e.get(t);i.onerror=function(){return n(i.error)},i.onsuccess=function(){return r(i.result)}})];case 1:return[2,r.sent()]}})})},"readonly")];case 1:return[2,n.sent()]}})})},t.prototype.set=function(t,e,r){return void 0===r&&(r=!1),h(this,void 0,void 0,function(){var n=this;return v(this,function(i){switch(i.label){case 0:if("undefined"==typeof indexedDB)return[2];return r||this.keys.has(t)||this.keys.add(t),[4,this.transact(function(r){return h(n,void 0,void 0,function(){return v(this,function(n){switch(n.label){case 0:return[4,new Promise(function(n,i){var o=r.put(e,t);o.onerror=function(){return i(o.error)},o.onsuccess=function(){return n()}})];case 1:return[2,n.sent()]}})})},"readwrite")];case 1:return[2,i.sent()]}})})},t.prototype.delete=function(t,e){return void 0===e&&(e=!1),h(this,void 0,void 0,function(){var r=this;return v(this,function(n){switch(n.label){case 0:if("undefined"==typeof indexedDB)return[2];return!e&&this.keys.has(t)&&this.keys.delete(t),[4,this.transact(function(e){return h(r,void 0,void 0,function(){return v(this,function(r){switch(r.label){case 0:return[4,new Promise(function(r,n){var i=e.delete(t);i.onerror=function(){return n(i.error)},i.onsuccess=function(){return r()}})];case 1:return[2,r.sent()]}})})},"readwrite")];case 1:return[2,n.sent()]}})})},t}();function tm(t,e){var r=n();return void 0===r.current&&(r.current=new tb(t,e)),i(function(){return function(){var t;null===(t=r.current)||void 0===t||t.unmount()}},[]),r.current}var tb=function(){var t=function(t,e){void 0===t&&(t="xswr:"),void 0===e&&(e=JSON);var r=this;this.prefix=t,this.serializer=e,this.async=!0,this.keys=new Set,"undefined"!=typeof Storage&&(this.onunload=function(){return r.collect()},addEventListener("beforeunload",this.onunload))};return t.prototype.unmount=function(){"undefined"!=typeof Storage&&(this.onunload&&removeEventListener("beforeunload",this.onunload),h(this,void 0,void 0,function(){return v(this,function(t){return[2,this.collect()]})}).catch(console.error))},t.prototype.collect=function(){var t,e;if("undefined"!=typeof Storage)try{for(var r=p(this.keys),n=r.next();!n.done;n=r.next()){var i=n.value,o=this.getSync(i,!0);(null==o?void 0:o.expiration)!==void 0&&(o.expiration>Date.now()||this.delete(i,!1))}}catch(u){t={error:u}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},t.prototype.getSync=function(t,e){if(void 0===e&&(e=!1),"undefined"!=typeof Storage){e||this.keys.has(t)||this.keys.add(t);var r=localStorage.getItem(this.prefix+t);if(r)return this.serializer.parse(r)}},t.prototype.get=function(t,e){return void 0===e&&(e=!1),h(this,void 0,void 0,function(){var r;return v(this,function(n){return"undefined"==typeof Storage?[2]:(e||this.keys.has(t)||this.keys.add(t),r=localStorage.getItem(this.prefix+t))?[2,this.serializer.parse(r)]:[2]})})},t.prototype.set=function(t,e,r){return void 0===r&&(r=!1),h(this,void 0,void 0,function(){var n;return v(this,function(i){return"undefined"==typeof Storage||(r||this.keys.has(t)||this.keys.add(t),n=this.serializer.stringify(e),localStorage.setItem(this.prefix+t,n)),[2]})})},t.prototype.delete=function(t,e){return void 0===e&&(e=!1),h(this,void 0,void 0,function(){return v(this,function(r){return"undefined"==typeof Storage||(!e&&this.keys.has(t)&&this.keys.delete(t),localStorage.removeItem(this.prefix+t)),[2]})})},t}();function tw(t,e){var r=n();return r.current||(r.current=new tg(t,e)),i(function(){return function(){var t;null===(t=r.current)||void 0===t||t.unmount()}},[]),r.current}var tg=function(){var t=function(t,e){void 0===t&&(t="xswr:"),void 0===e&&(e=JSON);var r=this;this.prefix=t,this.serializer=e,this.async=!1,this.keys=new Set,"undefined"!=typeof Storage&&(this.onunload=function(){return r.collect()},addEventListener("beforeunload",this.onunload))};return t.prototype.unmount=function(){"undefined"!=typeof Storage&&(removeEventListener("beforeunload",this.onunload),h(this,void 0,void 0,function(){return v(this,function(t){return[2,this.collect()]})}).catch(console.error))},t.prototype.collect=function(){var t,e;if("undefined"!=typeof Storage)try{for(var r=p(this.keys),n=r.next();!n.done;n=r.next()){var i=n.value,o=this.get(i,!0);(null==o?void 0:o.expiration)!==void 0&&(o.expiration>Date.now()||this.delete(i,!1))}}catch(u){t={error:u}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},t.prototype.get=function(t,e){if(void 0===e&&(e=!1),"undefined"!=typeof Storage){e||this.keys.has(t)||this.keys.add(t);var r=localStorage.getItem(this.prefix+t);if(r)return this.serializer.parse(r)}},t.prototype.set=function(t,e,r){if(void 0===r&&(r=!1),"undefined"!=typeof Storage){r||this.keys.has(t)||this.keys.add(t);var n=this.serializer.stringify(e);localStorage.setItem(this.prefix+t,n)}},t.prototype.delete=function(t,e){void 0===e&&(e=!1),"undefined"!=typeof Storage&&(!e&&this.keys.has(t)&&this.keys.delete(t),localStorage.removeItem(this.prefix+t))},t}(),tS={__proto__:null,Core:G,AbortError:_,isAbortError:E,CoreContext:Q,useCore:V,useCoreProvider:Z,CoreProvider:Y,useDebug:$,useError:tt,useFallback:te,useFetch:tr,useInterval:tn,useMount:ti,useOnce:to,useOnline:ts,useRetry:ta,useVisible:tc,use:th,useScroll:tl,useSingle:tf,useXSWR:tv,ScrollHelper:R,getScrollStorageKey:z,ScrollObject:C,scroll:U,ScrollSchema:B,SingleHelper:M,getSingleStorageKey:J,SingleObject:q,single:W,SingleSchema:X,useIDBStorage:tp,IDBStorage:ty,useAsyncLocalStorage:tm,AsyncLocalStorage:tb,useSyncLocalStorage:tw,SyncLocalStorage:tg,isAsyncStorage:H,DEFAULT_EQUALS:N,DEFAULT_SERIALIZER:P,DEFAULT_COOLDOWN:j,DEFAULT_EXPIRATION:T,DEFAULT_TIMEOUT:L,refEquals:A,jsonEquals:I,shallowEquals:D};export{tS as XSWR}; diff --git a/dist/index.js b/dist/index.js index 251984c3..43ed3707 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,2683 +1 @@ -Object.defineProperty(exports, '__esModule', { value: true }); - -var React = require('react'); - -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -var React__default = /*#__PURE__*/_interopDefaultLegacy(React); - -/*! ***************************************************************************** -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. -***************************************************************************** */ -/* global Reflect, Promise */ - -var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); -}; - -function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); -} - -var __assign = function() { - __assign = Object.assign || function __assign(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; - -function __rest(s, e) { - var t = {}; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) - t[p] = s[p]; - if (s != null && typeof Object.getOwnPropertySymbols === "function") - for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { - if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) - t[p[i]] = s[p[i]]; - } - return t; -} - -function __awaiter(thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -} - -function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; - function verb(n) { return function (v) { return step([n, v]); }; } - function step(op) { - if (f) throw new TypeError("Generator is already executing."); - while (_) try { - if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; - if (y = 0, t) op = [op[0] & 2, t.value]; - switch (op[0]) { - case 0: case 1: t = op; break; - case 4: _.label++; return { value: op[1], done: false }; - case 5: _.label++; y = op[1]; op = [0]; continue; - case 7: op = _.ops.pop(); _.trys.pop(); continue; - default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } - if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); continue; - } - op = body.call(thisArg, _); - } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } - if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; - } -} - -function __values(o) { - var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; - if (m) return m.call(o); - if (o && typeof o.length === "number") return { - next: function () { - if (o && i >= o.length) o = void 0; - return { value: o && o[i++], done: !o }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); -} - -function __read(o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -} - -function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || from); -} - -function __asyncValues(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -} - -/** - * Map of arrays data structure - */ -var MapOfArrays = /** @class */ (function () { - function MapOfArrays() { - this.map = new Map(); - } - MapOfArrays.prototype.get = function (key) { - return this.map.get(key); - }; - MapOfArrays.prototype.push = function (key, value) { - var values = this.map.get(key); - if (!values) - this.map.set(key, [value]); - else - values.push(value); - }; - MapOfArrays.prototype.erase = function (key, value) { - var values = this.map.get(key); - if (!values) - return; - var values2 = values - .filter(function (it) { return it !== value; }); - if (values2.length) - this.map.set(key, values2); - else - this.map.delete(key); - }; - return MapOfArrays; -}()); -/** - * Orthogonal state publisher - */ -var Ortho = /** @class */ (function () { - function Ortho() { - this.listeners = new MapOfArrays(); - } - Ortho.prototype.publish = function (key, value) { - var e_1, _a; - var listeners = this.listeners.get(key); - if (!listeners) - return; - try { - for (var listeners_1 = __values(listeners), listeners_1_1 = listeners_1.next(); !listeners_1_1.done; listeners_1_1 = listeners_1.next()) { - var listener = listeners_1_1.value; - listener(value); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (listeners_1_1 && !listeners_1_1.done && (_a = listeners_1.return)) _a.call(listeners_1); - } - finally { if (e_1) throw e_1.error; } - } - }; - Ortho.prototype.on = function (key, listener) { - this.listeners.push(key, listener); - }; - Ortho.prototype.off = function (key, listener) { - this.listeners.erase(key, listener); - }; - return Ortho; -}()); - -function lastOf(array) { - if (array.length) - return array[array.length - 1]; -} - -function getTimeFromDelay(delay) { - if (delay === -1) - return; - return Date.now() + delay; -} - -var AbortError = /** @class */ (function (_super) { - __extends(AbortError, _super); - function AbortError(signal) { - return _super.call(this, "Aborted: ".concat(signal.reason), { cause: signal }) || this; - } - return AbortError; -}(Error)); -function isAbortError(e) { - if (e instanceof AbortError) - return true; - if (e instanceof DOMException && e.name === "AbortError") - return true; - return false; -} - -function refEquals(a, b) { - return a === b; -} -function jsonEquals(a, b) { - if (a === b) - return true; - if (typeof a !== typeof b) - return false; - return JSON.stringify(a) === JSON.stringify(b); -} -function shallowEquals(a, b) { - var e_1, _a; - if (a === b) - return true; - if (typeof a !== typeof b) - return false; - var ka = Object.keys(a); - var kb = Object.keys(b); - if (ka.length !== kb.length) - return false; - try { - for (var ka_1 = __values(ka), ka_1_1 = ka_1.next(); !ka_1_1.done; ka_1_1 = ka_1.next()) { - var key = ka_1_1.value; - if (a[key] !== b[key]) - return false; - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (ka_1_1 && !ka_1_1.done && (_a = ka_1.return)) _a.call(ka_1); - } - finally { if (e_1) throw e_1.error; } - } - return true; -} - -var DEFAULT_EQUALS = jsonEquals; -var DEFAULT_SERIALIZER = JSON; -var DEFAULT_COOLDOWN = 1 * 1000; -var DEFAULT_EXPIRATION = -1; -var DEFAULT_TIMEOUT = 5 * 1000; - -var ScrollHelper = /** @class */ (function () { - function ScrollHelper(core) { - this.core = core; - } - /** - * Fetch first page - * @param skey Storage key - * @param scroller Key scroller - * @param fetcher Resource fetcher - * @param aborter AbortController - * @param tparams Time parameters - * @param force Should ignore cooldown - * @returns The new state - */ - ScrollHelper.prototype.first = function (skey, scroller, fetcher, aborter, params, force, ignore) { - var _a; - if (aborter === void 0) { aborter = new AbortController(); } - if (params === void 0) { params = {}; } - if (force === void 0) { force = false; } - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var _b, current, skip, first, _c, equals, _d, dcooldown, _e, dexpiration, _f, dtimeout, timeout, signal, _g, data, error, _h, time_1, _j, cooldown_1, _k, expiration_1, state_1, norm, error_1; - var _this = this; - return __generator(this, function (_l) { - switch (_l.label) { - case 0: - if (skey === undefined) - return [2 /*return*/]; - return [4 /*yield*/, this.core.lock(skey, function () { return __awaiter(_this, void 0, void 0, function () { - var current, first; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.core.get(skey, params)]; - case 1: - current = _a.sent(); - if (current === null || current === void 0 ? void 0 : current.optimistic) - return [2 /*return*/, { current: current, skip: true }]; - if ((current === null || current === void 0 ? void 0 : current.aborter) && !force) - return [2 /*return*/, { current: current, skip: true }]; - if ((current === null || current === void 0 ? void 0 : current.aborter) && force) - current.aborter.abort("Replaced"); - if (this.core.shouldCooldown(current) && !ignore) - return [2 /*return*/, { current: current, skip: true }]; - first = scroller(undefined); - if (first === undefined) - return [2 /*return*/, { current: current, skip: true }]; - return [4 /*yield*/, this.core.mutate(skey, current, function (c) { return ({ time: c === null || c === void 0 ? void 0 : c.time, aborter: aborter }); }, params)]; - case 2: - current = _a.sent(); - return [2 /*return*/, { current: current, first: first }]; - } - }); - }); })]; - case 1: - _b = _l.sent(), current = _b.current, skip = _b.skip, first = _b.first; - if (skip) - return [2 /*return*/, current]; - if (first === undefined) - throw new Error("Undefined first"); - _c = params.equals, equals = _c === void 0 ? DEFAULT_EQUALS : _c, _d = params.cooldown, dcooldown = _d === void 0 ? DEFAULT_COOLDOWN : _d, _e = params.expiration, dexpiration = _e === void 0 ? DEFAULT_EXPIRATION : _e, _f = params.timeout, dtimeout = _f === void 0 ? DEFAULT_TIMEOUT : _f; - timeout = setTimeout(function () { - aborter.abort("First timed out"); - }, dtimeout); - _l.label = 2; - case 2: - _l.trys.push([2, 8, 11, 12]); - signal = aborter.signal; - return [4 /*yield*/, fetcher(first, { signal: signal })]; - case 3: - _g = _l.sent(), data = _g.data, error = _g.error, _h = _g.time, time_1 = _h === void 0 ? Date.now() : _h, _j = _g.cooldown, cooldown_1 = _j === void 0 ? getTimeFromDelay(dcooldown) : _j, _k = _g.expiration, expiration_1 = _k === void 0 ? getTimeFromDelay(dexpiration) : _k; - if (signal.aborted) - throw new AbortError(signal); - return [4 /*yield*/, this.core.get(skey, params)]; - case 4: - current = _l.sent(); - state_1 = {}; - if (data !== undefined) - state_1.data = [data]; - state_1.error = error; - if (!(data !== undefined)) return [3 /*break*/, 6]; - return [4 /*yield*/, this.core.normalize(true, { data: [data] }, params)]; - case 5: - norm = _l.sent(); - if (equals(norm === null || norm === void 0 ? void 0 : norm[0], (_a = current === null || current === void 0 ? void 0 : current.data) === null || _a === void 0 ? void 0 : _a[0])) - delete state_1.data; - _l.label = 6; - case 6: return [4 /*yield*/, this.core.mutate(skey, current, function () { return (__assign({ time: time_1, cooldown: cooldown_1, expiration: expiration_1, aborter: undefined }, state_1)); }, params)]; - case 7: return [2 /*return*/, _l.sent()]; - case 8: - error_1 = _l.sent(); - return [4 /*yield*/, this.core.get(skey, params)]; - case 9: - current = _l.sent(); - if ((current === null || current === void 0 ? void 0 : current.aborter) !== aborter) - return [2 /*return*/, current]; - return [4 /*yield*/, this.core.mutate(skey, current, function () { return ({ aborter: undefined, error: error_1 }); }, params)]; - case 10: return [2 /*return*/, _l.sent()]; - case 11: - clearTimeout(timeout); - return [7 /*endfinally*/]; - case 12: return [2 /*return*/]; - } - }); - }); - }; - /** - * Scroll to the next page - * @param skey Storage key - * @param scroller Key scroller - * @param fetcher Resource fetcher - * @param aborter AbortController - * @param tparams Time parameters - * @param force Should ignore cooldown - * @returns The new state - */ - ScrollHelper.prototype.scroll = function (skey, scroller, fetcher, aborter, params, force, ignore) { - var _a; - if (aborter === void 0) { aborter = new AbortController(); } - if (params === void 0) { params = {}; } - if (force === void 0) { force = false; } - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var _b, current, skip, last, _c, dcooldown, _d, dexpiration, _e, dtimeout, timeout, signal, _f, data, error, _g, time_2, _h, cooldown_2, _j, expiration_2, state_2, error_2; - var _this = this; - return __generator(this, function (_k) { - switch (_k.label) { - case 0: - if (skey === undefined) - return [2 /*return*/]; - return [4 /*yield*/, this.core.lock(skey, function () { return __awaiter(_this, void 0, void 0, function () { - var current, pages, last; - var _a; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: return [4 /*yield*/, this.core.get(skey, params)]; - case 1: - current = _b.sent(); - if (current === null || current === void 0 ? void 0 : current.optimistic) - return [2 /*return*/, { current: current, skip: true }]; - if ((current === null || current === void 0 ? void 0 : current.aborter) && !force) - return [2 /*return*/, { current: current, skip: true }]; - if ((current === null || current === void 0 ? void 0 : current.aborter) && force) - current.aborter.abort("Replaced"); - if (this.core.shouldCooldown(current) && !ignore) - return [2 /*return*/, { current: current, skip: true }]; - pages = (_a = current === null || current === void 0 ? void 0 : current.data) !== null && _a !== void 0 ? _a : []; - last = scroller(lastOf(pages)); - if (last === undefined) - return [2 /*return*/, { current: current, skip: true }]; - return [4 /*yield*/, this.core.mutate(skey, current, function (c) { return ({ time: c === null || c === void 0 ? void 0 : c.time, aborter: aborter }); }, params)]; - case 2: - current = _b.sent(); - return [2 /*return*/, { current: current, last: last }]; - } - }); - }); })]; - case 1: - _b = _k.sent(), current = _b.current, skip = _b.skip, last = _b.last; - if (skip) - return [2 /*return*/, current]; - if (last === undefined) - throw new Error("Undefined last"); - _c = params.cooldown, dcooldown = _c === void 0 ? DEFAULT_COOLDOWN : _c, _d = params.expiration, dexpiration = _d === void 0 ? DEFAULT_EXPIRATION : _d, _e = params.timeout, dtimeout = _e === void 0 ? DEFAULT_TIMEOUT : _e; - timeout = setTimeout(function () { - aborter.abort("Scroll timed out"); - }, dtimeout); - _k.label = 2; - case 2: - _k.trys.push([2, 6, 9, 10]); - signal = aborter.signal; - return [4 /*yield*/, fetcher(last, { signal: signal })]; - case 3: - _f = _k.sent(), data = _f.data, error = _f.error, _g = _f.time, time_2 = _g === void 0 ? Date.now() : _g, _h = _f.cooldown, cooldown_2 = _h === void 0 ? getTimeFromDelay(dcooldown) : _h, _j = _f.expiration, expiration_2 = _j === void 0 ? getTimeFromDelay(dexpiration) : _j; - if (signal.aborted) - throw new AbortError(signal); - if (expiration_2 !== undefined && (current === null || current === void 0 ? void 0 : current.expiration) !== undefined) - expiration_2 = Math.min(expiration_2, current === null || current === void 0 ? void 0 : current.expiration); - return [4 /*yield*/, this.core.get(skey, params)]; - case 4: - current = _k.sent(); - state_2 = {}; - if (data !== undefined) - state_2.data = __spreadArray(__spreadArray([], __read(((_a = current === null || current === void 0 ? void 0 : current.data) !== null && _a !== void 0 ? _a : [])), false), [data], false); - state_2.error = error; - return [4 /*yield*/, this.core.mutate(skey, current, function () { return (__assign({ time: time_2, cooldown: cooldown_2, expiration: expiration_2, aborter: undefined }, state_2)); }, params)]; - case 5: return [2 /*return*/, _k.sent()]; - case 6: - error_2 = _k.sent(); - return [4 /*yield*/, this.core.get(skey, params)]; - case 7: - current = _k.sent(); - if ((current === null || current === void 0 ? void 0 : current.aborter) !== aborter) - return [2 /*return*/, current]; - return [4 /*yield*/, this.core.mutate(skey, current, function () { return ({ aborter: undefined, error: error_2 }); }, params)]; - case 8: return [2 /*return*/, _k.sent()]; - case 9: - clearTimeout(timeout); - return [7 /*endfinally*/]; - case 10: return [2 /*return*/]; - } - }); - }); - }; - return ScrollHelper; -}()); - -function getScrollStorageKey(key, params) { - if (key === undefined) - return undefined; - if (typeof key === "string") - return key; - var _a = params.serializer, serializer = _a === void 0 ? DEFAULT_SERIALIZER : _a; - return "scroll:".concat(serializer.stringify(key)); -} -/** - * Non-React version of ScrollHandle - */ -var ScrollObject = /** @class */ (function () { - function ScrollObject(core, scroller, fetcher, params) { - if (params === void 0) { params = {}; } - this.core = core; - this.scroller = scroller; - this.fetcher = fetcher; - this.params = params; - this.mparams = __assign(__assign({}, core.params), params); - this.key = scroller(); - this.skey = getScrollStorageKey(this.key, this.mparams); - this.loadSync(); - this.subscribe(); - } - Object.defineProperty(ScrollObject.prototype, "init", { - get: function () { return this._init; }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ScrollObject.prototype, "state", { - get: function () { return this._state; }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ScrollObject.prototype, "ready", { - get: function () { return this._state !== null; }, - enumerable: false, - configurable: true - }); - ScrollObject.prototype.loadSync = function () { - var _a = this, core = _a.core, skey = _a.skey, mparams = _a.mparams; - this._state = core.getSync(skey, mparams); - }; - ScrollObject.prototype.loadAsync = function () { - return __awaiter(this, void 0, void 0, function () { - var _a, core, skey, mparams, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - if (this.ready) - return [2 /*return*/]; - _a = this, core = _a.core, skey = _a.skey, mparams = _a.mparams; - _b = this; - return [4 /*yield*/, core.get(skey, mparams)]; - case 1: - _b._state = _c.sent(); - return [2 /*return*/]; - } - }); - }); - }; - ScrollObject.prototype.subscribe = function () { - var _this = this; - var _a = this, core = _a.core, skey = _a.skey; - var setter = function (state) { - return _this._state = state; - }; - core.on(skey, setter); - new FinalizationRegistry(function () { - core.off(skey, setter); - }).register(this, undefined); - }; - ScrollObject.prototype.mutate = function (mutator) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var _b, core, skey, mparams, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = this, core = _b.core, skey = _b.skey, mparams = _b.mparams; - if (!(this._state === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, ((_a = this._init) !== null && _a !== void 0 ? _a : (this._init = this.loadAsync()))]; - case 1: - _d.sent(); - _d.label = 2; - case 2: - if (this._state === null) - throw new Error("Null state after init"); - _c = this; - return [4 /*yield*/, core.mutate(skey, this._state, mutator, mparams)]; - case 3: return [2 /*return*/, _c._state = _d.sent()]; - } - }); - }); - }; - ScrollObject.prototype.fetch = function (aborter) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var _b, core, scroller, skey, fetcher, mparams, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = this, core = _b.core, scroller = _b.scroller, skey = _b.skey, fetcher = _b.fetcher, mparams = _b.mparams; - if (!(this._state === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, ((_a = this._init) !== null && _a !== void 0 ? _a : (this._init = this.loadAsync()))]; - case 1: - _d.sent(); - _d.label = 2; - case 2: - if (this._state === null) - throw new Error("Null state after init"); - if (fetcher === undefined) - return [2 /*return*/, this._state]; - _c = this; - return [4 /*yield*/, core.scroll.first(skey, scroller, fetcher, aborter, mparams)]; - case 3: return [2 /*return*/, _c._state = _d.sent()]; - } - }); - }); - }; - ScrollObject.prototype.refetch = function (aborter) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var _b, core, scroller, skey, fetcher, mparams, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = this, core = _b.core, scroller = _b.scroller, skey = _b.skey, fetcher = _b.fetcher, mparams = _b.mparams; - if (!(this._state === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, ((_a = this._init) !== null && _a !== void 0 ? _a : (this._init = this.loadAsync()))]; - case 1: - _d.sent(); - _d.label = 2; - case 2: - if (this._state === null) - throw new Error("Null state after init"); - if (fetcher === undefined) - return [2 /*return*/, this._state]; - _c = this; - return [4 /*yield*/, core.scroll.first(skey, scroller, fetcher, aborter, mparams, true, true)]; - case 3: return [2 /*return*/, _c._state = _d.sent()]; - } - }); - }); - }; - ScrollObject.prototype.scroll = function (aborter) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var _b, core, scroller, skey, fetcher, mparams, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = this, core = _b.core, scroller = _b.scroller, skey = _b.skey, fetcher = _b.fetcher, mparams = _b.mparams; - if (!(this._state === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, ((_a = this._init) !== null && _a !== void 0 ? _a : (this._init = this.loadAsync()))]; - case 1: - _d.sent(); - _d.label = 2; - case 2: - if (this._state === null) - throw new Error("Null state after init"); - if (fetcher === undefined) - return [2 /*return*/, this._state]; - _c = this; - return [4 /*yield*/, core.scroll.scroll(skey, scroller, fetcher, aborter, mparams, true, true)]; - case 3: return [2 /*return*/, _c._state = _d.sent()]; - } - }); - }); - }; - ScrollObject.prototype.clear = function () { - return __awaiter(this, void 0, void 0, function () { - var _a, core, skey, mparams; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _a = this, core = _a.core, skey = _a.skey, mparams = _a.mparams; - return [4 /*yield*/, core.delete(skey, mparams)]; - case 1: - _b.sent(); - delete this._state; - return [2 /*return*/]; - } - }); - }); - }; - return ScrollObject; -}()); - -function scroll(scroller, fetcher, params) { - if (params === void 0) { params = {}; } - return new ScrollSchema(scroller, fetcher, params); -} -var ScrollSchema = /** @class */ (function () { - function ScrollSchema(scroller, fetcher, params) { - if (params === void 0) { params = {}; } - this.scroller = scroller; - this.fetcher = fetcher; - this.params = params; - } - ScrollSchema.prototype.make = function (core) { - var _a = this, scroller = _a.scroller, fetcher = _a.fetcher, params = _a.params; - return new ScrollObject(core, scroller, fetcher, params); - }; - ScrollSchema.prototype.normalize = function (data, more) { - return __awaiter(this, void 0, void 0, function () { - var _a, time, cooldown, expiration, optimistic, state; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - if (more.shallow) - return [2 /*return*/]; - _a = more.root, time = _a.time, cooldown = _a.cooldown, expiration = _a.expiration, optimistic = _a.optimistic; - state = { data: data, time: time, cooldown: cooldown, expiration: expiration, optimistic: optimistic }; - return [4 /*yield*/, this.make(more.core).mutate(function () { return state; })]; - case 1: - _b.sent(); - return [2 /*return*/]; - } - }); - }); - }; - return ScrollSchema; -}()); - -function returnOf(generator) { - return __awaiter(this, void 0, void 0, function () { - var next; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, generator.next()]; - case 1: - next = _a.sent(); - if (next.done) - return [2 /*return*/, next.value]; - return [2 /*return*/]; - } - }); - }); -} - -var SingleHelper = /** @class */ (function () { - function SingleHelper(core) { - this.core = core; - } - /** - * Fetch - * @param key Key (passed to fetcher) - * @param skey Storage key - * @param fetcher Resource fetcher - * @param aborter AbortController - * @param tparams Time parameters - * @param force Should ignore cooldown - * @returns The new state - */ - SingleHelper.prototype.fetch = function (key, skey, fetcher, aborter, params, force, ignore) { - if (aborter === void 0) { aborter = new AbortController(); } - if (params === void 0) { params = {}; } - if (force === void 0) { force = false; } - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var _a, current, skip, _b, dcooldown, _c, dexpiration, _d, dtimeout, timeout, signal, _e, data, error, _f, time_1, _g, cooldown_1, _h, expiration_1, state_1, error_1; - var _this = this; - return __generator(this, function (_j) { - switch (_j.label) { - case 0: - if (key === undefined) - return [2 /*return*/]; - if (skey === undefined) - return [2 /*return*/]; - return [4 /*yield*/, this.core.lock(skey, function () { return __awaiter(_this, void 0, void 0, function () { - var current; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.core.get(skey, params)]; - case 1: - current = _a.sent(); - if (current === null || current === void 0 ? void 0 : current.optimistic) - return [2 /*return*/, { current: current, skip: true }]; - if ((current === null || current === void 0 ? void 0 : current.aborter) && !force) - return [2 /*return*/, { current: current, skip: true }]; - if ((current === null || current === void 0 ? void 0 : current.aborter) && force) - current.aborter.abort("Replaced"); - if (this.core.shouldCooldown(current) && !ignore) - return [2 /*return*/, { current: current, skip: true }]; - return [4 /*yield*/, this.core.mutate(skey, current, function (c) { return ({ time: c === null || c === void 0 ? void 0 : c.time, aborter: aborter }); }, params)]; - case 2: - current = _a.sent(); - return [2 /*return*/, { current: current }]; - } - }); - }); })]; - case 1: - _a = _j.sent(), current = _a.current, skip = _a.skip; - if (skip) - return [2 /*return*/, current]; - _b = params.cooldown, dcooldown = _b === void 0 ? DEFAULT_COOLDOWN : _b, _c = params.expiration, dexpiration = _c === void 0 ? DEFAULT_EXPIRATION : _c, _d = params.timeout, dtimeout = _d === void 0 ? DEFAULT_TIMEOUT : _d; - timeout = setTimeout(function () { - aborter.abort("Fetch timed out"); - }, dtimeout); - _j.label = 2; - case 2: - _j.trys.push([2, 6, 9, 10]); - signal = aborter.signal; - return [4 /*yield*/, fetcher(key, { signal: signal })]; - case 3: - _e = _j.sent(), data = _e.data, error = _e.error, _f = _e.time, time_1 = _f === void 0 ? Date.now() : _f, _g = _e.cooldown, cooldown_1 = _g === void 0 ? getTimeFromDelay(dcooldown) : _g, _h = _e.expiration, expiration_1 = _h === void 0 ? getTimeFromDelay(dexpiration) : _h; - if (signal.aborted) - throw new AbortError(signal); - return [4 /*yield*/, this.core.get(skey, params)]; - case 4: - current = _j.sent(); - state_1 = {}; - if (data !== undefined) - state_1.data = data; - state_1.error = error; - return [4 /*yield*/, this.core.mutate(skey, current, function () { return (__assign({ time: time_1, cooldown: cooldown_1, expiration: expiration_1, aborter: undefined }, state_1)); }, params)]; - case 5: return [2 /*return*/, _j.sent()]; - case 6: - error_1 = _j.sent(); - return [4 /*yield*/, this.core.get(skey, params)]; - case 7: - current = _j.sent(); - if ((current === null || current === void 0 ? void 0 : current.aborter) !== aborter) - return [2 /*return*/, current]; - return [4 /*yield*/, this.core.mutate(skey, current, function () { return ({ aborter: undefined, error: error_1 }); }, params)]; - case 8: return [2 /*return*/, _j.sent()]; - case 9: - clearTimeout(timeout); - return [7 /*endfinally*/]; - case 10: return [2 /*return*/]; - } - }); - }); - }; - /** - * Optimistic update - * @param key Key (:K) (passed to poster) - * @param skey Storage key - * @param fetcher Resource poster - * @param updater Mutation function - * @param aborter AbortController - * @param tparams Time parameters - * @returns The new state - * @throws Error - */ - SingleHelper.prototype.update = function (key, skey, fetcher, updater, aborter, params) { - var e_1, _a; - if (aborter === void 0) { aborter = new AbortController(); } - if (params === void 0) { params = {}; } - return __awaiter(this, void 0, void 0, function () { - var _b, current, skip, _c, dcooldown, _d, dexpiration, _e, dtimeout, timeout, signal, generator, _loop_1, this_1, generator_1, generator_1_1, e_1_1, result, data, error_3, _f, time_2, _g, cooldown_2, _h, expiration_2, state_2, error_2; - var _this = this; - return __generator(this, function (_j) { - switch (_j.label) { - case 0: - if (key === undefined) - return [2 /*return*/]; - if (skey === undefined) - return [2 /*return*/]; - return [4 /*yield*/, this.core.lock(skey, function () { return __awaiter(_this, void 0, void 0, function () { - var current; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, this.core.get(skey, params)]; - case 1: - current = _a.sent(); - if (current === null || current === void 0 ? void 0 : current.optimistic) - return [2 /*return*/, { current: current, skip: true }]; - if (current === null || current === void 0 ? void 0 : current.aborter) - current.aborter.abort("Replaced"); - return [4 /*yield*/, this.core.mutate(skey, current, function (c) { return ({ time: c === null || c === void 0 ? void 0 : c.time, aborter: aborter }); }, params)]; - case 2: - current = _a.sent(); - return [2 /*return*/, { current: current }]; - } - }); - }); })]; - case 1: - _b = _j.sent(), current = _b.current, skip = _b.skip; - if (skip) - return [2 /*return*/, current]; - _c = params.cooldown, dcooldown = _c === void 0 ? DEFAULT_COOLDOWN : _c, _d = params.expiration, dexpiration = _d === void 0 ? DEFAULT_EXPIRATION : _d, _e = params.timeout, dtimeout = _e === void 0 ? DEFAULT_TIMEOUT : _e; - timeout = setTimeout(function () { - aborter.abort("Update timed out"); - }, dtimeout); - _j.label = 2; - case 2: - _j.trys.push([2, 23, 26, 27]); - signal = aborter.signal; - generator = updater(current, { signal: signal }); - _j.label = 3; - case 3: - _j.trys.push([3, 9, 10, 15]); - _loop_1 = function () { - var _k, data_1, error_4, optimistic; - return __generator(this, function (_l) { - switch (_l.label) { - case 0: - _k = generator_1_1.value, data_1 = _k.data, error_4 = _k.error; - if (signal.aborted) - throw new AbortError(signal); - optimistic = {}; - if (data_1 !== undefined) - optimistic.data = data_1; - optimistic.error = error_4; - return [4 /*yield*/, this_1.core.mutate(skey, current, function (c) { return (__assign({ time: c === null || c === void 0 ? void 0 : c.time, aborter: aborter, optimistic: true }, optimistic)); }, params)]; - case 1: - current = _l.sent(); - return [2 /*return*/]; - } - }); - }; - this_1 = this; - generator_1 = __asyncValues(generator); - _j.label = 4; - case 4: return [4 /*yield*/, generator_1.next()]; - case 5: - if (!(generator_1_1 = _j.sent(), !generator_1_1.done)) return [3 /*break*/, 8]; - return [5 /*yield**/, _loop_1()]; - case 6: - _j.sent(); - _j.label = 7; - case 7: return [3 /*break*/, 4]; - case 8: return [3 /*break*/, 15]; - case 9: - e_1_1 = _j.sent(); - e_1 = { error: e_1_1 }; - return [3 /*break*/, 15]; - case 10: - _j.trys.push([10, , 13, 14]); - if (!(generator_1_1 && !generator_1_1.done && (_a = generator_1.return))) return [3 /*break*/, 12]; - return [4 /*yield*/, _a.call(generator_1)]; - case 11: - _j.sent(); - _j.label = 12; - case 12: return [3 /*break*/, 14]; - case 13: - if (e_1) throw e_1.error; - return [7 /*endfinally*/]; - case 14: return [7 /*endfinally*/]; - case 15: return [4 /*yield*/, returnOf(generator)]; - case 16: - result = _j.sent(); - if (!(result === undefined)) return [3 /*break*/, 18]; - if (fetcher === undefined) - throw new Error("Updater returned nothing and undefined fetcher"); - return [4 /*yield*/, fetcher(key, { signal: signal, cache: "reload" })]; - case 17: - result = _j.sent(); - _j.label = 18; - case 18: - data = result.data, error_3 = result.error, _f = result.time, time_2 = _f === void 0 ? Date.now() : _f, _g = result.cooldown, cooldown_2 = _g === void 0 ? getTimeFromDelay(dcooldown) : _g, _h = result.expiration, expiration_2 = _h === void 0 ? getTimeFromDelay(dexpiration) : _h; - if (signal.aborted) - throw new AbortError(signal); - return [4 /*yield*/, this.core.get(skey, params)]; - case 19: - current = _j.sent(); - if (!(error_3 !== undefined)) return [3 /*break*/, 21]; - if ((current === null || current === void 0 ? void 0 : current.aborter) !== aborter) - return [2 /*return*/, current]; - return [4 /*yield*/, this.core.mutate(skey, current, function (c) { return ({ time: c === null || c === void 0 ? void 0 : c.time, cooldown: cooldown_2, expiration: expiration_2, aborter: undefined, optimistic: false, data: c === null || c === void 0 ? void 0 : c.data, error: error_3 }); }, params)]; - case 20: return [2 /*return*/, _j.sent()]; - case 21: - state_2 = {}; - if (data !== undefined) - state_2.data = data; - state_2.error = error_3; - return [4 /*yield*/, this.core.mutate(skey, current, function () { return (__assign({ time: time_2, cooldown: cooldown_2, expiration: expiration_2, aborter: undefined, optimistic: false }, state_2)); }, params)]; - case 22: return [2 /*return*/, _j.sent()]; - case 23: - error_2 = _j.sent(); - return [4 /*yield*/, this.core.get(skey, params)]; - case 24: - current = _j.sent(); - if ((current === null || current === void 0 ? void 0 : current.aborter) !== aborter) - return [2 /*return*/, current]; - return [4 /*yield*/, this.core.mutate(skey, current, function (c) { return ({ time: c === null || c === void 0 ? void 0 : c.time, aborter: undefined, optimistic: false, data: c === null || c === void 0 ? void 0 : c.data, error: error_2 }); }, params)]; - case 25: return [2 /*return*/, _j.sent()]; - case 26: - clearTimeout(timeout); - return [7 /*endfinally*/]; - case 27: return [2 /*return*/]; - } - }); - }); - }; - return SingleHelper; -}()); - -function getSingleStorageKey(key, params) { - if (key === undefined) - return undefined; - if (typeof key === "string") - return key; - var _a = params.serializer, serializer = _a === void 0 ? DEFAULT_SERIALIZER : _a; - return serializer.stringify(key); -} -/** - * Non-React version of SingleHandle - */ -var SingleObject = /** @class */ (function () { - function SingleObject(core, key, fetcher, params) { - if (params === void 0) { params = {}; } - this.core = core; - this.key = key; - this.fetcher = fetcher; - this.params = params; - this.mparams = __assign(__assign({}, core.params), params); - this.skey = getSingleStorageKey(key, this.mparams); - this.loadSync(); - this.subscribe(); - } - Object.defineProperty(SingleObject.prototype, "init", { - get: function () { return this._init; }, - enumerable: false, - configurable: true - }); - Object.defineProperty(SingleObject.prototype, "state", { - get: function () { return this._state; }, - enumerable: false, - configurable: true - }); - Object.defineProperty(SingleObject.prototype, "ready", { - get: function () { return this._state !== null; }, - enumerable: false, - configurable: true - }); - SingleObject.prototype.loadSync = function () { - var _a = this, core = _a.core, skey = _a.skey, mparams = _a.mparams; - this._state = core.getSync(skey, mparams); - }; - SingleObject.prototype.loadAsync = function () { - return __awaiter(this, void 0, void 0, function () { - var _a, core, skey, mparams, _b; - return __generator(this, function (_c) { - switch (_c.label) { - case 0: - if (this.ready) - return [2 /*return*/]; - _a = this, core = _a.core, skey = _a.skey, mparams = _a.mparams; - _b = this; - return [4 /*yield*/, core.get(skey, mparams)]; - case 1: - _b._state = _c.sent(); - return [2 /*return*/]; - } - }); - }); - }; - SingleObject.prototype.subscribe = function () { - var _this = this; - var _a = this, core = _a.core, skey = _a.skey; - var setter = function (state) { - return _this._state = state; - }; - core.on(this.skey, setter); - new FinalizationRegistry(function () { - core.off(skey, setter); - }).register(this, undefined); - }; - SingleObject.prototype.mutate = function (mutator) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var _b, core, skey, mparams, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = this, core = _b.core, skey = _b.skey, mparams = _b.mparams; - if (!(this._state === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, ((_a = this._init) !== null && _a !== void 0 ? _a : (this._init = this.loadAsync()))]; - case 1: - _d.sent(); - _d.label = 2; - case 2: - if (this._state === null) - throw new Error("Null state after init"); - _c = this; - return [4 /*yield*/, core.mutate(skey, this._state, mutator, mparams)]; - case 3: return [2 /*return*/, _c._state = _d.sent()]; - } - }); - }); - }; - SingleObject.prototype.fetch = function (aborter) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var _b, core, key, skey, fetcher, mparams, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = this, core = _b.core, key = _b.key, skey = _b.skey, fetcher = _b.fetcher, mparams = _b.mparams; - if (!(this._state === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, ((_a = this._init) !== null && _a !== void 0 ? _a : (this._init = this.loadAsync()))]; - case 1: - _d.sent(); - _d.label = 2; - case 2: - if (this._state === null) - throw new Error("Null state after init"); - if (fetcher === undefined) - return [2 /*return*/, this._state]; - _c = this; - return [4 /*yield*/, core.single.fetch(key, skey, fetcher, aborter, mparams)]; - case 3: return [2 /*return*/, _c._state = _d.sent()]; - } - }); - }); - }; - SingleObject.prototype.refetch = function (aborter) { - var _a; - return __awaiter(this, void 0, void 0, function () { - var _b, core, key, skey, fetcher, mparams, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = this, core = _b.core, key = _b.key, skey = _b.skey, fetcher = _b.fetcher, mparams = _b.mparams; - if (!(this._state === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, ((_a = this._init) !== null && _a !== void 0 ? _a : (this._init = this.loadAsync()))]; - case 1: - _d.sent(); - _d.label = 2; - case 2: - if (this._state === null) - throw new Error("Null state after init"); - if (fetcher === undefined) - return [2 /*return*/, this._state]; - _c = this; - return [4 /*yield*/, core.single.fetch(key, skey, fetcher, aborter, mparams, true, true)]; - case 3: return [2 /*return*/, _c._state = _d.sent()]; - } - }); - }); - }; - SingleObject.prototype.update = function (updater, uparams, aborter) { - var _a; - if (uparams === void 0) { uparams = {}; } - return __awaiter(this, void 0, void 0, function () { - var _b, core, key, skey, fetcher, mparams, fparams, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - _b = this, core = _b.core, key = _b.key, skey = _b.skey, fetcher = _b.fetcher, mparams = _b.mparams; - if (!(this._state === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, ((_a = this._init) !== null && _a !== void 0 ? _a : (this._init = this.loadAsync()))]; - case 1: - _d.sent(); - _d.label = 2; - case 2: - if (this._state === null) - throw new Error("Null state after init"); - fparams = __assign(__assign({}, mparams), uparams); - _c = this; - return [4 /*yield*/, core.single.update(key, skey, fetcher, updater, aborter, fparams)]; - case 3: return [2 /*return*/, _c._state = _d.sent()]; - } - }); - }); - }; - SingleObject.prototype.clear = function () { - return __awaiter(this, void 0, void 0, function () { - var _a, core, skey, mparams; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - _a = this, core = _a.core, skey = _a.skey, mparams = _a.mparams; - return [4 /*yield*/, core.delete(skey, mparams)]; - case 1: - _b.sent(); - delete this._state; - return [2 /*return*/]; - } - }); - }); - }; - return SingleObject; -}()); - -function single(key, fetcher, params) { - if (params === void 0) { params = {}; } - return new SingleSchema(key, fetcher, params); -} -var SingleSchema = /** @class */ (function () { - function SingleSchema(key, fetcher, params) { - if (params === void 0) { params = {}; } - this.key = key; - this.fetcher = fetcher; - this.params = params; - } - SingleSchema.prototype.make = function (core) { - var _a = this, key = _a.key, fetcher = _a.fetcher, params = _a.params; - return new SingleObject(core, key, fetcher, params); - }; - SingleSchema.prototype.normalize = function (data, more) { - return __awaiter(this, void 0, void 0, function () { - var _a, time, cooldown, expiration, optimistic, state; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - if (more.shallow) - return [2 /*return*/]; - _a = more.root, time = _a.time, cooldown = _a.cooldown, expiration = _a.expiration, optimistic = _a.optimistic; - state = { data: data, time: time, cooldown: cooldown, expiration: expiration, optimistic: optimistic }; - return [4 /*yield*/, this.make(more.core).mutate(function () { return state; })]; - case 1: - _b.sent(); - return [2 /*return*/]; - } - }); - }); - }; - return SingleSchema; -}()); - -function isAsyncStorage(storage) { - return Boolean(storage.async); -} - -var Lock = /** @class */ (function () { - function Lock() { - } - Lock.prototype.lock = function (callback) { - return __awaiter(this, void 0, void 0, function () { - var promise; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!this.mutex) return [3 /*break*/, 2]; - return [4 /*yield*/, this.mutex]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - promise = callback(); - this.mutex = promise; - return [4 /*yield*/, promise]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - return Lock; -}()); - -var Core = /** @class */ (function (_super) { - __extends(Core, _super); - function Core(params) { - var _this = _super.call(this) || this; - _this.params = params; - _this.single = new SingleHelper(_this); - _this.scroll = new ScrollHelper(_this); - _this.cache = new Map(); - _this.locks = new Map(); - _this._mounted = true; - _this.counts = new Map(); - _this.timeouts = new Map(); - return _this; - } - Object.defineProperty(Core.prototype, "mounted", { - get: function () { return this._mounted; }, - enumerable: false, - configurable: true - }); - Core.prototype.unmount = function () { - var e_1, _a; - try { - for (var _b = __values(this.timeouts.values()), _c = _b.next(); !_c.done; _c = _b.next()) { - var timeout = _c.value; - clearTimeout(timeout); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - this._mounted = false; - }; - Core.prototype.lock = function (skey, callback) { - return __awaiter(this, void 0, void 0, function () { - var lock, lock2; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - lock = this.locks.get(skey); - if (!(lock !== undefined)) return [3 /*break*/, 2]; - return [4 /*yield*/, lock.lock(callback)]; - case 1: return [2 /*return*/, _a.sent()]; - case 2: - lock2 = new Lock(); - this.locks.set(skey, lock2); - return [4 /*yield*/, lock2.lock(callback)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - Core.prototype.getSync = function (skey, params) { - if (params === void 0) { params = {}; } - if (skey === undefined) - return; - var cached = this.cache.get(skey); - if (cached !== undefined) - return cached; - var storage = params.storage; - if (!storage) - return; - if (isAsyncStorage(storage)) - return null; - var state = storage.get(skey); - this.cache.set(skey, state); - return state; - }; - Core.prototype.get = function (skey, params, ignore) { - if (params === void 0) { params = {}; } - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var cached, storage, state; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (skey === undefined) - return [2 /*return*/]; - cached = this.cache.get(skey); - if (cached !== undefined) - return [2 /*return*/, cached]; - storage = params.storage; - if (!storage) - return [2 /*return*/]; - return [4 /*yield*/, storage.get(skey, ignore)]; - case 1: - state = _a.sent(); - this.cache.set(skey, state); - return [2 /*return*/, state]; - } - }); - }); - }; - /** - * Force set a key to a state and publish it - * No check, no merge - * @param skey Key - * @param state New state - * @returns - */ - Core.prototype.set = function (skey, state, params) { - if (params === void 0) { params = {}; } - return __awaiter(this, void 0, void 0, function () { - var storage, data, time, cooldown, expiration; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (skey === undefined) - return [2 /*return*/]; - this.cache.set(skey, state); - this.publish(skey, state); - storage = params.storage; - if (!storage) - return [2 /*return*/]; - data = state.data, time = state.time, cooldown = state.cooldown, expiration = state.expiration; - return [4 /*yield*/, storage.set(skey, { data: data, time: time, cooldown: cooldown, expiration: expiration })]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); - }; - /** - * Delete key and publish undefined - * @param skey - * @returns - */ - Core.prototype.delete = function (skey, params) { - if (params === void 0) { params = {}; } - return __awaiter(this, void 0, void 0, function () { - var storage; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!skey) - return [2 /*return*/]; - this.cache.delete(skey); - this.locks.delete(skey); - this.publish(skey, undefined); - storage = params.storage; - if (!storage) - return [2 /*return*/]; - return [4 /*yield*/, storage.delete(skey)]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); - }; - Core.prototype.mutate = function (skey, current, mutator, params) { - var _a; - if (params === void 0) { params = {}; } - return __awaiter(this, void 0, void 0, function () { - var state, next, _b, _c, equals; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - if (skey === undefined) - return [2 /*return*/]; - state = mutator(current); - if (!!state) return [3 /*break*/, 2]; - return [4 /*yield*/, this.delete(skey, params)]; - case 1: - _d.sent(); - return [2 /*return*/]; - case 2: - if (state.time !== undefined && state.time < ((_a = current === null || current === void 0 ? void 0 : current.time) !== null && _a !== void 0 ? _a : 0)) - return [2 /*return*/, current]; - if (state.optimistic === undefined && (current === null || current === void 0 ? void 0 : current.optimistic)) - return [2 /*return*/, current]; - next = __assign(__assign({}, current), state); - if (next.time === undefined) - next.time = Date.now(); - _b = next; - return [4 /*yield*/, this.normalize(false, next, params)]; - case 3: - _b.data = _d.sent(); - _c = params.equals, equals = _c === void 0 ? DEFAULT_EQUALS : _c; - if (equals(next.data, current === null || current === void 0 ? void 0 : current.data)) // Prevent some renders if the data is the same - next.data = current === null || current === void 0 ? void 0 : current.data; - if (shallowEquals(next, current)) // Shallow comparison because aborter is not serializable - return [2 /*return*/, current]; - return [4 /*yield*/, this.set(skey, next, params)]; - case 4: - _d.sent(); - return [2 /*return*/, next]; - } - }); - }); - }; - Core.prototype.normalize = function (shallow, root, params) { - if (params === void 0) { params = {}; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (root.data === undefined) - return [2 /*return*/]; - if (params.normalizer === undefined) - return [2 /*return*/, root.data]; - return [4 /*yield*/, params.normalizer(root.data, { core: this, shallow: shallow, root: root })]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - /** - * True if we should cooldown this resource - */ - Core.prototype.shouldCooldown = function (current) { - if ((current === null || current === void 0 ? void 0 : current.cooldown) === undefined) - return false; - return Date.now() < current.cooldown; - }; - Core.prototype.once = function (key, listener, params) { - var _this = this; - if (params === void 0) { params = {}; } - if (!key) - return; - var f = function (x) { - _this.off(key, f, params); - listener(x); - }; - this.on(key, f, params); - }; - Core.prototype.on = function (key, listener, params) { - var _a; - if (!key) - return; - _super.prototype.on.call(this, key, listener); - var count = (_a = this.counts.get(key)) !== null && _a !== void 0 ? _a : 0; - this.counts.set(key, count + 1); - var timeout = this.timeouts.get(key); - if (timeout === undefined) - return; - clearTimeout(timeout); - this.timeouts.delete(key); - }; - Core.prototype.off = function (key, listener, params) { - if (params === void 0) { params = {}; } - return __awaiter(this, void 0, void 0, function () { - var count, current, erase, delay, timeout; - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!key) - return [2 /*return*/]; - _super.prototype.off.call(this, key, listener); - count = this.counts.get(key); - if (count === undefined) - throw new Error("Undefined count"); - if (count > 1) { - this.counts.set(key, count - 1); - return [2 /*return*/]; - } - this.counts.delete(key); - return [4 /*yield*/, this.get(key, params, true)]; - case 1: - current = _a.sent(); - if ((current === null || current === void 0 ? void 0 : current.expiration) === undefined) - return [2 /*return*/]; - if ((current === null || current === void 0 ? void 0 : current.expiration) === -1) - return [2 /*return*/]; - erase = function () { return __awaiter(_this, void 0, void 0, function () { - var count; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!this._mounted) - return [2 /*return*/]; - count = this.counts.get(key); - if (count !== undefined) - return [2 /*return*/]; - this.timeouts.delete(key); - return [4 /*yield*/, this.delete(key, params)]; - case 1: - _a.sent(); - return [2 /*return*/]; - } - }); - }); }; - if (!(Date.now() > current.expiration)) return [3 /*break*/, 3]; - return [4 /*yield*/, erase()]; - case 2: - _a.sent(); - return [2 /*return*/]; - case 3: - delay = current.expiration - Date.now(); - timeout = setTimeout(erase, delay); - this.timeouts.set(key, timeout); - return [2 /*return*/]; - } - }); - }); - }; - return Core; -}(Ortho)); - -var CoreContext = React.createContext(undefined); -function useCore() { - var core = React.useContext(CoreContext); - if (core === undefined) - throw new Error("Undefined core"); - return core; -} -function useCoreProvider(params) { - var coreRef = React.useRef(); - if (coreRef.current === undefined) - coreRef.current = new Core(params); - React.useEffect(function () { return function () { - var _a; - (_a = coreRef.current) === null || _a === void 0 ? void 0 : _a.unmount(); - }; }, []); - return coreRef.current; -} -function CoreProvider(props) { - var children = props.children, params = __rest(props, ["children"]); - var core = useCoreProvider(params); - return React__default["default"].createElement(CoreContext.Provider, { value: core }, children); -} - -/** - * Show handle in console when it changes - * @param handle - */ -function useDebug(handle, label) { - var data = handle.data, error = handle.error, time = handle.time; - React.useEffect(function () { - console.debug(label, handle); - }, [data, error, time]); -} - -/** - * Call a function on error - * @param handle - * @param callback - */ -function useError(handle, callback) { - var error = handle.error; - React.useEffect(function () { - if (error !== undefined) - callback(error); - }, [error]); -} - -/** - * Fallback to given data/error if there is no data/error - * @example You got some data/error using SSR/ISR and want to display it on first render - * @example You still want to display something even if the fetcher returned nothing - * @param handle - * @param state - */ -function useFallback(handle, state) { - var data = handle.data, error = handle.error; - if (data !== undefined) - return; - if (error !== undefined) - return; - Object.assign(handle, state); -} - -/** - * Do a request on mount and url change - * @see useMount for doing a request on mount only - * @see useOnce for doing a request only if there is no data yet - * @param handle - */ -function useFetch(handle) { - var fetch = handle.fetch; - React.useEffect(function () { - fetch(); - }, [fetch]); -} - -/** - * Do a request on interval - * @see useRetry for error retry - * @param handle - * @param options - */ -function useInterval(handle, interval) { - var ready = handle.ready, fetch = handle.fetch; - React.useEffect(function () { - if (!ready) - return; - if (!interval) - return; - var i = setInterval(fetch, interval); - return function () { return clearInterval(i); }; - }, [fetch, interval]); -} - -/** - * Do a request on mount only - * @see useFetch for doing a request on url change - * @see useOnce for doing a request only if there is no data yet - * @param handle - */ -function useMount(handle) { - var fetch = handle.fetch; - React.useEffect(function () { - fetch(); - }, []); -} - -/** - * Do a request on mount and url change only if there is no data yet - * @warning Will still try to fetch is there is an error - * @param handle - * @example You want to get some data once and share it in multiple components - */ -function useOnce(handle) { - var data = handle.data, fetch = handle.fetch; - React.useEffect(function () { - if (data === undefined) - fetch(); - }, [data, fetch]); -} - -function useAutoRef(current) { - var ref = React.useRef(current); - ref.current = current; - return ref; -} - -/** - * Do a request when the browser is online - * @param handle - */ -function useOnline(handle) { - var ready = handle.ready, fetch = handle.fetch; - var fetchRef = useAutoRef(fetch); - React.useEffect(function () { - if (!ready) - return; - var f = function () { return fetchRef.current(); }; - addEventListener("online", f); - return function () { return removeEventListener("online", f); }; - }, [ready]); -} - -/** - * Retry request on error using exponential backoff - * @see useInterval for interval based requests - * @param handle - * @param options - * @param options.init Initial timeout to be multiplied (in milliseconds) - * @param options.base Exponent base (2 means the next timeout will be 2 times longer) - * @param options.max Maximum count (3 means do not retry after 3 retries) - * @see https://en.wikipedia.org/wiki/Exponential_backoff - * @see https://en.wikipedia.org/wiki/Geometric_progression - */ -function useRetry(handle, options) { - if (options === void 0) { options = {}; } - var ready = handle.ready, skey = handle.skey, refetch = handle.refetch, error = handle.error; - var _a = options.init, init = _a === void 0 ? 1000 : _a, _b = options.base, base = _b === void 0 ? 2 : _b, _c = options.max, max = _c === void 0 ? 3 : _c; - var count = React.useRef(0); - React.useEffect(function () { - count.current = 0; - }, [skey]); - var refetchRef = useAutoRef(refetch); - React.useEffect(function () { - if (!ready) - return; - if (error === undefined) { - count.current = 0; - return; - } - if (count.current >= max) - return; - var ratio = Math.pow(base, count.current); - function f() { - count.current++; - refetchRef.current(); - } - var t = setTimeout(f, init * ratio); - return function () { return clearTimeout(t); }; - }, [ready, error]); -} - -/** - * Do a request when the tab is visible - * @param handle - */ -function useVisible(handle) { - var ready = handle.ready, fetch = handle.fetch; - var fetchRef = useAutoRef(fetch); - React.useEffect(function () { - if (!ready) - return; - var f = function () { return !document.hidden && fetchRef.current(); }; - document.addEventListener("visibilitychange", f); - return function () { return document.removeEventListener("visibilitychange", f); }; - }, [ready]); -} - -/** - * Scrolling resource handle factory - * @param scroller Key scroller (memoized) - * @param fetcher Resource fetcher (unmemoized) - * @param cparams Parameters (unmemoized) - * @returns Scrolling handle - */ -function useScroll(scroller, fetcher, params) { - var _this = this; - if (params === void 0) { params = {}; } - var core = useCore(); - var mparams = __assign(__assign({}, core.params), params); - var scrollerRef = useAutoRef(scroller); - var fetcherRef = useAutoRef(fetcher); - var paramsRef = useAutoRef(mparams); - var key = React.useMemo(function () { - return scroller(); - }, [scroller]); - var skey = React.useMemo(function () { - return getScrollStorageKey(key, paramsRef.current); - }, [key]); - var _a = __read(React.useState(0), 2), setCounter = _a[1]; - var stateRef = React.useRef(); - React.useMemo(function () { - stateRef.current = core.getSync(skey, paramsRef.current); - }, [core, skey]); - var setState = React.useCallback(function (state) { - stateRef.current = state; - setCounter(function (c) { return c + 1; }); - }, []); - var initRef = React.useRef(); - React.useEffect(function () { - if (stateRef.current !== null) - return; - initRef.current = core.get(skey, paramsRef.current).then(setState); - }, [core, skey]); - React.useEffect(function () { - if (!skey) - return; - core.on(skey, setState, paramsRef.current); - return function () { return void core.off(skey, setState, paramsRef.current); }; - }, [core, skey]); - var mutate = React.useCallback(function (mutator) { return __awaiter(_this, void 0, void 0, function () { - var state, params; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - state = stateRef.current; - params = paramsRef.current; - return [4 /*yield*/, core.mutate(skey, state, mutator, params)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); }, [core, skey]); - var clear = React.useCallback(function () { return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - return [4 /*yield*/, core.delete(skey, paramsRef.current)]; - case 3: - _a.sent(); - return [2 /*return*/]; - } - }); - }); }, [core, skey]); - var fetch = React.useCallback(function (aborter) { return __awaiter(_this, void 0, void 0, function () { - var scroller, fetcher, params; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof window === "undefined") - throw new Error("Fetch on SSR"); - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - if (fetcherRef.current === undefined) - return [2 /*return*/, stateRef.current]; - scroller = scrollerRef.current; - fetcher = fetcherRef.current; - params = paramsRef.current; - return [4 /*yield*/, core.scroll.first(skey, scroller, fetcher, aborter, params)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); }, [core, skey]); - var refetch = React.useCallback(function (aborter) { return __awaiter(_this, void 0, void 0, function () { - var scroller, fetcher, params; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof window === "undefined") - throw new Error("Refetch on SSR"); - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - if (fetcherRef.current === undefined) - return [2 /*return*/, stateRef.current]; - scroller = scrollerRef.current; - fetcher = fetcherRef.current; - params = paramsRef.current; - return [4 /*yield*/, core.scroll.first(skey, scroller, fetcher, aborter, params, true, true)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); }, [core, skey]); - var scroll = React.useCallback(function (aborter) { return __awaiter(_this, void 0, void 0, function () { - var scroller, fetcher, params; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof window === "undefined") - throw new Error("Scroll on SSR"); - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - if (fetcherRef.current === undefined) - return [2 /*return*/, stateRef.current]; - scroller = scrollerRef.current; - fetcher = fetcherRef.current; - params = paramsRef.current; - return [4 /*yield*/, core.scroll.scroll(skey, scroller, fetcher, aborter, params, true, true)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); }, [core, skey]); - var suspend = React.useCallback(function () { - if (typeof window === "undefined") - throw new Error("Suspend on SSR"); - return (function () { return __awaiter(_this, void 0, void 0, function () { - var scroller, fetcher, params, background; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - if (fetcherRef.current === undefined) - throw new Error("No fetcher"); - scroller = scrollerRef.current; - fetcher = fetcherRef.current; - params = paramsRef.current; - background = new Promise(function (ok) { return core.once(skey, function () { return ok(); }, params); }); - return [4 /*yield*/, core.scroll.first(skey, scroller, fetcher, undefined, params, false, true)]; - case 3: - _a.sent(); - return [4 /*yield*/, background]; - case 4: - _a.sent(); - return [2 /*return*/]; - } - }); - }); })(); - }, [core, skey]); - var state = stateRef.current; - var _b = state !== null && state !== void 0 ? state : {}, data = _b.data, error = _b.error, time = _b.time, cooldown = _b.cooldown, expiration = _b.expiration, aborter = _b.aborter, optimistic = _b.optimistic; - var ready = state !== null; - var loading = Boolean(aborter); - return { key: key, skey: skey, data: data, error: error, time: time, cooldown: cooldown, expiration: expiration, aborter: aborter, optimistic: optimistic, loading: loading, ready: ready, mutate: mutate, fetch: fetch, refetch: refetch, scroll: scroll, clear: clear, suspend: suspend }; -} - -/** - * Single resource handle factory - * @param key Key (memoized) - * @param fetcher Resource fetcher (unmemoized) - * @param cparams Parameters (unmemoized) - * @returns Single handle - */ -function useSingle(key, fetcher, params) { - var _this = this; - if (params === void 0) { params = {}; } - var core = useCore(); - var mparams = __assign(__assign({}, core.params), params); - var keyRef = useAutoRef(key); - var fetcherRef = useAutoRef(fetcher); - var mparamsRef = useAutoRef(mparams); - var skey = React.useMemo(function () { - return getSingleStorageKey(key, mparamsRef.current); - }, [key]); - var _a = __read(React.useState(0), 2), setCounter = _a[1]; - var stateRef = React.useRef(); - React.useMemo(function () { - stateRef.current = core.getSync(skey, mparamsRef.current); - }, [core, skey]); - var setState = React.useCallback(function (state) { - stateRef.current = state; - setCounter(function (c) { return c + 1; }); - }, []); - var initRef = React.useRef(); - React.useEffect(function () { - if (stateRef.current !== null) - return; - initRef.current = core.get(skey, mparamsRef.current).then(setState); - }, [core, skey]); - React.useEffect(function () { - if (!skey) - return; - core.on(skey, setState, mparamsRef.current); - return function () { return void core.off(skey, setState, mparamsRef.current); }; - }, [core, skey]); - var mutate = React.useCallback(function (mutator) { return __awaiter(_this, void 0, void 0, function () { - var state, params; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - state = stateRef.current; - params = mparamsRef.current; - return [4 /*yield*/, core.mutate(skey, state, mutator, params)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); }, [core, skey]); - var clear = React.useCallback(function () { return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - return [4 /*yield*/, core.delete(skey, mparamsRef.current)]; - case 3: - _a.sent(); - return [2 /*return*/]; - } - }); - }); }, [core, skey]); - var fetch = React.useCallback(function (aborter) { return __awaiter(_this, void 0, void 0, function () { - var key, fetcher, params; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof window === "undefined") - throw new Error("Fetch on SSR"); - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - if (fetcherRef.current === undefined) - return [2 /*return*/, stateRef.current]; - key = keyRef.current; - fetcher = fetcherRef.current; - params = mparamsRef.current; - return [4 /*yield*/, core.single.fetch(key, skey, fetcher, aborter, params)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); }, [core, skey]); - var refetch = React.useCallback(function (aborter) { return __awaiter(_this, void 0, void 0, function () { - var key, fetcher, params; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof window === "undefined") - throw new Error("Refetch on SSR"); - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - if (fetcherRef.current === undefined) - return [2 /*return*/, stateRef.current]; - key = keyRef.current; - fetcher = fetcherRef.current; - params = mparamsRef.current; - return [4 /*yield*/, core.single.fetch(key, skey, fetcher, aborter, params, true, true)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); }, [core, skey]); - var update = React.useCallback(function (updater, uparams, aborter) { - if (uparams === void 0) { uparams = {}; } - return __awaiter(_this, void 0, void 0, function () { - var key, fetcher, params, fparams; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof window === "undefined") - throw new Error("Update on SSR"); - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - key = keyRef.current; - fetcher = fetcherRef.current; - params = mparamsRef.current; - fparams = __assign(__assign({}, params), uparams); - return [4 /*yield*/, core.single.update(key, skey, fetcher, updater, aborter, fparams)]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); - }, [core, skey]); - var suspend = React.useCallback(function () { - if (typeof window === "undefined") - throw new Error("Suspend on SSR"); - return (function () { return __awaiter(_this, void 0, void 0, function () { - var key, fetcher, params, background; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (!(stateRef.current === null)) return [3 /*break*/, 2]; - return [4 /*yield*/, initRef.current]; - case 1: - _a.sent(); - _a.label = 2; - case 2: - if (stateRef.current === null) - throw new Error("Null state after init"); - if (fetcherRef.current === undefined) - throw new Error("No fetcher"); - key = keyRef.current; - fetcher = fetcherRef.current; - params = mparamsRef.current; - background = new Promise(function (ok) { return core.once(skey, function () { return ok(); }, params); }); - return [4 /*yield*/, core.single.fetch(key, skey, fetcher, undefined, params, false, true)]; - case 3: - _a.sent(); - return [4 /*yield*/, background]; - case 4: - _a.sent(); - return [2 /*return*/]; - } - }); - }); })(); - }, [core, skey]); - var state = stateRef.current; - var _b = state !== null && state !== void 0 ? state : {}, data = _b.data, error = _b.error, time = _b.time, cooldown = _b.cooldown, expiration = _b.expiration, aborter = _b.aborter, optimistic = _b.optimistic; - var ready = state !== null; - var loading = Boolean(aborter); - return { key: key, skey: skey, data: data, error: error, time: time, cooldown: cooldown, expiration: expiration, aborter: aborter, optimistic: optimistic, loading: loading, ready: ready, mutate: mutate, fetch: fetch, refetch: refetch, update: update, clear: clear, suspend: suspend }; -} - -function use(factory, deps) { - var schema = React.useMemo(function () { - return factory.apply(void 0, __spreadArray([], __read(deps), false)); - }, deps); - if (schema instanceof SingleSchema) { - var key = schema.key, fetcher = schema.fetcher, params = schema.params; - return useSingle(key, fetcher, params); - } - if (schema instanceof ScrollSchema) { - var scroller = schema.scroller, fetcher = schema.fetcher, params = schema.params; - return useScroll(scroller, fetcher, params); - } - throw new Error("Invalid resource schema"); -} - -function useXSWR() { - var core = useCore(); - var make = React.useCallback(function (schema) { - return schema.make(core); - }, [core]); - return { core: core, make: make }; -} - -function useIDBStorage(name) { - var storage = React.useRef(); - if (storage.current === undefined) - storage.current = new IDBStorage(name); - React.useEffect(function () { return function () { - var _a; - (_a = storage.current) === null || _a === void 0 ? void 0 : _a.unmount(); - }; }, []); - return storage.current; -} -var IDBStorage = /** @class */ (function () { - function IDBStorage(name) { - var _this = this; - this.name = name; - this.async = true; - this.keys = new Set(); - if (typeof indexedDB === "undefined") - return; - this.initialization = this.load(); - this.onunload = function () { return _this.unload(); }; - addEventListener("beforeunload", this.onunload); - } - Object.defineProperty(IDBStorage.prototype, "database", { - get: function () { return this._database; }, - enumerable: false, - configurable: true - }); - IDBStorage.prototype.load = function () { - return __awaiter(this, void 0, void 0, function () { - var _a, item, keys; - var _this = this; - return __generator(this, function (_b) { - switch (_b.label) { - case 0: - if (typeof indexedDB === "undefined") - return [2 /*return*/]; - _a = this; - return [4 /*yield*/, new Promise(function (ok, err) { - var req = indexedDB.open(_this.name, 1); - req.onupgradeneeded = function () { - return req.result.createObjectStore("keyval", {}); - }; - req.onblocked = function () { return err("blocked"); }; - req.onsuccess = function () { return ok(req.result); }; - req.onerror = function () { return err(req.error); }; - })]; - case 1: - _a._database = _b.sent(); - if (typeof Storage === "undefined") - return [2 /*return*/]; - item = localStorage.getItem("idb.".concat(this.name, ".keys")); - if (!item) - return [2 /*return*/]; - keys = JSON.parse(item); - keys.forEach(function (key) { return _this.keys.add(key); }); - localStorage.removeItem("idb.".concat(this.name, ".keys")); - return [4 /*yield*/, this.collect().catch(console.error)]; - case 2: - _b.sent(); - return [2 /*return*/]; - } - }); - }); - }; - IDBStorage.prototype.unmount = function () { - if (typeof indexedDB === "undefined") - return; - if (this.onunload !== undefined) - removeEventListener("beforeunload", this.onunload); - this.collect().catch(console.error); - }; - IDBStorage.prototype.unload = function () { - if (typeof Storage === "undefined") - return; - var item = JSON.stringify(__spreadArray([], __read(this.keys), false)); - localStorage.setItem("idb.".concat(this.name, ".keys"), item); - }; - IDBStorage.prototype.collect = function () { - return __awaiter(this, void 0, void 0, function () { - var _a, _b, key, state, e_1_1; - var e_1, _c; - return __generator(this, function (_d) { - switch (_d.label) { - case 0: - if (typeof indexedDB === "undefined") - return [2 /*return*/]; - _d.label = 1; - case 1: - _d.trys.push([1, 6, 7, 8]); - _a = __values(this.keys), _b = _a.next(); - _d.label = 2; - case 2: - if (!!_b.done) return [3 /*break*/, 5]; - key = _b.value; - return [4 /*yield*/, this.get(key, true)]; - case 3: - state = _d.sent(); - if ((state === null || state === void 0 ? void 0 : state.expiration) === undefined) - return [3 /*break*/, 4]; - if (state.expiration > Date.now()) - return [3 /*break*/, 4]; - this.delete(key, false); - _d.label = 4; - case 4: - _b = _a.next(); - return [3 /*break*/, 2]; - case 5: return [3 /*break*/, 8]; - case 6: - e_1_1 = _d.sent(); - e_1 = { error: e_1_1 }; - return [3 /*break*/, 8]; - case 7: - try { - if (_b && !_b.done && (_c = _a.return)) _c.call(_a); - } - finally { if (e_1) throw e_1.error; } - return [7 /*endfinally*/]; - case 8: return [2 /*return*/]; - } - }); - }); - }; - IDBStorage.prototype.transact = function (callback, mode) { - return __awaiter(this, void 0, void 0, function () { - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof indexedDB === "undefined") - return [2 /*return*/]; - if (!(this.database === undefined)) return [3 /*break*/, 2]; - return [4 /*yield*/, this.initialization]; - case 1: - _a.sent(); - _a.label = 2; - case 2: return [4 /*yield*/, new Promise(function (ok, err) { - if (_this.database === undefined) - throw new Error("Undefined database"); - var tx = _this.database.transaction("keyval", mode); - tx.onerror = function () { return err(tx.error); }; - tx.oncomplete = function () { return ok(result); }; - var result; - callback(tx.objectStore("keyval")) - .then(function (x) { return result = x; }) - .then(function () { return tx.commit(); }) - .catch(err); - })]; - case 3: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - IDBStorage.prototype.get = function (key, ignore) { - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof indexedDB === "undefined") - return [2 /*return*/]; - if (!ignore && !this.keys.has(key)) - this.keys.add(key); - return [4 /*yield*/, this.transact(function (store) { return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, new Promise(function (ok, err) { - var req = store.get(key); - req.onerror = function () { return err(req.error); }; - req.onsuccess = function () { return ok(req.result); }; - })]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); }, "readonly")]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - IDBStorage.prototype.set = function (key, value, ignore) { - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof indexedDB === "undefined") - return [2 /*return*/]; - if (!ignore && !this.keys.has(key)) - this.keys.add(key); - return [4 /*yield*/, this.transact(function (store) { return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, new Promise(function (ok, err) { - var req = store.put(value, key); - req.onerror = function () { return err(req.error); }; - req.onsuccess = function () { return ok(); }; - })]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); }, "readwrite")]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - IDBStorage.prototype.delete = function (key, ignore) { - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var _this = this; - return __generator(this, function (_a) { - switch (_a.label) { - case 0: - if (typeof indexedDB === "undefined") - return [2 /*return*/]; - if (!ignore && this.keys.has(key)) - this.keys.delete(key); - return [4 /*yield*/, this.transact(function (store) { return __awaiter(_this, void 0, void 0, function () { - return __generator(this, function (_a) { - switch (_a.label) { - case 0: return [4 /*yield*/, new Promise(function (ok, err) { - var req = store.delete(key); - req.onerror = function () { return err(req.error); }; - req.onsuccess = function () { return ok(); }; - })]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); }, "readwrite")]; - case 1: return [2 /*return*/, _a.sent()]; - } - }); - }); - }; - return IDBStorage; -}()); - -/** - * Asynchronous local storage - * - * Use for compatibility with SSR - * Use for storing large objects - * - * Won't display data on first render or hydratation, you can either: - * - use SyncLocalStorage - * - use useFallback - * - * @see SyncLocalStorage - * @see useFallback - */ -function useAsyncLocalStorage(prefix, serializer) { - var storage = React.useRef(); - if (storage.current === undefined) - storage.current = new AsyncLocalStorage(prefix, serializer); - React.useEffect(function () { return function () { - var _a; - (_a = storage.current) === null || _a === void 0 ? void 0 : _a.unmount(); - }; }, []); - return storage.current; -} -/** - * Asynchronous local storage - * - * Use for compatibility with SSR - * Use for storing large objects - * - * Won't display data on first render or hydratation, you can either: - * - use SyncLocalStorage - * - use useFallback - * - * @see SyncLocalStorage - * @see useFallback - */ -var AsyncLocalStorage = /** @class */ (function () { - function AsyncLocalStorage(prefix, serializer) { - if (prefix === void 0) { prefix = "xswr:"; } - if (serializer === void 0) { serializer = JSON; } - var _this = this; - this.prefix = prefix; - this.serializer = serializer; - this.async = true; - this.keys = new Set(); - if (typeof Storage === "undefined") - return; - this.onunload = function () { return _this.collect(); }; - addEventListener("beforeunload", this.onunload); - } - AsyncLocalStorage.prototype.unmount = function () { - var _this = this; - if (typeof Storage === "undefined") - return; - if (this.onunload) - removeEventListener("beforeunload", this.onunload); - (function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) { - return [2 /*return*/, this.collect()]; - }); }); })().catch(console.error); - }; - AsyncLocalStorage.prototype.collect = function () { - var e_1, _a; - if (typeof Storage === "undefined") - return; - try { - for (var _b = __values(this.keys), _c = _b.next(); !_c.done; _c = _b.next()) { - var key = _c.value; - var state = this.getSync(key, true); - if ((state === null || state === void 0 ? void 0 : state.expiration) === undefined) - continue; - if (state.expiration > Date.now()) - continue; - this.delete(key, false); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - }; - AsyncLocalStorage.prototype.getSync = function (key, ignore) { - if (ignore === void 0) { ignore = false; } - if (typeof Storage === "undefined") - return; - if (!ignore && !this.keys.has(key)) - this.keys.add(key); - var item = localStorage.getItem(this.prefix + key); - if (item) - return this.serializer.parse(item); - }; - AsyncLocalStorage.prototype.get = function (key, ignore) { - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var item; - return __generator(this, function (_a) { - if (typeof Storage === "undefined") - return [2 /*return*/]; - if (!ignore && !this.keys.has(key)) - this.keys.add(key); - item = localStorage.getItem(this.prefix + key); - if (item) - return [2 /*return*/, this.serializer.parse(item)]; - return [2 /*return*/]; - }); - }); - }; - AsyncLocalStorage.prototype.set = function (key, value, ignore) { - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - var item; - return __generator(this, function (_a) { - if (typeof Storage === "undefined") - return [2 /*return*/]; - if (!ignore && !this.keys.has(key)) - this.keys.add(key); - item = this.serializer.stringify(value); - localStorage.setItem(this.prefix + key, item); - return [2 /*return*/]; - }); - }); - }; - AsyncLocalStorage.prototype.delete = function (key, ignore) { - if (ignore === void 0) { ignore = false; } - return __awaiter(this, void 0, void 0, function () { - return __generator(this, function (_a) { - if (typeof Storage === "undefined") - return [2 /*return*/]; - if (!ignore && this.keys.has(key)) - this.keys.delete(key); - localStorage.removeItem(this.prefix + key); - return [2 /*return*/]; - }); - }); - }; - return AsyncLocalStorage; -}()); - -/** - * Synchronous local storage - * - * Do NOT use with SSR, it will create hydratation errors - * Do NOT use for storing large objects, it will harm performances - * - * Will display data on first render - * - * @see AsyncLocalStorage - */ -function useSyncLocalStorage(prefix, serializer) { - var storage = React.useRef(); - if (!storage.current) - storage.current = new SyncLocalStorage(prefix, serializer); - React.useEffect(function () { return function () { - var _a; - (_a = storage.current) === null || _a === void 0 ? void 0 : _a.unmount(); - }; }, []); - return storage.current; -} -/** - * Synchronous local storage - * - * Do NOT use with SSR, it will create hydratation errors - * Do NOT use for storing large objects, it will harm performances - * - * Will display data on first render - * - * @see AsyncLocalStorage - */ -var SyncLocalStorage = /** @class */ (function () { - function SyncLocalStorage(prefix, serializer) { - if (prefix === void 0) { prefix = "xswr:"; } - if (serializer === void 0) { serializer = JSON; } - var _this = this; - this.prefix = prefix; - this.serializer = serializer; - this.async = false; - this.keys = new Set(); - if (typeof Storage === "undefined") - return; - this.onunload = function () { return _this.collect(); }; - addEventListener("beforeunload", this.onunload); - } - SyncLocalStorage.prototype.unmount = function () { - var _this = this; - if (typeof Storage === "undefined") - return; - removeEventListener("beforeunload", this.onunload); - (function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) { - return [2 /*return*/, this.collect()]; - }); }); })().catch(console.error); - }; - SyncLocalStorage.prototype.collect = function () { - var e_1, _a; - if (typeof Storage === "undefined") - return; - try { - for (var _b = __values(this.keys), _c = _b.next(); !_c.done; _c = _b.next()) { - var key = _c.value; - var state = this.get(key, true); - if ((state === null || state === void 0 ? void 0 : state.expiration) === undefined) - continue; - if (state.expiration > Date.now()) - continue; - this.delete(key, false); - } - } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (_c && !_c.done && (_a = _b.return)) _a.call(_b); - } - finally { if (e_1) throw e_1.error; } - } - }; - SyncLocalStorage.prototype.get = function (key, ignore) { - if (ignore === void 0) { ignore = false; } - if (typeof Storage === "undefined") - return; - if (!ignore && !this.keys.has(key)) - this.keys.add(key); - var item = localStorage.getItem(this.prefix + key); - if (item) - return this.serializer.parse(item); - }; - SyncLocalStorage.prototype.set = function (key, value, ignore) { - if (ignore === void 0) { ignore = false; } - if (typeof Storage === "undefined") - return; - if (!ignore && !this.keys.has(key)) - this.keys.add(key); - var item = this.serializer.stringify(value); - localStorage.setItem(this.prefix + key, item); - }; - SyncLocalStorage.prototype.delete = function (key, ignore) { - if (ignore === void 0) { ignore = false; } - if (typeof Storage === "undefined") - return; - if (!ignore && this.keys.has(key)) - this.keys.delete(key); - localStorage.removeItem(this.prefix + key); - }; - return SyncLocalStorage; -}()); - -var index = { - __proto__: null, - Core: Core, - AbortError: AbortError, - isAbortError: isAbortError, - CoreContext: CoreContext, - useCore: useCore, - useCoreProvider: useCoreProvider, - CoreProvider: CoreProvider, - useDebug: useDebug, - useError: useError, - useFallback: useFallback, - useFetch: useFetch, - useInterval: useInterval, - useMount: useMount, - useOnce: useOnce, - useOnline: useOnline, - useRetry: useRetry, - useVisible: useVisible, - use: use, - useScroll: useScroll, - useSingle: useSingle, - useXSWR: useXSWR, - ScrollHelper: ScrollHelper, - getScrollStorageKey: getScrollStorageKey, - ScrollObject: ScrollObject, - scroll: scroll, - ScrollSchema: ScrollSchema, - SingleHelper: SingleHelper, - getSingleStorageKey: getSingleStorageKey, - SingleObject: SingleObject, - single: single, - SingleSchema: SingleSchema, - useIDBStorage: useIDBStorage, - IDBStorage: IDBStorage, - useAsyncLocalStorage: useAsyncLocalStorage, - AsyncLocalStorage: AsyncLocalStorage, - useSyncLocalStorage: useSyncLocalStorage, - SyncLocalStorage: SyncLocalStorage, - isAsyncStorage: isAsyncStorage, - DEFAULT_EQUALS: DEFAULT_EQUALS, - DEFAULT_SERIALIZER: DEFAULT_SERIALIZER, - DEFAULT_COOLDOWN: DEFAULT_COOLDOWN, - DEFAULT_EXPIRATION: DEFAULT_EXPIRATION, - DEFAULT_TIMEOUT: DEFAULT_TIMEOUT, - refEquals: refEquals, - jsonEquals: jsonEquals, - shallowEquals: shallowEquals -}; - -exports.XSWR = index; +var t=require("react");function e(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach(function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}}),e.default=t,e}var r=e(t);function n(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}var i=function(t,e){return(i=Object.setPrototypeOf||n({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,e)};function o(t,e){var r=function(){this.constructor=t};if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var u=function(){return(u=Object.assign||function(t){for(var e,r=1,n=arguments.length;re.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(t);ie.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function a(t,e,r,i){var o=function(t){return n(t,r)?t:new r(function(e){e(t)})};return new(r||(r=Promise))(function(r,n){var u=function(t){try{a(i.next(t))}catch(e){n(e)}},s=function(t){try{a(i.throw(t))}catch(e){n(e)}},a=function(t){t.done?r(t.value):o(t.value).then(u,s)};a((i=i.apply(t,e||[])).next())})}function c(t,e){var r,n,i,o,u=function(t){return function(e){return s([t,e])}},s=function(o){if(r)throw TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function f(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u}function d(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i1)return this.counts.set(e,i-1),[2];return this.counts.delete(e),[4,this.get(e,n,!0)];case 1:if((null==(o=s.sent())?void 0:o.expiration)===void 0||(null==o?void 0:o.expiration)===-1)return[2];if(u=function(){return a(f,void 0,void 0,function(){var t;return c(this,function(t){switch(t.label){case 0:if(!this._mounted||void 0!==this.counts.get(e))return[2];return this.timeouts.delete(e),[4,this.delete(e,n)];case 1:return t.sent(),[2]}})})},!(Date.now()>o.expiration))return[3,3];return[4,u()];case 2:return s.sent(),[2];case 3:return l=setTimeout(u,o.expiration-Date.now()),this.timeouts.set(e,l),[2]}})})},e}(p),W=t.createContext(void 0);function X(){var e=t.useContext(W);if(void 0===e)throw Error("Undefined core");return e}function H(e){var r=t.useRef();return void 0===r.current&&(r.current=new q(e)),t.useEffect(function(){return function(){var t;null===(t=r.current)||void 0===t||t.unmount()}},[]),r.current}function K(t){var e=t.children,n=s(t,["children"]),i=H(n);return r.createElement(W.Provider,{value:i},e)}function G(e,r){var n=e.data,i=e.error,o=e.time;t.useEffect(function(){console.debug(r,e)},[n,i,o])}function Q(e,r){var n=e.error;t.useEffect(function(){void 0!==n&&r(n)},[n])}function V(t,e){var r=t.data,n=t.error;void 0===r&&void 0===n&&Object.assign(t,e)}function Z(e){var r=e.fetch;t.useEffect(function(){r()},[r])}function Y(e,r){var n=e.ready,i=e.fetch;t.useEffect(function(){if(n&&r){var t=setInterval(i,r);return function(){return clearInterval(t)}}},[i,r])}function $(e){var r=e.fetch;t.useEffect(function(){r()},[])}function tt(e){var r=e.data,n=e.fetch;t.useEffect(function(){void 0===r&&n()},[r,n])}function te(e){var r=t.useRef(e);return r.current=e,r}function tr(e){var r=e.ready,n=te(e.fetch);t.useEffect(function(){if(r){var t=function(){return n.current()};return addEventListener("online",t),function(){return removeEventListener("online",t)}}},[r])}function tn(e,r){void 0===r&&(r={});var n=e.ready,i=e.skey,o=e.refetch,u=e.error,s=r.init,a=void 0===s?1e3:s,c=r.base,l=void 0===c?2:c,f=r.max,d=void 0===f?3:f,h=t.useRef(0);t.useEffect(function(){h.current=0},[i]);var v=te(o);t.useEffect(function(){var t=function(){h.current++,v.current()};if(n){if(void 0===u){h.current=0;return}if(!(h.current>=d)){var e=setTimeout(t,a*Math.pow(l,h.current));return function(){return clearTimeout(e)}}}},[n,u])}function ti(e){var r=e.ready,n=te(e.fetch);t.useEffect(function(){if(r){var t=function(){return!document.hidden&&n.current()};return document.addEventListener("visibilitychange",t),function(){return document.removeEventListener("visibilitychange",t)}}},[r])}function to(e,r,n){var i=this;void 0===n&&(n={});var o=X(),s=u(u({},o.params),n),l=te(e),d=te(r),h=te(s),v=t.useMemo(function(){return e()},[e]),p=t.useMemo(function(){return R(v,h.current)},[v]),y=f(t.useState(0),2)[1],m=t.useRef();t.useMemo(function(){m.current=o.getSync(p,h.current)},[o,p]);var b=t.useCallback(function(t){m.current=t,y(function(t){return t+1})},[]),w=t.useRef();t.useEffect(function(){null===m.current&&(w.current=o.get(p,h.current).then(b))},[o,p]),t.useEffect(function(){if(p)return o.on(p,b,h.current),function(){o.off(p,b,h.current)}},[o,p]);var g=t.useCallback(function(t){return a(i,void 0,void 0,function(){var e,r;return c(this,function(n){switch(n.label){case 0:if(null!==m.current)return[3,2];return[4,w.current];case 1:n.sent(),n.label=2;case 2:if(null===m.current)throw Error("Null state after init");return e=m.current,r=h.current,[4,o.mutate(p,e,t,r)];case 3:return[2,n.sent()]}})})},[o,p]),S=t.useCallback(function(){return a(i,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:if(null!==m.current)return[3,2];return[4,w.current];case 1:t.sent(),t.label=2;case 2:if(null===m.current)throw Error("Null state after init");return[4,o.delete(p,h.current)];case 3:return t.sent(),[2]}})})},[o,p]),k=t.useCallback(function(t){return a(i,void 0,void 0,function(){var e,r,n;return c(this,function(i){switch(i.label){case 0:if("undefined"==typeof window)throw Error("Fetch on SSR");if(null!==m.current)return[3,2];return[4,w.current];case 1:i.sent(),i.label=2;case 2:if(null===m.current)throw Error("Null state after init");if(void 0===d.current)return[2,m.current];return e=l.current,r=d.current,n=h.current,[4,o.scroll.first(p,e,r,t,n)];case 3:return[2,i.sent()]}})})},[o,p]),E=t.useCallback(function(t){return a(i,void 0,void 0,function(){var e,r,n;return c(this,function(i){switch(i.label){case 0:if("undefined"==typeof window)throw Error("Refetch on SSR");if(null!==m.current)return[3,2];return[4,w.current];case 1:i.sent(),i.label=2;case 2:if(null===m.current)throw Error("Null state after init");if(void 0===d.current)return[2,m.current];return e=l.current,r=d.current,n=h.current,[4,o.scroll.first(p,e,r,t,n,!0,!0)];case 3:return[2,i.sent()]}})})},[o,p]),x=t.useCallback(function(t){return a(i,void 0,void 0,function(){var e,r,n;return c(this,function(i){switch(i.label){case 0:if("undefined"==typeof window)throw Error("Scroll on SSR");if(null!==m.current)return[3,2];return[4,w.current];case 1:i.sent(),i.label=2;case 2:if(null===m.current)throw Error("Null state after init");if(void 0===d.current)return[2,m.current];return e=l.current,r=d.current,n=h.current,[4,o.scroll.scroll(p,e,r,t,n,!0,!0)];case 3:return[2,i.sent()]}})})},[o,p]),_=t.useCallback(function(){if("undefined"==typeof window)throw Error("Suspend on SSR");return a(i,void 0,void 0,function(){var t,e,r,n;return c(this,function(i){switch(i.label){case 0:if(null!==m.current)return[3,2];return[4,w.current];case 1:i.sent(),i.label=2;case 2:if(null===m.current)throw Error("Null state after init");if(void 0===d.current)throw Error("No fetcher");return t=l.current,e=d.current,r=h.current,n=new Promise(function(t){return o.once(p,function(){return t()},r)}),[4,o.scroll.first(p,t,e,void 0,r,!1,!0)];case 3:return i.sent(),[4,n];case 4:return i.sent(),[2]}})})},[o,p]),O=m.current,C=null!=O?O:{},A=C.data,D=C.error,I=C.time,N=C.cooldown,j=C.expiration,P=C.aborter,T=C.optimistic,L=Boolean(P);return{key:v,skey:p,data:A,error:D,time:I,cooldown:N,expiration:j,aborter:P,optimistic:T,loading:L,ready:null!==O,mutate:g,fetch:k,refetch:E,scroll:x,clear:S,suspend:_}}function tu(e,r,n){var i=this;void 0===n&&(n={});var o=X(),s=u(u({},o.params),n),l=te(e),d=te(r),h=te(s),v=t.useMemo(function(){return z(e,h.current)},[e]),p=f(t.useState(0),2)[1],y=t.useRef();t.useMemo(function(){y.current=o.getSync(v,h.current)},[o,v]);var m=t.useCallback(function(t){y.current=t,p(function(t){return t+1})},[]),b=t.useRef();t.useEffect(function(){null===y.current&&(b.current=o.get(v,h.current).then(m))},[o,v]),t.useEffect(function(){if(v)return o.on(v,m,h.current),function(){o.off(v,m,h.current)}},[o,v]);var w=t.useCallback(function(t){return a(i,void 0,void 0,function(){var e,r;return c(this,function(n){switch(n.label){case 0:if(null!==y.current)return[3,2];return[4,b.current];case 1:n.sent(),n.label=2;case 2:if(null===y.current)throw Error("Null state after init");return e=y.current,r=h.current,[4,o.mutate(v,e,t,r)];case 3:return[2,n.sent()]}})})},[o,v]),g=t.useCallback(function(){return a(i,void 0,void 0,function(){return c(this,function(t){switch(t.label){case 0:if(null!==y.current)return[3,2];return[4,b.current];case 1:t.sent(),t.label=2;case 2:if(null===y.current)throw Error("Null state after init");return[4,o.delete(v,h.current)];case 3:return t.sent(),[2]}})})},[o,v]),S=t.useCallback(function(t){return a(i,void 0,void 0,function(){var e,r,n;return c(this,function(i){switch(i.label){case 0:if("undefined"==typeof window)throw Error("Fetch on SSR");if(null!==y.current)return[3,2];return[4,b.current];case 1:i.sent(),i.label=2;case 2:if(null===y.current)throw Error("Null state after init");if(void 0===d.current)return[2,y.current];return e=l.current,r=d.current,n=h.current,[4,o.single.fetch(e,v,r,t,n)];case 3:return[2,i.sent()]}})})},[o,v]),k=t.useCallback(function(t){return a(i,void 0,void 0,function(){var e,r,n;return c(this,function(i){switch(i.label){case 0:if("undefined"==typeof window)throw Error("Refetch on SSR");if(null!==y.current)return[3,2];return[4,b.current];case 1:i.sent(),i.label=2;case 2:if(null===y.current)throw Error("Null state after init");if(void 0===d.current)return[2,y.current];return e=l.current,r=d.current,n=h.current,[4,o.single.fetch(e,v,r,t,n,!0,!0)];case 3:return[2,i.sent()]}})})},[o,v]),E=t.useCallback(function(t,e,r){return void 0===e&&(e={}),a(i,void 0,void 0,function(){var n,i,s,a;return c(this,function(s){switch(s.label){case 0:if("undefined"==typeof window)throw Error("Update on SSR");if(null!==y.current)return[3,2];return[4,b.current];case 1:s.sent(),s.label=2;case 2:if(null===y.current)throw Error("Null state after init");return n=l.current,i=d.current,a=u(u({},h.current),e),[4,o.single.update(n,v,i,t,r,a)];case 3:return[2,s.sent()]}})})},[o,v]),x=t.useCallback(function(){if("undefined"==typeof window)throw Error("Suspend on SSR");return a(i,void 0,void 0,function(){var t,e,r,n;return c(this,function(i){switch(i.label){case 0:if(null!==y.current)return[3,2];return[4,b.current];case 1:i.sent(),i.label=2;case 2:if(null===y.current)throw Error("Null state after init");if(void 0===d.current)throw Error("No fetcher");return t=l.current,e=d.current,r=h.current,n=new Promise(function(t){return o.once(v,function(){return t()},r)}),[4,o.single.fetch(t,v,e,void 0,r,!1,!0)];case 3:return i.sent(),[4,n];case 4:return i.sent(),[2]}})})},[o,v]),_=y.current,O=null!=_?_:{},C=O.data,A=O.error,D=O.time,I=O.cooldown,R=O.expiration,N=O.aborter,j=O.optimistic,P=Boolean(N);return{key:e,skey:v,data:C,error:A,time:D,cooldown:I,expiration:R,aborter:N,optimistic:j,loading:P,ready:null!==_,mutate:w,fetch:S,refetch:k,update:E,clear:g,suspend:x}}function ts(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function ta(e,r){var n=t.useMemo(function(){return e.apply(void 0,d([],f(r),!1))},r);if(ts(n,B)){var i=n.key,o=n.fetcher,u=n.params;return tu(i,o,u)}if(ts(n,P)){var s=n.scroller,o=n.fetcher,u=n.params;return to(s,o,u)}throw Error("Invalid resource schema")}function tc(){var e=X(),r=t.useCallback(function(t){return t.make(e)},[e]);return{core:e,make:r}}function tl(e){var r=t.useRef();return void 0===r.current&&(r.current=new tf(e)),t.useEffect(function(){return function(){var t;null===(t=r.current)||void 0===t||t.unmount()}},[]),r.current}var tf=function(){var t=function(t){var e=this;this.name=t,this.async=!0,this.keys=new Set,"undefined"!=typeof indexedDB&&(this.initialization=this.load(),this.onunload=function(){return e.unload()},addEventListener("beforeunload",this.onunload))};return Object.defineProperty(t.prototype,"database",{get:function(){return this._database},enumerable:!1,configurable:!0}),t.prototype.load=function(){return a(this,void 0,void 0,function(){var t,e,r,n=this;return c(this,function(r){switch(r.label){case 0:if("undefined"==typeof indexedDB)return[2];return t=this,[4,new Promise(function(t,e){var r=indexedDB.open(n.name,1);r.onupgradeneeded=function(){return r.result.createObjectStore("keyval",{})},r.onblocked=function(){return e("blocked")},r.onsuccess=function(){return t(r.result)},r.onerror=function(){return e(r.error)}})];case 1:if(t._database=r.sent(),"undefined"==typeof Storage||!(e=localStorage.getItem("idb.".concat(this.name,".keys"))))return[2];return JSON.parse(e).forEach(function(t){return n.keys.add(t)}),localStorage.removeItem("idb.".concat(this.name,".keys")),[4,this.collect().catch(console.error)];case 2:return r.sent(),[2]}})})},t.prototype.unmount=function(){"undefined"!=typeof indexedDB&&(void 0!==this.onunload&&removeEventListener("beforeunload",this.onunload),this.collect().catch(console.error))},t.prototype.unload=function(){if("undefined"!=typeof Storage){var t=JSON.stringify(d([],f(this.keys),!1));localStorage.setItem("idb.".concat(this.name,".keys"),t)}},t.prototype.collect=function(){return a(this,void 0,void 0,function(){var t,e,r,n,i,o,u;return c(this,function(i){switch(i.label){case 0:if("undefined"==typeof indexedDB)return[2];i.label=1;case 1:i.trys.push([1,6,7,8]),e=(t=l(this.keys)).next(),i.label=2;case 2:if(e.done)return[3,5];return r=e.value,[4,this.get(r,!0)];case 3:if((null==(n=i.sent())?void 0:n.expiration)===void 0||n.expiration>Date.now())return[3,4];this.delete(r,!1),i.label=4;case 4:return e=t.next(),[3,2];case 5:return[3,8];case 6:return o={error:i.sent()},[3,8];case 7:try{e&&!e.done&&(u=t.return)&&u.call(t)}finally{if(o)throw o.error}return[7];case 8:return[2]}})})},t.prototype.transact=function(t,e){return a(this,void 0,void 0,function(){var r=this;return c(this,function(n){switch(n.label){case 0:if("undefined"==typeof indexedDB)return[2];if(void 0!==this.database)return[3,2];return[4,this.initialization];case 1:n.sent(),n.label=2;case 2:return[4,new Promise(function(n,i){if(void 0===r.database)throw Error("Undefined database");var o,u=r.database.transaction("keyval",e);u.onerror=function(){return i(u.error)},u.oncomplete=function(){return n(o)},t(u.objectStore("keyval")).then(function(t){return o=t}).then(function(){return u.commit()}).catch(i)})];case 3:return[2,n.sent()]}})})},t.prototype.get=function(t,e){return void 0===e&&(e=!1),a(this,void 0,void 0,function(){var r=this;return c(this,function(n){switch(n.label){case 0:if("undefined"==typeof indexedDB)return[2];return e||this.keys.has(t)||this.keys.add(t),[4,this.transact(function(e){return a(r,void 0,void 0,function(){return c(this,function(r){switch(r.label){case 0:return[4,new Promise(function(r,n){var i=e.get(t);i.onerror=function(){return n(i.error)},i.onsuccess=function(){return r(i.result)}})];case 1:return[2,r.sent()]}})})},"readonly")];case 1:return[2,n.sent()]}})})},t.prototype.set=function(t,e,r){return void 0===r&&(r=!1),a(this,void 0,void 0,function(){var n=this;return c(this,function(i){switch(i.label){case 0:if("undefined"==typeof indexedDB)return[2];return r||this.keys.has(t)||this.keys.add(t),[4,this.transact(function(r){return a(n,void 0,void 0,function(){return c(this,function(n){switch(n.label){case 0:return[4,new Promise(function(n,i){var o=r.put(e,t);o.onerror=function(){return i(o.error)},o.onsuccess=function(){return n()}})];case 1:return[2,n.sent()]}})})},"readwrite")];case 1:return[2,i.sent()]}})})},t.prototype.delete=function(t,e){return void 0===e&&(e=!1),a(this,void 0,void 0,function(){var r=this;return c(this,function(n){switch(n.label){case 0:if("undefined"==typeof indexedDB)return[2];return!e&&this.keys.has(t)&&this.keys.delete(t),[4,this.transact(function(e){return a(r,void 0,void 0,function(){return c(this,function(r){switch(r.label){case 0:return[4,new Promise(function(r,n){var i=e.delete(t);i.onerror=function(){return n(i.error)},i.onsuccess=function(){return r()}})];case 1:return[2,r.sent()]}})})},"readwrite")];case 1:return[2,n.sent()]}})})},t}();function td(e,r){var n=t.useRef();return void 0===n.current&&(n.current=new th(e,r)),t.useEffect(function(){return function(){var t;null===(t=n.current)||void 0===t||t.unmount()}},[]),n.current}var th=function(){var t=function(t,e){void 0===t&&(t="xswr:"),void 0===e&&(e=JSON);var r=this;this.prefix=t,this.serializer=e,this.async=!0,this.keys=new Set,"undefined"!=typeof Storage&&(this.onunload=function(){return r.collect()},addEventListener("beforeunload",this.onunload))};return t.prototype.unmount=function(){"undefined"!=typeof Storage&&(this.onunload&&removeEventListener("beforeunload",this.onunload),a(this,void 0,void 0,function(){return c(this,function(t){return[2,this.collect()]})}).catch(console.error))},t.prototype.collect=function(){var t,e;if("undefined"!=typeof Storage)try{for(var r=l(this.keys),n=r.next();!n.done;n=r.next()){var i=n.value,o=this.getSync(i,!0);(null==o?void 0:o.expiration)!==void 0&&(o.expiration>Date.now()||this.delete(i,!1))}}catch(u){t={error:u}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},t.prototype.getSync=function(t,e){if(void 0===e&&(e=!1),"undefined"!=typeof Storage){e||this.keys.has(t)||this.keys.add(t);var r=localStorage.getItem(this.prefix+t);if(r)return this.serializer.parse(r)}},t.prototype.get=function(t,e){return void 0===e&&(e=!1),a(this,void 0,void 0,function(){var r;return c(this,function(n){return"undefined"==typeof Storage?[2]:(e||this.keys.has(t)||this.keys.add(t),r=localStorage.getItem(this.prefix+t))?[2,this.serializer.parse(r)]:[2]})})},t.prototype.set=function(t,e,r){return void 0===r&&(r=!1),a(this,void 0,void 0,function(){var n;return c(this,function(i){return"undefined"==typeof Storage||(r||this.keys.has(t)||this.keys.add(t),n=this.serializer.stringify(e),localStorage.setItem(this.prefix+t,n)),[2]})})},t.prototype.delete=function(t,e){return void 0===e&&(e=!1),a(this,void 0,void 0,function(){return c(this,function(r){return"undefined"==typeof Storage||(!e&&this.keys.has(t)&&this.keys.delete(t),localStorage.removeItem(this.prefix+t)),[2]})})},t}();function tv(e,r){var n=t.useRef();return n.current||(n.current=new tp(e,r)),t.useEffect(function(){return function(){var t;null===(t=n.current)||void 0===t||t.unmount()}},[]),n.current}var tp=function(){var t=function(t,e){void 0===t&&(t="xswr:"),void 0===e&&(e=JSON);var r=this;this.prefix=t,this.serializer=e,this.async=!1,this.keys=new Set,"undefined"!=typeof Storage&&(this.onunload=function(){return r.collect()},addEventListener("beforeunload",this.onunload))};return t.prototype.unmount=function(){"undefined"!=typeof Storage&&(removeEventListener("beforeunload",this.onunload),a(this,void 0,void 0,function(){return c(this,function(t){return[2,this.collect()]})}).catch(console.error))},t.prototype.collect=function(){var t,e;if("undefined"!=typeof Storage)try{for(var r=l(this.keys),n=r.next();!n.done;n=r.next()){var i=n.value,o=this.get(i,!0);(null==o?void 0:o.expiration)!==void 0&&(o.expiration>Date.now()||this.delete(i,!1))}}catch(u){t={error:u}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},t.prototype.get=function(t,e){if(void 0===e&&(e=!1),"undefined"!=typeof Storage){e||this.keys.has(t)||this.keys.add(t);var r=localStorage.getItem(this.prefix+t);if(r)return this.serializer.parse(r)}},t.prototype.set=function(t,e,r){if(void 0===r&&(r=!1),"undefined"!=typeof Storage){r||this.keys.has(t)||this.keys.add(t);var n=this.serializer.stringify(e);localStorage.setItem(this.prefix+t,n)}},t.prototype.delete=function(t,e){void 0===e&&(e=!1),"undefined"!=typeof Storage&&(!e&&this.keys.has(t)&&this.keys.delete(t),localStorage.removeItem(this.prefix+t))},t}(),ty={__proto__:null,Core:q,AbortError:w,isAbortError:g,CoreContext:W,useCore:X,useCoreProvider:H,CoreProvider:K,useDebug:G,useError:Q,useFallback:V,useFetch:Z,useInterval:Y,useMount:$,useOnce:tt,useOnline:tr,useRetry:tn,useVisible:ti,use:ta,useScroll:to,useSingle:tu,useXSWR:tc,ScrollHelper:I,getScrollStorageKey:R,ScrollObject:N,scroll:j,ScrollSchema:P,SingleHelper:L,getSingleStorageKey:z,SingleObject:M,single:U,SingleSchema:B,useIDBStorage:tl,IDBStorage:tf,useAsyncLocalStorage:td,AsyncLocalStorage:th,useSyncLocalStorage:tv,SyncLocalStorage:tp,isAsyncStorage:F,DEFAULT_EQUALS:_,DEFAULT_SERIALIZER:O,DEFAULT_COOLDOWN:C,DEFAULT_EXPIRATION:A,DEFAULT_TIMEOUT:D,refEquals:k,jsonEquals:E,shallowEquals:x};exports.XSWR=ty; diff --git a/dist/mods/react/contexts/core.d.ts b/dist/mods/react/contexts/core.d.ts index 64b9fefc..0d965f9e 100644 --- a/dist/mods/react/contexts/core.d.ts +++ b/dist/mods/react/contexts/core.d.ts @@ -1,7 +1,7 @@ import { ChildrenProps } from "../../../libs/react"; import { Core } from "../../core"; import { Params } from "../../types/params"; -import React from "react"; +import * as React from "react"; export declare const CoreContext: React.Context; export declare function useCore(): Core; export declare function useCoreProvider(params: Params): Core; diff --git a/package-lock.json b/package-lock.json index 2c69b8ea..7fbf2456 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,4446 +1,1243 @@ { "name": "@hazae41/xswr", - "version": "1.0.74", + "version": "1.0.85", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@hazae41/xswr", - "version": "1.0.74", + "version": "1.0.85", "license": "MIT", "dependencies": { "react": "^18.2.0" }, "devDependencies": { - "@types/react": "^18.0.17", - "bunchee": "^1.9.1", + "@types/react": "^18.0.21", + "bunchee": "^2.0.1", "rimraf": "^3.0.2", "ttypescript": "^1.5.13", - "typescript": "^4.8.2", + "typescript": "^4.8.4", "typescript-transform-paths": "^3.3.1" } }, - "node_modules/@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, + "peer": true, "dependencies": { - "@babel/highlight": "^7.18.6" + "@jridgewell/trace-mapping": "0.3.9" }, "engines": { - "node": ">=6.9.0" + "node": ">=12" } }, - "node_modules/@babel/compat-data": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.13.tgz", - "integrity": "sha512-5yUzC5LqyTFp2HLmDoxGQelcdYgSpP9xsnMWBphAscOdFrHSAVbLNzWiy32sVNDqJRDiJK6klfDnAgu6PAGSHw==", + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", "dev": true, + "peer": true, "engines": { - "node": ">=6.9.0" + "node": ">=6.0.0" } }, - "node_modules/@babel/core": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.13.tgz", - "integrity": "sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==", + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.13", - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-module-transforms": "^7.18.9", - "@babel/helpers": "^7.18.9", - "@babel/parser": "^7.18.13", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.18.13", - "@babel/types": "^7.18.13", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } + "peer": true }, - "node_modules/@babel/generator": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.13.tgz", - "integrity": "sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==", + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, + "peer": true, "dependencies": { - "@babel/types": "^7.18.13", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "node_modules/@rollup/plugin-commonjs": { + "version": "22.0.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.2.tgz", + "integrity": "sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@rollup/pluginutils": "^3.1.0", + "commondir": "^1.0.1", + "estree-walker": "^2.0.1", + "glob": "^7.1.6", + "is-reference": "^1.2.1", + "magic-string": "^0.25.7", + "resolve": "^1.17.0" }, "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", - "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" + "node": ">= 12.0.0" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "rollup": "^2.68.0" } }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz", - "integrity": "sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw==", + "node_modules/@rollup/plugin-json": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz", + "integrity": "sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==", "dev": true, "dependencies": { - "@babel/helper-explode-assignable-expression": "^7.18.6", - "@babel/types": "^7.18.9" + "@rollup/pluginutils": "^3.0.8" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "rollup": "^1.20.0 || ^2.0.0" } }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz", - "integrity": "sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==", + "node_modules/@rollup/plugin-node-resolve": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.3.0.tgz", + "integrity": "sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.18.8", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.20.2", - "semver": "^6.3.0" + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "deepmerge": "^4.2.2", + "is-builtin-module": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.19.0" }, "engines": { - "node": ">=6.9.0" + "node": ">= 10.0.0" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "rollup": "^2.42.0" } }, - "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.13.tgz", - "integrity": "sha512-hDvXp+QYxSRL+23mpAlSGxHMDyIGChm0/AwTfTAAK5Ufe40nCsyNdaYCGuK91phn/fVu9kqayImRDkvNAgdrsA==", + "node_modules/@rollup/plugin-typescript": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.4.0.tgz", + "integrity": "sha512-QssfoOP6V4/6skX12EfOW5UzJAv/c334F4OJWmQpe2kg3agEa0JwVCckwmfuvEgDixyX+XyxjFenH7M2rDKUyQ==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-member-expression-to-functions": "^7.18.9", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.9", - "@babel/helper-split-export-declaration": "^7.18.6" + "@rollup/pluginutils": "^3.1.0", + "resolve": "^1.17.0" }, "engines": { - "node": ">=6.9.0" + "node": ">=8.0.0" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "rollup": "^2.14.0", + "tslib": "*", + "typescript": ">=3.7.0" + }, + "peerDependenciesMeta": { + "tslib": { + "optional": true + } } }, - "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz", - "integrity": "sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A==", + "node_modules/@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "regexpu-core": "^5.1.0" + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.2.tgz", - "integrity": "sha512-r9QJJ+uDWrd+94BSPcP6/de67ygLtvVy6cK4luE6MOuDsZIdoaPBnfSpbO/+LTifjPckbKXRuI9BB/Z2/y3iTg==", - "dev": true, - "dependencies": { - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" + "node": ">= 8.0.0" }, "peerDependencies": { - "@babel/core": "^7.4.0-0" + "rollup": "^1.20.0||^2.0.0" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } + "node_modules/@rollup/pluginutils/node_modules/estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true }, - "node_modules/@babel/helper-explode-assignable-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", - "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", + "node_modules/@swc/core": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.4.tgz", + "integrity": "sha512-W1AvQImfF2T+7dzWdg/GqFpcMJ24lyXGQ/kPKHL/FGPZbf0Q1ExD7wp3eQ2PQMgHTLe28qWonxicm2DPfprx3g==", "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" + "hasInstallScript": true, + "bin": { + "swcx": "run_swcx.js" }, "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz", - "integrity": "sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A==", - "dev": true, - "dependencies": { - "@babel/template": "^7.18.6", - "@babel/types": "^7.18.9" + "node": ">=10" }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/swc" }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz", - "integrity": "sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==", + "optionalDependencies": { + "@swc/core-android-arm-eabi": "1.3.4", + "@swc/core-android-arm64": "1.3.4", + "@swc/core-darwin-arm64": "1.3.4", + "@swc/core-darwin-x64": "1.3.4", + "@swc/core-freebsd-x64": "1.3.4", + "@swc/core-linux-arm-gnueabihf": "1.3.4", + "@swc/core-linux-arm64-gnu": "1.3.4", + "@swc/core-linux-arm64-musl": "1.3.4", + "@swc/core-linux-x64-gnu": "1.3.4", + "@swc/core-linux-x64-musl": "1.3.4", + "@swc/core-win32-arm64-msvc": "1.3.4", + "@swc/core-win32-ia32-msvc": "1.3.4", + "@swc/core-win32-x64-msvc": "1.3.4" + } + }, + "node_modules/@swc/core-android-arm-eabi": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-android-arm-eabi/-/core-android-arm-eabi-1.3.4.tgz", + "integrity": "sha512-aq+CAebSQMtdrIR4+v/JBfykK/daD+so2gPHm4wgLaTR+xwziQAsBBI5iq5sinhIg4FGnmljtO75QolcNLmpvw==", + "cpu": [ + "arm" + ], "dev": true, + "optional": true, + "os": [ + "android" + ], "dependencies": { - "@babel/types": "^7.18.9" + "@swc/wasm": "1.2.122" }, "engines": { - "node": ">=6.9.0" + "node": ">=10" } }, - "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "node_modules/@swc/core-android-arm64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-android-arm64/-/core-android-arm64-1.3.4.tgz", + "integrity": "sha512-E5z6ribiEzDqrq5Kv5xOLdWcTzHWlzGuqDSxTQNz9GCC94qSVzXp5Df+egVEKE/4t7u2P6nO46BUKweYMb9TJg==", + "cpu": [ + "arm64" + ], "dev": true, + "optional": true, + "os": [ + "android" + ], "dependencies": { - "@babel/types": "^7.18.6" + "@swc/wasm": "1.2.130" }, "engines": { - "node": ">=6.9.0" + "node": ">=10" } }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz", - "integrity": "sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g==", + "node_modules/@swc/core-android-arm64/node_modules/@swc/wasm": { + "version": "1.2.130", + "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", + "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.9", - "@babel/types": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - } + "optional": true }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", - "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", + "node_modules/@swc/core-darwin-arm64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.4.tgz", + "integrity": "sha512-JNBFQKtaUdsq0Sv6N29++Q6xrvZDn1bQ7pbMvr8t7kBNXaYCDmupbwPGT725MrGVs72N4qKee5Z0OIvmnLCQfw==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=6.9.0" + "node": ">=10" } }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz", - "integrity": "sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w==", + "node_modules/@swc/core-darwin-x64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.4.tgz", + "integrity": "sha512-A6KMZsUJ3j5TVxAizbv+UEjCNvMgWBm9jw4R3biaw8kbgu3XUWHdkiheXO+c2kjjjgwr1jhkHcLgRjffwpLYFA==", + "cpu": [ + "x64" + ], "dev": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=6.9.0" + "node": ">=10" } }, - "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", - "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", + "node_modules/@swc/core-freebsd-x64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-freebsd-x64/-/core-freebsd-x64-1.3.4.tgz", + "integrity": "sha512-C5FCXHebcHwPJtEhgRShumXvcdPO5Cqiwd7GDNBav1IZribs3+ZqrTkCaz2hY7gb5NvyFIxkJ5HhpS4Pxafhuw==", + "cpu": [ + "x64" + ], "dev": true, + "optional": true, + "os": [ + "freebsd" + ], "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-wrap-function": "^7.18.9", - "@babel/types": "^7.18.9" + "@swc/wasm": "1.2.130" }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": ">=10" } }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.18.9.tgz", - "integrity": "sha512-dNsWibVI4lNT6HiuOIBr1oyxo40HvIVmbwPUm3XZ7wMh4k2WxrxTqZwSqw/eEmXDS9np0ey5M2bz9tBmO9c+YQ==", + "node_modules/@swc/core-freebsd-x64/node_modules/@swc/wasm": { + "version": "1.2.130", + "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", + "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-member-expression-to-functions": "^7.18.9", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/traverse": "^7.18.9", - "@babel/types": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - } + "optional": true }, - "node_modules/@babel/helper-simple-access": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", - "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", + "node_modules/@swc/core-linux-arm-gnueabihf": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.4.tgz", + "integrity": "sha512-vawHUhUcS//xNvGzL0zZ3vZ1YnsjgyvWQXB5PF4bhM5Y0/rmcrEdpkSId1qTfaMpcL7l2QSy9/DM7ucjlSpK6w==", + "cpu": [ + "arm" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "dependencies": { - "@babel/types": "^7.18.6" + "@swc/wasm": "1.2.130" }, "engines": { - "node": ">=6.9.0" + "node": ">=10" } }, - "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz", - "integrity": "sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw==", + "node_modules/@swc/core-linux-arm-gnueabihf/node_modules/@swc/wasm": { + "version": "1.2.130", + "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", + "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", "dev": true, - "dependencies": { - "@babel/types": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - } + "optional": true }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "node_modules/@swc/core-linux-arm64-gnu": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.4.tgz", + "integrity": "sha512-p60RoYaDS8zrqp/cGkcJryk9HobJvrL+Ox/iz8ivDrV4IS0LXvqW5/5YTSzLo93/+blvG/M0hdaokoMhWhDnwA==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" + "node": ">=10" } }, - "node_modules/@babel/helper-string-parser": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", - "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", + "node_modules/@swc/core-linux-arm64-musl": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.4.tgz", + "integrity": "sha512-F9hW6g5l4YesJJH/JMznaLGdLeCV4FKq5MN5DaZfuB8qrCZGLmAasGgvSNbXh1oZnDu1PD2ZxMYivkf2n8/4OA==", + "cpu": [ + "arm64" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" + "node": ">=10" } }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", + "node_modules/@swc/core-linux-x64-gnu": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.4.tgz", + "integrity": "sha512-rRqDtxktiVaxO8NQeEZSX0kNSFkI5Ft+4fZcFTbWhDO0vknC0+ZYbWpverfQ8yAwo7aA9jKWupwc3I7iZ1EQQQ==", + "cpu": [ + "x64" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" + "node": ">=10" } }, - "node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "node_modules/@swc/core-linux-x64-musl": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.4.tgz", + "integrity": "sha512-stVnU7KXQxSbh67UiIVxZsgjkRSXApPTEU3CYnwsdH7G+ynfO1WocSatzjIKpJfhcY2Nss8/33yDaOKZXVhbIA==", + "cpu": [ + "x64" + ], "dev": true, + "optional": true, + "os": [ + "linux" + ], "engines": { - "node": ">=6.9.0" + "node": ">=10" } }, - "node_modules/@babel/helper-wrap-function": { - "version": "7.18.11", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.18.11.tgz", - "integrity": "sha512-oBUlbv+rjZLh2Ks9SKi4aL7eKaAXBWleHzU89mP0G6BMUlRxSckk9tSIkgDGydhgFxHuGSlBQZfnaD47oBEB7w==", + "node_modules/@swc/core-win32-arm64-msvc": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.4.tgz", + "integrity": "sha512-qc3UIdAQfLTA1mJsFkX3ISqJDU02qtcjUbnLI8sl6oedCAOFF66TcecJvwl4iO+BTO04+KoZc5rJovSTOb3eQA==", + "cpu": [ + "arm64" + ], "dev": true, + "optional": true, + "os": [ + "win32" + ], "dependencies": { - "@babel/helper-function-name": "^7.18.9", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.18.11", - "@babel/types": "^7.18.10" + "@swc/wasm": "1.2.130" }, "engines": { - "node": ">=6.9.0" + "node": ">=10" } }, - "node_modules/@babel/helpers": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.9.tgz", - "integrity": "sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ==", + "node_modules/@swc/core-win32-arm64-msvc/node_modules/@swc/wasm": { + "version": "1.2.130", + "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", + "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", "dev": true, - "dependencies": { - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.9", - "@babel/types": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - } + "optional": true }, - "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "node_modules/@swc/core-win32-ia32-msvc": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.4.tgz", + "integrity": "sha512-FxuDGn60VrnYBcpH0CeR9+pCnPUaVvZ20CO6o/oNYHSfIhqPc76o3zFYYEFswYodExjCCYwsuPYgi+stvKZroA==", + "cpu": [ + "ia32" + ], "dev": true, + "optional": true, + "os": [ + "win32" + ], "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@swc/wasm": "1.2.130" }, "engines": { - "node": ">=6.9.0" + "node": ">=10" } }, - "node_modules/@babel/parser": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.13.tgz", - "integrity": "sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==", + "node_modules/@swc/core-win32-ia32-msvc/node_modules/@swc/wasm": { + "version": "1.2.130", + "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", + "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } + "optional": true }, - "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", - "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", + "node_modules/@swc/core-win32-x64-msvc": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.4.tgz", + "integrity": "sha512-9/bSvgjV31u1G2slRFPgK85ohJdo8KtWJ0f4CPp2LdVtIJHbFGd0pWjnMfiPJeodSxSGGWrgUNQtajqIIsrbqA==", + "cpu": [ + "x64" + ], "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, + "optional": true, + "os": [ + "win32" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "node": ">=10" } }, - "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.9.tgz", - "integrity": "sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg==", + "node_modules/@swc/wasm": { + "version": "1.2.122", + "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.122.tgz", + "integrity": "sha512-sM1VCWQxmNhFtdxME+8UXNyPNhxNu7zdb6ikWpz0YKAQQFRGT5ThZgJrubEpah335SUToNg8pkdDF7ibVCjxbQ==", "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", - "@babel/plugin-proposal-optional-chaining": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.13.0" - } + "optional": true }, - "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.10.tgz", - "integrity": "sha512-1mFuY2TOsR1hxbjCo4QL+qlIjV07p4H4EUYw2J/WCqsvFV6V9X9z9YhXbWndc/4fw+hYGlDT7egYxliMp5O6Ew==", + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-remap-async-to-generator": "^7.18.9", - "@babel/plugin-syntax-async-generators": "^7.8.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "peer": true }, - "node_modules/@babel/plugin-proposal-class-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", - "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "peer": true }, - "node_modules/@babel/plugin-proposal-class-static-block": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", - "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-class-static-block": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.12.0" - } + "peer": true }, - "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", - "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", + "node_modules/@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "peer": true + }, + "node_modules/@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "18.7.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz", + "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==", + "dev": true + }, + "node_modules/@types/prop-types": { + "version": "15.7.5", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", + "dev": true }, - "node_modules/@babel/plugin-proposal-export-namespace-from": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", - "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", + "node_modules/@types/react": { + "version": "18.0.21", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.21.tgz", + "integrity": "sha512-7QUCOxvFgnD5Jk8ZKlUAhVcRj7GuJRjnjjiY/IUBWKgOlnvDvTMLD4RTF7NPyVmbRhNrbomZiOepg7M/2Kj1mA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" } }, - "node_modules/@babel/plugin-proposal-json-strings": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", - "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", + "node_modules/@types/resolve": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@types/node": "*" } }, - "node_modules/@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.9.tgz", - "integrity": "sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q==", + "node_modules/@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + "peer": true, + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": ">=0.4.0" } }, - "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", - "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, + "peer": true, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": ">=0.4.0" } }, - "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", - "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "peer": true + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, - "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.9.tgz", - "integrity": "sha512-kDDHQ5rflIeY5xl69CEqGEZ0KY369ehsCIEbTGb4siHG5BE9sga/T0r0OUwyZNLMmZE79E1kbsqAjwFCW4ds6Q==", + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.18.8", - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.18.8" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", - "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", + "node_modules/builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - }, "engines": { - "node": ">=6.9.0" + "node": ">=6" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz", - "integrity": "sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w==", + "node_modules/bunchee": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/bunchee/-/bunchee-2.0.1.tgz", + "integrity": "sha512-98MRlMVSwlJy1kqwWeGG9vbZ0/99tX43pIMl+J3CV4Pbz9mVQdyy+JqbIpVoIJHcfzaTxw/POcXRonCHhjNvUg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" + "@rollup/plugin-commonjs": "22.0.2", + "@rollup/plugin-json": "4.1.0", + "@rollup/plugin-node-resolve": "13.3.0", + "@rollup/plugin-typescript": "8.4.0", + "@swc/core": "^1.2.244", + "arg": "5.0.0", + "rollup": "2.74.1", + "rollup-plugin-preserve-shebang": "1.0.1", + "rollup-plugin-swc3": "0.4.1", + "tslib": "2.4.0" }, - "engines": { - "node": ">=6.9.0" + "bin": { + "bunchee": "dist/cli.js" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "typescript": ">= 3.7.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", - "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", + "node_modules/bunchee/node_modules/arg": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.0.tgz", + "integrity": "sha512-4P8Zm2H+BRS+c/xX1LrHw0qKpEhdlZjLCgWy+d78T9vqa2Z2SiD2wMrYuWIAFy5IZUD7nnNXroRttz+0RzlrzQ==", + "dev": true + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "peer": true + }, + "node_modules/csstype": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", + "dev": true }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", - "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", + "node_modules/deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" - }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": ">=0.10.0" } }, - "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", - "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, + "peer": true, "engines": { - "node": ">=4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": ">=0.3.1" } }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true }, - "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz", - "integrity": "sha512-/DU3RXad9+bZwrgWJQKbr39gYbJpLJHezqEzRzi/BHRlJ9zsQb4CK2CA/5apllXNomwA1qHwzvHl+AdEmC5krQ==", + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "node": "*" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", - "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz", - "integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz", - "integrity": "sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-remap-async-to-generator": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", - "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.9.tgz", - "integrity": "sha512-5sDIJRV1KtQVEbt/EIBwGy4T01uYIo4KRB3VUqzkhrAIOGx7AoctL9+Ux88btY0zXdDyPJ9mW+bg+v+XEkGmtw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-classes": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.9.tgz", - "integrity": "sha512-EkRQxsxoytpTlKJmSPYrsOMjCILacAjtSVkd4gChEe2kXjFCun3yohhW5I7plXJhCemM0gKsaGMcO8tinvCA5g==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-replace-supers": "^7.18.9", - "@babel/helper-split-export-declaration": "^7.18.6", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.9.tgz", - "integrity": "sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.13.tgz", - "integrity": "sha512-TodpQ29XekIsex2A+YJPj5ax2plkGa8YYY6mFjCohk/IG9IY42Rtuj1FuDeemfg2ipxIFLzPeA83SIBnlhSIow==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", - "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", - "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", - "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", - "dev": true, - "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-for-of": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz", - "integrity": "sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz", - "integrity": "sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==", - "dev": true, - "dependencies": { - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-literals": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz", - "integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", - "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz", - "integrity": "sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz", - "integrity": "sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.9.tgz", - "integrity": "sha512-zY/VSIbbqtoRoJKo2cDTewL364jSlZGvn0LKOf9ntbfxOvjfmyrdtEEOAdswOswhZEb8UH3jDkCKHd1sPgsS0A==", - "dev": true, - "dependencies": { - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-module-transforms": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-validator-identifier": "^7.18.6", - "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", - "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz", - "integrity": "sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-new-target": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", - "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-super": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", - "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-parameters": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz", - "integrity": "sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", - "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-display-name": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz", - "integrity": "sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.18.10.tgz", - "integrity": "sha512-gCy7Iikrpu3IZjYZolFE4M1Sm+nrh1/6za2Ewj77Z+XirT4TsbJcvOFOyF+fRPwU6AKKK136CZxx6L8AbSFG6A==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-jsx": "^7.18.6", - "@babel/types": "^7.18.10" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-jsx-development": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz", - "integrity": "sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA==", - "dev": true, - "dependencies": { - "@babel/plugin-transform-react-jsx": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-react-pure-annotations": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.6.tgz", - "integrity": "sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", - "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "regenerator-transform": "^0.15.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", - "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-runtime": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.10.tgz", - "integrity": "sha512-q5mMeYAdfEbpBAgzl7tBre/la3LeCxmDO1+wMXRdPWbcoMjR3GiXlCLk7JBZVVye0bqTGNMbt0yYVXX1B1jEWQ==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.9", - "babel-plugin-polyfill-corejs2": "^0.3.2", - "babel-plugin-polyfill-corejs3": "^0.5.3", - "babel-plugin-polyfill-regenerator": "^0.4.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", - "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-spread": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.9.tgz", - "integrity": "sha512-39Q814wyoOPtIB/qGopNIL9xDChOE1pNU0ZY5dO0owhiVt/5kFm4li+/bBtwc7QotG0u5EPzqhZdjMtmqBqyQA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", - "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz", - "integrity": "sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", - "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", - "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", - "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-env": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.10.tgz", - "integrity": "sha512-wVxs1yjFdW3Z/XkNfXKoblxoHgbtUF7/l3PvvP4m02Qz9TZ6uZGxRVYjSQeR87oQmHco9zWitW5J82DJ7sCjvA==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.18.8", - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-validator-option": "^7.18.6", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-async-generator-functions": "^7.18.10", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-class-static-block": "^7.18.6", - "@babel/plugin-proposal-dynamic-import": "^7.18.6", - "@babel/plugin-proposal-export-namespace-from": "^7.18.9", - "@babel/plugin-proposal-json-strings": "^7.18.6", - "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", - "@babel/plugin-proposal-numeric-separator": "^7.18.6", - "@babel/plugin-proposal-object-rest-spread": "^7.18.9", - "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", - "@babel/plugin-proposal-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-private-methods": "^7.18.6", - "@babel/plugin-proposal-private-property-in-object": "^7.18.6", - "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.18.6", - "@babel/plugin-transform-async-to-generator": "^7.18.6", - "@babel/plugin-transform-block-scoped-functions": "^7.18.6", - "@babel/plugin-transform-block-scoping": "^7.18.9", - "@babel/plugin-transform-classes": "^7.18.9", - "@babel/plugin-transform-computed-properties": "^7.18.9", - "@babel/plugin-transform-destructuring": "^7.18.9", - "@babel/plugin-transform-dotall-regex": "^7.18.6", - "@babel/plugin-transform-duplicate-keys": "^7.18.9", - "@babel/plugin-transform-exponentiation-operator": "^7.18.6", - "@babel/plugin-transform-for-of": "^7.18.8", - "@babel/plugin-transform-function-name": "^7.18.9", - "@babel/plugin-transform-literals": "^7.18.9", - "@babel/plugin-transform-member-expression-literals": "^7.18.6", - "@babel/plugin-transform-modules-amd": "^7.18.6", - "@babel/plugin-transform-modules-commonjs": "^7.18.6", - "@babel/plugin-transform-modules-systemjs": "^7.18.9", - "@babel/plugin-transform-modules-umd": "^7.18.6", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.18.6", - "@babel/plugin-transform-new-target": "^7.18.6", - "@babel/plugin-transform-object-super": "^7.18.6", - "@babel/plugin-transform-parameters": "^7.18.8", - "@babel/plugin-transform-property-literals": "^7.18.6", - "@babel/plugin-transform-regenerator": "^7.18.6", - "@babel/plugin-transform-reserved-words": "^7.18.6", - "@babel/plugin-transform-shorthand-properties": "^7.18.6", - "@babel/plugin-transform-spread": "^7.18.9", - "@babel/plugin-transform-sticky-regex": "^7.18.6", - "@babel/plugin-transform-template-literals": "^7.18.9", - "@babel/plugin-transform-typeof-symbol": "^7.18.9", - "@babel/plugin-transform-unicode-escapes": "^7.18.10", - "@babel/plugin-transform-unicode-regex": "^7.18.6", - "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.18.10", - "babel-plugin-polyfill-corejs2": "^0.3.2", - "babel-plugin-polyfill-corejs3": "^0.5.3", - "babel-plugin-polyfill-regenerator": "^0.4.0", - "core-js-compat": "^3.22.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-modules": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", - "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-react": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.18.6.tgz", - "integrity": "sha512-zXr6atUmyYdiWRVLOZahakYmOBHtWc2WGCkP8PYTgZi0iJXDY2CN180TdrIW4OGOAdLc7TifzDIvtx6izaRIzg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-validator-option": "^7.18.6", - "@babel/plugin-transform-react-display-name": "^7.18.6", - "@babel/plugin-transform-react-jsx": "^7.18.6", - "@babel/plugin-transform-react-jsx-development": "^7.18.6", - "@babel/plugin-transform-react-pure-annotations": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", - "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", - "dev": true, - "dependencies": { - "regenerator-runtime": "^0.13.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.13.tgz", - "integrity": "sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.13", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.13", - "@babel/types": "^7.18.13", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.13.tgz", - "integrity": "sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.18.6", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "node_modules/@jridgewell/source-map/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@rollup/plugin-babel": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.2.1.tgz", - "integrity": "sha512-Jd7oqFR2dzZJ3NWANDyBjwTtX/lYbZpVcmkHrfQcpvawHs9E4c0nYk5U2mfZ6I/DZcIvy506KZJi54XK/jxH7A==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.10.4", - "@rollup/pluginutils": "^3.1.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0", - "@types/babel__core": "^7.1.9", - "rollup": "^1.20.0||^2.0.0" - }, - "peerDependenciesMeta": { - "@types/babel__core": { - "optional": true - } - } - }, - "node_modules/@rollup/plugin-commonjs": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.1.0.tgz", - "integrity": "sha512-6ZtHx3VHIp2ReNNDxHjuUml6ur+WcQ28N1yHgCQwsbNkQg2suhxGMDQGJOn/KuDxKtd1xuZP5xSTwBA4GQ8hbA==", - "dev": true, - "dependencies": { - "@rollup/pluginutils": "^3.1.0", - "commondir": "^1.0.1", - "estree-walker": "^2.0.1", - "glob": "^7.1.6", - "is-reference": "^1.2.1", - "magic-string": "^0.25.7", - "resolve": "^1.17.0" - }, - "engines": { - "node": ">= 8.0.0" - }, - "peerDependencies": { - "rollup": "^2.38.3" - } - }, - "node_modules/@rollup/plugin-json": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.0.2.tgz", - "integrity": "sha512-t4zJMc98BdH42mBuzjhQA7dKh0t4vMJlUka6Fz0c+iO5IVnWaEMiYBy1uBj9ruHZzXBW23IPDGL9oCzBkQ9Udg==", - "dev": true, - "dependencies": { - "@rollup/pluginutils": "^3.0.4" - }, - "peerDependencies": { - "rollup": "^1.20.0" - } - }, - "node_modules/@rollup/plugin-node-resolve": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.3.0.tgz", - "integrity": "sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==", - "dev": true, - "dependencies": { - "@rollup/pluginutils": "^3.1.0", - "@types/resolve": "1.17.1", - "deepmerge": "^4.2.2", - "is-builtin-module": "^3.1.0", - "is-module": "^1.0.0", - "resolve": "^1.19.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "peerDependencies": { - "rollup": "^2.42.0" - } - }, - "node_modules/@rollup/plugin-typescript": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.2.3.tgz", - "integrity": "sha512-bSkd+DD3wP9OLU6lPet59B6jJF29/RlxHkbwvOVOcf1nk8eQYWw24HpldEdrPo/WG0QAPD7TqI7+2y5jtdqjww==", - "dev": true, - "dependencies": { - "@rollup/pluginutils": "^3.1.0", - "resolve": "^1.17.0" - }, - "engines": { - "node": ">=8.0.0" - }, - "peerDependencies": { - "rollup": "^2.14.0", - "tslib": "*", - "typescript": ">=3.7.0" - } - }, - "node_modules/@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", - "dev": true, - "dependencies": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" - }, - "engines": { - "node": ">= 8.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" - } - }, - "node_modules/@rollup/pluginutils/node_modules/estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true, - "peer": true - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, - "peer": true - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, - "peer": true - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", - "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", - "dev": true, - "peer": true - }, - "node_modules/@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, - "node_modules/@types/node": { - "version": "18.7.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.7.13.tgz", - "integrity": "sha512-46yIhxSe5xEaJZXWdIBP7GU4HDTG8/eo0qd9atdiL+lFpA03y8KS+lkTN834TWJj5767GbWv4n/P6efyTFt1Dw==", - "dev": true - }, - "node_modules/@types/prop-types": { - "version": "15.7.5", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "dev": true - }, - "node_modules/@types/react": { - "version": "18.0.17", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.17.tgz", - "integrity": "sha512-38ETy4tL+rn4uQQi7mB81G7V1g0u2ryquNmsVIOKUAEIDK+3CUjZ6rSRpdvS99dNBnkLFL83qfmtLacGOTIhwQ==", - "dev": true, - "dependencies": { - "@types/prop-types": "*", - "@types/scheduler": "*", - "csstype": "^3.0.2" - } - }, - "node_modules/@types/resolve": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", - "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/scheduler": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "dev": true - }, - "node_modules/acorn": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", - "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, - "peer": true - }, - "node_modules/babel-plugin-dynamic-import-node": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", - "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", - "dev": true, - "dependencies": { - "object.assign": "^4.1.0" - } - }, - "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.2.tgz", - "integrity": "sha512-LPnodUl3lS0/4wN3Rb+m+UK8s7lj2jcLRrjho4gLw+OJs+I4bvGXshINesY5xx/apM+biTnQ9reDI8yj+0M5+Q==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-define-polyfill-provider": "^0.3.2", - "semver": "^6.1.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.3.tgz", - "integrity": "sha512-zKsXDh0XjnrUEW0mxIHLfjBfnXSMr5Q/goMe/fxpQnLm07mcOZiIZHBNWCMx60HmdvjxfXcalac0tfFg0wqxyw==", - "dev": true, - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.2", - "core-js-compat": "^3.21.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.0.tgz", - "integrity": "sha512-RW1cnryiADFeHmfLS+WW/G431p1PsW5qdRdz0SDRi7TKcUgc7Oh/uXkT7MZ/+tGsT1BkczEAmD5XjUyJ5SWDTw==", - "dev": true, - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-preset-o": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/babel-preset-o/-/babel-preset-o-0.4.3.tgz", - "integrity": "sha512-mdjBHWCjtMeFLyHtjXPiyTUXI+rnKfwKEBNAfrVQfr3edYpK5/pXF5sFRUPG0sMqgCv3+C7B64wZe1m8TQadeA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", - "@babel/plugin-proposal-optional-chaining": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.0.0", - "@babel/preset-env": "^7.10.0", - "@babel/preset-react": "^7.9.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/browserslist": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz", - "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "dependencies": { - "caniuse-lite": "^1.0.30001370", - "electron-to-chromium": "^1.4.202", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.5" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/builtin-modules": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", - "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/bunchee": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/bunchee/-/bunchee-1.9.1.tgz", - "integrity": "sha512-kESj14ffRcv6MD88idJ7WZk4/A0b4d9bV7Hpq9YqufNwtW1iz5GLF3RvrQYgkXMsF1290W8fcNUz7lkcuLHwKw==", - "dev": true, - "dependencies": { - "@rollup/plugin-babel": "5.2.1", - "@rollup/plugin-commonjs": "21.1.0", - "@rollup/plugin-json": "4.0.2", - "@rollup/plugin-node-resolve": "13.3.0", - "@rollup/plugin-typescript": "8.2.3", - "arg": "5.0.0", - "babel-preset-o": "0.4.3", - "rollup": "2.74.1", - "rollup-plugin-preserve-shebang": "1.0.1", - "rollup-plugin-terser": "7.0.2", - "tslib": "2.3.0" - }, - "bin": { - "bunchee": "dist/cli.js" - }, - "peerDependencies": { - "typescript": ">= 3.7.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/bunchee/node_modules/arg": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.0.tgz", - "integrity": "sha512-4P8Zm2H+BRS+c/xX1LrHw0qKpEhdlZjLCgWy+d78T9vqa2Z2SiD2wMrYuWIAFy5IZUD7nnNXroRttz+0RzlrzQ==", - "dev": true - }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001384", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001384.tgz", - "integrity": "sha512-BBWt57kqWbc0GYZXb47wTXpmAgqr5LSibPzNjk/AWMdmJMQhLqOl3c/Kd4OAU/tu4NLfYkMx8Tlq3RVBkOBolQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - } - ] - }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, - "node_modules/core-js-compat": { - "version": "3.25.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.25.0.tgz", - "integrity": "sha512-extKQM0g8/3GjFx9US12FAgx8KJawB7RCQ5y8ipYLbmfzEzmFRWdDjIlxDx82g7ygcNG85qMVUSRyABouELdow==", - "dev": true, - "dependencies": { - "browserslist": "^4.21.3", - "semver": "7.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/core-js-compat/node_modules/semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, - "peer": true - }, - "node_modules/csstype": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", - "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", - "dev": true - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "dev": true, - "dependencies": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "peer": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.4.233", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.233.tgz", - "integrity": "sha512-ejwIKXTg1wqbmkcRJh9Ur3hFGHFDZDw1POzdsVrB2WZjgRuRMHIQQKNpe64N/qh3ZtH2otEoRoS+s6arAAuAAw==", - "dev": true - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", - "dev": true - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/is-builtin-module": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.0.tgz", - "integrity": "sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw==", - "dev": true, - "dependencies": { - "builtin-modules": "^3.3.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-core-module": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", - "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", - "dev": true - }, - "node_modules/is-reference": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", - "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", - "dev": true, - "dependencies": { - "@types/estree": "*" - } - }, - "node_modules/jest-worker": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", - "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/jest-worker/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", - "dev": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, - "peer": true - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", - "dev": true - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true - }, - "node_modules/regenerate-unicode-properties": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", - "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", - "dev": true, - "dependencies": { - "regenerate": "^1.4.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true - }, - "node_modules/regenerator-transform": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.0.tgz", - "integrity": "sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.8.4" - } - }, - "node_modules/regexpu-core": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.1.0.tgz", - "integrity": "sha512-bb6hk+xWd2PEOkj5It46A16zFMs2mv86Iwpdu94la4S3sJ7C973h2dHpYKwIBGaWSO7cIRJ+UX0IeMaWcO4qwA==", - "dev": true, - "dependencies": { - "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.0.1", - "regjsgen": "^0.6.0", - "regjsparser": "^0.8.2", - "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regjsgen": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", - "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==", - "dev": true - }, - "node_modules/regjsparser": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", - "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", - "dev": true, - "dependencies": { - "jsesc": "~0.5.0" - }, - "bin": { - "regjsparser": "bin/parser" - } - }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - } - }, - "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rollup": { - "version": "2.74.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.74.1.tgz", - "integrity": "sha512-K2zW7kV8Voua5eGkbnBtWYfMIhYhT9Pel2uhBk2WO5eMee161nPze/XRfvEQPFYz7KgrCCnmh2Wy0AMFLGGmMA==", - "dev": true, - "bin": { - "rollup": "dist/bin/rollup" - }, - "engines": { - "node": ">=10.0.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/rollup-plugin-preserve-shebang": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-preserve-shebang/-/rollup-plugin-preserve-shebang-1.0.1.tgz", - "integrity": "sha512-gk7ExGBqvUinhgrvldKHkAKXXwRkWMXMZymNkrtn50uBgHITlhRjhnKmbNGwAIc4Bzgl3yLv7/8Fhi/XeHhFKg==", - "dev": true, - "dependencies": { - "magic-string": "^0.25.7" - } - }, - "node_modules/rollup-plugin-terser": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", - "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.10.4", - "jest-worker": "^26.2.1", - "serialize-javascript": "^4.0.0", - "terser": "^5.0.0" - }, - "peerDependencies": { - "rollup": "^2.0.0" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "dev": true - }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/terser": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.0.tgz", - "integrity": "sha512-L1BJiXVmheAQQy+as0oF3Pwtlo4s3Wi1X2zNZ2NxOB4wx9bdS9Vk67XQENLFdLYGCK/Z2di53mTj/hBafR+dTA==", - "dev": true, - "dependencies": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dev": true, - "peer": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/tslib": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", - "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", - "dev": true - }, - "node_modules/ttypescript": { - "version": "1.5.13", - "resolved": "https://registry.npmjs.org/ttypescript/-/ttypescript-1.5.13.tgz", - "integrity": "sha512-KT/RBfGGlVJFqEI8cVvI3nMsmYcFvPSZh8bU0qX+pAwbi7/ABmYkzn7l/K8skw0xmYjVCoyaV6WLsBQxdadybQ==", - "dev": true, - "dependencies": { - "resolve": ">=1.9.0" - }, - "bin": { - "ttsc": "bin/tsc", - "ttsserver": "bin/tsserver" - }, - "peerDependencies": { - "ts-node": ">=8.0.2", - "typescript": ">=3.2.2" - } - }, - "node_modules/typescript": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", - "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/typescript-transform-paths": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/typescript-transform-paths/-/typescript-transform-paths-3.3.1.tgz", - "integrity": "sha512-c+8Cqd2rsRtTU68rJI0NX/OtqgBDddNs1fIxm1nCNyhn0WpoyqtpUxc1w9Ke5c5kgE4/OT5xYbKf2cf694RYEg==", - "dev": true, - "dependencies": { - "minimatch": "^3.0.4" - }, - "peerDependencies": { - "typescript": ">=3.6.5" - } - }, - "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", - "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", - "dev": true, - "dependencies": { - "unicode-canonical-property-names-ecmascript": "^2.0.0", - "unicode-property-aliases-ecmascript": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", - "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-property-aliases-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", - "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz", - "integrity": "sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "browserslist-lint": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, - "peer": true - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6" - } - } - }, - "dependencies": { - "@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", - "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", - "dev": true, - "requires": { - "@babel/highlight": "^7.18.6" - } - }, - "@babel/compat-data": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.13.tgz", - "integrity": "sha512-5yUzC5LqyTFp2HLmDoxGQelcdYgSpP9xsnMWBphAscOdFrHSAVbLNzWiy32sVNDqJRDiJK6klfDnAgu6PAGSHw==", - "dev": true - }, - "@babel/core": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.13.tgz", - "integrity": "sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==", - "dev": true, - "requires": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.13", - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-module-transforms": "^7.18.9", - "@babel/helpers": "^7.18.9", - "@babel/parser": "^7.18.13", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.18.13", - "@babel/types": "^7.18.13", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" - } - }, - "@babel/generator": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.13.tgz", - "integrity": "sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==", - "dev": true, - "requires": { - "@babel/types": "^7.18.13", - "@jridgewell/gen-mapping": "^0.3.2", - "jsesc": "^2.5.1" - }, - "dependencies": { - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - } - } - }, - "@babel/helper-annotate-as-pure": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", - "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz", - "integrity": "sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw==", - "dev": true, - "requires": { - "@babel/helper-explode-assignable-expression": "^7.18.6", - "@babel/types": "^7.18.9" - } - }, - "@babel/helper-compilation-targets": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz", - "integrity": "sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.18.8", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.20.2", - "semver": "^6.3.0" - } - }, - "@babel/helper-create-class-features-plugin": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.13.tgz", - "integrity": "sha512-hDvXp+QYxSRL+23mpAlSGxHMDyIGChm0/AwTfTAAK5Ufe40nCsyNdaYCGuK91phn/fVu9kqayImRDkvNAgdrsA==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-member-expression-to-functions": "^7.18.9", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.9", - "@babel/helper-split-export-declaration": "^7.18.6" - } - }, - "@babel/helper-create-regexp-features-plugin": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz", - "integrity": "sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "regexpu-core": "^5.1.0" - } - }, - "@babel/helper-define-polyfill-provider": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.2.tgz", - "integrity": "sha512-r9QJJ+uDWrd+94BSPcP6/de67ygLtvVy6cK4luE6MOuDsZIdoaPBnfSpbO/+LTifjPckbKXRuI9BB/Z2/y3iTg==", - "dev": true, - "requires": { - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" - } - }, - "@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", - "dev": true - }, - "@babel/helper-explode-assignable-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", - "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz", - "integrity": "sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A==", - "dev": true, - "requires": { - "@babel/template": "^7.18.6", - "@babel/types": "^7.18.9" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-member-expression-to-functions": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz", - "integrity": "sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==", - "dev": true, - "requires": { - "@babel/types": "^7.18.9" - } - }, - "@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-module-transforms": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz", - "integrity": "sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g==", - "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.9", - "@babel/types": "^7.18.9" - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", - "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz", - "integrity": "sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w==", - "dev": true - }, - "@babel/helper-remap-async-to-generator": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", - "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-wrap-function": "^7.18.9", - "@babel/types": "^7.18.9" - } - }, - "@babel/helper-replace-supers": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.18.9.tgz", - "integrity": "sha512-dNsWibVI4lNT6HiuOIBr1oyxo40HvIVmbwPUm3XZ7wMh4k2WxrxTqZwSqw/eEmXDS9np0ey5M2bz9tBmO9c+YQ==", - "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-member-expression-to-functions": "^7.18.9", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/traverse": "^7.18.9", - "@babel/types": "^7.18.9" - } - }, - "@babel/helper-simple-access": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", - "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz", - "integrity": "sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw==", - "dev": true, - "requires": { - "@babel/types": "^7.18.9" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-string-parser": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz", - "integrity": "sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==", - "dev": true - }, - "@babel/helper-validator-identifier": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", - "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", - "dev": true - }, - "@babel/helper-wrap-function": { - "version": "7.18.11", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.18.11.tgz", - "integrity": "sha512-oBUlbv+rjZLh2Ks9SKi4aL7eKaAXBWleHzU89mP0G6BMUlRxSckk9tSIkgDGydhgFxHuGSlBQZfnaD47oBEB7w==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.18.9", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.18.11", - "@babel/types": "^7.18.10" - } - }, - "@babel/helpers": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.9.tgz", - "integrity": "sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ==", - "dev": true, - "requires": { - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.9", - "@babel/types": "^7.18.9" - } - }, - "@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.13.tgz", - "integrity": "sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==", - "dev": true - }, - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", - "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.9.tgz", - "integrity": "sha512-AHrP9jadvH7qlOj6PINbgSuphjQUAK7AOT7DPjBo9EHoLhQTnnK5u45e1Hd4DbSQEO9nqPWtQ89r+XEOWFScKg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", - "@babel/plugin-proposal-optional-chaining": "^7.18.9" - } - }, - "@babel/plugin-proposal-async-generator-functions": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.18.10.tgz", - "integrity": "sha512-1mFuY2TOsR1hxbjCo4QL+qlIjV07p4H4EUYw2J/WCqsvFV6V9X9z9YhXbWndc/4fw+hYGlDT7egYxliMp5O6Ew==", - "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-remap-async-to-generator": "^7.18.9", - "@babel/plugin-syntax-async-generators": "^7.8.4" - } - }, - "@babel/plugin-proposal-class-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", - "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-proposal-class-static-block": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", - "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-class-static-block": "^7.14.5" - } - }, - "@babel/plugin-proposal-dynamic-import": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", - "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - } - }, - "@babel/plugin-proposal-export-namespace-from": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", - "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - } - }, - "@babel/plugin-proposal-json-strings": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", - "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3" - } - }, - "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.9.tgz", - "integrity": "sha512-128YbMpjCrP35IOExw2Fq+x55LMP42DzhOhX2aNNIdI9avSWl2PI0yuBWarr3RYpZBSPtabfadkH2yeRiMD61Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - } - }, - "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", - "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - } - }, - "@babel/plugin-proposal-numeric-separator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", - "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - } - }, - "@babel/plugin-proposal-object-rest-spread": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.9.tgz", - "integrity": "sha512-kDDHQ5rflIeY5xl69CEqGEZ0KY369ehsCIEbTGb4siHG5BE9sga/T0r0OUwyZNLMmZE79E1kbsqAjwFCW4ds6Q==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.18.8", - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.18.8" - } - }, - "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", - "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - } - }, - "@babel/plugin-proposal-optional-chaining": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.9.tgz", - "integrity": "sha512-v5nwt4IqBXihxGsW2QmCWMDS3B3bzGIk/EQVZz2ei7f3NJl8NzAJVvUmpDW5q1CRNY+Beb/k58UAH1Km1N411w==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - } - }, - "@babel/plugin-proposal-private-methods": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", - "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-proposal-private-property-in-object": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", - "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" - } - }, - "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", - "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } - }, - "@babel/plugin-syntax-import-assertions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.18.6.tgz", - "integrity": "sha512-/DU3RXad9+bZwrgWJQKbr39gYbJpLJHezqEzRzi/BHRlJ9zsQb4CK2CA/5apllXNomwA1qHwzvHl+AdEmC5krQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-jsx": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz", - "integrity": "sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } - }, - "@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "@babel/plugin-transform-arrow-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz", - "integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==", + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" } }, - "@babel/plugin-transform-async-to-generator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.18.6.tgz", - "integrity": "sha512-ARE5wZLKnTgPW7/1ftQmSi1CmkqqHo2DNmtztFhvgtOWSDfq0Cq9/9L+KnZNYSNrydBekhW3rwShduf59RoXag==", + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-remap-async-to-generator": "^7.18.6" + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" } }, - "@babel/plugin-transform-block-scoped-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", - "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, - "@babel/plugin-transform-block-scoping": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.9.tgz", - "integrity": "sha512-5sDIJRV1KtQVEbt/EIBwGy4T01uYIo4KRB3VUqzkhrAIOGx7AoctL9+Ux88btY0zXdDyPJ9mW+bg+v+XEkGmtw==", + "node_modules/is-builtin-module": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.0.tgz", + "integrity": "sha512-phDA4oSGt7vl1n5tJvTWooWWAsXLY+2xCnxNqvKhGEzujg+A43wPlPOyDg3C8XQHN+6k/JTQWJ/j0dQh/qr+Hw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "dependencies": { + "builtin-modules": "^3.3.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "@babel/plugin-transform-classes": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.9.tgz", - "integrity": "sha512-EkRQxsxoytpTlKJmSPYrsOMjCILacAjtSVkd4gChEe2kXjFCun3yohhW5I7plXJhCemM0gKsaGMcO8tinvCA5g==", + "node_modules/is-core-module": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-replace-supers": "^7.18.9", - "@babel/helper-split-export-declaration": "^7.18.6", - "globals": "^11.1.0" + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "@babel/plugin-transform-computed-properties": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.9.tgz", - "integrity": "sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9" - } + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "dev": true }, - "@babel/plugin-transform-destructuring": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.13.tgz", - "integrity": "sha512-TodpQ29XekIsex2A+YJPj5ax2plkGa8YYY6mFjCohk/IG9IY42Rtuj1FuDeemfg2ipxIFLzPeA83SIBnlhSIow==", + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "dependencies": { + "@types/estree": "*" } }, - "@babel/plugin-transform-dotall-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", - "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "engines": { + "node": ">=10" } }, - "@babel/plugin-transform-duplicate-keys": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", - "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9" - } + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, - "@babel/plugin-transform-exponentiation-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", - "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", - "dev": true, - "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" - } + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true }, - "@babel/plugin-transform-for-of": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz", - "integrity": "sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" } }, - "@babel/plugin-transform-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz", - "integrity": "sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==", - "dev": true, - "requires": { - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9" - } + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true }, - "@babel/plugin-transform-literals": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz", - "integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==", + "node_modules/magic-string": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "dependencies": { + "sourcemap-codec": "^1.4.8" } }, - "@babel/plugin-transform-member-expression-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", - "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } + "peer": true }, - "@babel/plugin-transform-modules-amd": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz", - "integrity": "sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg==", + "node_modules/marked": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.1.1.tgz", + "integrity": "sha512-0cNMnTcUJPxbA6uWmCmjWz4NJRe/0Xfk2NhXCUHjew9qJzFN20krFnsUe7QynwqOwa5m1fZ4UDg0ycKFVC0ccw==", "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "babel-plugin-dynamic-import-node": "^2.3.3" + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" } }, - "@babel/plugin-transform-modules-commonjs": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz", - "integrity": "sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q==", + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "babel-plugin-dynamic-import-node": "^2.3.3" + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "@babel/plugin-transform-modules-systemjs": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.9.tgz", - "integrity": "sha512-zY/VSIbbqtoRoJKo2cDTewL364jSlZGvn0LKOf9ntbfxOvjfmyrdtEEOAdswOswhZEb8UH3jDkCKHd1sPgsS0A==", + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, - "requires": { - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-module-transforms": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-validator-identifier": "^7.18.6", - "babel-plugin-dynamic-import-node": "^2.3.3" + "dependencies": { + "wrappy": "1" } }, - "@babel/plugin-transform-modules-umd": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", - "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "engines": { + "node": ">=0.10.0" } }, - "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz", - "integrity": "sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg==", + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "@babel/plugin-transform-new-target": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", - "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "node_modules/react": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "@babel/plugin-transform-object-super": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", - "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", + "node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.6" + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "@babel/plugin-transform-parameters": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.8.tgz", - "integrity": "sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg==", + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "@babel/plugin-transform-property-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", - "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", + "node_modules/rollup": { + "version": "2.74.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.74.1.tgz", + "integrity": "sha512-K2zW7kV8Voua5eGkbnBtWYfMIhYhT9Pel2uhBk2WO5eMee161nPze/XRfvEQPFYz7KgrCCnmh2Wy0AMFLGGmMA==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "@babel/plugin-transform-react-display-name": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz", - "integrity": "sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA==", + "node_modules/rollup-plugin-preserve-shebang": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-preserve-shebang/-/rollup-plugin-preserve-shebang-1.0.1.tgz", + "integrity": "sha512-gk7ExGBqvUinhgrvldKHkAKXXwRkWMXMZymNkrtn50uBgHITlhRjhnKmbNGwAIc4Bzgl3yLv7/8Fhi/XeHhFKg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "dependencies": { + "magic-string": "^0.25.7" } }, - "@babel/plugin-transform-react-jsx": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.18.10.tgz", - "integrity": "sha512-gCy7Iikrpu3IZjYZolFE4M1Sm+nrh1/6za2Ewj77Z+XirT4TsbJcvOFOyF+fRPwU6AKKK136CZxx6L8AbSFG6A==", + "node_modules/rollup-plugin-swc3": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-swc3/-/rollup-plugin-swc3-0.4.1.tgz", + "integrity": "sha512-+dB5AJlVjyTTXWgpyhp07vGtv3CLLkvXUS6Y1kABRac7gEpMEfLW70+W0tGyPAeMIs2iQgputMt8eVjNToVfJQ==", "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-jsx": "^7.18.6", - "@babel/types": "^7.18.10" + "dependencies": { + "@rollup/pluginutils": "^4.2.1", + "deepmerge": "^4.2.2", + "joycon": "^3.1.1", + "jsonc-parser": "^3.0.0", + "typedoc": "^0.22.15" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "@swc/core": ">=1.2.165", + "rollup": "^2.0.0" } }, - "@babel/plugin-transform-react-jsx-development": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz", - "integrity": "sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA==", + "node_modules/rollup-plugin-swc3/node_modules/@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", "dev": true, - "requires": { - "@babel/plugin-transform-react-jsx": "^7.18.6" + "dependencies": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" } }, - "@babel/plugin-transform-react-pure-annotations": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.6.tgz", - "integrity": "sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ==", + "node_modules/rollup-plugin-swc3/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "dependencies": { + "balanced-match": "^1.0.0" } }, - "@babel/plugin-transform-regenerator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", - "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", + "node_modules/rollup-plugin-swc3/node_modules/glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "regenerator-transform": "^0.15.0" + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "@babel/plugin-transform-reserved-words": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", - "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", + "node_modules/rollup-plugin-swc3/node_modules/minimatch": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", + "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" } }, - "@babel/plugin-transform-runtime": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.10.tgz", - "integrity": "sha512-q5mMeYAdfEbpBAgzl7tBre/la3LeCxmDO1+wMXRdPWbcoMjR3GiXlCLk7JBZVVye0bqTGNMbt0yYVXX1B1jEWQ==", + "node_modules/rollup-plugin-swc3/node_modules/typedoc": { + "version": "0.22.18", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.18.tgz", + "integrity": "sha512-NK9RlLhRUGMvc6Rw5USEYgT4DVAUFk7IF7Q6MYfpJ88KnTZP7EneEa4RcP+tX1auAcz7QT1Iy0bUSZBYYHdoyA==", "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.9", - "babel-plugin-polyfill-corejs2": "^0.3.2", - "babel-plugin-polyfill-corejs3": "^0.5.3", - "babel-plugin-polyfill-regenerator": "^0.4.0", - "semver": "^6.3.0" + "dependencies": { + "glob": "^8.0.3", + "lunr": "^2.3.9", + "marked": "^4.0.16", + "minimatch": "^5.1.0", + "shiki": "^0.10.1" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 12.10.0" + }, + "peerDependencies": { + "typescript": "4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x || 4.6.x || 4.7.x" } }, - "@babel/plugin-transform-shorthand-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", - "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", + "node_modules/rollup-plugin-swc3/node_modules/typescript": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" } }, - "@babel/plugin-transform-spread": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.9.tgz", - "integrity": "sha512-39Q814wyoOPtIB/qGopNIL9xDChOE1pNU0ZY5dO0owhiVt/5kFm4li+/bBtwc7QotG0u5EPzqhZdjMtmqBqyQA==", + "node_modules/shiki": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.1.tgz", + "integrity": "sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-skip-transparent-expression-wrappers": "^7.18.9" + "dependencies": { + "jsonc-parser": "^3.0.0", + "vscode-oniguruma": "^1.6.1", + "vscode-textmate": "5.2.0" } }, - "@babel/plugin-transform-sticky-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", - "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6" - } + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true }, - "@babel/plugin-transform-template-literals": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz", - "integrity": "sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==", + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "@babel/plugin-transform-typeof-symbol": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", - "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9" + "peer": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } } }, - "@babel/plugin-transform-unicode-escapes": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", - "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.9" - } + "node_modules/tslib": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", + "dev": true }, - "@babel/plugin-transform-unicode-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", - "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", + "node_modules/ttypescript": { + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/ttypescript/-/ttypescript-1.5.13.tgz", + "integrity": "sha512-KT/RBfGGlVJFqEI8cVvI3nMsmYcFvPSZh8bU0qX+pAwbi7/ABmYkzn7l/K8skw0xmYjVCoyaV6WLsBQxdadybQ==", "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "dependencies": { + "resolve": ">=1.9.0" + }, + "bin": { + "ttsc": "bin/tsc", + "ttsserver": "bin/tsserver" + }, + "peerDependencies": { + "ts-node": ">=8.0.2", + "typescript": ">=3.2.2" } }, - "@babel/preset-env": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.10.tgz", - "integrity": "sha512-wVxs1yjFdW3Z/XkNfXKoblxoHgbtUF7/l3PvvP4m02Qz9TZ6uZGxRVYjSQeR87oQmHco9zWitW5J82DJ7sCjvA==", + "node_modules/typescript": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", "dev": true, - "requires": { - "@babel/compat-data": "^7.18.8", - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/helper-validator-option": "^7.18.6", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-async-generator-functions": "^7.18.10", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-class-static-block": "^7.18.6", - "@babel/plugin-proposal-dynamic-import": "^7.18.6", - "@babel/plugin-proposal-export-namespace-from": "^7.18.9", - "@babel/plugin-proposal-json-strings": "^7.18.6", - "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", - "@babel/plugin-proposal-numeric-separator": "^7.18.6", - "@babel/plugin-proposal-object-rest-spread": "^7.18.9", - "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", - "@babel/plugin-proposal-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-private-methods": "^7.18.6", - "@babel/plugin-proposal-private-property-in-object": "^7.18.6", - "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.18.6", - "@babel/plugin-transform-async-to-generator": "^7.18.6", - "@babel/plugin-transform-block-scoped-functions": "^7.18.6", - "@babel/plugin-transform-block-scoping": "^7.18.9", - "@babel/plugin-transform-classes": "^7.18.9", - "@babel/plugin-transform-computed-properties": "^7.18.9", - "@babel/plugin-transform-destructuring": "^7.18.9", - "@babel/plugin-transform-dotall-regex": "^7.18.6", - "@babel/plugin-transform-duplicate-keys": "^7.18.9", - "@babel/plugin-transform-exponentiation-operator": "^7.18.6", - "@babel/plugin-transform-for-of": "^7.18.8", - "@babel/plugin-transform-function-name": "^7.18.9", - "@babel/plugin-transform-literals": "^7.18.9", - "@babel/plugin-transform-member-expression-literals": "^7.18.6", - "@babel/plugin-transform-modules-amd": "^7.18.6", - "@babel/plugin-transform-modules-commonjs": "^7.18.6", - "@babel/plugin-transform-modules-systemjs": "^7.18.9", - "@babel/plugin-transform-modules-umd": "^7.18.6", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.18.6", - "@babel/plugin-transform-new-target": "^7.18.6", - "@babel/plugin-transform-object-super": "^7.18.6", - "@babel/plugin-transform-parameters": "^7.18.8", - "@babel/plugin-transform-property-literals": "^7.18.6", - "@babel/plugin-transform-regenerator": "^7.18.6", - "@babel/plugin-transform-reserved-words": "^7.18.6", - "@babel/plugin-transform-shorthand-properties": "^7.18.6", - "@babel/plugin-transform-spread": "^7.18.9", - "@babel/plugin-transform-sticky-regex": "^7.18.6", - "@babel/plugin-transform-template-literals": "^7.18.9", - "@babel/plugin-transform-typeof-symbol": "^7.18.9", - "@babel/plugin-transform-unicode-escapes": "^7.18.10", - "@babel/plugin-transform-unicode-regex": "^7.18.6", - "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.18.10", - "babel-plugin-polyfill-corejs2": "^0.3.2", - "babel-plugin-polyfill-corejs3": "^0.5.3", - "babel-plugin-polyfill-regenerator": "^0.4.0", - "core-js-compat": "^3.22.1", - "semver": "^6.3.0" + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" } }, - "@babel/preset-modules": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", - "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "node_modules/typescript-transform-paths": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/typescript-transform-paths/-/typescript-transform-paths-3.3.1.tgz", + "integrity": "sha512-c+8Cqd2rsRtTU68rJI0NX/OtqgBDddNs1fIxm1nCNyhn0WpoyqtpUxc1w9Ke5c5kgE4/OT5xYbKf2cf694RYEg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" + "dependencies": { + "minimatch": "^3.0.4" + }, + "peerDependencies": { + "typescript": ">=3.6.5" } }, - "@babel/preset-react": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.18.6.tgz", - "integrity": "sha512-zXr6atUmyYdiWRVLOZahakYmOBHtWc2WGCkP8PYTgZi0iJXDY2CN180TdrIW4OGOAdLc7TifzDIvtx6izaRIzg==", + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-validator-option": "^7.18.6", - "@babel/plugin-transform-react-display-name": "^7.18.6", - "@babel/plugin-transform-react-jsx": "^7.18.6", - "@babel/plugin-transform-react-jsx-development": "^7.18.6", - "@babel/plugin-transform-react-pure-annotations": "^7.18.6" - } + "peer": true }, - "@babel/runtime": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.9.tgz", - "integrity": "sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.4" - } + "node_modules/vscode-oniguruma": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", + "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==", + "dev": true }, - "@babel/template": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", - "integrity": "sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.18.10", - "@babel/types": "^7.18.10" - } + "node_modules/vscode-textmate": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", + "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", + "dev": true }, - "@babel/traverse": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.13.tgz", - "integrity": "sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.13", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.18.13", - "@babel/types": "^7.18.13", - "debug": "^4.1.0", - "globals": "^11.1.0" - } + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true }, - "@babel/types": { - "version": "7.18.13", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.13.tgz", - "integrity": "sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==", + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.18.10", - "@babel/helper-validator-identifier": "^7.18.6", - "to-fast-properties": "^2.0.0" + "peer": true, + "engines": { + "node": ">=6" } - }, + } + }, + "dependencies": { "@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -4451,81 +1248,35 @@ "@jridgewell/trace-mapping": "0.3.9" } }, - "@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, "@jridgewell/resolve-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true - }, - "@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "dependencies": { - "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - } - } + "peer": true }, "@jridgewell/sourcemap-codec": { "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "dev": true, + "peer": true }, "@jridgewell/trace-mapping": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, + "peer": true, "requires": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "@rollup/plugin-babel": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.2.1.tgz", - "integrity": "sha512-Jd7oqFR2dzZJ3NWANDyBjwTtX/lYbZpVcmkHrfQcpvawHs9E4c0nYk5U2mfZ6I/DZcIvy506KZJi54XK/jxH7A==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.10.4", - "@rollup/pluginutils": "^3.1.0" - } - }, "@rollup/plugin-commonjs": { - "version": "21.1.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-21.1.0.tgz", - "integrity": "sha512-6ZtHx3VHIp2ReNNDxHjuUml6ur+WcQ28N1yHgCQwsbNkQg2suhxGMDQGJOn/KuDxKtd1xuZP5xSTwBA4GQ8hbA==", + "version": "22.0.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.2.tgz", + "integrity": "sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -4538,12 +1289,12 @@ } }, "@rollup/plugin-json": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.0.2.tgz", - "integrity": "sha512-t4zJMc98BdH42mBuzjhQA7dKh0t4vMJlUka6Fz0c+iO5IVnWaEMiYBy1uBj9ruHZzXBW23IPDGL9oCzBkQ9Udg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-4.1.0.tgz", + "integrity": "sha512-yfLbTdNS6amI/2OpmbiBoW12vngr5NW2jCJVZSBEz+H5KfUJZ2M7sDjk0U6GOOdCWFVScShte29o9NezJ53TPw==", "dev": true, "requires": { - "@rollup/pluginutils": "^3.0.4" + "@rollup/pluginutils": "^3.0.8" } }, "@rollup/plugin-node-resolve": { @@ -4561,34 +1312,216 @@ } }, "@rollup/plugin-typescript": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.2.3.tgz", - "integrity": "sha512-bSkd+DD3wP9OLU6lPet59B6jJF29/RlxHkbwvOVOcf1nk8eQYWw24HpldEdrPo/WG0QAPD7TqI7+2y5jtdqjww==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.4.0.tgz", + "integrity": "sha512-QssfoOP6V4/6skX12EfOW5UzJAv/c334F4OJWmQpe2kg3agEa0JwVCckwmfuvEgDixyX+XyxjFenH7M2rDKUyQ==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", "resolve": "^1.17.0" } }, - "@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "dependencies": { + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + } + } + }, + "@swc/core": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.3.4.tgz", + "integrity": "sha512-W1AvQImfF2T+7dzWdg/GqFpcMJ24lyXGQ/kPKHL/FGPZbf0Q1ExD7wp3eQ2PQMgHTLe28qWonxicm2DPfprx3g==", + "dev": true, + "requires": { + "@swc/core-android-arm-eabi": "1.3.4", + "@swc/core-android-arm64": "1.3.4", + "@swc/core-darwin-arm64": "1.3.4", + "@swc/core-darwin-x64": "1.3.4", + "@swc/core-freebsd-x64": "1.3.4", + "@swc/core-linux-arm-gnueabihf": "1.3.4", + "@swc/core-linux-arm64-gnu": "1.3.4", + "@swc/core-linux-arm64-musl": "1.3.4", + "@swc/core-linux-x64-gnu": "1.3.4", + "@swc/core-linux-x64-musl": "1.3.4", + "@swc/core-win32-arm64-msvc": "1.3.4", + "@swc/core-win32-ia32-msvc": "1.3.4", + "@swc/core-win32-x64-msvc": "1.3.4" + } + }, + "@swc/core-android-arm-eabi": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-android-arm-eabi/-/core-android-arm-eabi-1.3.4.tgz", + "integrity": "sha512-aq+CAebSQMtdrIR4+v/JBfykK/daD+so2gPHm4wgLaTR+xwziQAsBBI5iq5sinhIg4FGnmljtO75QolcNLmpvw==", + "dev": true, + "optional": true, + "requires": { + "@swc/wasm": "1.2.122" + } + }, + "@swc/core-android-arm64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-android-arm64/-/core-android-arm64-1.3.4.tgz", + "integrity": "sha512-E5z6ribiEzDqrq5Kv5xOLdWcTzHWlzGuqDSxTQNz9GCC94qSVzXp5Df+egVEKE/4t7u2P6nO46BUKweYMb9TJg==", + "dev": true, + "optional": true, + "requires": { + "@swc/wasm": "1.2.130" + }, + "dependencies": { + "@swc/wasm": { + "version": "1.2.130", + "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", + "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", + "dev": true, + "optional": true + } + } + }, + "@swc/core-darwin-arm64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.4.tgz", + "integrity": "sha512-JNBFQKtaUdsq0Sv6N29++Q6xrvZDn1bQ7pbMvr8t7kBNXaYCDmupbwPGT725MrGVs72N4qKee5Z0OIvmnLCQfw==", + "dev": true, + "optional": true + }, + "@swc/core-darwin-x64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.3.4.tgz", + "integrity": "sha512-A6KMZsUJ3j5TVxAizbv+UEjCNvMgWBm9jw4R3biaw8kbgu3XUWHdkiheXO+c2kjjjgwr1jhkHcLgRjffwpLYFA==", + "dev": true, + "optional": true + }, + "@swc/core-freebsd-x64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-freebsd-x64/-/core-freebsd-x64-1.3.4.tgz", + "integrity": "sha512-C5FCXHebcHwPJtEhgRShumXvcdPO5Cqiwd7GDNBav1IZribs3+ZqrTkCaz2hY7gb5NvyFIxkJ5HhpS4Pxafhuw==", + "dev": true, + "optional": true, + "requires": { + "@swc/wasm": "1.2.130" + }, + "dependencies": { + "@swc/wasm": { + "version": "1.2.130", + "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", + "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", + "dev": true, + "optional": true + } + } + }, + "@swc/core-linux-arm-gnueabihf": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.4.tgz", + "integrity": "sha512-vawHUhUcS//xNvGzL0zZ3vZ1YnsjgyvWQXB5PF4bhM5Y0/rmcrEdpkSId1qTfaMpcL7l2QSy9/DM7ucjlSpK6w==", + "dev": true, + "optional": true, + "requires": { + "@swc/wasm": "1.2.130" + }, + "dependencies": { + "@swc/wasm": { + "version": "1.2.130", + "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", + "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", + "dev": true, + "optional": true + } + } + }, + "@swc/core-linux-arm64-gnu": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.4.tgz", + "integrity": "sha512-p60RoYaDS8zrqp/cGkcJryk9HobJvrL+Ox/iz8ivDrV4IS0LXvqW5/5YTSzLo93/+blvG/M0hdaokoMhWhDnwA==", + "dev": true, + "optional": true + }, + "@swc/core-linux-arm64-musl": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.4.tgz", + "integrity": "sha512-F9hW6g5l4YesJJH/JMznaLGdLeCV4FKq5MN5DaZfuB8qrCZGLmAasGgvSNbXh1oZnDu1PD2ZxMYivkf2n8/4OA==", + "dev": true, + "optional": true + }, + "@swc/core-linux-x64-gnu": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.4.tgz", + "integrity": "sha512-rRqDtxktiVaxO8NQeEZSX0kNSFkI5Ft+4fZcFTbWhDO0vknC0+ZYbWpverfQ8yAwo7aA9jKWupwc3I7iZ1EQQQ==", + "dev": true, + "optional": true + }, + "@swc/core-linux-x64-musl": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.4.tgz", + "integrity": "sha512-stVnU7KXQxSbh67UiIVxZsgjkRSXApPTEU3CYnwsdH7G+ynfO1WocSatzjIKpJfhcY2Nss8/33yDaOKZXVhbIA==", + "dev": true, + "optional": true + }, + "@swc/core-win32-arm64-msvc": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.4.tgz", + "integrity": "sha512-qc3UIdAQfLTA1mJsFkX3ISqJDU02qtcjUbnLI8sl6oedCAOFF66TcecJvwl4iO+BTO04+KoZc5rJovSTOb3eQA==", + "dev": true, + "optional": true, + "requires": { + "@swc/wasm": "1.2.130" + }, + "dependencies": { + "@swc/wasm": { + "version": "1.2.130", + "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", + "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", + "dev": true, + "optional": true + } + } + }, + "@swc/core-win32-ia32-msvc": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.4.tgz", + "integrity": "sha512-FxuDGn60VrnYBcpH0CeR9+pCnPUaVvZ20CO6o/oNYHSfIhqPc76o3zFYYEFswYodExjCCYwsuPYgi+stvKZroA==", "dev": true, + "optional": true, "requires": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" + "@swc/wasm": "1.2.130" }, "dependencies": { - "estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true + "@swc/wasm": { + "version": "1.2.130", + "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.130.tgz", + "integrity": "sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==", + "dev": true, + "optional": true } } }, + "@swc/core-win32-x64-msvc": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.4.tgz", + "integrity": "sha512-9/bSvgjV31u1G2slRFPgK85ohJdo8KtWJ0f4CPp2LdVtIJHbFGd0pWjnMfiPJeodSxSGGWrgUNQtajqIIsrbqA==", + "dev": true, + "optional": true + }, + "@swc/wasm": { + "version": "1.2.122", + "resolved": "https://registry.npmjs.org/@swc/wasm/-/wasm-1.2.122.tgz", + "integrity": "sha512-sM1VCWQxmNhFtdxME+8UXNyPNhxNu7zdb6ikWpz0YKAQQFRGT5ThZgJrubEpah335SUToNg8pkdDF7ibVCjxbQ==", + "dev": true, + "optional": true + }, "@tsconfig/node10": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", @@ -4636,9 +1569,9 @@ "dev": true }, "@types/react": { - "version": "18.0.17", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.17.tgz", - "integrity": "sha512-38ETy4tL+rn4uQQi7mB81G7V1g0u2ryquNmsVIOKUAEIDK+3CUjZ6rSRpdvS99dNBnkLFL83qfmtLacGOTIhwQ==", + "version": "18.0.21", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.21.tgz", + "integrity": "sha512-7QUCOxvFgnD5Jk8ZKlUAhVcRj7GuJRjnjjiY/IUBWKgOlnvDvTMLD4RTF7NPyVmbRhNrbomZiOepg7M/2Kj1mA==", "dev": true, "requires": { "@types/prop-types": "*", @@ -4665,7 +1598,8 @@ "version": "8.8.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true + "dev": true, + "peer": true }, "acorn-walk": { "version": "8.2.0", @@ -4674,15 +1608,6 @@ "dev": true, "peer": true }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, "arg": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", @@ -4690,60 +1615,6 @@ "dev": true, "peer": true }, - "babel-plugin-dynamic-import-node": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", - "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", - "dev": true, - "requires": { - "object.assign": "^4.1.0" - } - }, - "babel-plugin-polyfill-corejs2": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.2.tgz", - "integrity": "sha512-LPnodUl3lS0/4wN3Rb+m+UK8s7lj2jcLRrjho4gLw+OJs+I4bvGXshINesY5xx/apM+biTnQ9reDI8yj+0M5+Q==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-define-polyfill-provider": "^0.3.2", - "semver": "^6.1.1" - } - }, - "babel-plugin-polyfill-corejs3": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.3.tgz", - "integrity": "sha512-zKsXDh0XjnrUEW0mxIHLfjBfnXSMr5Q/goMe/fxpQnLm07mcOZiIZHBNWCMx60HmdvjxfXcalac0tfFg0wqxyw==", - "dev": true, - "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.2", - "core-js-compat": "^3.21.0" - } - }, - "babel-plugin-polyfill-regenerator": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.0.tgz", - "integrity": "sha512-RW1cnryiADFeHmfLS+WW/G431p1PsW5qdRdz0SDRi7TKcUgc7Oh/uXkT7MZ/+tGsT1BkczEAmD5XjUyJ5SWDTw==", - "dev": true, - "requires": { - "@babel/helper-define-polyfill-provider": "^0.3.2" - } - }, - "babel-preset-o": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/babel-preset-o/-/babel-preset-o-0.4.3.tgz", - "integrity": "sha512-mdjBHWCjtMeFLyHtjXPiyTUXI+rnKfwKEBNAfrVQfr3edYpK5/pXF5sFRUPG0sMqgCv3+C7B64wZe1m8TQadeA==", - "dev": true, - "requires": { - "@babel/core": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", - "@babel/plugin-proposal-optional-chaining": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.0.0", - "@babel/preset-env": "^7.10.0", - "@babel/preset-react": "^7.9.0" - } - }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -4760,24 +1631,6 @@ "concat-map": "0.0.1" } }, - "browserslist": { - "version": "4.21.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz", - "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001370", - "electron-to-chromium": "^1.4.202", - "node-releases": "^2.0.6", - "update-browserslist-db": "^1.0.5" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, "builtin-modules": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", @@ -4785,22 +1638,21 @@ "dev": true }, "bunchee": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/bunchee/-/bunchee-1.9.1.tgz", - "integrity": "sha512-kESj14ffRcv6MD88idJ7WZk4/A0b4d9bV7Hpq9YqufNwtW1iz5GLF3RvrQYgkXMsF1290W8fcNUz7lkcuLHwKw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/bunchee/-/bunchee-2.0.1.tgz", + "integrity": "sha512-98MRlMVSwlJy1kqwWeGG9vbZ0/99tX43pIMl+J3CV4Pbz9mVQdyy+JqbIpVoIJHcfzaTxw/POcXRonCHhjNvUg==", "dev": true, "requires": { - "@rollup/plugin-babel": "5.2.1", - "@rollup/plugin-commonjs": "21.1.0", - "@rollup/plugin-json": "4.0.2", + "@rollup/plugin-commonjs": "22.0.2", + "@rollup/plugin-json": "4.1.0", "@rollup/plugin-node-resolve": "13.3.0", - "@rollup/plugin-typescript": "8.2.3", + "@rollup/plugin-typescript": "8.4.0", + "@swc/core": "^1.2.244", "arg": "5.0.0", - "babel-preset-o": "0.4.3", "rollup": "2.74.1", "rollup-plugin-preserve-shebang": "1.0.1", - "rollup-plugin-terser": "7.0.2", - "tslib": "2.3.0" + "rollup-plugin-swc3": "0.4.1", + "tslib": "2.4.0" }, "dependencies": { "arg": { @@ -4811,54 +1663,6 @@ } } }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "caniuse-lite": { - "version": "1.0.30001384", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001384.tgz", - "integrity": "sha512-BBWt57kqWbc0GYZXb47wTXpmAgqr5LSibPzNjk/AWMdmJMQhLqOl3c/Kd4OAU/tu4NLfYkMx8Tlq3RVBkOBolQ==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -4871,33 +1675,6 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, - "convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "core-js-compat": { - "version": "3.25.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.25.0.tgz", - "integrity": "sha512-extKQM0g8/3GjFx9US12FAgx8KJawB7RCQ5y8ipYLbmfzEzmFRWdDjIlxDx82g7ygcNG85qMVUSRyABouELdow==", - "dev": true, - "requires": { - "browserslist": "^4.21.3", - "semver": "7.0.0" - }, - "dependencies": { - "semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true - } - } - }, "create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -4911,31 +1688,12 @@ "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", "dev": true }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "deepmerge": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true }, - "define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "dev": true, - "requires": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - } - }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -4943,36 +1701,12 @@ "dev": true, "peer": true }, - "electron-to-chromium": { - "version": "1.4.233", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.233.tgz", - "integrity": "sha512-ejwIKXTg1wqbmkcRJh9Ur3hFGHFDZDw1POzdsVrB2WZjgRuRMHIQQKNpe64N/qh3ZtH2otEoRoS+s6arAAuAAw==", - "dev": true - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, "estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "dev": true }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -4992,23 +1726,6 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true - }, - "get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - } - }, "glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -5023,12 +1740,6 @@ "path-is-absolute": "^1.0.0" } }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -5038,27 +1749,6 @@ "function-bind": "^1.1.1" } }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.1" - } - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -5108,55 +1798,21 @@ "@types/estree": "*" } }, - "jest-worker": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", - "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } + "joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", - "dev": true - }, - "lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", "dev": true }, "loose-envify": { @@ -5167,6 +1823,12 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, + "lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true + }, "magic-string": { "version": "0.25.9", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", @@ -5183,10 +1845,10 @@ "dev": true, "peer": true }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "marked": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.1.1.tgz", + "integrity": "sha512-0cNMnTcUJPxbA6uWmCmjWz4NJRe/0Xfk2NhXCUHjew9qJzFN20krFnsUe7QynwqOwa5m1fZ4UDg0ycKFVC0ccw==", "dev": true }, "minimatch": { @@ -5198,36 +1860,6 @@ "brace-expansion": "^1.1.7" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node-releases": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz", - "integrity": "sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==", - "dev": true - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - } - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -5249,27 +1881,12 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, "picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, "react": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", @@ -5278,73 +1895,6 @@ "loose-envify": "^1.1.0" } }, - "regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true - }, - "regenerate-unicode-properties": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz", - "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==", - "dev": true, - "requires": { - "regenerate": "^1.4.2" - } - }, - "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true - }, - "regenerator-transform": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.0.tgz", - "integrity": "sha512-LsrGtPmbYg19bcPHwdtmXwbW+TqNvtY4riE3P83foeHRroMbH6/2ddFBfab3t7kbzc7v7p4wbkIecHImqt0QNg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.8.4" - } - }, - "regexpu-core": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.1.0.tgz", - "integrity": "sha512-bb6hk+xWd2PEOkj5It46A16zFMs2mv86Iwpdu94la4S3sJ7C973h2dHpYKwIBGaWSO7cIRJ+UX0IeMaWcO4qwA==", - "dev": true, - "requires": { - "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.0.1", - "regjsgen": "^0.6.0", - "regjsparser": "^0.8.2", - "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.0.0" - } - }, - "regjsgen": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz", - "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA==", - "dev": true - }, - "regjsparser": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz", - "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", - "dev": true - } - } - }, "resolve": { "version": "1.22.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", @@ -5383,53 +1933,91 @@ "magic-string": "^0.25.7" } }, - "rollup-plugin-terser": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", - "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "jest-worker": "^26.2.1", - "serialize-javascript": "^4.0.0", - "terser": "^5.0.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "rollup-plugin-swc3": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-swc3/-/rollup-plugin-swc3-0.4.1.tgz", + "integrity": "sha512-+dB5AJlVjyTTXWgpyhp07vGtv3CLLkvXUS6Y1kABRac7gEpMEfLW70+W0tGyPAeMIs2iQgputMt8eVjNToVfJQ==", "dev": true, "requires": { - "randombytes": "^2.1.0" + "@rollup/pluginutils": "^4.2.1", + "deepmerge": "^4.2.2", + "joycon": "^3.1.1", + "jsonc-parser": "^3.0.0", + "typedoc": "^0.22.15" + }, + "dependencies": { + "@rollup/pluginutils": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", + "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", + "dev": true, + "requires": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + } + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "glob": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", + "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + } + }, + "minimatch": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", + "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "typedoc": { + "version": "0.22.18", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.18.tgz", + "integrity": "sha512-NK9RlLhRUGMvc6Rw5USEYgT4DVAUFk7IF7Q6MYfpJ88KnTZP7EneEa4RcP+tX1auAcz7QT1Iy0bUSZBYYHdoyA==", + "dev": true, + "requires": { + "glob": "^8.0.3", + "lunr": "^2.3.9", + "marked": "^4.0.16", + "minimatch": "^5.1.0", + "shiki": "^0.10.1" + } + }, + "typescript": { + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "dev": true, + "peer": true + } } }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "shiki": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.1.tgz", + "integrity": "sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "jsonc-parser": "^3.0.0", + "vscode-oniguruma": "^1.6.1", + "vscode-textmate": "5.2.0" } }, "sourcemap-codec": { @@ -5438,39 +2026,12 @@ "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", "dev": true }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, "supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, - "terser": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.0.tgz", - "integrity": "sha512-L1BJiXVmheAQQy+as0oF3Pwtlo4s3Wi1X2zNZ2NxOB4wx9bdS9Vk67XQENLFdLYGCK/Z2di53mTj/hBafR+dTA==", - "dev": true, - "requires": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - } - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true - }, "ts-node": { "version": "10.9.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", @@ -5494,9 +2055,9 @@ } }, "tslib": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz", - "integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true }, "ttypescript": { @@ -5509,9 +2070,9 @@ } }, "typescript": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", - "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", "dev": true }, "typescript-transform-paths": { @@ -5523,44 +2084,6 @@ "minimatch": "^3.0.4" } }, - "unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", - "dev": true - }, - "unicode-match-property-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", - "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", - "dev": true, - "requires": { - "unicode-canonical-property-names-ecmascript": "^2.0.0", - "unicode-property-aliases-ecmascript": "^2.0.0" - } - }, - "unicode-match-property-value-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", - "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", - "dev": true - }, - "unicode-property-aliases-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", - "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", - "dev": true - }, - "update-browserslist-db": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz", - "integrity": "sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q==", - "dev": true, - "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - } - }, "v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -5568,6 +2091,18 @@ "dev": true, "peer": true }, + "vscode-oniguruma": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", + "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==", + "dev": true + }, + "vscode-textmate": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", + "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", + "dev": true + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index ccf3fd79..e8a98b08 100644 --- a/package.json +++ b/package.json @@ -1,23 +1,26 @@ { "name": "@hazae41/xswr", - "version": "1.0.84", + "version": "1.0.85", "author": "hazae41", "license": "MIT", "description": "The simplest React data (re)fetching library ever made", - "homepage": "https://github.com/hazae41/xswr#readme", + "homepage": "https://github.com/hazae41/xswr", "main": "./dist/index.js", "module": "./dist/index.esm.js", "types": "./dist/index.d.ts", "sideEffects": false, "scripts": { - "build": "rimraf dist && bunchee ./src/index.ts --no-sourcemap && ttsc && rimraf dist/libs" + "build": "rimraf dist && bunchee -m ./src/index.ts && ttsc && rimraf dist/libs" + }, + "dependencies": { + "react": "^18.2.0" }, "devDependencies": { - "@types/react": "^18.0.17", - "bunchee": "^1.9.1", + "@types/react": "^18.0.21", + "bunchee": "^2.0.1", "rimraf": "^3.0.2", "ttypescript": "^1.5.13", - "typescript": "^4.8.2", + "typescript": "^4.8.4", "typescript-transform-paths": "^3.3.1" }, "repository": { @@ -26,8 +29,5 @@ }, "bugs": { "url": "https://github.com/hazae41/xswr/issues" - }, - "dependencies": { - "react": "^18.2.0" } -} \ No newline at end of file +} diff --git a/src/mods/react/contexts/core.tsx b/src/mods/react/contexts/core.tsx index 9dc9e925..3186ec07 100644 --- a/src/mods/react/contexts/core.tsx +++ b/src/mods/react/contexts/core.tsx @@ -1,7 +1,8 @@ import { ChildrenProps } from "libs/react" import { Core } from "mods/core" import { Params } from "mods/types/params" -import React, { createContext, useContext, useEffect, useRef } from "react" +import * as React from "react" +import { createContext, useContext, useEffect, useRef } from "react" export const CoreContext = createContext(undefined) diff --git a/test/next/package-lock.json b/test/next/package-lock.json index 6411ea13..e19f79f7 100644 --- a/test/next/package-lock.json +++ b/test/next/package-lock.json @@ -8,7 +8,6 @@ "name": "test", "version": "0.1.0", "dependencies": { - "@hazae41/xswr": "^1.0.84", "next": "12.2.5", "react": "18.2.0", "react-dom": "18.2.0" @@ -73,14 +72,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@hazae41/xswr": { - "version": "1.0.84", - "resolved": "https://registry.npmjs.org/@hazae41/xswr/-/xswr-1.0.84.tgz", - "integrity": "sha512-w3dM1ICXdwX6GLqsY9ftv3m+bdU56idfGwGYSSV4JPJrQ617eGmaaIYOpHwtPAdeeABzUDRHrfE5sFynxDjlOA==", - "dependencies": { - "react": "^18.2.0" - } - }, "node_modules/@humanwhocodes/config-array": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", @@ -3696,14 +3687,6 @@ "strip-json-comments": "^3.1.1" } }, - "@hazae41/xswr": { - "version": "1.0.84", - "resolved": "https://registry.npmjs.org/@hazae41/xswr/-/xswr-1.0.84.tgz", - "integrity": "sha512-w3dM1ICXdwX6GLqsY9ftv3m+bdU56idfGwGYSSV4JPJrQ617eGmaaIYOpHwtPAdeeABzUDRHrfE5sFynxDjlOA==", - "requires": { - "react": "^18.2.0" - } - }, "@humanwhocodes/config-array": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", diff --git a/test/next/package.json b/test/next/package.json index 29e98ada..ff47ae33 100644 --- a/test/next/package.json +++ b/test/next/package.json @@ -9,7 +9,6 @@ "lint": "next lint" }, "dependencies": { - "@hazae41/xswr": "^1.0.84", "next": "12.2.5", "react": "18.2.0", "react-dom": "18.2.0" diff --git a/tsconfig.json b/tsconfig.json index 3a125016..4f0e527c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,16 +4,15 @@ "outDir": "dist", "module": "NodeNext", "moduleResolution": "NodeNext", + "strict": true, "declaration": true, "emitDeclarationOnly": true, + "downlevelIteration": true, + "jsx": "preserve", "lib": [ "dom", "ESNext" ], - "jsx": "react", - "downlevelIteration": true, - "strict": true, - "allowSyntheticDefaultImports": true, "paths": { "mods/*": [ "mods/*" @@ -33,8 +32,7 @@ ] }, "exclude": [ - "node_modules", - "libs" + "node_modules" ], "include": [ "./src/index.ts"