@dracor/react 1.0.0-beta.1 → 1.0.0-beta.5
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.es.js +142 -145
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +8 -8
- package/dist/index.umd.js.map +1 -1
- package/package.json +41 -45
- package/src/dracor.css +8 -5
package/dist/index.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import _1, { useState as
|
|
1
|
+
import _1, { useState as E, useEffect as z, Fragment as c1, useRef as p1 } from "react";
|
|
2
2
|
import { Helmet as i1 } from "react-helmet-async";
|
|
3
3
|
import j1 from "swagger-ui-react";
|
|
4
4
|
import b1 from "react-markdown";
|
|
5
|
-
import { FontAwesomeIcon as
|
|
5
|
+
import { FontAwesomeIcon as y } from "@fortawesome/react-fontawesome";
|
|
6
6
|
import { faClipboard as w1, faLanguage as E1, faCaretDown as M1, faPenFancy as N1, faTheaterMasks as y1, faBook as k1 } from "@fortawesome/free-solid-svg-icons";
|
|
7
7
|
import { CopyToClipboard as Z1 } from "react-copy-to-clipboard";
|
|
8
8
|
import { Menu as o1, MenuButton as h1, Transition as d1, MenuItems as v1, MenuItem as m1 } from "@headlessui/react";
|
|
@@ -10,7 +10,7 @@ import { Link as I, useLocation as x1 } from "@tanstack/react-router";
|
|
|
10
10
|
import { faGithub as A1 } from "@fortawesome/free-brands-svg-icons";
|
|
11
11
|
import { useReactTable as T1, getFilteredRowModel as R1, getSortedRowModel as C1, getCoreRowModel as S1, flexRender as t1 } from "@tanstack/react-table";
|
|
12
12
|
import P1 from "CETEIcean";
|
|
13
|
-
var
|
|
13
|
+
var q = { exports: {} }, S = {};
|
|
14
14
|
/**
|
|
15
15
|
* @license React
|
|
16
16
|
* react-jsx-runtime.production.js
|
|
@@ -22,7 +22,7 @@ var V = { exports: {} }, z = {};
|
|
|
22
22
|
*/
|
|
23
23
|
var r1;
|
|
24
24
|
function H1() {
|
|
25
|
-
if (r1) return
|
|
25
|
+
if (r1) return S;
|
|
26
26
|
r1 = 1;
|
|
27
27
|
var s = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
|
|
28
28
|
function l(t, c, n) {
|
|
@@ -40,9 +40,9 @@ function H1() {
|
|
|
40
40
|
props: n
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
return
|
|
43
|
+
return S.Fragment = r, S.jsx = l, S.jsxs = l, S;
|
|
44
44
|
}
|
|
45
|
-
var
|
|
45
|
+
var P = {};
|
|
46
46
|
/**
|
|
47
47
|
* @license React
|
|
48
48
|
* react-jsx-runtime.development.js
|
|
@@ -54,24 +54,24 @@ var O = {};
|
|
|
54
54
|
*/
|
|
55
55
|
var l1;
|
|
56
56
|
function z1() {
|
|
57
|
-
return l1 || (l1 = 1, process.env.NODE_ENV !== "production" && function() {
|
|
57
|
+
return l1 || (l1 = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
58
58
|
function s(a) {
|
|
59
59
|
if (a == null) return null;
|
|
60
60
|
if (typeof a == "function")
|
|
61
|
-
return a.$$typeof ===
|
|
61
|
+
return a.$$typeof === L ? null : a.displayName || a.name || null;
|
|
62
62
|
if (typeof a == "string") return a;
|
|
63
63
|
switch (a) {
|
|
64
|
-
case
|
|
64
|
+
case A:
|
|
65
65
|
return "Fragment";
|
|
66
|
-
case B:
|
|
67
|
-
return "Profiler";
|
|
68
66
|
case D:
|
|
67
|
+
return "Profiler";
|
|
68
|
+
case F:
|
|
69
69
|
return "StrictMode";
|
|
70
70
|
case Y:
|
|
71
71
|
return "Suspense";
|
|
72
|
-
case W:
|
|
73
|
-
return "SuspenseList";
|
|
74
72
|
case T:
|
|
73
|
+
return "SuspenseList";
|
|
74
|
+
case $:
|
|
75
75
|
return "Activity";
|
|
76
76
|
}
|
|
77
77
|
if (typeof a == "object")
|
|
@@ -80,16 +80,16 @@ function z1() {
|
|
|
80
80
|
), a.$$typeof) {
|
|
81
81
|
case b:
|
|
82
82
|
return "Portal";
|
|
83
|
-
case
|
|
83
|
+
case X:
|
|
84
84
|
return (a.displayName || "Context") + ".Provider";
|
|
85
|
-
case
|
|
85
|
+
case M:
|
|
86
86
|
return (a._context.displayName || "Context") + ".Consumer";
|
|
87
|
-
case
|
|
87
|
+
case B:
|
|
88
88
|
var i = a.render;
|
|
89
89
|
return a = a.displayName, a || (a = i.displayName || i.name || "", a = a !== "" ? "ForwardRef(" + a + ")" : "ForwardRef"), a;
|
|
90
|
-
case
|
|
90
|
+
case O:
|
|
91
91
|
return i = a.displayName || null, i !== null ? i : s(a.type) || "Memo";
|
|
92
|
-
case
|
|
92
|
+
case R:
|
|
93
93
|
i = a._payload, a = a._init;
|
|
94
94
|
try {
|
|
95
95
|
return s(a(i));
|
|
@@ -110,17 +110,17 @@ function z1() {
|
|
|
110
110
|
}
|
|
111
111
|
if (i) {
|
|
112
112
|
i = console;
|
|
113
|
-
var v = i.error,
|
|
113
|
+
var v = i.error, u = typeof Symbol == "function" && Symbol.toStringTag && a[Symbol.toStringTag] || a.constructor.name || "Object";
|
|
114
114
|
return v.call(
|
|
115
115
|
i,
|
|
116
116
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
117
|
-
|
|
117
|
+
u
|
|
118
118
|
), r(a);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
function t(a) {
|
|
122
|
-
if (a ===
|
|
123
|
-
if (typeof a == "object" && a !== null && a.$$typeof ===
|
|
122
|
+
if (a === A) return "<>";
|
|
123
|
+
if (typeof a == "object" && a !== null && a.$$typeof === R)
|
|
124
124
|
return "<...>";
|
|
125
125
|
try {
|
|
126
126
|
var i = s(a);
|
|
@@ -130,14 +130,14 @@ function z1() {
|
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
function c() {
|
|
133
|
-
var a =
|
|
133
|
+
var a = N.A;
|
|
134
134
|
return a === null ? null : a.getOwner();
|
|
135
135
|
}
|
|
136
136
|
function n() {
|
|
137
137
|
return Error("react-stack-top-frame");
|
|
138
138
|
}
|
|
139
139
|
function o(a) {
|
|
140
|
-
if (
|
|
140
|
+
if (k.call(a, "key")) {
|
|
141
141
|
var i = Object.getOwnPropertyDescriptor(a, "key").get;
|
|
142
142
|
if (i && i.isReactWarning) return !1;
|
|
143
143
|
}
|
|
@@ -155,22 +155,22 @@ function z1() {
|
|
|
155
155
|
configurable: !0
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function _() {
|
|
159
159
|
var a = s(this.type);
|
|
160
160
|
return K[a] || (K[a] = !0, console.error(
|
|
161
161
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
162
162
|
)), a = this.props.ref, a !== void 0 ? a : null;
|
|
163
163
|
}
|
|
164
|
-
function h(a, i, v,
|
|
164
|
+
function h(a, i, v, u, w, j, G, U) {
|
|
165
165
|
return v = j.ref, a = {
|
|
166
166
|
$$typeof: x,
|
|
167
167
|
type: a,
|
|
168
168
|
key: i,
|
|
169
169
|
props: j,
|
|
170
|
-
_owner:
|
|
170
|
+
_owner: w
|
|
171
171
|
}, (v !== void 0 ? v : null) !== null ? Object.defineProperty(a, "ref", {
|
|
172
172
|
enumerable: !1,
|
|
173
|
-
get:
|
|
173
|
+
get: _
|
|
174
174
|
}) : Object.defineProperty(a, "ref", { enumerable: !1, value: null }), a._store = {}, Object.defineProperty(a._store, "validated", {
|
|
175
175
|
configurable: !1,
|
|
176
176
|
enumerable: !1,
|
|
@@ -193,101 +193,101 @@ function z1() {
|
|
|
193
193
|
value: U
|
|
194
194
|
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
195
195
|
}
|
|
196
|
-
function d(a, i, v,
|
|
197
|
-
var
|
|
198
|
-
if (
|
|
199
|
-
if (
|
|
200
|
-
if (
|
|
201
|
-
for (
|
|
202
|
-
|
|
203
|
-
Object.freeze && Object.freeze(
|
|
196
|
+
function d(a, i, v, u, w, j, G, U) {
|
|
197
|
+
var g = i.children;
|
|
198
|
+
if (g !== void 0)
|
|
199
|
+
if (u)
|
|
200
|
+
if (C(g)) {
|
|
201
|
+
for (u = 0; u < g.length; u++)
|
|
202
|
+
f(g[u]);
|
|
203
|
+
Object.freeze && Object.freeze(g);
|
|
204
204
|
} else
|
|
205
205
|
console.error(
|
|
206
206
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
207
207
|
);
|
|
208
|
-
else
|
|
209
|
-
if (
|
|
210
|
-
|
|
211
|
-
var
|
|
208
|
+
else f(g);
|
|
209
|
+
if (k.call(i, "key")) {
|
|
210
|
+
g = s(a);
|
|
211
|
+
var Z = Object.keys(i).filter(function(g1) {
|
|
212
212
|
return g1 !== "key";
|
|
213
213
|
});
|
|
214
|
-
|
|
214
|
+
u = 0 < Z.length ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}", s1[g + u] || (Z = 0 < Z.length ? "{" + Z.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
215
215
|
`A props object containing a "key" prop is being spread into JSX:
|
|
216
216
|
let props = %s;
|
|
217
217
|
<%s {...props} />
|
|
218
218
|
React keys must be passed directly to JSX without using spread:
|
|
219
219
|
let props = %s;
|
|
220
220
|
<%s key={someKey} {...props} />`,
|
|
221
|
+
u,
|
|
221
222
|
g,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
), s1[_ + g] = !0);
|
|
223
|
+
Z,
|
|
224
|
+
g
|
|
225
|
+
), s1[g + u] = !0);
|
|
226
226
|
}
|
|
227
|
-
if (
|
|
227
|
+
if (g = null, v !== void 0 && (l(v), g = "" + v), o(i) && (l(i.key), g = "" + i.key), "key" in i) {
|
|
228
228
|
v = {};
|
|
229
229
|
for (var J in i)
|
|
230
230
|
J !== "key" && (v[J] = i[J]);
|
|
231
231
|
} else v = i;
|
|
232
|
-
return
|
|
232
|
+
return g && m(
|
|
233
233
|
v,
|
|
234
234
|
typeof a == "function" ? a.displayName || a.name || "Unknown" : a
|
|
235
235
|
), h(
|
|
236
236
|
a,
|
|
237
|
-
|
|
237
|
+
g,
|
|
238
238
|
j,
|
|
239
|
-
|
|
239
|
+
w,
|
|
240
240
|
c(),
|
|
241
241
|
v,
|
|
242
242
|
G,
|
|
243
243
|
U
|
|
244
244
|
);
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function f(a) {
|
|
247
247
|
typeof a == "object" && a !== null && a.$$typeof === x && a._store && (a._store.validated = 1);
|
|
248
248
|
}
|
|
249
|
-
var p = _1, x = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"),
|
|
249
|
+
var p = _1, x = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"), A = Symbol.for("react.fragment"), F = Symbol.for("react.strict_mode"), D = Symbol.for("react.profiler"), M = Symbol.for("react.consumer"), X = Symbol.for("react.context"), B = Symbol.for("react.forward_ref"), Y = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), $ = Symbol.for("react.activity"), L = Symbol.for("react.client.reference"), N = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, k = Object.prototype.hasOwnProperty, C = Array.isArray, W = console.createTask ? console.createTask : function() {
|
|
250
250
|
return null;
|
|
251
251
|
};
|
|
252
252
|
p = {
|
|
253
|
-
|
|
253
|
+
react_stack_bottom_frame: function(a) {
|
|
254
254
|
return a();
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
|
-
var Q, K = {}, e1 = p
|
|
257
|
+
var Q, K = {}, e1 = p.react_stack_bottom_frame.bind(
|
|
258
258
|
p,
|
|
259
259
|
n
|
|
260
|
-
)(), a1 =
|
|
261
|
-
|
|
262
|
-
var j = 1e4 >
|
|
260
|
+
)(), a1 = W(t(n)), s1 = {};
|
|
261
|
+
P.Fragment = A, P.jsx = function(a, i, v, u, w) {
|
|
262
|
+
var j = 1e4 > N.recentlyCreatedOwnerStacks++;
|
|
263
263
|
return d(
|
|
264
264
|
a,
|
|
265
265
|
i,
|
|
266
266
|
v,
|
|
267
267
|
!1,
|
|
268
|
-
|
|
269
|
-
|
|
268
|
+
u,
|
|
269
|
+
w,
|
|
270
270
|
j ? Error("react-stack-top-frame") : e1,
|
|
271
|
-
j ?
|
|
271
|
+
j ? W(t(a)) : a1
|
|
272
272
|
);
|
|
273
|
-
},
|
|
274
|
-
var j = 1e4 >
|
|
273
|
+
}, P.jsxs = function(a, i, v, u, w) {
|
|
274
|
+
var j = 1e4 > N.recentlyCreatedOwnerStacks++;
|
|
275
275
|
return d(
|
|
276
276
|
a,
|
|
277
277
|
i,
|
|
278
278
|
v,
|
|
279
279
|
!0,
|
|
280
|
-
|
|
281
|
-
|
|
280
|
+
u,
|
|
281
|
+
w,
|
|
282
282
|
j ? Error("react-stack-top-frame") : e1,
|
|
283
|
-
j ?
|
|
283
|
+
j ? W(t(a)) : a1
|
|
284
284
|
);
|
|
285
285
|
};
|
|
286
|
-
}()),
|
|
286
|
+
})()), P;
|
|
287
287
|
}
|
|
288
288
|
var n1;
|
|
289
289
|
function O1() {
|
|
290
|
-
return n1 || (n1 = 1, process.env.NODE_ENV === "production" ?
|
|
290
|
+
return n1 || (n1 = 1, process.env.NODE_ENV === "production" ? q.exports = H1() : q.exports = z1()), q.exports;
|
|
291
291
|
}
|
|
292
292
|
var e = O1();
|
|
293
293
|
function _0({ url: s, title: r }) {
|
|
@@ -329,28 +329,28 @@ const $1 = [
|
|
|
329
329
|
];
|
|
330
330
|
function f1({ showLabel: s, children: r, className: l }) {
|
|
331
331
|
let t = "inline-flex bg-white bg-no-repeat bg-[5px] rounded-sm px-1.5 gap-1 align-text-bottom", c;
|
|
332
|
-
const n = $1.find(({ pattern: h, url: d, schema:
|
|
332
|
+
const n = $1.find(({ pattern: h, url: d, schema: f }) => {
|
|
333
333
|
const p = new RegExp(
|
|
334
|
-
`^(?:${h || d}/|${
|
|
334
|
+
`^(?:${h || d}/|${f}:)([a-z\\d]+)$`,
|
|
335
335
|
"i"
|
|
336
336
|
), x = r.match(p);
|
|
337
337
|
return x ? (c = x[1], !0) : !1;
|
|
338
338
|
});
|
|
339
339
|
if (!n)
|
|
340
340
|
return /* @__PURE__ */ e.jsx("span", { className: t, children: r });
|
|
341
|
-
const { url: o, label: m, classes:
|
|
342
|
-
return t += ` ${
|
|
341
|
+
const { url: o, label: m, classes: _ = "" } = n;
|
|
342
|
+
return t += ` ${_}`, /* @__PURE__ */ e.jsxs("span", { className: t, children: [
|
|
343
343
|
s && `${m}: `,
|
|
344
344
|
/* @__PURE__ */ e.jsx("a", { className: l, href: `${o}/${c}`, title: m, children: c })
|
|
345
345
|
] });
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function H(s, r = 0) {
|
|
348
348
|
if (s === null)
|
|
349
349
|
return "";
|
|
350
350
|
const l = parseInt(s, 10);
|
|
351
351
|
return l < 0 ? `${l * -1} BCE` : l < r ? `${l} CE` : String(l);
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function V(s, r = "en-GB") {
|
|
354
354
|
const l = `${s}`;
|
|
355
355
|
if (l.match("^-[0-9]{4}/-[0-9]{4}$")) {
|
|
356
356
|
const t = l.split("/").map((c) => parseInt(c, 10) * -1);
|
|
@@ -358,7 +358,7 @@ function F(s, r = "en-GB") {
|
|
|
358
358
|
}
|
|
359
359
|
if (l.match("^-?[0-9]{4}/-?[0-9]{4}$")) {
|
|
360
360
|
const t = l.split("/");
|
|
361
|
-
return `${
|
|
361
|
+
return `${H(t[0])}-${H(t[1], 1e3)}`;
|
|
362
362
|
}
|
|
363
363
|
if (l.match("^[0-9]{4}-[0-9]{2}$"))
|
|
364
364
|
return new Date(l).toLocaleDateString(r, { month: "long", year: "numeric" });
|
|
@@ -370,15 +370,15 @@ function F(s, r = "en-GB") {
|
|
|
370
370
|
});
|
|
371
371
|
if (l.match("^>-?[0-9]{4}")) {
|
|
372
372
|
const t = l.substring(1);
|
|
373
|
-
return `after ${
|
|
373
|
+
return `after ${H(t, 1e3)}`;
|
|
374
374
|
}
|
|
375
375
|
if (l.match("^<-?[0-9]{4}")) {
|
|
376
376
|
const t = l.substring(1);
|
|
377
|
-
return `before ${
|
|
377
|
+
return `before ${H(t, 1e3)}`;
|
|
378
378
|
}
|
|
379
|
-
return l.match("^-?[0-9]{4}") ?
|
|
379
|
+
return l.match("^-?[0-9]{4}") ? H(l, 1e3) : l;
|
|
380
380
|
}
|
|
381
|
-
const
|
|
381
|
+
const L1 = "https://query.wikidata.org/sparql", q1 = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' width='102' height='137' viewBox='-305 -516 610 820'%3E%3Ctitle%3EWikimedia Commons Logo%3C/title%3E%3Cdefs%3E%3CclipPath id='c'%3E%3Ccircle r='298'/%3E%3C/clipPath%3E%3C/defs%3E%3Ccircle r='100' fill='%23900'/%3E%3Cg fill='%23069'%3E%3Cg id='arrow' clip-path='url(%23c)'%3E%3Cpath d='m-11 180v118h22v-118'/%3E%3Cpath d='m-43 185l43-75 43 75'/%3E%3C/g%3E%3Cg id='arrows3'%3E%3Cuse xlink:href='%23arrow' transform='rotate(45)'/%3E%3Cuse xlink:href='%23arrow' transform='rotate(90)'/%3E%3Cuse xlink:href='%23arrow' transform='rotate(135)'/%3E%3C/g%3E%3Cuse xlink:href='%23arrows3' transform='scale(-1 1)'/%3E%3Cpath id='blue_path' transform='rotate(-45)' stroke='%23069' stroke-width='84' fill='none' d='M 0,-256 A 256 256 0 1 0 256,0 C 256,-100 155,-150 250,-275'/%3E%3Cpath id='arrow_top' d='m-23-515s-36 135-80 185 116-62 170-5-90-180-90-180z'/%3E%3C/g%3E%3C/svg%3E";
|
|
382
382
|
function p0({
|
|
383
383
|
wikidataId: s,
|
|
384
384
|
name: r,
|
|
@@ -386,14 +386,13 @@ function p0({
|
|
|
386
386
|
deathLabel: t = "d.",
|
|
387
387
|
unknownLabel: c = "unknown"
|
|
388
388
|
}) {
|
|
389
|
-
const [n, o] =
|
|
390
|
-
|
|
389
|
+
const [n, o] = E(null);
|
|
390
|
+
z(() => {
|
|
391
391
|
function p(b) {
|
|
392
|
-
return b.startsWith("http://www.wikidata.org/.well-known/genid") ? c :
|
|
392
|
+
return b.startsWith("http://www.wikidata.org/.well-known/genid") ? c : V(b.replace(/^(-?\d{4}).*$/, "$1"));
|
|
393
393
|
}
|
|
394
394
|
async function x(b) {
|
|
395
|
-
|
|
396
|
-
const P = `
|
|
395
|
+
const A = `
|
|
397
396
|
SELECT ?author ?authorLabel ?birthDate ?deathDate ?gender ?genderLabel
|
|
398
397
|
?birthPlace ?birthPlaceLabel ?birthCoord
|
|
399
398
|
?deathPlace ?deathPlaceLabel ?deathCoord
|
|
@@ -410,36 +409,36 @@ WHERE {
|
|
|
410
409
|
OPTIONAL { ?author wdt:P227 ?gnd. }
|
|
411
410
|
SERVICE wikibase:label { bd:serviceParam wikibase:language "de,en". }
|
|
412
411
|
}
|
|
413
|
-
`,
|
|
412
|
+
`, F = `${L1}?query=${encodeURIComponent(A)}`, D = {
|
|
414
413
|
method: "GET",
|
|
415
414
|
headers: {
|
|
416
415
|
Accept: "application/json"
|
|
417
416
|
}
|
|
418
417
|
};
|
|
419
418
|
try {
|
|
420
|
-
const
|
|
421
|
-
if (
|
|
422
|
-
console.log(
|
|
419
|
+
const M = await fetch(F, D);
|
|
420
|
+
if (M.status !== 200) {
|
|
421
|
+
console.log(M.status);
|
|
423
422
|
return;
|
|
424
423
|
}
|
|
425
|
-
const
|
|
426
|
-
authorLabel:
|
|
427
|
-
img:
|
|
428
|
-
birthDate:
|
|
429
|
-
birthPlaceLabel:
|
|
430
|
-
deathDate:
|
|
431
|
-
deathPlaceLabel:
|
|
432
|
-
} =
|
|
433
|
-
|
|
434
|
-
const
|
|
435
|
-
|
|
436
|
-
} catch (
|
|
437
|
-
console.log(
|
|
424
|
+
const B = (await M.json()).results?.bindings || [], {
|
|
425
|
+
authorLabel: Y,
|
|
426
|
+
img: T,
|
|
427
|
+
birthDate: O,
|
|
428
|
+
birthPlaceLabel: R,
|
|
429
|
+
deathDate: $,
|
|
430
|
+
deathPlaceLabel: L
|
|
431
|
+
} = B[0], N = [], k = [];
|
|
432
|
+
O?.value && N.push(p(O.value)), R?.value && N.push(R.value), $?.value && k.push(p($.value)), L?.value && k.push(L.value);
|
|
433
|
+
const C = { name: Y.value, birth: N, death: k };
|
|
434
|
+
T?.value && (C.imageUrl = T.value.replace(/^http:/, "https:"), C.commonsPage = T.value.replace(/Special:FilePath\//, "File:").replace(/^http:/, "https:")), o(C);
|
|
435
|
+
} catch (M) {
|
|
436
|
+
console.log(M);
|
|
438
437
|
}
|
|
439
438
|
}
|
|
440
439
|
s && x(s);
|
|
441
440
|
}, [s, c]);
|
|
442
|
-
const { name: m, imageUrl:
|
|
441
|
+
const { name: m, imageUrl: _, commonsPage: h, birth: d = [], death: f = [] } = n || {};
|
|
443
442
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex whitespace-nowrap", children: [
|
|
444
443
|
/* @__PURE__ */ e.jsxs(
|
|
445
444
|
"div",
|
|
@@ -447,10 +446,10 @@ WHERE {
|
|
|
447
446
|
className: "relative w-[5em] h-[6em] overflow-hidden bg-(image:--img-author) bg-no-repeat bg-center bg-primary rounded-md border-2 border-primary mr-4",
|
|
448
447
|
style: { backgroundSize: "70%" },
|
|
449
448
|
children: [
|
|
450
|
-
|
|
449
|
+
_ && /* @__PURE__ */ e.jsx(
|
|
451
450
|
"img",
|
|
452
451
|
{
|
|
453
|
-
src:
|
|
452
|
+
src: _,
|
|
454
453
|
title: m,
|
|
455
454
|
alt: "",
|
|
456
455
|
className: "object-cover object-top w-full h-full"
|
|
@@ -465,7 +464,7 @@ WHERE {
|
|
|
465
464
|
children: /* @__PURE__ */ e.jsx(
|
|
466
465
|
"img",
|
|
467
466
|
{
|
|
468
|
-
src:
|
|
467
|
+
src: q1,
|
|
469
468
|
className: "opacity-0 hover:opacity-100 place-self-center w-full h-full p-[20%]",
|
|
470
469
|
width: "17",
|
|
471
470
|
alt: "Wikimedia Commons"
|
|
@@ -484,10 +483,10 @@ WHERE {
|
|
|
484
483
|
" ",
|
|
485
484
|
d.join(", ")
|
|
486
485
|
] }),
|
|
487
|
-
|
|
486
|
+
f.length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
|
|
488
487
|
t,
|
|
489
488
|
" ",
|
|
490
|
-
|
|
489
|
+
f.join(", ")
|
|
491
490
|
] })
|
|
492
491
|
] })
|
|
493
492
|
] });
|
|
@@ -511,10 +510,10 @@ function V1({
|
|
|
511
510
|
debounce: l = 500,
|
|
512
511
|
...t
|
|
513
512
|
}) {
|
|
514
|
-
const [c, n] =
|
|
515
|
-
return
|
|
513
|
+
const [c, n] = E(s);
|
|
514
|
+
return z(() => {
|
|
516
515
|
n(s);
|
|
517
|
-
}, [s]),
|
|
516
|
+
}, [s]), z(() => {
|
|
518
517
|
const o = setTimeout(() => {
|
|
519
518
|
r(c);
|
|
520
519
|
}, l);
|
|
@@ -529,11 +528,11 @@ function V1({
|
|
|
529
528
|
);
|
|
530
529
|
}
|
|
531
530
|
function b0({ url: s, match: r }) {
|
|
532
|
-
const [l, t] =
|
|
533
|
-
return
|
|
534
|
-
async function o(
|
|
531
|
+
const [l, t] = E(""), [c, n] = E("");
|
|
532
|
+
return z(() => {
|
|
533
|
+
async function o(_) {
|
|
535
534
|
try {
|
|
536
|
-
const h = await fetch(
|
|
535
|
+
const h = await fetch(_, { method: "GET" });
|
|
537
536
|
if (h.status == 404) {
|
|
538
537
|
t("Not Found"), n("Not Found");
|
|
539
538
|
return;
|
|
@@ -545,9 +544,9 @@ function b0({ url: s, match: r }) {
|
|
|
545
544
|
t("Oops, we haven't got Markdown!"), n("No Markdown");
|
|
546
545
|
return;
|
|
547
546
|
}
|
|
548
|
-
const
|
|
549
|
-
t(
|
|
550
|
-
const x =
|
|
547
|
+
const f = await h.text();
|
|
548
|
+
t(f);
|
|
549
|
+
const x = f.replace(/^\s+/, "").split(/(\n|\r|\r\n){2,}/)[0].match(/^#\s*(.+)/);
|
|
551
550
|
n(x ? x[1] : "...");
|
|
552
551
|
} catch (h) {
|
|
553
552
|
h instanceof Error && h.message === "Request failed with status code 404" ? (t("Not Found"), n("Not Found")) : (t("Something went wrong."), n("Error"), console.error(h));
|
|
@@ -560,7 +559,7 @@ function b0({ url: s, match: r }) {
|
|
|
560
559
|
/* @__PURE__ */ e.jsx(b1, { children: l })
|
|
561
560
|
] });
|
|
562
561
|
}
|
|
563
|
-
const
|
|
562
|
+
const I1 = (s) => /* @__PURE__ */ e.jsxs(
|
|
564
563
|
"svg",
|
|
565
564
|
{
|
|
566
565
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -654,7 +653,7 @@ const F1 = (s) => /* @__PURE__ */ e.jsxs(
|
|
|
654
653
|
] }) })
|
|
655
654
|
]
|
|
656
655
|
}
|
|
657
|
-
),
|
|
656
|
+
), F1 = (s) => /* @__PURE__ */ e.jsxs(
|
|
658
657
|
"svg",
|
|
659
658
|
{
|
|
660
659
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1138,10 +1137,10 @@ function w0({ href: s, type: r, name: l }) {
|
|
|
1138
1137
|
let n;
|
|
1139
1138
|
switch (r) {
|
|
1140
1139
|
case "bibtex":
|
|
1141
|
-
n = /* @__PURE__ */ e.jsx(
|
|
1140
|
+
n = /* @__PURE__ */ e.jsx(I1, { className: t });
|
|
1142
1141
|
break;
|
|
1143
1142
|
case "csv":
|
|
1144
|
-
n = /* @__PURE__ */ e.jsx(
|
|
1143
|
+
n = /* @__PURE__ */ e.jsx(F1, { className: t });
|
|
1145
1144
|
break;
|
|
1146
1145
|
case "gexf":
|
|
1147
1146
|
n = /* @__PURE__ */ e.jsx(D1, { className: t });
|
|
@@ -1248,7 +1247,7 @@ function E0({
|
|
|
1248
1247
|
c === "dracor" && /* @__PURE__ */ e.jsx(X1, { style: { width: "15px" } }),
|
|
1249
1248
|
/* @__PURE__ */ e.jsx(Z1, { text: o, children: /* @__PURE__ */ e.jsxs("span", { title: "copy to clipboard", children: [
|
|
1250
1249
|
/* @__PURE__ */ e.jsx("span", { className: "pr-1", children: n }),
|
|
1251
|
-
/* @__PURE__ */ e.jsx(
|
|
1250
|
+
/* @__PURE__ */ e.jsx(y, { icon: w1, size: "sm" })
|
|
1252
1251
|
] }) })
|
|
1253
1252
|
]
|
|
1254
1253
|
}
|
|
@@ -1260,7 +1259,7 @@ function M0({
|
|
|
1260
1259
|
onSelect: l
|
|
1261
1260
|
}) {
|
|
1262
1261
|
return /* @__PURE__ */ e.jsxs(o1, { as: "div", className: "relative inline-block text-left", children: [
|
|
1263
|
-
/* @__PURE__ */ e.jsx(h1, { className: "relative justify-center inline-flex mr-8 hover:text-neutral-100", children: /* @__PURE__ */ e.jsx(
|
|
1262
|
+
/* @__PURE__ */ e.jsx(h1, { className: "relative justify-center inline-flex mr-8 hover:text-neutral-100", children: /* @__PURE__ */ e.jsx(y, { icon: E1, size: "2x" }) }),
|
|
1264
1263
|
/* @__PURE__ */ e.jsx(
|
|
1265
1264
|
d1,
|
|
1266
1265
|
{
|
|
@@ -1303,7 +1302,7 @@ function t0({ label: s, items: r, menuClass: l }) {
|
|
|
1303
1302
|
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(h1, { className: u1(n, l), children: [
|
|
1304
1303
|
s,
|
|
1305
1304
|
/* @__PURE__ */ e.jsx(
|
|
1306
|
-
|
|
1305
|
+
y,
|
|
1307
1306
|
{
|
|
1308
1307
|
icon: M1,
|
|
1309
1308
|
className: "ml-2 mt-1",
|
|
@@ -1344,11 +1343,11 @@ function N0({
|
|
|
1344
1343
|
gitHubIcon: n,
|
|
1345
1344
|
gitHubTitle: o,
|
|
1346
1345
|
addItem: m,
|
|
1347
|
-
navItems:
|
|
1346
|
+
navItems: _
|
|
1348
1347
|
}) {
|
|
1349
|
-
const [h, d] =
|
|
1348
|
+
const [h, d] = E(!1), f = x1();
|
|
1350
1349
|
function p({ href: x, active: b }) {
|
|
1351
|
-
return b !== void 0 ? b :
|
|
1350
|
+
return b !== void 0 ? b : f.pathname.startsWith(x);
|
|
1352
1351
|
}
|
|
1353
1352
|
return /* @__PURE__ */ e.jsxs("nav", { className: "flex items-center justify-between flex-wrap p-4 bg-primary text-white font-medium", children: [
|
|
1354
1353
|
/* @__PURE__ */ e.jsx(I, { to: "/", children: /* @__PURE__ */ e.jsx(
|
|
@@ -1384,7 +1383,7 @@ function N0({
|
|
|
1384
1383
|
{
|
|
1385
1384
|
className: `block md:flex grow md:items-center w-full md:w-auto ${h ? "" : "hidden"}`,
|
|
1386
1385
|
children: [
|
|
1387
|
-
|
|
1386
|
+
_?.length && /* @__PURE__ */ e.jsx("div", { className: "my-2 md:grow md:flex-row flex justify-center flex-col gap-4", children: _.map(
|
|
1388
1387
|
(x) => "items" in x ? /* @__PURE__ */ e.jsx(
|
|
1389
1388
|
t0,
|
|
1390
1389
|
{
|
|
@@ -1409,7 +1408,7 @@ function N0({
|
|
|
1409
1408
|
href: c,
|
|
1410
1409
|
title: o || "GitHub",
|
|
1411
1410
|
className: "text-white text-2xl",
|
|
1412
|
-
children: n || /* @__PURE__ */ e.jsx(
|
|
1411
|
+
children: n || /* @__PURE__ */ e.jsx(y, { icon: A1, size: "2xl" })
|
|
1413
1412
|
}
|
|
1414
1413
|
) })
|
|
1415
1414
|
]
|
|
@@ -1418,7 +1417,7 @@ function N0({
|
|
|
1418
1417
|
] });
|
|
1419
1418
|
}
|
|
1420
1419
|
function y0({ columns: s, data: r, defaultSort: l = [] }) {
|
|
1421
|
-
const [t, c] =
|
|
1420
|
+
const [t, c] = E(l), [n, o] = E(""), [m] = E(r), _ = T1({
|
|
1422
1421
|
data: m,
|
|
1423
1422
|
columns: s,
|
|
1424
1423
|
state: {
|
|
@@ -1444,12 +1443,12 @@ function y0({ columns: s, data: r, defaultSort: l = [] }) {
|
|
|
1444
1443
|
),
|
|
1445
1444
|
n !== "" && /* @__PURE__ */ e.jsxs("span", { className: "ml-2", children: [
|
|
1446
1445
|
"(",
|
|
1447
|
-
|
|
1446
|
+
_.getRowModel().rows.length,
|
|
1448
1447
|
")"
|
|
1449
1448
|
] })
|
|
1450
1449
|
] }),
|
|
1451
1450
|
/* @__PURE__ */ e.jsx("div", { className: "flex", children: /* @__PURE__ */ e.jsxs("table", { children: [
|
|
1452
|
-
/* @__PURE__ */ e.jsx("thead", { children:
|
|
1451
|
+
/* @__PURE__ */ e.jsx("thead", { children: _.getHeaderGroups().map((h) => /* @__PURE__ */ e.jsx("tr", { children: h.headers.map((d) => /* @__PURE__ */ e.jsx("th", { colSpan: d.colSpan, children: d.isPlaceholder ? null : /* @__PURE__ */ e.jsxs(
|
|
1453
1452
|
"div",
|
|
1454
1453
|
{
|
|
1455
1454
|
className: d.column.getCanSort() ? "cursor-pointer select-none" : "",
|
|
@@ -1464,7 +1463,7 @@ function y0({ columns: s, data: r, defaultSort: l = [] }) {
|
|
|
1464
1463
|
]
|
|
1465
1464
|
}
|
|
1466
1465
|
) }, d.id)) }, h.id)) }),
|
|
1467
|
-
/* @__PURE__ */ e.jsx("tbody", { children:
|
|
1466
|
+
/* @__PURE__ */ e.jsx("tbody", { children: _.getRowModel().rows.map((h, d) => /* @__PURE__ */ e.jsx("tr", { className: d % 2 ? "" : "bg-neutral-200", children: h.getVisibleCells().map((f) => /* @__PURE__ */ e.jsx("td", { children: t1(f.column.columnDef.cell, f.getContext()) }, f.id)) }, h.id)) })
|
|
1468
1467
|
] }) })
|
|
1469
1468
|
] });
|
|
1470
1469
|
}
|
|
@@ -1483,14 +1482,12 @@ function l0(s) {
|
|
|
1483
1482
|
}
|
|
1484
1483
|
function Z0({ url: s }) {
|
|
1485
1484
|
const r = p1(null);
|
|
1486
|
-
return
|
|
1487
|
-
var t;
|
|
1485
|
+
return z(() => {
|
|
1488
1486
|
const l = new P1();
|
|
1489
|
-
for (;
|
|
1487
|
+
for (; r.current?.firstChild; )
|
|
1490
1488
|
r.current.removeChild(r.current.firstChild);
|
|
1491
|
-
l.getHTML5(s, (
|
|
1492
|
-
|
|
1493
|
-
(n = r.current) == null || n.appendChild(c);
|
|
1489
|
+
l.getHTML5(s, (t) => {
|
|
1490
|
+
r.current?.appendChild(t);
|
|
1494
1491
|
});
|
|
1495
1492
|
}, [s]), /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx("div", { ref: r }) });
|
|
1496
1493
|
}
|
|
@@ -1506,24 +1503,24 @@ function A0({
|
|
|
1506
1503
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1507
1504
|
s && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1508
1505
|
/* @__PURE__ */ e.jsxs("span", { title: o, children: [
|
|
1509
|
-
/* @__PURE__ */ e.jsx(
|
|
1506
|
+
/* @__PURE__ */ e.jsx(y, { icon: N1, size: "sm" }),
|
|
1510
1507
|
" ",
|
|
1511
|
-
|
|
1508
|
+
V(s, t)
|
|
1512
1509
|
] }),
|
|
1513
1510
|
" "
|
|
1514
1511
|
] }),
|
|
1515
1512
|
r && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
1516
1513
|
/* @__PURE__ */ e.jsxs("span", { title: c, children: [
|
|
1517
|
-
/* @__PURE__ */ e.jsx(
|
|
1514
|
+
/* @__PURE__ */ e.jsx(y, { icon: y1, size: "sm" }),
|
|
1518
1515
|
" ",
|
|
1519
|
-
|
|
1516
|
+
V(r, t)
|
|
1520
1517
|
] }),
|
|
1521
1518
|
" "
|
|
1522
1519
|
] }),
|
|
1523
1520
|
l && /* @__PURE__ */ e.jsxs("span", { title: n, children: [
|
|
1524
|
-
/* @__PURE__ */ e.jsx(
|
|
1521
|
+
/* @__PURE__ */ e.jsx(y, { icon: k1, size: "sm" }),
|
|
1525
1522
|
" ",
|
|
1526
|
-
|
|
1523
|
+
V(l, t)
|
|
1527
1524
|
] })
|
|
1528
1525
|
] });
|
|
1529
1526
|
}
|
|
@@ -1542,7 +1539,7 @@ export {
|
|
|
1542
1539
|
y0 as Table,
|
|
1543
1540
|
k0 as Tabs,
|
|
1544
1541
|
A0 as Years,
|
|
1545
|
-
|
|
1546
|
-
|
|
1542
|
+
H as formatEra,
|
|
1543
|
+
V as formatYear
|
|
1547
1544
|
};
|
|
1548
1545
|
//# sourceMappingURL=index.es.js.map
|