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

167 lines
5.8 KiB
JavaScript

/*
* Extracted from browser-delivered Turbopack chunk: fd0220e4d10052af.701bdafa2d.js
* Module id: 82114
* For reading/searching only; this factory depends on the original Turbopack runtime.
*/
const moduleFactory = (e, t, n) => {
!(function (t, n) {
if ("function" == typeof define && define.amd) {
let t;
void 0 !== (t = n()) && e.v(t);
} else n();
})(e.e, function () {
"use strict";
function n(e, t, n) {
var i = new XMLHttpRequest();
i.open("GET", e),
(i.responseType = "blob"),
(i.onload = function () {
s(i.response, t, n);
}),
(i.onerror = function () {
console.error("could not download file");
}),
i.send();
}
function i(e) {
var t = new XMLHttpRequest();
t.open("HEAD", e, !1);
try {
t.send();
} catch (e) {}
return 200 <= t.status && 299 >= t.status;
}
function r(e) {
try {
e.dispatchEvent(new MouseEvent("click"));
} catch (n) {
var t = document.createEvent("MouseEvents");
t.initMouseEvent(
"click",
!0,
!0,
window,
0,
0,
0,
80,
20,
!1,
!1,
!1,
!1,
0,
null,
),
e.dispatchEvent(t);
}
}
var a =
"object" == typeof window && window.window === window
? window
: "object" == typeof self && self.self === self
? self
: e.g.global === e.g
? e.g
: void 0,
o =
a.navigator &&
/Macintosh/.test(navigator.userAgent) &&
/AppleWebKit/.test(navigator.userAgent) &&
!/Safari/.test(navigator.userAgent),
s =
a.saveAs ||
("object" != typeof window || window !== a
? function () {}
: "download" in HTMLAnchorElement.prototype && !o
? function (e, t, o) {
var s = a.URL || a.webkitURL,
c = document.createElement("a");
(c.download = t = t || e.name || "download"),
(c.rel = "noopener"),
"string" == typeof e
? ((c.href = e),
c.origin === location.origin
? r(c)
: i(c.href)
? n(e, t, o)
: r(c, (c.target = "_blank")))
: ((c.href = s.createObjectURL(e)),
setTimeout(function () {
s.revokeObjectURL(c.href);
}, 4e4),
setTimeout(function () {
r(c);
}, 0));
}
: "msSaveOrOpenBlob" in navigator
? function (e, t, a) {
if (
((t = t || e.name || "download"), "string" != typeof e)
) {
var o;
navigator.msSaveOrOpenBlob(
(void 0 === (o = a)
? (o = { autoBom: !1 })
: "object" != typeof o &&
(console.warn(
"Deprecated: Expected third argument to be a object",
),
(o = { autoBom: !o })),
o.autoBom &&
/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(
e.type,
)
? new Blob(["\uFEFF", e], { type: e.type })
: e),
t,
);
} else if (i(e)) n(e, t, a);
else {
var s = document.createElement("a");
(s.href = e),
(s.target = "_blank"),
setTimeout(function () {
r(s);
});
}
}
: function (e, t, i, r) {
if (
((r = r || open("", "_blank")) &&
(r.document.title = r.document.body.innerText =
"downloading..."),
"string" == typeof e)
)
return n(e, t, i);
var s = "application/octet-stream" === e.type,
c = /constructor/i.test(a.HTMLElement) || a.safari,
l = /CriOS\/[\d]+/.test(navigator.userAgent);
if ((l || (s && c) || o) && "u" > typeof FileReader) {
var u = new FileReader();
(u.onloadend = function () {
var e = u.result;
(e = l
? e
: e.replace(/^data:[^;]*;/, "data:attachment/file;")),
r ? (r.location.href = e) : (location = e),
(r = null);
}),
u.readAsDataURL(e);
} else {
var h = a.URL || a.webkitURL,
f = h.createObjectURL(e);
r ? (r.location = f) : (location.href = f),
(r = null),
setTimeout(function () {
h.revokeObjectURL(f);
}, 4e4);
}
});
(a.saveAs = s.saveAs = s), (t.exports = s);
});
};
export default moduleFactory;