xframelib 1.1.4 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{worker-iconv-Bc3Fm2lD.js → worker-iconv-CMZuC2Hv.js} +168 -168
- package/dist/assets/{worker-webcache-C22MEJ3V.js → worker-webcache-BKTB6su-.js} +265 -263
- package/dist/assets/{worker-xmath-CbuRtVJ1.js → worker-xmath-AJHI50Iz.js} +25 -25
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/{controls → src/controls}/layoutcontainer/LayoutManager.d.ts +2 -2
- package/dist/{index.d.ts → src/index.d.ts} +3 -1
- package/dist/{utils → src/utils}/GzipTool.d.ts +1 -1
- package/dist/{utils → src/utils}/RouterURLTool.d.ts +1 -1
- package/package.json +19 -18
- package/dist/{api → src/api}/Token.d.ts +0 -0
- package/dist/{api → src/api}/User.d.ts +0 -0
- package/dist/{api → src/api}/index.d.ts +0 -0
- package/dist/{controls → src/controls}/ADivider.vue.d.ts +0 -0
- package/dist/{controls → src/controls}/ScaleContainer/index.vue.d.ts +0 -0
- package/dist/{controls → src/controls}/ScrollSnapContainer/index.vue.d.ts +0 -0
- package/dist/{controls → src/controls}/index.d.ts +0 -0
- package/dist/{controls → src/controls}/layoutcontainer/index.d.ts +0 -0
- package/dist/{controls → src/controls}/layoutcontainer/layout.vue.d.ts +0 -0
- package/dist/{controls → src/controls}/popover/index.vue.d.ts +0 -0
- package/dist/{controls → src/controls}/routertransition/RouterTransition.vue.d.ts +0 -0
- package/dist/{controls → src/controls}/routertransition/RouterTransitionAnimate.vue.d.ts +0 -0
- package/dist/{controls → src/controls}/routertransition/SuspenseWithError.vue.d.ts +0 -0
- package/dist/{controls → src/controls}/routertransition/index.d.ts +0 -0
- package/dist/{controls → src/controls}/splitpanes/index.d.ts +0 -0
- package/dist/{controls → src/controls}/splitpanes/pane.vue.d.ts +0 -0
- package/dist/{controls → src/controls}/splitpanes/splitpanes.vue.d.ts +0 -0
- package/dist/{controls → src/controls}/xwindow/XWindow.vue.d.ts +3 -3
- /package/dist/{controls → src/controls}/xwindow/XWindowManager.d.ts +0 -0
- /package/dist/{controls → src/controls}/xwindow/index.d.ts +0 -0
- /package/dist/{core → src/core}/Global.d.ts +0 -0
- /package/dist/{core → src/core}/IModel.d.ts +0 -0
- /package/dist/{core → src/core}/Init.d.ts +0 -0
- /package/dist/{core → src/core}/MsgHelper.d.ts +0 -0
- /package/dist/{core → src/core}/SysEvents.d.ts +0 -0
- /package/dist/{core → src/core}/index.d.ts +0 -0
- /package/dist/{directives → src/directives}/dbClickDirective.d.ts +0 -0
- /package/dist/{directives → src/directives}/dragDirective.d.ts +0 -0
- /package/dist/{directives → src/directives}/index.d.ts +0 -0
- /package/dist/{directives → src/directives}/mediaDirective.d.ts +0 -0
- /package/dist/{directives → src/directives}/repeatClickDirective.d.ts +0 -0
- /package/dist/{directives → src/directives}/wowDirective.d.ts +0 -0
- /package/dist/{hprose → src/hprose}/HproseClient.d.ts +0 -0
- /package/dist/{hprose → src/hprose}/HproseIO.d.ts +0 -0
- /package/dist/{hprose → src/hprose}/ProxyClient.d.ts +0 -0
- /package/dist/{hprose → src/hprose}/index.d.ts +0 -0
- /package/dist/{mitt → src/mitt}/index.d.ts +0 -0
- /package/dist/{model → src/model}/Config.d.ts +0 -0
- /package/dist/{model → src/model}/Constants.d.ts +0 -0
- /package/dist/{model → src/model}/IModalModels.d.ts +0 -0
- /package/dist/{model → src/model}/IRole.d.ts +0 -0
- /package/dist/{model → src/model}/ITypes.d.ts +0 -0
- /package/dist/{model → src/model}/IUserModel.d.ts +0 -0
- /package/dist/{model → src/model}/IWidgetMenu.d.ts +0 -0
- /package/dist/{model → src/model}/Layout.d.ts +0 -0
- /package/dist/{model → src/model}/index.d.ts +0 -0
- /package/dist/{permission → src/permission}/RoleSysRightHelper.d.ts +0 -0
- /package/dist/{permission → src/permission}/filter.d.ts +0 -0
- /package/dist/{permission → src/permission}/index.d.ts +0 -0
- /package/dist/{permission → src/permission}/register.d.ts +0 -0
- /package/dist/{permission → src/permission}/right.d.ts +0 -0
- /package/dist/{plugins → src/plugins}/NavigatorPlugin.d.ts +0 -0
- /package/dist/{plugins → src/plugins}/index.d.ts +0 -0
- /package/dist/{utils → src/utils}/AutoUpdate.d.ts +0 -0
- /package/dist/{utils → src/utils}/AxiosHelper.d.ts +0 -0
- /package/dist/{utils → src/utils}/BigFileDownload.d.ts +0 -0
- /package/dist/{utils → src/utils}/CodeHelper.d.ts +0 -0
- /package/dist/{utils → src/utils}/Color.d.ts +0 -0
- /package/dist/{utils → src/utils}/CommonTool.d.ts +0 -0
- /package/dist/{utils → src/utils}/DayjsTool.d.ts +0 -0
- /package/dist/{utils → src/utils}/FetchHelper.d.ts +0 -0
- /package/dist/{utils → src/utils}/FileDownload.d.ts +0 -0
- /package/dist/{utils → src/utils}/FileUpload.d.ts +0 -0
- /package/dist/{utils → src/utils}/FileUpload_/346/227/247.d.ts" +0 -0
- /package/dist/{utils → src/utils}/FilenameUtils.d.ts +0 -0
- /package/dist/{utils → src/utils}/H5Tool.d.ts +0 -0
- /package/dist/{utils → src/utils}/IsTool.d.ts +0 -0
- /package/dist/{utils → src/utils}/JQuery.d.ts +0 -0
- /package/dist/{utils → src/utils}/LocalForageHelper.d.ts +0 -0
- /package/dist/{utils → src/utils}/LockHelper.d.ts +0 -0
- /package/dist/{utils → src/utils}/Screen.d.ts +0 -0
- /package/dist/{utils → src/utils}/SignalrClient.d.ts +0 -0
- /package/dist/{utils → src/utils}/Storage.d.ts +0 -0
- /package/dist/{utils → src/utils}/StringUtils.d.ts +0 -0
- /package/dist/{utils → src/utils}/Time.d.ts +0 -0
- /package/dist/{utils → src/utils}/TokenHelper.d.ts +0 -0
- /package/dist/{utils → src/utils}/ValidateTool.d.ts +0 -0
- /package/dist/{utils → src/utils}/WarGridTool.d.ts +0 -0
- /package/dist/{utils → src/utils}/WaterMark.d.ts +0 -0
- /package/dist/{utils → src/utils}/WebCacheTool.d.ts +0 -0
- /package/dist/{utils → src/utils}/WidgetsTool.d.ts +0 -0
- /package/dist/{utils → src/utils}/XXTEA.d.ts +0 -0
- /package/dist/{utils → src/utils}/ZipTool.d.ts +0 -0
- /package/dist/{utils → src/utils}/index.d.ts +0 -0
- /package/dist/{utils → src/utils}/uuid.d.ts +0 -0
- /package/dist/{workers → src/workers}/index.d.ts +0 -0
- /package/dist/{workers → src/workers}/worker-iconv.d.ts +0 -0
- /package/dist/{workers → src/workers}/worker-webcache.d.ts +0 -0
- /package/dist/{workers → src/workers}/worker-xmath.d.ts +0 -0
- /package/dist/{workerservice → src/workerservice}/frontWorker.d.ts +0 -0
- /package/dist/{workerservice → src/workerservice}/index.d.ts +0 -0
|
@@ -3,7 +3,7 @@ var t = Object.defineProperty;
|
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2019 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
-
*/ const e = Symbol("Comlink.proxy"), i = Symbol("Comlink.endpoint"), s = Symbol("Comlink.releaseProxy"),
|
|
6
|
+
*/ const e = Symbol("Comlink.proxy"), i = Symbol("Comlink.endpoint"), s = Symbol("Comlink.releaseProxy"), h = Symbol("Comlink.finalizer"), n = Symbol("Comlink.thrown"), r = (t) => "object" == typeof t && null !== t || "function" == typeof t, o = new Map([["proxy", {
|
|
7
7
|
canHandle: (t) => r(t) && t[e],
|
|
8
8
|
serialize(t) {
|
|
9
9
|
const { port1: e, port2: i } = new MessageChannel();
|
|
@@ -11,7 +11,7 @@ var t = Object.defineProperty;
|
|
|
11
11
|
},
|
|
12
12
|
deserialize: (t) => (t.start(), function(t) {
|
|
13
13
|
const e = /* @__PURE__ */ new Map();
|
|
14
|
-
return t.addEventListener("message",
|
|
14
|
+
return t.addEventListener("message", function(t) {
|
|
15
15
|
const { data: i } = t;
|
|
16
16
|
if (!i || !i.id) return;
|
|
17
17
|
const s = e.get(i.id);
|
|
@@ -20,10 +20,10 @@ var t = Object.defineProperty;
|
|
|
20
20
|
} finally {
|
|
21
21
|
e.delete(i.id);
|
|
22
22
|
}
|
|
23
|
-
})
|
|
23
|
+
}), p(t, e, [], void 0);
|
|
24
24
|
}(t))
|
|
25
25
|
}], ["throw", {
|
|
26
|
-
canHandle: (t) => r(t) &&
|
|
26
|
+
canHandle: (t) => r(t) && n in t,
|
|
27
27
|
serialize({ value: t }) {
|
|
28
28
|
let e;
|
|
29
29
|
return e = t instanceof Error ? {
|
|
@@ -44,7 +44,7 @@ var t = Object.defineProperty;
|
|
|
44
44
|
}
|
|
45
45
|
}]]);
|
|
46
46
|
function a(t, i = globalThis, s = ["*"]) {
|
|
47
|
-
i.addEventListener("message",
|
|
47
|
+
i.addEventListener("message", function r(o) {
|
|
48
48
|
if (!o || !o.data) return;
|
|
49
49
|
if (!function(t, e) {
|
|
50
50
|
for (const i of t) {
|
|
@@ -56,7 +56,7 @@ function a(t, i = globalThis, s = ["*"]) {
|
|
|
56
56
|
const { id: c, type: u, path: f } = Object.assign({ path: [] }, o.data), d = (o.data.argumentList || []).map(w);
|
|
57
57
|
let p;
|
|
58
58
|
try {
|
|
59
|
-
const i = f.slice(0, -1).reduce((
|
|
59
|
+
const i = f.slice(0, -1).reduce((t, e) => t[e], t), s = f.reduce((t, e) => t[e], t);
|
|
60
60
|
switch (u) {
|
|
61
61
|
case "GET":
|
|
62
62
|
p = s;
|
|
@@ -88,23 +88,23 @@ function a(t, i = globalThis, s = ["*"]) {
|
|
|
88
88
|
} catch (t) {
|
|
89
89
|
p = {
|
|
90
90
|
value: t,
|
|
91
|
-
[
|
|
91
|
+
[n]: 0
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
Promise.resolve(p).catch((
|
|
94
|
+
Promise.resolve(p).catch((t) => ({
|
|
95
95
|
value: t,
|
|
96
|
-
[
|
|
97
|
-
}))
|
|
98
|
-
const [s,
|
|
99
|
-
i.postMessage(Object.assign(Object.assign({}, s), { id: c }),
|
|
100
|
-
})
|
|
96
|
+
[n]: 0
|
|
97
|
+
})).then((e) => {
|
|
98
|
+
const [s, n] = m(e);
|
|
99
|
+
i.postMessage(Object.assign(Object.assign({}, s), { id: c }), n), "RELEASE" === u && (i.removeEventListener("message", r), l(i), h in t && "function" == typeof t[h] && t[h]());
|
|
100
|
+
}).catch((t) => {
|
|
101
101
|
const [e, s] = m({
|
|
102
102
|
value: /* @__PURE__ */ new TypeError("Unserializable return value"),
|
|
103
|
-
[
|
|
103
|
+
[n]: 0
|
|
104
104
|
});
|
|
105
105
|
i.postMessage(Object.assign(Object.assign({}, e), { id: c }), s);
|
|
106
|
-
})
|
|
107
|
-
})
|
|
106
|
+
});
|
|
107
|
+
}), i.start && i.start();
|
|
108
108
|
}
|
|
109
109
|
function l(t) {
|
|
110
110
|
(function(t) {
|
|
@@ -115,61 +115,61 @@ function c(t) {
|
|
|
115
115
|
if (t) throw new Error("Proxy has been released and is not useable");
|
|
116
116
|
}
|
|
117
117
|
function u(t) {
|
|
118
|
-
return
|
|
118
|
+
return S(t, /* @__PURE__ */ new Map(), { type: "RELEASE" }).then(() => {
|
|
119
119
|
l(t);
|
|
120
|
-
})
|
|
120
|
+
});
|
|
121
121
|
}
|
|
122
|
-
const f = /* @__PURE__ */ new WeakMap(), d = "FinalizationRegistry" in globalThis && new FinalizationRegistry((
|
|
122
|
+
const f = /* @__PURE__ */ new WeakMap(), d = "FinalizationRegistry" in globalThis && new FinalizationRegistry((t) => {
|
|
123
123
|
const e = (f.get(t) || 0) - 1;
|
|
124
124
|
f.set(t, e), 0 === e && u(t);
|
|
125
|
-
})
|
|
126
|
-
function p(t, e,
|
|
125
|
+
});
|
|
126
|
+
function p(t, e, h = [], n = function() {}) {
|
|
127
127
|
let r = !1;
|
|
128
|
-
const o = new Proxy(
|
|
129
|
-
get(i,
|
|
130
|
-
if (c(r),
|
|
128
|
+
const o = new Proxy(n, {
|
|
129
|
+
get(i, n) {
|
|
130
|
+
if (c(r), n === s) return () => {
|
|
131
131
|
(function(t) {
|
|
132
132
|
d && d.unregister(t);
|
|
133
133
|
})(o), u(t), e.clear(), r = !0;
|
|
134
134
|
};
|
|
135
|
-
if ("then" ===
|
|
136
|
-
if (0 ===
|
|
137
|
-
const i =
|
|
135
|
+
if ("then" === n) {
|
|
136
|
+
if (0 === h.length) return { then: () => o };
|
|
137
|
+
const i = S(t, e, {
|
|
138
138
|
type: "GET",
|
|
139
|
-
path:
|
|
139
|
+
path: h.map((t) => t.toString())
|
|
140
140
|
}).then(w);
|
|
141
141
|
return i.then.bind(i);
|
|
142
142
|
}
|
|
143
|
-
return p(t, e, [...
|
|
143
|
+
return p(t, e, [...h, n]);
|
|
144
144
|
},
|
|
145
|
-
set(i, s,
|
|
145
|
+
set(i, s, n) {
|
|
146
146
|
c(r);
|
|
147
|
-
const [o, a] = m(
|
|
148
|
-
return
|
|
147
|
+
const [o, a] = m(n);
|
|
148
|
+
return S(t, e, {
|
|
149
149
|
type: "SET",
|
|
150
|
-
path: [...
|
|
150
|
+
path: [...h, s].map((t) => t.toString()),
|
|
151
151
|
value: o
|
|
152
152
|
}, a).then(w);
|
|
153
153
|
},
|
|
154
|
-
apply(s,
|
|
154
|
+
apply(s, n, o) {
|
|
155
155
|
c(r);
|
|
156
|
-
const a =
|
|
157
|
-
if (a === i) return
|
|
158
|
-
if ("bind" === a) return p(t, e,
|
|
156
|
+
const a = h[h.length - 1];
|
|
157
|
+
if (a === i) return S(t, e, { type: "ENDPOINT" }).then(w);
|
|
158
|
+
if ("bind" === a) return p(t, e, h.slice(0, -1));
|
|
159
159
|
const [l, u] = g(o);
|
|
160
|
-
return
|
|
160
|
+
return S(t, e, {
|
|
161
161
|
type: "APPLY",
|
|
162
|
-
path:
|
|
162
|
+
path: h.map((t) => t.toString()),
|
|
163
163
|
argumentList: l
|
|
164
164
|
}, u).then(w);
|
|
165
165
|
},
|
|
166
166
|
construct(i, s) {
|
|
167
167
|
c(r);
|
|
168
|
-
const [
|
|
169
|
-
return
|
|
168
|
+
const [n, o] = g(s);
|
|
169
|
+
return S(t, e, {
|
|
170
170
|
type: "CONSTRUCT",
|
|
171
|
-
path:
|
|
172
|
-
argumentList:
|
|
171
|
+
path: h.map((t) => t.toString()),
|
|
172
|
+
argumentList: n
|
|
173
173
|
}, o).then(w);
|
|
174
174
|
}
|
|
175
175
|
});
|
|
@@ -180,18 +180,18 @@ function p(t, e, n = [], h = function() {}) {
|
|
|
180
180
|
}
|
|
181
181
|
function g(t) {
|
|
182
182
|
const e = t.map(m);
|
|
183
|
-
return [e.map((
|
|
183
|
+
return [e.map((t) => t[0]), (i = e.map((t) => t[1]), Array.prototype.concat.apply([], i))];
|
|
184
184
|
var i;
|
|
185
185
|
}
|
|
186
186
|
const v = /* @__PURE__ */ new WeakMap();
|
|
187
187
|
function m(t) {
|
|
188
188
|
for (const [e, i] of o) if (i.canHandle(t)) {
|
|
189
|
-
const [s,
|
|
189
|
+
const [s, h] = i.serialize(t);
|
|
190
190
|
return [{
|
|
191
191
|
type: "HANDLER",
|
|
192
192
|
name: e,
|
|
193
193
|
value: s
|
|
194
|
-
},
|
|
194
|
+
}, h];
|
|
195
195
|
}
|
|
196
196
|
return [{
|
|
197
197
|
type: "RAW",
|
|
@@ -204,13 +204,13 @@ function w(t) {
|
|
|
204
204
|
case "RAW": return t.value;
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
return new Promise((
|
|
209
|
-
const
|
|
210
|
-
e.set(
|
|
211
|
-
})
|
|
207
|
+
function S(t, e, i, s) {
|
|
208
|
+
return new Promise((h) => {
|
|
209
|
+
const n = new Array(4).fill(0).map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16)).join("-");
|
|
210
|
+
e.set(n, h), t.start && t.start(), t.postMessage(Object.assign({ id: n }, i), s);
|
|
211
|
+
});
|
|
212
212
|
}
|
|
213
|
-
var
|
|
213
|
+
var b = { hasSubscribers: !1 }, y = b, z = b, _ = "object" == typeof performance && performance && "function" == typeof performance.now ? performance : Date, E = () => y.hasSubscribers || z.hasSubscribers, O = /* @__PURE__ */ new Set(), A = "object" == typeof process && process ? process : {}, F = (t) => !!t && t === Math.floor(t) && t > 0 && isFinite(t), T = (t) => F(t) ? t <= Math.pow(2, 8) ? Uint8Array : t <= Math.pow(2, 16) ? Uint16Array : t <= Math.pow(2, 32) ? Uint32Array : t <= Number.MAX_SAFE_INTEGER ? x : null : null, x = class extends Array {
|
|
214
214
|
constructor(t) {
|
|
215
215
|
super(t), this.fill(0);
|
|
216
216
|
}
|
|
@@ -219,7 +219,7 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
219
219
|
length;
|
|
220
220
|
static #t = !1;
|
|
221
221
|
static create(e) {
|
|
222
|
-
let i =
|
|
222
|
+
let i = T(e);
|
|
223
223
|
if (!i) return [];
|
|
224
224
|
t.#t = !0;
|
|
225
225
|
let s = new t(e, i);
|
|
@@ -235,13 +235,13 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
235
235
|
pop() {
|
|
236
236
|
return this.heap[--this.length];
|
|
237
237
|
}
|
|
238
|
-
},
|
|
238
|
+
}, R = class t {
|
|
239
239
|
#t;
|
|
240
240
|
#e;
|
|
241
241
|
#i;
|
|
242
242
|
#s;
|
|
243
|
-
#n;
|
|
244
243
|
#h;
|
|
244
|
+
#n;
|
|
245
245
|
#r;
|
|
246
246
|
#o;
|
|
247
247
|
get perf() {
|
|
@@ -262,6 +262,7 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
262
262
|
allowStaleOnFetchAbort;
|
|
263
263
|
allowStaleOnFetchRejection;
|
|
264
264
|
ignoreFetchAbort;
|
|
265
|
+
backgroundFetchSize;
|
|
265
266
|
#a;
|
|
266
267
|
#l;
|
|
267
268
|
#c;
|
|
@@ -273,20 +274,20 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
273
274
|
#v;
|
|
274
275
|
#m;
|
|
275
276
|
#w;
|
|
276
|
-
#y;
|
|
277
277
|
#S;
|
|
278
278
|
#b;
|
|
279
|
-
#
|
|
279
|
+
#y;
|
|
280
|
+
#z;
|
|
280
281
|
#_;
|
|
281
282
|
#E;
|
|
282
|
-
#A;
|
|
283
283
|
#O;
|
|
284
|
+
#A;
|
|
284
285
|
static unsafeExposeInternals(t) {
|
|
285
286
|
return {
|
|
286
|
-
starts: t.#
|
|
287
|
-
ttls: t.#
|
|
288
|
-
autopurgeTimers: t.#
|
|
289
|
-
sizes: t.#
|
|
287
|
+
starts: t.#b,
|
|
288
|
+
ttls: t.#y,
|
|
289
|
+
autopurgeTimers: t.#z,
|
|
290
|
+
sizes: t.#S,
|
|
290
291
|
keyMap: t.#c,
|
|
291
292
|
keyList: t.#u,
|
|
292
293
|
valList: t.#f,
|
|
@@ -300,11 +301,11 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
300
301
|
},
|
|
301
302
|
free: t.#m,
|
|
302
303
|
isBackgroundFetch: (e) => t.#F(e),
|
|
303
|
-
backgroundFetch: (e, i, s,
|
|
304
|
-
moveToTail: (e) => t.#
|
|
304
|
+
backgroundFetch: (e, i, s, h) => t.#T(e, i, s, h),
|
|
305
|
+
moveToTail: (e) => t.#x(e),
|
|
305
306
|
indexes: (e) => t.#k(e),
|
|
306
|
-
rindexes: (e) => t.#
|
|
307
|
-
isStale: (e) => t.#
|
|
307
|
+
rindexes: (e) => t.#R(e),
|
|
308
|
+
isStale: (e) => t.#C(e)
|
|
308
309
|
};
|
|
309
310
|
}
|
|
310
311
|
get max() {
|
|
@@ -320,7 +321,7 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
320
321
|
return this.#a;
|
|
321
322
|
}
|
|
322
323
|
get fetchMethod() {
|
|
323
|
-
return this.#
|
|
324
|
+
return this.#n;
|
|
324
325
|
}
|
|
325
326
|
get memoMethod() {
|
|
326
327
|
return this.#r;
|
|
@@ -332,13 +333,13 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
332
333
|
return this.#s;
|
|
333
334
|
}
|
|
334
335
|
get disposeAfter() {
|
|
335
|
-
return this.#
|
|
336
|
+
return this.#h;
|
|
336
337
|
}
|
|
337
338
|
constructor(e) {
|
|
338
|
-
let { max: i = 0, ttl: s, ttlResolution:
|
|
339
|
-
if (void 0 !==
|
|
340
|
-
if (this.#o =
|
|
341
|
-
let C = i ?
|
|
339
|
+
let { max: i = 0, ttl: s, ttlResolution: h = 1, ttlAutopurge: n, updateAgeOnGet: r, updateAgeOnHas: o, allowStale: a, dispose: l, onInsert: c, disposeAfter: u, noDisposeOnSet: f, noUpdateTTL: d, maxSize: p = 0, maxEntrySize: g = 0, sizeCalculation: v, fetchMethod: m, memoMethod: w, noDeleteOnFetchRejection: S, noDeleteOnStaleGet: b, allowStaleOnFetchRejection: y, allowStaleOnFetchAbort: z, ignoreFetchAbort: E, backgroundFetchSize: x = 1, perf: R } = e;
|
|
340
|
+
if (this.backgroundFetchSize = x, void 0 !== R && "function" != typeof R?.now) throw new TypeError("perf option must have a now() method if specified");
|
|
341
|
+
if (this.#o = R ?? _, 0 !== i && !F(i)) throw new TypeError("max option must be a nonnegative integer");
|
|
342
|
+
let C = i ? T(i) : Array;
|
|
342
343
|
if (!C) throw new Error("invalid max value: " + i);
|
|
343
344
|
if (this.#t = i, this.#e = p, this.maxEntrySize = g || this.#e, this.sizeCalculation = v, this.sizeCalculation) {
|
|
344
345
|
if (!this.#e && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
|
|
@@ -346,20 +347,20 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
346
347
|
}
|
|
347
348
|
if (void 0 !== w && "function" != typeof w) throw new TypeError("memoMethod must be a function if defined");
|
|
348
349
|
if (this.#r = w, void 0 !== m && "function" != typeof m) throw new TypeError("fetchMethod must be a function if specified");
|
|
349
|
-
if (this.#
|
|
350
|
+
if (this.#n = m, this.#E = !!m, this.#c = /* @__PURE__ */ new Map(), this.#u = Array.from({ length: i }).fill(void 0), this.#f = Array.from({ length: i }).fill(void 0), this.#d = new C(i), this.#p = new C(i), this.#g = 0, this.#v = 0, this.#m = k.create(i), this.#a = 0, this.#l = 0, "function" == typeof l && (this.#i = l), "function" == typeof c && (this.#s = c), "function" == typeof u ? (this.#h = u, this.#w = []) : (this.#h = void 0, this.#w = void 0), this.#_ = !!this.#i, this.#A = !!this.#s, this.#O = !!this.#h, this.noDisposeOnSet = !!f, this.noUpdateTTL = !!d, this.noDeleteOnFetchRejection = !!S, this.allowStaleOnFetchRejection = !!y, this.allowStaleOnFetchAbort = !!z, this.ignoreFetchAbort = !!E, 0 !== this.maxEntrySize) {
|
|
350
351
|
if (0 !== this.#e && !F(this.#e)) throw new TypeError("maxSize must be a positive integer if specified");
|
|
351
352
|
if (!F(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
352
353
|
this.#j();
|
|
353
354
|
}
|
|
354
|
-
if (this.allowStale = !!a, this.noDeleteOnStaleGet = !!
|
|
355
|
+
if (this.allowStale = !!a, this.noDeleteOnStaleGet = !!b, this.updateAgeOnGet = !!r, this.updateAgeOnHas = !!o, this.ttlResolution = F(h) || 0 === h ? h : 1, this.ttlAutopurge = !!n, this.ttl = s || 0, this.ttl) {
|
|
355
356
|
if (!F(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
|
|
356
357
|
this.#D();
|
|
357
358
|
}
|
|
358
359
|
if (0 === this.#t && 0 === this.ttl && 0 === this.#e) throw new TypeError("At least one of max, maxSize, or ttl is required");
|
|
359
360
|
if (!this.ttlAutopurge && !this.#t && !this.#e) {
|
|
360
361
|
let e = "LRU_CACHE_UNBOUNDED";
|
|
361
|
-
((t) => !
|
|
362
|
-
"function" == typeof
|
|
362
|
+
((t) => !O.has(t))(e) && (O.add(e), ((t, e, i, s) => {
|
|
363
|
+
"function" == typeof A.emitWarning ? A.emitWarning(t, e, i, s) : console.error(`[${i}] ${e}: ${t}`);
|
|
363
364
|
})("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", e, t));
|
|
364
365
|
}
|
|
365
366
|
}
|
|
@@ -367,19 +368,19 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
367
368
|
return this.#c.has(t) ? Infinity : 0;
|
|
368
369
|
}
|
|
369
370
|
#D() {
|
|
370
|
-
let t = new
|
|
371
|
-
this.#
|
|
371
|
+
let t = new x(this.#t), e = new x(this.#t);
|
|
372
|
+
this.#y = t, this.#b = e;
|
|
372
373
|
let i = this.ttlAutopurge ? Array.from({ length: this.#t }) : void 0;
|
|
373
|
-
this.#
|
|
374
|
-
e[i] = 0 !==
|
|
374
|
+
this.#z = i, this.#W = (i, h, n = this.#o.now()) => {
|
|
375
|
+
e[i] = 0 !== h ? n : 0, t[i] = h, s(i, h);
|
|
375
376
|
}, this.#M = (i) => {
|
|
376
377
|
e[i] = 0 !== t[i] ? this.#o.now() : 0, s(i, t[i]);
|
|
377
378
|
};
|
|
378
379
|
let s = this.ttlAutopurge ? (t, e) => {
|
|
379
380
|
if (i?.[t] && (clearTimeout(i[t]), i[t] = void 0), e && 0 !== e && i) {
|
|
380
|
-
let s = setTimeout((
|
|
381
|
-
this.#
|
|
382
|
-
}
|
|
381
|
+
let s = setTimeout(() => {
|
|
382
|
+
this.#C(t) && this.#L(this.#u[t], "expire");
|
|
383
|
+
}, e + 1);
|
|
383
384
|
s.unref && s.unref(), i[t] = s;
|
|
384
385
|
}
|
|
385
386
|
} : () => {};
|
|
@@ -387,14 +388,14 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
387
388
|
if (t[s]) {
|
|
388
389
|
let r = t[s], o = e[s];
|
|
389
390
|
if (!r || !o) return;
|
|
390
|
-
i.ttl = r, i.start = o, i.now =
|
|
391
|
+
i.ttl = r, i.start = o, i.now = h || n(), i.remainingTTL = r - (i.now - o);
|
|
391
392
|
}
|
|
392
393
|
};
|
|
393
|
-
let
|
|
394
|
+
let h = 0, n = () => {
|
|
394
395
|
let t = this.#o.now();
|
|
395
396
|
if (this.ttlResolution > 0) {
|
|
396
|
-
|
|
397
|
-
let e = setTimeout((
|
|
397
|
+
h = t;
|
|
398
|
+
let e = setTimeout(() => h = 0, this.ttlResolution);
|
|
398
399
|
e.unref && e.unref();
|
|
399
400
|
}
|
|
400
401
|
return t;
|
|
@@ -403,23 +404,23 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
403
404
|
let s = this.#c.get(i);
|
|
404
405
|
if (void 0 === s) return 0;
|
|
405
406
|
let r = t[s], o = e[s];
|
|
406
|
-
return r && o ? r - ((
|
|
407
|
-
}, this.#
|
|
407
|
+
return r && o ? r - ((h || n()) - o) : Infinity;
|
|
408
|
+
}, this.#C = (i) => {
|
|
408
409
|
let s = e[i], r = t[i];
|
|
409
|
-
return !!r && !!s && (
|
|
410
|
+
return !!r && !!s && (h || n()) - s > r;
|
|
410
411
|
};
|
|
411
412
|
}
|
|
412
413
|
#M = () => {};
|
|
413
414
|
#G = () => {};
|
|
414
415
|
#W = () => {};
|
|
415
|
-
#
|
|
416
|
+
#C = () => !1;
|
|
416
417
|
#j() {
|
|
417
|
-
let t = new
|
|
418
|
-
this.#l = 0, this.#
|
|
418
|
+
let t = new x(this.#t);
|
|
419
|
+
this.#l = 0, this.#S = t, this.#U = (e) => {
|
|
419
420
|
this.#l -= t[e], t[e] = 0;
|
|
420
421
|
}, this.#P = (t, e, i, s) => {
|
|
421
|
-
if (this.#F(e)) return 0;
|
|
422
422
|
if (!F(i)) {
|
|
423
|
+
if (this.#F(e)) return this.backgroundFetchSize;
|
|
423
424
|
if (!s) throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
|
424
425
|
if ("function" != typeof s) throw new TypeError("sizeCalculation must be a function");
|
|
425
426
|
if (i = s(e, t), !F(i)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
|
@@ -428,7 +429,7 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
428
429
|
}, this.#N = (e, i, s) => {
|
|
429
430
|
if (t[e] = i, this.#e) {
|
|
430
431
|
let i = this.#e - t[e];
|
|
431
|
-
for (; this.#l > i;) this.#
|
|
432
|
+
for (; this.#l > i;) this.#I(!0);
|
|
432
433
|
}
|
|
433
434
|
this.#l += t[e], s && (s.entrySize = i, s.totalCalculatedSize = this.#l);
|
|
434
435
|
};
|
|
@@ -440,19 +441,19 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
440
441
|
return 0;
|
|
441
442
|
};
|
|
442
443
|
*#k({ allowStale: t = this.allowStale } = {}) {
|
|
443
|
-
if (this.#a) for (let e = this.#v; this.#
|
|
444
|
+
if (this.#a) for (let e = this.#v; this.#H(e) && ((t || !this.#C(e)) && (yield e), e !== this.#g);) e = this.#p[e];
|
|
444
445
|
}
|
|
445
|
-
*#
|
|
446
|
-
if (this.#a) for (let e = this.#g; this.#
|
|
446
|
+
*#R({ allowStale: t = this.allowStale } = {}) {
|
|
447
|
+
if (this.#a) for (let e = this.#g; this.#H(e) && ((t || !this.#C(e)) && (yield e), e !== this.#v);) e = this.#d[e];
|
|
447
448
|
}
|
|
448
|
-
#
|
|
449
|
+
#H(t) {
|
|
449
450
|
return void 0 !== t && this.#c.get(this.#u[t]) === t;
|
|
450
451
|
}
|
|
451
452
|
*entries() {
|
|
452
453
|
for (let t of this.#k()) void 0 !== this.#f[t] && void 0 !== this.#u[t] && !this.#F(this.#f[t]) && (yield [this.#u[t], this.#f[t]]);
|
|
453
454
|
}
|
|
454
455
|
*rentries() {
|
|
455
|
-
for (let t of this.#
|
|
456
|
+
for (let t of this.#R()) void 0 !== this.#f[t] && void 0 !== this.#u[t] && !this.#F(this.#f[t]) && (yield [this.#u[t], this.#f[t]]);
|
|
456
457
|
}
|
|
457
458
|
*keys() {
|
|
458
459
|
for (let t of this.#k()) {
|
|
@@ -461,7 +462,7 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
461
462
|
}
|
|
462
463
|
}
|
|
463
464
|
*rkeys() {
|
|
464
|
-
for (let t of this.#
|
|
465
|
+
for (let t of this.#R()) {
|
|
465
466
|
let e = this.#u[t];
|
|
466
467
|
void 0 !== e && !this.#F(this.#f[t]) && (yield e);
|
|
467
468
|
}
|
|
@@ -470,7 +471,7 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
470
471
|
for (let t of this.#k()) void 0 !== this.#f[t] && !this.#F(this.#f[t]) && (yield this.#f[t]);
|
|
471
472
|
}
|
|
472
473
|
*rvalues() {
|
|
473
|
-
for (let t of this.#
|
|
474
|
+
for (let t of this.#R()) void 0 !== this.#f[t] && !this.#F(this.#f[t]) && (yield this.#f[t]);
|
|
474
475
|
}
|
|
475
476
|
[Symbol.iterator]() {
|
|
476
477
|
return this.entries();
|
|
@@ -478,25 +479,25 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
478
479
|
[Symbol.toStringTag] = "LRUCache";
|
|
479
480
|
find(t, e = {}) {
|
|
480
481
|
for (let i of this.#k()) {
|
|
481
|
-
let s = this.#f[i],
|
|
482
|
-
if (void 0 !==
|
|
482
|
+
let s = this.#f[i], h = this.#F(s) ? s.__staleWhileFetching : s;
|
|
483
|
+
if (void 0 !== h && t(h, this.#u[i], this)) return this.#$(this.#u[i], e);
|
|
483
484
|
}
|
|
484
485
|
}
|
|
485
486
|
forEach(t, e = this) {
|
|
486
487
|
for (let i of this.#k()) {
|
|
487
|
-
let s = this.#f[i],
|
|
488
|
-
void 0 !==
|
|
488
|
+
let s = this.#f[i], h = this.#F(s) ? s.__staleWhileFetching : s;
|
|
489
|
+
void 0 !== h && t.call(e, h, this.#u[i], this);
|
|
489
490
|
}
|
|
490
491
|
}
|
|
491
492
|
rforEach(t, e = this) {
|
|
492
|
-
for (let i of this.#
|
|
493
|
-
let s = this.#f[i],
|
|
494
|
-
void 0 !==
|
|
493
|
+
for (let i of this.#R()) {
|
|
494
|
+
let s = this.#f[i], h = this.#F(s) ? s.__staleWhileFetching : s;
|
|
495
|
+
void 0 !== h && t.call(e, h, this.#u[i], this);
|
|
495
496
|
}
|
|
496
497
|
}
|
|
497
498
|
purgeStale() {
|
|
498
499
|
let t = !1;
|
|
499
|
-
for (let e of this.#
|
|
500
|
+
for (let e of this.#R({ allowStale: !0 })) this.#C(e) && (this.#L(this.#u[e], "expire"), t = !0);
|
|
500
501
|
return t;
|
|
501
502
|
}
|
|
502
503
|
info(t) {
|
|
@@ -504,25 +505,25 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
504
505
|
if (void 0 === e) return;
|
|
505
506
|
let i = this.#f[e], s = this.#F(i) ? i.__staleWhileFetching : i;
|
|
506
507
|
if (void 0 === s) return;
|
|
507
|
-
let
|
|
508
|
-
if (this.#
|
|
509
|
-
let t = this.#
|
|
510
|
-
t && i && (
|
|
508
|
+
let h = { value: s };
|
|
509
|
+
if (this.#y && this.#b) {
|
|
510
|
+
let t = this.#y[e], i = this.#b[e];
|
|
511
|
+
t && i && (h.ttl = t - (this.#o.now() - i), h.start = Date.now());
|
|
511
512
|
}
|
|
512
|
-
return this.#
|
|
513
|
+
return this.#S && (h.size = this.#S[e]), h;
|
|
513
514
|
}
|
|
514
515
|
dump() {
|
|
515
516
|
let t = [];
|
|
516
517
|
for (let e of this.#k({ allowStale: !0 })) {
|
|
517
|
-
let i = this.#u[e], s = this.#f[e],
|
|
518
|
-
if (void 0 ===
|
|
519
|
-
let
|
|
520
|
-
if (this.#
|
|
521
|
-
|
|
522
|
-
let t = this.#o.now() - this.#
|
|
523
|
-
|
|
518
|
+
let i = this.#u[e], s = this.#f[e], h = this.#F(s) ? s.__staleWhileFetching : s;
|
|
519
|
+
if (void 0 === h || void 0 === i) continue;
|
|
520
|
+
let n = { value: h };
|
|
521
|
+
if (this.#y && this.#b) {
|
|
522
|
+
n.ttl = this.#y[e];
|
|
523
|
+
let t = this.#o.now() - this.#b[e];
|
|
524
|
+
n.start = Math.floor(Date.now() - t);
|
|
524
525
|
}
|
|
525
|
-
this.#
|
|
526
|
+
this.#S && (n.size = this.#S[e]), t.unshift([i, n]);
|
|
526
527
|
}
|
|
527
528
|
return t;
|
|
528
529
|
}
|
|
@@ -537,48 +538,46 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
537
538
|
}
|
|
538
539
|
}
|
|
539
540
|
set(t, e, i = {}) {
|
|
540
|
-
let { status: s =
|
|
541
|
-
i.status = s, s && (s.op = "set", s.key = t, void 0 !== e && (s.value = e));
|
|
542
|
-
let
|
|
543
|
-
return s &&
|
|
544
|
-
}
|
|
545
|
-
#B(t, e, i
|
|
546
|
-
let { ttl:
|
|
547
|
-
if (void 0 === e) return
|
|
548
|
-
let { noUpdateTTL:
|
|
549
|
-
|
|
550
|
-
let
|
|
551
|
-
if (this.maxEntrySize &&
|
|
552
|
-
let
|
|
553
|
-
if (void 0 ===
|
|
541
|
+
let { status: s = y.hasSubscribers ? {} : void 0 } = i;
|
|
542
|
+
i.status = s, s && (s.op = "set", s.key = t, void 0 !== e && (s.value = e), s.cache = this);
|
|
543
|
+
let h = this.#B(t, e, i);
|
|
544
|
+
return s && y.hasSubscribers && y.publish(s), h;
|
|
545
|
+
}
|
|
546
|
+
#B(t, e, i, s) {
|
|
547
|
+
let { ttl: h = this.ttl, start: n, noDisposeOnSet: r = this.noDisposeOnSet, sizeCalculation: o = this.sizeCalculation, status: a } = i, l = this.#F(e);
|
|
548
|
+
if (void 0 === e) return a && (a.set = "deleted"), this.delete(t), this;
|
|
549
|
+
let { noUpdateTTL: c = this.noUpdateTTL } = i;
|
|
550
|
+
a && !l && (a.value = e);
|
|
551
|
+
let u = this.#P(t, e, i.size || 0, o, a);
|
|
552
|
+
if (this.maxEntrySize && u > this.maxEntrySize) return this.#L(t, "set"), a && (a.set = "miss", a.maxEntrySizeExceeded = !0), this;
|
|
553
|
+
let f = 0 === this.#a ? void 0 : this.#c.get(t);
|
|
554
|
+
if (void 0 === f) f = 0 === this.#a ? this.#v : 0 !== this.#m.length ? this.#m.pop() : this.#a === this.#t ? this.#I(!1) : this.#a, this.#u[f] = t, this.#f[f] = e, this.#c.set(t, f), this.#d[this.#v] = f, this.#p[f] = this.#v, this.#v = f, this.#a++, this.#N(f, u, a), a && (a.set = "add"), c = !1, this.#A && !l && this.#s?.(e, t, "add");
|
|
554
555
|
else {
|
|
555
|
-
this.#
|
|
556
|
-
let i = this.#f[
|
|
556
|
+
this.#x(f);
|
|
557
|
+
let i = this.#f[f];
|
|
557
558
|
if (e !== i) {
|
|
558
|
-
if (
|
|
559
|
-
i.__abortController.abort(/* @__PURE__ */ new Error("replaced"));
|
|
560
|
-
let { __staleWhileFetching:
|
|
561
|
-
void 0 !==
|
|
562
|
-
|
|
559
|
+
if (!r) if (this.#F(i)) {
|
|
560
|
+
i !== s && i.__abortController.abort(/* @__PURE__ */ new Error("replaced"));
|
|
561
|
+
let { __staleWhileFetching: h } = i;
|
|
562
|
+
void 0 !== h && h !== e && (this.#_ && this.#i?.(h, t, "set"), this.#O && this.#w?.push([
|
|
563
|
+
h,
|
|
563
564
|
t,
|
|
564
565
|
"set"
|
|
565
566
|
]));
|
|
566
|
-
} else
|
|
567
|
+
} else this.#_ && this.#i?.(i, t, "set"), this.#O && this.#w?.push([
|
|
567
568
|
i,
|
|
568
569
|
t,
|
|
569
570
|
"set"
|
|
570
|
-
])
|
|
571
|
-
if (this.#U(
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
void 0 !== t && (o.oldValue = t);
|
|
571
|
+
]);
|
|
572
|
+
if (this.#U(f), this.#N(f, u, a), this.#f[f] = e, !l) {
|
|
573
|
+
let s = i && this.#F(i) ? i.__staleWhileFetching : i, h = void 0 === s ? "add" : e !== s ? "replace" : "update";
|
|
574
|
+
a && (a.set = h, void 0 !== s && (a.oldValue = s)), this.#A && this.onInsert?.(e, t, h);
|
|
575
575
|
}
|
|
576
|
-
} else
|
|
577
|
-
this.#O && this.onInsert?.(e, t, e === i ? "update" : "replace");
|
|
576
|
+
} else l || (a && (a.set = "update"), this.#A && this.onInsert?.(e, t, "update"));
|
|
578
577
|
}
|
|
579
|
-
if (0 !==
|
|
578
|
+
if (0 !== h && !this.#y && this.#D(), this.#y && (c || this.#W(f, h, n), a && this.#G(a, f)), !r && this.#O && this.#w) {
|
|
580
579
|
let t, e = this.#w;
|
|
581
|
-
for (; t = e?.shift();) this.#
|
|
580
|
+
for (; t = e?.shift();) this.#h?.(...t);
|
|
582
581
|
}
|
|
583
582
|
return this;
|
|
584
583
|
}
|
|
@@ -586,81 +585,83 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
586
585
|
try {
|
|
587
586
|
for (; this.#a;) {
|
|
588
587
|
let t = this.#f[this.#g];
|
|
589
|
-
if (this.#
|
|
588
|
+
if (this.#I(!0), this.#F(t)) {
|
|
590
589
|
if (t.__staleWhileFetching) return t.__staleWhileFetching;
|
|
591
590
|
} else if (void 0 !== t) return t;
|
|
592
591
|
}
|
|
593
592
|
} finally {
|
|
594
|
-
if (this.#
|
|
593
|
+
if (this.#O && this.#w) {
|
|
595
594
|
let t, e = this.#w;
|
|
596
|
-
for (; t = e?.shift();) this.#
|
|
595
|
+
for (; t = e?.shift();) this.#h?.(...t);
|
|
597
596
|
}
|
|
598
597
|
}
|
|
599
598
|
}
|
|
600
|
-
#
|
|
601
|
-
let e = this.#g, i = this.#u[e], s = this.#f[e];
|
|
602
|
-
|
|
603
|
-
|
|
599
|
+
#I(t) {
|
|
600
|
+
let e = this.#g, i = this.#u[e], s = this.#f[e], h = this.#F(s);
|
|
601
|
+
h && s.__abortController.abort(/* @__PURE__ */ new Error("evicted"));
|
|
602
|
+
let n = h ? s.__staleWhileFetching : s;
|
|
603
|
+
return (this.#_ || this.#O) && void 0 !== n && (this.#_ && this.#i?.(n, i, "evict"), this.#O && this.#w?.push([
|
|
604
|
+
n,
|
|
604
605
|
i,
|
|
605
606
|
"evict"
|
|
606
|
-
])), this.#U(e), this.#
|
|
607
|
+
])), this.#U(e), this.#z?.[e] && (clearTimeout(this.#z[e]), this.#z[e] = void 0), t && (this.#u[e] = void 0, this.#f[e] = void 0, this.#m.push(e)), 1 === this.#a ? (this.#g = this.#v = 0, this.#m.length = 0) : this.#g = this.#d[e], this.#c.delete(i), this.#a--, e;
|
|
607
608
|
}
|
|
608
609
|
has(t, e = {}) {
|
|
609
|
-
let { status: i =
|
|
610
|
-
e.status = i, i && (i.op = "has", i.key = t);
|
|
610
|
+
let { status: i = y.hasSubscribers ? {} : void 0 } = e;
|
|
611
|
+
e.status = i, i && (i.op = "has", i.key = t, i.cache = this);
|
|
611
612
|
let s = this.#X(t, e);
|
|
612
|
-
return
|
|
613
|
+
return y.hasSubscribers && y.publish(i), s;
|
|
613
614
|
}
|
|
614
615
|
#X(t, e = {}) {
|
|
615
|
-
let { updateAgeOnHas: i = this.updateAgeOnHas, status: s } = e,
|
|
616
|
-
if (void 0 !==
|
|
617
|
-
let t = this.#f[
|
|
616
|
+
let { updateAgeOnHas: i = this.updateAgeOnHas, status: s } = e, h = this.#c.get(t);
|
|
617
|
+
if (void 0 !== h) {
|
|
618
|
+
let t = this.#f[h];
|
|
618
619
|
if (this.#F(t) && void 0 === t.__staleWhileFetching) return !1;
|
|
619
|
-
if (!this.#
|
|
620
|
-
s && (s.has = "stale", this.#G(s,
|
|
620
|
+
if (!this.#C(h)) return i && this.#M(h), s && (s.has = "hit", this.#G(s, h)), !0;
|
|
621
|
+
s && (s.has = "stale", this.#G(s, h));
|
|
621
622
|
} else s && (s.has = "miss");
|
|
622
623
|
return !1;
|
|
623
624
|
}
|
|
624
625
|
peek(t, e = {}) {
|
|
625
626
|
let { status: i = E() ? {} : void 0 } = e;
|
|
626
|
-
i && (i.op = "peek", i.key = t), e.status = i;
|
|
627
|
+
i && (i.op = "peek", i.key = t, i.cache = this), e.status = i;
|
|
627
628
|
let s = this.#Y(t, e);
|
|
628
|
-
return
|
|
629
|
+
return y.hasSubscribers && y.publish(i), s;
|
|
629
630
|
}
|
|
630
631
|
#Y(t, e) {
|
|
631
|
-
let { status: i, allowStale: s = this.allowStale } = e,
|
|
632
|
-
if (void 0 ===
|
|
633
|
-
let
|
|
632
|
+
let { status: i, allowStale: s = this.allowStale } = e, h = this.#c.get(t);
|
|
633
|
+
if (void 0 === h || !s && this.#C(h)) return void (i && (i.peek = void 0 === h ? "miss" : "stale"));
|
|
634
|
+
let n = this.#f[h], r = this.#F(n) ? n.__staleWhileFetching : n;
|
|
634
635
|
return i && (void 0 !== r ? (i.peek = "hit", i.value = r) : i.peek = "miss"), r;
|
|
635
636
|
}
|
|
636
|
-
#
|
|
637
|
-
let
|
|
638
|
-
if (this.#F(
|
|
639
|
-
let
|
|
640
|
-
r?.addEventListener("abort", (
|
|
637
|
+
#T(t, e, i, s) {
|
|
638
|
+
let h = void 0 === e ? void 0 : this.#f[e];
|
|
639
|
+
if (this.#F(h)) return h;
|
|
640
|
+
let n = new AbortController(), { signal: r } = i;
|
|
641
|
+
r?.addEventListener("abort", () => n.abort(r.reason), { signal: n.signal });
|
|
641
642
|
let o = {
|
|
642
|
-
signal:
|
|
643
|
+
signal: n.signal,
|
|
643
644
|
options: i,
|
|
644
645
|
context: s
|
|
645
|
-
}, a = (s,
|
|
646
|
-
let { aborted: r } =
|
|
647
|
-
if (i.status && (r && !
|
|
646
|
+
}, a = (s, h = !1) => {
|
|
647
|
+
let { aborted: r } = n.signal, a = i.ignoreFetchAbort && void 0 !== s, u = i.ignoreFetchAbort || !(!i.allowStaleOnFetchAbort || void 0 === s);
|
|
648
|
+
if (i.status && (r && !h ? (i.status.fetchAborted = !0, i.status.fetchError = n.signal.reason, a && (i.status.fetchAbortIgnored = !0)) : i.status.fetchResolved = !0), r && !a && !h) return l(n.signal.reason, u);
|
|
648
649
|
let f = c, d = this.#f[e];
|
|
649
|
-
return (d === c || void 0 === d && a &&
|
|
650
|
-
}, l = (s,
|
|
651
|
-
let { aborted: r } =
|
|
652
|
-
if (this.#f[e] === c && (!l || !
|
|
650
|
+
return (d === c || void 0 === d && a && h) && (void 0 === s ? void 0 !== f.__staleWhileFetching ? this.#f[e] = f.__staleWhileFetching : this.#L(t, "fetch") : (i.status && (i.status.fetchUpdated = !0), this.#B(t, s, o.options, f))), s;
|
|
651
|
+
}, l = (s, h) => {
|
|
652
|
+
let { aborted: r } = n.signal, o = r && i.allowStaleOnFetchAbort, a = o || i.allowStaleOnFetchRejection, l = a || i.noDeleteOnFetchRejection, u = c;
|
|
653
|
+
if (this.#f[e] === c && (!l || !h && void 0 === u.__staleWhileFetching ? this.#L(t, "fetch") : o || (this.#f[e] = u.__staleWhileFetching)), a) return i.status && void 0 !== u.__staleWhileFetching && (i.status.returnedStale = !0), u.__staleWhileFetching;
|
|
653
654
|
if (u.__returned === u) throw s;
|
|
654
655
|
};
|
|
655
656
|
i.status && (i.status.fetchDispatched = !0);
|
|
656
|
-
let c = new Promise((
|
|
657
|
-
let r = this.#
|
|
658
|
-
|
|
657
|
+
let c = new Promise((e, s) => {
|
|
658
|
+
let r = this.#n?.(t, h, o);
|
|
659
|
+
n.signal.addEventListener("abort", () => {
|
|
659
660
|
(!i.ignoreFetchAbort || i.allowStaleOnFetchAbort) && (e(void 0), i.allowStaleOnFetchAbort && (e = (t) => a(t, !0)));
|
|
660
|
-
}));
|
|
661
|
-
})
|
|
662
|
-
__abortController:
|
|
663
|
-
__staleWhileFetching:
|
|
661
|
+
}), r && r instanceof Promise ? r.then((t) => e(void 0 === t ? void 0 : t), s) : void 0 !== r && e(r);
|
|
662
|
+
}).then(a, (t) => (i.status && (i.status.fetchRejected = !0, i.status.fetchError = t), l(t, !1))), u = Object.assign(c, {
|
|
663
|
+
__abortController: n,
|
|
664
|
+
__staleWhileFetching: h,
|
|
664
665
|
__returned: void 0
|
|
665
666
|
});
|
|
666
667
|
return void 0 === e ? (this.#B(t, u, {
|
|
@@ -674,24 +675,24 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
674
675
|
return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof AbortController;
|
|
675
676
|
}
|
|
676
677
|
fetch(t, e = {}) {
|
|
677
|
-
let i =
|
|
678
|
+
let i = z.hasSubscribers, { status: s = E() ? {} : void 0 } = e;
|
|
678
679
|
e.status = s, s && e.context && (s.context = e.context);
|
|
679
|
-
let
|
|
680
|
-
return s && i && (s.trace = !0,
|
|
680
|
+
let h = this.#q(t, e);
|
|
681
|
+
return s && i && (s.trace = !0, z.tracePromise(() => h, s).catch(() => {})), h;
|
|
681
682
|
}
|
|
682
683
|
async #q(t, e = {}) {
|
|
683
|
-
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet:
|
|
684
|
-
if (v && (v.op = "fetch", v.key = t, g && (v.forceRefresh = !0)), !this.#E) return v && (v.fetch = "get"), this.#$(t, {
|
|
684
|
+
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: h = this.noDeleteOnStaleGet, ttl: n = this.ttl, noDisposeOnSet: r = this.noDisposeOnSet, size: o = 0, sizeCalculation: a = this.sizeCalculation, noUpdateTTL: l = this.noUpdateTTL, noDeleteOnFetchRejection: c = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: u = this.allowStaleOnFetchRejection, ignoreFetchAbort: f = this.ignoreFetchAbort, allowStaleOnFetchAbort: d = this.allowStaleOnFetchAbort, context: p, forceRefresh: g = !1, status: v, signal: m } = e;
|
|
685
|
+
if (v && (v.op = "fetch", v.key = t, g && (v.forceRefresh = !0), v.cache = this), !this.#E) return v && (v.fetch = "get"), this.#$(t, {
|
|
685
686
|
allowStale: i,
|
|
686
687
|
updateAgeOnGet: s,
|
|
687
|
-
noDeleteOnStaleGet:
|
|
688
|
+
noDeleteOnStaleGet: h,
|
|
688
689
|
status: v
|
|
689
690
|
});
|
|
690
691
|
let w = {
|
|
691
692
|
allowStale: i,
|
|
692
693
|
updateAgeOnGet: s,
|
|
693
|
-
noDeleteOnStaleGet:
|
|
694
|
-
ttl:
|
|
694
|
+
noDeleteOnStaleGet: h,
|
|
695
|
+
ttl: n,
|
|
695
696
|
noDisposeOnSet: r,
|
|
696
697
|
size: o,
|
|
697
698
|
sizeCalculation: a,
|
|
@@ -702,29 +703,29 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
702
703
|
ignoreFetchAbort: f,
|
|
703
704
|
status: v,
|
|
704
705
|
signal: m
|
|
705
|
-
},
|
|
706
|
-
if (void 0 ===
|
|
706
|
+
}, S = this.#c.get(t);
|
|
707
|
+
if (void 0 === S) {
|
|
707
708
|
v && (v.fetch = "miss");
|
|
708
|
-
let e = this.#
|
|
709
|
+
let e = this.#T(t, S, w, p);
|
|
709
710
|
return e.__returned = e;
|
|
710
711
|
}
|
|
711
712
|
{
|
|
712
|
-
let e = this.#f[
|
|
713
|
+
let e = this.#f[S];
|
|
713
714
|
if (this.#F(e)) {
|
|
714
715
|
let t = i && void 0 !== e.__staleWhileFetching;
|
|
715
716
|
return v && (v.fetch = "inflight", t && (v.returnedStale = !0)), t ? e.__staleWhileFetching : e.__returned = e;
|
|
716
717
|
}
|
|
717
|
-
let
|
|
718
|
-
if (!g && !
|
|
719
|
-
let
|
|
720
|
-
return v && (v.fetch =
|
|
718
|
+
let h = this.#C(S);
|
|
719
|
+
if (!g && !h) return v && (v.fetch = "hit"), this.#x(S), s && this.#M(S), v && this.#G(v, S), e;
|
|
720
|
+
let n = this.#T(t, S, w, p), r = void 0 !== n.__staleWhileFetching && i;
|
|
721
|
+
return v && (v.fetch = h ? "stale" : "refresh", r && h && (v.returnedStale = !0)), r ? n.__staleWhileFetching : n.__returned = n;
|
|
721
722
|
}
|
|
722
723
|
}
|
|
723
724
|
forceFetch(t, e = {}) {
|
|
724
|
-
let i =
|
|
725
|
+
let i = z.hasSubscribers, { status: s = E() ? {} : void 0 } = e;
|
|
725
726
|
e.status = s, s && e.context && (s.context = e.context);
|
|
726
|
-
let
|
|
727
|
-
return s && i && (s.trace = !0,
|
|
727
|
+
let h = this.#K(t, e);
|
|
728
|
+
return s && i && (s.trace = !0, z.tracePromise(() => h, s).catch(() => {})), h;
|
|
728
729
|
}
|
|
729
730
|
async #K(t, e = {}) {
|
|
730
731
|
let i = await this.#q(t, e);
|
|
@@ -732,59 +733,60 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
732
733
|
return i;
|
|
733
734
|
}
|
|
734
735
|
memo(t, e = {}) {
|
|
735
|
-
let { status: i =
|
|
736
|
-
e.status = i, i && (i.op = "memo", i.key = t, e.context && (i.context = e.context));
|
|
736
|
+
let { status: i = y.hasSubscribers ? {} : void 0 } = e;
|
|
737
|
+
e.status = i, i && (i.op = "memo", i.key = t, e.context && (i.context = e.context), i.cache = this);
|
|
737
738
|
let s = this.#Q(t, e);
|
|
738
|
-
return i && (i.value = s),
|
|
739
|
+
return i && (i.value = s), y.hasSubscribers && y.publish(i), s;
|
|
739
740
|
}
|
|
740
741
|
#Q(t, e = {}) {
|
|
741
742
|
let i = this.#r;
|
|
742
743
|
if (!i) throw new Error("no memoMethod provided to constructor");
|
|
743
|
-
let { context: s, status:
|
|
744
|
-
|
|
745
|
-
let o = this.#$(t, r), a =
|
|
746
|
-
if (
|
|
744
|
+
let { context: s, status: h, forceRefresh: n, ...r } = e;
|
|
745
|
+
h && n && (h.forceRefresh = !0);
|
|
746
|
+
let o = this.#$(t, r), a = n || void 0 === o;
|
|
747
|
+
if (h && (h.memo = a ? "miss" : "hit", a || (h.value = o)), !a) return o;
|
|
747
748
|
let l = i(t, o, {
|
|
748
749
|
options: r,
|
|
749
750
|
context: s
|
|
750
751
|
});
|
|
751
|
-
return
|
|
752
|
+
return h && (h.value = l), this.#B(t, l, r), l;
|
|
752
753
|
}
|
|
753
754
|
get(t, e = {}) {
|
|
754
|
-
let { status: i =
|
|
755
|
-
e.status = i, i && (i.op = "get", i.key = t);
|
|
755
|
+
let { status: i = y.hasSubscribers ? {} : void 0 } = e;
|
|
756
|
+
e.status = i, i && (i.op = "get", i.key = t, i.cache = this);
|
|
756
757
|
let s = this.#$(t, e);
|
|
757
|
-
return i && (void 0 !== s && (i.value = s),
|
|
758
|
+
return i && (void 0 !== s && (i.value = s), y.hasSubscribers && y.publish(i)), s;
|
|
758
759
|
}
|
|
759
760
|
#$(t, e = {}) {
|
|
760
|
-
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet:
|
|
761
|
-
if (void 0 === r) return void (
|
|
761
|
+
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: h = this.noDeleteOnStaleGet, status: n } = e, r = this.#c.get(t);
|
|
762
|
+
if (void 0 === r) return void (n && (n.get = "miss"));
|
|
762
763
|
let o = this.#f[r], a = this.#F(o);
|
|
763
|
-
return
|
|
764
|
+
return n && this.#G(n, r), this.#C(r) ? a ? (n && (n.get = "stale-fetching"), i && void 0 !== o.__staleWhileFetching ? (n && (n.returnedStale = !0), o.__staleWhileFetching) : void 0) : (h || this.#L(t, "expire"), n && (n.get = "stale"), i ? (n && (n.returnedStale = !0), o) : void 0) : (n && (n.get = a ? "fetching" : "hit"), this.#x(r), s && this.#M(r), a ? o.__staleWhileFetching : o);
|
|
764
765
|
}
|
|
765
766
|
#V(t, e) {
|
|
766
767
|
this.#p[e] = t, this.#d[t] = e;
|
|
767
768
|
}
|
|
768
|
-
#
|
|
769
|
+
#x(t) {
|
|
769
770
|
t !== this.#v && (t === this.#g ? this.#g = this.#d[t] : this.#V(this.#p[t], this.#d[t]), this.#V(this.#v, t), this.#v = t);
|
|
770
771
|
}
|
|
771
772
|
delete(t) {
|
|
772
773
|
return this.#L(t, "delete");
|
|
773
774
|
}
|
|
774
775
|
#L(t, e) {
|
|
775
|
-
|
|
776
|
+
y.hasSubscribers && y.publish({
|
|
776
777
|
op: "delete",
|
|
777
778
|
delete: e,
|
|
778
|
-
key: t
|
|
779
|
+
key: t,
|
|
780
|
+
cache: this
|
|
779
781
|
});
|
|
780
782
|
let i = !1;
|
|
781
783
|
if (0 !== this.#a) {
|
|
782
784
|
let s = this.#c.get(t);
|
|
783
|
-
if (void 0 !== s) if (this.#
|
|
785
|
+
if (void 0 !== s) if (this.#z?.[s] && (clearTimeout(this.#z?.[s]), this.#z[s] = void 0), i = !0, 1 === this.#a) this.#J(e);
|
|
784
786
|
else {
|
|
785
787
|
this.#U(s);
|
|
786
788
|
let i = this.#f[s];
|
|
787
|
-
if (this.#F(i) ? i.__abortController.abort(/* @__PURE__ */ new Error("deleted")) : (this.#_ || this.#
|
|
789
|
+
if (this.#F(i) ? i.__abortController.abort(/* @__PURE__ */ new Error("deleted")) : (this.#_ || this.#O) && (this.#_ && this.#i?.(i, t, e), this.#O && this.#w?.push([
|
|
788
790
|
i,
|
|
789
791
|
t,
|
|
790
792
|
e
|
|
@@ -799,9 +801,9 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
799
801
|
this.#a--, this.#m.push(s);
|
|
800
802
|
}
|
|
801
803
|
}
|
|
802
|
-
if (this.#
|
|
804
|
+
if (this.#O && this.#w?.length) {
|
|
803
805
|
let t, e = this.#w;
|
|
804
|
-
for (; t = e?.shift();) this.#
|
|
806
|
+
for (; t = e?.shift();) this.#h?.(...t);
|
|
805
807
|
}
|
|
806
808
|
return i;
|
|
807
809
|
}
|
|
@@ -809,36 +811,36 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
809
811
|
return this.#J("delete");
|
|
810
812
|
}
|
|
811
813
|
#J(t) {
|
|
812
|
-
for (let e of this.#
|
|
814
|
+
for (let e of this.#R({ allowStale: !0 })) {
|
|
813
815
|
let i = this.#f[e];
|
|
814
816
|
if (this.#F(i)) i.__abortController.abort(/* @__PURE__ */ new Error("deleted"));
|
|
815
817
|
else {
|
|
816
818
|
let s = this.#u[e];
|
|
817
|
-
this.#_ && this.#i?.(i, s, t), this.#
|
|
819
|
+
this.#_ && this.#i?.(i, s, t), this.#O && this.#w?.push([
|
|
818
820
|
i,
|
|
819
821
|
s,
|
|
820
822
|
t
|
|
821
823
|
]);
|
|
822
824
|
}
|
|
823
825
|
}
|
|
824
|
-
if (this.#c.clear(), this.#f.fill(void 0), this.#u.fill(void 0), this.#
|
|
825
|
-
this.#
|
|
826
|
-
for (let t of this.#
|
|
827
|
-
this.#
|
|
826
|
+
if (this.#c.clear(), this.#f.fill(void 0), this.#u.fill(void 0), this.#y && this.#b) {
|
|
827
|
+
this.#y.fill(0), this.#b.fill(0);
|
|
828
|
+
for (let t of this.#z ?? []) void 0 !== t && clearTimeout(t);
|
|
829
|
+
this.#z?.fill(void 0);
|
|
828
830
|
}
|
|
829
|
-
if (this.#
|
|
831
|
+
if (this.#S && this.#S.fill(0), this.#g = 0, this.#v = 0, this.#m.length = 0, this.#l = 0, this.#a = 0, this.#O && this.#w) {
|
|
830
832
|
let t, e = this.#w;
|
|
831
|
-
for (; t = e?.shift();) this.#
|
|
833
|
+
for (; t = e?.shift();) this.#h?.(...t);
|
|
832
834
|
}
|
|
833
835
|
}
|
|
834
|
-
},
|
|
836
|
+
}, C = class {
|
|
835
837
|
static defaultOptions = {
|
|
836
838
|
max: 1e3,
|
|
837
839
|
ttl: 18e5
|
|
838
840
|
};
|
|
839
|
-
static cache = new
|
|
841
|
+
static cache = new R(this.defaultOptions);
|
|
840
842
|
static createCache(t = this.defaultOptions) {
|
|
841
|
-
return new
|
|
843
|
+
return new R(t);
|
|
842
844
|
}
|
|
843
845
|
static set(t, e, i = this.cache) {
|
|
844
846
|
let s = i;
|
|
@@ -878,8 +880,8 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
878
880
|
}
|
|
879
881
|
}, j = ((e, i) => {
|
|
880
882
|
let s = {};
|
|
881
|
-
for (var
|
|
882
|
-
get: e[
|
|
883
|
+
for (var h in e) t(s, h, {
|
|
884
|
+
get: e[h],
|
|
883
885
|
enumerable: !0
|
|
884
886
|
});
|
|
885
887
|
return i || t(s, Symbol.toStringTag, { value: "Module" }), s;
|
|
@@ -891,8 +893,8 @@ var S = { hasSubscribers: !1 }, b = S, T = S, _ = "object" == typeof performance
|
|
|
891
893
|
getCacheObject: () => M,
|
|
892
894
|
has: () => P,
|
|
893
895
|
keys: () => B,
|
|
894
|
-
maxSize: () =>
|
|
895
|
-
peek: () =>
|
|
896
|
+
maxSize: () => I,
|
|
897
|
+
peek: () => H,
|
|
896
898
|
remove: () => U,
|
|
897
899
|
set: () => L
|
|
898
900
|
});
|
|
@@ -907,8 +909,8 @@ async function W(t, e = void 0) {
|
|
|
907
909
|
...i,
|
|
908
910
|
...e
|
|
909
911
|
});
|
|
910
|
-
const
|
|
911
|
-
return D.set(t,
|
|
912
|
+
const h = C.createCache(s);
|
|
913
|
+
return D.set(t, h), h;
|
|
912
914
|
}
|
|
913
915
|
async function M(t = "") {
|
|
914
916
|
let e;
|
|
@@ -916,41 +918,41 @@ async function M(t = "") {
|
|
|
916
918
|
}
|
|
917
919
|
async function L(t, e, i = "") {
|
|
918
920
|
const s = await M(i);
|
|
919
|
-
return !!s && (
|
|
921
|
+
return !!s && (C.set(t, e, s), !0);
|
|
920
922
|
}
|
|
921
923
|
async function G(t, e = "") {
|
|
922
924
|
const i = await M(e);
|
|
923
925
|
if (i) {
|
|
924
|
-
const e =
|
|
926
|
+
const e = C.get(t, i);
|
|
925
927
|
return console.log("666000", t, e), e;
|
|
926
928
|
}
|
|
927
929
|
}
|
|
928
930
|
async function U(t, e = "") {
|
|
929
931
|
const i = await M(e);
|
|
930
|
-
if (i) return
|
|
932
|
+
if (i) return C.remove(t, i);
|
|
931
933
|
}
|
|
932
934
|
async function P(t, e = "") {
|
|
933
935
|
const i = await M(e);
|
|
934
|
-
return !!i &&
|
|
936
|
+
return !!i && C.has(t, i);
|
|
935
937
|
}
|
|
936
938
|
async function N(t = "") {
|
|
937
939
|
const e = await M(t);
|
|
938
|
-
return e ?
|
|
940
|
+
return e ? C.count(e) : 0;
|
|
939
941
|
}
|
|
940
|
-
async function
|
|
942
|
+
async function I(t = "") {
|
|
941
943
|
const e = await M(t);
|
|
942
|
-
return e ?
|
|
944
|
+
return e ? C.maxSize(e) : 0;
|
|
943
945
|
}
|
|
944
|
-
async function
|
|
946
|
+
async function H(t, e = "") {
|
|
945
947
|
const i = await M(e);
|
|
946
|
-
return !!i &&
|
|
948
|
+
return !!i && C.peek(t, i);
|
|
947
949
|
}
|
|
948
950
|
async function $(t = "") {
|
|
949
951
|
const e = await M(t);
|
|
950
|
-
return e &&
|
|
952
|
+
return e && C.clear(e), !1;
|
|
951
953
|
}
|
|
952
954
|
async function B(t = "") {
|
|
953
955
|
const e = await M(t);
|
|
954
|
-
if (e) return
|
|
956
|
+
if (e) return C.keys(e);
|
|
955
957
|
}
|
|
956
958
|
a(j);
|