@kevisual/api 0.0.47 → 0.0.48
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/query-ai.js +12 -10
- package/dist/query-app.js +12 -10
- package/dist/query-config.js +11 -9
- package/dist/query-login.js +12 -10
- package/dist/query-mark.d.ts +100 -0
- package/dist/query-mark.js +342 -0
- package/dist/query-proxy.js +11 -9
- package/dist/query-resources.js +12 -475
- package/dist/query-secret.js +11 -9
- package/dist/query-shop.js +12 -10
- package/dist/utils.js +10 -32
- package/package.json +10 -7
- package/query/query-mark/index.ts +154 -0
- package/query/query-resources/utils.ts +2 -3
package/dist/query-proxy.js
CHANGED
|
@@ -194,7 +194,7 @@ var require_eventemitter3 = __commonJS((exports, module) => {
|
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
196
|
|
|
197
|
-
// node_modules/.pnpm/@kevisual+query@0.0.
|
|
197
|
+
// node_modules/.pnpm/@kevisual+query@0.0.40/node_modules/@kevisual/query/dist/query-browser.js
|
|
198
198
|
var isTextForContentType = (contentType) => {
|
|
199
199
|
if (!contentType)
|
|
200
200
|
return false;
|
|
@@ -223,12 +223,12 @@ var adapter = async (opts = {}, overloadOpts) => {
|
|
|
223
223
|
url = new URL(opts.url);
|
|
224
224
|
} else {
|
|
225
225
|
origin = window?.location?.origin || "http://localhost:51515";
|
|
226
|
-
url = new URL(opts
|
|
226
|
+
url = new URL(opts?.url || "", origin);
|
|
227
227
|
}
|
|
228
228
|
const isGet = method === "GET";
|
|
229
229
|
const oldSearchParams = url.searchParams;
|
|
230
230
|
if (isGet) {
|
|
231
|
-
let searchParams = new URLSearchParams({ ...Object.fromEntries(oldSearchParams), ...opts
|
|
231
|
+
let searchParams = new URLSearchParams({ ...Object.fromEntries(oldSearchParams), ...opts?.params, ...opts?.body });
|
|
232
232
|
url.search = searchParams.toString();
|
|
233
233
|
} else {
|
|
234
234
|
const params = {
|
|
@@ -253,11 +253,13 @@ var adapter = async (opts = {}, overloadOpts) => {
|
|
|
253
253
|
} else if (isPostFile) {
|
|
254
254
|
body = opts.body;
|
|
255
255
|
} else {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
256
|
+
if (opts.body && typeof opts.body === "object" && !(opts.body instanceof FormData)) {
|
|
257
|
+
headers = {
|
|
258
|
+
"Content-Type": "application/json",
|
|
259
|
+
...headers
|
|
260
|
+
};
|
|
261
|
+
body = JSON.stringify(opts.body);
|
|
262
|
+
}
|
|
261
263
|
}
|
|
262
264
|
return fetch(url, {
|
|
263
265
|
method: method.toUpperCase(),
|
|
@@ -520,7 +522,7 @@ class Query {
|
|
|
520
522
|
"Content-Type": "application/json"
|
|
521
523
|
};
|
|
522
524
|
this.timeout = opts?.timeout || 60000 * 3;
|
|
523
|
-
if (opts
|
|
525
|
+
if (opts?.beforeRequest) {
|
|
524
526
|
this.beforeRequest = opts.beforeRequest;
|
|
525
527
|
} else {
|
|
526
528
|
this.beforeRequest = async (opts2) => {
|
package/dist/query-resources.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
1
|
var __create = Object.create;
|
|
3
2
|
var __getProtoOf = Object.getPrototypeOf;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
@@ -16,469 +15,6 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
16
15
|
return to;
|
|
17
16
|
};
|
|
18
17
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
19
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
20
|
-
|
|
21
|
-
// node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/core.js
|
|
22
|
-
var require_core = __commonJS((exports, module) => {
|
|
23
|
-
(function(root, factory) {
|
|
24
|
-
if (typeof exports === "object") {
|
|
25
|
-
module.exports = exports = factory();
|
|
26
|
-
} else if (typeof define === "function" && define.amd) {
|
|
27
|
-
define([], factory);
|
|
28
|
-
} else {
|
|
29
|
-
root.CryptoJS = factory();
|
|
30
|
-
}
|
|
31
|
-
})(exports, function() {
|
|
32
|
-
var CryptoJS = CryptoJS || function(Math2, undefined2) {
|
|
33
|
-
var crypto;
|
|
34
|
-
if (typeof window !== "undefined" && window.crypto) {
|
|
35
|
-
crypto = window.crypto;
|
|
36
|
-
}
|
|
37
|
-
if (typeof self !== "undefined" && self.crypto) {
|
|
38
|
-
crypto = self.crypto;
|
|
39
|
-
}
|
|
40
|
-
if (typeof globalThis !== "undefined" && globalThis.crypto) {
|
|
41
|
-
crypto = globalThis.crypto;
|
|
42
|
-
}
|
|
43
|
-
if (!crypto && typeof window !== "undefined" && window.msCrypto) {
|
|
44
|
-
crypto = window.msCrypto;
|
|
45
|
-
}
|
|
46
|
-
if (!crypto && typeof global !== "undefined" && global.crypto) {
|
|
47
|
-
crypto = global.crypto;
|
|
48
|
-
}
|
|
49
|
-
if (!crypto && true) {
|
|
50
|
-
try {
|
|
51
|
-
crypto = __require("crypto");
|
|
52
|
-
} catch (err) {}
|
|
53
|
-
}
|
|
54
|
-
var cryptoSecureRandomInt = function() {
|
|
55
|
-
if (crypto) {
|
|
56
|
-
if (typeof crypto.getRandomValues === "function") {
|
|
57
|
-
try {
|
|
58
|
-
return crypto.getRandomValues(new Uint32Array(1))[0];
|
|
59
|
-
} catch (err) {}
|
|
60
|
-
}
|
|
61
|
-
if (typeof crypto.randomBytes === "function") {
|
|
62
|
-
try {
|
|
63
|
-
return crypto.randomBytes(4).readInt32LE();
|
|
64
|
-
} catch (err) {}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
throw new Error("Native crypto module could not be used to get secure random number.");
|
|
68
|
-
};
|
|
69
|
-
var create = Object.create || function() {
|
|
70
|
-
function F() {}
|
|
71
|
-
return function(obj) {
|
|
72
|
-
var subtype;
|
|
73
|
-
F.prototype = obj;
|
|
74
|
-
subtype = new F;
|
|
75
|
-
F.prototype = null;
|
|
76
|
-
return subtype;
|
|
77
|
-
};
|
|
78
|
-
}();
|
|
79
|
-
var C = {};
|
|
80
|
-
var C_lib = C.lib = {};
|
|
81
|
-
var Base = C_lib.Base = function() {
|
|
82
|
-
return {
|
|
83
|
-
extend: function(overrides) {
|
|
84
|
-
var subtype = create(this);
|
|
85
|
-
if (overrides) {
|
|
86
|
-
subtype.mixIn(overrides);
|
|
87
|
-
}
|
|
88
|
-
if (!subtype.hasOwnProperty("init") || this.init === subtype.init) {
|
|
89
|
-
subtype.init = function() {
|
|
90
|
-
subtype.$super.init.apply(this, arguments);
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
subtype.init.prototype = subtype;
|
|
94
|
-
subtype.$super = this;
|
|
95
|
-
return subtype;
|
|
96
|
-
},
|
|
97
|
-
create: function() {
|
|
98
|
-
var instance = this.extend();
|
|
99
|
-
instance.init.apply(instance, arguments);
|
|
100
|
-
return instance;
|
|
101
|
-
},
|
|
102
|
-
init: function() {},
|
|
103
|
-
mixIn: function(properties) {
|
|
104
|
-
for (var propertyName in properties) {
|
|
105
|
-
if (properties.hasOwnProperty(propertyName)) {
|
|
106
|
-
this[propertyName] = properties[propertyName];
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
if (properties.hasOwnProperty("toString")) {
|
|
110
|
-
this.toString = properties.toString;
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
clone: function() {
|
|
114
|
-
return this.init.prototype.extend(this);
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
}();
|
|
118
|
-
var WordArray = C_lib.WordArray = Base.extend({
|
|
119
|
-
init: function(words, sigBytes) {
|
|
120
|
-
words = this.words = words || [];
|
|
121
|
-
if (sigBytes != undefined2) {
|
|
122
|
-
this.sigBytes = sigBytes;
|
|
123
|
-
} else {
|
|
124
|
-
this.sigBytes = words.length * 4;
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
toString: function(encoder) {
|
|
128
|
-
return (encoder || Hex).stringify(this);
|
|
129
|
-
},
|
|
130
|
-
concat: function(wordArray) {
|
|
131
|
-
var thisWords = this.words;
|
|
132
|
-
var thatWords = wordArray.words;
|
|
133
|
-
var thisSigBytes = this.sigBytes;
|
|
134
|
-
var thatSigBytes = wordArray.sigBytes;
|
|
135
|
-
this.clamp();
|
|
136
|
-
if (thisSigBytes % 4) {
|
|
137
|
-
for (var i = 0;i < thatSigBytes; i++) {
|
|
138
|
-
var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255;
|
|
139
|
-
thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8;
|
|
140
|
-
}
|
|
141
|
-
} else {
|
|
142
|
-
for (var j = 0;j < thatSigBytes; j += 4) {
|
|
143
|
-
thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2];
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
this.sigBytes += thatSigBytes;
|
|
147
|
-
return this;
|
|
148
|
-
},
|
|
149
|
-
clamp: function() {
|
|
150
|
-
var words = this.words;
|
|
151
|
-
var sigBytes = this.sigBytes;
|
|
152
|
-
words[sigBytes >>> 2] &= 4294967295 << 32 - sigBytes % 4 * 8;
|
|
153
|
-
words.length = Math2.ceil(sigBytes / 4);
|
|
154
|
-
},
|
|
155
|
-
clone: function() {
|
|
156
|
-
var clone = Base.clone.call(this);
|
|
157
|
-
clone.words = this.words.slice(0);
|
|
158
|
-
return clone;
|
|
159
|
-
},
|
|
160
|
-
random: function(nBytes) {
|
|
161
|
-
var words = [];
|
|
162
|
-
for (var i = 0;i < nBytes; i += 4) {
|
|
163
|
-
words.push(cryptoSecureRandomInt());
|
|
164
|
-
}
|
|
165
|
-
return new WordArray.init(words, nBytes);
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
var C_enc = C.enc = {};
|
|
169
|
-
var Hex = C_enc.Hex = {
|
|
170
|
-
stringify: function(wordArray) {
|
|
171
|
-
var words = wordArray.words;
|
|
172
|
-
var sigBytes = wordArray.sigBytes;
|
|
173
|
-
var hexChars = [];
|
|
174
|
-
for (var i = 0;i < sigBytes; i++) {
|
|
175
|
-
var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
|
|
176
|
-
hexChars.push((bite >>> 4).toString(16));
|
|
177
|
-
hexChars.push((bite & 15).toString(16));
|
|
178
|
-
}
|
|
179
|
-
return hexChars.join("");
|
|
180
|
-
},
|
|
181
|
-
parse: function(hexStr) {
|
|
182
|
-
var hexStrLength = hexStr.length;
|
|
183
|
-
var words = [];
|
|
184
|
-
for (var i = 0;i < hexStrLength; i += 2) {
|
|
185
|
-
words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4;
|
|
186
|
-
}
|
|
187
|
-
return new WordArray.init(words, hexStrLength / 2);
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
var Latin1 = C_enc.Latin1 = {
|
|
191
|
-
stringify: function(wordArray) {
|
|
192
|
-
var words = wordArray.words;
|
|
193
|
-
var sigBytes = wordArray.sigBytes;
|
|
194
|
-
var latin1Chars = [];
|
|
195
|
-
for (var i = 0;i < sigBytes; i++) {
|
|
196
|
-
var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
|
|
197
|
-
latin1Chars.push(String.fromCharCode(bite));
|
|
198
|
-
}
|
|
199
|
-
return latin1Chars.join("");
|
|
200
|
-
},
|
|
201
|
-
parse: function(latin1Str) {
|
|
202
|
-
var latin1StrLength = latin1Str.length;
|
|
203
|
-
var words = [];
|
|
204
|
-
for (var i = 0;i < latin1StrLength; i++) {
|
|
205
|
-
words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8;
|
|
206
|
-
}
|
|
207
|
-
return new WordArray.init(words, latin1StrLength);
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
var Utf8 = C_enc.Utf8 = {
|
|
211
|
-
stringify: function(wordArray) {
|
|
212
|
-
try {
|
|
213
|
-
return decodeURIComponent(escape(Latin1.stringify(wordArray)));
|
|
214
|
-
} catch (e) {
|
|
215
|
-
throw new Error("Malformed UTF-8 data");
|
|
216
|
-
}
|
|
217
|
-
},
|
|
218
|
-
parse: function(utf8Str) {
|
|
219
|
-
return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
|
|
220
|
-
}
|
|
221
|
-
};
|
|
222
|
-
var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
|
|
223
|
-
reset: function() {
|
|
224
|
-
this._data = new WordArray.init;
|
|
225
|
-
this._nDataBytes = 0;
|
|
226
|
-
},
|
|
227
|
-
_append: function(data) {
|
|
228
|
-
if (typeof data == "string") {
|
|
229
|
-
data = Utf8.parse(data);
|
|
230
|
-
}
|
|
231
|
-
this._data.concat(data);
|
|
232
|
-
this._nDataBytes += data.sigBytes;
|
|
233
|
-
},
|
|
234
|
-
_process: function(doFlush) {
|
|
235
|
-
var processedWords;
|
|
236
|
-
var data = this._data;
|
|
237
|
-
var dataWords = data.words;
|
|
238
|
-
var dataSigBytes = data.sigBytes;
|
|
239
|
-
var blockSize = this.blockSize;
|
|
240
|
-
var blockSizeBytes = blockSize * 4;
|
|
241
|
-
var nBlocksReady = dataSigBytes / blockSizeBytes;
|
|
242
|
-
if (doFlush) {
|
|
243
|
-
nBlocksReady = Math2.ceil(nBlocksReady);
|
|
244
|
-
} else {
|
|
245
|
-
nBlocksReady = Math2.max((nBlocksReady | 0) - this._minBufferSize, 0);
|
|
246
|
-
}
|
|
247
|
-
var nWordsReady = nBlocksReady * blockSize;
|
|
248
|
-
var nBytesReady = Math2.min(nWordsReady * 4, dataSigBytes);
|
|
249
|
-
if (nWordsReady) {
|
|
250
|
-
for (var offset = 0;offset < nWordsReady; offset += blockSize) {
|
|
251
|
-
this._doProcessBlock(dataWords, offset);
|
|
252
|
-
}
|
|
253
|
-
processedWords = dataWords.splice(0, nWordsReady);
|
|
254
|
-
data.sigBytes -= nBytesReady;
|
|
255
|
-
}
|
|
256
|
-
return new WordArray.init(processedWords, nBytesReady);
|
|
257
|
-
},
|
|
258
|
-
clone: function() {
|
|
259
|
-
var clone = Base.clone.call(this);
|
|
260
|
-
clone._data = this._data.clone();
|
|
261
|
-
return clone;
|
|
262
|
-
},
|
|
263
|
-
_minBufferSize: 0
|
|
264
|
-
});
|
|
265
|
-
var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({
|
|
266
|
-
cfg: Base.extend(),
|
|
267
|
-
init: function(cfg) {
|
|
268
|
-
this.cfg = this.cfg.extend(cfg);
|
|
269
|
-
this.reset();
|
|
270
|
-
},
|
|
271
|
-
reset: function() {
|
|
272
|
-
BufferedBlockAlgorithm.reset.call(this);
|
|
273
|
-
this._doReset();
|
|
274
|
-
},
|
|
275
|
-
update: function(messageUpdate) {
|
|
276
|
-
this._append(messageUpdate);
|
|
277
|
-
this._process();
|
|
278
|
-
return this;
|
|
279
|
-
},
|
|
280
|
-
finalize: function(messageUpdate) {
|
|
281
|
-
if (messageUpdate) {
|
|
282
|
-
this._append(messageUpdate);
|
|
283
|
-
}
|
|
284
|
-
var hash = this._doFinalize();
|
|
285
|
-
return hash;
|
|
286
|
-
},
|
|
287
|
-
blockSize: 512 / 32,
|
|
288
|
-
_createHelper: function(hasher) {
|
|
289
|
-
return function(message, cfg) {
|
|
290
|
-
return new hasher.init(cfg).finalize(message);
|
|
291
|
-
};
|
|
292
|
-
},
|
|
293
|
-
_createHmacHelper: function(hasher) {
|
|
294
|
-
return function(message, key) {
|
|
295
|
-
return new C_algo.HMAC.init(hasher, key).finalize(message);
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
var C_algo = C.algo = {};
|
|
300
|
-
return C;
|
|
301
|
-
}(Math);
|
|
302
|
-
return CryptoJS;
|
|
303
|
-
});
|
|
304
|
-
});
|
|
305
|
-
|
|
306
|
-
// node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/md5.js
|
|
307
|
-
var require_md5 = __commonJS((exports, module) => {
|
|
308
|
-
(function(root, factory) {
|
|
309
|
-
if (typeof exports === "object") {
|
|
310
|
-
module.exports = exports = factory(require_core());
|
|
311
|
-
} else if (typeof define === "function" && define.amd) {
|
|
312
|
-
define(["./core"], factory);
|
|
313
|
-
} else {
|
|
314
|
-
factory(root.CryptoJS);
|
|
315
|
-
}
|
|
316
|
-
})(exports, function(CryptoJS) {
|
|
317
|
-
(function(Math2) {
|
|
318
|
-
var C = CryptoJS;
|
|
319
|
-
var C_lib = C.lib;
|
|
320
|
-
var WordArray = C_lib.WordArray;
|
|
321
|
-
var Hasher = C_lib.Hasher;
|
|
322
|
-
var C_algo = C.algo;
|
|
323
|
-
var T = [];
|
|
324
|
-
(function() {
|
|
325
|
-
for (var i = 0;i < 64; i++) {
|
|
326
|
-
T[i] = Math2.abs(Math2.sin(i + 1)) * 4294967296 | 0;
|
|
327
|
-
}
|
|
328
|
-
})();
|
|
329
|
-
var MD5 = C_algo.MD5 = Hasher.extend({
|
|
330
|
-
_doReset: function() {
|
|
331
|
-
this._hash = new WordArray.init([
|
|
332
|
-
1732584193,
|
|
333
|
-
4023233417,
|
|
334
|
-
2562383102,
|
|
335
|
-
271733878
|
|
336
|
-
]);
|
|
337
|
-
},
|
|
338
|
-
_doProcessBlock: function(M, offset) {
|
|
339
|
-
for (var i = 0;i < 16; i++) {
|
|
340
|
-
var offset_i = offset + i;
|
|
341
|
-
var M_offset_i = M[offset_i];
|
|
342
|
-
M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360;
|
|
343
|
-
}
|
|
344
|
-
var H = this._hash.words;
|
|
345
|
-
var M_offset_0 = M[offset + 0];
|
|
346
|
-
var M_offset_1 = M[offset + 1];
|
|
347
|
-
var M_offset_2 = M[offset + 2];
|
|
348
|
-
var M_offset_3 = M[offset + 3];
|
|
349
|
-
var M_offset_4 = M[offset + 4];
|
|
350
|
-
var M_offset_5 = M[offset + 5];
|
|
351
|
-
var M_offset_6 = M[offset + 6];
|
|
352
|
-
var M_offset_7 = M[offset + 7];
|
|
353
|
-
var M_offset_8 = M[offset + 8];
|
|
354
|
-
var M_offset_9 = M[offset + 9];
|
|
355
|
-
var M_offset_10 = M[offset + 10];
|
|
356
|
-
var M_offset_11 = M[offset + 11];
|
|
357
|
-
var M_offset_12 = M[offset + 12];
|
|
358
|
-
var M_offset_13 = M[offset + 13];
|
|
359
|
-
var M_offset_14 = M[offset + 14];
|
|
360
|
-
var M_offset_15 = M[offset + 15];
|
|
361
|
-
var a = H[0];
|
|
362
|
-
var b = H[1];
|
|
363
|
-
var c = H[2];
|
|
364
|
-
var d = H[3];
|
|
365
|
-
a = FF(a, b, c, d, M_offset_0, 7, T[0]);
|
|
366
|
-
d = FF(d, a, b, c, M_offset_1, 12, T[1]);
|
|
367
|
-
c = FF(c, d, a, b, M_offset_2, 17, T[2]);
|
|
368
|
-
b = FF(b, c, d, a, M_offset_3, 22, T[3]);
|
|
369
|
-
a = FF(a, b, c, d, M_offset_4, 7, T[4]);
|
|
370
|
-
d = FF(d, a, b, c, M_offset_5, 12, T[5]);
|
|
371
|
-
c = FF(c, d, a, b, M_offset_6, 17, T[6]);
|
|
372
|
-
b = FF(b, c, d, a, M_offset_7, 22, T[7]);
|
|
373
|
-
a = FF(a, b, c, d, M_offset_8, 7, T[8]);
|
|
374
|
-
d = FF(d, a, b, c, M_offset_9, 12, T[9]);
|
|
375
|
-
c = FF(c, d, a, b, M_offset_10, 17, T[10]);
|
|
376
|
-
b = FF(b, c, d, a, M_offset_11, 22, T[11]);
|
|
377
|
-
a = FF(a, b, c, d, M_offset_12, 7, T[12]);
|
|
378
|
-
d = FF(d, a, b, c, M_offset_13, 12, T[13]);
|
|
379
|
-
c = FF(c, d, a, b, M_offset_14, 17, T[14]);
|
|
380
|
-
b = FF(b, c, d, a, M_offset_15, 22, T[15]);
|
|
381
|
-
a = GG(a, b, c, d, M_offset_1, 5, T[16]);
|
|
382
|
-
d = GG(d, a, b, c, M_offset_6, 9, T[17]);
|
|
383
|
-
c = GG(c, d, a, b, M_offset_11, 14, T[18]);
|
|
384
|
-
b = GG(b, c, d, a, M_offset_0, 20, T[19]);
|
|
385
|
-
a = GG(a, b, c, d, M_offset_5, 5, T[20]);
|
|
386
|
-
d = GG(d, a, b, c, M_offset_10, 9, T[21]);
|
|
387
|
-
c = GG(c, d, a, b, M_offset_15, 14, T[22]);
|
|
388
|
-
b = GG(b, c, d, a, M_offset_4, 20, T[23]);
|
|
389
|
-
a = GG(a, b, c, d, M_offset_9, 5, T[24]);
|
|
390
|
-
d = GG(d, a, b, c, M_offset_14, 9, T[25]);
|
|
391
|
-
c = GG(c, d, a, b, M_offset_3, 14, T[26]);
|
|
392
|
-
b = GG(b, c, d, a, M_offset_8, 20, T[27]);
|
|
393
|
-
a = GG(a, b, c, d, M_offset_13, 5, T[28]);
|
|
394
|
-
d = GG(d, a, b, c, M_offset_2, 9, T[29]);
|
|
395
|
-
c = GG(c, d, a, b, M_offset_7, 14, T[30]);
|
|
396
|
-
b = GG(b, c, d, a, M_offset_12, 20, T[31]);
|
|
397
|
-
a = HH(a, b, c, d, M_offset_5, 4, T[32]);
|
|
398
|
-
d = HH(d, a, b, c, M_offset_8, 11, T[33]);
|
|
399
|
-
c = HH(c, d, a, b, M_offset_11, 16, T[34]);
|
|
400
|
-
b = HH(b, c, d, a, M_offset_14, 23, T[35]);
|
|
401
|
-
a = HH(a, b, c, d, M_offset_1, 4, T[36]);
|
|
402
|
-
d = HH(d, a, b, c, M_offset_4, 11, T[37]);
|
|
403
|
-
c = HH(c, d, a, b, M_offset_7, 16, T[38]);
|
|
404
|
-
b = HH(b, c, d, a, M_offset_10, 23, T[39]);
|
|
405
|
-
a = HH(a, b, c, d, M_offset_13, 4, T[40]);
|
|
406
|
-
d = HH(d, a, b, c, M_offset_0, 11, T[41]);
|
|
407
|
-
c = HH(c, d, a, b, M_offset_3, 16, T[42]);
|
|
408
|
-
b = HH(b, c, d, a, M_offset_6, 23, T[43]);
|
|
409
|
-
a = HH(a, b, c, d, M_offset_9, 4, T[44]);
|
|
410
|
-
d = HH(d, a, b, c, M_offset_12, 11, T[45]);
|
|
411
|
-
c = HH(c, d, a, b, M_offset_15, 16, T[46]);
|
|
412
|
-
b = HH(b, c, d, a, M_offset_2, 23, T[47]);
|
|
413
|
-
a = II(a, b, c, d, M_offset_0, 6, T[48]);
|
|
414
|
-
d = II(d, a, b, c, M_offset_7, 10, T[49]);
|
|
415
|
-
c = II(c, d, a, b, M_offset_14, 15, T[50]);
|
|
416
|
-
b = II(b, c, d, a, M_offset_5, 21, T[51]);
|
|
417
|
-
a = II(a, b, c, d, M_offset_12, 6, T[52]);
|
|
418
|
-
d = II(d, a, b, c, M_offset_3, 10, T[53]);
|
|
419
|
-
c = II(c, d, a, b, M_offset_10, 15, T[54]);
|
|
420
|
-
b = II(b, c, d, a, M_offset_1, 21, T[55]);
|
|
421
|
-
a = II(a, b, c, d, M_offset_8, 6, T[56]);
|
|
422
|
-
d = II(d, a, b, c, M_offset_15, 10, T[57]);
|
|
423
|
-
c = II(c, d, a, b, M_offset_6, 15, T[58]);
|
|
424
|
-
b = II(b, c, d, a, M_offset_13, 21, T[59]);
|
|
425
|
-
a = II(a, b, c, d, M_offset_4, 6, T[60]);
|
|
426
|
-
d = II(d, a, b, c, M_offset_11, 10, T[61]);
|
|
427
|
-
c = II(c, d, a, b, M_offset_2, 15, T[62]);
|
|
428
|
-
b = II(b, c, d, a, M_offset_9, 21, T[63]);
|
|
429
|
-
H[0] = H[0] + a | 0;
|
|
430
|
-
H[1] = H[1] + b | 0;
|
|
431
|
-
H[2] = H[2] + c | 0;
|
|
432
|
-
H[3] = H[3] + d | 0;
|
|
433
|
-
},
|
|
434
|
-
_doFinalize: function() {
|
|
435
|
-
var data = this._data;
|
|
436
|
-
var dataWords = data.words;
|
|
437
|
-
var nBitsTotal = this._nDataBytes * 8;
|
|
438
|
-
var nBitsLeft = data.sigBytes * 8;
|
|
439
|
-
dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
|
|
440
|
-
var nBitsTotalH = Math2.floor(nBitsTotal / 4294967296);
|
|
441
|
-
var nBitsTotalL = nBitsTotal;
|
|
442
|
-
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = (nBitsTotalH << 8 | nBitsTotalH >>> 24) & 16711935 | (nBitsTotalH << 24 | nBitsTotalH >>> 8) & 4278255360;
|
|
443
|
-
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotalL << 8 | nBitsTotalL >>> 24) & 16711935 | (nBitsTotalL << 24 | nBitsTotalL >>> 8) & 4278255360;
|
|
444
|
-
data.sigBytes = (dataWords.length + 1) * 4;
|
|
445
|
-
this._process();
|
|
446
|
-
var hash = this._hash;
|
|
447
|
-
var H = hash.words;
|
|
448
|
-
for (var i = 0;i < 4; i++) {
|
|
449
|
-
var H_i = H[i];
|
|
450
|
-
H[i] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360;
|
|
451
|
-
}
|
|
452
|
-
return hash;
|
|
453
|
-
},
|
|
454
|
-
clone: function() {
|
|
455
|
-
var clone = Hasher.clone.call(this);
|
|
456
|
-
clone._hash = this._hash.clone();
|
|
457
|
-
return clone;
|
|
458
|
-
}
|
|
459
|
-
});
|
|
460
|
-
function FF(a, b, c, d, x, s, t) {
|
|
461
|
-
var n = a + (b & c | ~b & d) + x + t;
|
|
462
|
-
return (n << s | n >>> 32 - s) + b;
|
|
463
|
-
}
|
|
464
|
-
function GG(a, b, c, d, x, s, t) {
|
|
465
|
-
var n = a + (b & d | c & ~d) + x + t;
|
|
466
|
-
return (n << s | n >>> 32 - s) + b;
|
|
467
|
-
}
|
|
468
|
-
function HH(a, b, c, d, x, s, t) {
|
|
469
|
-
var n = a + (b ^ c ^ d) + x + t;
|
|
470
|
-
return (n << s | n >>> 32 - s) + b;
|
|
471
|
-
}
|
|
472
|
-
function II(a, b, c, d, x, s, t) {
|
|
473
|
-
var n = a + (c ^ (b | ~d)) + x + t;
|
|
474
|
-
return (n << s | n >>> 32 - s) + b;
|
|
475
|
-
}
|
|
476
|
-
C.MD5 = Hasher._createHelper(MD5);
|
|
477
|
-
C.HmacMD5 = Hasher._createHmacHelper(MD5);
|
|
478
|
-
})(Math);
|
|
479
|
-
return CryptoJS.MD5;
|
|
480
|
-
});
|
|
481
|
-
});
|
|
482
18
|
|
|
483
19
|
// node_modules/.pnpm/spark-md5@3.0.2/node_modules/spark-md5/spark-md5.js
|
|
484
20
|
var require_spark_md5 = __commonJS((exports, module) => {
|
|
@@ -910,7 +446,7 @@ var require_spark_md5 = __commonJS((exports, module) => {
|
|
|
910
446
|
});
|
|
911
447
|
});
|
|
912
448
|
|
|
913
|
-
// node_modules/.pnpm/@kevisual+query@0.0.
|
|
449
|
+
// node_modules/.pnpm/@kevisual+query@0.0.40/node_modules/@kevisual/query/dist/query-browser.js
|
|
914
450
|
var isTextForContentType = (contentType) => {
|
|
915
451
|
if (!contentType)
|
|
916
452
|
return false;
|
|
@@ -939,12 +475,12 @@ var adapter = async (opts = {}, overloadOpts) => {
|
|
|
939
475
|
url = new URL(opts.url);
|
|
940
476
|
} else {
|
|
941
477
|
origin = window?.location?.origin || "http://localhost:51515";
|
|
942
|
-
url = new URL(opts
|
|
478
|
+
url = new URL(opts?.url || "", origin);
|
|
943
479
|
}
|
|
944
480
|
const isGet = method === "GET";
|
|
945
481
|
const oldSearchParams = url.searchParams;
|
|
946
482
|
if (isGet) {
|
|
947
|
-
let searchParams = new URLSearchParams({ ...Object.fromEntries(oldSearchParams), ...opts
|
|
483
|
+
let searchParams = new URLSearchParams({ ...Object.fromEntries(oldSearchParams), ...opts?.params, ...opts?.body });
|
|
948
484
|
url.search = searchParams.toString();
|
|
949
485
|
} else {
|
|
950
486
|
const params = {
|
|
@@ -969,11 +505,13 @@ var adapter = async (opts = {}, overloadOpts) => {
|
|
|
969
505
|
} else if (isPostFile) {
|
|
970
506
|
body = opts.body;
|
|
971
507
|
} else {
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
508
|
+
if (opts.body && typeof opts.body === "object" && !(opts.body instanceof FormData)) {
|
|
509
|
+
headers = {
|
|
510
|
+
"Content-Type": "application/json",
|
|
511
|
+
...headers
|
|
512
|
+
};
|
|
513
|
+
body = JSON.stringify(opts.body);
|
|
514
|
+
}
|
|
977
515
|
}
|
|
978
516
|
return fetch(url, {
|
|
979
517
|
method: method.toUpperCase(),
|
|
@@ -1448,15 +986,14 @@ var posix = {
|
|
|
1448
986
|
posix.posix = posix;
|
|
1449
987
|
|
|
1450
988
|
// query/query-resources/utils.ts
|
|
1451
|
-
var import_md5 = __toESM(require_md5(), 1);
|
|
1452
989
|
var import_spark_md5 = __toESM(require_spark_md5(), 1);
|
|
1453
990
|
var hashContent = (str) => {
|
|
1454
991
|
if (typeof str === "string") {
|
|
1455
|
-
return
|
|
992
|
+
return import_spark_md5.default.hash(str);
|
|
1456
993
|
} else if (str instanceof Blob) {
|
|
1457
994
|
return hashBlob(str);
|
|
1458
995
|
} else if (Buffer.isBuffer(str)) {
|
|
1459
|
-
return
|
|
996
|
+
return import_spark_md5.default.hash(str.toString());
|
|
1460
997
|
}
|
|
1461
998
|
console.error("hashContent error: input must be a string, Blob, or Buffer");
|
|
1462
999
|
return "";
|
package/dist/query-secret.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// node_modules/.pnpm/@kevisual+query@0.0.
|
|
1
|
+
// node_modules/.pnpm/@kevisual+query@0.0.40/node_modules/@kevisual/query/dist/query-browser.js
|
|
2
2
|
var isTextForContentType = (contentType) => {
|
|
3
3
|
if (!contentType)
|
|
4
4
|
return false;
|
|
@@ -27,12 +27,12 @@ var adapter = async (opts = {}, overloadOpts) => {
|
|
|
27
27
|
url = new URL(opts.url);
|
|
28
28
|
} else {
|
|
29
29
|
origin = window?.location?.origin || "http://localhost:51515";
|
|
30
|
-
url = new URL(opts
|
|
30
|
+
url = new URL(opts?.url || "", origin);
|
|
31
31
|
}
|
|
32
32
|
const isGet = method === "GET";
|
|
33
33
|
const oldSearchParams = url.searchParams;
|
|
34
34
|
if (isGet) {
|
|
35
|
-
let searchParams = new URLSearchParams({ ...Object.fromEntries(oldSearchParams), ...opts
|
|
35
|
+
let searchParams = new URLSearchParams({ ...Object.fromEntries(oldSearchParams), ...opts?.params, ...opts?.body });
|
|
36
36
|
url.search = searchParams.toString();
|
|
37
37
|
} else {
|
|
38
38
|
const params = {
|
|
@@ -57,11 +57,13 @@ var adapter = async (opts = {}, overloadOpts) => {
|
|
|
57
57
|
} else if (isPostFile) {
|
|
58
58
|
body = opts.body;
|
|
59
59
|
} else {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
if (opts.body && typeof opts.body === "object" && !(opts.body instanceof FormData)) {
|
|
61
|
+
headers = {
|
|
62
|
+
"Content-Type": "application/json",
|
|
63
|
+
...headers
|
|
64
|
+
};
|
|
65
|
+
body = JSON.stringify(opts.body);
|
|
66
|
+
}
|
|
65
67
|
}
|
|
66
68
|
return fetch(url, {
|
|
67
69
|
method: method.toUpperCase(),
|
|
@@ -131,7 +133,7 @@ class Query {
|
|
|
131
133
|
"Content-Type": "application/json"
|
|
132
134
|
};
|
|
133
135
|
this.timeout = opts?.timeout || 60000 * 3;
|
|
134
|
-
if (opts
|
|
136
|
+
if (opts?.beforeRequest) {
|
|
135
137
|
this.beforeRequest = opts.beforeRequest;
|
|
136
138
|
} else {
|
|
137
139
|
this.beforeRequest = async (opts2) => {
|
package/dist/query-shop.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// node_modules/.pnpm/@kevisual+query@0.0.
|
|
1
|
+
// node_modules/.pnpm/@kevisual+query@0.0.40/node_modules/@kevisual/query/dist/query-browser.js
|
|
2
2
|
var isTextForContentType = (contentType) => {
|
|
3
3
|
if (!contentType)
|
|
4
4
|
return false;
|
|
@@ -27,12 +27,12 @@ var adapter = async (opts = {}, overloadOpts) => {
|
|
|
27
27
|
url = new URL(opts.url);
|
|
28
28
|
} else {
|
|
29
29
|
origin = window?.location?.origin || "http://localhost:51515";
|
|
30
|
-
url = new URL(opts
|
|
30
|
+
url = new URL(opts?.url || "", origin);
|
|
31
31
|
}
|
|
32
32
|
const isGet = method === "GET";
|
|
33
33
|
const oldSearchParams = url.searchParams;
|
|
34
34
|
if (isGet) {
|
|
35
|
-
let searchParams = new URLSearchParams({ ...Object.fromEntries(oldSearchParams), ...opts
|
|
35
|
+
let searchParams = new URLSearchParams({ ...Object.fromEntries(oldSearchParams), ...opts?.params, ...opts?.body });
|
|
36
36
|
url.search = searchParams.toString();
|
|
37
37
|
} else {
|
|
38
38
|
const params = {
|
|
@@ -57,11 +57,13 @@ var adapter = async (opts = {}, overloadOpts) => {
|
|
|
57
57
|
} else if (isPostFile) {
|
|
58
58
|
body = opts.body;
|
|
59
59
|
} else {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
if (opts.body && typeof opts.body === "object" && !(opts.body instanceof FormData)) {
|
|
61
|
+
headers = {
|
|
62
|
+
"Content-Type": "application/json",
|
|
63
|
+
...headers
|
|
64
|
+
};
|
|
65
|
+
body = JSON.stringify(opts.body);
|
|
66
|
+
}
|
|
65
67
|
}
|
|
66
68
|
return fetch(url, {
|
|
67
69
|
method: method.toUpperCase(),
|
|
@@ -131,7 +133,7 @@ class Query {
|
|
|
131
133
|
"Content-Type": "application/json"
|
|
132
134
|
};
|
|
133
135
|
this.timeout = opts?.timeout || 60000 * 3;
|
|
134
|
-
if (opts
|
|
136
|
+
if (opts?.beforeRequest) {
|
|
135
137
|
this.beforeRequest = opts.beforeRequest;
|
|
136
138
|
} else {
|
|
137
139
|
this.beforeRequest = async (opts2) => {
|
|
@@ -404,7 +406,7 @@ var shopDefine = QueryUtil.create({
|
|
|
404
406
|
}
|
|
405
407
|
});
|
|
406
408
|
|
|
407
|
-
// node_modules/.pnpm/@kevisual+query@0.0.
|
|
409
|
+
// node_modules/.pnpm/@kevisual+query@0.0.40/node_modules/@kevisual/query/dist/query.js
|
|
408
410
|
class BaseQuery {
|
|
409
411
|
query;
|
|
410
412
|
queryDefine;
|