@tonyclaw/llm-inspector 1.11.0 → 1.11.2
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/.output/nitro.json +1 -1
- package/.output/public/assets/index-BpKPXEcb.css +1 -0
- package/.output/public/assets/index-Chp_30CP.js +11 -0
- package/.output/public/assets/index-DLvqlFS9.js +130 -0
- package/.output/server/_libs/@radix-ui/react-use-controllable-state+[...].mjs +1 -1
- package/.output/server/_libs/ajv-formats.mjs +18 -18
- package/.output/server/_libs/ajv.mjs +941 -6305
- package/.output/server/_libs/cookie-es.mjs +7 -21
- package/.output/server/_libs/floating-ui__core.mjs +18 -17
- package/.output/server/_libs/floating-ui__dom.mjs +24 -20
- package/.output/server/_libs/floating-ui__react-dom.mjs +55 -28
- package/.output/server/_libs/floating-ui__utils.mjs +36 -36
- package/.output/server/_libs/h3-v2.mjs +20 -9
- package/.output/server/_libs/isbot.mjs +3 -2
- package/.output/server/_libs/json-schema-traverse.mjs +1 -90
- package/.output/server/_libs/jszip.mjs +28 -28
- package/.output/server/_libs/mdast-util-from-markdown.mjs +1 -1
- package/.output/server/_libs/pako.mjs +13 -13
- package/.output/server/_libs/property-information.mjs +13 -1
- package/.output/server/_libs/radix-ui__react-collection.mjs +1 -1
- package/.output/server/_libs/radix-ui__react-id.mjs +1 -1
- package/.output/server/_libs/react-dom.mjs +10 -10
- package/.output/server/_libs/react.mjs +44 -44
- package/.output/server/_libs/readable-stream.mjs +15 -15
- package/.output/server/_libs/rou3.mjs +1 -7
- package/.output/server/_libs/safe-buffer.mjs +3 -3
- package/.output/server/_libs/semver.mjs +10 -10
- package/.output/server/_libs/seroval-plugins.mjs +5 -5
- package/.output/server/_libs/seroval.mjs +606 -596
- package/.output/server/_libs/srvx.mjs +10 -245
- package/.output/server/_libs/swr.mjs +1 -1
- package/.output/server/_libs/tailwind-merge.mjs +286 -41
- package/.output/server/_libs/tanstack__history.mjs +31 -44
- package/.output/server/_libs/tanstack__react-router.mjs +780 -1089
- package/.output/server/_libs/tanstack__react-store.mjs +1 -1
- package/.output/server/_libs/tanstack__react-virtual.mjs +82 -7
- package/.output/server/_libs/tanstack__router-core.mjs +2223 -2328
- package/.output/server/_libs/tanstack__virtual-core.mjs +58 -17
- package/.output/server/_libs/ungap__structured-clone.mjs +14 -2
- package/.output/server/_libs/use-sync-external-store.mjs +1 -1
- package/.output/server/_libs/zod.mjs +503 -205
- package/.output/server/_ssr/empty-plugin-adapters-BFgPZ6_d.mjs +6 -0
- package/.output/server/_ssr/{index-I_Nx8QEB.mjs → index-CYuV1ljD.mjs} +8 -8
- package/.output/server/_ssr/index.mjs +1098 -776
- package/.output/server/_ssr/{router-BVxfVFsb.mjs → router-e-RbjELX.mjs} +4 -6
- package/.output/server/_tanstack-start-manifest_v-C5P5lsG5.mjs +4 -0
- package/.output/server/index.mjs +21 -21
- package/package.json +1 -1
- package/src/components/providers/ProvidersPanel.tsx +4 -2
- package/src/components/providers/SettingsDialog.tsx +2 -1
- package/src/proxy/dataDir.ts +1 -1
- package/.output/public/assets/index-BIZeMR5N.js +0 -105
- package/.output/public/assets/index-SmtLx1lM.css +0 -1
- package/.output/public/assets/main-QfbQ5oBP.js +0 -17
- package/.output/server/_libs/tiny-invariant.mjs +0 -12
- package/.output/server/_libs/tiny-warning.mjs +0 -5
- package/.output/server/_tanstack-start-manifest_v-Cm2Owszu.mjs +0 -4
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
function splitSetCookieString(cookiesString) {
|
|
2
|
-
if (Array.isArray(cookiesString))
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
if (typeof cookiesString !== "string") {
|
|
6
|
-
return [];
|
|
7
|
-
}
|
|
2
|
+
if (Array.isArray(cookiesString)) return cookiesString.flatMap((c) => splitSetCookieString(c));
|
|
3
|
+
if (typeof cookiesString !== "string") return [];
|
|
8
4
|
const cookiesStrings = [];
|
|
9
5
|
let pos = 0;
|
|
10
6
|
let start;
|
|
@@ -13,9 +9,7 @@ function splitSetCookieString(cookiesString) {
|
|
|
13
9
|
let nextStart;
|
|
14
10
|
let cookiesSeparatorFound;
|
|
15
11
|
const skipWhitespace = () => {
|
|
16
|
-
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos)))
|
|
17
|
-
pos += 1;
|
|
18
|
-
}
|
|
12
|
+
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) pos += 1;
|
|
19
13
|
return pos < cookiesString.length;
|
|
20
14
|
};
|
|
21
15
|
const notSpecialChar = () => {
|
|
@@ -32,24 +26,16 @@ function splitSetCookieString(cookiesString) {
|
|
|
32
26
|
pos += 1;
|
|
33
27
|
skipWhitespace();
|
|
34
28
|
nextStart = pos;
|
|
35
|
-
while (pos < cookiesString.length && notSpecialChar())
|
|
36
|
-
pos += 1;
|
|
37
|
-
}
|
|
29
|
+
while (pos < cookiesString.length && notSpecialChar()) pos += 1;
|
|
38
30
|
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
|
|
39
31
|
cookiesSeparatorFound = true;
|
|
40
32
|
pos = nextStart;
|
|
41
33
|
cookiesStrings.push(cookiesString.slice(start, lastComma));
|
|
42
34
|
start = pos;
|
|
43
|
-
} else
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
} else {
|
|
47
|
-
pos += 1;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
|
|
51
|
-
cookiesStrings.push(cookiesString.slice(start));
|
|
35
|
+
} else pos = lastComma + 1;
|
|
36
|
+
} else pos += 1;
|
|
52
37
|
}
|
|
38
|
+
if (!cookiesSeparatorFound || pos >= cookiesString.length) cookiesStrings.push(cookiesString.slice(start));
|
|
53
39
|
}
|
|
54
40
|
return cookiesStrings;
|
|
55
41
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getSideAxis, a as getAlignmentAxis, b as getSide, c as getAlignment, e as evaluate, d as getPaddingObject, r as rectToClientRect, f as
|
|
1
|
+
import { g as getSideAxis, a as getAlignmentAxis, b as getSide, c as getAlignment, e as evaluate, d as getPaddingObject, r as rectToClientRect, f as getAxisLength, h as clamp, i as getOppositePlacement, j as getExpandedPlacements, k as getOppositeAxisPlacements, l as getAlignmentSides, m as min, n as max, o as getOppositeAxis, s as sides } from "./floating-ui__utils.mjs";
|
|
2
2
|
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
3
3
|
let {
|
|
4
4
|
reference,
|
|
@@ -110,6 +110,7 @@ async function detectOverflow(state, options) {
|
|
|
110
110
|
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
+
const MAX_RESET_COUNT = 50;
|
|
113
114
|
const computePosition = async (reference, floating, config) => {
|
|
114
115
|
const {
|
|
115
116
|
placement = "bottom",
|
|
@@ -117,7 +118,10 @@ const computePosition = async (reference, floating, config) => {
|
|
|
117
118
|
middleware = [],
|
|
118
119
|
platform
|
|
119
120
|
} = config;
|
|
120
|
-
const
|
|
121
|
+
const platformWithDetectOverflow = platform.detectOverflow ? platform : {
|
|
122
|
+
...platform,
|
|
123
|
+
detectOverflow
|
|
124
|
+
};
|
|
121
125
|
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
122
126
|
let rects = await platform.getElementRects({
|
|
123
127
|
reference,
|
|
@@ -129,14 +133,17 @@ const computePosition = async (reference, floating, config) => {
|
|
|
129
133
|
y
|
|
130
134
|
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
131
135
|
let statefulPlacement = placement;
|
|
132
|
-
let middlewareData = {};
|
|
133
136
|
let resetCount = 0;
|
|
134
|
-
|
|
135
|
-
|
|
137
|
+
const middlewareData = {};
|
|
138
|
+
for (let i = 0; i < middleware.length; i++) {
|
|
139
|
+
const currentMiddleware = middleware[i];
|
|
140
|
+
if (!currentMiddleware) {
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
136
143
|
const {
|
|
137
144
|
name,
|
|
138
145
|
fn
|
|
139
|
-
} =
|
|
146
|
+
} = currentMiddleware;
|
|
140
147
|
const {
|
|
141
148
|
x: nextX,
|
|
142
149
|
y: nextY,
|
|
@@ -150,10 +157,7 @@ const computePosition = async (reference, floating, config) => {
|
|
|
150
157
|
strategy,
|
|
151
158
|
middlewareData,
|
|
152
159
|
rects,
|
|
153
|
-
platform:
|
|
154
|
-
...platform,
|
|
155
|
-
detectOverflow: (_platform$detectOverf = platform.detectOverflow) != null ? _platform$detectOverf : detectOverflow
|
|
156
|
-
},
|
|
160
|
+
platform: platformWithDetectOverflow,
|
|
157
161
|
elements: {
|
|
158
162
|
reference,
|
|
159
163
|
floating
|
|
@@ -161,14 +165,11 @@ const computePosition = async (reference, floating, config) => {
|
|
|
161
165
|
});
|
|
162
166
|
x = nextX != null ? nextX : x;
|
|
163
167
|
y = nextY != null ? nextY : y;
|
|
164
|
-
middlewareData = {
|
|
165
|
-
...middlewareData,
|
|
166
|
-
|
|
167
|
-
...middlewareData[name],
|
|
168
|
-
...data
|
|
169
|
-
}
|
|
168
|
+
middlewareData[name] = {
|
|
169
|
+
...middlewareData[name],
|
|
170
|
+
...data
|
|
170
171
|
};
|
|
171
|
-
if (reset && resetCount
|
|
172
|
+
if (reset && resetCount < MAX_RESET_COUNT) {
|
|
172
173
|
resetCount++;
|
|
173
174
|
if (typeof reset === "object") {
|
|
174
175
|
if (reset.placement) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as computePosition$1, o as offset$1, s as shift$1, f as flip$1, a as size$1, h as hide$1, b as arrow$1, l as limitShift$1 } from "./floating-ui__core.mjs";
|
|
2
|
-
import { p as isElement, q as getDocumentElement, t as getOverflowAncestors, u as getComputedStyle$1, v as isHTMLElement, w as createCoords, x as round, y as getWindow, z as isTopLayer, A as getParentNode, B as isLastTraversableNode, C as isTableElement, D as isContainingBlock, E as getContainingBlock,
|
|
2
|
+
import { p as isElement, q as getDocumentElement, t as getOverflowAncestors, u as getComputedStyle$1, v as isHTMLElement, w as createCoords, x as round, y as getWindow, z as isTopLayer, A as getParentNode, B as isLastTraversableNode, C as isTableElement, D as isContainingBlock, E as getContainingBlock, n as max, m as min, F as getNodeName, G as isOverflowElement, H as getNodeScroll, I as getFrameElement, r as rectToClientRect, J as floor, K as isWebKit } from "./floating-ui__utils.mjs";
|
|
3
3
|
function getCssDimensions(element) {
|
|
4
4
|
const css = getComputedStyle$1(element);
|
|
5
5
|
let width = parseFloat(css.width) || 0;
|
|
@@ -157,7 +157,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
157
157
|
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
158
158
|
scroll = getNodeScroll(offsetParent);
|
|
159
159
|
}
|
|
160
|
-
if (
|
|
160
|
+
if (isOffsetParentAnElement) {
|
|
161
161
|
const offsetRect = getBoundingClientRect(offsetParent);
|
|
162
162
|
scale = getScale(offsetParent);
|
|
163
163
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
@@ -231,7 +231,6 @@ function getViewportRect(element, strategy) {
|
|
|
231
231
|
y
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
|
-
const absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
235
234
|
function getInnerBoundingClientRect(element, strategy) {
|
|
236
235
|
const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
|
|
237
236
|
const top = clientRect.top + element.clientTop;
|
|
@@ -289,7 +288,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
289
288
|
if (!currentNodeIsContaining && computedStyle.position === "fixed") {
|
|
290
289
|
currentContainingBlockComputedStyle = null;
|
|
291
290
|
}
|
|
292
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle &&
|
|
291
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
293
292
|
if (shouldDropCurrentNode) {
|
|
294
293
|
result = result.filter((ancestor) => ancestor !== currentNode);
|
|
295
294
|
} else {
|
|
@@ -309,20 +308,23 @@ function getClippingRect(_ref) {
|
|
|
309
308
|
} = _ref;
|
|
310
309
|
const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
311
310
|
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
312
|
-
const
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
311
|
+
const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
|
|
312
|
+
let top = firstRect.top;
|
|
313
|
+
let right = firstRect.right;
|
|
314
|
+
let bottom = firstRect.bottom;
|
|
315
|
+
let left = firstRect.left;
|
|
316
|
+
for (let i = 1; i < clippingAncestors.length; i++) {
|
|
317
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
|
|
318
|
+
top = max(rect.top, top);
|
|
319
|
+
right = min(rect.right, right);
|
|
320
|
+
bottom = min(rect.bottom, bottom);
|
|
321
|
+
left = max(rect.left, left);
|
|
322
|
+
}
|
|
321
323
|
return {
|
|
322
|
-
width:
|
|
323
|
-
height:
|
|
324
|
-
x:
|
|
325
|
-
y:
|
|
324
|
+
width: right - left,
|
|
325
|
+
height: bottom - top,
|
|
326
|
+
x: left,
|
|
327
|
+
y: top
|
|
326
328
|
};
|
|
327
329
|
}
|
|
328
330
|
function getDimensions(element) {
|
|
@@ -531,7 +533,7 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
531
533
|
animationFrame = false
|
|
532
534
|
} = options;
|
|
533
535
|
const referenceEl = unwrapElement(reference);
|
|
534
|
-
const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : [];
|
|
536
|
+
const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
|
|
535
537
|
ancestors.forEach((ancestor) => {
|
|
536
538
|
ancestorScroll && ancestor.addEventListener("scroll", update, {
|
|
537
539
|
passive: true
|
|
@@ -544,7 +546,7 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
544
546
|
if (elementResize) {
|
|
545
547
|
resizeObserver = new ResizeObserver((_ref) => {
|
|
546
548
|
let [firstEntry] = _ref;
|
|
547
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
549
|
+
if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
|
|
548
550
|
resizeObserver.unobserve(floating);
|
|
549
551
|
cancelAnimationFrame(reobserveFrame);
|
|
550
552
|
reobserveFrame = requestAnimationFrame(() => {
|
|
@@ -557,7 +559,9 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
557
559
|
if (referenceEl && !animationFrame) {
|
|
558
560
|
resizeObserver.observe(referenceEl);
|
|
559
561
|
}
|
|
560
|
-
|
|
562
|
+
if (floating) {
|
|
563
|
+
resizeObserver.observe(floating);
|
|
564
|
+
}
|
|
561
565
|
}
|
|
562
566
|
let frameId;
|
|
563
567
|
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
@@ -252,34 +252,61 @@ const arrow$1 = (options) => {
|
|
|
252
252
|
}
|
|
253
253
|
};
|
|
254
254
|
};
|
|
255
|
-
const offset = (options, deps) =>
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
const
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
255
|
+
const offset = (options, deps) => {
|
|
256
|
+
const result = offset$1(options);
|
|
257
|
+
return {
|
|
258
|
+
name: result.name,
|
|
259
|
+
fn: result.fn,
|
|
260
|
+
options: [options, deps]
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
const shift = (options, deps) => {
|
|
264
|
+
const result = shift$1(options);
|
|
265
|
+
return {
|
|
266
|
+
name: result.name,
|
|
267
|
+
fn: result.fn,
|
|
268
|
+
options: [options, deps]
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
const limitShift = (options, deps) => {
|
|
272
|
+
const result = limitShift$1(options);
|
|
273
|
+
return {
|
|
274
|
+
fn: result.fn,
|
|
275
|
+
options: [options, deps]
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
const flip = (options, deps) => {
|
|
279
|
+
const result = flip$1(options);
|
|
280
|
+
return {
|
|
281
|
+
name: result.name,
|
|
282
|
+
fn: result.fn,
|
|
283
|
+
options: [options, deps]
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
const size = (options, deps) => {
|
|
287
|
+
const result = size$1(options);
|
|
288
|
+
return {
|
|
289
|
+
name: result.name,
|
|
290
|
+
fn: result.fn,
|
|
291
|
+
options: [options, deps]
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
const hide = (options, deps) => {
|
|
295
|
+
const result = hide$1(options);
|
|
296
|
+
return {
|
|
297
|
+
name: result.name,
|
|
298
|
+
fn: result.fn,
|
|
299
|
+
options: [options, deps]
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
const arrow = (options, deps) => {
|
|
303
|
+
const result = arrow$1(options);
|
|
304
|
+
return {
|
|
305
|
+
name: result.name,
|
|
306
|
+
fn: result.fn,
|
|
307
|
+
options: [options, deps]
|
|
308
|
+
};
|
|
309
|
+
};
|
|
283
310
|
export {
|
|
284
311
|
size as a,
|
|
285
312
|
arrow as b,
|
|
@@ -13,10 +13,6 @@ const oppositeSideMap = {
|
|
|
13
13
|
bottom: "top",
|
|
14
14
|
top: "bottom"
|
|
15
15
|
};
|
|
16
|
-
const oppositeAlignmentMap = {
|
|
17
|
-
start: "end",
|
|
18
|
-
end: "start"
|
|
19
|
-
};
|
|
20
16
|
function clamp(start, value, end) {
|
|
21
17
|
return max(start, min(value, end));
|
|
22
18
|
}
|
|
@@ -35,9 +31,9 @@ function getOppositeAxis(axis) {
|
|
|
35
31
|
function getAxisLength(axis) {
|
|
36
32
|
return axis === "y" ? "height" : "width";
|
|
37
33
|
}
|
|
38
|
-
const yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
39
34
|
function getSideAxis(placement) {
|
|
40
|
-
|
|
35
|
+
const firstChar = placement[0];
|
|
36
|
+
return firstChar === "t" || firstChar === "b" ? "y" : "x";
|
|
41
37
|
}
|
|
42
38
|
function getAlignmentAxis(placement) {
|
|
43
39
|
return getOppositeAxis(getSideAxis(placement));
|
|
@@ -60,7 +56,7 @@ function getExpandedPlacements(placement) {
|
|
|
60
56
|
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
61
57
|
}
|
|
62
58
|
function getOppositeAlignmentPlacement(placement) {
|
|
63
|
-
return placement.replace(
|
|
59
|
+
return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
|
|
64
60
|
}
|
|
65
61
|
const lrPlacement = ["left", "right"];
|
|
66
62
|
const rlPlacement = ["right", "left"];
|
|
@@ -91,7 +87,8 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
|
91
87
|
return list;
|
|
92
88
|
}
|
|
93
89
|
function getOppositePlacement(placement) {
|
|
94
|
-
|
|
90
|
+
const side = getSide(placement);
|
|
91
|
+
return oppositeSideMap[side] + placement.slice(side.length);
|
|
95
92
|
}
|
|
96
93
|
function expandPaddingObject(padding) {
|
|
97
94
|
return {
|
|
@@ -169,7 +166,6 @@ function isShadowRoot(value) {
|
|
|
169
166
|
}
|
|
170
167
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
171
168
|
}
|
|
172
|
-
const invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
173
169
|
function isOverflowElement(element) {
|
|
174
170
|
const {
|
|
175
171
|
overflow,
|
|
@@ -177,29 +173,31 @@ function isOverflowElement(element) {
|
|
|
177
173
|
overflowY,
|
|
178
174
|
display
|
|
179
175
|
} = getComputedStyle(element);
|
|
180
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) &&
|
|
176
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
|
|
181
177
|
}
|
|
182
|
-
const tableElements = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
183
178
|
function isTableElement(element) {
|
|
184
|
-
return
|
|
179
|
+
return /^(table|td|th)$/.test(getNodeName(element));
|
|
185
180
|
}
|
|
186
|
-
const topLayerSelectors = [":popover-open", ":modal"];
|
|
187
181
|
function isTopLayer(element) {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
return
|
|
191
|
-
} catch (_e) {
|
|
192
|
-
return false;
|
|
182
|
+
try {
|
|
183
|
+
if (element.matches(":popover-open")) {
|
|
184
|
+
return true;
|
|
193
185
|
}
|
|
194
|
-
})
|
|
186
|
+
} catch (_e) {
|
|
187
|
+
}
|
|
188
|
+
try {
|
|
189
|
+
return element.matches(":modal");
|
|
190
|
+
} catch (_e) {
|
|
191
|
+
return false;
|
|
192
|
+
}
|
|
195
193
|
}
|
|
196
|
-
const
|
|
197
|
-
const
|
|
198
|
-
const
|
|
194
|
+
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
195
|
+
const containRe = /paint|layout|strict|content/;
|
|
196
|
+
const isNotNone = (value) => !!value && value !== "none";
|
|
197
|
+
let isWebKitValue;
|
|
199
198
|
function isContainingBlock(elementOrCss) {
|
|
200
|
-
const webkit = isWebKit();
|
|
201
199
|
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
202
|
-
return
|
|
200
|
+
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
|
|
203
201
|
}
|
|
204
202
|
function getContainingBlock(element) {
|
|
205
203
|
let currentNode = getParentNode(element);
|
|
@@ -214,12 +212,13 @@ function getContainingBlock(element) {
|
|
|
214
212
|
return null;
|
|
215
213
|
}
|
|
216
214
|
function isWebKit() {
|
|
217
|
-
if (
|
|
218
|
-
|
|
215
|
+
if (isWebKitValue == null) {
|
|
216
|
+
isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
|
|
217
|
+
}
|
|
218
|
+
return isWebKitValue;
|
|
219
219
|
}
|
|
220
|
-
const lastTraversableNodeNames = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
221
220
|
function isLastTraversableNode(node) {
|
|
222
|
-
return
|
|
221
|
+
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
223
222
|
}
|
|
224
223
|
function getComputedStyle(element) {
|
|
225
224
|
return getWindow(element).getComputedStyle(element);
|
|
@@ -273,8 +272,9 @@ function getOverflowAncestors(node, list, traverseIframes) {
|
|
|
273
272
|
if (isBody) {
|
|
274
273
|
const frameElement = getFrameElement(win);
|
|
275
274
|
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
275
|
+
} else {
|
|
276
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
276
277
|
}
|
|
277
|
-
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
278
278
|
}
|
|
279
279
|
function getFrameElement(win) {
|
|
280
280
|
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
@@ -296,15 +296,15 @@ export {
|
|
|
296
296
|
getAlignment as c,
|
|
297
297
|
getPaddingObject as d,
|
|
298
298
|
evaluate as e,
|
|
299
|
-
|
|
299
|
+
getAxisLength as f,
|
|
300
300
|
getSideAxis as g,
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
301
|
+
clamp as h,
|
|
302
|
+
getOppositePlacement as i,
|
|
303
|
+
getExpandedPlacements as j,
|
|
304
|
+
getOppositeAxisPlacements as k,
|
|
305
|
+
getAlignmentSides as l,
|
|
306
306
|
min as m,
|
|
307
|
-
|
|
307
|
+
max as n,
|
|
308
308
|
getOppositeAxis as o,
|
|
309
309
|
isElement as p,
|
|
310
310
|
getDocumentElement as q,
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { N as NullProtoObj } from "./rou3.mjs";
|
|
2
|
+
import { F as FastURL, N as NodeResponse } from "./srvx.mjs";
|
|
3
|
+
function decodePathname(pathname) {
|
|
4
|
+
return decodeURI(pathname.includes("%25") ? pathname.replace(/%25/g, "%2525") : pathname);
|
|
5
|
+
}
|
|
3
6
|
const kEventNS = "h3.internal.event.";
|
|
4
7
|
const kEventRes = /* @__PURE__ */ Symbol.for(`${kEventNS}res`);
|
|
5
8
|
const kEventResHeaders = /* @__PURE__ */ Symbol.for(`${kEventNS}res.headers`);
|
|
9
|
+
const kEventResErrHeaders = /* @__PURE__ */ Symbol.for(`${kEventNS}res.err.headers`);
|
|
6
10
|
var H3Event = class {
|
|
7
11
|
app;
|
|
8
12
|
req;
|
|
@@ -14,7 +18,9 @@ var H3Event = class {
|
|
|
14
18
|
this.req = req;
|
|
15
19
|
this.app = app;
|
|
16
20
|
const _url = req._url;
|
|
17
|
-
|
|
21
|
+
const url = _url && _url instanceof URL ? _url : new FastURL(req.url);
|
|
22
|
+
if (url.pathname.includes("%")) url.pathname = decodePathname(url.pathname);
|
|
23
|
+
this.url = url;
|
|
18
24
|
}
|
|
19
25
|
get res() {
|
|
20
26
|
return this[kEventRes] ||= new H3EventResponse();
|
|
@@ -50,6 +56,9 @@ var H3EventResponse = class {
|
|
|
50
56
|
get headers() {
|
|
51
57
|
return this[kEventResHeaders] ||= new Headers();
|
|
52
58
|
}
|
|
59
|
+
get errHeaders() {
|
|
60
|
+
return this[kEventResErrHeaders] ||= new Headers();
|
|
61
|
+
}
|
|
53
62
|
};
|
|
54
63
|
const DISALLOWED_STATUS_CHARS = /[^\u0009\u0020-\u007E]/g;
|
|
55
64
|
function sanitizeStatusMessage(statusMessage = "") {
|
|
@@ -89,8 +98,8 @@ var HTTPError = class HTTPError2 extends Error {
|
|
|
89
98
|
messageInput = arg1;
|
|
90
99
|
details = arg2;
|
|
91
100
|
} else details = arg1;
|
|
92
|
-
const status = sanitizeStatusCode(details?.status || details?.
|
|
93
|
-
const statusText = sanitizeStatusMessage(details?.statusText || details?.
|
|
101
|
+
const status = sanitizeStatusCode(details?.status || details?.statusCode || details?.cause?.status || details?.cause?.statusCode, 500);
|
|
102
|
+
const statusText = sanitizeStatusMessage(details?.statusText || details?.statusMessage || details?.cause?.statusText || details?.cause?.statusMessage);
|
|
94
103
|
const message = messageInput || details?.message || details?.cause?.message || details?.statusText || details?.statusMessage || [
|
|
95
104
|
"HTTPError",
|
|
96
105
|
status,
|
|
@@ -176,7 +185,8 @@ function prepareResponse(val, event, config, nested) {
|
|
|
176
185
|
}
|
|
177
186
|
if (error.unhandled && !config.silent) console.error(error);
|
|
178
187
|
const { onError } = config;
|
|
179
|
-
|
|
188
|
+
const errHeaders = event[kEventRes]?.[kEventResErrHeaders];
|
|
189
|
+
return onError && !nested ? Promise.resolve(onError(error, event)).catch((error2) => error2).then((newVal) => prepareResponse(newVal ?? val, event, config, true)) : errorResponse(error, config.debug, errHeaders);
|
|
180
190
|
}
|
|
181
191
|
const preparedRes = event[kEventRes];
|
|
182
192
|
const preparedHeaders = preparedRes?.[kEventResHeaders];
|
|
@@ -259,17 +269,18 @@ function prepareResponseBody(val, event, config) {
|
|
|
259
269
|
function nullBody(method, status) {
|
|
260
270
|
return method === "HEAD" || status === 100 || status === 101 || status === 102 || status === 204 || status === 205 || status === 304;
|
|
261
271
|
}
|
|
262
|
-
function errorResponse(error, debug) {
|
|
272
|
+
function errorResponse(error, debug, errHeaders) {
|
|
273
|
+
let headers = error.headers ? mergeHeaders$1(jsonHeaders, error.headers) : new Headers(jsonHeaders);
|
|
274
|
+
if (errHeaders) headers = mergeHeaders$1(headers, errHeaders);
|
|
263
275
|
return new NodeResponse(JSON.stringify({
|
|
264
276
|
...error.toJSON(),
|
|
265
277
|
stack: debug && error.stack ? error.stack.split("\n").map((l) => l.trim()) : void 0
|
|
266
278
|
}, void 0, debug ? 2 : void 0), {
|
|
267
279
|
status: error.status,
|
|
268
280
|
statusText: error.statusText,
|
|
269
|
-
headers
|
|
281
|
+
headers
|
|
270
282
|
});
|
|
271
283
|
}
|
|
272
|
-
new TextEncoder();
|
|
273
284
|
export {
|
|
274
285
|
H3Event as H,
|
|
275
286
|
toResponse as t
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var fullPattern = " daum[ /]| deusu/|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<!
|
|
1
|
+
var fullPattern = " daum[ /]| deusu/|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<!cam)scan|24x7|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\b\\w+\\.ai|\\bcursor/|\\bmanus-user/|\\bort/|\\bperl\\b|\\bplaywright\\b|\\bsecurityheaders\\b|\\bselenium\\b|\\btime/|\\||^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[\\w\\-]+/[\\w]+$|^[^ ]{50,}$|^\\d+\\b|^\\W|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^\\w+/\\d\\.\\d\\s\\([\\w@]+\\)$|^active|^ad muncher|^amaya|^apache/|^avsdevicesdk/|^azure|^biglotron|^bot|^bw/|^clamav[ /]|^claude-code/|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\((?:compatible;)?(?:\\s?[\\w\\d-.]+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|advisor|agent\\b|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|exaleadcloudview|feed|fetcher|firephp|functionize|grab|headless|httrack|hubspot marketing grader|ibisbrowser|infrawatch|insight|inspect|iplabel|java(?!;)|library|linkcheck|mail\\.ru/|manager|measure|monitor\\b|neustar wpm|node\\b|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|xtate/";
|
|
2
2
|
var naivePattern = /bot|crawl|http|lighthouse|scan|search|spider/i;
|
|
3
3
|
var pattern;
|
|
4
4
|
function getPattern() {
|
|
@@ -12,8 +12,9 @@ function getPattern() {
|
|
|
12
12
|
}
|
|
13
13
|
return pattern;
|
|
14
14
|
}
|
|
15
|
+
var isNonEmptyString = (value) => typeof value === "string" && value !== "";
|
|
15
16
|
function isbot(userAgent) {
|
|
16
|
-
return
|
|
17
|
+
return isNonEmptyString(userAgent) && getPattern().test(userAgent);
|
|
17
18
|
}
|
|
18
19
|
export {
|
|
19
20
|
isbot as i
|