Your Name 1912bcd25b
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
chore: sync all remaining local workspace changes
2026-05-08 11:26:57 +08:00

146 lines
4.3 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: 2eebcf3bb0503188.1045ee8eb6.js
* Module id: 500318
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e, t, r) => {
"use strict";
(r.parse = function (e, t) {
if ("string" != typeof e)
throw TypeError("argument str must be a string");
var r = {},
n = e.length;
if (n < 2) return r;
var i = (t && t.decode) || f,
a = 0,
s = 0,
l = 0;
do {
if (-1 === (s = e.indexOf("=", a))) break;
if (-1 === (l = e.indexOf(";", a))) l = n;
else if (s > l) {
a = e.lastIndexOf(";", s - 1) + 1;
continue;
}
var d = c(e, a, s),
p = u(e, s, d),
h = e.slice(d, p);
if (!o.call(r, h)) {
var m = c(e, s + 1, l),
g = u(e, l, m);
34 === e.charCodeAt(m) && 34 === e.charCodeAt(g - 1) && (m++, g--);
var y = e.slice(m, g);
r[h] = (function (e, t) {
try {
return t(e);
} catch (t) {
return e;
}
})(y, i);
}
a = l + 1;
} while (a < n);
return r;
}),
(r.serialize = function (e, t, r) {
var o = (r && r.encode) || encodeURIComponent;
if ("function" != typeof o) throw TypeError("option encode is invalid");
if (!i.test(e)) throw TypeError("argument name is invalid");
var c = o(t);
if (!a.test(c)) throw TypeError("argument val is invalid");
var u = e + "=" + c;
if (!r) return u;
if (null != r.maxAge) {
var f = Math.floor(r.maxAge);
if (!isFinite(f)) throw TypeError("option maxAge is invalid");
u += "; Max-Age=" + f;
}
if (r.domain) {
if (!s.test(r.domain)) throw TypeError("option domain is invalid");
u += "; Domain=" + r.domain;
}
if (r.path) {
if (!l.test(r.path)) throw TypeError("option path is invalid");
u += "; Path=" + r.path;
}
if (r.expires) {
var d,
p = r.expires;
if (((d = p), "[object Date]" !== n.call(d) || isNaN(p.valueOf())))
throw TypeError("option expires is invalid");
u += "; Expires=" + p.toUTCString();
}
if (
(r.httpOnly && (u += "; HttpOnly"),
r.secure && (u += "; Secure"),
r.partitioned && (u += "; Partitioned"),
r.priority)
)
switch (
"string" == typeof r.priority
? r.priority.toLowerCase()
: r.priority
) {
case "low":
u += "; Priority=Low";
break;
case "medium":
u += "; Priority=Medium";
break;
case "high":
u += "; Priority=High";
break;
default:
throw TypeError("option priority is invalid");
}
if (r.sameSite)
switch (
"string" == typeof r.sameSite
? r.sameSite.toLowerCase()
: r.sameSite
) {
case !0:
case "strict":
u += "; SameSite=Strict";
break;
case "lax":
u += "; SameSite=Lax";
break;
case "none":
u += "; SameSite=None";
break;
default:
throw TypeError("option sameSite is invalid");
}
return u;
});
var n = Object.prototype.toString,
o = Object.prototype.hasOwnProperty,
i = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,
a =
/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,
s =
/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,
l = /^[\u0020-\u003A\u003D-\u007E]*$/;
function c(e, t, r) {
do {
var n = e.charCodeAt(t);
if (32 !== n && 9 !== n) return t;
} while (++t < r);
return r;
}
function u(e, t, r) {
for (; t > r; ) {
var n = e.charCodeAt(--t);
if (32 !== n && 9 !== n) return t + 1;
}
return r;
}
function f(e) {
return -1 !== e.indexOf("%") ? decodeURIComponent(e) : e;
}
};
export default moduleFactory;