@delta-comic/plugin 0.2.3 → 0.3.0
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/index.css +3 -0
- package/dist/index.js +1412 -953
- package/dist/index.js.map +1 -1
- package/dist/lib/driver/init/installer/9999_awesome.d.ts +12 -0
- package/dist/lib/driver/init/utils.d.ts +2 -2
- package/dist/pack.tgz +0 -0
- package/package.json +13 -7
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { DBUtils, PluginArchiveDB, SubscribeDB, db, useNativeStore } from "@delta-comic/db";
|
|
2
|
-
import { useGlobalVar } from "@delta-comic/utils";
|
|
3
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, getCurrentInstance, getCurrentScope, h, hasInjectionContext, inject, isRef, markRaw, mergeProps, onMounted, openBlock, reactive, ref, renderList, resolveDynamicComponent, shallowReactive, shallowRef, toValue, unref, watch, watchEffect, withCtx } from "vue";
|
|
4
|
-
import { defineStore } from "pinia";
|
|
5
|
-
import { PromiseContent, SourcedKeyMap, uni } from "@delta-comic/model";
|
|
6
|
-
import { SharedFunction } from "@delta-comic/core";
|
|
7
|
-
import { DcAwait, DcPopup, createDialog, createDownloadMessage, createForm } from "@delta-comic/ui";
|
|
8
|
-
import
|
|
9
|
-
var
|
|
1
|
+
import { DBUtils as e, PluginArchiveDB as t, SubscribeDB as n, db as r, useNativeStore as i } from "@delta-comic/db";
|
|
2
|
+
import { useGlobalVar as a } from "@delta-comic/utils";
|
|
3
|
+
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createVNode as d, defineComponent as f, getCurrentInstance as p, getCurrentScope as m, h, hasInjectionContext as g, inject as _, isRef as v, markRaw as y, mergeProps as b, onMounted as x, openBlock as S, reactive as C, ref as w, renderList as T, resolveDynamicComponent as E, shallowReactive as D, shallowRef as O, toValue as k, unref as A, watch as j, watchEffect as M, withCtx as N } from "vue";
|
|
4
|
+
import { defineStore as P } from "pinia";
|
|
5
|
+
import { PromiseContent as F, SourcedKeyMap as I, uni as L } from "@delta-comic/model";
|
|
6
|
+
import { SharedFunction as R } from "@delta-comic/core";
|
|
7
|
+
import { DcAwait as z, DcPopup as B, createDialog as V, createDownloadMessage as H, createForm as U } from "@delta-comic/ui";
|
|
8
|
+
import W from "axios";
|
|
9
|
+
var G = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), K = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
10
10
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
11
11
|
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
12
12
|
});
|
|
13
|
-
function
|
|
13
|
+
function q(e, t = 1) {
|
|
14
14
|
let n = [], r = Math.floor(t), i = (e, t) => {
|
|
15
15
|
for (let a = 0; a < e.length; a++) {
|
|
16
16
|
let o = e[a];
|
|
@@ -19,7 +19,7 @@ function flatten(e, t = 1) {
|
|
|
19
19
|
};
|
|
20
20
|
return i(e, 0), n;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function ee(e, t) {
|
|
23
23
|
let n = e.slice(), r = [], i = 0;
|
|
24
24
|
for (let a = 0; a < e.length; a++) {
|
|
25
25
|
if (t(e[a], a, n)) {
|
|
@@ -34,28 +34,28 @@ function remove$1(e, t) {
|
|
|
34
34
|
}
|
|
35
35
|
return e.length = i, r;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function te(e) {
|
|
38
38
|
return typeof e == "symbol" || e instanceof Symbol;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function ne(e) {
|
|
41
41
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function re(e) {
|
|
44
44
|
return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function ie(e, t) {
|
|
47
47
|
return e === t || Number.isNaN(e) && Number.isNaN(t);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function ae(e) {
|
|
50
50
|
return Number.isSafeInteger(e) && e >= 0;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function oe(e) {
|
|
53
53
|
return typeof e == "string";
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function se(e) {
|
|
56
56
|
return e === void 0;
|
|
57
57
|
}
|
|
58
|
-
var
|
|
58
|
+
var ce = class {
|
|
59
59
|
capacity;
|
|
60
60
|
available;
|
|
61
61
|
deferredTasks = [];
|
|
@@ -79,8 +79,8 @@ var Semaphore = class {
|
|
|
79
79
|
}
|
|
80
80
|
this.available < this.capacity && this.available++;
|
|
81
81
|
}
|
|
82
|
-
},
|
|
83
|
-
semaphore = new
|
|
82
|
+
}, le = class {
|
|
83
|
+
semaphore = new ce(1);
|
|
84
84
|
get isLocked() {
|
|
85
85
|
return this.semaphore.available === 0;
|
|
86
86
|
}
|
|
@@ -91,23 +91,23 @@ var Semaphore = class {
|
|
|
91
91
|
this.semaphore.release();
|
|
92
92
|
}
|
|
93
93
|
};
|
|
94
|
-
function
|
|
95
|
-
return e != null && typeof e != "function" &&
|
|
94
|
+
function ue(e) {
|
|
95
|
+
return e != null && typeof e != "function" && ae(e.length);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function de(e) {
|
|
98
98
|
return typeof e == "string" || typeof e == "symbol" ? e : Object.is(e?.valueOf?.(), -0) ? "-0" : String(e);
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function fe(e) {
|
|
101
101
|
if (e == null) return "";
|
|
102
102
|
if (typeof e == "string") return e;
|
|
103
|
-
if (Array.isArray(e)) return e.map(
|
|
103
|
+
if (Array.isArray(e)) return e.map(fe).join(",");
|
|
104
104
|
let t = String(e);
|
|
105
105
|
return t === "0" && Object.is(Number(e), -0) ? "-0" : t;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
if (Array.isArray(e)) return e.map(
|
|
107
|
+
function pe(e) {
|
|
108
|
+
if (Array.isArray(e)) return e.map(de);
|
|
109
109
|
if (typeof e == "symbol") return [e];
|
|
110
|
-
e =
|
|
110
|
+
e = fe(e);
|
|
111
111
|
let t = [], n = e.length;
|
|
112
112
|
if (n === 0) return t;
|
|
113
113
|
let r = 0, i = "", a = "", o = !1;
|
|
@@ -117,29 +117,29 @@ function toPath(e) {
|
|
|
117
117
|
}
|
|
118
118
|
return i && t.push(i), t;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function me(e) {
|
|
121
121
|
return e !== null && (typeof e == "object" || typeof e == "function");
|
|
122
122
|
}
|
|
123
|
-
var
|
|
124
|
-
function
|
|
123
|
+
var he = /^(?:0|[1-9]\d*)$/;
|
|
124
|
+
function ge(e, t = 2 ** 53 - 1) {
|
|
125
125
|
switch (typeof e) {
|
|
126
126
|
case "number": return Number.isInteger(e) && e >= 0 && e < t;
|
|
127
127
|
case "symbol": return !1;
|
|
128
|
-
case "string": return
|
|
128
|
+
case "string": return he.test(e);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
return typeof e == "object" && !!e &&
|
|
131
|
+
function _e(e) {
|
|
132
|
+
return typeof e == "object" && !!e && re(e) === "[object Arguments]";
|
|
133
133
|
}
|
|
134
|
-
function
|
|
135
|
-
return
|
|
134
|
+
function ve(e, t, n) {
|
|
135
|
+
return me(n) && (typeof t == "number" && ue(n) && ge(t) && t < n.length || typeof t == "string" && t in n) ? ie(n[t], e) : !1;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function ye(e) {
|
|
138
138
|
return typeof e == "symbol" ? 1 : e === null ? 2 : e === void 0 ? 3 : e === e ? 0 : 4;
|
|
139
139
|
}
|
|
140
|
-
var
|
|
140
|
+
var be = (e, t, n) => {
|
|
141
141
|
if (e !== t) {
|
|
142
|
-
let r =
|
|
142
|
+
let r = ye(e), i = ye(t);
|
|
143
143
|
if (r === i && r === 0) {
|
|
144
144
|
if (e < t) return n === "desc" ? 1 : -1;
|
|
145
145
|
if (e > t) return n === "desc" ? -1 : 1;
|
|
@@ -147,45 +147,45 @@ var compareValues = (e, t, n) => {
|
|
|
147
147
|
return n === "desc" ? i - r : r - i;
|
|
148
148
|
}
|
|
149
149
|
return 0;
|
|
150
|
-
},
|
|
151
|
-
function
|
|
152
|
-
return Array.isArray(e) ? !1 : typeof e == "number" || typeof e == "boolean" || e == null ||
|
|
150
|
+
}, xe = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Se = /^\w*$/;
|
|
151
|
+
function Ce(e, t) {
|
|
152
|
+
return Array.isArray(e) ? !1 : typeof e == "number" || typeof e == "boolean" || e == null || te(e) ? !0 : typeof e == "string" && (Se.test(e) || !xe.test(e)) || t != null && Object.hasOwn(t, e);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function we(e, t, n, r) {
|
|
155
155
|
if (e == null) return [];
|
|
156
156
|
n = r ? void 0 : n, Array.isArray(e) || (e = Object.values(e)), Array.isArray(t) || (t = t == null ? [null] : [t]), t.length === 0 && (t = [null]), Array.isArray(n) || (n = n == null ? [] : [n]), n = n.map((e) => String(e));
|
|
157
157
|
let i = (e, t) => {
|
|
158
158
|
let n = e;
|
|
159
159
|
for (let e = 0; e < t.length && n != null; ++e) n = n[t[e]];
|
|
160
160
|
return n;
|
|
161
|
-
}, a = (e, t) => t == null || e == null ? t : typeof e == "object" && "key" in e ? Object.hasOwn(t, e.key) ? t[e.key] : i(t, e.path) : typeof e == "function" ? e(t) : Array.isArray(e) ? i(t, e) : typeof t == "object" ? t[e] : t, o = t.map((e) => (Array.isArray(e) && e.length === 1 && (e = e[0]), e == null || typeof e == "function" || Array.isArray(e) ||
|
|
161
|
+
}, a = (e, t) => t == null || e == null ? t : typeof e == "object" && "key" in e ? Object.hasOwn(t, e.key) ? t[e.key] : i(t, e.path) : typeof e == "function" ? e(t) : Array.isArray(e) ? i(t, e) : typeof t == "object" ? t[e] : t, o = t.map((e) => (Array.isArray(e) && e.length === 1 && (e = e[0]), e == null || typeof e == "function" || Array.isArray(e) || Ce(e) ? e : {
|
|
162
162
|
key: e,
|
|
163
|
-
path:
|
|
163
|
+
path: pe(e)
|
|
164
164
|
}));
|
|
165
165
|
return e.map((e) => ({
|
|
166
166
|
original: e,
|
|
167
167
|
criteria: o.map((t) => a(t, e))
|
|
168
168
|
})).slice().sort((e, t) => {
|
|
169
169
|
for (let r = 0; r < o.length; r++) {
|
|
170
|
-
let i =
|
|
170
|
+
let i = be(e.criteria[r], t.criteria[r], n[r]);
|
|
171
171
|
if (i !== 0) return i;
|
|
172
172
|
}
|
|
173
173
|
return 0;
|
|
174
174
|
}).map((e) => e.original);
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function Te(e, ...t) {
|
|
177
177
|
let n = t.length;
|
|
178
|
-
return n > 1 &&
|
|
178
|
+
return n > 1 && ve(e, t[0], t[1]) ? t = [] : n > 2 && ve(t[0], t[1], t[2]) && (t = [t[0]]), we(e, q(t), ["asc"]);
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function Ee(e) {
|
|
181
181
|
let t = e?.constructor;
|
|
182
182
|
return e === (typeof t == "function" ? t.prototype : Object.prototype);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
return
|
|
184
|
+
function De(e) {
|
|
185
|
+
return ne(e);
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
if (!
|
|
187
|
+
function Oe(e) {
|
|
188
|
+
if (!ue(e)) return {};
|
|
189
189
|
let t = {};
|
|
190
190
|
for (let n = 0; n < e.length; n++) {
|
|
191
191
|
let [r, i] = e[n];
|
|
@@ -193,20 +193,20 @@ function fromPairs(e) {
|
|
|
193
193
|
}
|
|
194
194
|
return t;
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function ke(e) {
|
|
197
197
|
return typeof e == "function";
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function Ae(e) {
|
|
200
200
|
if (e == null) return !0;
|
|
201
|
-
if (
|
|
201
|
+
if (ue(e)) return typeof e.splice != "function" && typeof e != "string" && (typeof Buffer > "u" || !Buffer.isBuffer(e)) && !De(e) && !_e(e) ? !1 : e.length === 0;
|
|
202
202
|
if (typeof e == "object") {
|
|
203
203
|
if (e instanceof Map || e instanceof Set) return e.size === 0;
|
|
204
204
|
let t = Object.keys(e);
|
|
205
|
-
return
|
|
205
|
+
return Ee(e) ? t.filter((e) => e !== "constructor").length === 0 : t.length === 0;
|
|
206
206
|
}
|
|
207
207
|
return !0;
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function je(e) {
|
|
210
210
|
return {
|
|
211
211
|
all: e ||= /* @__PURE__ */ new Map(),
|
|
212
212
|
on: function(t, n) {
|
|
@@ -227,24 +227,24 @@ function mitt_default(e) {
|
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
230
|
+
const Me = je(), Ne = async (e) => {
|
|
231
|
+
if (ke(e)) var t = e(window.$$safe$$);
|
|
232
232
|
else var t = e;
|
|
233
|
-
return console.log("[definePlugin] new plugin defining...", t), await
|
|
234
|
-
},
|
|
233
|
+
return console.log("[definePlugin] new plugin defining...", t), await Me.emit("definedPlugin", t), t;
|
|
234
|
+
}, Pe = (e) => ({
|
|
235
235
|
name: {
|
|
236
236
|
display: e["name:display"],
|
|
237
237
|
id: e["name:id"]
|
|
238
238
|
},
|
|
239
239
|
author: e.author ?? "",
|
|
240
240
|
description: e.description,
|
|
241
|
-
require: (e.require ?
|
|
241
|
+
require: (e.require ? oe(e.require) ? [e.require] : e.require : []).map((e) => {
|
|
242
242
|
let [t, ...n] = e.split(":");
|
|
243
243
|
if (t.startsWith("dc|")) return {
|
|
244
244
|
id: t.replace(/^dc\|/, ""),
|
|
245
245
|
download: n.join(":")
|
|
246
246
|
};
|
|
247
|
-
}).filter((e) => !
|
|
247
|
+
}).filter((e) => !se(e)),
|
|
248
248
|
version: {
|
|
249
249
|
plugin: e.version.split("/")[0],
|
|
250
250
|
supportCore: (() => {
|
|
@@ -253,30 +253,38 @@ const pluginEmitter = mitt_default(), definePlugin = async (e) => {
|
|
|
253
253
|
})()
|
|
254
254
|
}
|
|
255
255
|
});
|
|
256
|
-
var
|
|
257
|
-
let t = e[0], n =
|
|
258
|
-
if (n == null && !
|
|
259
|
-
return n &&
|
|
260
|
-
},
|
|
256
|
+
var Fe = /* @__PURE__ */ new WeakMap(), Ie = (...e) => {
|
|
257
|
+
let t = e[0], n = p()?.proxy ?? m();
|
|
258
|
+
if (n == null && !g()) throw Error("injectLocal must be called in setup");
|
|
259
|
+
return n && Fe.has(n) && t in Fe.get(n) ? Fe.get(n)[t] : _(...e);
|
|
260
|
+
}, Le = typeof window < "u" && typeof document < "u";
|
|
261
261
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
262
|
-
var
|
|
263
|
-
|
|
262
|
+
var Re = Object.prototype.toString, ze = (e) => Re.call(e) === "[object Object]", Be = () => {};
|
|
263
|
+
/**
|
|
264
|
+
* Get a px value for SSR use, do not rely on this method outside of SSR as REM unit is assumed at 16px, which might not be the case on the client
|
|
265
|
+
*/
|
|
266
|
+
function Ve(e) {
|
|
264
267
|
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
265
268
|
}
|
|
266
|
-
function
|
|
269
|
+
function He(e) {
|
|
267
270
|
return Array.isArray(e) ? e : [e];
|
|
268
271
|
}
|
|
269
|
-
|
|
270
|
-
|
|
272
|
+
/**
|
|
273
|
+
* Shorthand for watching value with {immediate: true}
|
|
274
|
+
*
|
|
275
|
+
* @see https://vueuse.org/watchImmediate
|
|
276
|
+
*/
|
|
277
|
+
function Ue(e, t, n) {
|
|
278
|
+
return j(e, t, {
|
|
271
279
|
...n,
|
|
272
280
|
immediate: !0
|
|
273
281
|
});
|
|
274
282
|
}
|
|
275
|
-
function
|
|
283
|
+
function We(e, t, n) {
|
|
276
284
|
let r;
|
|
277
|
-
r =
|
|
278
|
-
let { lazy: i = !1, flush: a = "sync", evaluating: o = void 0, shallow: c = !0, onError: l = globalThis.reportError ??
|
|
279
|
-
return
|
|
285
|
+
r = v(n) ? { evaluating: n } : n || {};
|
|
286
|
+
let { lazy: i = !1, flush: a = "sync", evaluating: o = void 0, shallow: c = !0, onError: l = globalThis.reportError ?? Be } = r, u = O(!i), d = c ? O(t) : w(t), f = 0;
|
|
287
|
+
return M(async (t) => {
|
|
280
288
|
if (!u.value) return;
|
|
281
289
|
f++;
|
|
282
290
|
let n = f, r = !1;
|
|
@@ -295,74 +303,101 @@ function computedAsync(e, t, n) {
|
|
|
295
303
|
} finally {
|
|
296
304
|
o && n === f && (o.value = !1), r = !0;
|
|
297
305
|
}
|
|
298
|
-
}, { flush: a }), i ?
|
|
306
|
+
}, { flush: a }), i ? s(() => (u.value = !0, d.value)) : d;
|
|
299
307
|
}
|
|
300
|
-
var
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
308
|
+
var Ge = Le ? window : void 0;
|
|
309
|
+
Le && window.document, Le && window.navigator, Le && window.location;
|
|
310
|
+
/**
|
|
311
|
+
* Get the dom element of a ref of element or Vue component instance
|
|
312
|
+
*
|
|
313
|
+
* @param elRef
|
|
314
|
+
*/
|
|
315
|
+
function Ke(e) {
|
|
316
|
+
let t = k(e);
|
|
304
317
|
return t?.$el ?? t;
|
|
305
318
|
}
|
|
306
|
-
function
|
|
307
|
-
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n =
|
|
308
|
-
let t =
|
|
319
|
+
function qe(...e) {
|
|
320
|
+
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = s(() => {
|
|
321
|
+
let t = He(k(e[0])).filter((e) => e != null);
|
|
309
322
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
310
323
|
});
|
|
311
|
-
return
|
|
312
|
-
n.value?.map((e) =>
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
324
|
+
return Ue(() => [
|
|
325
|
+
n.value?.map((e) => Ke(e)) ?? [Ge].filter((e) => e != null),
|
|
326
|
+
He(k(n.value ? e[1] : e[0])),
|
|
327
|
+
He(A(n.value ? e[2] : e[1])),
|
|
328
|
+
k(n.value ? e[3] : e[2])
|
|
316
329
|
], ([e, n, r, i], a, o) => {
|
|
317
330
|
if (!e?.length || !n?.length || !r?.length) return;
|
|
318
|
-
let s =
|
|
331
|
+
let s = ze(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
319
332
|
o(() => {
|
|
320
333
|
c.forEach((e) => e());
|
|
321
334
|
});
|
|
322
335
|
}, { flush: "post" });
|
|
323
336
|
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
337
|
+
/**
|
|
338
|
+
* Mounted state in ref.
|
|
339
|
+
*
|
|
340
|
+
* @see https://vueuse.org/useMounted
|
|
341
|
+
*
|
|
342
|
+
* @__NO_SIDE_EFFECTS__
|
|
343
|
+
*/
|
|
344
|
+
function Je() {
|
|
345
|
+
let e = O(!1), t = p();
|
|
346
|
+
return t && x(() => {
|
|
327
347
|
e.value = !0;
|
|
328
348
|
}, t), e;
|
|
329
349
|
}
|
|
330
350
|
/* @__NO_SIDE_EFFECTS__ */
|
|
331
|
-
function
|
|
332
|
-
let t =
|
|
333
|
-
return
|
|
351
|
+
function Ye(e) {
|
|
352
|
+
let t = Je();
|
|
353
|
+
return s(() => (t.value, !!e()));
|
|
334
354
|
}
|
|
335
|
-
var
|
|
355
|
+
var Xe = Symbol("vueuse-ssr-width");
|
|
336
356
|
/* @__NO_SIDE_EFFECTS__ */
|
|
337
|
-
function
|
|
338
|
-
let e =
|
|
357
|
+
function Ze() {
|
|
358
|
+
let e = g() ? Ie(Xe, null) : null;
|
|
339
359
|
return typeof e == "number" ? e : void 0;
|
|
340
360
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
361
|
+
/**
|
|
362
|
+
* Reactive Media Query.
|
|
363
|
+
*
|
|
364
|
+
* @see https://vueuse.org/useMediaQuery
|
|
365
|
+
* @param query
|
|
366
|
+
* @param options
|
|
367
|
+
*/
|
|
368
|
+
function Qe(e, t = {}) {
|
|
369
|
+
let { window: n = Ge, ssrWidth: r = /* @__PURE__ */ Ze() } = t, i = /* @__PURE__ */ Ye(() => n && "matchMedia" in n && typeof n.matchMedia == "function"), a = O(typeof r == "number"), o = O(), c = O(!1);
|
|
370
|
+
return M(() => {
|
|
344
371
|
if (a.value) {
|
|
345
|
-
a.value = !i.value, c.value =
|
|
372
|
+
a.value = !i.value, c.value = k(e).split(",").some((e) => {
|
|
346
373
|
let t = e.includes("not all"), n = e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), i = e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), a = !!(n || i);
|
|
347
|
-
return n && a && (a = r >=
|
|
374
|
+
return n && a && (a = r >= Ve(n[1])), i && a && (a = r <= Ve(i[1])), t ? !a : a;
|
|
348
375
|
});
|
|
349
376
|
return;
|
|
350
377
|
}
|
|
351
|
-
i.value && (o.value = n.matchMedia(
|
|
352
|
-
}),
|
|
378
|
+
i.value && (o.value = n.matchMedia(k(e)), c.value = o.value.matches);
|
|
379
|
+
}), qe(o, "change", (e) => {
|
|
353
380
|
c.value = e.matches;
|
|
354
|
-
}, { passive: !0 }),
|
|
381
|
+
}, { passive: !0 }), s(() => c.value);
|
|
355
382
|
}
|
|
356
|
-
|
|
357
|
-
|
|
383
|
+
/**
|
|
384
|
+
* Reactive dark theme preference.
|
|
385
|
+
*
|
|
386
|
+
* @see https://vueuse.org/usePreferredDark
|
|
387
|
+
* @param [options]
|
|
388
|
+
*
|
|
389
|
+
* @__NO_SIDE_EFFECTS__
|
|
390
|
+
*/
|
|
391
|
+
function $e(e) {
|
|
392
|
+
return Qe("(prefers-color-scheme: dark)", e);
|
|
358
393
|
}
|
|
359
|
-
var
|
|
394
|
+
var et = class {
|
|
360
395
|
constructor(e, t, n) {
|
|
361
396
|
this.pluginName = e, this.config = t, this.configName = n, this.key = Symbol.for(`config:${e}`);
|
|
362
397
|
}
|
|
363
398
|
key;
|
|
364
399
|
};
|
|
365
|
-
const
|
|
400
|
+
const tt = a(new et("core", {
|
|
366
401
|
recordHistory: {
|
|
367
402
|
type: "switch",
|
|
368
403
|
defaultValue: !0,
|
|
@@ -404,14 +439,14 @@ const appConfig = useGlobalVar(new ConfigPointer("core", {
|
|
|
404
439
|
info: "github的token",
|
|
405
440
|
placeholder: "仅用于解除api访问限制"
|
|
406
441
|
}
|
|
407
|
-
}, "核心"), "core/plugin/config"),
|
|
408
|
-
let t =
|
|
442
|
+
}, "核心"), "core/plugin/config"), nt = P("config", (e) => {
|
|
443
|
+
let t = D(/* @__PURE__ */ new Map()), n = e.action((e) => {
|
|
409
444
|
let n = t.get(e.key);
|
|
410
445
|
if (!n) throw Error(`not found config by plugin "${e.pluginName}"`);
|
|
411
446
|
return n.value;
|
|
412
|
-
}, "load"), r =
|
|
413
|
-
if (!o(
|
|
414
|
-
switch (n(
|
|
447
|
+
}, "load"), r = $e(), a = s(() => {
|
|
448
|
+
if (!o(tt)) return r.value;
|
|
449
|
+
switch (n(tt).value.darkMode) {
|
|
415
450
|
case "light": return !1;
|
|
416
451
|
case "dark": return !0;
|
|
417
452
|
case "system": return r.value;
|
|
@@ -424,52 +459,52 @@ const appConfig = useGlobalVar(new ConfigPointer("core", {
|
|
|
424
459
|
$load: n,
|
|
425
460
|
$isExistConfig: o,
|
|
426
461
|
$resignerConfig: e.action((e) => {
|
|
427
|
-
let t =
|
|
462
|
+
let t = nt(), n = i(e.pluginName, "config", Oe(Object.entries(e.config).map(([e, t]) => [e, t.defaultValue])));
|
|
428
463
|
t.form.set(e.key, {
|
|
429
464
|
form: e.config,
|
|
430
465
|
value: n
|
|
431
466
|
});
|
|
432
467
|
}, "resignerConfig")
|
|
433
468
|
};
|
|
434
|
-
}),
|
|
435
|
-
share =
|
|
436
|
-
shareToken =
|
|
437
|
-
userActions =
|
|
438
|
-
subscribes =
|
|
439
|
-
globalNodes =
|
|
440
|
-
tabbar =
|
|
469
|
+
}), rt = (e) => Symbol.for(`expose:${e}`), it = (e) => at.get(e), at = /* @__PURE__ */ new Map(), J = a(new class {
|
|
470
|
+
share = D(I.create());
|
|
471
|
+
shareToken = D(I.create());
|
|
472
|
+
userActions = D(I.create());
|
|
473
|
+
subscribes = D(I.create());
|
|
474
|
+
globalNodes = D([]);
|
|
475
|
+
tabbar = D(/* @__PURE__ */ new Map());
|
|
441
476
|
addTabbar(e, ...t) {
|
|
442
477
|
let n = this.tabbar.get(e) ?? [];
|
|
443
478
|
this.tabbar.set(e, n.concat(t));
|
|
444
479
|
}
|
|
445
|
-
categories =
|
|
480
|
+
categories = D(/* @__PURE__ */ new Map());
|
|
446
481
|
addCategories(e, ...t) {
|
|
447
482
|
let n = this.categories.get(e) ?? [];
|
|
448
483
|
this.categories.set(e, n.concat(t));
|
|
449
484
|
}
|
|
450
|
-
barcode =
|
|
485
|
+
barcode = D(/* @__PURE__ */ new Map());
|
|
451
486
|
addBarcode(e, ...t) {
|
|
452
487
|
let n = this.barcode.get(e) ?? [];
|
|
453
488
|
this.barcode.set(e, n.concat(t));
|
|
454
489
|
}
|
|
455
|
-
levelboard =
|
|
490
|
+
levelboard = D(/* @__PURE__ */ new Map());
|
|
456
491
|
addLevelboard(e, ...t) {
|
|
457
492
|
let n = this.levelboard.get(e) ?? [];
|
|
458
493
|
this.levelboard.set(e, n.concat(t));
|
|
459
494
|
}
|
|
460
|
-
topButton =
|
|
495
|
+
topButton = D(/* @__PURE__ */ new Map());
|
|
461
496
|
addTopButton(e, ...t) {
|
|
462
497
|
let n = this.topButton.get(e) ?? [];
|
|
463
498
|
this.topButton.set(e, n.concat(t));
|
|
464
499
|
}
|
|
465
|
-
mainLists =
|
|
500
|
+
mainLists = D(/* @__PURE__ */ new Map());
|
|
466
501
|
addMainList(e, ...t) {
|
|
467
502
|
let n = this.mainLists.get(e) ?? [];
|
|
468
503
|
this.mainLists.set(e, n.concat(t));
|
|
469
504
|
}
|
|
470
|
-
envExtends =
|
|
505
|
+
envExtends = D(/* @__PURE__ */ new Set());
|
|
471
506
|
}(), "core/global");
|
|
472
|
-
var
|
|
507
|
+
var ot = (/* @__PURE__ */ G(((e, t) => {
|
|
473
508
|
var n = (function() {
|
|
474
509
|
var e = String.fromCharCode, t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$", r = {};
|
|
475
510
|
function i(e, t) {
|
|
@@ -540,39 +575,39 @@ var import_lz_string = (/* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
|
540
575
|
},
|
|
541
576
|
_compress: function(e, t, n) {
|
|
542
577
|
if (e == null) return "";
|
|
543
|
-
var r, i, a = {}, o = {}, s = "", c = "", l = "", u = 2, d = 3, f = 2, p = [], m = 0,
|
|
544
|
-
for (
|
|
578
|
+
var r, i, a = {}, o = {}, s = "", c = "", l = "", u = 2, d = 3, f = 2, p = [], m = 0, h = 0, g;
|
|
579
|
+
for (g = 0; g < e.length; g += 1) if (s = e.charAt(g), Object.prototype.hasOwnProperty.call(a, s) || (a[s] = d++, o[s] = !0), c = l + s, Object.prototype.hasOwnProperty.call(a, c)) l = c;
|
|
545
580
|
else {
|
|
546
581
|
if (Object.prototype.hasOwnProperty.call(o, l)) {
|
|
547
582
|
if (l.charCodeAt(0) < 256) {
|
|
548
|
-
for (r = 0; r < f; r++) m <<= 1,
|
|
549
|
-
for (i = l.charCodeAt(0), r = 0; r < 8; r++) m = m << 1 | i & 1,
|
|
583
|
+
for (r = 0; r < f; r++) m <<= 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++;
|
|
584
|
+
for (i = l.charCodeAt(0), r = 0; r < 8; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
550
585
|
} else {
|
|
551
|
-
for (i = 1, r = 0; r < f; r++) m = m << 1 | i,
|
|
552
|
-
for (i = l.charCodeAt(0), r = 0; r < 16; r++) m = m << 1 | i & 1,
|
|
586
|
+
for (i = 1, r = 0; r < f; r++) m = m << 1 | i, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i = 0;
|
|
587
|
+
for (i = l.charCodeAt(0), r = 0; r < 16; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
553
588
|
}
|
|
554
589
|
u--, u == 0 && (u = 2 ** f, f++), delete o[l];
|
|
555
|
-
} else for (i = a[l], r = 0; r < f; r++) m = m << 1 | i & 1,
|
|
590
|
+
} else for (i = a[l], r = 0; r < f; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
556
591
|
u--, u == 0 && (u = 2 ** f, f++), a[c] = d++, l = String(s);
|
|
557
592
|
}
|
|
558
593
|
if (l !== "") {
|
|
559
594
|
if (Object.prototype.hasOwnProperty.call(o, l)) {
|
|
560
595
|
if (l.charCodeAt(0) < 256) {
|
|
561
|
-
for (r = 0; r < f; r++) m <<= 1,
|
|
562
|
-
for (i = l.charCodeAt(0), r = 0; r < 8; r++) m = m << 1 | i & 1,
|
|
596
|
+
for (r = 0; r < f; r++) m <<= 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++;
|
|
597
|
+
for (i = l.charCodeAt(0), r = 0; r < 8; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
563
598
|
} else {
|
|
564
|
-
for (i = 1, r = 0; r < f; r++) m = m << 1 | i,
|
|
565
|
-
for (i = l.charCodeAt(0), r = 0; r < 16; r++) m = m << 1 | i & 1,
|
|
599
|
+
for (i = 1, r = 0; r < f; r++) m = m << 1 | i, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i = 0;
|
|
600
|
+
for (i = l.charCodeAt(0), r = 0; r < 16; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
566
601
|
}
|
|
567
602
|
u--, u == 0 && (u = 2 ** f, f++), delete o[l];
|
|
568
|
-
} else for (i = a[l], r = 0; r < f; r++) m = m << 1 | i & 1,
|
|
603
|
+
} else for (i = a[l], r = 0; r < f; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
569
604
|
u--, u == 0 && (u = 2 ** f, f++);
|
|
570
605
|
}
|
|
571
|
-
for (i = 2, r = 0; r < f; r++) m = m << 1 | i & 1,
|
|
572
|
-
for (;;) if (m <<= 1,
|
|
606
|
+
for (i = 2, r = 0; r < f; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
607
|
+
for (;;) if (m <<= 1, h == t - 1) {
|
|
573
608
|
p.push(n(m));
|
|
574
609
|
break;
|
|
575
|
-
} else
|
|
610
|
+
} else h++;
|
|
576
611
|
return p.join("");
|
|
577
612
|
},
|
|
578
613
|
decompress: function(e) {
|
|
@@ -581,40 +616,40 @@ var import_lz_string = (/* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
|
581
616
|
});
|
|
582
617
|
},
|
|
583
618
|
_decompress: function(t, n, r) {
|
|
584
|
-
var i = [], a = 4, o = 4, s = 3, c = "", l = [], u, d, f, p, m, g, _
|
|
619
|
+
var i = [], a = 4, o = 4, s = 3, c = "", l = [], u, d, f, p, m, h, g, _ = {
|
|
585
620
|
val: r(0),
|
|
586
621
|
position: n,
|
|
587
622
|
index: 1
|
|
588
623
|
};
|
|
589
624
|
for (u = 0; u < 3; u += 1) i[u] = u;
|
|
590
|
-
for (f = 0, m = 2 ** 2,
|
|
625
|
+
for (f = 0, m = 2 ** 2, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= (p > 0 ? 1 : 0) * h, h <<= 1;
|
|
591
626
|
switch (f) {
|
|
592
627
|
case 0:
|
|
593
|
-
for (f = 0, m = 2 ** 8,
|
|
594
|
-
|
|
628
|
+
for (f = 0, m = 2 ** 8, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= (p > 0 ? 1 : 0) * h, h <<= 1;
|
|
629
|
+
g = e(f);
|
|
595
630
|
break;
|
|
596
631
|
case 1:
|
|
597
|
-
for (f = 0, m = 2 ** 16,
|
|
598
|
-
|
|
632
|
+
for (f = 0, m = 2 ** 16, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= (p > 0 ? 1 : 0) * h, h <<= 1;
|
|
633
|
+
g = e(f);
|
|
599
634
|
break;
|
|
600
635
|
case 2: return "";
|
|
601
636
|
}
|
|
602
|
-
for (i[3] =
|
|
603
|
-
if (
|
|
604
|
-
for (f = 0, m = 2 ** s,
|
|
605
|
-
switch (
|
|
637
|
+
for (i[3] = g, d = g, l.push(g);;) {
|
|
638
|
+
if (_.index > t) return "";
|
|
639
|
+
for (f = 0, m = 2 ** s, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= (p > 0 ? 1 : 0) * h, h <<= 1;
|
|
640
|
+
switch (g = f) {
|
|
606
641
|
case 0:
|
|
607
|
-
for (f = 0, m = 2 ** 8,
|
|
608
|
-
i[o++] = e(f),
|
|
642
|
+
for (f = 0, m = 2 ** 8, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= (p > 0 ? 1 : 0) * h, h <<= 1;
|
|
643
|
+
i[o++] = e(f), g = o - 1, a--;
|
|
609
644
|
break;
|
|
610
645
|
case 1:
|
|
611
|
-
for (f = 0, m = 2 ** 16,
|
|
612
|
-
i[o++] = e(f),
|
|
646
|
+
for (f = 0, m = 2 ** 16, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= (p > 0 ? 1 : 0) * h, h <<= 1;
|
|
647
|
+
i[o++] = e(f), g = o - 1, a--;
|
|
613
648
|
break;
|
|
614
649
|
case 2: return l.join("");
|
|
615
650
|
}
|
|
616
|
-
if (a == 0 && (a = 2 ** s, s++), i[
|
|
617
|
-
else if (
|
|
651
|
+
if (a == 0 && (a = 2 ** s, s++), i[g]) c = i[g];
|
|
652
|
+
else if (g === o) c = d + d.charAt(0);
|
|
618
653
|
else return null;
|
|
619
654
|
l.push(c), i[o++] = d + c.charAt(0), a--, d = c, a == 0 && (a = 2 ** s, s++);
|
|
620
655
|
}
|
|
@@ -628,81 +663,81 @@ var import_lz_string = (/* @__PURE__ */ __commonJSMin(((e, t) => {
|
|
|
628
663
|
return n;
|
|
629
664
|
});
|
|
630
665
|
})))();
|
|
631
|
-
const
|
|
666
|
+
const st = () => d("svg", {
|
|
632
667
|
xmlns: "http://www.w3.org/2000/svg",
|
|
633
668
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
634
669
|
viewBox: "0 0 24 24"
|
|
635
670
|
}, [
|
|
636
|
-
|
|
671
|
+
d("path", {
|
|
637
672
|
d: "M5 5c-.55 0-1 .45-1 1v15c0 1.1.9 2 2 2h9c.55 0 1-.45 1-1s-.45-1-1-1H6V6c0-.55-.45-1-1-1z",
|
|
638
673
|
fill: "currentColor"
|
|
639
674
|
}, null),
|
|
640
|
-
|
|
675
|
+
d("path", {
|
|
641
676
|
d: "M18 1h-8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 14h-8V5h8v10z",
|
|
642
677
|
fill: "currentColor"
|
|
643
678
|
}, null),
|
|
644
|
-
|
|
679
|
+
d("path", {
|
|
645
680
|
d: "M12.5 10.25h2v.54c0 .45.54.67.85.35l1.29-1.29c.2-.2.2-.51 0-.71l-1.29-1.29a.5.5 0 0 0-.85.35v.54H12c-.55 0-1 .45-1 1v1.5c0 .41.34.75.75.75s.75-.34.75-.75v-.99z",
|
|
646
681
|
fill: "currentColor"
|
|
647
682
|
}, null)
|
|
648
|
-
]),
|
|
683
|
+
]), ct = () => d("svg", {
|
|
649
684
|
xmlns: "http://www.w3.org/2000/svg",
|
|
650
685
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
651
686
|
viewBox: "0 0 1024 1024"
|
|
652
|
-
}, [
|
|
687
|
+
}, [d("path", {
|
|
653
688
|
d: "M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 0 0 0 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3L589 164.6L836 188l23.4 247l-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88s88-39.5 88-88s-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32s32 14.3 32 32s-14.3 32-32 32z",
|
|
654
689
|
fill: "currentColor"
|
|
655
|
-
}, null)]),
|
|
656
|
-
let t =
|
|
690
|
+
}, null)]), lt = a(P("plugin", (e) => {
|
|
691
|
+
let t = D(/* @__PURE__ */ new Map()), n = C({}), i = We(async () => Object.fromEntries((await r.value.selectFrom("plugin").select(["pluginName", "displayName"]).execute()).map((e) => [e.pluginName, e.displayName])), {}), a = s(() => Array.from(t.values()).filter((e) => e.search?.methods).map((e) => [e.name, Object.entries(e.search?.methods ?? {})]));
|
|
657
692
|
return {
|
|
658
693
|
$getPluginDisplayName: e.action((e) => i.value[e] || e, "getPluginDisplayName"),
|
|
659
694
|
plugins: t,
|
|
660
695
|
allSearchSource: a,
|
|
661
696
|
pluginSteps: n
|
|
662
697
|
};
|
|
663
|
-
}), "core/plugin/store"),
|
|
664
|
-
name:
|
|
665
|
-
config: [
|
|
698
|
+
}), "core/plugin/store"), ut = () => Ne({
|
|
699
|
+
name: Y,
|
|
700
|
+
config: [tt],
|
|
666
701
|
onBooted: () => {
|
|
667
|
-
|
|
668
|
-
await
|
|
669
|
-
key:
|
|
702
|
+
R.define(async (t) => await e.countDb(r.value.selectFrom("subscribe").where("key", "=", n.key.toString([t.$$plugin, t.label]))) > 0, Y, "getIsAuthorSubscribe"), R.define(async (e) => {
|
|
703
|
+
await n.upsert({
|
|
704
|
+
key: n.key.toString([e.$$plugin, e.label]),
|
|
670
705
|
author: e,
|
|
671
706
|
plugin: e.$$plugin,
|
|
672
707
|
type: "author",
|
|
673
708
|
itemKey: null
|
|
674
709
|
});
|
|
675
|
-
},
|
|
676
|
-
await
|
|
677
|
-
},
|
|
710
|
+
}, Y, "addAuthorSubscribe"), R.define(async (e) => {
|
|
711
|
+
await r.value.deleteFrom("subscribe").where("key", "=", n.key.toString([e.$$plugin, e.label])).execute();
|
|
712
|
+
}, Y, "removeAuthorSubscribe");
|
|
678
713
|
},
|
|
679
714
|
share: {
|
|
680
715
|
initiative: [{
|
|
681
716
|
filter: () => !0,
|
|
682
|
-
icon:
|
|
717
|
+
icon: ct,
|
|
683
718
|
key: "token",
|
|
684
719
|
name: "复制口令",
|
|
685
720
|
async call(e) {
|
|
686
|
-
let t = e.union.value.toJSON(), n = (0,
|
|
721
|
+
let t = e.union.value.toJSON(), n = (0, ot.compressToEncodedURIComponent)(JSON.stringify({
|
|
687
722
|
item: {
|
|
688
|
-
contentType:
|
|
723
|
+
contentType: L.content.ContentPage.contentPage.toString(t.contentType),
|
|
689
724
|
ep: t.thisEp.index,
|
|
690
725
|
name: t.title
|
|
691
726
|
},
|
|
692
727
|
plugin: e.plugin,
|
|
693
728
|
id: e.id
|
|
694
729
|
}));
|
|
695
|
-
await
|
|
730
|
+
await R.call("pushShareToken", `[${e.union.value?.title}](复制这条口令,打开Delta Comic)${n}`);
|
|
696
731
|
}
|
|
697
732
|
}, {
|
|
698
733
|
filter: () => !0,
|
|
699
|
-
icon:
|
|
734
|
+
icon: st,
|
|
700
735
|
key: "native",
|
|
701
736
|
name: "原生分享",
|
|
702
737
|
async call(e) {
|
|
703
|
-
let t = e.union.value.toJSON(), n = (0,
|
|
738
|
+
let t = e.union.value.toJSON(), n = (0, ot.compressToEncodedURIComponent)(JSON.stringify({
|
|
704
739
|
item: {
|
|
705
|
-
contentType:
|
|
740
|
+
contentType: L.content.ContentPage.contentPage.toString(t.contentType),
|
|
706
741
|
ep: t.thisEp.index,
|
|
707
742
|
name: t.title
|
|
708
743
|
},
|
|
@@ -722,100 +757,221 @@ const OfflineShareRound = () => createVNode("svg", {
|
|
|
722
757
|
return /^\[.+\]\(复制这条口令,打开Delta Comic\).+/.test(e);
|
|
723
758
|
},
|
|
724
759
|
show(e) {
|
|
725
|
-
let t =
|
|
760
|
+
let t = lt(), n = JSON.parse((0, ot.decompressFromEncodedURIComponent)(e.replace(/^\[.+\]/, "").replaceAll("(复制这条口令,打开Delta Comic)", "")));
|
|
726
761
|
return {
|
|
727
762
|
title: "口令",
|
|
728
763
|
detail: `发现分享的内容: ${n.item.name},需要的插件: ${t.$getPluginDisplayName(n.plugin)}`,
|
|
729
764
|
onNegative() {},
|
|
730
765
|
onPositive() {
|
|
731
|
-
return
|
|
766
|
+
return R.call("routeToContent", n.item.contentType, n.id, n.item.ep);
|
|
732
767
|
}
|
|
733
768
|
};
|
|
734
769
|
}
|
|
735
770
|
}]
|
|
736
771
|
}
|
|
737
|
-
}),
|
|
738
|
-
|
|
739
|
-
|
|
772
|
+
}), Y = "core";
|
|
773
|
+
a(rt(Y), "core/plugin/coreFlag");
|
|
774
|
+
/******************************************************************************
|
|
775
|
+
Copyright (c) Microsoft Corporation.
|
|
776
|
+
|
|
777
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
778
|
+
purpose with or without fee is hereby granted.
|
|
779
|
+
|
|
780
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
781
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
782
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
783
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
784
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
785
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
786
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
787
|
+
***************************************************************************** */
|
|
788
|
+
function dt(e, t, n, r) {
|
|
740
789
|
if (n === "a" && !r) throw TypeError("Private accessor was defined without a getter");
|
|
741
790
|
if (typeof t == "function" ? e !== t || !r : !t.has(e)) throw TypeError("Cannot read private member from an object whose class did not declare it");
|
|
742
791
|
return n === "m" ? r : n === "a" ? r.call(e) : r ? r.value : t.get(e);
|
|
743
792
|
}
|
|
744
|
-
function
|
|
793
|
+
function ft(e, t, n, r, i) {
|
|
745
794
|
if (r === "m") throw TypeError("Private method is not writable");
|
|
746
795
|
if (r === "a" && !i) throw TypeError("Private accessor was defined without a setter");
|
|
747
796
|
if (typeof t == "function" ? e !== t || !i : !t.has(e)) throw TypeError("Cannot write private member to an object whose class did not declare it");
|
|
748
797
|
return r === "a" ? i.call(e, n) : i ? i.value = n : t.set(e, n), n;
|
|
749
798
|
}
|
|
750
|
-
var
|
|
751
|
-
|
|
799
|
+
var pt;
|
|
800
|
+
/**
|
|
801
|
+
* Sends a message to the backend.
|
|
802
|
+
* @example
|
|
803
|
+
* ```typescript
|
|
804
|
+
* import { invoke } from '@tauri-apps/api/core';
|
|
805
|
+
* await invoke('login', { user: 'tauri', password: 'poiwe3h4r5ip3yrhtew9ty' });
|
|
806
|
+
* ```
|
|
807
|
+
*
|
|
808
|
+
* @param cmd The command name.
|
|
809
|
+
* @param args The optional arguments to pass to the command.
|
|
810
|
+
* @param options The request options.
|
|
811
|
+
* @return A promise resolving or rejecting to the backend response.
|
|
812
|
+
*
|
|
813
|
+
* @since 1.0.0
|
|
814
|
+
*/
|
|
815
|
+
async function X(e, t = {}, n) {
|
|
752
816
|
return window.__TAURI_INTERNALS__.invoke(e, t, n);
|
|
753
817
|
}
|
|
754
|
-
|
|
818
|
+
/**
|
|
819
|
+
* Convert a device file path to an URL that can be loaded by the webview.
|
|
820
|
+
* Note that `asset:` and `http://asset.localhost` must be added to [`app.security.csp`](https://v2.tauri.app/reference/config/#csp-1) in `tauri.conf.json`.
|
|
821
|
+
* Example CSP value: `"csp": "default-src 'self' ipc: http://ipc.localhost; img-src 'self' asset: http://asset.localhost"` to use the asset protocol on image sources.
|
|
822
|
+
*
|
|
823
|
+
* Additionally, `"enable" : "true"` must be added to [`app.security.assetProtocol`](https://v2.tauri.app/reference/config/#assetprotocolconfig)
|
|
824
|
+
* in `tauri.conf.json` and its access scope must be defined on the `scope` array on the same `assetProtocol` object.
|
|
825
|
+
*
|
|
826
|
+
* @param filePath The file path.
|
|
827
|
+
* @param protocol The protocol to use. Defaults to `asset`. You only need to set this when using a custom protocol.
|
|
828
|
+
* @example
|
|
829
|
+
* ```typescript
|
|
830
|
+
* import { appDataDir, join } from '@tauri-apps/api/path';
|
|
831
|
+
* import { convertFileSrc } from '@tauri-apps/api/core';
|
|
832
|
+
* const appDataDirPath = await appDataDir();
|
|
833
|
+
* const filePath = await join(appDataDirPath, 'assets/video.mp4');
|
|
834
|
+
* const assetUrl = convertFileSrc(filePath);
|
|
835
|
+
*
|
|
836
|
+
* const video = document.getElementById('my-video');
|
|
837
|
+
* const source = document.createElement('source');
|
|
838
|
+
* source.type = 'video/mp4';
|
|
839
|
+
* source.src = assetUrl;
|
|
840
|
+
* video.appendChild(source);
|
|
841
|
+
* video.load();
|
|
842
|
+
* ```
|
|
843
|
+
*
|
|
844
|
+
* @return the URL that can be used as source on the webview.
|
|
845
|
+
*
|
|
846
|
+
* @since 1.0.0
|
|
847
|
+
*/
|
|
848
|
+
function mt(e, t = "asset") {
|
|
755
849
|
return window.__TAURI_INTERNALS__.convertFileSrc(e, t);
|
|
756
850
|
}
|
|
757
|
-
|
|
851
|
+
/**
|
|
852
|
+
* A rust-backed resource stored through `tauri::Manager::resources_table` API.
|
|
853
|
+
*
|
|
854
|
+
* The resource lives in the main process and does not exist
|
|
855
|
+
* in the Javascript world, and thus will not be cleaned up automatically
|
|
856
|
+
* except on application exit. If you want to clean it up early, call {@linkcode Resource.close}
|
|
857
|
+
*
|
|
858
|
+
* @example
|
|
859
|
+
* ```typescript
|
|
860
|
+
* import { Resource, invoke } from '@tauri-apps/api/core';
|
|
861
|
+
* export class DatabaseHandle extends Resource {
|
|
862
|
+
* static async open(path: string): Promise<DatabaseHandle> {
|
|
863
|
+
* const rid: number = await invoke('open_db', { path });
|
|
864
|
+
* return new DatabaseHandle(rid);
|
|
865
|
+
* }
|
|
866
|
+
*
|
|
867
|
+
* async execute(sql: string): Promise<void> {
|
|
868
|
+
* await invoke('execute_sql', { rid: this.rid, sql });
|
|
869
|
+
* }
|
|
870
|
+
* }
|
|
871
|
+
* ```
|
|
872
|
+
*/
|
|
873
|
+
var ht = class {
|
|
758
874
|
get rid() {
|
|
759
|
-
return
|
|
875
|
+
return dt(this, pt, "f");
|
|
760
876
|
}
|
|
761
877
|
constructor(e) {
|
|
762
|
-
|
|
878
|
+
pt.set(this, void 0), ft(this, pt, e, "f");
|
|
763
879
|
}
|
|
880
|
+
/**
|
|
881
|
+
* Destroys and cleans up this resource from memory.
|
|
882
|
+
* **You should not call any method on this object anymore and should drop any reference to it.**
|
|
883
|
+
*/
|
|
764
884
|
async close() {
|
|
765
|
-
return
|
|
885
|
+
return X("plugin:resources|close", { rid: this.rid });
|
|
766
886
|
}
|
|
767
887
|
};
|
|
768
|
-
|
|
769
|
-
|
|
888
|
+
pt = /* @__PURE__ */ new WeakMap();
|
|
889
|
+
/**
|
|
890
|
+
* The path module provides utilities for working with file and directory paths.
|
|
891
|
+
*
|
|
892
|
+
* This package is also accessible with `window.__TAURI__.path` when [`app.withGlobalTauri`](https://v2.tauri.app/reference/config/#withglobaltauri) in `tauri.conf.json` is set to `true`.
|
|
893
|
+
*
|
|
894
|
+
* It is recommended to allowlist only the APIs you use for optimal bundle size and security.
|
|
895
|
+
* @module
|
|
896
|
+
*/
|
|
897
|
+
/**
|
|
898
|
+
* @since 2.0.0
|
|
899
|
+
*/
|
|
900
|
+
var gt;
|
|
770
901
|
(function(e) {
|
|
902
|
+
/**
|
|
903
|
+
* @see {@link templateDir} for more information.
|
|
904
|
+
*/
|
|
771
905
|
e[e.Audio = 1] = "Audio", e[e.Cache = 2] = "Cache", e[e.Config = 3] = "Config", e[e.Data = 4] = "Data", e[e.LocalData = 5] = "LocalData", e[e.Document = 6] = "Document", e[e.Download = 7] = "Download", e[e.Picture = 8] = "Picture", e[e.Public = 9] = "Public", e[e.Video = 10] = "Video", e[e.Resource = 11] = "Resource", e[e.Temp = 12] = "Temp", e[e.AppConfig = 13] = "AppConfig", e[e.AppData = 14] = "AppData", e[e.AppLocalData = 15] = "AppLocalData", e[e.AppCache = 16] = "AppCache", e[e.AppLog = 17] = "AppLog", e[e.Desktop = 18] = "Desktop", e[e.Executable = 19] = "Executable", e[e.Font = 20] = "Font", e[e.Home = 21] = "Home", e[e.Runtime = 22] = "Runtime", e[e.Template = 23] = "Template";
|
|
772
|
-
})(
|
|
773
|
-
|
|
774
|
-
|
|
906
|
+
})(gt ||= {});
|
|
907
|
+
/**
|
|
908
|
+
* Returns the path to the suggested directory for your app's local data files.
|
|
909
|
+
* Resolves to `${localDataDir}/${bundleIdentifier}`, where `bundleIdentifier` is the [`identifier`](https://v2.tauri.app/reference/config/#identifier) value configured in `tauri.conf.json`.
|
|
910
|
+
* @example
|
|
911
|
+
* ```typescript
|
|
912
|
+
* import { appLocalDataDir } from '@tauri-apps/api/path';
|
|
913
|
+
* const appLocalDataDirPath = await appLocalDataDir();
|
|
914
|
+
* ```
|
|
915
|
+
*
|
|
916
|
+
* @since 1.2.0
|
|
917
|
+
*/
|
|
918
|
+
async function _t() {
|
|
919
|
+
return X("plugin:path|resolve_directory", { directory: gt.AppLocalData });
|
|
775
920
|
}
|
|
776
|
-
|
|
777
|
-
|
|
921
|
+
/**
|
|
922
|
+
* Joins all given `path` segments together using the platform-specific separator as a delimiter, then normalizes the resulting path.
|
|
923
|
+
* @example
|
|
924
|
+
* ```typescript
|
|
925
|
+
* import { join, appDataDir } from '@tauri-apps/api/path';
|
|
926
|
+
* const appDataDirPath = await appDataDir();
|
|
927
|
+
* const path = await join(appDataDirPath, 'users', 'tauri', 'avatar.png');
|
|
928
|
+
* ```
|
|
929
|
+
*
|
|
930
|
+
* @since 1.0.0
|
|
931
|
+
*/
|
|
932
|
+
async function Z(...e) {
|
|
933
|
+
return X("plugin:path|join", { paths: e });
|
|
778
934
|
}
|
|
779
|
-
var
|
|
780
|
-
const
|
|
781
|
-
var
|
|
935
|
+
var vt = await _t();
|
|
936
|
+
const yt = async (e) => await Z(vt, "plugin", e);
|
|
937
|
+
var bt = class {}, xt = class {}, Q = class {}, St = new class extends Q {
|
|
782
938
|
name = "预设值";
|
|
783
939
|
async call(e, t) {
|
|
784
940
|
console.log("[PluginBooter->_ConfigSetter] new plugin defining...", e), t("预设值设定中");
|
|
785
941
|
let { name: n, content: r, resource: i, search: a, user: o, subscribe: s, share: c } = e;
|
|
786
|
-
if (r) for (let [e, { commentRow: t, contentPage: n, itemCard: i, layout: a, itemTranslator: o }] of Object.entries(r)) a &&
|
|
942
|
+
if (r) for (let [e, { commentRow: t, contentPage: n, itemCard: i, layout: a, itemTranslator: o }] of Object.entries(r)) a && L.content.ContentPage.viewLayout.set(e, a), i && L.item.Item.itemCard.set(e, i), n && L.content.ContentPage.contentPage.set(e, n), t && L.comment.Comment.commentRow.set(e, t), o && L.item.Item.itemTranslator.set(e, o);
|
|
787
943
|
if (i) {
|
|
788
|
-
if (i.types) for (let e of i.types)
|
|
789
|
-
if (i.process) for (let [e, t] of Object.entries(i.process))
|
|
944
|
+
if (i.types) for (let e of i.types) L.resource.Resource.fork.set([n, e.type], e);
|
|
945
|
+
if (i.process) for (let [e, t] of Object.entries(i.process)) L.resource.Resource.processInstances.set([n, e], t);
|
|
790
946
|
}
|
|
791
947
|
if (a) {
|
|
792
|
-
if (a.categories) for (let e of a.categories)
|
|
793
|
-
if (a.tabbar) for (let e of a.tabbar)
|
|
948
|
+
if (a.categories) for (let e of a.categories) J.addCategories(n, e);
|
|
949
|
+
if (a.tabbar) for (let e of a.tabbar) J.addTabbar(n, e);
|
|
794
950
|
if (a.hotPage) {
|
|
795
|
-
for (let e of a.hotPage.mainListCard ?? [])
|
|
796
|
-
for (let e of a.hotPage.levelBoard ?? [])
|
|
797
|
-
for (let e of a.hotPage.topButton ?? [])
|
|
951
|
+
for (let e of a.hotPage.mainListCard ?? []) J.addMainList(n, e);
|
|
952
|
+
for (let e of a.hotPage.levelBoard ?? []) J.addLevelboard(n, e);
|
|
953
|
+
for (let e of a.hotPage.topButton ?? []) J.addTopButton(n, e);
|
|
798
954
|
}
|
|
799
|
-
if (a.barcode) for (let e of a.barcode ?? [])
|
|
955
|
+
if (a.barcode) for (let e of a.barcode ?? []) J.addBarcode(n, e);
|
|
800
956
|
}
|
|
801
957
|
if (o) {
|
|
802
|
-
if (o.edit &&
|
|
803
|
-
if (o.authorIcon) for (let [e, t] of Object.entries(o.authorIcon))
|
|
958
|
+
if (o.edit && L.user.User.userEditorBase.set(n, o.edit), o.userActions) for (let [e, t] of Object.entries(o.userActions)) J.userActions.set([n, e], t);
|
|
959
|
+
if (o.authorIcon) for (let [e, t] of Object.entries(o.authorIcon)) L.item.Item.authorIcon.set([n, e], t);
|
|
804
960
|
}
|
|
805
|
-
if (s) for (let [e, t] of Object.entries(s))
|
|
806
|
-
if (e.config) for (let t of e.config)
|
|
961
|
+
if (s) for (let [e, t] of Object.entries(s)) J.subscribes.set([n, e], t);
|
|
962
|
+
if (e.config) for (let t of e.config) nt().$resignerConfig(t);
|
|
807
963
|
if (c) {
|
|
808
|
-
for (let e of c.initiative ?? [])
|
|
809
|
-
for (let e of c.tokenListen ?? [])
|
|
964
|
+
for (let e of c.initiative ?? []) J.share.set([n, e.key], e);
|
|
965
|
+
for (let e of c.tokenListen ?? []) J.shareToken.set([n, e.key], e);
|
|
810
966
|
}
|
|
811
967
|
}
|
|
812
968
|
}();
|
|
813
|
-
const
|
|
969
|
+
const Ct = async (e) => await Tt(await e.forks(), e.test), wt = (e) => {
|
|
814
970
|
let t = e.urls;
|
|
815
|
-
return
|
|
971
|
+
return Tt(t, e.test);
|
|
816
972
|
};
|
|
817
|
-
var
|
|
818
|
-
if (
|
|
973
|
+
var Tt = async (e, t) => {
|
|
974
|
+
if (Ae(e)) throw Error("[plugin test] no fork found");
|
|
819
975
|
let n = [], r = new AbortController();
|
|
820
976
|
try {
|
|
821
977
|
await Promise.all(e.map(async (e) => {
|
|
@@ -833,20 +989,20 @@ var test = async (e, t) => {
|
|
|
833
989
|
} catch (e) {
|
|
834
990
|
console.log("[plugin test] fetch test aborted", e);
|
|
835
991
|
}
|
|
836
|
-
let i =
|
|
992
|
+
let i = Te(n.filter((e) => e[1] != 0), (e) => e[1])[0];
|
|
837
993
|
return console.log("[plugin test] fetch test done", i), i || ["", !1];
|
|
838
|
-
},
|
|
994
|
+
}, Et = new class extends Q {
|
|
839
995
|
name = "接口测试";
|
|
840
996
|
async call(e, t, n) {
|
|
841
997
|
if (!e.api) return;
|
|
842
998
|
t("开始并发测试");
|
|
843
|
-
let r = Object.keys(e.api), i = await Promise.all(r.map((t) =>
|
|
999
|
+
let r = Object.keys(e.api), i = await Promise.all(r.map((t) => Ct(e.api[t]))), a = [], o = {};
|
|
844
1000
|
if (r.forEach((e, t) => {
|
|
845
1001
|
o[e] = i[t][0], a.push([e, i[t][1]]);
|
|
846
1002
|
}), n.api = o, Object.values(o).some((e) => e == 0)) throw t("测试完成, 无法连接至服务器"), Error("can not connect to server");
|
|
847
1003
|
t(`测试完成, \n${a.map((e) => `${e[0]}->${e[1]}ms`).join("\n")}`);
|
|
848
1004
|
}
|
|
849
|
-
}(),
|
|
1005
|
+
}(), Dt = new class extends Q {
|
|
850
1006
|
name = "资源链接测试";
|
|
851
1007
|
async call(e, t) {
|
|
852
1008
|
if (!e.resource?.types?.length) return;
|
|
@@ -854,29 +1010,29 @@ var test = async (e, t) => {
|
|
|
854
1010
|
let n = e.resource.types.map((e) => ({
|
|
855
1011
|
type: e.type,
|
|
856
1012
|
val: e
|
|
857
|
-
})), r = await Promise.all(n.map((e) =>
|
|
1013
|
+
})), r = await Promise.all(n.map((e) => wt(e.val))), i = [];
|
|
858
1014
|
if (n.forEach((t, n) => {
|
|
859
|
-
r[n][1] &&
|
|
1015
|
+
r[n][1] && L.resource.Resource.precedenceFork.set([e.name, t.type], r[n][0]), i.push([t, r[n][1]]);
|
|
860
1016
|
}), r.some((e) => e[1] == 0)) throw t("测试完成, 无法连接至服务器"), Error("[plugin test] can not connect to server");
|
|
861
1017
|
t(`测试完成, \n${i.map((e) => `${e[0].type}->${e[1]}ms`).join("\n")}`);
|
|
862
1018
|
}
|
|
863
|
-
}(),
|
|
1019
|
+
}(), Ot = new class extends Q {
|
|
864
1020
|
name = "自定义初始化";
|
|
865
1021
|
async call(e, t, n) {
|
|
866
1022
|
if (!e.onBooted) return;
|
|
867
1023
|
let r = await e.onBooted({ api: n.api });
|
|
868
|
-
r &&
|
|
1024
|
+
r && at.set(Symbol.for(`expose:${e.name}`), r);
|
|
869
1025
|
}
|
|
870
|
-
}(),
|
|
1026
|
+
}(), kt = new le(), At = new class extends Q {
|
|
871
1027
|
name = "登录";
|
|
872
1028
|
async call(e, t) {
|
|
873
1029
|
if (!e.auth) return;
|
|
874
|
-
let n =
|
|
1030
|
+
let n = lt();
|
|
875
1031
|
try {
|
|
876
1032
|
let r = n.$getPluginDisplayName(e.name);
|
|
877
1033
|
t("判定鉴权状态中...");
|
|
878
1034
|
let i = await e.auth.passSelect(), a = Promise.withResolvers();
|
|
879
|
-
console.log(`[plugin auth] ${r}, isPass: ${i}`), await
|
|
1035
|
+
console.log(`[plugin auth] ${r}, isPass: ${i}`), await kt.acquire(), t("等待其他插件鉴权结束..."), i ? (t("跳过鉴权方式选择"), a.resolve(i)) : (t("选择鉴权方式"), V({
|
|
880
1036
|
type: "default",
|
|
881
1037
|
positiveText: "登录",
|
|
882
1038
|
negativeText: "注册",
|
|
@@ -895,28 +1051,28 @@ var test = async (e, t) => {
|
|
|
895
1051
|
t("鉴权中...");
|
|
896
1052
|
let s = {
|
|
897
1053
|
async form(e) {
|
|
898
|
-
let t =
|
|
899
|
-
return
|
|
900
|
-
let e =
|
|
901
|
-
return t.data.then(() => e.value = !1), () => h(
|
|
1054
|
+
let t = U(e);
|
|
1055
|
+
return J.globalNodes.push(y(f(() => {
|
|
1056
|
+
let e = w(!0);
|
|
1057
|
+
return t.data.then(() => e.value = !1), () => h(B, {
|
|
902
1058
|
show: e.value,
|
|
903
1059
|
position: "center",
|
|
904
1060
|
round: !0,
|
|
905
|
-
class: "
|
|
1061
|
+
class: "auth-popup",
|
|
906
1062
|
transitionAppear: !0
|
|
907
|
-
}, [h("div",
|
|
1063
|
+
}, [h("div", [r]), t.comp]);
|
|
908
1064
|
}))), await t.data;
|
|
909
1065
|
},
|
|
910
1066
|
website(e) {
|
|
911
1067
|
return window;
|
|
912
1068
|
}
|
|
913
1069
|
};
|
|
914
|
-
o == "logIn" ? await e.auth.logIn(s) : o == "signUp" && await e.auth.signUp(s),
|
|
1070
|
+
o == "logIn" ? await e.auth.logIn(s) : o == "signUp" && await e.auth.signUp(s), kt.release(), t("鉴权成功");
|
|
915
1071
|
} catch (e) {
|
|
916
1072
|
throw t(`登录失败: ${e}`), e;
|
|
917
1073
|
}
|
|
918
1074
|
}
|
|
919
|
-
}(),
|
|
1075
|
+
}(), jt = new class extends Q {
|
|
920
1076
|
name = "其他步骤";
|
|
921
1077
|
async call(e, t) {
|
|
922
1078
|
if (e.otherProgress?.length) for (let n of e.otherProgress) t({
|
|
@@ -929,14 +1085,14 @@ var test = async (e, t) => {
|
|
|
929
1085
|
});
|
|
930
1086
|
});
|
|
931
1087
|
}
|
|
932
|
-
}(),
|
|
1088
|
+
}(), Mt = new class extends bt {
|
|
933
1089
|
description = {
|
|
934
1090
|
title: "通过任意URL安装插件",
|
|
935
1091
|
description: "从任何你给定的url获取内容,无论内容是什么"
|
|
936
1092
|
};
|
|
937
1093
|
name = "fallbackUrl";
|
|
938
1094
|
async installer(e) {
|
|
939
|
-
let t = await
|
|
1095
|
+
let t = await W.request({
|
|
940
1096
|
url: e,
|
|
941
1097
|
responseType: "blob"
|
|
942
1098
|
}), n = e.split("/").at(-1) ?? "us.js";
|
|
@@ -951,11 +1107,11 @@ var test = async (e, t) => {
|
|
|
951
1107
|
isMatched(e) {
|
|
952
1108
|
return URL.canParse(e);
|
|
953
1109
|
}
|
|
954
|
-
}(),
|
|
1110
|
+
}(), Nt;
|
|
955
1111
|
(function(e) {
|
|
956
1112
|
e[e.Start = 0] = "Start", e[e.Current = 1] = "Current", e[e.End = 2] = "End";
|
|
957
|
-
})(
|
|
958
|
-
function
|
|
1113
|
+
})(Nt ||= {});
|
|
1114
|
+
function Pt(e) {
|
|
959
1115
|
return {
|
|
960
1116
|
isFile: e.isFile,
|
|
961
1117
|
isDirectory: e.isDirectory,
|
|
@@ -977,7 +1133,8 @@ function parseFileInfo(e) {
|
|
|
977
1133
|
blocks: e.blocks
|
|
978
1134
|
};
|
|
979
1135
|
}
|
|
980
|
-
|
|
1136
|
+
/** Converts a big-endian eight byte array to number */
|
|
1137
|
+
function Ft(e) {
|
|
981
1138
|
let t = new Uint8ClampedArray(e), n = t.byteLength, r = 0;
|
|
982
1139
|
for (let e = 0; e < n; e++) {
|
|
983
1140
|
let n = t[e];
|
|
@@ -985,86 +1142,306 @@ function fromBytes(e) {
|
|
|
985
1142
|
}
|
|
986
1143
|
return r;
|
|
987
1144
|
}
|
|
988
|
-
|
|
1145
|
+
/**
|
|
1146
|
+
* The Tauri abstraction for reading and writing files.
|
|
1147
|
+
*
|
|
1148
|
+
* @since 2.0.0
|
|
1149
|
+
*/
|
|
1150
|
+
var It = class extends ht {
|
|
1151
|
+
/**
|
|
1152
|
+
* Reads up to `p.byteLength` bytes into `p`. It resolves to the number of
|
|
1153
|
+
* bytes read (`0` < `n` <= `p.byteLength`) and rejects if any error
|
|
1154
|
+
* encountered. Even if `read()` resolves to `n` < `p.byteLength`, it may
|
|
1155
|
+
* use all of `p` as scratch space during the call. If some data is
|
|
1156
|
+
* available but not `p.byteLength` bytes, `read()` conventionally resolves
|
|
1157
|
+
* to what is available instead of waiting for more.
|
|
1158
|
+
*
|
|
1159
|
+
* When `read()` encounters end-of-file condition, it resolves to EOF
|
|
1160
|
+
* (`null`).
|
|
1161
|
+
*
|
|
1162
|
+
* When `read()` encounters an error, it rejects with an error.
|
|
1163
|
+
*
|
|
1164
|
+
* Callers should always process the `n` > `0` bytes returned before
|
|
1165
|
+
* considering the EOF (`null`). Doing so correctly handles I/O errors that
|
|
1166
|
+
* happen after reading some bytes and also both of the allowed EOF
|
|
1167
|
+
* behaviors.
|
|
1168
|
+
*
|
|
1169
|
+
* @example
|
|
1170
|
+
* ```typescript
|
|
1171
|
+
* import { open, BaseDirectory } from "@tauri-apps/plugin-fs"
|
|
1172
|
+
* // if "$APPCONFIG/foo/bar.txt" contains the text "hello world":
|
|
1173
|
+
* const file = await open("foo/bar.txt", { baseDir: BaseDirectory.AppConfig });
|
|
1174
|
+
* const buf = new Uint8Array(100);
|
|
1175
|
+
* const numberOfBytesRead = await file.read(buf); // 11 bytes
|
|
1176
|
+
* const text = new TextDecoder().decode(buf); // "hello world"
|
|
1177
|
+
* await file.close();
|
|
1178
|
+
* ```
|
|
1179
|
+
*
|
|
1180
|
+
* @since 2.0.0
|
|
1181
|
+
*/
|
|
989
1182
|
async read(e) {
|
|
990
1183
|
if (e.byteLength === 0) return 0;
|
|
991
|
-
let t = await
|
|
1184
|
+
let t = await X("plugin:fs|read", {
|
|
992
1185
|
rid: this.rid,
|
|
993
1186
|
len: e.byteLength
|
|
994
|
-
}), n =
|
|
1187
|
+
}), n = Ft(t.slice(-8)), r = t instanceof ArrayBuffer ? new Uint8Array(t) : t;
|
|
995
1188
|
return e.set(r.slice(0, r.length - 8)), n === 0 ? null : n;
|
|
996
1189
|
}
|
|
1190
|
+
/**
|
|
1191
|
+
* Seek sets the offset for the next `read()` or `write()` to offset,
|
|
1192
|
+
* interpreted according to `whence`: `Start` means relative to the
|
|
1193
|
+
* start of the file, `Current` means relative to the current offset,
|
|
1194
|
+
* and `End` means relative to the end. Seek resolves to the new offset
|
|
1195
|
+
* relative to the start of the file.
|
|
1196
|
+
*
|
|
1197
|
+
* Seeking to an offset before the start of the file is an error. Seeking to
|
|
1198
|
+
* any positive offset is legal, but the behavior of subsequent I/O
|
|
1199
|
+
* operations on the underlying object is implementation-dependent.
|
|
1200
|
+
* It returns the number of cursor position.
|
|
1201
|
+
*
|
|
1202
|
+
* @example
|
|
1203
|
+
* ```typescript
|
|
1204
|
+
* import { open, SeekMode, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1205
|
+
*
|
|
1206
|
+
* // Given hello.txt pointing to file with "Hello world", which is 11 bytes long:
|
|
1207
|
+
* const file = await open('hello.txt', { read: true, write: true, truncate: true, create: true, baseDir: BaseDirectory.AppLocalData });
|
|
1208
|
+
* await file.write(new TextEncoder().encode("Hello world"));
|
|
1209
|
+
*
|
|
1210
|
+
* // Seek 6 bytes from the start of the file
|
|
1211
|
+
* console.log(await file.seek(6, SeekMode.Start)); // "6"
|
|
1212
|
+
* // Seek 2 more bytes from the current position
|
|
1213
|
+
* console.log(await file.seek(2, SeekMode.Current)); // "8"
|
|
1214
|
+
* // Seek backwards 2 bytes from the end of the file
|
|
1215
|
+
* console.log(await file.seek(-2, SeekMode.End)); // "9" (e.g. 11-2)
|
|
1216
|
+
*
|
|
1217
|
+
* await file.close();
|
|
1218
|
+
* ```
|
|
1219
|
+
*
|
|
1220
|
+
* @since 2.0.0
|
|
1221
|
+
*/
|
|
997
1222
|
async seek(e, t) {
|
|
998
|
-
return await
|
|
1223
|
+
return await X("plugin:fs|seek", {
|
|
999
1224
|
rid: this.rid,
|
|
1000
1225
|
offset: e,
|
|
1001
1226
|
whence: t
|
|
1002
1227
|
});
|
|
1003
1228
|
}
|
|
1229
|
+
/**
|
|
1230
|
+
* Returns a {@linkcode FileInfo } for this file.
|
|
1231
|
+
*
|
|
1232
|
+
* @example
|
|
1233
|
+
* ```typescript
|
|
1234
|
+
* import { open, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1235
|
+
* const file = await open("file.txt", { read: true, baseDir: BaseDirectory.AppLocalData });
|
|
1236
|
+
* const fileInfo = await file.stat();
|
|
1237
|
+
* console.log(fileInfo.isFile); // true
|
|
1238
|
+
* await file.close();
|
|
1239
|
+
* ```
|
|
1240
|
+
*
|
|
1241
|
+
* @since 2.0.0
|
|
1242
|
+
*/
|
|
1004
1243
|
async stat() {
|
|
1005
|
-
return
|
|
1244
|
+
return Pt(await X("plugin:fs|fstat", { rid: this.rid }));
|
|
1006
1245
|
}
|
|
1246
|
+
/**
|
|
1247
|
+
* Truncates or extends this file, to reach the specified `len`.
|
|
1248
|
+
* If `len` is not specified then the entire file contents are truncated.
|
|
1249
|
+
*
|
|
1250
|
+
* @example
|
|
1251
|
+
* ```typescript
|
|
1252
|
+
* import { open, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1253
|
+
*
|
|
1254
|
+
* // truncate the entire file
|
|
1255
|
+
* const file = await open("my_file.txt", { read: true, write: true, create: true, baseDir: BaseDirectory.AppLocalData });
|
|
1256
|
+
* await file.truncate();
|
|
1257
|
+
*
|
|
1258
|
+
* // truncate part of the file
|
|
1259
|
+
* const file = await open("my_file.txt", { read: true, write: true, create: true, baseDir: BaseDirectory.AppLocalData });
|
|
1260
|
+
* await file.write(new TextEncoder().encode("Hello World"));
|
|
1261
|
+
* await file.truncate(7);
|
|
1262
|
+
* const data = new Uint8Array(32);
|
|
1263
|
+
* await file.read(data);
|
|
1264
|
+
* console.log(new TextDecoder().decode(data)); // Hello W
|
|
1265
|
+
* await file.close();
|
|
1266
|
+
* ```
|
|
1267
|
+
*
|
|
1268
|
+
* @since 2.0.0
|
|
1269
|
+
*/
|
|
1007
1270
|
async truncate(e) {
|
|
1008
|
-
await
|
|
1271
|
+
await X("plugin:fs|ftruncate", {
|
|
1009
1272
|
rid: this.rid,
|
|
1010
1273
|
len: e
|
|
1011
1274
|
});
|
|
1012
1275
|
}
|
|
1276
|
+
/**
|
|
1277
|
+
* Writes `data.byteLength` bytes from `data` to the underlying data stream. It
|
|
1278
|
+
* resolves to the number of bytes written from `data` (`0` <= `n` <=
|
|
1279
|
+
* `data.byteLength`) or reject with the error encountered that caused the
|
|
1280
|
+
* write to stop early. `write()` must reject with a non-null error if
|
|
1281
|
+
* would resolve to `n` < `data.byteLength`. `write()` must not modify the
|
|
1282
|
+
* slice data, even temporarily.
|
|
1283
|
+
*
|
|
1284
|
+
* @example
|
|
1285
|
+
* ```typescript
|
|
1286
|
+
* import { open, write, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1287
|
+
* const encoder = new TextEncoder();
|
|
1288
|
+
* const data = encoder.encode("Hello world");
|
|
1289
|
+
* const file = await open("bar.txt", { write: true, baseDir: BaseDirectory.AppLocalData });
|
|
1290
|
+
* const bytesWritten = await file.write(data); // 11
|
|
1291
|
+
* await file.close();
|
|
1292
|
+
* ```
|
|
1293
|
+
*
|
|
1294
|
+
* @since 2.0.0
|
|
1295
|
+
*/
|
|
1013
1296
|
async write(e) {
|
|
1014
|
-
return await
|
|
1297
|
+
return await X("plugin:fs|write", {
|
|
1015
1298
|
rid: this.rid,
|
|
1016
1299
|
data: e
|
|
1017
1300
|
});
|
|
1018
1301
|
}
|
|
1019
1302
|
};
|
|
1020
|
-
|
|
1303
|
+
/**
|
|
1304
|
+
* Open a file and resolve to an instance of {@linkcode FileHandle}. The
|
|
1305
|
+
* file does not need to previously exist if using the `create` or `createNew`
|
|
1306
|
+
* open options. It is the callers responsibility to close the file when finished
|
|
1307
|
+
* with it.
|
|
1308
|
+
*
|
|
1309
|
+
* @example
|
|
1310
|
+
* ```typescript
|
|
1311
|
+
* import { open, BaseDirectory } from "@tauri-apps/plugin-fs"
|
|
1312
|
+
* const file = await open("foo/bar.txt", { read: true, write: true, baseDir: BaseDirectory.AppLocalData });
|
|
1313
|
+
* // Do work with file
|
|
1314
|
+
* await file.close();
|
|
1315
|
+
* ```
|
|
1316
|
+
*
|
|
1317
|
+
* @since 2.0.0
|
|
1318
|
+
*/
|
|
1319
|
+
async function Lt(e, t) {
|
|
1021
1320
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1022
|
-
return new
|
|
1321
|
+
return new It(await X("plugin:fs|open", {
|
|
1023
1322
|
path: e instanceof URL ? e.toString() : e,
|
|
1024
1323
|
options: t
|
|
1025
1324
|
}));
|
|
1026
1325
|
}
|
|
1027
|
-
|
|
1326
|
+
/**
|
|
1327
|
+
* Creates a new directory with the specified path.
|
|
1328
|
+
* @example
|
|
1329
|
+
* ```typescript
|
|
1330
|
+
* import { mkdir, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1331
|
+
* await mkdir('users', { baseDir: BaseDirectory.AppLocalData });
|
|
1332
|
+
* ```
|
|
1333
|
+
*
|
|
1334
|
+
* @since 2.0.0
|
|
1335
|
+
*/
|
|
1336
|
+
async function Rt(e, t) {
|
|
1028
1337
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1029
|
-
await
|
|
1338
|
+
await X("plugin:fs|mkdir", {
|
|
1030
1339
|
path: e instanceof URL ? e.toString() : e,
|
|
1031
1340
|
options: t
|
|
1032
1341
|
});
|
|
1033
1342
|
}
|
|
1034
|
-
|
|
1343
|
+
/**
|
|
1344
|
+
* Reads the directory given by path and returns an array of `DirEntry`.
|
|
1345
|
+
* @example
|
|
1346
|
+
* ```typescript
|
|
1347
|
+
* import { readDir, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1348
|
+
* import { join } from '@tauri-apps/api/path';
|
|
1349
|
+
* const dir = "users"
|
|
1350
|
+
* const entries = await readDir('users', { baseDir: BaseDirectory.AppLocalData });
|
|
1351
|
+
* processEntriesRecursively(dir, entries);
|
|
1352
|
+
* async function processEntriesRecursively(parent, entries) {
|
|
1353
|
+
* for (const entry of entries) {
|
|
1354
|
+
* console.log(`Entry: ${entry.name}`);
|
|
1355
|
+
* if (entry.isDirectory) {
|
|
1356
|
+
* const dir = await join(parent, entry.name);
|
|
1357
|
+
* processEntriesRecursively(dir, await readDir(dir, { baseDir: BaseDirectory.AppLocalData }))
|
|
1358
|
+
* }
|
|
1359
|
+
* }
|
|
1360
|
+
* }
|
|
1361
|
+
* ```
|
|
1362
|
+
*
|
|
1363
|
+
* @since 2.0.0
|
|
1364
|
+
*/
|
|
1365
|
+
async function zt(e, t) {
|
|
1035
1366
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1036
|
-
return await
|
|
1367
|
+
return await X("plugin:fs|read_dir", {
|
|
1037
1368
|
path: e instanceof URL ? e.toString() : e,
|
|
1038
1369
|
options: t
|
|
1039
1370
|
});
|
|
1040
1371
|
}
|
|
1041
|
-
|
|
1372
|
+
/**
|
|
1373
|
+
* Reads and resolves to the entire contents of a file as an array of bytes.
|
|
1374
|
+
* TextDecoder can be used to transform the bytes to string if required.
|
|
1375
|
+
* @example
|
|
1376
|
+
* ```typescript
|
|
1377
|
+
* import { readFile, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1378
|
+
* const contents = await readFile('avatar.png', { baseDir: BaseDirectory.Resource });
|
|
1379
|
+
* ```
|
|
1380
|
+
*
|
|
1381
|
+
* @since 2.0.0
|
|
1382
|
+
*/
|
|
1383
|
+
async function Bt(e, t) {
|
|
1042
1384
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1043
|
-
let n = await
|
|
1385
|
+
let n = await X("plugin:fs|read_file", {
|
|
1044
1386
|
path: e instanceof URL ? e.toString() : e,
|
|
1045
1387
|
options: t
|
|
1046
1388
|
});
|
|
1047
1389
|
return n instanceof ArrayBuffer ? new Uint8Array(n) : Uint8Array.from(n);
|
|
1048
1390
|
}
|
|
1049
|
-
|
|
1391
|
+
/**
|
|
1392
|
+
* Reads and returns the entire contents of a file as UTF-8 string.
|
|
1393
|
+
* @example
|
|
1394
|
+
* ```typescript
|
|
1395
|
+
* import { readTextFile, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1396
|
+
* const contents = await readTextFile('app.conf', { baseDir: BaseDirectory.AppConfig });
|
|
1397
|
+
* ```
|
|
1398
|
+
*
|
|
1399
|
+
* @since 2.0.0
|
|
1400
|
+
*/
|
|
1401
|
+
async function Vt(e, t) {
|
|
1050
1402
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1051
|
-
let n = await
|
|
1403
|
+
let n = await X("plugin:fs|read_text_file", {
|
|
1052
1404
|
path: e instanceof URL ? e.toString() : e,
|
|
1053
1405
|
options: t
|
|
1054
1406
|
}), r = n instanceof ArrayBuffer ? n : Uint8Array.from(n);
|
|
1055
1407
|
return new TextDecoder().decode(r);
|
|
1056
1408
|
}
|
|
1057
|
-
|
|
1409
|
+
/**
|
|
1410
|
+
* Removes the named file or directory.
|
|
1411
|
+
* If the directory is not empty and the `recursive` option isn't set to true, the promise will be rejected.
|
|
1412
|
+
* @example
|
|
1413
|
+
* ```typescript
|
|
1414
|
+
* import { remove, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1415
|
+
* await remove('users/file.txt', { baseDir: BaseDirectory.AppLocalData });
|
|
1416
|
+
* await remove('users', { baseDir: BaseDirectory.AppLocalData });
|
|
1417
|
+
* ```
|
|
1418
|
+
*
|
|
1419
|
+
* @since 2.0.0
|
|
1420
|
+
*/
|
|
1421
|
+
async function Ht(e, t) {
|
|
1058
1422
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1059
|
-
await
|
|
1423
|
+
await X("plugin:fs|remove", {
|
|
1060
1424
|
path: e instanceof URL ? e.toString() : e,
|
|
1061
1425
|
options: t
|
|
1062
1426
|
});
|
|
1063
1427
|
}
|
|
1064
|
-
|
|
1428
|
+
/**
|
|
1429
|
+
* Write `data` to the given `path`, by default creating a new file if needed, else overwriting.
|
|
1430
|
+
* @example
|
|
1431
|
+
* ```typescript
|
|
1432
|
+
* import { writeFile, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1433
|
+
*
|
|
1434
|
+
* let encoder = new TextEncoder();
|
|
1435
|
+
* let data = encoder.encode("Hello World");
|
|
1436
|
+
* await writeFile('file.txt', data, { baseDir: BaseDirectory.AppLocalData });
|
|
1437
|
+
* ```
|
|
1438
|
+
*
|
|
1439
|
+
* @since 2.0.0
|
|
1440
|
+
*/
|
|
1441
|
+
async function Ut(e, t, n) {
|
|
1065
1442
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1066
1443
|
if (t instanceof ReadableStream) {
|
|
1067
|
-
let r = await
|
|
1444
|
+
let r = await Lt(e, {
|
|
1068
1445
|
read: !1,
|
|
1069
1446
|
create: !0,
|
|
1070
1447
|
write: !0,
|
|
@@ -1079,26 +1456,37 @@ async function writeFile(e, t, n) {
|
|
|
1079
1456
|
} finally {
|
|
1080
1457
|
i.releaseLock(), await r.close();
|
|
1081
1458
|
}
|
|
1082
|
-
} else await
|
|
1459
|
+
} else await X("plugin:fs|write_file", t, { headers: {
|
|
1083
1460
|
path: encodeURIComponent(e instanceof URL ? e.toString() : e),
|
|
1084
1461
|
options: JSON.stringify(n)
|
|
1085
1462
|
} });
|
|
1086
1463
|
}
|
|
1087
|
-
|
|
1464
|
+
/**
|
|
1465
|
+
* Writes UTF-8 string `data` to the given `path`, by default creating a new file if needed, else overwriting.
|
|
1466
|
+
@example
|
|
1467
|
+
* ```typescript
|
|
1468
|
+
* import { writeTextFile, BaseDirectory } from '@tauri-apps/plugin-fs';
|
|
1469
|
+
*
|
|
1470
|
+
* await writeTextFile('file.txt', "Hello world", { baseDir: BaseDirectory.AppLocalData });
|
|
1471
|
+
* ```
|
|
1472
|
+
*
|
|
1473
|
+
* @since 2.0.0
|
|
1474
|
+
*/
|
|
1475
|
+
async function Wt(e, t, n) {
|
|
1088
1476
|
if (e instanceof URL && e.protocol !== "file:") throw TypeError("Must be a file URL.");
|
|
1089
|
-
await
|
|
1477
|
+
await X("plugin:fs|write_text_file", new TextEncoder().encode(t), { headers: {
|
|
1090
1478
|
path: encodeURIComponent(e instanceof URL ? e.toString() : e),
|
|
1091
1479
|
options: JSON.stringify(n)
|
|
1092
1480
|
} });
|
|
1093
1481
|
}
|
|
1094
|
-
var
|
|
1482
|
+
var Gt = new class extends bt {
|
|
1095
1483
|
description = {
|
|
1096
1484
|
title: "安装本地插件",
|
|
1097
1485
|
description: "输入以: \"local:\"开头,后接全路径的文本"
|
|
1098
1486
|
};
|
|
1099
1487
|
name = "local";
|
|
1100
1488
|
async installer(e) {
|
|
1101
|
-
let t = decodeURIComponent(
|
|
1489
|
+
let t = decodeURIComponent(mt(e.replace(/^local:/, ""), "local")), n = t.split(/\\|\//).at(-1) ?? "us.js", r = await Bt(t);
|
|
1102
1490
|
return new File([r], n);
|
|
1103
1491
|
}
|
|
1104
1492
|
async install(e) {
|
|
@@ -1110,14 +1498,14 @@ var _20_local_default = new class extends PluginInstaller {
|
|
|
1110
1498
|
isMatched(e) {
|
|
1111
1499
|
return e.startsWith("local:");
|
|
1112
1500
|
}
|
|
1113
|
-
}(),
|
|
1501
|
+
}(), Kt = new class extends bt {
|
|
1114
1502
|
description = {
|
|
1115
1503
|
title: "安装Develop Userscript插件",
|
|
1116
1504
|
description: "输入形如: \"localhost\"或者一个可以不含port的ip"
|
|
1117
1505
|
};
|
|
1118
1506
|
name = "devUrl";
|
|
1119
1507
|
async installer(e) {
|
|
1120
|
-
let t = await
|
|
1508
|
+
let t = await W.request({
|
|
1121
1509
|
url: `http://${/:\d+$/.test(e) ? e : e + ":6173"}/__vite-plugin-monkey.install.user.js?origin=http%3A%2F%2F${e}%3A6173`,
|
|
1122
1510
|
responseType: "text"
|
|
1123
1511
|
}), n = e.replace(/:\d+$/, ""), r = t.data.replaceAll("localhost", n).replaceAll("127.0.0.1", n);
|
|
@@ -1133,14 +1521,14 @@ var _20_local_default = new class extends PluginInstaller {
|
|
|
1133
1521
|
return /^(((\d+\.?)+)|(localhost))(:\d+)?$/.test(e);
|
|
1134
1522
|
}
|
|
1135
1523
|
}();
|
|
1136
|
-
function
|
|
1524
|
+
function qt() {
|
|
1137
1525
|
return typeof navigator == "object" && "userAgent" in navigator ? navigator.userAgent : typeof process == "object" && process.version !== void 0 ? `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})` : "<environment undetectable>";
|
|
1138
1526
|
}
|
|
1139
|
-
function
|
|
1527
|
+
function Jt(e, t, n, r) {
|
|
1140
1528
|
if (typeof n != "function") throw Error("method for before hook must be a function");
|
|
1141
|
-
return r ||= {}, Array.isArray(t) ? t.reverse().reduce((t, n) =>
|
|
1529
|
+
return r ||= {}, Array.isArray(t) ? t.reverse().reduce((t, n) => Jt.bind(null, e, n, t, r), n)() : Promise.resolve().then(() => e.registry[t] ? e.registry[t].reduce((e, t) => t.hook.bind(null, e, r), n)() : n(r));
|
|
1142
1530
|
}
|
|
1143
|
-
function
|
|
1531
|
+
function Yt(e, t, n, r) {
|
|
1144
1532
|
let i = r;
|
|
1145
1533
|
e.registry[n] || (e.registry[n] = []), t === "before" && (r = (e, t) => Promise.resolve().then(i.bind(null, t)).then(e.bind(null, t))), t === "after" && (r = (e, t) => {
|
|
1146
1534
|
let n;
|
|
@@ -1150,14 +1538,14 @@ function addHook(e, t, n, r) {
|
|
|
1150
1538
|
orig: i
|
|
1151
1539
|
});
|
|
1152
1540
|
}
|
|
1153
|
-
function
|
|
1541
|
+
function Xt(e, t, n) {
|
|
1154
1542
|
if (!e.registry[t]) return;
|
|
1155
1543
|
let r = e.registry[t].map((e) => e.orig).indexOf(n);
|
|
1156
1544
|
r !== -1 && e.registry[t].splice(r, 1);
|
|
1157
1545
|
}
|
|
1158
|
-
var
|
|
1159
|
-
function
|
|
1160
|
-
let r =
|
|
1546
|
+
var Zt = Function.bind, Qt = Zt.bind(Zt);
|
|
1547
|
+
function $t(e, t, n) {
|
|
1548
|
+
let r = Qt(Xt, null).apply(null, n ? [t, n] : [t]);
|
|
1161
1549
|
e.api = { remove: r }, e.remove = r, [
|
|
1162
1550
|
"before",
|
|
1163
1551
|
"error",
|
|
@@ -1169,50 +1557,50 @@ function bindApi(e, t, n) {
|
|
|
1169
1557
|
r,
|
|
1170
1558
|
n
|
|
1171
1559
|
] : [t, r];
|
|
1172
|
-
e[r] = e.api[r] =
|
|
1560
|
+
e[r] = e.api[r] = Qt(Yt, null).apply(null, i);
|
|
1173
1561
|
});
|
|
1174
1562
|
}
|
|
1175
|
-
function
|
|
1176
|
-
let e = Symbol("Singular"), t = { registry: {} }, n =
|
|
1177
|
-
return
|
|
1563
|
+
function en() {
|
|
1564
|
+
let e = Symbol("Singular"), t = { registry: {} }, n = Jt.bind(null, t, e);
|
|
1565
|
+
return $t(n, t, e), n;
|
|
1178
1566
|
}
|
|
1179
|
-
function
|
|
1180
|
-
let e = { registry: {} }, t =
|
|
1181
|
-
return
|
|
1567
|
+
function tn() {
|
|
1568
|
+
let e = { registry: {} }, t = Jt.bind(null, e);
|
|
1569
|
+
return $t(t, e), t;
|
|
1182
1570
|
}
|
|
1183
|
-
var
|
|
1184
|
-
Singular,
|
|
1185
|
-
Collection
|
|
1186
|
-
},
|
|
1571
|
+
var nn = {
|
|
1572
|
+
Singular: en,
|
|
1573
|
+
Collection: tn
|
|
1574
|
+
}, rn = `octokit-endpoint.js/0.0.0-development ${qt()}`, an = {
|
|
1187
1575
|
method: "GET",
|
|
1188
1576
|
baseUrl: "https://api.github.com",
|
|
1189
1577
|
headers: {
|
|
1190
1578
|
accept: "application/vnd.github.v3+json",
|
|
1191
|
-
"user-agent":
|
|
1579
|
+
"user-agent": rn
|
|
1192
1580
|
},
|
|
1193
1581
|
mediaType: { format: "" }
|
|
1194
1582
|
};
|
|
1195
|
-
function
|
|
1583
|
+
function on(e) {
|
|
1196
1584
|
return e ? Object.keys(e).reduce((t, n) => (t[n.toLowerCase()] = e[n], t), {}) : {};
|
|
1197
1585
|
}
|
|
1198
|
-
function
|
|
1586
|
+
function sn(e) {
|
|
1199
1587
|
if (typeof e != "object" || !e || Object.prototype.toString.call(e) !== "[object Object]") return !1;
|
|
1200
1588
|
let t = Object.getPrototypeOf(e);
|
|
1201
1589
|
if (t === null) return !0;
|
|
1202
1590
|
let n = Object.prototype.hasOwnProperty.call(t, "constructor") && t.constructor;
|
|
1203
1591
|
return typeof n == "function" && n instanceof n && Function.prototype.call(n) === Function.prototype.call(e);
|
|
1204
1592
|
}
|
|
1205
|
-
function
|
|
1593
|
+
function cn(e, t) {
|
|
1206
1594
|
let n = Object.assign({}, e);
|
|
1207
1595
|
return Object.keys(t).forEach((r) => {
|
|
1208
|
-
|
|
1596
|
+
sn(t[r]) && r in e ? n[r] = cn(e[r], t[r]) : Object.assign(n, { [r]: t[r] });
|
|
1209
1597
|
}), n;
|
|
1210
1598
|
}
|
|
1211
|
-
function
|
|
1599
|
+
function ln(e) {
|
|
1212
1600
|
for (let t in e) e[t] === void 0 && delete e[t];
|
|
1213
1601
|
return e;
|
|
1214
1602
|
}
|
|
1215
|
-
function
|
|
1603
|
+
function un(e, t, n) {
|
|
1216
1604
|
if (typeof t == "string") {
|
|
1217
1605
|
let [e, r] = t.split(" ");
|
|
1218
1606
|
n = Object.assign(r ? {
|
|
@@ -1220,69 +1608,69 @@ function merge(e, t, n) {
|
|
|
1220
1608
|
url: r
|
|
1221
1609
|
} : { url: e }, n);
|
|
1222
1610
|
} else n = Object.assign({}, t);
|
|
1223
|
-
n.headers =
|
|
1224
|
-
let r =
|
|
1611
|
+
n.headers = on(n.headers), ln(n), ln(n.headers);
|
|
1612
|
+
let r = cn(e || {}, n);
|
|
1225
1613
|
return n.url === "/graphql" && (e && e.mediaType.previews?.length && (r.mediaType.previews = e.mediaType.previews.filter((e) => !r.mediaType.previews.includes(e)).concat(r.mediaType.previews)), r.mediaType.previews = (r.mediaType.previews || []).map((e) => e.replace(/-preview/, ""))), r;
|
|
1226
1614
|
}
|
|
1227
|
-
function
|
|
1615
|
+
function dn(e, t) {
|
|
1228
1616
|
let n = /\?/.test(e) ? "&" : "?", r = Object.keys(t);
|
|
1229
1617
|
return r.length === 0 ? e : e + n + r.map((e) => e === "q" ? "q=" + t.q.split("+").map(encodeURIComponent).join("+") : `${e}=${encodeURIComponent(t[e])}`).join("&");
|
|
1230
1618
|
}
|
|
1231
|
-
var
|
|
1232
|
-
function
|
|
1619
|
+
var fn = /\{[^{}}]+\}/g;
|
|
1620
|
+
function pn(e) {
|
|
1233
1621
|
return e.replace(/(?:^\W+)|(?:(?<!\W)\W+$)/g, "").split(/,/);
|
|
1234
1622
|
}
|
|
1235
|
-
function
|
|
1236
|
-
let t = e.match(
|
|
1237
|
-
return t ? t.map(
|
|
1623
|
+
function mn(e) {
|
|
1624
|
+
let t = e.match(fn);
|
|
1625
|
+
return t ? t.map(pn).reduce((e, t) => e.concat(t), []) : [];
|
|
1238
1626
|
}
|
|
1239
|
-
function
|
|
1627
|
+
function hn(e, t) {
|
|
1240
1628
|
let n = { __proto__: null };
|
|
1241
1629
|
for (let r of Object.keys(e)) t.indexOf(r) === -1 && (n[r] = e[r]);
|
|
1242
1630
|
return n;
|
|
1243
1631
|
}
|
|
1244
|
-
function
|
|
1632
|
+
function gn(e) {
|
|
1245
1633
|
return e.split(/(%[0-9A-Fa-f]{2})/g).map(function(e) {
|
|
1246
1634
|
return /%[0-9A-Fa-f]/.test(e) || (e = encodeURI(e).replace(/%5B/g, "[").replace(/%5D/g, "]")), e;
|
|
1247
1635
|
}).join("");
|
|
1248
1636
|
}
|
|
1249
|
-
function
|
|
1637
|
+
function _n(e) {
|
|
1250
1638
|
return encodeURIComponent(e).replace(/[!'()*]/g, function(e) {
|
|
1251
1639
|
return "%" + e.charCodeAt(0).toString(16).toUpperCase();
|
|
1252
1640
|
});
|
|
1253
1641
|
}
|
|
1254
|
-
function
|
|
1255
|
-
return t = e === "+" || e === "#" ?
|
|
1642
|
+
function vn(e, t, n) {
|
|
1643
|
+
return t = e === "+" || e === "#" ? gn(t) : _n(t), n ? _n(n) + "=" + t : t;
|
|
1256
1644
|
}
|
|
1257
|
-
function
|
|
1645
|
+
function yn(e) {
|
|
1258
1646
|
return e != null;
|
|
1259
1647
|
}
|
|
1260
|
-
function
|
|
1648
|
+
function bn(e) {
|
|
1261
1649
|
return e === ";" || e === "&" || e === "?";
|
|
1262
1650
|
}
|
|
1263
|
-
function
|
|
1651
|
+
function xn(e, t, n, r) {
|
|
1264
1652
|
var i = e[n], a = [];
|
|
1265
|
-
if (
|
|
1266
|
-
else if (r === "*") Array.isArray(i) ? i.filter(
|
|
1267
|
-
a.push(
|
|
1653
|
+
if (yn(i) && i !== "") if (typeof i == "string" || typeof i == "number" || typeof i == "boolean") i = i.toString(), r && r !== "*" && (i = i.substring(0, parseInt(r, 10))), a.push(vn(t, i, bn(t) ? n : ""));
|
|
1654
|
+
else if (r === "*") Array.isArray(i) ? i.filter(yn).forEach(function(e) {
|
|
1655
|
+
a.push(vn(t, e, bn(t) ? n : ""));
|
|
1268
1656
|
}) : Object.keys(i).forEach(function(e) {
|
|
1269
|
-
|
|
1657
|
+
yn(i[e]) && a.push(vn(t, i[e], e));
|
|
1270
1658
|
});
|
|
1271
1659
|
else {
|
|
1272
1660
|
let e = [];
|
|
1273
|
-
Array.isArray(i) ? i.filter(
|
|
1274
|
-
e.push(
|
|
1661
|
+
Array.isArray(i) ? i.filter(yn).forEach(function(n) {
|
|
1662
|
+
e.push(vn(t, n));
|
|
1275
1663
|
}) : Object.keys(i).forEach(function(n) {
|
|
1276
|
-
|
|
1277
|
-
}),
|
|
1664
|
+
yn(i[n]) && (e.push(_n(n)), e.push(vn(t, i[n].toString())));
|
|
1665
|
+
}), bn(t) ? a.push(_n(n) + "=" + e.join(",")) : e.length !== 0 && a.push(e.join(","));
|
|
1278
1666
|
}
|
|
1279
|
-
else t === ";" ?
|
|
1667
|
+
else t === ";" ? yn(i) && a.push(_n(n)) : i === "" && (t === "&" || t === "?") ? a.push(_n(n) + "=") : i === "" && a.push("");
|
|
1280
1668
|
return a;
|
|
1281
1669
|
}
|
|
1282
|
-
function
|
|
1283
|
-
return { expand:
|
|
1670
|
+
function Sn(e) {
|
|
1671
|
+
return { expand: Cn.bind(null, e) };
|
|
1284
1672
|
}
|
|
1285
|
-
function
|
|
1673
|
+
function Cn(e, t) {
|
|
1286
1674
|
var n = [
|
|
1287
1675
|
"+",
|
|
1288
1676
|
"#",
|
|
@@ -1297,51 +1685,72 @@ function expand(e, t) {
|
|
|
1297
1685
|
let e = "", i = [];
|
|
1298
1686
|
if (n.indexOf(r.charAt(0)) !== -1 && (e = r.charAt(0), r = r.substr(1)), r.split(/,/g).forEach(function(n) {
|
|
1299
1687
|
var r = /([^:\*]*)(?::(\d+)|(\*))?/.exec(n);
|
|
1300
|
-
i.push(
|
|
1688
|
+
i.push(xn(t, e, r[1], r[2] || r[3]));
|
|
1301
1689
|
}), e && e !== "+") {
|
|
1302
1690
|
var a = ",";
|
|
1303
1691
|
return e === "?" ? a = "&" : e !== "#" && (a = e), (i.length === 0 ? "" : e) + i.join(a);
|
|
1304
1692
|
} else return i.join(",");
|
|
1305
|
-
} else return
|
|
1693
|
+
} else return gn(i);
|
|
1306
1694
|
}), e === "/" ? e : e.replace(/\/$/, "");
|
|
1307
1695
|
}
|
|
1308
|
-
function
|
|
1309
|
-
let t = e.method.toUpperCase(), n = (e.url || "/").replace(/:([a-z]\w+)/g, "{$1}"), r = Object.assign({}, e.headers), i, a =
|
|
1696
|
+
function wn(e) {
|
|
1697
|
+
let t = e.method.toUpperCase(), n = (e.url || "/").replace(/:([a-z]\w+)/g, "{$1}"), r = Object.assign({}, e.headers), i, a = hn(e, [
|
|
1310
1698
|
"method",
|
|
1311
1699
|
"baseUrl",
|
|
1312
1700
|
"url",
|
|
1313
1701
|
"headers",
|
|
1314
1702
|
"request",
|
|
1315
1703
|
"mediaType"
|
|
1316
|
-
]), o =
|
|
1317
|
-
n =
|
|
1318
|
-
let s =
|
|
1319
|
-
return /application\/octet-stream/i.test(r.accept) || (e.mediaType.format && (r.accept = r.accept.split(/,/).map((t) => t.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${e.mediaType.format}`)).join(",")), n.endsWith("/graphql") && e.mediaType.previews?.length && (r.accept = (r.accept.match(/(?<![\w-])[\w-]+(?=-preview)/g) || []).concat(e.mediaType.previews).map((t) => `application/vnd.github.${t}-preview${e.mediaType.format ? `.${e.mediaType.format}` : "+json"}`).join(","))), ["GET", "HEAD"].includes(t) ? n =
|
|
1704
|
+
]), o = mn(n);
|
|
1705
|
+
n = Sn(n).expand(a), /^http/.test(n) || (n = e.baseUrl + n);
|
|
1706
|
+
let s = hn(a, Object.keys(e).filter((e) => o.includes(e)).concat("baseUrl"));
|
|
1707
|
+
return /application\/octet-stream/i.test(r.accept) || (e.mediaType.format && (r.accept = r.accept.split(/,/).map((t) => t.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${e.mediaType.format}`)).join(",")), n.endsWith("/graphql") && e.mediaType.previews?.length && (r.accept = (r.accept.match(/(?<![\w-])[\w-]+(?=-preview)/g) || []).concat(e.mediaType.previews).map((t) => `application/vnd.github.${t}-preview${e.mediaType.format ? `.${e.mediaType.format}` : "+json"}`).join(","))), ["GET", "HEAD"].includes(t) ? n = dn(n, s) : "data" in s ? i = s.data : Object.keys(s).length && (i = s), !r["content-type"] && i !== void 0 && (r["content-type"] = "application/json; charset=utf-8"), ["PATCH", "PUT"].includes(t) && i === void 0 && (i = ""), Object.assign({
|
|
1320
1708
|
method: t,
|
|
1321
1709
|
url: n,
|
|
1322
1710
|
headers: r
|
|
1323
1711
|
}, i === void 0 ? null : { body: i }, e.request ? { request: e.request } : null);
|
|
1324
1712
|
}
|
|
1325
|
-
function
|
|
1326
|
-
return
|
|
1713
|
+
function Tn(e, t, n) {
|
|
1714
|
+
return wn(un(e, t, n));
|
|
1327
1715
|
}
|
|
1328
|
-
function
|
|
1329
|
-
let n =
|
|
1716
|
+
function En(e, t) {
|
|
1717
|
+
let n = un(e, t), r = Tn.bind(null, n);
|
|
1330
1718
|
return Object.assign(r, {
|
|
1331
1719
|
DEFAULTS: n,
|
|
1332
|
-
defaults:
|
|
1333
|
-
merge:
|
|
1334
|
-
parse:
|
|
1720
|
+
defaults: En.bind(null, n),
|
|
1721
|
+
merge: un.bind(null, n),
|
|
1722
|
+
parse: wn
|
|
1335
1723
|
});
|
|
1336
1724
|
}
|
|
1337
|
-
var
|
|
1725
|
+
var Dn = En(null, an), On = (/* @__PURE__ */ G(((e, t) => {
|
|
1338
1726
|
var n = function() {};
|
|
1339
1727
|
n.prototype = Object.create(null);
|
|
1728
|
+
/**
|
|
1729
|
+
* RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
|
|
1730
|
+
*
|
|
1731
|
+
* parameter = token "=" ( token / quoted-string )
|
|
1732
|
+
* token = 1*tchar
|
|
1733
|
+
* tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
|
|
1734
|
+
* / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
|
|
1735
|
+
* / DIGIT / ALPHA
|
|
1736
|
+
* ; any VCHAR, except delimiters
|
|
1737
|
+
* quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
|
|
1738
|
+
* qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
|
|
1739
|
+
* obs-text = %x80-FF
|
|
1740
|
+
* quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
|
|
1741
|
+
*/
|
|
1340
1742
|
var r = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu, i = /\\([\v\u0020-\u00ff])/gu, a = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u, o = {
|
|
1341
1743
|
type: "",
|
|
1342
1744
|
parameters: new n()
|
|
1343
1745
|
};
|
|
1344
1746
|
Object.freeze(o.parameters), Object.freeze(o);
|
|
1747
|
+
/**
|
|
1748
|
+
* Parse media type to object.
|
|
1749
|
+
*
|
|
1750
|
+
* @param {string|object} header
|
|
1751
|
+
* @return {Object}
|
|
1752
|
+
* @public
|
|
1753
|
+
*/
|
|
1345
1754
|
function s(e) {
|
|
1346
1755
|
if (typeof e != "string") throw TypeError("argument header is required and must be a string");
|
|
1347
1756
|
let t = e.indexOf(";"), o = t === -1 ? e.trim() : e.slice(0, t).trim();
|
|
@@ -1379,10 +1788,19 @@ var endpoint = withDefaults$2(null, DEFAULTS), import_fast_content_type_parse =
|
|
|
1379
1788
|
parse: s,
|
|
1380
1789
|
safeParse: c
|
|
1381
1790
|
}, t.exports.parse = s, t.exports.safeParse = c, t.exports.defaultContentType = o;
|
|
1382
|
-
})))(),
|
|
1791
|
+
})))(), kn = class extends Error {
|
|
1383
1792
|
name;
|
|
1793
|
+
/**
|
|
1794
|
+
* http status code
|
|
1795
|
+
*/
|
|
1384
1796
|
status;
|
|
1797
|
+
/**
|
|
1798
|
+
* Request options that lead to the error.
|
|
1799
|
+
*/
|
|
1385
1800
|
request;
|
|
1801
|
+
/**
|
|
1802
|
+
* Response object if a response was received
|
|
1803
|
+
*/
|
|
1386
1804
|
response;
|
|
1387
1805
|
constructor(e, t, n) {
|
|
1388
1806
|
/* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist */
|
|
@@ -1390,19 +1808,19 @@ var endpoint = withDefaults$2(null, DEFAULTS), import_fast_content_type_parse =
|
|
|
1390
1808
|
let r = Object.assign({}, n.request);
|
|
1391
1809
|
n.request.headers.authorization && (r.headers = Object.assign({}, n.request.headers, { authorization: n.request.headers.authorization.replace(/(?<! ) .*$/, " [REDACTED]") })), r.url = r.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"), this.request = r;
|
|
1392
1810
|
}
|
|
1393
|
-
},
|
|
1394
|
-
function
|
|
1811
|
+
}, An = "10.0.7", jn = { headers: { "user-agent": `octokit-request.js/${An} ${qt()}` } };
|
|
1812
|
+
function Mn(e) {
|
|
1395
1813
|
if (typeof e != "object" || !e || Object.prototype.toString.call(e) !== "[object Object]") return !1;
|
|
1396
1814
|
let t = Object.getPrototypeOf(e);
|
|
1397
1815
|
if (t === null) return !0;
|
|
1398
1816
|
let n = Object.prototype.hasOwnProperty.call(t, "constructor") && t.constructor;
|
|
1399
1817
|
return typeof n == "function" && n instanceof n && Function.prototype.call(n) === Function.prototype.call(e);
|
|
1400
1818
|
}
|
|
1401
|
-
var
|
|
1402
|
-
async function
|
|
1819
|
+
var Nn = () => "";
|
|
1820
|
+
async function Pn(e) {
|
|
1403
1821
|
let t = e.request?.fetch || globalThis.fetch;
|
|
1404
1822
|
if (!t) throw Error("fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing");
|
|
1405
|
-
let n = e.request?.log || console, r = e.request?.parseSuccessResponseBody !== !1, i =
|
|
1823
|
+
let n = e.request?.log || console, r = e.request?.parseSuccessResponseBody !== !1, i = Mn(e.body) || Array.isArray(e.body) ? JSON.stringify(e.body) : e.body, a = Object.fromEntries(Object.entries(e.headers).map(([e, t]) => [e, String(t)])), o;
|
|
1406
1824
|
try {
|
|
1407
1825
|
o = await t(e.url, {
|
|
1408
1826
|
method: e.method,
|
|
@@ -1418,7 +1836,7 @@ async function fetchWrapper(e) {
|
|
|
1418
1836
|
if (t.name === "AbortError") throw t.status = 500, t;
|
|
1419
1837
|
n = t.message, t.name === "TypeError" && "cause" in t && (t.cause instanceof Error ? n = t.cause.message : typeof t.cause == "string" && (n = t.cause));
|
|
1420
1838
|
}
|
|
1421
|
-
let r = new
|
|
1839
|
+
let r = new kn(n, 500, { request: e });
|
|
1422
1840
|
throw r.cause = t, r;
|
|
1423
1841
|
}
|
|
1424
1842
|
let s = o.status, c = o.url, l = {};
|
|
@@ -1436,42 +1854,42 @@ async function fetchWrapper(e) {
|
|
|
1436
1854
|
if (s === 204 || s === 205) return u;
|
|
1437
1855
|
if (e.method === "HEAD") {
|
|
1438
1856
|
if (s < 400) return u;
|
|
1439
|
-
throw new
|
|
1857
|
+
throw new kn(o.statusText, s, {
|
|
1440
1858
|
response: u,
|
|
1441
1859
|
request: e
|
|
1442
1860
|
});
|
|
1443
1861
|
}
|
|
1444
|
-
if (s === 304) throw u.data = await
|
|
1862
|
+
if (s === 304) throw u.data = await Fn(o), new kn("Not modified", s, {
|
|
1445
1863
|
response: u,
|
|
1446
1864
|
request: e
|
|
1447
1865
|
});
|
|
1448
|
-
if (s >= 400) throw u.data = await
|
|
1866
|
+
if (s >= 400) throw u.data = await Fn(o), new kn(Ln(u.data), s, {
|
|
1449
1867
|
response: u,
|
|
1450
1868
|
request: e
|
|
1451
1869
|
});
|
|
1452
|
-
return u.data = r ? await
|
|
1870
|
+
return u.data = r ? await Fn(o) : o.body, u;
|
|
1453
1871
|
}
|
|
1454
|
-
async function
|
|
1872
|
+
async function Fn(e) {
|
|
1455
1873
|
let t = e.headers.get("content-type");
|
|
1456
|
-
if (!t) return e.text().catch(
|
|
1457
|
-
let n = (0,
|
|
1458
|
-
if (
|
|
1874
|
+
if (!t) return e.text().catch(Nn);
|
|
1875
|
+
let n = (0, On.safeParse)(t);
|
|
1876
|
+
if (In(n)) {
|
|
1459
1877
|
let t = "";
|
|
1460
1878
|
try {
|
|
1461
1879
|
return t = await e.text(), JSON.parse(t);
|
|
1462
1880
|
} catch {
|
|
1463
1881
|
return t;
|
|
1464
1882
|
}
|
|
1465
|
-
} else if (n.type.startsWith("text/") || n.parameters.charset?.toLowerCase() === "utf-8") return e.text().catch(
|
|
1883
|
+
} else if (n.type.startsWith("text/") || n.parameters.charset?.toLowerCase() === "utf-8") return e.text().catch(Nn);
|
|
1466
1884
|
else return e.arrayBuffer().catch(
|
|
1467
1885
|
/* v8 ignore next -- @preserve */
|
|
1468
1886
|
() => /* @__PURE__ */ new ArrayBuffer(0)
|
|
1469
1887
|
);
|
|
1470
1888
|
}
|
|
1471
|
-
function
|
|
1889
|
+
function In(e) {
|
|
1472
1890
|
return e.type === "application/json" || e.type === "application/scim+json";
|
|
1473
1891
|
}
|
|
1474
|
-
function
|
|
1892
|
+
function Ln(e) {
|
|
1475
1893
|
if (typeof e == "string") return e;
|
|
1476
1894
|
if (e instanceof ArrayBuffer) return "Unknown error";
|
|
1477
1895
|
if ("message" in e) {
|
|
@@ -1480,33 +1898,33 @@ function toErrorMessage(e) {
|
|
|
1480
1898
|
}
|
|
1481
1899
|
return `Unknown error: ${JSON.stringify(e)}`;
|
|
1482
1900
|
}
|
|
1483
|
-
function
|
|
1901
|
+
function Rn(e, t) {
|
|
1484
1902
|
let n = e.defaults(t);
|
|
1485
1903
|
return Object.assign(function(e, t) {
|
|
1486
1904
|
let r = n.merge(e, t);
|
|
1487
|
-
if (!r.request || !r.request.hook) return
|
|
1488
|
-
let i = (e, t) =>
|
|
1905
|
+
if (!r.request || !r.request.hook) return Pn(n.parse(r));
|
|
1906
|
+
let i = (e, t) => Pn(n.parse(n.merge(e, t)));
|
|
1489
1907
|
return Object.assign(i, {
|
|
1490
1908
|
endpoint: n,
|
|
1491
|
-
defaults:
|
|
1909
|
+
defaults: Rn.bind(null, n)
|
|
1492
1910
|
}), r.request.hook(i, r);
|
|
1493
1911
|
}, {
|
|
1494
1912
|
endpoint: n,
|
|
1495
|
-
defaults:
|
|
1913
|
+
defaults: Rn.bind(null, n)
|
|
1496
1914
|
});
|
|
1497
1915
|
}
|
|
1498
|
-
var
|
|
1499
|
-
function
|
|
1916
|
+
var zn = Rn(Dn, jn), Bn = "0.0.0-development";
|
|
1917
|
+
function Vn(e) {
|
|
1500
1918
|
return "Request failed due to following response errors:\n" + e.errors.map((e) => ` - ${e.message}`).join("\n");
|
|
1501
1919
|
}
|
|
1502
|
-
var
|
|
1920
|
+
var Hn = class extends Error {
|
|
1503
1921
|
constructor(e, t, n) {
|
|
1504
|
-
super(
|
|
1922
|
+
super(Vn(n)), this.request = e, this.headers = t, this.response = n, this.errors = n.errors, this.data = n.data, Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
|
|
1505
1923
|
}
|
|
1506
1924
|
name = "GraphqlResponseError";
|
|
1507
1925
|
errors;
|
|
1508
1926
|
data;
|
|
1509
|
-
},
|
|
1927
|
+
}, Un = [
|
|
1510
1928
|
"method",
|
|
1511
1929
|
"baseUrl",
|
|
1512
1930
|
"url",
|
|
@@ -1515,70 +1933,70 @@ var GraphqlResponseError = class extends Error {
|
|
|
1515
1933
|
"query",
|
|
1516
1934
|
"mediaType",
|
|
1517
1935
|
"operationName"
|
|
1518
|
-
],
|
|
1936
|
+
], Wn = [
|
|
1519
1937
|
"query",
|
|
1520
1938
|
"method",
|
|
1521
1939
|
"url"
|
|
1522
|
-
],
|
|
1523
|
-
function
|
|
1940
|
+
], Gn = /\/api\/v3\/?$/;
|
|
1941
|
+
function Kn(e, t, n) {
|
|
1524
1942
|
if (n) {
|
|
1525
1943
|
if (typeof t == "string" && "query" in n) return Promise.reject(/* @__PURE__ */ Error("[@octokit/graphql] \"query\" cannot be used as variable name"));
|
|
1526
|
-
for (let e in n) if (
|
|
1944
|
+
for (let e in n) if (Wn.includes(e)) return Promise.reject(/* @__PURE__ */ Error(`[@octokit/graphql] "${e}" cannot be used as variable name`));
|
|
1527
1945
|
}
|
|
1528
|
-
let r = typeof t == "string" ? Object.assign({ query: t }, n) : t, i = Object.keys(r).reduce((e, t) =>
|
|
1529
|
-
return
|
|
1946
|
+
let r = typeof t == "string" ? Object.assign({ query: t }, n) : t, i = Object.keys(r).reduce((e, t) => Un.includes(t) ? (e[t] = r[t], e) : (e.variables ||= {}, e.variables[t] = r[t], e), {}), a = r.baseUrl || e.endpoint.DEFAULTS.baseUrl;
|
|
1947
|
+
return Gn.test(a) && (i.url = a.replace(Gn, "/api/graphql")), e(i).then((e) => {
|
|
1530
1948
|
if (e.data.errors) {
|
|
1531
1949
|
let t = {};
|
|
1532
1950
|
for (let n of Object.keys(e.headers)) t[n] = e.headers[n];
|
|
1533
|
-
throw new
|
|
1951
|
+
throw new Hn(i, t, e.data);
|
|
1534
1952
|
}
|
|
1535
1953
|
return e.data.data;
|
|
1536
1954
|
});
|
|
1537
1955
|
}
|
|
1538
|
-
function
|
|
1956
|
+
function qn(e, t) {
|
|
1539
1957
|
let n = e.defaults(t);
|
|
1540
|
-
return Object.assign((e, t) =>
|
|
1541
|
-
defaults:
|
|
1958
|
+
return Object.assign((e, t) => Kn(n, e, t), {
|
|
1959
|
+
defaults: qn.bind(null, n),
|
|
1542
1960
|
endpoint: n.endpoint
|
|
1543
1961
|
});
|
|
1544
1962
|
}
|
|
1545
|
-
|
|
1546
|
-
headers: { "user-agent": `octokit-graphql.js/${
|
|
1963
|
+
qn(zn, {
|
|
1964
|
+
headers: { "user-agent": `octokit-graphql.js/${Bn} ${qt()}` },
|
|
1547
1965
|
method: "POST",
|
|
1548
1966
|
url: "/graphql"
|
|
1549
1967
|
});
|
|
1550
|
-
function
|
|
1551
|
-
return
|
|
1968
|
+
function Jn(e) {
|
|
1969
|
+
return qn(e, {
|
|
1552
1970
|
method: "POST",
|
|
1553
1971
|
url: "/graphql"
|
|
1554
1972
|
});
|
|
1555
1973
|
}
|
|
1556
|
-
var
|
|
1557
|
-
async function
|
|
1558
|
-
let t =
|
|
1974
|
+
var Yn = "(?:[a-zA-Z0-9_-]+)", Xn = "\\.", Zn = RegExp(`^${Yn}${Xn}${Yn}${Xn}${Yn}$`), Qn = Zn.test.bind(Zn);
|
|
1975
|
+
async function $n(e) {
|
|
1976
|
+
let t = Qn(e), n = e.startsWith("v1.") || e.startsWith("ghs_"), r = e.startsWith("ghu_");
|
|
1559
1977
|
return {
|
|
1560
1978
|
type: "token",
|
|
1561
1979
|
token: e,
|
|
1562
1980
|
tokenType: t ? "app" : n ? "installation" : r ? "user-to-server" : "oauth"
|
|
1563
1981
|
};
|
|
1564
1982
|
}
|
|
1565
|
-
function
|
|
1983
|
+
function er(e) {
|
|
1566
1984
|
return e.split(/\./).length === 3 ? `bearer ${e}` : `token ${e}`;
|
|
1567
1985
|
}
|
|
1568
|
-
async function
|
|
1986
|
+
async function tr(e, t, n, r) {
|
|
1569
1987
|
let i = t.endpoint.merge(n, r);
|
|
1570
|
-
return i.headers.authorization =
|
|
1988
|
+
return i.headers.authorization = er(e), t(i);
|
|
1571
1989
|
}
|
|
1572
|
-
var
|
|
1990
|
+
var nr = function(e) {
|
|
1573
1991
|
if (!e) throw Error("[@octokit/auth-token] No token passed to createTokenAuth");
|
|
1574
1992
|
if (typeof e != "string") throw Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");
|
|
1575
|
-
return e = e.replace(/^(token|bearer) +/i, ""), Object.assign(
|
|
1576
|
-
},
|
|
1577
|
-
function
|
|
1578
|
-
return typeof e.debug != "function" && (e.debug =
|
|
1993
|
+
return e = e.replace(/^(token|bearer) +/i, ""), Object.assign($n.bind(null, e), { hook: tr.bind(null, e) });
|
|
1994
|
+
}, rr = "7.0.6", ir = () => {}, ar = console.warn.bind(console), or = console.error.bind(console);
|
|
1995
|
+
function sr(e = {}) {
|
|
1996
|
+
return typeof e.debug != "function" && (e.debug = ir), typeof e.info != "function" && (e.info = ir), typeof e.warn != "function" && (e.warn = ar), typeof e.error != "function" && (e.error = or), e;
|
|
1579
1997
|
}
|
|
1580
|
-
var
|
|
1581
|
-
static VERSION =
|
|
1998
|
+
var cr = `octokit-core.js/${rr} ${qt()}`, lr = class {
|
|
1999
|
+
static VERSION = rr;
|
|
1582
2000
|
static defaults(e) {
|
|
1583
2001
|
return class extends this {
|
|
1584
2002
|
constructor(...t) {
|
|
@@ -1592,6 +2010,12 @@ var userAgentTrail = `octokit-core.js/${VERSION$4} ${getUserAgent()}`, Octokit$1
|
|
|
1592
2010
|
};
|
|
1593
2011
|
}
|
|
1594
2012
|
static plugins = [];
|
|
2013
|
+
/**
|
|
2014
|
+
* Attach a plugin (or many) to your Octokit instance.
|
|
2015
|
+
*
|
|
2016
|
+
* @example
|
|
2017
|
+
* const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)
|
|
2018
|
+
*/
|
|
1595
2019
|
static plugin(...e) {
|
|
1596
2020
|
let t = this.plugins;
|
|
1597
2021
|
return class extends this {
|
|
@@ -1599,8 +2023,8 @@ var userAgentTrail = `octokit-core.js/${VERSION$4} ${getUserAgent()}`, Octokit$1
|
|
|
1599
2023
|
};
|
|
1600
2024
|
}
|
|
1601
2025
|
constructor(e = {}) {
|
|
1602
|
-
let t = new
|
|
1603
|
-
baseUrl:
|
|
2026
|
+
let t = new nn.Collection(), n = {
|
|
2027
|
+
baseUrl: zn.endpoint.DEFAULTS.baseUrl,
|
|
1604
2028
|
headers: {},
|
|
1605
2029
|
request: Object.assign({}, e.request, { hook: t.bind(null, "request") }),
|
|
1606
2030
|
mediaType: {
|
|
@@ -1608,7 +2032,7 @@ var userAgentTrail = `octokit-core.js/${VERSION$4} ${getUserAgent()}`, Octokit$1
|
|
|
1608
2032
|
format: ""
|
|
1609
2033
|
}
|
|
1610
2034
|
};
|
|
1611
|
-
if (n.headers["user-agent"] = e.userAgent ? `${e.userAgent} ${
|
|
2035
|
+
if (n.headers["user-agent"] = e.userAgent ? `${e.userAgent} ${cr}` : cr, e.baseUrl && (n.baseUrl = e.baseUrl), e.previews && (n.mediaType.previews = e.previews), e.timeZone && (n.headers["time-zone"] = e.timeZone), this.request = zn.defaults(n), this.graphql = Jn(this.request).defaults(n), this.log = sr(e.log), this.hook = t, e.authStrategy) {
|
|
1612
2036
|
let { authStrategy: n, ...r } = e, i = n(Object.assign({
|
|
1613
2037
|
request: this.request,
|
|
1614
2038
|
log: this.log,
|
|
@@ -1618,7 +2042,7 @@ var userAgentTrail = `octokit-core.js/${VERSION$4} ${getUserAgent()}`, Octokit$1
|
|
|
1618
2042
|
t.wrap("request", i.hook), this.auth = i;
|
|
1619
2043
|
} else if (!e.auth) this.auth = async () => ({ type: "unauthenticated" });
|
|
1620
2044
|
else {
|
|
1621
|
-
let n =
|
|
2045
|
+
let n = nr(e.auth);
|
|
1622
2046
|
t.wrap("request", n.hook), this.auth = n;
|
|
1623
2047
|
}
|
|
1624
2048
|
let r = this.constructor;
|
|
@@ -1629,8 +2053,8 @@ var userAgentTrail = `octokit-core.js/${VERSION$4} ${getUserAgent()}`, Octokit$1
|
|
|
1629
2053
|
log;
|
|
1630
2054
|
hook;
|
|
1631
2055
|
auth;
|
|
1632
|
-
},
|
|
1633
|
-
function
|
|
2056
|
+
}, ur = "6.0.0";
|
|
2057
|
+
function dr(e) {
|
|
1634
2058
|
e.hook.wrap("request", (t, n) => {
|
|
1635
2059
|
e.log.debug("request", n);
|
|
1636
2060
|
let r = Date.now(), i = e.request.endpoint.parse(n), a = i.url.replace(n.baseUrl, "");
|
|
@@ -1643,9 +2067,9 @@ function requestLog(e) {
|
|
|
1643
2067
|
});
|
|
1644
2068
|
});
|
|
1645
2069
|
}
|
|
1646
|
-
|
|
1647
|
-
var
|
|
1648
|
-
function
|
|
2070
|
+
dr.VERSION = ur;
|
|
2071
|
+
var fr = "0.0.0-development";
|
|
2072
|
+
function pr(e) {
|
|
1649
2073
|
if (!e.data) return {
|
|
1650
2074
|
...e,
|
|
1651
2075
|
data: []
|
|
@@ -1656,12 +2080,12 @@ function normalizePaginatedListResponse(e) {
|
|
|
1656
2080
|
let a = Object.keys(e.data)[0];
|
|
1657
2081
|
return e.data = e.data[a], t !== void 0 && (e.data.incomplete_results = t), n !== void 0 && (e.data.repository_selection = n), e.data.total_count = r, e.data.total_commits = i, e;
|
|
1658
2082
|
}
|
|
1659
|
-
function
|
|
2083
|
+
function mr(e, t, n) {
|
|
1660
2084
|
let r = typeof t == "function" ? t.endpoint(n) : e.request.endpoint(t, n), i = typeof t == "function" ? t : e.request, a = r.method, o = r.headers, s = r.url;
|
|
1661
2085
|
return { [Symbol.asyncIterator]: () => ({ async next() {
|
|
1662
2086
|
if (!s) return { done: !0 };
|
|
1663
2087
|
try {
|
|
1664
|
-
let e =
|
|
2088
|
+
let e = pr(await i({
|
|
1665
2089
|
method: a,
|
|
1666
2090
|
url: s,
|
|
1667
2091
|
headers: o
|
|
@@ -1681,25 +2105,25 @@ function iterator(e, t, n) {
|
|
|
1681
2105
|
}
|
|
1682
2106
|
} }) };
|
|
1683
2107
|
}
|
|
1684
|
-
function
|
|
1685
|
-
return typeof n == "function" && (r = n, n = void 0),
|
|
2108
|
+
function hr(e, t, n, r) {
|
|
2109
|
+
return typeof n == "function" && (r = n, n = void 0), gr(e, [], mr(e, t, n)[Symbol.asyncIterator](), r);
|
|
1686
2110
|
}
|
|
1687
|
-
function
|
|
2111
|
+
function gr(e, t, n, r) {
|
|
1688
2112
|
return n.next().then((i) => {
|
|
1689
2113
|
if (i.done) return t;
|
|
1690
2114
|
let a = !1;
|
|
1691
2115
|
function o() {
|
|
1692
2116
|
a = !0;
|
|
1693
2117
|
}
|
|
1694
|
-
return t = t.concat(r ? r(i.value, o) : i.value.data), a ? t :
|
|
2118
|
+
return t = t.concat(r ? r(i.value, o) : i.value.data), a ? t : gr(e, t, n, r);
|
|
1695
2119
|
});
|
|
1696
2120
|
}
|
|
1697
|
-
Object.assign(
|
|
1698
|
-
function
|
|
1699
|
-
return { paginate: Object.assign(
|
|
2121
|
+
Object.assign(hr, { iterator: mr });
|
|
2122
|
+
function _r(e) {
|
|
2123
|
+
return { paginate: Object.assign(hr.bind(null, e), { iterator: mr.bind(null, e) }) };
|
|
1700
2124
|
}
|
|
1701
|
-
|
|
1702
|
-
var
|
|
2125
|
+
_r.VERSION = fr;
|
|
2126
|
+
var vr = "17.0.0", yr = {
|
|
1703
2127
|
actions: {
|
|
1704
2128
|
addCustomLabelsToSelfHostedRunnerForOrg: ["POST /orgs/{org}/actions/runners/{runner_id}/labels"],
|
|
1705
2129
|
addCustomLabelsToSelfHostedRunnerForRepo: ["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],
|
|
@@ -2990,22 +3414,22 @@ var VERSION$1 = "17.0.0", endpoints_default = {
|
|
|
2990
3414
|
unfollow: ["DELETE /user/following/{username}"],
|
|
2991
3415
|
updateAuthenticated: ["PATCH /user"]
|
|
2992
3416
|
}
|
|
2993
|
-
},
|
|
2994
|
-
for (let [e, t] of Object.entries(
|
|
3417
|
+
}, $ = /* @__PURE__ */ new Map();
|
|
3418
|
+
for (let [e, t] of Object.entries(yr)) for (let [n, r] of Object.entries(t)) {
|
|
2995
3419
|
let [t, i, a] = r, [o, s] = t.split(/ /), c = Object.assign({
|
|
2996
3420
|
method: o,
|
|
2997
3421
|
url: s
|
|
2998
3422
|
}, i);
|
|
2999
|
-
|
|
3423
|
+
$.has(e) || $.set(e, /* @__PURE__ */ new Map()), $.get(e).set(n, {
|
|
3000
3424
|
scope: e,
|
|
3001
3425
|
methodName: n,
|
|
3002
3426
|
endpointDefaults: c,
|
|
3003
3427
|
decorations: a
|
|
3004
3428
|
});
|
|
3005
3429
|
}
|
|
3006
|
-
var
|
|
3430
|
+
var br = {
|
|
3007
3431
|
has({ scope: e }, t) {
|
|
3008
|
-
return
|
|
3432
|
+
return $.get(e).has(t);
|
|
3009
3433
|
},
|
|
3010
3434
|
getOwnPropertyDescriptor(e, t) {
|
|
3011
3435
|
return {
|
|
@@ -3022,29 +3446,29 @@ var handler = {
|
|
|
3022
3446
|
return delete e.cache[t], !0;
|
|
3023
3447
|
},
|
|
3024
3448
|
ownKeys({ scope: e }) {
|
|
3025
|
-
return [
|
|
3449
|
+
return [...$.get(e).keys()];
|
|
3026
3450
|
},
|
|
3027
3451
|
set(e, t, n) {
|
|
3028
3452
|
return e.cache[t] = n;
|
|
3029
3453
|
},
|
|
3030
3454
|
get({ octokit: e, scope: t, cache: n }, r) {
|
|
3031
3455
|
if (n[r]) return n[r];
|
|
3032
|
-
let i =
|
|
3456
|
+
let i = $.get(t).get(r);
|
|
3033
3457
|
if (!i) return;
|
|
3034
3458
|
let { endpointDefaults: a, decorations: o } = i;
|
|
3035
|
-
return o ? n[r] =
|
|
3459
|
+
return o ? n[r] = Sr(e, t, r, a, o) : n[r] = e.request.defaults(a), n[r];
|
|
3036
3460
|
}
|
|
3037
3461
|
};
|
|
3038
|
-
function
|
|
3462
|
+
function xr(e) {
|
|
3039
3463
|
let t = {};
|
|
3040
|
-
for (let n of
|
|
3464
|
+
for (let n of $.keys()) t[n] = new Proxy({
|
|
3041
3465
|
octokit: e,
|
|
3042
3466
|
scope: n,
|
|
3043
3467
|
cache: {}
|
|
3044
|
-
},
|
|
3468
|
+
}, br);
|
|
3045
3469
|
return t;
|
|
3046
3470
|
}
|
|
3047
|
-
function
|
|
3471
|
+
function Sr(e, t, n, r, i) {
|
|
3048
3472
|
let a = e.request.defaults(r);
|
|
3049
3473
|
function o(...r) {
|
|
3050
3474
|
let o = a.endpoint.merge(...r);
|
|
@@ -3065,19 +3489,19 @@ function decorate(e, t, n, r, i) {
|
|
|
3065
3489
|
}
|
|
3066
3490
|
return Object.assign(o, a);
|
|
3067
3491
|
}
|
|
3068
|
-
function
|
|
3069
|
-
return { rest:
|
|
3492
|
+
function Cr(e) {
|
|
3493
|
+
return { rest: xr(e) };
|
|
3070
3494
|
}
|
|
3071
|
-
|
|
3072
|
-
function
|
|
3073
|
-
let t =
|
|
3495
|
+
Cr.VERSION = vr;
|
|
3496
|
+
function wr(e) {
|
|
3497
|
+
let t = xr(e);
|
|
3074
3498
|
return {
|
|
3075
3499
|
...t,
|
|
3076
3500
|
rest: t
|
|
3077
3501
|
};
|
|
3078
3502
|
}
|
|
3079
|
-
|
|
3080
|
-
var
|
|
3503
|
+
wr.VERSION = vr;
|
|
3504
|
+
var Tr = lr.plugin(dr, wr, _r).defaults({ userAgent: "octokit-rest.js/22.0.1" }), Er = new class extends bt {
|
|
3081
3505
|
description = {
|
|
3082
3506
|
title: "通过Github安装插件",
|
|
3083
3507
|
description: "输入形如: \"gh:owner/repo\"的内容"
|
|
@@ -3085,17 +3509,17 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3085
3509
|
name = "github";
|
|
3086
3510
|
async installer(e) {
|
|
3087
3511
|
try {
|
|
3088
|
-
var t =
|
|
3512
|
+
var t = nt().$load(tt).value.githubToken;
|
|
3089
3513
|
} catch (e) {
|
|
3090
3514
|
console.error("fail to get github token", e);
|
|
3091
3515
|
var t = "";
|
|
3092
3516
|
}
|
|
3093
|
-
let n = new
|
|
3517
|
+
let n = new Tr({ auth: Ae(t) ? void 0 : t }), [r, i] = e.replace(/^gh:/, "").split("/"), { data: a } = await n.rest.repos.getLatestRelease({
|
|
3094
3518
|
owner: r,
|
|
3095
3519
|
repo: i
|
|
3096
3520
|
}), o = a.assets[0];
|
|
3097
3521
|
if (!o) throw Error("未找到资源");
|
|
3098
|
-
let { data: s } = await
|
|
3522
|
+
let { data: s } = await W.request({
|
|
3099
3523
|
url: o.browser_download_url,
|
|
3100
3524
|
responseType: "blob"
|
|
3101
3525
|
});
|
|
@@ -3110,7 +3534,29 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3110
3534
|
isMatched(e) {
|
|
3111
3535
|
return e.startsWith("gh:") && e.split("/").length === 2;
|
|
3112
3536
|
}
|
|
3113
|
-
}(),
|
|
3537
|
+
}(), Dr = "https://raw.githubusercontent.com/delta-comic/awesome-plugins/refs/heads/main/pages/", Or = new class extends bt {
|
|
3538
|
+
description = {
|
|
3539
|
+
title: "快速安装插件",
|
|
3540
|
+
description: "输入形如: \"ap:jmcomic\"的内容"
|
|
3541
|
+
};
|
|
3542
|
+
name = "awesome";
|
|
3543
|
+
async installer(e) {
|
|
3544
|
+
let t = e.replace(/^ap:/, ""), { data: n } = await W.get(`${t}.json`, {
|
|
3545
|
+
baseURL: Dr,
|
|
3546
|
+
responseType: "json"
|
|
3547
|
+
});
|
|
3548
|
+
return n.download;
|
|
3549
|
+
}
|
|
3550
|
+
async install(e) {
|
|
3551
|
+
return await this.installer(e);
|
|
3552
|
+
}
|
|
3553
|
+
async update(e) {
|
|
3554
|
+
return await this.installer(e.installInput);
|
|
3555
|
+
}
|
|
3556
|
+
isMatched(e) {
|
|
3557
|
+
return /^ap:[A-Za-z0-9\-\_]+$/.test(e);
|
|
3558
|
+
}
|
|
3559
|
+
}(), kr = (/* @__PURE__ */ G(((e) => {
|
|
3114
3560
|
function t(e) {
|
|
3115
3561
|
return e === void 0;
|
|
3116
3562
|
}
|
|
@@ -3124,24 +3570,24 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3124
3570
|
}, {});
|
|
3125
3571
|
}
|
|
3126
3572
|
e.parse = n;
|
|
3127
|
-
})))(),
|
|
3573
|
+
})))(), Ar = new class extends xt {
|
|
3128
3574
|
name = "userscript";
|
|
3129
3575
|
async installDownload(e) {
|
|
3130
|
-
let t = await e.text(), n =
|
|
3131
|
-
return await
|
|
3576
|
+
let t = await e.text(), n = Pe((0, kr.parse)(t)), r = await yt(n.name.id);
|
|
3577
|
+
return await Rt(r, { recursive: !0 }), await Wt(await Z(r, "us.js"), t, { create: !0 }), n;
|
|
3132
3578
|
}
|
|
3133
3579
|
canInstall(e) {
|
|
3134
3580
|
return e.name.endsWith(".js");
|
|
3135
3581
|
}
|
|
3136
3582
|
async load(e) {
|
|
3137
|
-
let t = await
|
|
3583
|
+
let t = await Vt(await Z(await yt(e.pluginName), "us.js")), n = t.lastIndexOf(";") + 1, r = new Blob([t.slice(0, n)], { type: "text/javascript" }), i = URL.createObjectURL(r), a = document.createElement("script");
|
|
3138
3584
|
a.addEventListener("load", () => {
|
|
3139
3585
|
URL.revokeObjectURL(i);
|
|
3140
3586
|
}), a.addEventListener("error", (e) => {
|
|
3141
3587
|
throw URL.revokeObjectURL(i), e;
|
|
3142
3588
|
}), a.async = !0, a.src = i, document.body.appendChild(a);
|
|
3143
3589
|
}
|
|
3144
|
-
}(),
|
|
3590
|
+
}(), jr = (/* @__PURE__ */ G(((e, t) => {
|
|
3145
3591
|
(function(n) {
|
|
3146
3592
|
typeof e == "object" && t !== void 0 ? t.exports = n() : typeof define == "function" && define.amd ? define([], n) : (typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : this).JSZip = n();
|
|
3147
3593
|
})(function() {
|
|
@@ -3149,7 +3595,7 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3149
3595
|
function i(o, s) {
|
|
3150
3596
|
if (!n[o]) {
|
|
3151
3597
|
if (!t[o]) {
|
|
3152
|
-
var c = typeof
|
|
3598
|
+
var c = typeof K == "function" && K;
|
|
3153
3599
|
if (!s && c) return c(o, !0);
|
|
3154
3600
|
if (a) return a(o, !0);
|
|
3155
3601
|
var l = /* @__PURE__ */ Error("Cannot find module '" + o + "'");
|
|
@@ -3163,7 +3609,7 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3163
3609
|
}
|
|
3164
3610
|
return n[o].exports;
|
|
3165
3611
|
}
|
|
3166
|
-
for (var a = typeof
|
|
3612
|
+
for (var a = typeof K == "function" && K, o = 0; o < r.length; o++) i(r[o]);
|
|
3167
3613
|
return i;
|
|
3168
3614
|
}({
|
|
3169
3615
|
1: [function(e, t, n) {
|
|
@@ -3292,25 +3738,25 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3292
3738
|
return r;
|
|
3293
3739
|
}
|
|
3294
3740
|
function i(e, t, n, i, o, u) {
|
|
3295
|
-
var d, f, p = e.file, m = e.compression,
|
|
3741
|
+
var d, f, p = e.file, m = e.compression, h = u !== s.utf8encode, g = a.transformTo("string", u(p.name)), _ = a.transformTo("string", s.utf8encode(p.name)), v = p.comment, y = a.transformTo("string", u(v)), b = a.transformTo("string", s.utf8encode(v)), x = _.length !== p.name.length, S = b.length !== v.length, C = "", w = "", T = "", E = p.dir, D = p.date, O = {
|
|
3296
3742
|
crc32: 0,
|
|
3297
3743
|
compressedSize: 0,
|
|
3298
3744
|
uncompressedSize: 0
|
|
3299
3745
|
};
|
|
3300
|
-
t && !n || (
|
|
3301
|
-
var
|
|
3302
|
-
t && (
|
|
3303
|
-
var
|
|
3304
|
-
|
|
3746
|
+
t && !n || (O.crc32 = e.crc32, O.compressedSize = e.compressedSize, O.uncompressedSize = e.uncompressedSize);
|
|
3747
|
+
var k = 0;
|
|
3748
|
+
t && (k |= 8), h || !x && !S || (k |= 2048);
|
|
3749
|
+
var A = 0, j = 0;
|
|
3750
|
+
E && (A |= 16), o === "UNIX" ? (j = 798, A |= function(e, t) {
|
|
3305
3751
|
var n = e;
|
|
3306
3752
|
return e || (n = t ? 16893 : 33204), (65535 & n) << 16;
|
|
3307
|
-
}(p.unixPermissions,
|
|
3753
|
+
}(p.unixPermissions, E)) : (j = 20, A |= function(e) {
|
|
3308
3754
|
return 63 & (e || 0);
|
|
3309
|
-
}(p.dosPermissions)), d =
|
|
3310
|
-
var
|
|
3311
|
-
return
|
|
3312
|
-
fileRecord: l.LOCAL_FILE_HEADER +
|
|
3313
|
-
dirRecord: l.CENTRAL_FILE_HEADER + r(
|
|
3755
|
+
}(p.dosPermissions)), d = D.getUTCHours(), d <<= 6, d |= D.getUTCMinutes(), d <<= 5, d |= D.getUTCSeconds() / 2, f = D.getUTCFullYear() - 1980, f <<= 4, f |= D.getUTCMonth() + 1, f <<= 5, f |= D.getUTCDate(), x && (w = r(1, 1) + r(c(g), 4) + _, C += "up" + r(w.length, 2) + w), S && (T = r(1, 1) + r(c(y), 4) + b, C += "uc" + r(T.length, 2) + T);
|
|
3756
|
+
var M = "";
|
|
3757
|
+
return M += "\n\0", M += r(k, 2), M += m.magic, M += r(d, 2), M += r(f, 2), M += r(O.crc32, 4), M += r(O.compressedSize, 4), M += r(O.uncompressedSize, 4), M += r(g.length, 2), M += r(C.length, 2), {
|
|
3758
|
+
fileRecord: l.LOCAL_FILE_HEADER + M + g + C,
|
|
3759
|
+
dirRecord: l.CENTRAL_FILE_HEADER + r(j, 2) + M + r(y.length, 2) + "\0\0\0\0" + r(A, 4) + r(i, 4) + g + C + y
|
|
3314
3760
|
};
|
|
3315
3761
|
}
|
|
3316
3762
|
var a = e("../utils"), o = e("../stream/GenericWorker"), s = e("../utf8"), c = e("../crc32"), l = e("../signature");
|
|
@@ -3567,27 +4013,27 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3567
4013
|
15: [function(e, t, n) {
|
|
3568
4014
|
function r(e, t, n) {
|
|
3569
4015
|
var r, i = a.getTypeOf(t), s = a.extend(n || {}, c);
|
|
3570
|
-
s.date = s.date || /* @__PURE__ */ new Date(), s.compression !== null && (s.compression = s.compression.toUpperCase()), typeof s.unixPermissions == "string" && (s.unixPermissions = parseInt(s.unixPermissions, 8)), s.unixPermissions && 16384 & s.unixPermissions && (s.dir = !0), s.dosPermissions && 16 & s.dosPermissions && (s.dir = !0), s.dir && (e =
|
|
4016
|
+
s.date = s.date || /* @__PURE__ */ new Date(), s.compression !== null && (s.compression = s.compression.toUpperCase()), typeof s.unixPermissions == "string" && (s.unixPermissions = parseInt(s.unixPermissions, 8)), s.unixPermissions && 16384 & s.unixPermissions && (s.dir = !0), s.dosPermissions && 16 & s.dosPermissions && (s.dir = !0), s.dir && (e = h(e)), s.createFolders && (r = m(e)) && g.call(this, r, !0);
|
|
3571
4017
|
var d = i === "string" && !1 === s.binary && !1 === s.base64;
|
|
3572
4018
|
n && n.binary !== void 0 || (s.binary = !d), (t instanceof l && t.uncompressedSize === 0 || s.dir || !t || t.length === 0) && (s.base64 = !1, s.binary = !0, t = "", s.compression = "STORE", i = "string");
|
|
3573
|
-
var
|
|
3574
|
-
|
|
3575
|
-
var
|
|
3576
|
-
this.files[e] =
|
|
4019
|
+
var _ = null;
|
|
4020
|
+
_ = t instanceof l || t instanceof o ? t : f.isNode && f.isStream(t) ? new p(e, t) : a.prepareContent(e, t, s.binary, s.optimizedBinaryString, s.base64);
|
|
4021
|
+
var v = new u(e, _, s);
|
|
4022
|
+
this.files[e] = v;
|
|
3577
4023
|
}
|
|
3578
4024
|
var i = e("./utf8"), a = e("./utils"), o = e("./stream/GenericWorker"), s = e("./stream/StreamHelper"), c = e("./defaults"), l = e("./compressedObject"), u = e("./zipObject"), d = e("./generate"), f = e("./nodejsUtils"), p = e("./nodejs/NodejsStreamInputAdapter"), m = function(e) {
|
|
3579
4025
|
e.slice(-1) === "/" && (e = e.substring(0, e.length - 1));
|
|
3580
4026
|
var t = e.lastIndexOf("/");
|
|
3581
4027
|
return 0 < t ? e.substring(0, t) : "";
|
|
3582
|
-
},
|
|
4028
|
+
}, h = function(e) {
|
|
3583
4029
|
return e.slice(-1) !== "/" && (e += "/"), e;
|
|
3584
|
-
},
|
|
3585
|
-
return t = t === void 0 ? c.createFolders : t, e =
|
|
4030
|
+
}, g = function(e, t) {
|
|
4031
|
+
return t = t === void 0 ? c.createFolders : t, e = h(e), this.files[e] || r.call(this, e, null, {
|
|
3586
4032
|
dir: !0,
|
|
3587
4033
|
createFolders: t
|
|
3588
4034
|
}), this.files[e];
|
|
3589
4035
|
};
|
|
3590
|
-
function
|
|
4036
|
+
function _(e) {
|
|
3591
4037
|
return Object.prototype.toString.call(e) === "[object RegExp]";
|
|
3592
4038
|
}
|
|
3593
4039
|
t.exports = {
|
|
@@ -3606,7 +4052,7 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3606
4052
|
},
|
|
3607
4053
|
file: function(e, t, n) {
|
|
3608
4054
|
if (arguments.length !== 1) return e = this.root + e, r.call(this, e, t, n), this;
|
|
3609
|
-
if (
|
|
4055
|
+
if (_(e)) {
|
|
3610
4056
|
var i = e;
|
|
3611
4057
|
return this.filter(function(e, t) {
|
|
3612
4058
|
return !t.dir && i.test(e);
|
|
@@ -3617,10 +4063,10 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
3617
4063
|
},
|
|
3618
4064
|
folder: function(e) {
|
|
3619
4065
|
if (!e) return this;
|
|
3620
|
-
if (
|
|
4066
|
+
if (_(e)) return this.filter(function(t, n) {
|
|
3621
4067
|
return n.dir && e.test(t);
|
|
3622
4068
|
});
|
|
3623
|
-
var t = this.root + e, n =
|
|
4069
|
+
var t = this.root + e, n = g.call(this, t), r = this.clone();
|
|
3624
4070
|
return r.root = n.name, r;
|
|
3625
4071
|
},
|
|
3626
4072
|
remove: function(e) {
|
|
@@ -4775,12 +5221,12 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
4775
5221
|
return n.result;
|
|
4776
5222
|
}
|
|
4777
5223
|
d.prototype.push = function(e, t) {
|
|
4778
|
-
var n, s, c, l, d, f, p = this.strm, m = this.options.chunkSize,
|
|
5224
|
+
var n, s, c, l, d, f, p = this.strm, m = this.options.chunkSize, h = this.options.dictionary, g = !1;
|
|
4779
5225
|
if (this.ended) return !1;
|
|
4780
5226
|
s = t === ~~t ? t : !0 === t ? o.Z_FINISH : o.Z_NO_FLUSH, typeof e == "string" ? p.input = a.binstring2buf(e) : u.call(e) === "[object ArrayBuffer]" ? p.input = new Uint8Array(e) : p.input = e, p.next_in = 0, p.avail_in = p.input.length;
|
|
4781
5227
|
do {
|
|
4782
|
-
if (p.avail_out === 0 && (p.output = new i.Buf8(m), p.next_out = 0, p.avail_out = m), (n = r.inflate(p, o.Z_NO_FLUSH)) === o.Z_NEED_DICT &&
|
|
4783
|
-
p.next_out && (p.avail_out !== 0 && n !== o.Z_STREAM_END && (p.avail_in !== 0 || s !== o.Z_FINISH && s !== o.Z_SYNC_FLUSH) || (this.options.to === "string" ? (c = a.utf8border(p.output, p.next_out), l = p.next_out - c, d = a.buf2string(p.output, c), p.next_out = l, p.avail_out = m - l, l && i.arraySet(p.output, p.output, c, l, 0), this.onData(d)) : this.onData(i.shrinkBuf(p.output, p.next_out)))), p.avail_in === 0 && p.avail_out === 0 && (
|
|
5228
|
+
if (p.avail_out === 0 && (p.output = new i.Buf8(m), p.next_out = 0, p.avail_out = m), (n = r.inflate(p, o.Z_NO_FLUSH)) === o.Z_NEED_DICT && h && (f = typeof h == "string" ? a.string2buf(h) : u.call(h) === "[object ArrayBuffer]" ? new Uint8Array(h) : h, n = r.inflateSetDictionary(this.strm, f)), n === o.Z_BUF_ERROR && !0 === g && (n = o.Z_OK, g = !1), n !== o.Z_STREAM_END && n !== o.Z_OK) return this.onEnd(n), !(this.ended = !0);
|
|
5229
|
+
p.next_out && (p.avail_out !== 0 && n !== o.Z_STREAM_END && (p.avail_in !== 0 || s !== o.Z_FINISH && s !== o.Z_SYNC_FLUSH) || (this.options.to === "string" ? (c = a.utf8border(p.output, p.next_out), l = p.next_out - c, d = a.buf2string(p.output, c), p.next_out = l, p.avail_out = m - l, l && i.arraySet(p.output, p.output, c, l, 0), this.onData(d)) : this.onData(i.shrinkBuf(p.output, p.next_out)))), p.avail_in === 0 && p.avail_out === 0 && (g = !0);
|
|
4784
5230
|
} while ((0 < p.avail_in || p.avail_out === 0) && n !== o.Z_STREAM_END);
|
|
4785
5231
|
return n === o.Z_STREAM_END && (s = o.Z_FINISH), s === o.Z_FINISH ? (n = r.inflateEnd(this.strm), this.onEnd(n), this.ended = !0, n === o.Z_OK) : s !== o.Z_SYNC_FLUSH || (this.onEnd(o.Z_OK), !(p.avail_out = 0));
|
|
4786
5232
|
}, d.prototype.onData = function(e) {
|
|
@@ -4936,38 +5382,38 @@ var Octokit = Octokit$1.plugin(requestLog, legacyRestEndpointMethods, paginateRe
|
|
|
4936
5382
|
};
|
|
4937
5383
|
}, {}],
|
|
4938
5384
|
46: [function(e, t, n) {
|
|
4939
|
-
var r, i = e("../utils/common"), a = e("./trees"), o = e("./adler32"), s = e("./crc32"), c = e("./messages"), l = 0, u = 4, d = 0, f = -2, p = -1, m = 4,
|
|
4940
|
-
function
|
|
5385
|
+
var r, i = e("../utils/common"), a = e("./trees"), o = e("./adler32"), s = e("./crc32"), c = e("./messages"), l = 0, u = 4, d = 0, f = -2, p = -1, m = 4, h = 2, g = 8, _ = 9, v = 286, y = 30, b = 19, x = 2 * v + 1, S = 15, C = 3, w = 258, T = w + C + 1, E = 42, D = 113, O = 1, k = 2, A = 3, j = 4;
|
|
5386
|
+
function M(e, t) {
|
|
4941
5387
|
return e.msg = c[t], t;
|
|
4942
5388
|
}
|
|
4943
|
-
function
|
|
5389
|
+
function N(e) {
|
|
4944
5390
|
return (e << 1) - (4 < e ? 9 : 0);
|
|
4945
5391
|
}
|
|
4946
|
-
function
|
|
5392
|
+
function P(e) {
|
|
4947
5393
|
for (var t = e.length; 0 <= --t;) e[t] = 0;
|
|
4948
5394
|
}
|
|
4949
|
-
function
|
|
5395
|
+
function F(e) {
|
|
4950
5396
|
var t = e.state, n = t.pending;
|
|
4951
5397
|
n > e.avail_out && (n = e.avail_out), n !== 0 && (i.arraySet(e.output, t.pending_buf, t.pending_out, n, e.next_out), e.next_out += n, t.pending_out += n, e.total_out += n, e.avail_out -= n, t.pending -= n, t.pending === 0 && (t.pending_out = 0));
|
|
4952
5398
|
}
|
|
4953
|
-
function
|
|
4954
|
-
a._tr_flush_block(e, 0 <= e.block_start ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart,
|
|
5399
|
+
function I(e, t) {
|
|
5400
|
+
a._tr_flush_block(e, 0 <= e.block_start ? e.block_start : -1, e.strstart - e.block_start, t), e.block_start = e.strstart, F(e.strm);
|
|
4955
5401
|
}
|
|
4956
|
-
function
|
|
5402
|
+
function L(e, t) {
|
|
4957
5403
|
e.pending_buf[e.pending++] = t;
|
|
4958
5404
|
}
|
|
4959
|
-
function
|
|
5405
|
+
function R(e, t) {
|
|
4960
5406
|
e.pending_buf[e.pending++] = t >>> 8 & 255, e.pending_buf[e.pending++] = 255 & t;
|
|
4961
5407
|
}
|
|
4962
|
-
function
|
|
4963
|
-
var n, r, i = e.max_chain_length, a = e.strstart, o = e.prev_length, s = e.nice_match, c = e.strstart > e.w_size -
|
|
5408
|
+
function z(e, t) {
|
|
5409
|
+
var n, r, i = e.max_chain_length, a = e.strstart, o = e.prev_length, s = e.nice_match, c = e.strstart > e.w_size - T ? e.strstart - (e.w_size - T) : 0, l = e.window, u = e.w_mask, d = e.prev, f = e.strstart + w, p = l[a + o - 1], m = l[a + o];
|
|
4964
5410
|
e.prev_length >= e.good_match && (i >>= 2), s > e.lookahead && (s = e.lookahead);
|
|
4965
5411
|
do
|
|
4966
5412
|
if (l[(n = t) + o] === m && l[n + o - 1] === p && l[n] === l[a] && l[++n] === l[a + 1]) {
|
|
4967
5413
|
a += 2, n++;
|
|
4968
5414
|
do ;
|
|
4969
5415
|
while (l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && a < f);
|
|
4970
|
-
if (r =
|
|
5416
|
+
if (r = w - (f - a), a = f - w, o < r) {
|
|
4971
5417
|
if (e.match_start = t, s <= (o = r)) break;
|
|
4972
5418
|
p = l[a + o - 1], m = l[a + o];
|
|
4973
5419
|
}
|
|
@@ -4975,179 +5421,179 @@ while (l[++a] === l[++n] && l[++a] === l[++n] && l[++a] === l[++n] && l[++a] ===
|
|
|
4975
5421
|
while ((t = d[t & u]) > c && --i != 0);
|
|
4976
5422
|
return o <= e.lookahead ? o : e.lookahead;
|
|
4977
5423
|
}
|
|
4978
|
-
function
|
|
5424
|
+
function B(e) {
|
|
4979
5425
|
var t, n, r, a, c, l, u, d, f, p, m = e.w_size;
|
|
4980
5426
|
do {
|
|
4981
|
-
if (a = e.window_size - e.lookahead - e.strstart, e.strstart >= m + (m -
|
|
5427
|
+
if (a = e.window_size - e.lookahead - e.strstart, e.strstart >= m + (m - T)) {
|
|
4982
5428
|
for (i.arraySet(e.window, e.window, m, m, 0), e.match_start -= m, e.strstart -= m, e.block_start -= m, t = n = e.hash_size; r = e.head[--t], e.head[t] = m <= r ? r - m : 0, --n;);
|
|
4983
5429
|
for (t = n = m; r = e.prev[--t], e.prev[t] = m <= r ? r - m : 0, --n;);
|
|
4984
5430
|
a += m;
|
|
4985
5431
|
}
|
|
4986
5432
|
if (e.strm.avail_in === 0) break;
|
|
4987
|
-
if (l = e.strm, u = e.window, d = e.strstart + e.lookahead, f = a, p = void 0, p = l.avail_in, f < p && (p = f), n = p === 0 ? 0 : (l.avail_in -= p, i.arraySet(u, l.input, l.next_in, p, d), l.state.wrap === 1 ? l.adler = o(l.adler, u, p, d) : l.state.wrap === 2 && (l.adler = s(l.adler, u, p, d)), l.next_in += p, l.total_in += p, p), e.lookahead += n, e.lookahead + e.insert >=
|
|
4988
|
-
} while (e.lookahead <
|
|
5433
|
+
if (l = e.strm, u = e.window, d = e.strstart + e.lookahead, f = a, p = void 0, p = l.avail_in, f < p && (p = f), n = p === 0 ? 0 : (l.avail_in -= p, i.arraySet(u, l.input, l.next_in, p, d), l.state.wrap === 1 ? l.adler = o(l.adler, u, p, d) : l.state.wrap === 2 && (l.adler = s(l.adler, u, p, d)), l.next_in += p, l.total_in += p, p), e.lookahead += n, e.lookahead + e.insert >= C) for (c = e.strstart - e.insert, e.ins_h = e.window[c], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[c + 1]) & e.hash_mask; e.insert && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[c + C - 1]) & e.hash_mask, e.prev[c & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = c, c++, e.insert--, !(e.lookahead + e.insert < C)););
|
|
5434
|
+
} while (e.lookahead < T && e.strm.avail_in !== 0);
|
|
4989
5435
|
}
|
|
4990
|
-
function
|
|
5436
|
+
function V(e, t) {
|
|
4991
5437
|
for (var n, r;;) {
|
|
4992
|
-
if (e.lookahead <
|
|
4993
|
-
if (
|
|
5438
|
+
if (e.lookahead < T) {
|
|
5439
|
+
if (B(e), e.lookahead < T && t === l) return O;
|
|
4994
5440
|
if (e.lookahead === 0) break;
|
|
4995
5441
|
}
|
|
4996
|
-
if (n = 0, e.lookahead >=
|
|
4997
|
-
for (e.match_length--; e.strstart++, e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart +
|
|
5442
|
+
if (n = 0, e.lookahead >= C && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + C - 1]) & e.hash_mask, n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), n !== 0 && e.strstart - n <= e.w_size - T && (e.match_length = z(e, n)), e.match_length >= C) if (r = a._tr_tally(e, e.strstart - e.match_start, e.match_length - C), e.lookahead -= e.match_length, e.match_length <= e.max_lazy_match && e.lookahead >= C) {
|
|
5443
|
+
for (e.match_length--; e.strstart++, e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + C - 1]) & e.hash_mask, n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart, --e.match_length != 0;);
|
|
4998
5444
|
e.strstart++;
|
|
4999
5445
|
} else e.strstart += e.match_length, e.match_length = 0, e.ins_h = e.window[e.strstart], e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + 1]) & e.hash_mask;
|
|
5000
5446
|
else r = a._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++;
|
|
5001
|
-
if (r && (
|
|
5447
|
+
if (r && (I(e, !1), e.strm.avail_out === 0)) return O;
|
|
5002
5448
|
}
|
|
5003
|
-
return e.insert = e.strstart <
|
|
5449
|
+
return e.insert = e.strstart < C - 1 ? e.strstart : C - 1, t === u ? (I(e, !0), e.strm.avail_out === 0 ? A : j) : e.last_lit && (I(e, !1), e.strm.avail_out === 0) ? O : k;
|
|
5004
5450
|
}
|
|
5005
|
-
function
|
|
5451
|
+
function H(e, t) {
|
|
5006
5452
|
for (var n, r, i;;) {
|
|
5007
|
-
if (e.lookahead <
|
|
5008
|
-
if (
|
|
5453
|
+
if (e.lookahead < T) {
|
|
5454
|
+
if (B(e), e.lookahead < T && t === l) return O;
|
|
5009
5455
|
if (e.lookahead === 0) break;
|
|
5010
5456
|
}
|
|
5011
|
-
if (n = 0, e.lookahead >=
|
|
5012
|
-
for (i = e.strstart + e.lookahead -
|
|
5013
|
-
if (e.match_available = 0, e.match_length =
|
|
5457
|
+
if (n = 0, e.lookahead >= C && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + C - 1]) & e.hash_mask, n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), e.prev_length = e.match_length, e.prev_match = e.match_start, e.match_length = C - 1, n !== 0 && e.prev_length < e.max_lazy_match && e.strstart - n <= e.w_size - T && (e.match_length = z(e, n), e.match_length <= 5 && (e.strategy === 1 || e.match_length === C && 4096 < e.strstart - e.match_start) && (e.match_length = C - 1)), e.prev_length >= C && e.match_length <= e.prev_length) {
|
|
5458
|
+
for (i = e.strstart + e.lookahead - C, r = a._tr_tally(e, e.strstart - 1 - e.prev_match, e.prev_length - C), e.lookahead -= e.prev_length - 1, e.prev_length -= 2; ++e.strstart <= i && (e.ins_h = (e.ins_h << e.hash_shift ^ e.window[e.strstart + C - 1]) & e.hash_mask, n = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h], e.head[e.ins_h] = e.strstart), --e.prev_length != 0;);
|
|
5459
|
+
if (e.match_available = 0, e.match_length = C - 1, e.strstart++, r && (I(e, !1), e.strm.avail_out === 0)) return O;
|
|
5014
5460
|
} else if (e.match_available) {
|
|
5015
|
-
if ((r = a._tr_tally(e, 0, e.window[e.strstart - 1])) &&
|
|
5461
|
+
if ((r = a._tr_tally(e, 0, e.window[e.strstart - 1])) && I(e, !1), e.strstart++, e.lookahead--, e.strm.avail_out === 0) return O;
|
|
5016
5462
|
} else e.match_available = 1, e.strstart++, e.lookahead--;
|
|
5017
5463
|
}
|
|
5018
|
-
return e.match_available &&= (r = a._tr_tally(e, 0, e.window[e.strstart - 1]), 0), e.insert = e.strstart <
|
|
5464
|
+
return e.match_available &&= (r = a._tr_tally(e, 0, e.window[e.strstart - 1]), 0), e.insert = e.strstart < C - 1 ? e.strstart : C - 1, t === u ? (I(e, !0), e.strm.avail_out === 0 ? A : j) : e.last_lit && (I(e, !1), e.strm.avail_out === 0) ? O : k;
|
|
5019
5465
|
}
|
|
5020
|
-
function
|
|
5466
|
+
function U(e, t, n, r, i) {
|
|
5021
5467
|
this.good_length = e, this.max_lazy = t, this.nice_length = n, this.max_chain = r, this.func = i;
|
|
5022
5468
|
}
|
|
5023
|
-
function
|
|
5024
|
-
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method =
|
|
5469
|
+
function W() {
|
|
5470
|
+
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = g, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new i.Buf16(2 * x), this.dyn_dtree = new i.Buf16(2 * (2 * y + 1)), this.bl_tree = new i.Buf16(2 * (2 * b + 1)), P(this.dyn_ltree), P(this.dyn_dtree), P(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new i.Buf16(S + 1), this.heap = new i.Buf16(2 * v + 1), P(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new i.Buf16(2 * v + 1), P(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
|
|
5025
5471
|
}
|
|
5026
|
-
function
|
|
5472
|
+
function G(e) {
|
|
5027
5473
|
var t;
|
|
5028
|
-
return e && e.state ? (e.total_in = e.total_out = 0, e.data_type =
|
|
5474
|
+
return e && e.state ? (e.total_in = e.total_out = 0, e.data_type = h, (t = e.state).pending = 0, t.pending_out = 0, t.wrap < 0 && (t.wrap = -t.wrap), t.status = t.wrap ? E : D, e.adler = t.wrap === 2 ? 0 : 1, t.last_flush = l, a._tr_init(t), d) : M(e, f);
|
|
5029
5475
|
}
|
|
5030
|
-
function
|
|
5031
|
-
var t =
|
|
5476
|
+
function K(e) {
|
|
5477
|
+
var t = G(e);
|
|
5032
5478
|
return t === d && function(e) {
|
|
5033
|
-
e.window_size = 2 * e.w_size,
|
|
5479
|
+
e.window_size = 2 * e.w_size, P(e.head), e.max_lazy_match = r[e.level].max_lazy, e.good_match = r[e.level].good_length, e.nice_match = r[e.level].nice_length, e.max_chain_length = r[e.level].max_chain, e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = 0, e.match_length = e.prev_length = C - 1, e.match_available = 0, e.ins_h = 0;
|
|
5034
5480
|
}(e.state), t;
|
|
5035
5481
|
}
|
|
5036
|
-
function
|
|
5482
|
+
function q(e, t, n, r, a, o) {
|
|
5037
5483
|
if (!e) return f;
|
|
5038
5484
|
var s = 1;
|
|
5039
|
-
if (t === p && (t = 6), r < 0 ? (s = 0, r = -r) : 15 < r && (s = 2, r -= 16), a < 1 ||
|
|
5485
|
+
if (t === p && (t = 6), r < 0 ? (s = 0, r = -r) : 15 < r && (s = 2, r -= 16), a < 1 || _ < a || n !== g || r < 8 || 15 < r || t < 0 || 9 < t || o < 0 || m < o) return M(e, f);
|
|
5040
5486
|
r === 8 && (r = 9);
|
|
5041
|
-
var c = new
|
|
5042
|
-
return (e.state = c).strm = e, c.wrap = s, c.gzhead = null, c.w_bits = r, c.w_size = 1 << c.w_bits, c.w_mask = c.w_size - 1, c.hash_bits = a + 7, c.hash_size = 1 << c.hash_bits, c.hash_mask = c.hash_size - 1, c.hash_shift = ~~((c.hash_bits +
|
|
5487
|
+
var c = new W();
|
|
5488
|
+
return (e.state = c).strm = e, c.wrap = s, c.gzhead = null, c.w_bits = r, c.w_size = 1 << c.w_bits, c.w_mask = c.w_size - 1, c.hash_bits = a + 7, c.hash_size = 1 << c.hash_bits, c.hash_mask = c.hash_size - 1, c.hash_shift = ~~((c.hash_bits + C - 1) / C), c.window = new i.Buf8(2 * c.w_size), c.head = new i.Buf16(c.hash_size), c.prev = new i.Buf16(c.w_size), c.lit_bufsize = 1 << a + 6, c.pending_buf_size = 4 * c.lit_bufsize, c.pending_buf = new i.Buf8(c.pending_buf_size), c.d_buf = 1 * c.lit_bufsize, c.l_buf = 3 * c.lit_bufsize, c.level = t, c.strategy = o, c.method = n, K(e);
|
|
5043
5489
|
}
|
|
5044
5490
|
r = [
|
|
5045
|
-
new
|
|
5491
|
+
new U(0, 0, 0, 0, function(e, t) {
|
|
5046
5492
|
var n = 65535;
|
|
5047
5493
|
for (n > e.pending_buf_size - 5 && (n = e.pending_buf_size - 5);;) {
|
|
5048
5494
|
if (e.lookahead <= 1) {
|
|
5049
|
-
if (
|
|
5495
|
+
if (B(e), e.lookahead === 0 && t === l) return O;
|
|
5050
5496
|
if (e.lookahead === 0) break;
|
|
5051
5497
|
}
|
|
5052
5498
|
e.strstart += e.lookahead, e.lookahead = 0;
|
|
5053
5499
|
var r = e.block_start + n;
|
|
5054
|
-
if ((e.strstart === 0 || e.strstart >= r) && (e.lookahead = e.strstart - r, e.strstart = r,
|
|
5500
|
+
if ((e.strstart === 0 || e.strstart >= r) && (e.lookahead = e.strstart - r, e.strstart = r, I(e, !1), e.strm.avail_out === 0) || e.strstart - e.block_start >= e.w_size - T && (I(e, !1), e.strm.avail_out === 0)) return O;
|
|
5055
5501
|
}
|
|
5056
|
-
return e.insert = 0, t === u ? (
|
|
5502
|
+
return e.insert = 0, t === u ? (I(e, !0), e.strm.avail_out === 0 ? A : j) : (e.strstart > e.block_start && (I(e, !1), e.strm.avail_out), O);
|
|
5057
5503
|
}),
|
|
5058
|
-
new
|
|
5059
|
-
new
|
|
5060
|
-
new
|
|
5061
|
-
new
|
|
5062
|
-
new
|
|
5063
|
-
new
|
|
5064
|
-
new
|
|
5065
|
-
new
|
|
5066
|
-
new
|
|
5504
|
+
new U(4, 4, 8, 4, V),
|
|
5505
|
+
new U(4, 5, 16, 8, V),
|
|
5506
|
+
new U(4, 6, 32, 32, V),
|
|
5507
|
+
new U(4, 4, 16, 16, H),
|
|
5508
|
+
new U(8, 16, 32, 32, H),
|
|
5509
|
+
new U(8, 16, 128, 128, H),
|
|
5510
|
+
new U(8, 32, 128, 256, H),
|
|
5511
|
+
new U(32, 128, 258, 1024, H),
|
|
5512
|
+
new U(32, 258, 258, 4096, H)
|
|
5067
5513
|
], n.deflateInit = function(e, t) {
|
|
5068
|
-
return
|
|
5069
|
-
}, n.deflateInit2 =
|
|
5514
|
+
return q(e, t, g, 15, 8, 0);
|
|
5515
|
+
}, n.deflateInit2 = q, n.deflateReset = K, n.deflateResetKeep = G, n.deflateSetHeader = function(e, t) {
|
|
5070
5516
|
return e && e.state && e.state.wrap === 2 ? (e.state.gzhead = t, d) : f;
|
|
5071
5517
|
}, n.deflate = function(e, t) {
|
|
5072
5518
|
var n, i, o, c;
|
|
5073
|
-
if (!e || !e.state || 5 < t || t < 0) return e ?
|
|
5074
|
-
if (i = e.state, !e.output || !e.input && e.avail_in !== 0 || i.status === 666 && t !== u) return
|
|
5075
|
-
if (i.strm = e, n = i.last_flush, i.last_flush = t, i.status ===
|
|
5519
|
+
if (!e || !e.state || 5 < t || t < 0) return e ? M(e, f) : f;
|
|
5520
|
+
if (i = e.state, !e.output || !e.input && e.avail_in !== 0 || i.status === 666 && t !== u) return M(e, e.avail_out === 0 ? -5 : f);
|
|
5521
|
+
if (i.strm = e, n = i.last_flush, i.last_flush = t, i.status === E) if (i.wrap === 2) e.adler = 0, L(i, 31), L(i, 139), L(i, 8), i.gzhead ? (L(i, (i.gzhead.text ? 1 : 0) + (i.gzhead.hcrc ? 2 : 0) + (i.gzhead.extra ? 4 : 0) + (i.gzhead.name ? 8 : 0) + (i.gzhead.comment ? 16 : 0)), L(i, 255 & i.gzhead.time), L(i, i.gzhead.time >> 8 & 255), L(i, i.gzhead.time >> 16 & 255), L(i, i.gzhead.time >> 24 & 255), L(i, i.level === 9 ? 2 : 2 <= i.strategy || i.level < 2 ? 4 : 0), L(i, 255 & i.gzhead.os), i.gzhead.extra && i.gzhead.extra.length && (L(i, 255 & i.gzhead.extra.length), L(i, i.gzhead.extra.length >> 8 & 255)), i.gzhead.hcrc && (e.adler = s(e.adler, i.pending_buf, i.pending, 0)), i.gzindex = 0, i.status = 69) : (L(i, 0), L(i, 0), L(i, 0), L(i, 0), L(i, 0), L(i, i.level === 9 ? 2 : 2 <= i.strategy || i.level < 2 ? 4 : 0), L(i, 3), i.status = D);
|
|
5076
5522
|
else {
|
|
5077
|
-
var p =
|
|
5078
|
-
p |= (2 <= i.strategy || i.level < 2 ? 0 : i.level < 6 ? 1 : i.level === 6 ? 2 : 3) << 6, i.strstart !== 0 && (p |= 32), p += 31 - p % 31, i.status =
|
|
5523
|
+
var p = g + (i.w_bits - 8 << 4) << 8;
|
|
5524
|
+
p |= (2 <= i.strategy || i.level < 2 ? 0 : i.level < 6 ? 1 : i.level === 6 ? 2 : 3) << 6, i.strstart !== 0 && (p |= 32), p += 31 - p % 31, i.status = D, R(i, p), i.strstart !== 0 && (R(i, e.adler >>> 16), R(i, 65535 & e.adler)), e.adler = 1;
|
|
5079
5525
|
}
|
|
5080
5526
|
if (i.status === 69) if (i.gzhead.extra) {
|
|
5081
|
-
for (o = i.pending; i.gzindex < (65535 & i.gzhead.extra.length) && (i.pending !== i.pending_buf_size || (i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)),
|
|
5527
|
+
for (o = i.pending; i.gzindex < (65535 & i.gzhead.extra.length) && (i.pending !== i.pending_buf_size || (i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)), F(e), o = i.pending, i.pending !== i.pending_buf_size));) L(i, 255 & i.gzhead.extra[i.gzindex]), i.gzindex++;
|
|
5082
5528
|
i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)), i.gzindex === i.gzhead.extra.length && (i.gzindex = 0, i.status = 73);
|
|
5083
5529
|
} else i.status = 73;
|
|
5084
5530
|
if (i.status === 73) if (i.gzhead.name) {
|
|
5085
5531
|
o = i.pending;
|
|
5086
5532
|
do {
|
|
5087
|
-
if (i.pending === i.pending_buf_size && (i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)),
|
|
5533
|
+
if (i.pending === i.pending_buf_size && (i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)), F(e), o = i.pending, i.pending === i.pending_buf_size)) {
|
|
5088
5534
|
c = 1;
|
|
5089
5535
|
break;
|
|
5090
5536
|
}
|
|
5091
|
-
c = i.gzindex < i.gzhead.name.length ? 255 & i.gzhead.name.charCodeAt(i.gzindex++) : 0,
|
|
5537
|
+
c = i.gzindex < i.gzhead.name.length ? 255 & i.gzhead.name.charCodeAt(i.gzindex++) : 0, L(i, c);
|
|
5092
5538
|
} while (c !== 0);
|
|
5093
5539
|
i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)), c === 0 && (i.gzindex = 0, i.status = 91);
|
|
5094
5540
|
} else i.status = 91;
|
|
5095
5541
|
if (i.status === 91) if (i.gzhead.comment) {
|
|
5096
5542
|
o = i.pending;
|
|
5097
5543
|
do {
|
|
5098
|
-
if (i.pending === i.pending_buf_size && (i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)),
|
|
5544
|
+
if (i.pending === i.pending_buf_size && (i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)), F(e), o = i.pending, i.pending === i.pending_buf_size)) {
|
|
5099
5545
|
c = 1;
|
|
5100
5546
|
break;
|
|
5101
5547
|
}
|
|
5102
|
-
c = i.gzindex < i.gzhead.comment.length ? 255 & i.gzhead.comment.charCodeAt(i.gzindex++) : 0,
|
|
5548
|
+
c = i.gzindex < i.gzhead.comment.length ? 255 & i.gzhead.comment.charCodeAt(i.gzindex++) : 0, L(i, c);
|
|
5103
5549
|
} while (c !== 0);
|
|
5104
5550
|
i.gzhead.hcrc && i.pending > o && (e.adler = s(e.adler, i.pending_buf, i.pending - o, o)), c === 0 && (i.status = 103);
|
|
5105
5551
|
} else i.status = 103;
|
|
5106
|
-
if (i.status === 103 && (i.gzhead.hcrc ? (i.pending + 2 > i.pending_buf_size &&
|
|
5107
|
-
if (
|
|
5108
|
-
} else if (e.avail_in === 0 &&
|
|
5109
|
-
if (i.status === 666 && e.avail_in !== 0) return
|
|
5552
|
+
if (i.status === 103 && (i.gzhead.hcrc ? (i.pending + 2 > i.pending_buf_size && F(e), i.pending + 2 <= i.pending_buf_size && (L(i, 255 & e.adler), L(i, e.adler >> 8 & 255), e.adler = 0, i.status = D)) : i.status = D), i.pending !== 0) {
|
|
5553
|
+
if (F(e), e.avail_out === 0) return i.last_flush = -1, d;
|
|
5554
|
+
} else if (e.avail_in === 0 && N(t) <= N(n) && t !== u) return M(e, -5);
|
|
5555
|
+
if (i.status === 666 && e.avail_in !== 0) return M(e, -5);
|
|
5110
5556
|
if (e.avail_in !== 0 || i.lookahead !== 0 || t !== l && i.status !== 666) {
|
|
5111
5557
|
var m = i.strategy === 2 ? function(e, t) {
|
|
5112
5558
|
for (var n;;) {
|
|
5113
|
-
if (e.lookahead === 0 && (
|
|
5114
|
-
if (t === l) return
|
|
5559
|
+
if (e.lookahead === 0 && (B(e), e.lookahead === 0)) {
|
|
5560
|
+
if (t === l) return O;
|
|
5115
5561
|
break;
|
|
5116
5562
|
}
|
|
5117
|
-
if (e.match_length = 0, n = a._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, n && (
|
|
5563
|
+
if (e.match_length = 0, n = a._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++, n && (I(e, !1), e.strm.avail_out === 0)) return O;
|
|
5118
5564
|
}
|
|
5119
|
-
return e.insert = 0, t === u ? (
|
|
5565
|
+
return e.insert = 0, t === u ? (I(e, !0), e.strm.avail_out === 0 ? A : j) : e.last_lit && (I(e, !1), e.strm.avail_out === 0) ? O : k;
|
|
5120
5566
|
}(i, t) : i.strategy === 3 ? function(e, t) {
|
|
5121
5567
|
for (var n, r, i, o, s = e.window;;) {
|
|
5122
|
-
if (e.lookahead <=
|
|
5123
|
-
if (
|
|
5568
|
+
if (e.lookahead <= w) {
|
|
5569
|
+
if (B(e), e.lookahead <= w && t === l) return O;
|
|
5124
5570
|
if (e.lookahead === 0) break;
|
|
5125
5571
|
}
|
|
5126
|
-
if (e.match_length = 0, e.lookahead >=
|
|
5127
|
-
o = e.strstart +
|
|
5572
|
+
if (e.match_length = 0, e.lookahead >= C && 0 < e.strstart && (r = s[i = e.strstart - 1]) === s[++i] && r === s[++i] && r === s[++i]) {
|
|
5573
|
+
o = e.strstart + w;
|
|
5128
5574
|
do ;
|
|
5129
5575
|
while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && i < o);
|
|
5130
|
-
e.match_length =
|
|
5576
|
+
e.match_length = w - (o - i), e.match_length > e.lookahead && (e.match_length = e.lookahead);
|
|
5131
5577
|
}
|
|
5132
|
-
if (e.match_length >=
|
|
5578
|
+
if (e.match_length >= C ? (n = a._tr_tally(e, 1, e.match_length - C), e.lookahead -= e.match_length, e.strstart += e.match_length, e.match_length = 0) : (n = a._tr_tally(e, 0, e.window[e.strstart]), e.lookahead--, e.strstart++), n && (I(e, !1), e.strm.avail_out === 0)) return O;
|
|
5133
5579
|
}
|
|
5134
|
-
return e.insert = 0, t === u ? (
|
|
5580
|
+
return e.insert = 0, t === u ? (I(e, !0), e.strm.avail_out === 0 ? A : j) : e.last_lit && (I(e, !1), e.strm.avail_out === 0) ? O : k;
|
|
5135
5581
|
}(i, t) : r[i.level].func(i, t);
|
|
5136
|
-
if (m !==
|
|
5137
|
-
if (m ===
|
|
5582
|
+
if (m !== A && m !== j || (i.status = 666), m === O || m === A) return e.avail_out === 0 && (i.last_flush = -1), d;
|
|
5583
|
+
if (m === k && (t === 1 ? a._tr_align(i) : t !== 5 && (a._tr_stored_block(i, 0, 0, !1), t === 3 && (P(i.head), i.lookahead === 0 && (i.strstart = 0, i.block_start = 0, i.insert = 0))), F(e), e.avail_out === 0)) return i.last_flush = -1, d;
|
|
5138
5584
|
}
|
|
5139
|
-
return t === u ? i.wrap <= 0 ? 1 : (i.wrap === 2 ? (
|
|
5585
|
+
return t === u ? i.wrap <= 0 ? 1 : (i.wrap === 2 ? (L(i, 255 & e.adler), L(i, e.adler >> 8 & 255), L(i, e.adler >> 16 & 255), L(i, e.adler >> 24 & 255), L(i, 255 & e.total_in), L(i, e.total_in >> 8 & 255), L(i, e.total_in >> 16 & 255), L(i, e.total_in >> 24 & 255)) : (R(i, e.adler >>> 16), R(i, 65535 & e.adler)), F(e), 0 < i.wrap && (i.wrap = -i.wrap), i.pending === 0 ? 1 : d) : d;
|
|
5140
5586
|
}, n.deflateEnd = function(e) {
|
|
5141
5587
|
var t;
|
|
5142
|
-
return e && e.state ? (t = e.state.status) !==
|
|
5588
|
+
return e && e.state ? (t = e.state.status) !== E && t !== 69 && t !== 73 && t !== 91 && t !== 103 && t !== D && t !== 666 ? M(e, f) : (e.state = null, t === D ? M(e, -3) : d) : f;
|
|
5143
5589
|
}, n.deflateSetDictionary = function(e, t) {
|
|
5144
5590
|
var n, r, a, s, c, l, u, p, m = t.length;
|
|
5145
|
-
if (!e || !e.state || (s = (n = e.state).wrap) === 2 || s === 1 && n.status !==
|
|
5146
|
-
for (s === 1 && (e.adler = o(e.adler, t, m, 0)), n.wrap = 0, m >= n.w_size && (s === 0 && (
|
|
5147
|
-
for (r = n.strstart, a = n.lookahead - (
|
|
5148
|
-
n.strstart = r, n.lookahead =
|
|
5591
|
+
if (!e || !e.state || (s = (n = e.state).wrap) === 2 || s === 1 && n.status !== E || n.lookahead) return f;
|
|
5592
|
+
for (s === 1 && (e.adler = o(e.adler, t, m, 0)), n.wrap = 0, m >= n.w_size && (s === 0 && (P(n.head), n.strstart = 0, n.block_start = 0, n.insert = 0), p = new i.Buf8(n.w_size), i.arraySet(p, t, m - n.w_size, n.w_size, 0), t = p, m = n.w_size), c = e.avail_in, l = e.next_in, u = e.input, e.avail_in = m, e.next_in = 0, e.input = t, B(n); n.lookahead >= C;) {
|
|
5593
|
+
for (r = n.strstart, a = n.lookahead - (C - 1); n.ins_h = (n.ins_h << n.hash_shift ^ n.window[r + C - 1]) & n.hash_mask, n.prev[r & n.w_mask] = n.head[n.ins_h], n.head[n.ins_h] = r, r++, --a;);
|
|
5594
|
+
n.strstart = r, n.lookahead = C - 1, B(n);
|
|
5149
5595
|
}
|
|
5150
|
-
return n.strstart += n.lookahead, n.block_start = n.strstart, n.insert = n.lookahead, n.lookahead = 0, n.match_length = n.prev_length =
|
|
5596
|
+
return n.strstart += n.lookahead, n.block_start = n.strstart, n.insert = n.lookahead, n.lookahead = 0, n.match_length = n.prev_length = C - 1, n.match_available = 0, e.next_in = l, e.input = u, e.avail_in = c, n.wrap = s, d;
|
|
5151
5597
|
}, n.deflateInfo = "pako deflate (from Nodeca project)";
|
|
5152
5598
|
}, {
|
|
5153
5599
|
"../utils/common": 41,
|
|
@@ -5163,66 +5609,66 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5163
5609
|
}, {}],
|
|
5164
5610
|
48: [function(e, t, n) {
|
|
5165
5611
|
t.exports = function(e, t) {
|
|
5166
|
-
var n = e.state, r = e.next_in, i, a, o, s, c, l, u, d, f, p, m, g, _, v, y, b, x, S, C, w, T
|
|
5167
|
-
i = r + (e.avail_in - 5), a = e.next_out,
|
|
5612
|
+
var n = e.state, r = e.next_in, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T = e.input, E;
|
|
5613
|
+
i = r + (e.avail_in - 5), a = e.next_out, E = e.output, o = a - (t - e.avail_out), s = a + (e.avail_out - 257), c = n.dmax, l = n.wsize, u = n.whave, d = n.wnext, f = n.window, p = n.hold, m = n.bits, h = n.lencode, g = n.distcode, _ = (1 << n.lenbits) - 1, v = (1 << n.distbits) - 1;
|
|
5168
5614
|
e: do {
|
|
5169
|
-
m < 15 && (p +=
|
|
5615
|
+
m < 15 && (p += T[r++] << m, m += 8, p += T[r++] << m, m += 8), y = h[p & _];
|
|
5170
5616
|
t: for (;;) {
|
|
5171
|
-
if (p >>>=
|
|
5617
|
+
if (p >>>= b = y >>> 24, m -= b, (b = y >>> 16 & 255) == 0) E[a++] = 65535 & y;
|
|
5172
5618
|
else {
|
|
5173
|
-
if (!(16 &
|
|
5174
|
-
if (!(64 &
|
|
5175
|
-
|
|
5619
|
+
if (!(16 & b)) {
|
|
5620
|
+
if (!(64 & b)) {
|
|
5621
|
+
y = h[(65535 & y) + (p & (1 << b) - 1)];
|
|
5176
5622
|
continue t;
|
|
5177
5623
|
}
|
|
5178
|
-
if (32 &
|
|
5624
|
+
if (32 & b) {
|
|
5179
5625
|
n.mode = 12;
|
|
5180
5626
|
break e;
|
|
5181
5627
|
}
|
|
5182
5628
|
e.msg = "invalid literal/length code", n.mode = 30;
|
|
5183
5629
|
break e;
|
|
5184
5630
|
}
|
|
5185
|
-
|
|
5631
|
+
x = 65535 & y, (b &= 15) && (m < b && (p += T[r++] << m, m += 8), x += p & (1 << b) - 1, p >>>= b, m -= b), m < 15 && (p += T[r++] << m, m += 8, p += T[r++] << m, m += 8), y = g[p & v];
|
|
5186
5632
|
r: for (;;) {
|
|
5187
|
-
if (p >>>=
|
|
5188
|
-
if (!(64 &
|
|
5189
|
-
|
|
5633
|
+
if (p >>>= b = y >>> 24, m -= b, !(16 & (b = y >>> 16 & 255))) {
|
|
5634
|
+
if (!(64 & b)) {
|
|
5635
|
+
y = g[(65535 & y) + (p & (1 << b) - 1)];
|
|
5190
5636
|
continue r;
|
|
5191
5637
|
}
|
|
5192
5638
|
e.msg = "invalid distance code", n.mode = 30;
|
|
5193
5639
|
break e;
|
|
5194
5640
|
}
|
|
5195
|
-
if (
|
|
5641
|
+
if (S = 65535 & y, m < (b &= 15) && (p += T[r++] << m, (m += 8) < b && (p += T[r++] << m, m += 8)), c < (S += p & (1 << b) - 1)) {
|
|
5196
5642
|
e.msg = "invalid distance too far back", n.mode = 30;
|
|
5197
5643
|
break e;
|
|
5198
5644
|
}
|
|
5199
|
-
if (p >>>=
|
|
5200
|
-
if (u < (
|
|
5645
|
+
if (p >>>= b, m -= b, (b = a - o) < S) {
|
|
5646
|
+
if (u < (b = S - b) && n.sane) {
|
|
5201
5647
|
e.msg = "invalid distance too far back", n.mode = 30;
|
|
5202
5648
|
break e;
|
|
5203
5649
|
}
|
|
5204
|
-
if (
|
|
5205
|
-
if (
|
|
5206
|
-
for (
|
|
5207
|
-
|
|
5650
|
+
if (w = f, (C = 0) === d) {
|
|
5651
|
+
if (C += l - b, b < x) {
|
|
5652
|
+
for (x -= b; E[a++] = f[C++], --b;);
|
|
5653
|
+
C = a - S, w = E;
|
|
5208
5654
|
}
|
|
5209
|
-
} else if (d <
|
|
5210
|
-
if (
|
|
5211
|
-
for (
|
|
5212
|
-
if (
|
|
5213
|
-
for (
|
|
5214
|
-
|
|
5655
|
+
} else if (d < b) {
|
|
5656
|
+
if (C += l + d - b, (b -= d) < x) {
|
|
5657
|
+
for (x -= b; E[a++] = f[C++], --b;);
|
|
5658
|
+
if (C = 0, d < x) {
|
|
5659
|
+
for (x -= b = d; E[a++] = f[C++], --b;);
|
|
5660
|
+
C = a - S, w = E;
|
|
5215
5661
|
}
|
|
5216
5662
|
}
|
|
5217
|
-
} else if (
|
|
5218
|
-
for (
|
|
5219
|
-
|
|
5663
|
+
} else if (C += d - b, b < x) {
|
|
5664
|
+
for (x -= b; E[a++] = f[C++], --b;);
|
|
5665
|
+
C = a - S, w = E;
|
|
5220
5666
|
}
|
|
5221
|
-
for (; 2 <
|
|
5222
|
-
|
|
5667
|
+
for (; 2 < x;) E[a++] = w[C++], E[a++] = w[C++], E[a++] = w[C++], x -= 3;
|
|
5668
|
+
x && (E[a++] = w[C++], 1 < x && (E[a++] = w[C++]));
|
|
5223
5669
|
} else {
|
|
5224
|
-
for (
|
|
5225
|
-
|
|
5670
|
+
for (C = a - S; E[a++] = E[C++], E[a++] = E[C++], E[a++] = E[C++], 2 < (x -= 3););
|
|
5671
|
+
x && (E[a++] = E[C++], 1 < x && (E[a++] = E[C++]));
|
|
5226
5672
|
}
|
|
5227
5673
|
break;
|
|
5228
5674
|
}
|
|
@@ -5230,54 +5676,54 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5230
5676
|
break;
|
|
5231
5677
|
}
|
|
5232
5678
|
} while (r < i && a < s);
|
|
5233
|
-
r -=
|
|
5679
|
+
r -= x = m >> 3, p &= (1 << (m -= x << 3)) - 1, e.next_in = r, e.next_out = a, e.avail_in = r < i ? i - r + 5 : 5 - (r - i), e.avail_out = a < s ? s - a + 257 : 257 - (a - s), n.hold = p, n.bits = m;
|
|
5234
5680
|
};
|
|
5235
5681
|
}, {}],
|
|
5236
5682
|
49: [function(e, t, n) {
|
|
5237
5683
|
var r = e("../utils/common"), i = e("./adler32"), a = e("./crc32"), o = e("./inffast"), s = e("./inftrees"), c = 1, l = 2, u = 0, d = -2, f = 1, p = 852, m = 592;
|
|
5238
|
-
function
|
|
5684
|
+
function h(e) {
|
|
5239
5685
|
return (e >>> 24 & 255) + (e >>> 8 & 65280) + ((65280 & e) << 8) + ((255 & e) << 24);
|
|
5240
5686
|
}
|
|
5241
|
-
function
|
|
5687
|
+
function g() {
|
|
5242
5688
|
this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new r.Buf16(320), this.work = new r.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
5243
5689
|
}
|
|
5244
|
-
function
|
|
5690
|
+
function _(e) {
|
|
5245
5691
|
var t;
|
|
5246
5692
|
return e && e.state ? (t = e.state, e.total_in = e.total_out = t.total = 0, e.msg = "", t.wrap && (e.adler = 1 & t.wrap), t.mode = f, t.last = 0, t.havedict = 0, t.dmax = 32768, t.head = null, t.hold = 0, t.bits = 0, t.lencode = t.lendyn = new r.Buf32(p), t.distcode = t.distdyn = new r.Buf32(m), t.sane = 1, t.back = -1, u) : d;
|
|
5247
5693
|
}
|
|
5248
|
-
function
|
|
5694
|
+
function v(e) {
|
|
5249
5695
|
var t;
|
|
5250
|
-
return e && e.state ? ((t = e.state).wsize = 0, t.whave = 0, t.wnext = 0,
|
|
5696
|
+
return e && e.state ? ((t = e.state).wsize = 0, t.whave = 0, t.wnext = 0, _(e)) : d;
|
|
5251
5697
|
}
|
|
5252
|
-
function
|
|
5698
|
+
function y(e, t) {
|
|
5253
5699
|
var n, r;
|
|
5254
|
-
return e && e.state ? (r = e.state, t < 0 ? (n = 0, t = -t) : (n = 1 + (t >> 4), t < 48 && (t &= 15)), t && (t < 8 || 15 < t) ? d : (r.window !== null && r.wbits !== t && (r.window = null), r.wrap = n, r.wbits = t,
|
|
5700
|
+
return e && e.state ? (r = e.state, t < 0 ? (n = 0, t = -t) : (n = 1 + (t >> 4), t < 48 && (t &= 15)), t && (t < 8 || 15 < t) ? d : (r.window !== null && r.wbits !== t && (r.window = null), r.wrap = n, r.wbits = t, v(e))) : d;
|
|
5255
5701
|
}
|
|
5256
|
-
function
|
|
5702
|
+
function b(e, t) {
|
|
5257
5703
|
var n, r;
|
|
5258
|
-
return e ? (r = new
|
|
5704
|
+
return e ? (r = new g(), (e.state = r).window = null, (n = y(e, t)) !== u && (e.state = null), n) : d;
|
|
5259
5705
|
}
|
|
5260
|
-
var S, C
|
|
5261
|
-
function
|
|
5262
|
-
if (
|
|
5706
|
+
var x, S, C = !0;
|
|
5707
|
+
function w(e) {
|
|
5708
|
+
if (C) {
|
|
5263
5709
|
var t;
|
|
5264
|
-
for (
|
|
5710
|
+
for (x = new r.Buf32(512), S = new r.Buf32(32), t = 0; t < 144;) e.lens[t++] = 8;
|
|
5265
5711
|
for (; t < 256;) e.lens[t++] = 9;
|
|
5266
5712
|
for (; t < 280;) e.lens[t++] = 7;
|
|
5267
5713
|
for (; t < 288;) e.lens[t++] = 8;
|
|
5268
|
-
for (s(c, e.lens, 0, 288,
|
|
5269
|
-
s(l, e.lens, 0, 32,
|
|
5714
|
+
for (s(c, e.lens, 0, 288, x, 0, e.work, { bits: 9 }), t = 0; t < 32;) e.lens[t++] = 5;
|
|
5715
|
+
s(l, e.lens, 0, 32, S, 0, e.work, { bits: 5 }), C = !1;
|
|
5270
5716
|
}
|
|
5271
|
-
e.lencode =
|
|
5717
|
+
e.lencode = x, e.lenbits = 9, e.distcode = S, e.distbits = 5;
|
|
5272
5718
|
}
|
|
5273
|
-
function
|
|
5719
|
+
function T(e, t, n, i) {
|
|
5274
5720
|
var a, o = e.state;
|
|
5275
5721
|
return o.window === null && (o.wsize = 1 << o.wbits, o.wnext = 0, o.whave = 0, o.window = new r.Buf8(o.wsize)), i >= o.wsize ? (r.arraySet(o.window, t, n - o.wsize, o.wsize, 0), o.wnext = 0, o.whave = o.wsize) : (i < (a = o.wsize - o.wnext) && (a = i), r.arraySet(o.window, t, n - i, a, o.wnext), (i -= a) ? (r.arraySet(o.window, t, n - i, i, 0), o.wnext = i, o.whave = o.wsize) : (o.wnext += a, o.wnext === o.wsize && (o.wnext = 0), o.whave < o.wsize && (o.whave += a))), 0;
|
|
5276
5722
|
}
|
|
5277
|
-
n.inflateReset =
|
|
5278
|
-
return
|
|
5279
|
-
}, n.inflateInit2 =
|
|
5280
|
-
var n, p, m, _, v, y, b, x, S, C,
|
|
5723
|
+
n.inflateReset = v, n.inflateReset2 = y, n.inflateResetKeep = _, n.inflateInit = function(e) {
|
|
5724
|
+
return b(e, 15);
|
|
5725
|
+
}, n.inflateInit2 = b, n.inflate = function(e, t) {
|
|
5726
|
+
var n, p, m, g, _, v, y, b, x, S, C, E, D, O, k, A, j, M, N, P, F, I, L, R, z = 0, B = new r.Buf8(4), V = [
|
|
5281
5727
|
16,
|
|
5282
5728
|
17,
|
|
5283
5729
|
18,
|
|
@@ -5299,42 +5745,42 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5299
5745
|
15
|
|
5300
5746
|
];
|
|
5301
5747
|
if (!e || !e.state || !e.output || !e.input && e.avail_in !== 0) return d;
|
|
5302
|
-
(n = e.state).mode === 12 && (n.mode = 13),
|
|
5748
|
+
(n = e.state).mode === 12 && (n.mode = 13), _ = e.next_out, m = e.output, y = e.avail_out, g = e.next_in, p = e.input, v = e.avail_in, b = n.hold, x = n.bits, S = v, C = y, I = u;
|
|
5303
5749
|
e: for (;;) switch (n.mode) {
|
|
5304
5750
|
case f:
|
|
5305
5751
|
if (n.wrap === 0) {
|
|
5306
5752
|
n.mode = 13;
|
|
5307
5753
|
break;
|
|
5308
5754
|
}
|
|
5309
|
-
for (;
|
|
5310
|
-
if (
|
|
5311
|
-
|
|
5755
|
+
for (; x < 16;) {
|
|
5756
|
+
if (v === 0) break e;
|
|
5757
|
+
v--, b += p[g++] << x, x += 8;
|
|
5312
5758
|
}
|
|
5313
|
-
if (2 & n.wrap &&
|
|
5314
|
-
|
|
5759
|
+
if (2 & n.wrap && b === 35615) {
|
|
5760
|
+
B[n.check = 0] = 255 & b, B[1] = b >>> 8 & 255, n.check = a(n.check, B, 2, 0), x = b = 0, n.mode = 2;
|
|
5315
5761
|
break;
|
|
5316
5762
|
}
|
|
5317
|
-
if (n.flags = 0, n.head && (n.head.done = !1), !(1 & n.wrap) || (((255 &
|
|
5763
|
+
if (n.flags = 0, n.head && (n.head.done = !1), !(1 & n.wrap) || (((255 & b) << 8) + (b >> 8)) % 31) {
|
|
5318
5764
|
e.msg = "incorrect header check", n.mode = 30;
|
|
5319
5765
|
break;
|
|
5320
5766
|
}
|
|
5321
|
-
if ((15 &
|
|
5767
|
+
if ((15 & b) != 8) {
|
|
5322
5768
|
e.msg = "unknown compression method", n.mode = 30;
|
|
5323
5769
|
break;
|
|
5324
5770
|
}
|
|
5325
|
-
if (
|
|
5326
|
-
else if (
|
|
5771
|
+
if (x -= 4, F = 8 + (15 & (b >>>= 4)), n.wbits === 0) n.wbits = F;
|
|
5772
|
+
else if (F > n.wbits) {
|
|
5327
5773
|
e.msg = "invalid window size", n.mode = 30;
|
|
5328
5774
|
break;
|
|
5329
5775
|
}
|
|
5330
|
-
n.dmax = 1 <<
|
|
5776
|
+
n.dmax = 1 << F, e.adler = n.check = 1, n.mode = 512 & b ? 10 : 12, x = b = 0;
|
|
5331
5777
|
break;
|
|
5332
5778
|
case 2:
|
|
5333
|
-
for (;
|
|
5334
|
-
if (
|
|
5335
|
-
|
|
5779
|
+
for (; x < 16;) {
|
|
5780
|
+
if (v === 0) break e;
|
|
5781
|
+
v--, b += p[g++] << x, x += 8;
|
|
5336
5782
|
}
|
|
5337
|
-
if (n.flags =
|
|
5783
|
+
if (n.flags = b, (255 & n.flags) != 8) {
|
|
5338
5784
|
e.msg = "unknown compression method", n.mode = 30;
|
|
5339
5785
|
break;
|
|
5340
5786
|
}
|
|
@@ -5342,172 +5788,172 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5342
5788
|
e.msg = "unknown header flags set", n.mode = 30;
|
|
5343
5789
|
break;
|
|
5344
5790
|
}
|
|
5345
|
-
n.head && (n.head.text =
|
|
5791
|
+
n.head && (n.head.text = b >> 8 & 1), 512 & n.flags && (B[0] = 255 & b, B[1] = b >>> 8 & 255, n.check = a(n.check, B, 2, 0)), x = b = 0, n.mode = 3;
|
|
5346
5792
|
case 3:
|
|
5347
|
-
for (;
|
|
5348
|
-
if (
|
|
5349
|
-
|
|
5793
|
+
for (; x < 32;) {
|
|
5794
|
+
if (v === 0) break e;
|
|
5795
|
+
v--, b += p[g++] << x, x += 8;
|
|
5350
5796
|
}
|
|
5351
|
-
n.head && (n.head.time =
|
|
5797
|
+
n.head && (n.head.time = b), 512 & n.flags && (B[0] = 255 & b, B[1] = b >>> 8 & 255, B[2] = b >>> 16 & 255, B[3] = b >>> 24 & 255, n.check = a(n.check, B, 4, 0)), x = b = 0, n.mode = 4;
|
|
5352
5798
|
case 4:
|
|
5353
|
-
for (;
|
|
5354
|
-
if (
|
|
5355
|
-
|
|
5799
|
+
for (; x < 16;) {
|
|
5800
|
+
if (v === 0) break e;
|
|
5801
|
+
v--, b += p[g++] << x, x += 8;
|
|
5356
5802
|
}
|
|
5357
|
-
n.head && (n.head.xflags = 255 &
|
|
5803
|
+
n.head && (n.head.xflags = 255 & b, n.head.os = b >> 8), 512 & n.flags && (B[0] = 255 & b, B[1] = b >>> 8 & 255, n.check = a(n.check, B, 2, 0)), x = b = 0, n.mode = 5;
|
|
5358
5804
|
case 5:
|
|
5359
5805
|
if (1024 & n.flags) {
|
|
5360
|
-
for (;
|
|
5361
|
-
if (
|
|
5362
|
-
|
|
5806
|
+
for (; x < 16;) {
|
|
5807
|
+
if (v === 0) break e;
|
|
5808
|
+
v--, b += p[g++] << x, x += 8;
|
|
5363
5809
|
}
|
|
5364
|
-
n.length =
|
|
5810
|
+
n.length = b, n.head && (n.head.extra_len = b), 512 & n.flags && (B[0] = 255 & b, B[1] = b >>> 8 & 255, n.check = a(n.check, B, 2, 0)), x = b = 0;
|
|
5365
5811
|
} else n.head && (n.head.extra = null);
|
|
5366
5812
|
n.mode = 6;
|
|
5367
5813
|
case 6:
|
|
5368
|
-
if (1024 & n.flags && (
|
|
5814
|
+
if (1024 & n.flags && (v < (E = n.length) && (E = v), E && (n.head && (F = n.head.extra_len - n.length, n.head.extra || (n.head.extra = Array(n.head.extra_len)), r.arraySet(n.head.extra, p, g, E, F)), 512 & n.flags && (n.check = a(n.check, p, E, g)), v -= E, g += E, n.length -= E), n.length)) break e;
|
|
5369
5815
|
n.length = 0, n.mode = 7;
|
|
5370
5816
|
case 7:
|
|
5371
5817
|
if (2048 & n.flags) {
|
|
5372
|
-
if (
|
|
5373
|
-
for (
|
|
5374
|
-
if (512 & n.flags && (n.check = a(n.check, p,
|
|
5818
|
+
if (v === 0) break e;
|
|
5819
|
+
for (E = 0; F = p[g + E++], n.head && F && n.length < 65536 && (n.head.name += String.fromCharCode(F)), F && E < v;);
|
|
5820
|
+
if (512 & n.flags && (n.check = a(n.check, p, E, g)), v -= E, g += E, F) break e;
|
|
5375
5821
|
} else n.head && (n.head.name = null);
|
|
5376
5822
|
n.length = 0, n.mode = 8;
|
|
5377
5823
|
case 8:
|
|
5378
5824
|
if (4096 & n.flags) {
|
|
5379
|
-
if (
|
|
5380
|
-
for (
|
|
5381
|
-
if (512 & n.flags && (n.check = a(n.check, p,
|
|
5825
|
+
if (v === 0) break e;
|
|
5826
|
+
for (E = 0; F = p[g + E++], n.head && F && n.length < 65536 && (n.head.comment += String.fromCharCode(F)), F && E < v;);
|
|
5827
|
+
if (512 & n.flags && (n.check = a(n.check, p, E, g)), v -= E, g += E, F) break e;
|
|
5382
5828
|
} else n.head && (n.head.comment = null);
|
|
5383
5829
|
n.mode = 9;
|
|
5384
5830
|
case 9:
|
|
5385
5831
|
if (512 & n.flags) {
|
|
5386
|
-
for (;
|
|
5387
|
-
if (
|
|
5388
|
-
|
|
5832
|
+
for (; x < 16;) {
|
|
5833
|
+
if (v === 0) break e;
|
|
5834
|
+
v--, b += p[g++] << x, x += 8;
|
|
5389
5835
|
}
|
|
5390
|
-
if (
|
|
5836
|
+
if (b !== (65535 & n.check)) {
|
|
5391
5837
|
e.msg = "header crc mismatch", n.mode = 30;
|
|
5392
5838
|
break;
|
|
5393
5839
|
}
|
|
5394
|
-
|
|
5840
|
+
x = b = 0;
|
|
5395
5841
|
}
|
|
5396
5842
|
n.head && (n.head.hcrc = n.flags >> 9 & 1, n.head.done = !0), e.adler = n.check = 0, n.mode = 12;
|
|
5397
5843
|
break;
|
|
5398
5844
|
case 10:
|
|
5399
|
-
for (;
|
|
5400
|
-
if (
|
|
5401
|
-
|
|
5845
|
+
for (; x < 32;) {
|
|
5846
|
+
if (v === 0) break e;
|
|
5847
|
+
v--, b += p[g++] << x, x += 8;
|
|
5402
5848
|
}
|
|
5403
|
-
e.adler = n.check =
|
|
5849
|
+
e.adler = n.check = h(b), x = b = 0, n.mode = 11;
|
|
5404
5850
|
case 11:
|
|
5405
|
-
if (n.havedict === 0) return e.next_out =
|
|
5851
|
+
if (n.havedict === 0) return e.next_out = _, e.avail_out = y, e.next_in = g, e.avail_in = v, n.hold = b, n.bits = x, 2;
|
|
5406
5852
|
e.adler = n.check = 1, n.mode = 12;
|
|
5407
5853
|
case 12: if (t === 5 || t === 6) break e;
|
|
5408
5854
|
case 13:
|
|
5409
5855
|
if (n.last) {
|
|
5410
|
-
|
|
5856
|
+
b >>>= 7 & x, x -= 7 & x, n.mode = 27;
|
|
5411
5857
|
break;
|
|
5412
5858
|
}
|
|
5413
|
-
for (;
|
|
5414
|
-
if (
|
|
5415
|
-
|
|
5859
|
+
for (; x < 3;) {
|
|
5860
|
+
if (v === 0) break e;
|
|
5861
|
+
v--, b += p[g++] << x, x += 8;
|
|
5416
5862
|
}
|
|
5417
|
-
switch (n.last = 1 &
|
|
5863
|
+
switch (n.last = 1 & b, --x, 3 & (b >>>= 1)) {
|
|
5418
5864
|
case 0:
|
|
5419
5865
|
n.mode = 14;
|
|
5420
5866
|
break;
|
|
5421
5867
|
case 1:
|
|
5422
|
-
if (
|
|
5423
|
-
|
|
5868
|
+
if (w(n), n.mode = 20, t !== 6) break;
|
|
5869
|
+
b >>>= 2, x -= 2;
|
|
5424
5870
|
break e;
|
|
5425
5871
|
case 2:
|
|
5426
5872
|
n.mode = 17;
|
|
5427
5873
|
break;
|
|
5428
5874
|
case 3: e.msg = "invalid block type", n.mode = 30;
|
|
5429
5875
|
}
|
|
5430
|
-
|
|
5876
|
+
b >>>= 2, x -= 2;
|
|
5431
5877
|
break;
|
|
5432
5878
|
case 14:
|
|
5433
|
-
for (
|
|
5434
|
-
if (
|
|
5435
|
-
|
|
5879
|
+
for (b >>>= 7 & x, x -= 7 & x; x < 32;) {
|
|
5880
|
+
if (v === 0) break e;
|
|
5881
|
+
v--, b += p[g++] << x, x += 8;
|
|
5436
5882
|
}
|
|
5437
|
-
if ((65535 &
|
|
5883
|
+
if ((65535 & b) != (b >>> 16 ^ 65535)) {
|
|
5438
5884
|
e.msg = "invalid stored block lengths", n.mode = 30;
|
|
5439
5885
|
break;
|
|
5440
5886
|
}
|
|
5441
|
-
if (n.length = 65535 &
|
|
5887
|
+
if (n.length = 65535 & b, x = b = 0, n.mode = 15, t === 6) break e;
|
|
5442
5888
|
case 15: n.mode = 16;
|
|
5443
5889
|
case 16:
|
|
5444
|
-
if (
|
|
5445
|
-
if (
|
|
5446
|
-
r.arraySet(m, p,
|
|
5890
|
+
if (E = n.length) {
|
|
5891
|
+
if (v < E && (E = v), y < E && (E = y), E === 0) break e;
|
|
5892
|
+
r.arraySet(m, p, g, E, _), v -= E, g += E, y -= E, _ += E, n.length -= E;
|
|
5447
5893
|
break;
|
|
5448
5894
|
}
|
|
5449
5895
|
n.mode = 12;
|
|
5450
5896
|
break;
|
|
5451
5897
|
case 17:
|
|
5452
|
-
for (;
|
|
5453
|
-
if (
|
|
5454
|
-
|
|
5898
|
+
for (; x < 14;) {
|
|
5899
|
+
if (v === 0) break e;
|
|
5900
|
+
v--, b += p[g++] << x, x += 8;
|
|
5455
5901
|
}
|
|
5456
|
-
if (n.nlen = 257 + (31 &
|
|
5902
|
+
if (n.nlen = 257 + (31 & b), b >>>= 5, x -= 5, n.ndist = 1 + (31 & b), b >>>= 5, x -= 5, n.ncode = 4 + (15 & b), b >>>= 4, x -= 4, 286 < n.nlen || 30 < n.ndist) {
|
|
5457
5903
|
e.msg = "too many length or distance symbols", n.mode = 30;
|
|
5458
5904
|
break;
|
|
5459
5905
|
}
|
|
5460
5906
|
n.have = 0, n.mode = 18;
|
|
5461
5907
|
case 18:
|
|
5462
5908
|
for (; n.have < n.ncode;) {
|
|
5463
|
-
for (;
|
|
5464
|
-
if (
|
|
5465
|
-
|
|
5909
|
+
for (; x < 3;) {
|
|
5910
|
+
if (v === 0) break e;
|
|
5911
|
+
v--, b += p[g++] << x, x += 8;
|
|
5466
5912
|
}
|
|
5467
|
-
n.lens[
|
|
5913
|
+
n.lens[V[n.have++]] = 7 & b, b >>>= 3, x -= 3;
|
|
5468
5914
|
}
|
|
5469
|
-
for (; n.have < 19;) n.lens[
|
|
5470
|
-
if (n.lencode = n.lendyn, n.lenbits = 7,
|
|
5915
|
+
for (; n.have < 19;) n.lens[V[n.have++]] = 0;
|
|
5916
|
+
if (n.lencode = n.lendyn, n.lenbits = 7, L = { bits: n.lenbits }, I = s(0, n.lens, 0, 19, n.lencode, 0, n.work, L), n.lenbits = L.bits, I) {
|
|
5471
5917
|
e.msg = "invalid code lengths set", n.mode = 30;
|
|
5472
5918
|
break;
|
|
5473
5919
|
}
|
|
5474
5920
|
n.have = 0, n.mode = 19;
|
|
5475
5921
|
case 19:
|
|
5476
5922
|
for (; n.have < n.nlen + n.ndist;) {
|
|
5477
|
-
for (;
|
|
5478
|
-
if (
|
|
5479
|
-
|
|
5923
|
+
for (; A = (z = n.lencode[b & (1 << n.lenbits) - 1]) >>> 16 & 255, j = 65535 & z, !((k = z >>> 24) <= x);) {
|
|
5924
|
+
if (v === 0) break e;
|
|
5925
|
+
v--, b += p[g++] << x, x += 8;
|
|
5480
5926
|
}
|
|
5481
|
-
if (
|
|
5927
|
+
if (j < 16) b >>>= k, x -= k, n.lens[n.have++] = j;
|
|
5482
5928
|
else {
|
|
5483
|
-
if (
|
|
5484
|
-
for (
|
|
5485
|
-
if (
|
|
5486
|
-
|
|
5929
|
+
if (j === 16) {
|
|
5930
|
+
for (R = k + 2; x < R;) {
|
|
5931
|
+
if (v === 0) break e;
|
|
5932
|
+
v--, b += p[g++] << x, x += 8;
|
|
5487
5933
|
}
|
|
5488
|
-
if (
|
|
5934
|
+
if (b >>>= k, x -= k, n.have === 0) {
|
|
5489
5935
|
e.msg = "invalid bit length repeat", n.mode = 30;
|
|
5490
5936
|
break;
|
|
5491
5937
|
}
|
|
5492
|
-
|
|
5493
|
-
} else if (
|
|
5494
|
-
for (
|
|
5495
|
-
if (
|
|
5496
|
-
|
|
5938
|
+
F = n.lens[n.have - 1], E = 3 + (3 & b), b >>>= 2, x -= 2;
|
|
5939
|
+
} else if (j === 17) {
|
|
5940
|
+
for (R = k + 3; x < R;) {
|
|
5941
|
+
if (v === 0) break e;
|
|
5942
|
+
v--, b += p[g++] << x, x += 8;
|
|
5497
5943
|
}
|
|
5498
|
-
|
|
5944
|
+
x -= k, F = 0, E = 3 + (7 & (b >>>= k)), b >>>= 3, x -= 3;
|
|
5499
5945
|
} else {
|
|
5500
|
-
for (
|
|
5501
|
-
if (
|
|
5502
|
-
|
|
5946
|
+
for (R = k + 7; x < R;) {
|
|
5947
|
+
if (v === 0) break e;
|
|
5948
|
+
v--, b += p[g++] << x, x += 8;
|
|
5503
5949
|
}
|
|
5504
|
-
|
|
5950
|
+
x -= k, F = 0, E = 11 + (127 & (b >>>= k)), b >>>= 7, x -= 7;
|
|
5505
5951
|
}
|
|
5506
|
-
if (n.have +
|
|
5952
|
+
if (n.have + E > n.nlen + n.ndist) {
|
|
5507
5953
|
e.msg = "invalid bit length repeat", n.mode = 30;
|
|
5508
5954
|
break;
|
|
5509
5955
|
}
|
|
5510
|
-
for (;
|
|
5956
|
+
for (; E--;) n.lens[n.have++] = F;
|
|
5511
5957
|
}
|
|
5512
5958
|
}
|
|
5513
5959
|
if (n.mode === 30) break;
|
|
@@ -5515,78 +5961,78 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5515
5961
|
e.msg = "invalid code -- missing end-of-block", n.mode = 30;
|
|
5516
5962
|
break;
|
|
5517
5963
|
}
|
|
5518
|
-
if (n.lenbits = 9,
|
|
5964
|
+
if (n.lenbits = 9, L = { bits: n.lenbits }, I = s(c, n.lens, 0, n.nlen, n.lencode, 0, n.work, L), n.lenbits = L.bits, I) {
|
|
5519
5965
|
e.msg = "invalid literal/lengths set", n.mode = 30;
|
|
5520
5966
|
break;
|
|
5521
5967
|
}
|
|
5522
|
-
if (n.distbits = 6, n.distcode = n.distdyn,
|
|
5968
|
+
if (n.distbits = 6, n.distcode = n.distdyn, L = { bits: n.distbits }, I = s(l, n.lens, n.nlen, n.ndist, n.distcode, 0, n.work, L), n.distbits = L.bits, I) {
|
|
5523
5969
|
e.msg = "invalid distances set", n.mode = 30;
|
|
5524
5970
|
break;
|
|
5525
5971
|
}
|
|
5526
5972
|
if (n.mode = 20, t === 6) break e;
|
|
5527
5973
|
case 20: n.mode = 21;
|
|
5528
5974
|
case 21:
|
|
5529
|
-
if (6 <=
|
|
5530
|
-
e.next_out =
|
|
5975
|
+
if (6 <= v && 258 <= y) {
|
|
5976
|
+
e.next_out = _, e.avail_out = y, e.next_in = g, e.avail_in = v, n.hold = b, n.bits = x, o(e, C), _ = e.next_out, m = e.output, y = e.avail_out, g = e.next_in, p = e.input, v = e.avail_in, b = n.hold, x = n.bits, n.mode === 12 && (n.back = -1);
|
|
5531
5977
|
break;
|
|
5532
5978
|
}
|
|
5533
|
-
for (n.back = 0;
|
|
5534
|
-
if (
|
|
5535
|
-
|
|
5979
|
+
for (n.back = 0; A = (z = n.lencode[b & (1 << n.lenbits) - 1]) >>> 16 & 255, j = 65535 & z, !((k = z >>> 24) <= x);) {
|
|
5980
|
+
if (v === 0) break e;
|
|
5981
|
+
v--, b += p[g++] << x, x += 8;
|
|
5536
5982
|
}
|
|
5537
|
-
if (
|
|
5538
|
-
for (
|
|
5539
|
-
if (
|
|
5540
|
-
|
|
5983
|
+
if (A && !(240 & A)) {
|
|
5984
|
+
for (M = k, N = A, P = j; A = (z = n.lencode[P + ((b & (1 << M + N) - 1) >> M)]) >>> 16 & 255, j = 65535 & z, !(M + (k = z >>> 24) <= x);) {
|
|
5985
|
+
if (v === 0) break e;
|
|
5986
|
+
v--, b += p[g++] << x, x += 8;
|
|
5541
5987
|
}
|
|
5542
|
-
|
|
5988
|
+
b >>>= M, x -= M, n.back += M;
|
|
5543
5989
|
}
|
|
5544
|
-
if (
|
|
5990
|
+
if (b >>>= k, x -= k, n.back += k, n.length = j, A === 0) {
|
|
5545
5991
|
n.mode = 26;
|
|
5546
5992
|
break;
|
|
5547
5993
|
}
|
|
5548
|
-
if (32 &
|
|
5994
|
+
if (32 & A) {
|
|
5549
5995
|
n.back = -1, n.mode = 12;
|
|
5550
5996
|
break;
|
|
5551
5997
|
}
|
|
5552
|
-
if (64 &
|
|
5998
|
+
if (64 & A) {
|
|
5553
5999
|
e.msg = "invalid literal/length code", n.mode = 30;
|
|
5554
6000
|
break;
|
|
5555
6001
|
}
|
|
5556
|
-
n.extra = 15 &
|
|
6002
|
+
n.extra = 15 & A, n.mode = 22;
|
|
5557
6003
|
case 22:
|
|
5558
6004
|
if (n.extra) {
|
|
5559
|
-
for (
|
|
5560
|
-
if (
|
|
5561
|
-
|
|
6005
|
+
for (R = n.extra; x < R;) {
|
|
6006
|
+
if (v === 0) break e;
|
|
6007
|
+
v--, b += p[g++] << x, x += 8;
|
|
5562
6008
|
}
|
|
5563
|
-
n.length +=
|
|
6009
|
+
n.length += b & (1 << n.extra) - 1, b >>>= n.extra, x -= n.extra, n.back += n.extra;
|
|
5564
6010
|
}
|
|
5565
6011
|
n.was = n.length, n.mode = 23;
|
|
5566
6012
|
case 23:
|
|
5567
|
-
for (;
|
|
5568
|
-
if (
|
|
5569
|
-
|
|
6013
|
+
for (; A = (z = n.distcode[b & (1 << n.distbits) - 1]) >>> 16 & 255, j = 65535 & z, !((k = z >>> 24) <= x);) {
|
|
6014
|
+
if (v === 0) break e;
|
|
6015
|
+
v--, b += p[g++] << x, x += 8;
|
|
5570
6016
|
}
|
|
5571
|
-
if (!(240 &
|
|
5572
|
-
for (
|
|
5573
|
-
if (
|
|
5574
|
-
|
|
6017
|
+
if (!(240 & A)) {
|
|
6018
|
+
for (M = k, N = A, P = j; A = (z = n.distcode[P + ((b & (1 << M + N) - 1) >> M)]) >>> 16 & 255, j = 65535 & z, !(M + (k = z >>> 24) <= x);) {
|
|
6019
|
+
if (v === 0) break e;
|
|
6020
|
+
v--, b += p[g++] << x, x += 8;
|
|
5575
6021
|
}
|
|
5576
|
-
|
|
6022
|
+
b >>>= M, x -= M, n.back += M;
|
|
5577
6023
|
}
|
|
5578
|
-
if (
|
|
6024
|
+
if (b >>>= k, x -= k, n.back += k, 64 & A) {
|
|
5579
6025
|
e.msg = "invalid distance code", n.mode = 30;
|
|
5580
6026
|
break;
|
|
5581
6027
|
}
|
|
5582
|
-
n.offset =
|
|
6028
|
+
n.offset = j, n.extra = 15 & A, n.mode = 24;
|
|
5583
6029
|
case 24:
|
|
5584
6030
|
if (n.extra) {
|
|
5585
|
-
for (
|
|
5586
|
-
if (
|
|
5587
|
-
|
|
6031
|
+
for (R = n.extra; x < R;) {
|
|
6032
|
+
if (v === 0) break e;
|
|
6033
|
+
v--, b += p[g++] << x, x += 8;
|
|
5588
6034
|
}
|
|
5589
|
-
n.offset +=
|
|
6035
|
+
n.offset += b & (1 << n.extra) - 1, b >>>= n.extra, x -= n.extra, n.back += n.extra;
|
|
5590
6036
|
}
|
|
5591
6037
|
if (n.offset > n.dmax) {
|
|
5592
6038
|
e.msg = "invalid distance too far back", n.mode = 30;
|
|
@@ -5594,58 +6040,58 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5594
6040
|
}
|
|
5595
6041
|
n.mode = 25;
|
|
5596
6042
|
case 25:
|
|
5597
|
-
if (
|
|
5598
|
-
if (
|
|
5599
|
-
if ((
|
|
6043
|
+
if (y === 0) break e;
|
|
6044
|
+
if (E = C - y, n.offset > E) {
|
|
6045
|
+
if ((E = n.offset - E) > n.whave && n.sane) {
|
|
5600
6046
|
e.msg = "invalid distance too far back", n.mode = 30;
|
|
5601
6047
|
break;
|
|
5602
6048
|
}
|
|
5603
|
-
|
|
5604
|
-
} else
|
|
5605
|
-
for (
|
|
6049
|
+
D = E > n.wnext ? (E -= n.wnext, n.wsize - E) : n.wnext - E, E > n.length && (E = n.length), O = n.window;
|
|
6050
|
+
} else O = m, D = _ - n.offset, E = n.length;
|
|
6051
|
+
for (y < E && (E = y), y -= E, n.length -= E; m[_++] = O[D++], --E;);
|
|
5606
6052
|
n.length === 0 && (n.mode = 21);
|
|
5607
6053
|
break;
|
|
5608
6054
|
case 26:
|
|
5609
|
-
if (
|
|
5610
|
-
m[
|
|
6055
|
+
if (y === 0) break e;
|
|
6056
|
+
m[_++] = n.length, y--, n.mode = 21;
|
|
5611
6057
|
break;
|
|
5612
6058
|
case 27:
|
|
5613
6059
|
if (n.wrap) {
|
|
5614
|
-
for (;
|
|
5615
|
-
if (
|
|
5616
|
-
|
|
6060
|
+
for (; x < 32;) {
|
|
6061
|
+
if (v === 0) break e;
|
|
6062
|
+
v--, b |= p[g++] << x, x += 8;
|
|
5617
6063
|
}
|
|
5618
|
-
if (
|
|
6064
|
+
if (C -= y, e.total_out += C, n.total += C, C && (e.adler = n.check = n.flags ? a(n.check, m, C, _ - C) : i(n.check, m, C, _ - C)), C = y, (n.flags ? b : h(b)) !== n.check) {
|
|
5619
6065
|
e.msg = "incorrect data check", n.mode = 30;
|
|
5620
6066
|
break;
|
|
5621
6067
|
}
|
|
5622
|
-
|
|
6068
|
+
x = b = 0;
|
|
5623
6069
|
}
|
|
5624
6070
|
n.mode = 28;
|
|
5625
6071
|
case 28:
|
|
5626
6072
|
if (n.wrap && n.flags) {
|
|
5627
|
-
for (;
|
|
5628
|
-
if (
|
|
5629
|
-
|
|
6073
|
+
for (; x < 32;) {
|
|
6074
|
+
if (v === 0) break e;
|
|
6075
|
+
v--, b += p[g++] << x, x += 8;
|
|
5630
6076
|
}
|
|
5631
|
-
if (
|
|
6077
|
+
if (b !== (4294967295 & n.total)) {
|
|
5632
6078
|
e.msg = "incorrect length check", n.mode = 30;
|
|
5633
6079
|
break;
|
|
5634
6080
|
}
|
|
5635
|
-
|
|
6081
|
+
x = b = 0;
|
|
5636
6082
|
}
|
|
5637
6083
|
n.mode = 29;
|
|
5638
6084
|
case 29:
|
|
5639
|
-
|
|
6085
|
+
I = 1;
|
|
5640
6086
|
break e;
|
|
5641
6087
|
case 30:
|
|
5642
|
-
|
|
6088
|
+
I = -3;
|
|
5643
6089
|
break e;
|
|
5644
6090
|
case 31: return -4;
|
|
5645
6091
|
case 32:
|
|
5646
6092
|
default: return d;
|
|
5647
6093
|
}
|
|
5648
|
-
return e.next_out =
|
|
6094
|
+
return e.next_out = _, e.avail_out = y, e.next_in = g, e.avail_in = v, n.hold = b, n.bits = x, (n.wsize || C !== e.avail_out && n.mode < 30 && (n.mode < 27 || t !== 4)) && T(e, e.output, e.next_out, C - e.avail_out) ? (n.mode = 31, -4) : (S -= e.avail_in, C -= e.avail_out, e.total_in += S, e.total_out += C, n.total += C, n.wrap && C && (e.adler = n.check = n.flags ? a(n.check, m, C, e.next_out - C) : i(n.check, m, C, e.next_out - C)), e.data_type = n.bits + (n.last ? 64 : 0) + (n.mode === 12 ? 128 : 0) + (n.mode === 20 || n.mode === 15 ? 256 : 0), (S == 0 && C === 0 || t === 4) && I === u && (I = -5), I);
|
|
5649
6095
|
}, n.inflateEnd = function(e) {
|
|
5650
6096
|
if (!e || !e.state) return d;
|
|
5651
6097
|
var t = e.state;
|
|
@@ -5655,7 +6101,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5655
6101
|
return e && e.state && 2 & (n = e.state).wrap ? ((n.head = t).done = !1, u) : d;
|
|
5656
6102
|
}, n.inflateSetDictionary = function(e, t) {
|
|
5657
6103
|
var n, r = t.length;
|
|
5658
|
-
return e && e.state ? (n = e.state).wrap !== 0 && n.mode !== 11 ? d : n.mode === 11 && i(1, t, r, 0) !== n.check ? -3 :
|
|
6104
|
+
return e && e.state ? (n = e.state).wrap !== 0 && n.mode !== 11 ? d : n.mode === 11 && i(1, t, r, 0) !== n.check ? -3 : T(e, t, r, r) ? (n.mode = 31, -4) : (n.havedict = 1, u) : d;
|
|
5659
6105
|
}, n.inflateInfo = "pako inflate (from Nodeca project)";
|
|
5660
6106
|
}, {
|
|
5661
6107
|
"../utils/common": 41,
|
|
@@ -5797,31 +6243,31 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5797
6243
|
64
|
|
5798
6244
|
];
|
|
5799
6245
|
t.exports = function(e, t, n, c, l, u, d, f) {
|
|
5800
|
-
var p, m, g, _, v, y, b, x, S
|
|
5801
|
-
for (
|
|
5802
|
-
for (
|
|
5803
|
-
for (
|
|
5804
|
-
if (
|
|
5805
|
-
for (
|
|
5806
|
-
for (
|
|
5807
|
-
if (0 <
|
|
5808
|
-
for (
|
|
5809
|
-
for (
|
|
5810
|
-
if (
|
|
6246
|
+
var p, m, h, g, _, v, y, b, x, S = f.bits, C = 0, w = 0, T = 0, E = 0, D = 0, O = 0, k = 0, A = 0, j = 0, M = 0, N = null, P = 0, F = new r.Buf16(16), I = new r.Buf16(16), L = null, R = 0;
|
|
6247
|
+
for (C = 0; C <= 15; C++) F[C] = 0;
|
|
6248
|
+
for (w = 0; w < c; w++) F[t[n + w]]++;
|
|
6249
|
+
for (D = S, E = 15; 1 <= E && F[E] === 0; E--);
|
|
6250
|
+
if (E < D && (D = E), E === 0) return l[u++] = 20971520, l[u++] = 20971520, f.bits = 1, 0;
|
|
6251
|
+
for (T = 1; T < E && F[T] === 0; T++);
|
|
6252
|
+
for (D < T && (D = T), C = A = 1; C <= 15; C++) if (A <<= 1, (A -= F[C]) < 0) return -1;
|
|
6253
|
+
if (0 < A && (e === 0 || E !== 1)) return -1;
|
|
6254
|
+
for (I[1] = 0, C = 1; C < 15; C++) I[C + 1] = I[C] + F[C];
|
|
6255
|
+
for (w = 0; w < c; w++) t[n + w] !== 0 && (d[I[t[n + w]]++] = w);
|
|
6256
|
+
if (v = e === 0 ? (N = L = d, 19) : e === 1 ? (N = i, P -= 257, L = a, R -= 257, 256) : (N = o, L = s, -1), C = T, _ = u, k = w = M = 0, h = -1, g = (j = 1 << (O = D)) - 1, e === 1 && 852 < j || e === 2 && 592 < j) return 1;
|
|
5811
6257
|
for (;;) {
|
|
5812
|
-
for (
|
|
5813
|
-
for (p = 1 <<
|
|
5814
|
-
if (p === 0 ?
|
|
5815
|
-
if (
|
|
5816
|
-
|
|
6258
|
+
for (y = C - k, x = d[w] < v ? (b = 0, d[w]) : d[w] > v ? (b = L[R + d[w]], N[P + d[w]]) : (b = 96, 0), p = 1 << C - k, T = m = 1 << O; l[_ + (M >> k) + (m -= p)] = y << 24 | b << 16 | x | 0, m !== 0;);
|
|
6259
|
+
for (p = 1 << C - 1; M & p;) p >>= 1;
|
|
6260
|
+
if (p === 0 ? M = 0 : (M &= p - 1, M += p), w++, --F[C] == 0) {
|
|
6261
|
+
if (C === E) break;
|
|
6262
|
+
C = t[n + d[w]];
|
|
5817
6263
|
}
|
|
5818
|
-
if (
|
|
5819
|
-
for (
|
|
5820
|
-
if (
|
|
5821
|
-
l[
|
|
6264
|
+
if (D < C && (M & g) !== h) {
|
|
6265
|
+
for (k === 0 && (k = D), _ += T, A = 1 << (O = C - k); O + k < E && !((A -= F[O + k]) <= 0);) O++, A <<= 1;
|
|
6266
|
+
if (j += 1 << O, e === 1 && 852 < j || e === 2 && 592 < j) return 1;
|
|
6267
|
+
l[h = M & g] = D << 24 | O << 16 | _ - u | 0;
|
|
5822
6268
|
}
|
|
5823
6269
|
}
|
|
5824
|
-
return
|
|
6270
|
+
return M !== 0 && (l[_ + M] = C - k << 24 | 4194304), f.bits = D, 0;
|
|
5825
6271
|
};
|
|
5826
6272
|
}, { "../utils/common": 41 }],
|
|
5827
6273
|
51: [function(e, t, n) {
|
|
@@ -5842,7 +6288,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5842
6288
|
function o(e) {
|
|
5843
6289
|
for (var t = e.length; 0 <= --t;) e[t] = 0;
|
|
5844
6290
|
}
|
|
5845
|
-
var s = 0, c = 29, l = 256, u = l + 1 + c, d = 30, f = 19, p = 2 * u + 1, m = 15,
|
|
6291
|
+
var s = 0, c = 29, l = 256, u = l + 1 + c, d = 30, f = 19, p = 2 * u + 1, m = 15, h = 16, g = 7, _ = 256, v = 16, y = 17, b = 18, x = [
|
|
5846
6292
|
0,
|
|
5847
6293
|
0,
|
|
5848
6294
|
0,
|
|
@@ -5872,7 +6318,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5872
6318
|
5,
|
|
5873
6319
|
5,
|
|
5874
6320
|
0
|
|
5875
|
-
],
|
|
6321
|
+
], S = [
|
|
5876
6322
|
0,
|
|
5877
6323
|
0,
|
|
5878
6324
|
0,
|
|
@@ -5903,7 +6349,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5903
6349
|
12,
|
|
5904
6350
|
13,
|
|
5905
6351
|
13
|
|
5906
|
-
],
|
|
6352
|
+
], C = [
|
|
5907
6353
|
0,
|
|
5908
6354
|
0,
|
|
5909
6355
|
0,
|
|
@@ -5923,7 +6369,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5923
6369
|
2,
|
|
5924
6370
|
3,
|
|
5925
6371
|
7
|
|
5926
|
-
],
|
|
6372
|
+
], w = [
|
|
5927
6373
|
16,
|
|
5928
6374
|
17,
|
|
5929
6375
|
18,
|
|
@@ -5943,123 +6389,123 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
5943
6389
|
14,
|
|
5944
6390
|
1,
|
|
5945
6391
|
15
|
|
5946
|
-
],
|
|
6392
|
+
], T = Array(2 * (u + 2));
|
|
6393
|
+
o(T);
|
|
6394
|
+
var E = Array(2 * d);
|
|
5947
6395
|
o(E);
|
|
5948
|
-
var D = Array(
|
|
6396
|
+
var D = Array(512);
|
|
5949
6397
|
o(D);
|
|
5950
|
-
var O = Array(
|
|
6398
|
+
var O = Array(256);
|
|
5951
6399
|
o(O);
|
|
5952
|
-
var k = Array(
|
|
6400
|
+
var k = Array(c);
|
|
5953
6401
|
o(k);
|
|
5954
|
-
var A = Array(
|
|
5955
|
-
|
|
5956
|
-
var j, M, N, P = Array(d);
|
|
5957
|
-
function F(e, t, n, r, i) {
|
|
6402
|
+
var A, j, M, N = Array(d);
|
|
6403
|
+
function P(e, t, n, r, i) {
|
|
5958
6404
|
this.static_tree = e, this.extra_bits = t, this.extra_base = n, this.elems = r, this.max_length = i, this.has_stree = e && e.length;
|
|
5959
6405
|
}
|
|
5960
|
-
function
|
|
6406
|
+
function F(e, t) {
|
|
5961
6407
|
this.dyn_tree = e, this.max_code = 0, this.stat_desc = t;
|
|
5962
6408
|
}
|
|
5963
|
-
function
|
|
5964
|
-
return e < 256 ?
|
|
6409
|
+
function I(e) {
|
|
6410
|
+
return e < 256 ? D[e] : D[256 + (e >>> 7)];
|
|
5965
6411
|
}
|
|
5966
|
-
function
|
|
6412
|
+
function L(e, t) {
|
|
5967
6413
|
e.pending_buf[e.pending++] = 255 & t, e.pending_buf[e.pending++] = t >>> 8 & 255;
|
|
5968
6414
|
}
|
|
5969
|
-
function
|
|
5970
|
-
e.bi_valid >
|
|
6415
|
+
function R(e, t, n) {
|
|
6416
|
+
e.bi_valid > h - n ? (e.bi_buf |= t << e.bi_valid & 65535, L(e, e.bi_buf), e.bi_buf = t >> h - e.bi_valid, e.bi_valid += n - h) : (e.bi_buf |= t << e.bi_valid & 65535, e.bi_valid += n);
|
|
5971
6417
|
}
|
|
5972
|
-
function
|
|
5973
|
-
|
|
6418
|
+
function z(e, t, n) {
|
|
6419
|
+
R(e, n[2 * t], n[2 * t + 1]);
|
|
5974
6420
|
}
|
|
5975
|
-
function
|
|
6421
|
+
function B(e, t) {
|
|
5976
6422
|
for (var n = 0; n |= 1 & e, e >>>= 1, n <<= 1, 0 < --t;);
|
|
5977
6423
|
return n >>> 1;
|
|
5978
6424
|
}
|
|
5979
|
-
function
|
|
6425
|
+
function V(e, t, n) {
|
|
5980
6426
|
var r, i, a = Array(m + 1), o = 0;
|
|
5981
6427
|
for (r = 1; r <= m; r++) a[r] = o = o + n[r - 1] << 1;
|
|
5982
6428
|
for (i = 0; i <= t; i++) {
|
|
5983
6429
|
var s = e[2 * i + 1];
|
|
5984
|
-
s !== 0 && (e[2 * i] =
|
|
6430
|
+
s !== 0 && (e[2 * i] = B(a[s]++, s));
|
|
5985
6431
|
}
|
|
5986
6432
|
}
|
|
5987
|
-
function
|
|
6433
|
+
function H(e) {
|
|
5988
6434
|
var t;
|
|
5989
6435
|
for (t = 0; t < u; t++) e.dyn_ltree[2 * t] = 0;
|
|
5990
6436
|
for (t = 0; t < d; t++) e.dyn_dtree[2 * t] = 0;
|
|
5991
6437
|
for (t = 0; t < f; t++) e.bl_tree[2 * t] = 0;
|
|
5992
|
-
e.dyn_ltree[2 *
|
|
6438
|
+
e.dyn_ltree[2 * _] = 1, e.opt_len = e.static_len = 0, e.last_lit = e.matches = 0;
|
|
5993
6439
|
}
|
|
5994
|
-
function
|
|
5995
|
-
8 < e.bi_valid ?
|
|
6440
|
+
function U(e) {
|
|
6441
|
+
8 < e.bi_valid ? L(e, e.bi_buf) : 0 < e.bi_valid && (e.pending_buf[e.pending++] = e.bi_buf), e.bi_buf = 0, e.bi_valid = 0;
|
|
5996
6442
|
}
|
|
5997
|
-
function
|
|
6443
|
+
function W(e, t, n, r) {
|
|
5998
6444
|
var i = 2 * t, a = 2 * n;
|
|
5999
6445
|
return e[i] < e[a] || e[i] === e[a] && r[t] <= r[n];
|
|
6000
6446
|
}
|
|
6001
|
-
function
|
|
6002
|
-
for (var r = e.heap[n], i = n << 1; i <= e.heap_len && (i < e.heap_len &&
|
|
6447
|
+
function G(e, t, n) {
|
|
6448
|
+
for (var r = e.heap[n], i = n << 1; i <= e.heap_len && (i < e.heap_len && W(t, e.heap[i + 1], e.heap[i], e.depth) && i++, !W(t, r, e.heap[i], e.depth));) e.heap[n] = e.heap[i], n = i, i <<= 1;
|
|
6003
6449
|
e.heap[n] = r;
|
|
6004
6450
|
}
|
|
6005
|
-
function
|
|
6451
|
+
function K(e, t, n) {
|
|
6006
6452
|
var r, i, a, o, s = 0;
|
|
6007
|
-
if (e.last_lit !== 0) for (; r = e.pending_buf[e.d_buf + 2 * s] << 8 | e.pending_buf[e.d_buf + 2 * s + 1], i = e.pending_buf[e.l_buf + s], s++, r === 0 ?
|
|
6008
|
-
|
|
6453
|
+
if (e.last_lit !== 0) for (; r = e.pending_buf[e.d_buf + 2 * s] << 8 | e.pending_buf[e.d_buf + 2 * s + 1], i = e.pending_buf[e.l_buf + s], s++, r === 0 ? z(e, i, t) : (z(e, (a = O[i]) + l + 1, t), (o = x[a]) !== 0 && R(e, i -= k[a], o), z(e, a = I(--r), n), (o = S[a]) !== 0 && R(e, r -= N[a], o)), s < e.last_lit;);
|
|
6454
|
+
z(e, _, t);
|
|
6009
6455
|
}
|
|
6010
|
-
function
|
|
6456
|
+
function q(e, t) {
|
|
6011
6457
|
var n, r, i, a = t.dyn_tree, o = t.stat_desc.static_tree, s = t.stat_desc.has_stree, c = t.stat_desc.elems, l = -1;
|
|
6012
6458
|
for (e.heap_len = 0, e.heap_max = p, n = 0; n < c; n++) a[2 * n] === 0 ? a[2 * n + 1] = 0 : (e.heap[++e.heap_len] = l = n, e.depth[n] = 0);
|
|
6013
6459
|
for (; e.heap_len < 2;) a[2 * (i = e.heap[++e.heap_len] = l < 2 ? ++l : 0)] = 1, e.depth[i] = 0, e.opt_len--, s && (e.static_len -= o[2 * i + 1]);
|
|
6014
|
-
for (t.max_code = l, n = e.heap_len >> 1; 1 <= n; n--)
|
|
6015
|
-
for (i = c; n = e.heap[1], e.heap[1] = e.heap[e.heap_len--],
|
|
6460
|
+
for (t.max_code = l, n = e.heap_len >> 1; 1 <= n; n--) G(e, a, n);
|
|
6461
|
+
for (i = c; n = e.heap[1], e.heap[1] = e.heap[e.heap_len--], G(e, a, 1), r = e.heap[1], e.heap[--e.heap_max] = n, e.heap[--e.heap_max] = r, a[2 * i] = a[2 * n] + a[2 * r], e.depth[i] = (e.depth[n] >= e.depth[r] ? e.depth[n] : e.depth[r]) + 1, a[2 * n + 1] = a[2 * r + 1] = i, e.heap[1] = i++, G(e, a, 1), 2 <= e.heap_len;);
|
|
6016
6462
|
e.heap[--e.heap_max] = e.heap[1], function(e, t) {
|
|
6017
|
-
var n, r, i, a, o, s, c = t.dyn_tree, l = t.max_code, u = t.stat_desc.static_tree, d = t.stat_desc.has_stree, f = t.stat_desc.extra_bits,
|
|
6463
|
+
var n, r, i, a, o, s, c = t.dyn_tree, l = t.max_code, u = t.stat_desc.static_tree, d = t.stat_desc.has_stree, f = t.stat_desc.extra_bits, h = t.stat_desc.extra_base, g = t.stat_desc.max_length, _ = 0;
|
|
6018
6464
|
for (a = 0; a <= m; a++) e.bl_count[a] = 0;
|
|
6019
|
-
for (c[2 * e.heap[e.heap_max] + 1] = 0, n = e.heap_max + 1; n < p; n++)
|
|
6020
|
-
if (
|
|
6465
|
+
for (c[2 * e.heap[e.heap_max] + 1] = 0, n = e.heap_max + 1; n < p; n++) g < (a = c[2 * c[2 * (r = e.heap[n]) + 1] + 1] + 1) && (a = g, _++), c[2 * r + 1] = a, l < r || (e.bl_count[a]++, o = 0, h <= r && (o = f[r - h]), s = c[2 * r], e.opt_len += s * (a + o), d && (e.static_len += s * (u[2 * r + 1] + o)));
|
|
6466
|
+
if (_ !== 0) {
|
|
6021
6467
|
do {
|
|
6022
|
-
for (a =
|
|
6023
|
-
e.bl_count[a]--, e.bl_count[a + 1] += 2, e.bl_count[
|
|
6024
|
-
} while (0 <
|
|
6025
|
-
for (a =
|
|
6468
|
+
for (a = g - 1; e.bl_count[a] === 0;) a--;
|
|
6469
|
+
e.bl_count[a]--, e.bl_count[a + 1] += 2, e.bl_count[g]--, _ -= 2;
|
|
6470
|
+
} while (0 < _);
|
|
6471
|
+
for (a = g; a !== 0; a--) for (r = e.bl_count[a]; r !== 0;) l < (i = e.heap[--n]) || (c[2 * i + 1] !== a && (e.opt_len += (a - c[2 * i + 1]) * c[2 * i], c[2 * i + 1] = a), r--);
|
|
6026
6472
|
}
|
|
6027
|
-
}(e, t),
|
|
6473
|
+
}(e, t), V(a, l, e.bl_count);
|
|
6028
6474
|
}
|
|
6029
|
-
function
|
|
6475
|
+
function ee(e, t, n) {
|
|
6030
6476
|
var r, i, a = -1, o = t[1], s = 0, c = 7, l = 4;
|
|
6031
|
-
for (o === 0 && (c = 138, l = 3), t[2 * (n + 1) + 1] = 65535, r = 0; r <= n; r++) i = o, o = t[2 * (r + 1) + 1], ++s < c && i === o || (s < l ? e.bl_tree[2 * i] += s : i === 0 ? s <= 10 ? e.bl_tree[2 *
|
|
6477
|
+
for (o === 0 && (c = 138, l = 3), t[2 * (n + 1) + 1] = 65535, r = 0; r <= n; r++) i = o, o = t[2 * (r + 1) + 1], ++s < c && i === o || (s < l ? e.bl_tree[2 * i] += s : i === 0 ? s <= 10 ? e.bl_tree[2 * y]++ : e.bl_tree[2 * b]++ : (i !== a && e.bl_tree[2 * i]++, e.bl_tree[2 * v]++), a = i, l = (s = 0) === o ? (c = 138, 3) : i === o ? (c = 6, 3) : (c = 7, 4));
|
|
6032
6478
|
}
|
|
6033
|
-
function
|
|
6479
|
+
function te(e, t, n) {
|
|
6034
6480
|
var r, i, a = -1, o = t[1], s = 0, c = 7, l = 4;
|
|
6035
6481
|
for (o === 0 && (c = 138, l = 3), r = 0; r <= n; r++) if (i = o, o = t[2 * (r + 1) + 1], !(++s < c && i === o)) {
|
|
6036
|
-
if (s < l) for (;
|
|
6037
|
-
else i === 0 ? s <= 10 ? (
|
|
6482
|
+
if (s < l) for (; z(e, i, e.bl_tree), --s != 0;);
|
|
6483
|
+
else i === 0 ? s <= 10 ? (z(e, y, e.bl_tree), R(e, s - 3, 3)) : (z(e, b, e.bl_tree), R(e, s - 11, 7)) : (i !== a && (z(e, i, e.bl_tree), s--), z(e, v, e.bl_tree), R(e, s - 3, 2));
|
|
6038
6484
|
a = i, l = (s = 0) === o ? (c = 138, 3) : i === o ? (c = 6, 3) : (c = 7, 4);
|
|
6039
6485
|
}
|
|
6040
6486
|
}
|
|
6041
|
-
o(
|
|
6042
|
-
var
|
|
6043
|
-
function
|
|
6044
|
-
|
|
6045
|
-
|
|
6487
|
+
o(N);
|
|
6488
|
+
var ne = !1;
|
|
6489
|
+
function re(e, t, n, i) {
|
|
6490
|
+
R(e, (s << 1) + (i ? 1 : 0), 3), function(e, t, n, i) {
|
|
6491
|
+
U(e), i && (L(e, n), L(e, ~n)), r.arraySet(e.pending_buf, e.window, t, n, e.pending), e.pending += n;
|
|
6046
6492
|
}(e, t, n, !0);
|
|
6047
6493
|
}
|
|
6048
6494
|
n._tr_init = function(e) {
|
|
6049
|
-
|
|
6495
|
+
ne ||= (function() {
|
|
6050
6496
|
var e, t, n, r, i, a = Array(m + 1);
|
|
6051
|
-
for (r = n = 0; r < c - 1; r++) for (
|
|
6052
|
-
for (
|
|
6053
|
-
for (i >>= 7; r < d; r++) for (
|
|
6497
|
+
for (r = n = 0; r < c - 1; r++) for (k[r] = n, e = 0; e < 1 << x[r]; e++) O[n++] = r;
|
|
6498
|
+
for (O[n - 1] = r, r = i = 0; r < 16; r++) for (N[r] = i, e = 0; e < 1 << S[r]; e++) D[i++] = r;
|
|
6499
|
+
for (i >>= 7; r < d; r++) for (N[r] = i << 7, e = 0; e < 1 << S[r] - 7; e++) D[256 + i++] = r;
|
|
6054
6500
|
for (t = 0; t <= m; t++) a[t] = 0;
|
|
6055
|
-
for (e = 0; e <= 143;)
|
|
6056
|
-
for (; e <= 255;)
|
|
6057
|
-
for (; e <= 279;)
|
|
6058
|
-
for (; e <= 287;)
|
|
6059
|
-
for (
|
|
6060
|
-
|
|
6061
|
-
}(), !0), e.l_desc = new
|
|
6062
|
-
}, n._tr_stored_block =
|
|
6501
|
+
for (e = 0; e <= 143;) T[2 * e + 1] = 8, e++, a[8]++;
|
|
6502
|
+
for (; e <= 255;) T[2 * e + 1] = 9, e++, a[9]++;
|
|
6503
|
+
for (; e <= 279;) T[2 * e + 1] = 7, e++, a[7]++;
|
|
6504
|
+
for (; e <= 287;) T[2 * e + 1] = 8, e++, a[8]++;
|
|
6505
|
+
for (V(T, u + 1, a), e = 0; e < d; e++) E[2 * e + 1] = 5, E[2 * e] = B(e, 5);
|
|
6506
|
+
A = new P(T, x, l + 1, u, m), j = new P(E, S, 0, d, m), M = new P([], C, 0, f, g);
|
|
6507
|
+
}(), !0), e.l_desc = new F(e.dyn_ltree, A), e.d_desc = new F(e.dyn_dtree, j), e.bl_desc = new F(e.bl_tree, M), e.bi_buf = 0, e.bi_valid = 0, H(e);
|
|
6508
|
+
}, n._tr_stored_block = re, n._tr_flush_block = function(e, t, n, r) {
|
|
6063
6509
|
var o, s, c = 0;
|
|
6064
6510
|
0 < e.level ? (e.strm.data_type === 2 && (e.strm.data_type = function(e) {
|
|
6065
6511
|
var t, n = 4093624447;
|
|
@@ -6067,20 +6513,20 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6067
6513
|
if (e.dyn_ltree[18] !== 0 || e.dyn_ltree[20] !== 0 || e.dyn_ltree[26] !== 0) return a;
|
|
6068
6514
|
for (t = 32; t < l; t++) if (e.dyn_ltree[2 * t] !== 0) return a;
|
|
6069
6515
|
return i;
|
|
6070
|
-
}(e)),
|
|
6516
|
+
}(e)), q(e, e.l_desc), q(e, e.d_desc), c = function(e) {
|
|
6071
6517
|
var t;
|
|
6072
|
-
for (
|
|
6518
|
+
for (ee(e, e.dyn_ltree, e.l_desc.max_code), ee(e, e.dyn_dtree, e.d_desc.max_code), q(e, e.bl_desc), t = f - 1; 3 <= t && e.bl_tree[2 * w[t] + 1] === 0; t--);
|
|
6073
6519
|
return e.opt_len += 3 * (t + 1) + 5 + 5 + 4, t;
|
|
6074
|
-
}(e), o = e.opt_len + 3 + 7 >>> 3, (s = e.static_len + 3 + 7 >>> 3) <= o && (o = s)) : o = s = n + 5, n + 4 <= o && t !== -1 ?
|
|
6520
|
+
}(e), o = e.opt_len + 3 + 7 >>> 3, (s = e.static_len + 3 + 7 >>> 3) <= o && (o = s)) : o = s = n + 5, n + 4 <= o && t !== -1 ? re(e, t, n, r) : e.strategy === 4 || s === o ? (R(e, 2 + (r ? 1 : 0), 3), K(e, T, E)) : (R(e, 4 + (r ? 1 : 0), 3), function(e, t, n, r) {
|
|
6075
6521
|
var i;
|
|
6076
|
-
for (
|
|
6077
|
-
|
|
6078
|
-
}(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, c + 1),
|
|
6522
|
+
for (R(e, t - 257, 5), R(e, n - 1, 5), R(e, r - 4, 4), i = 0; i < r; i++) R(e, e.bl_tree[2 * w[i] + 1], 3);
|
|
6523
|
+
te(e, e.dyn_ltree, t - 1), te(e, e.dyn_dtree, n - 1);
|
|
6524
|
+
}(e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, c + 1), K(e, e.dyn_ltree, e.dyn_dtree)), H(e), r && U(e);
|
|
6079
6525
|
}, n._tr_tally = function(e, t, n) {
|
|
6080
|
-
return e.pending_buf[e.d_buf + 2 * e.last_lit] = t >>> 8 & 255, e.pending_buf[e.d_buf + 2 * e.last_lit + 1] = 255 & t, e.pending_buf[e.l_buf + e.last_lit] = 255 & n, e.last_lit++, t === 0 ? e.dyn_ltree[2 * n]++ : (e.matches++, t--, e.dyn_ltree[2 * (
|
|
6526
|
+
return e.pending_buf[e.d_buf + 2 * e.last_lit] = t >>> 8 & 255, e.pending_buf[e.d_buf + 2 * e.last_lit + 1] = 255 & t, e.pending_buf[e.l_buf + e.last_lit] = 255 & n, e.last_lit++, t === 0 ? e.dyn_ltree[2 * n]++ : (e.matches++, t--, e.dyn_ltree[2 * (O[n] + l + 1)]++, e.dyn_dtree[2 * I(t)]++), e.last_lit === e.lit_bufsize - 1;
|
|
6081
6527
|
}, n._tr_align = function(e) {
|
|
6082
|
-
|
|
6083
|
-
e.bi_valid === 16 ? (
|
|
6528
|
+
R(e, 2, 3), z(e, _, T), function(e) {
|
|
6529
|
+
e.bi_valid === 16 ? (L(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : 8 <= e.bi_valid && (e.pending_buf[e.pending++] = 255 & e.bi_buf, e.bi_buf >>= 8, e.bi_valid -= 8);
|
|
6084
6530
|
}(e);
|
|
6085
6531
|
};
|
|
6086
6532
|
}, { "../utils/common": 41 }],
|
|
@@ -6169,19 +6615,19 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6169
6615
|
}, {}]
|
|
6170
6616
|
}, {}, [10])(10);
|
|
6171
6617
|
});
|
|
6172
|
-
})))(),
|
|
6618
|
+
})))(), Mr = new class extends xt {
|
|
6173
6619
|
name = "zip";
|
|
6174
6620
|
async installDownload(e) {
|
|
6175
6621
|
console.log("[loader zip] begin:", e);
|
|
6176
|
-
let t = await
|
|
6177
|
-
await
|
|
6178
|
-
let n = await (0,
|
|
6622
|
+
let t = await yt("__temp__");
|
|
6623
|
+
await Rt(t, { recursive: !0 }), await Ut(await Z(t, "temp.zip"), new Uint8Array(await e.arrayBuffer())), console.log("[loader zip] temp:", t);
|
|
6624
|
+
let n = await (0, jr.loadAsync)(e);
|
|
6179
6625
|
console.log(n.files);
|
|
6180
|
-
let r = JSON.parse(await n.file("manifest.json")?.async("string") ?? "{}"), i = await
|
|
6626
|
+
let r = JSON.parse(await n.file("manifest.json")?.async("string") ?? "{}"), i = await yt(r.name.id);
|
|
6181
6627
|
try {
|
|
6182
|
-
await
|
|
6628
|
+
await Ht(i, { recursive: !0 });
|
|
6183
6629
|
} catch {}
|
|
6184
|
-
await
|
|
6630
|
+
await Rt(i, { recursive: !0 });
|
|
6185
6631
|
let a = [];
|
|
6186
6632
|
n.forEach((e, t) => {
|
|
6187
6633
|
a.push({
|
|
@@ -6189,7 +6635,7 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6189
6635
|
file: t
|
|
6190
6636
|
});
|
|
6191
6637
|
});
|
|
6192
|
-
for (let { file: e, path: t } of a) e.dir ? await
|
|
6638
|
+
for (let { file: e, path: t } of a) e.dir ? await Rt(await Z(i, t), { recursive: !0 }) : await Ut(await Z(i, t), await e.async("uint8array"), { create: !0 });
|
|
6193
6639
|
return r;
|
|
6194
6640
|
}
|
|
6195
6641
|
canInstall(e) {
|
|
@@ -6197,16 +6643,16 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6197
6643
|
}
|
|
6198
6644
|
async load(e) {
|
|
6199
6645
|
if (!e.meta.entry) throw Error("not found entry");
|
|
6200
|
-
let t = await
|
|
6646
|
+
let t = await yt(e.pluginName);
|
|
6201
6647
|
console.log("[loader zip] baseDir:", t, e.meta.entry);
|
|
6202
6648
|
let n = document.createElement("script");
|
|
6203
6649
|
if (n.addEventListener("error", (e) => {
|
|
6204
6650
|
throw e;
|
|
6205
|
-
}), n.type = "module", n.async = !0, n.src = decodeURIComponent(
|
|
6651
|
+
}), n.type = "module", n.async = !0, n.src = decodeURIComponent(mt(await Z(t, e.meta.entry.jsPath), "local")), document.body.appendChild(n), !e.meta.entry?.cssPath) return;
|
|
6206
6652
|
let r = e.meta.entry.cssPath;
|
|
6207
6653
|
if (r == "auto") {
|
|
6208
6654
|
var i = "";
|
|
6209
|
-
let e = await
|
|
6655
|
+
let e = await zt(t);
|
|
6210
6656
|
for (let t of e) if (t.name.endsWith(".css")) {
|
|
6211
6657
|
var i = t.name;
|
|
6212
6658
|
break;
|
|
@@ -6215,19 +6661,19 @@ while (r === s[++i] && r === s[++i] && r === s[++i] && r === s[++i] && r === s[+
|
|
|
6215
6661
|
let a = document.createElement("link");
|
|
6216
6662
|
a.addEventListener("error", (e) => {
|
|
6217
6663
|
throw e;
|
|
6218
|
-
}), a.rel = "stylesheet", a.href = decodeURIComponent(
|
|
6664
|
+
}), a.rel = "stylesheet", a.href = decodeURIComponent(mt(await Z(t, i), "local")), document.head.appendChild(a);
|
|
6219
6665
|
}
|
|
6220
|
-
}(),
|
|
6221
|
-
"./booter/0_configSetter.ts":
|
|
6222
|
-
"./booter/10_apiTest.ts":
|
|
6223
|
-
"./booter/20_resourceTest.ts":
|
|
6224
|
-
"./booter/30_boot.ts":
|
|
6225
|
-
"./booter/40_auth.ts":
|
|
6226
|
-
"./booter/50_otherProcess.ts":
|
|
6227
|
-
}),
|
|
6228
|
-
const
|
|
6229
|
-
let { plugins: t, pluginSteps: n } =
|
|
6230
|
-
t.set(e.name,
|
|
6666
|
+
}(), Nr = /* @__PURE__ */ Object.assign({
|
|
6667
|
+
"./booter/0_configSetter.ts": St,
|
|
6668
|
+
"./booter/10_apiTest.ts": Et,
|
|
6669
|
+
"./booter/20_resourceTest.ts": Dt,
|
|
6670
|
+
"./booter/30_boot.ts": Ot,
|
|
6671
|
+
"./booter/40_auth.ts": At,
|
|
6672
|
+
"./booter/50_otherProcess.ts": jt
|
|
6673
|
+
}), Pr = Te(Object.entries(Nr), ([e]) => Number(e.match(/[\d\.]+(?=_)/)?.[0])).map((e) => e[1]);
|
|
6674
|
+
const Fr = async (e) => {
|
|
6675
|
+
let { plugins: t, pluginSteps: n } = lt();
|
|
6676
|
+
t.set(e.name, y(e)), n[e.name] = {
|
|
6231
6677
|
steps: [],
|
|
6232
6678
|
now: {
|
|
6233
6679
|
stepsIndex: 0,
|
|
@@ -6236,13 +6682,13 @@ const bootPlugin = async (e) => {
|
|
|
6236
6682
|
};
|
|
6237
6683
|
try {
|
|
6238
6684
|
let t = {};
|
|
6239
|
-
for (let r of
|
|
6685
|
+
for (let r of Pr) {
|
|
6240
6686
|
let i = n[e.name].steps.length;
|
|
6241
6687
|
n[e.name].steps[i] = {
|
|
6242
6688
|
name: r.name,
|
|
6243
6689
|
description: ""
|
|
6244
6690
|
}, n[e.name].now.stepsIndex = i, n[e.name].now.status = "process", await r.call(e, (t) => {
|
|
6245
|
-
|
|
6691
|
+
oe(t) ? n[e.name].steps[i].description = t : (t.description && (n[e.name].steps[i].description = t.description), t.name && (n[e.name].steps[i].name = t.name));
|
|
6246
6692
|
}, t);
|
|
6247
6693
|
}
|
|
6248
6694
|
n[e.name].now.stepsIndex++;
|
|
@@ -6251,30 +6697,37 @@ const bootPlugin = async (e) => {
|
|
|
6251
6697
|
}
|
|
6252
6698
|
console.log(`[plugin usePluginStore.$loadPlugin] plugin "${e.name}" load done`);
|
|
6253
6699
|
};
|
|
6254
|
-
var
|
|
6255
|
-
"./installer/10_normalUrl.ts":
|
|
6256
|
-
"./installer/20_local.ts":
|
|
6257
|
-
"./installer/30_dev.ts":
|
|
6258
|
-
"./installer/40_github.ts":
|
|
6259
|
-
|
|
6260
|
-
|
|
6700
|
+
var Ir = /* @__PURE__ */ Object.assign({
|
|
6701
|
+
"./installer/10_normalUrl.ts": Mt,
|
|
6702
|
+
"./installer/20_local.ts": Gt,
|
|
6703
|
+
"./installer/30_dev.ts": Kt,
|
|
6704
|
+
"./installer/40_github.ts": Er,
|
|
6705
|
+
"./installer/9999_awesome.ts": Or
|
|
6706
|
+
}), Lr = Te(Object.entries(Ir), ([e]) => Number(e.match(/[\d\.]+(?=_)/)?.[0])).map((e) => e[1]).reverse();
|
|
6707
|
+
const Rr = () => i(Y, "pluginInstallSourceOverrides", []), zr = (e, t, n) => e.createLoading("依赖安装/检查", async (e) => {
|
|
6261
6708
|
e.retryable = !0;
|
|
6262
|
-
let i = 0, a = n ?? new Set((await
|
|
6263
|
-
for (let { id: n, download: r } of t.require) a.has(n) || !r || (console.log(`从 ${t.name.id} 发现未安装依赖: ${n} ->`, r), e.description = `安装: ${n}`, await
|
|
6709
|
+
let i = 0, a = n ?? new Set((await r.value.selectFrom("plugin").select("pluginName").execute()).map((e) => e.pluginName)), o = Rr();
|
|
6710
|
+
for (let { id: n, download: r } of t.require) a.has(n) || !r || (console.log(`从 ${t.name.id} 发现未安装依赖: ${n} ->`, r), e.description = `安装: ${n}`, await Br(o.value.find((e) => e.id == n && e.enabled)?.install ?? r), i++);
|
|
6264
6711
|
e.description = `安装完成,共${i}个`;
|
|
6265
|
-
}),
|
|
6712
|
+
}), Br = (e, t) => H(`下载插件-${e}`, async (n) => {
|
|
6266
6713
|
let [i, a] = await n.createLoading("下载", async (t) => {
|
|
6267
6714
|
t.retryable = !0;
|
|
6268
|
-
let n =
|
|
6715
|
+
let n = Lr.filter((t) => t.isMatched(e)).at(0);
|
|
6269
6716
|
if (!n) throw Error("没有符合的下载器:" + e);
|
|
6270
|
-
|
|
6717
|
+
t.description = n.name;
|
|
6718
|
+
let r = e;
|
|
6719
|
+
for (;;) {
|
|
6720
|
+
let e = await n.install(r);
|
|
6721
|
+
if (oe(e)) r = e;
|
|
6722
|
+
else return [e, n];
|
|
6723
|
+
}
|
|
6271
6724
|
}), o = await n.createLoading("安装插件", async (t) => {
|
|
6272
6725
|
t.retryable = !0;
|
|
6273
|
-
let n =
|
|
6726
|
+
let n = Wr.filter((e) => e.canInstall(i)).at(-1);
|
|
6274
6727
|
if (!n) throw Error("没有符合的安装器:" + e);
|
|
6275
6728
|
t.description = n.name;
|
|
6276
6729
|
let o = await n.installDownload(i);
|
|
6277
|
-
return t.description = "写入数据库", await
|
|
6730
|
+
return t.description = "写入数据库", await r.value.replaceInto("plugin").values({
|
|
6278
6731
|
displayName: o.name.display,
|
|
6279
6732
|
enable: !0,
|
|
6280
6733
|
installerName: a.name,
|
|
@@ -6284,15 +6737,15 @@ const usePluginConfig = () => useNativeStore(coreName, "pluginInstallSourceOverr
|
|
|
6284
6737
|
pluginName: o.name.id
|
|
6285
6738
|
}).execute(), o;
|
|
6286
6739
|
});
|
|
6287
|
-
console.log(`安装插件成功: ${o.name.id} ->`, o), await
|
|
6288
|
-
}),
|
|
6740
|
+
console.log(`安装插件成功: ${o.name.id} ->`, o), await zr(n, o, t);
|
|
6741
|
+
}), Vr = (e, t) => H(`安装插件-${e.name}`, async (n) => {
|
|
6289
6742
|
let i = await n.createLoading("安装插件", async (t) => {
|
|
6290
6743
|
t.retryable = !0;
|
|
6291
|
-
let n =
|
|
6744
|
+
let n = Wr.filter((t) => t.canInstall(e)).at(-1);
|
|
6292
6745
|
if (!n) throw Error("没有符合的安装器");
|
|
6293
6746
|
t.description = n.name;
|
|
6294
6747
|
let i = await n.installDownload(e);
|
|
6295
|
-
return t.description = "写入数据库", await
|
|
6748
|
+
return t.description = "写入数据库", await r.value.replaceInto("plugin").values({
|
|
6296
6749
|
displayName: i.name.display,
|
|
6297
6750
|
enable: !0,
|
|
6298
6751
|
installerName: "",
|
|
@@ -6302,31 +6755,37 @@ const usePluginConfig = () => useNativeStore(coreName, "pluginInstallSourceOverr
|
|
|
6302
6755
|
pluginName: i.name.id
|
|
6303
6756
|
}).execute(), i;
|
|
6304
6757
|
});
|
|
6305
|
-
console.log(`安装插件成功: ${i.name.id} ->`, i), await
|
|
6306
|
-
}),
|
|
6758
|
+
console.log(`安装插件成功: ${i.name.id} ->`, i), await zr(n, i, t);
|
|
6759
|
+
}), Hr = async (e, t) => H(`更新插件-${e.pluginName}`, async (n) => {
|
|
6307
6760
|
let i = await n.createLoading("更新", async (t) => {
|
|
6308
6761
|
t.retryable = !0;
|
|
6309
|
-
let n =
|
|
6310
|
-
|
|
6311
|
-
|
|
6762
|
+
let n = e.installerName;
|
|
6763
|
+
for (;;) {
|
|
6764
|
+
let r = Lr.find((e) => e.name == n);
|
|
6765
|
+
if (!r) throw Error("没有符合的下载器");
|
|
6766
|
+
t.description = r.name;
|
|
6767
|
+
let i = await r.update(e);
|
|
6768
|
+
if (oe(i)) n = i;
|
|
6769
|
+
else return i;
|
|
6770
|
+
}
|
|
6312
6771
|
}), a = await n.createLoading("安装插件", async (t) => {
|
|
6313
6772
|
t.retryable = !0;
|
|
6314
|
-
let n =
|
|
6773
|
+
let n = Wr.find((t) => t.name == e.loaderName);
|
|
6315
6774
|
if (!n) throw Error("没有符合的安装器");
|
|
6316
6775
|
return await n.installDownload(i);
|
|
6317
6776
|
});
|
|
6318
|
-
await
|
|
6777
|
+
await r.value.replaceInto("plugin").values({
|
|
6319
6778
|
...e,
|
|
6320
6779
|
meta: JSON.stringify(a)
|
|
6321
|
-
}).execute(), await
|
|
6780
|
+
}).execute(), await zr(n, a, t);
|
|
6322
6781
|
});
|
|
6323
|
-
var
|
|
6324
|
-
"./loader/1_userscript.ts":
|
|
6325
|
-
"./loader/2_zip.ts":
|
|
6326
|
-
}),
|
|
6327
|
-
const
|
|
6782
|
+
var Ur = /* @__PURE__ */ Object.assign({
|
|
6783
|
+
"./loader/1_userscript.ts": Ar,
|
|
6784
|
+
"./loader/2_zip.ts": Mr
|
|
6785
|
+
}), Wr = Te(Object.entries(Ur), ([e]) => Number(e.match(/[\d\.]+(?=_)/)?.[0])).map((e) => e[1]), Gr = {}, Kr = (e) => Gr[e] ??= new le();
|
|
6786
|
+
const qr = async (e) => {
|
|
6328
6787
|
console.log(`[plugin bootPlugin] booting name "${e.pluginName}"`);
|
|
6329
|
-
let t =
|
|
6788
|
+
let t = Kr(e.pluginName), n = lt();
|
|
6330
6789
|
n.pluginSteps[e.pluginName] = {
|
|
6331
6790
|
now: {
|
|
6332
6791
|
status: "wait",
|
|
@@ -6338,39 +6797,39 @@ const loadPlugin = async (e) => {
|
|
|
6338
6797
|
}]
|
|
6339
6798
|
};
|
|
6340
6799
|
try {
|
|
6341
|
-
await t.acquire(), await
|
|
6800
|
+
await t.acquire(), await Wr.find((t) => t.name == e.loaderName).load(e), await t.acquire();
|
|
6342
6801
|
} catch (t) {
|
|
6343
6802
|
throw n.pluginSteps[e.pluginName].now.status = "error", n.pluginSteps[e.pluginName].now.error = t, t;
|
|
6344
6803
|
}
|
|
6345
6804
|
console.log(`[plugin bootPlugin] boot name done "${e.pluginName}"`);
|
|
6346
6805
|
};
|
|
6347
|
-
|
|
6806
|
+
Me.on("definedPlugin", async (e) => {
|
|
6348
6807
|
console.log("[plugin addPlugin] new plugin defined", e.name, e);
|
|
6349
|
-
let t =
|
|
6350
|
-
await
|
|
6351
|
-
}), window.$api.loaders =
|
|
6352
|
-
const
|
|
6353
|
-
await
|
|
6354
|
-
let e = new Set([
|
|
6808
|
+
let t = Kr(e.name);
|
|
6809
|
+
await Fr(e), console.log("[plugin addPlugin] done", e.name), t.release();
|
|
6810
|
+
}), window.$api.loaders = Wr, window.$api.installers = Lr;
|
|
6811
|
+
const Jr = F.fromAsyncFunction(async () => {
|
|
6812
|
+
await ut();
|
|
6813
|
+
let e = new Set([Y]), n = await t.getByEnabled(!0), r = [];
|
|
6355
6814
|
for (;;) {
|
|
6356
6815
|
let t = n.filter((t) => t.meta.require.every((t) => e.has(t.id)));
|
|
6357
|
-
r.push(t),
|
|
6816
|
+
r.push(t), ee(n, (e) => t.includes(e));
|
|
6358
6817
|
for (let { pluginName: n } of t) e.add(n);
|
|
6359
|
-
if (
|
|
6818
|
+
if (Ae(t)) break;
|
|
6360
6819
|
}
|
|
6361
|
-
if (!
|
|
6362
|
-
for (let e of r) await Promise.all(e.map((e) =>
|
|
6820
|
+
if (!Ae(n)) throw Error(`插件循环引用: ${n.map((e) => e.pluginName).join(", ")}`);
|
|
6821
|
+
for (let e of r) await Promise.all(e.map((e) => qr(e)));
|
|
6363
6822
|
console.log("[plugin bootPlugin] all load done");
|
|
6364
6823
|
});
|
|
6365
|
-
var
|
|
6824
|
+
var Yr = /* @__PURE__ */ f({
|
|
6366
6825
|
__name: "Inject",
|
|
6367
6826
|
props: {
|
|
6368
6827
|
key: {},
|
|
6369
6828
|
args: {}
|
|
6370
6829
|
},
|
|
6371
6830
|
setup(e) {
|
|
6372
|
-
let t = e, n =
|
|
6373
|
-
return (t, r) => (
|
|
6831
|
+
let t = e, n = s(() => Array.from(J.envExtends.values()).filter((e) => e.key == t.key));
|
|
6832
|
+
return (t, r) => (S(!0), u(o, null, T(n.value, (t) => (S(), c(A(z), {
|
|
6374
6833
|
promise: async () => {
|
|
6375
6834
|
try {
|
|
6376
6835
|
return await t.condition(e.args);
|
|
@@ -6380,21 +6839,21 @@ var Inject_default = /* @__PURE__ */ defineComponent({
|
|
|
6380
6839
|
},
|
|
6381
6840
|
"auto-load": ""
|
|
6382
6841
|
}, {
|
|
6383
|
-
default:
|
|
6842
|
+
default: N(({ result: n }) => [n ? (S(), c(E(t.component), b({
|
|
6384
6843
|
key: 0,
|
|
6385
6844
|
ref_for: !0
|
|
6386
|
-
}, e.args), null, 16)) :
|
|
6845
|
+
}, e.args), null, 16)) : l("", !0)]),
|
|
6387
6846
|
_: 2
|
|
6388
6847
|
}, 1032, ["promise"]))), 256));
|
|
6389
6848
|
}
|
|
6390
6849
|
});
|
|
6391
|
-
const
|
|
6392
|
-
|
|
6850
|
+
const Xr = (e, t, n) => {
|
|
6851
|
+
J.envExtends.add({
|
|
6393
6852
|
key: e,
|
|
6394
6853
|
component: t,
|
|
6395
6854
|
condition: n ?? (() => !0)
|
|
6396
6855
|
});
|
|
6397
6856
|
};
|
|
6398
|
-
export { ConfigPointer, Global,
|
|
6857
|
+
export { et as ConfigPointer, J as Global, Yr as Inject, Xr as addInjection, tt as appConfig, Fr as bootPlugin, rt as declareDepType, Pe as decodePluginMeta, Ne as definePlugin, zr as installDepends, Vr as installFilePlugin, Br as installPlugin, Jr as loadAllPlugins, qr as loadPlugin, Me as pluginEmitter, at as pluginExposes, Lr as pluginInstallers, Wr as pluginLoaders, it as require, Hr as updatePlugin, nt as useConfig, Rr as usePluginConfig, lt as usePluginStore };
|
|
6399
6858
|
|
|
6400
6859
|
//# sourceMappingURL=index.js.map
|