@texonom/nreact 1.5.0 → 1.5.1
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/build/_commonjsHelpers-bAxELxBV.js +9 -0
- package/build/_commonjsHelpers-bAxELxBV.js.map +1 -0
- package/build/asset-wrapper-CmbIDPIw.js +921 -0
- package/build/asset-wrapper-CmbIDPIw.js.map +1 -0
- package/build/collection-column-title-l4hmVo49.js +99 -0
- package/build/collection-column-title-l4hmVo49.js.map +1 -0
- package/build/index.js +442 -1385
- package/build/index.js.map +1 -1
- package/build/third-party/code.js +199 -0
- package/build/third-party/code.js.map +1 -0
- package/build/third-party/collection.js +3355 -0
- package/build/third-party/collection.js.map +1 -0
- package/build/third-party/equation.js +44 -0
- package/build/third-party/equation.js.map +1 -0
- package/build/third-party/modal.js +5 -0
- package/build/third-party/modal.js.map +1 -0
- package/package.json +3 -3
package/build/index.js
CHANGED
|
@@ -1,1071 +1,200 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
for (var
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
for (var
|
|
19
|
-
|
|
20
|
-
return
|
|
1
|
+
var ot = Object.defineProperty, at = Object.defineProperties;
|
|
2
|
+
var rt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var ge = Object.getOwnPropertySymbols;
|
|
4
|
+
var Ye = Object.prototype.hasOwnProperty, Ze = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Ge = (n, a, o) => a in n ? ot(n, a, { enumerable: !0, configurable: !0, writable: !0, value: o }) : n[a] = o, W = (n, a) => {
|
|
6
|
+
for (var o in a || (a = {}))
|
|
7
|
+
Ye.call(a, o) && Ge(n, o, a[o]);
|
|
8
|
+
if (ge)
|
|
9
|
+
for (var o of ge(a))
|
|
10
|
+
Ze.call(a, o) && Ge(n, o, a[o]);
|
|
11
|
+
return n;
|
|
12
|
+
}, be = (n, a) => at(n, rt(a));
|
|
13
|
+
var le = (n, a) => {
|
|
14
|
+
var o = {};
|
|
15
|
+
for (var m in n)
|
|
16
|
+
Ye.call(n, m) && a.indexOf(m) < 0 && (o[m] = n[m]);
|
|
17
|
+
if (n != null && ge)
|
|
18
|
+
for (var m of ge(n))
|
|
19
|
+
a.indexOf(m) < 0 && Ze.call(n, m) && (o[m] = n[m]);
|
|
20
|
+
return o;
|
|
21
21
|
};
|
|
22
|
-
var we = (t, o, a) => new Promise((l, i) => {
|
|
23
|
-
var s = (c) => {
|
|
24
|
-
try {
|
|
25
|
-
u(a.next(c));
|
|
26
|
-
} catch (d) {
|
|
27
|
-
i(d);
|
|
28
|
-
}
|
|
29
|
-
}, r = (c) => {
|
|
30
|
-
try {
|
|
31
|
-
u(a.throw(c));
|
|
32
|
-
} catch (d) {
|
|
33
|
-
i(d);
|
|
34
|
-
}
|
|
35
|
-
}, u = (c) => c.done ? l(c.value) : Promise.resolve(c.value).then(s, r);
|
|
36
|
-
u((a = a.apply(t, o)).next());
|
|
37
|
-
});
|
|
38
22
|
import e from "react";
|
|
39
|
-
import
|
|
40
|
-
import {
|
|
41
|
-
import { formatDate as
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
return /* @__PURE__ */ e.createElement("
|
|
57
|
-
},
|
|
58
|
-
const o = [];
|
|
59
|
-
let a, l = -1;
|
|
60
|
-
return Object.keys(t).forEach((i) => {
|
|
61
|
-
var r, u;
|
|
62
|
-
const s = (r = t[i]) == null ? void 0 : r.value;
|
|
63
|
-
s && ((u = s.content) == null || u.forEach((c) => {
|
|
64
|
-
var g, m;
|
|
65
|
-
const d = (m = (g = t[c]) == null ? void 0 : g.value) == null ? void 0 : m.type;
|
|
66
|
-
d && d !== a && (l++, a = d, o[l] = []), l > -1 && o[l].push(c);
|
|
67
|
-
})), a = void 0;
|
|
68
|
-
}), o;
|
|
69
|
-
}, Ot = (t, o) => {
|
|
70
|
-
const l = Ht(o).find((i) => i.includes(t));
|
|
71
|
-
if (l)
|
|
72
|
-
return l.indexOf(t) + 1;
|
|
73
|
-
}, Vt = (t) => t.includes("#") ? t.replace(/^.+(#.+)$/, "$1") : "", Rt = typeof window != "undefined", jt = /* @__PURE__ */ new Set([
|
|
74
|
-
"youtu.be",
|
|
75
|
-
"youtube.com",
|
|
76
|
-
"www.youtube.com",
|
|
77
|
-
"youtube-nocookie.com",
|
|
78
|
-
"www.youtube-nocookie.com"
|
|
79
|
-
]), Dt = (t) => {
|
|
80
|
-
try {
|
|
81
|
-
const { hostname: o } = new URL(t);
|
|
82
|
-
if (!jt.has(o)) return null;
|
|
83
|
-
const a = /^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/i, l = t.match(a);
|
|
84
|
-
if (l && l[2].length == 11) return l[2];
|
|
85
|
-
} catch (o) {
|
|
86
|
-
}
|
|
87
|
-
return null;
|
|
88
|
-
}, ie = (c) => {
|
|
89
|
-
var d = c, { src: t, alt: o, className: a, style: l, zoomable: i = !1, priority: s = !1, height: r } = d, u = T(d, ["src", "alt", "className", "style", "zoomable", "priority", "height"]);
|
|
90
|
-
var w, y, f;
|
|
91
|
-
const { recordMap: g, zoom: m, previewImages: E, forceCustomImages: N, components: n } = V(), p = e.useRef(m ? m.clone() : null), x = E ? (f = (w = g == null ? void 0 : g.preview_images) == null ? void 0 : w[t]) != null ? f : (y = g == null ? void 0 : g.preview_images) == null ? void 0 : y[$t(t)] : null, M = e.useCallback(
|
|
92
|
-
(v) => {
|
|
93
|
-
i && (v.target.src || v.target.srcset) && p.current && p.current.attach(v.target);
|
|
94
|
-
},
|
|
95
|
-
[p, i]
|
|
96
|
-
), $ = e.useCallback(
|
|
97
|
-
(v) => {
|
|
98
|
-
p.current && v && p.current.attach(v);
|
|
99
|
-
},
|
|
100
|
-
[p]
|
|
101
|
-
), H = e.useMemo(() => i ? $ : void 0, [i, $]);
|
|
102
|
-
return x && n.Image ? /* @__PURE__ */ e.createElement(
|
|
103
|
-
n.Image,
|
|
104
|
-
{
|
|
105
|
-
src: t,
|
|
106
|
-
alt: o,
|
|
107
|
-
style: l,
|
|
108
|
-
className: a,
|
|
109
|
-
width: x.originalWidth,
|
|
110
|
-
height: x.originalHeight,
|
|
111
|
-
blurDataURL: x.dataURIBase64,
|
|
112
|
-
placeholder: "blur",
|
|
113
|
-
priority: s,
|
|
114
|
-
onLoad: M
|
|
115
|
-
}
|
|
116
|
-
) : n.Image && N ? /* @__PURE__ */ e.createElement(
|
|
117
|
-
n.Image,
|
|
118
|
-
{
|
|
119
|
-
src: t,
|
|
120
|
-
alt: o,
|
|
121
|
-
className: a,
|
|
122
|
-
style: l,
|
|
123
|
-
width: null,
|
|
124
|
-
height: r || null,
|
|
125
|
-
priority: s,
|
|
126
|
-
onLoad: M
|
|
127
|
-
}
|
|
128
|
-
) : /* @__PURE__ */ e.createElement(
|
|
129
|
-
"img",
|
|
130
|
-
h({
|
|
131
|
-
className: a,
|
|
132
|
-
style: l,
|
|
133
|
-
src: t,
|
|
134
|
-
alt: o,
|
|
135
|
-
ref: H,
|
|
136
|
-
loading: "lazy",
|
|
137
|
-
decoding: "async"
|
|
138
|
-
}, u)
|
|
139
|
-
);
|
|
140
|
-
}, Ft = (t) => t.type === "page" || t.type === "callout" || t.type === "collection_view" || t.type === "collection_view_page", Ut = ({ block: t, className: o, inline: a = !0, hideDefaultIcon: l = !1, defaultIcon: i }) => {
|
|
23
|
+
import lt from "@fisch0920/medium-zoom";
|
|
24
|
+
import { uuidToId as Ee, getBlockParentPage as Je, getPageTableOfContents as he, getTextContent as ie, getBlockCollectionId as it, getBlockIcon as ct, isUrl as st } from "@texonom/nutils";
|
|
25
|
+
import { formatDate as Mt, formatNotionDateTime as Ht, isUrl as At } from "@texonom/nutils";
|
|
26
|
+
import { u as ce, T as C, G as mt, E as dt, P as Xe, L as Ne, a as Ke, A as Qe, g as ut, N as ft } from "./asset-wrapper-CmbIDPIw.js";
|
|
27
|
+
import { l as Dt, B as Rt, C as zt, H as Ut, k as Wt, e as Vt, f as qt, j as Gt, S as Yt, h as Zt, d as Jt, b as Xt, c as Kt, i as Qt } from "./asset-wrapper-CmbIDPIw.js";
|
|
28
|
+
import { c as ve, g as pt } from "./_commonjsHelpers-bAxELxBV.js";
|
|
29
|
+
import { C as tn, P as nn, i as on } from "./collection-column-title-l4hmVo49.js";
|
|
30
|
+
const gt = ({ block: n, className: a }) => {
|
|
31
|
+
var r, d, g;
|
|
32
|
+
const { recordMap: o } = ce(), m = o.signed_urls[n.id] || ((g = (d = (r = n.properties) == null ? void 0 : r.source) == null ? void 0 : d[0]) == null ? void 0 : g[0]);
|
|
33
|
+
return /* @__PURE__ */ e.createElement("div", { className: `notion-audio ${a || ""}` }, /* @__PURE__ */ e.createElement("audio", { controls: !0, preload: "none", src: m }));
|
|
34
|
+
}, vt = (n) => {
|
|
35
|
+
const m = n, { className: a } = m, o = le(m, ["className"]);
|
|
36
|
+
return /* @__PURE__ */ e.createElement("svg", be(W({ className: a }, o), { viewBox: "0 0 30 30" }), /* @__PURE__ */ e.createElement("path", { d: "M22,8v12c0,3.866-3.134,7-7,7s-7-3.134-7-7V8c0-2.762,2.238-5,5-5s5,2.238,5,5v12c0,1.657-1.343,3-3,3s-3-1.343-3-3V8h-2v12c0,2.762,2.238,5,5,5s5-2.238,5-5V8c0-3.866-3.134-7-7-7S6,4.134,6,8v12c0,4.971,4.029,9,9,9s9-4.029,9-9V8H22z" }));
|
|
37
|
+
}, Et = ({ block: n, className: a }) => {
|
|
38
|
+
var d, g, N, _, v;
|
|
39
|
+
const { components: o, recordMap: m } = ce(), r = m.signed_urls[n.id] || ((N = (g = (d = n.properties) == null ? void 0 : d.source) == null ? void 0 : g[0]) == null ? void 0 : N[0]);
|
|
40
|
+
return /* @__PURE__ */ e.createElement("div", { className: `notion-file ${a || ""}` }, /* @__PURE__ */ e.createElement(o.Link, { className: "notion-file-link", href: r, target: "_blank", rel: "noopener noreferrer" }, /* @__PURE__ */ e.createElement(vt, { className: "notion-file-icon" }), /* @__PURE__ */ e.createElement("div", { className: "notion-file-info" }, /* @__PURE__ */ e.createElement("div", { className: "notion-file-title" }, /* @__PURE__ */ e.createElement(C, { value: ((_ = n.properties) == null ? void 0 : _.title) || [["File"]], block: n })), ((v = n.properties) == null ? void 0 : v.size) && /* @__PURE__ */ e.createElement("div", { className: "notion-file-size" }, /* @__PURE__ */ e.createElement(C, { value: n.properties.size, block: n })))));
|
|
41
|
+
}, bt = ({ block: n, className: a }) => {
|
|
141
42
|
var g;
|
|
142
|
-
const {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
const m = ((g = ft(t, r)) == null ? void 0 : g.trim()) || i, E = ze(t, r);
|
|
146
|
-
if (m && gt(m)) {
|
|
147
|
-
const N = s(m, t);
|
|
148
|
-
c = !0, d = /* @__PURE__ */ e.createElement(ie, { src: N, alt: E || "page icon", className: `${o || ""} notion-page-icon` });
|
|
149
|
-
} else if (m && m.startsWith("/icons/")) {
|
|
150
|
-
const N = "https://www.notion.so" + m + "?mode=" + (u ? "dark" : "light");
|
|
151
|
-
d = /* @__PURE__ */ e.createElement(ie, { src: N, alt: E || "page icon", className: `${o || ""} notion-page-icon` });
|
|
152
|
-
} else m ? (c = !1, d = /* @__PURE__ */ e.createElement("span", { className: `${o || ""} notion-page-icon`, role: "img", "aria-label": m }, m)) : l || (c = !0, d = /* @__PURE__ */ e.createElement(Bt, { className: `${o || ""} notion-page-icon`, alt: E || "page icon" }));
|
|
153
|
-
}
|
|
154
|
-
return d ? /* @__PURE__ */ e.createElement(
|
|
155
|
-
"div",
|
|
156
|
-
{
|
|
157
|
-
className: `
|
|
158
|
-
${a ? "notion-page-icon-inline" : "notion-page-icon-hero"}
|
|
159
|
-
${c ? "notion-page-icon-image" : "notion-page-icon-span"}
|
|
160
|
-
`
|
|
161
|
-
},
|
|
162
|
-
d
|
|
163
|
-
) : null;
|
|
164
|
-
}, pe = e.memo(Ut), At = (t) => {
|
|
165
|
-
const l = t, { className: o } = l, a = T(l, ["className"]);
|
|
166
|
-
return /* @__PURE__ */ e.createElement("svg", U(h({ className: `notion-icon ${o || ""}` }, a), { viewBox: "0 0 30 30" }), /* @__PURE__ */ e.createElement("path", { d: "M15,0C6.716,0,0,6.716,0,15s6.716,15,15,15s15-6.716,15-15S23.284,0,15,0z M22,20.6L20.6,22L15,16.4L9.4,22L8,20.6l5.6-5.6 L8,9.4L9.4,8l5.6,5.6L20.6,8L22,9.4L16.4,15L22,20.6z" }));
|
|
167
|
-
}, qt = (t) => {
|
|
168
|
-
const l = t, { className: o } = l, a = T(l, ["className"]);
|
|
169
|
-
return /* @__PURE__ */ e.createElement("svg", U(h({ className: `notion-icon ${o || ""}` }, a), { viewBox: "0 0 24 24" }), /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("linearGradient", { x1: "28.1542969%", y1: "63.7402344%", x2: "74.6289062%", y2: "17.7832031%", id: "linearGradient-1" }, /* @__PURE__ */ e.createElement("stop", { stopColor: "rgba(164, 164, 164, 1)", offset: "0%" }), /* @__PURE__ */ e.createElement("stop", { stopColor: "rgba(164, 164, 164, 0)", stopOpacity: "0", offset: "100%" }))), /* @__PURE__ */ e.createElement("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none" }, /* @__PURE__ */ e.createElement("g", { transform: "translate(-236.000000, -286.000000)" }, /* @__PURE__ */ e.createElement("g", { transform: "translate(238.000000, 286.000000)" }, /* @__PURE__ */ e.createElement("circle", { id: "Oval-2", stroke: "url(#linearGradient-1)", strokeWidth: "4", cx: "10", cy: "12", r: "10" }), /* @__PURE__ */ e.createElement("path", { d: "M10,2 C4.4771525,2 0,6.4771525 0,12", id: "Oval-2", stroke: "rgba(164, 164, 164, 1)", strokeWidth: "4" }), /* @__PURE__ */ e.createElement("rect", { id: "Rectangle-1", fill: "rgba(164, 164, 164, 1)", x: "8", y: "0", width: "4", height: "4", rx: "8" })))));
|
|
170
|
-
};
|
|
171
|
-
function Wt(t) {
|
|
172
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 260 260" }, t), /* @__PURE__ */ e.createElement("g", null, /* @__PURE__ */ e.createElement(
|
|
173
|
-
"path",
|
|
174
|
-
{
|
|
175
|
-
d: "M128.00106,0 C57.3172926,0 0,57.3066942 0,128.00106 C0,184.555281 36.6761997,232.535542 87.534937,249.460899 C93.9320223,250.645779 96.280588,246.684165 96.280588,243.303333 C96.280588,240.251045 96.1618878,230.167899 96.106777,219.472176 C60.4967585,227.215235 52.9826207,204.369712 52.9826207,204.369712 C47.1599584,189.574598 38.770408,185.640538 38.770408,185.640538 C27.1568785,177.696113 39.6458206,177.859325 39.6458206,177.859325 C52.4993419,178.762293 59.267365,191.04987 59.267365,191.04987 C70.6837675,210.618423 89.2115753,204.961093 96.5158685,201.690482 C97.6647155,193.417512 100.981959,187.77078 104.642583,184.574357 C76.211799,181.33766 46.324819,170.362144 46.324819,121.315702 C46.324819,107.340889 51.3250588,95.9223682 59.5132437,86.9583937 C58.1842268,83.7344152 53.8029229,70.715562 60.7532354,53.0843636 C60.7532354,53.0843636 71.5019501,49.6441813 95.9626412,66.2049595 C106.172967,63.368876 117.123047,61.9465949 128.00106,61.8978432 C138.879073,61.9465949 149.837632,63.368876 160.067033,66.2049595 C184.49805,49.6441813 195.231926,53.0843636 195.231926,53.0843636 C202.199197,70.715562 197.815773,83.7344152 196.486756,86.9583937 C204.694018,95.9223682 209.660343,107.340889 209.660343,121.315702 C209.660343,170.478725 179.716133,181.303747 151.213281,184.472614 C155.80443,188.444828 159.895342,196.234518 159.895342,208.176593 C159.895342,225.303317 159.746968,239.087361 159.746968,243.303333 C159.746968,246.709601 162.05102,250.70089 168.53925,249.443941 C219.370432,232.499507 256,184.536204 256,128.00106 C256,57.3066942 198.691187,0 128.00106,0 Z M47.9405593,182.340212 C47.6586465,182.976105 46.6581745,183.166873 45.7467277,182.730227 C44.8183235,182.312656 44.2968914,181.445722 44.5978808,180.80771 C44.8734344,180.152739 45.876026,179.97045 46.8023103,180.409216 C47.7328342,180.826786 48.2627451,181.702199 47.9405593,182.340212 Z M54.2367892,187.958254 C53.6263318,188.524199 52.4329723,188.261363 51.6232682,187.366874 C50.7860088,186.474504 50.6291553,185.281144 51.2480912,184.70672 C51.8776254,184.140775 53.0349512,184.405731 53.8743302,185.298101 C54.7115892,186.201069 54.8748019,187.38595 54.2367892,187.958254 Z M58.5562413,195.146347 C57.7719732,195.691096 56.4895886,195.180261 55.6968417,194.042013 C54.9125733,192.903764 54.9125733,191.538713 55.713799,190.991845 C56.5086651,190.444977 57.7719732,190.936735 58.5753181,192.066505 C59.3574669,193.22383 59.3574669,194.58888 58.5562413,195.146347 Z M65.8613592,203.471174 C65.1597571,204.244846 63.6654083,204.03712 62.5716717,202.981538 C61.4524999,201.94927 61.1409122,200.484596 61.8446341,199.710926 C62.5547146,198.935137 64.0575422,199.15346 65.1597571,200.200564 C66.2704506,201.230712 66.6095936,202.705984 65.8613592,203.471174 Z M75.3025151,206.281542 C74.9930474,207.284134 73.553809,207.739857 72.1039724,207.313809 C70.6562556,206.875043 69.7087748,205.700761 70.0012857,204.687571 C70.302275,203.678621 71.7478721,203.20382 73.2083069,203.659543 C74.6539041,204.09619 75.6035048,205.261994 75.3025151,206.281542 Z M86.046947,207.473627 C86.0829806,208.529209 84.8535871,209.404622 83.3316829,209.4237 C81.8013,209.457614 80.563428,208.603398 80.5464708,207.564772 C80.5464708,206.498591 81.7483088,205.631657 83.2786917,205.606221 C84.8005962,205.576546 86.046947,206.424403 86.046947,207.473627 Z M96.6021471,207.069023 C96.7844366,208.099171 95.7267341,209.156872 94.215428,209.438785 C92.7295577,209.710099 91.3539086,209.074206 91.1652603,208.052538 C90.9808515,206.996955 92.0576306,205.939253 93.5413813,205.66582 C95.054807,205.402984 96.4092596,206.021919 96.6021471,207.069023 Z",
|
|
176
|
-
fill: "#161614"
|
|
177
|
-
}
|
|
178
|
-
)));
|
|
179
|
-
}
|
|
180
|
-
const yt = ({ block: t, inline: o, className: a }) => {
|
|
181
|
-
var E, N, n;
|
|
182
|
-
const { components: l } = V(), { original_url: i, attributes: s, domain: r } = (t == null ? void 0 : t.format) || {};
|
|
183
|
-
if (!i || !s) return null;
|
|
184
|
-
const u = (E = s.find((p) => p.id === "title")) == null ? void 0 : E.values[0];
|
|
185
|
-
let c = (N = s.find((p) => p.id === "owner")) == null ? void 0 : N.values[0];
|
|
186
|
-
const d = (n = s.find((p) => p.id === "updated_at")) == null ? void 0 : n.values[0], g = d ? Lt(d) : null;
|
|
187
|
-
let m;
|
|
188
|
-
switch (r) {
|
|
189
|
-
case "github.com":
|
|
190
|
-
if (m = /* @__PURE__ */ e.createElement(Wt, null), c) {
|
|
191
|
-
const p = c.split("/");
|
|
192
|
-
c = p[p.length - 1];
|
|
193
|
-
}
|
|
194
|
-
break;
|
|
195
|
-
default:
|
|
196
|
-
return process.env.NODE_ENV !== "production" && console.debug(`Unsupported external_object_instance domain "${r}"`, JSON.stringify(t, null, 2)), null;
|
|
197
|
-
}
|
|
198
|
-
return /* @__PURE__ */ e.createElement(
|
|
199
|
-
l.Link,
|
|
200
|
-
{
|
|
201
|
-
target: "_blank",
|
|
202
|
-
rel: "noopener noreferrer",
|
|
203
|
-
href: i,
|
|
204
|
-
className: `notion-external ${o ? "notion-external-mention" : "notion-external-block notion-row"} ${a || ""}`
|
|
205
|
-
},
|
|
206
|
-
m && /* @__PURE__ */ e.createElement("div", { className: "notion-external-image" }, m),
|
|
207
|
-
/* @__PURE__ */ e.createElement("div", { className: "notion-external-description" }, /* @__PURE__ */ e.createElement("div", { className: "notion-external-title" }, u), (c || g) && /* @__PURE__ */ e.createElement("div", { className: "notion-external-subtitle" }, c && /* @__PURE__ */ e.createElement("span", null, c), c && g && /* @__PURE__ */ e.createElement("span", null, " • "), g && /* @__PURE__ */ e.createElement("span", null, "Updated ", g)))
|
|
208
|
-
);
|
|
209
|
-
}, Se = (t) => Rt ? /* @__PURE__ */ e.createElement(Mt, h({}, t)) : /* @__PURE__ */ e.createElement("img", h({}, t)), P = ({ value: t, block: o, linkProps: a, linkProtocol: l }) => {
|
|
210
|
-
const { components: i, recordMap: s, mapPageUrl: r, mapImageUrl: u, rootDomain: c } = V();
|
|
211
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, t == null ? void 0 : t.map((d, g) => {
|
|
212
|
-
const [m, E] = d;
|
|
213
|
-
if (!E)
|
|
214
|
-
return m === "," ? /* @__PURE__ */ e.createElement("span", { key: g, style: { padding: "0.5em" } }) : /* @__PURE__ */ e.createElement(e.Fragment, { key: g }, m);
|
|
215
|
-
const N = E.reduce(
|
|
216
|
-
(n, p) => {
|
|
217
|
-
var x, M, $, H, w;
|
|
218
|
-
switch (p[0]) {
|
|
219
|
-
case "p": {
|
|
220
|
-
const y = p[1], f = (x = s.block[y]) == null ? void 0 : x.value;
|
|
221
|
-
return f ? /* @__PURE__ */ e.createElement(i.PageLink, { className: "notion-link", href: r(y) }, /* @__PURE__ */ e.createElement(fe, { block: f })) : (console.debug('"p" missing block', y), null);
|
|
222
|
-
}
|
|
223
|
-
case "‣": {
|
|
224
|
-
const y = p[1][0], f = p[1][1];
|
|
225
|
-
switch (y) {
|
|
226
|
-
case "u": {
|
|
227
|
-
const v = (M = s.notion_user[f]) == null ? void 0 : M.value;
|
|
228
|
-
if (!v)
|
|
229
|
-
return console.debug('"‣" missing user', f), null;
|
|
230
|
-
const _ = [v.given_name, v.family_name].filter(Boolean).join(" "), L = v.email;
|
|
231
|
-
return /* @__PURE__ */ e.createElement(i.Link, h({ className: "notion-link", href: `mailto:${L}` }, a), /* @__PURE__ */ e.createElement(
|
|
232
|
-
Se,
|
|
233
|
-
{
|
|
234
|
-
className: "notion-user",
|
|
235
|
-
src: u(v.profile_photo, o),
|
|
236
|
-
alt: _,
|
|
237
|
-
style: { display: "inline", marginRight: "0.3em", marginBottom: "0.3em" }
|
|
238
|
-
}
|
|
239
|
-
), _);
|
|
240
|
-
}
|
|
241
|
-
default: {
|
|
242
|
-
const v = ($ = s.block[f]) == null ? void 0 : $.value;
|
|
243
|
-
return v ? /* @__PURE__ */ e.createElement(
|
|
244
|
-
i.PageLink,
|
|
245
|
-
U(h({
|
|
246
|
-
className: "notion-link",
|
|
247
|
-
href: r(f)
|
|
248
|
-
}, a), {
|
|
249
|
-
target: "_blank",
|
|
250
|
-
rel: "noopener noreferrer"
|
|
251
|
-
}),
|
|
252
|
-
/* @__PURE__ */ e.createElement(fe, { block: v })
|
|
253
|
-
) : (console.debug('"‣" missing block', y, f), null);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
case "h":
|
|
258
|
-
return /* @__PURE__ */ e.createElement("span", { className: `notion-${p[1]}` }, n);
|
|
259
|
-
case "c":
|
|
260
|
-
return /* @__PURE__ */ e.createElement("code", { className: "notion-inline-code" }, n);
|
|
261
|
-
case "b":
|
|
262
|
-
return /* @__PURE__ */ e.createElement("b", null, n);
|
|
263
|
-
case "i":
|
|
264
|
-
return /* @__PURE__ */ e.createElement("em", null, n);
|
|
265
|
-
case "s":
|
|
266
|
-
return /* @__PURE__ */ e.createElement("s", null, n);
|
|
267
|
-
case "_":
|
|
268
|
-
return /* @__PURE__ */ e.createElement("span", { className: "notion-inline-underscore" }, n);
|
|
269
|
-
case "e":
|
|
270
|
-
return /* @__PURE__ */ e.createElement(i.Equation, { math: p[1], inline: !0 });
|
|
271
|
-
case "m":
|
|
272
|
-
return n;
|
|
273
|
-
//still need to return the base element
|
|
274
|
-
case "a": {
|
|
275
|
-
const y = p[1], f = y.substring(1), v = _e(f, { uuid: !0 });
|
|
276
|
-
if ((y[0] === "/" || y.includes(c)) && v) {
|
|
277
|
-
const _ = y.includes(c) ? y : `${r(v)}${Vt(y)}`;
|
|
278
|
-
return /* @__PURE__ */ e.createElement(i.PageLink, h({ className: "notion-link", href: _ }, a), n);
|
|
279
|
-
} else
|
|
280
|
-
return /* @__PURE__ */ e.createElement(
|
|
281
|
-
i.Link,
|
|
282
|
-
h({
|
|
283
|
-
className: "notion-link",
|
|
284
|
-
href: l ? `${l}:${p[1]}` : p[1]
|
|
285
|
-
}, a),
|
|
286
|
-
n
|
|
287
|
-
);
|
|
288
|
-
}
|
|
289
|
-
// Date
|
|
290
|
-
case "d": {
|
|
291
|
-
const y = p[1], f = y == null ? void 0 : y.type;
|
|
292
|
-
if (f === "date") {
|
|
293
|
-
const v = y.start_date;
|
|
294
|
-
return xe(v);
|
|
295
|
-
} else if (f === "daterange") {
|
|
296
|
-
const v = y.start_date, _ = y.end_date;
|
|
297
|
-
return `${xe(v)} → ${xe(_)}`;
|
|
298
|
-
} else
|
|
299
|
-
return n;
|
|
300
|
-
}
|
|
301
|
-
// User
|
|
302
|
-
case "u": {
|
|
303
|
-
const y = p[1], f = (H = s.notion_user[y]) == null ? void 0 : H.value;
|
|
304
|
-
if (!f)
|
|
305
|
-
return console.debug("missing user", y), null;
|
|
306
|
-
const v = f.name, _ = f.email;
|
|
307
|
-
return /* @__PURE__ */ e.createElement(i.Link, h({ className: "notion-link", href: `mailto:${_}` }, a), /* @__PURE__ */ e.createElement(
|
|
308
|
-
Se,
|
|
309
|
-
{
|
|
310
|
-
className: "notion-user",
|
|
311
|
-
src: u(f.profile_photo, o),
|
|
312
|
-
alt: v,
|
|
313
|
-
style: { display: "inline", marginRight: "0.3em", marginBottom: "0.3em" }
|
|
314
|
-
}
|
|
315
|
-
), v);
|
|
316
|
-
}
|
|
317
|
-
case "eoi": {
|
|
318
|
-
const y = p[1], f = (w = s.block[y]) == null ? void 0 : w.value;
|
|
319
|
-
return /* @__PURE__ */ e.createElement(yt, { block: f, inline: !0 });
|
|
320
|
-
}
|
|
321
|
-
default:
|
|
322
|
-
return process.env.NODE_ENV !== "production" && console.debug("unsupported text format", p), n;
|
|
323
|
-
}
|
|
324
|
-
},
|
|
325
|
-
/* @__PURE__ */ e.createElement(e.Fragment, null, m)
|
|
326
|
-
);
|
|
327
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, { key: g }, N);
|
|
328
|
-
}));
|
|
329
|
-
}, Zt = (i) => {
|
|
330
|
-
var s = i, { block: t, className: o, defaultIcon: a } = s, l = T(s, ["block", "className", "defaultIcon"]);
|
|
331
|
-
var u, c;
|
|
332
|
-
const { recordMap: r } = V();
|
|
333
|
-
if (!t) return null;
|
|
334
|
-
if (t.type === "collection_view_page" || t.type === "collection_view") {
|
|
335
|
-
const d = ze(t, r);
|
|
336
|
-
if (!d) return null;
|
|
337
|
-
const g = [[d]];
|
|
338
|
-
return /* @__PURE__ */ e.createElement("span", h({ className: `notion-page-title ${o || ""}` }, l), /* @__PURE__ */ e.createElement(pe, { block: t, defaultIcon: a, className: "notion-page-title-icon" }), /* @__PURE__ */ e.createElement("span", { className: "notion-page-title-text" }, /* @__PURE__ */ e.createElement(P, { value: g, block: t })));
|
|
339
|
-
}
|
|
340
|
-
return (u = t.properties) != null && u.title ? /* @__PURE__ */ e.createElement("span", h({ className: `notion-page-title ${o || ""}` }, l), /* @__PURE__ */ e.createElement(pe, { block: t, defaultIcon: a, className: "notion-page-title-icon" }), /* @__PURE__ */ e.createElement("span", { className: "notion-page-title-text" }, /* @__PURE__ */ e.createElement(P, { value: (c = t.properties) == null ? void 0 : c.title, block: t }))) : null;
|
|
341
|
-
}, fe = e.memo(Zt), Gt = (t, o) => {
|
|
342
|
-
let a;
|
|
343
|
-
return (...l) => {
|
|
344
|
-
a && clearTimeout(a), a = setTimeout(() => t(...l), o);
|
|
345
|
-
};
|
|
346
|
-
};
|
|
347
|
-
class Qt extends e.Component {
|
|
348
|
-
constructor(o) {
|
|
349
|
-
super(o), this.state = {
|
|
350
|
-
isLoading: !1,
|
|
351
|
-
query: "",
|
|
352
|
-
searchResult: null,
|
|
353
|
-
searchError: null
|
|
354
|
-
}, this._onAfterOpen = () => {
|
|
355
|
-
this._inputRef.current && this._inputRef.current.focus();
|
|
356
|
-
}, this._onChangeQuery = (a) => {
|
|
357
|
-
const l = a.target.value;
|
|
358
|
-
if (this.setState({ query: l }), l.trim())
|
|
359
|
-
this._search();
|
|
360
|
-
else {
|
|
361
|
-
this.setState({ isLoading: !1, searchResult: null, searchError: null });
|
|
362
|
-
return;
|
|
363
|
-
}
|
|
364
|
-
}, this._onClearQuery = () => {
|
|
365
|
-
this._onChangeQuery({ target: { value: "" } });
|
|
366
|
-
}, this._warmupSearch = () => we(this, null, function* () {
|
|
367
|
-
const { searchNotion: a, rootBlockId: l, rootSpaceId: i } = this.props;
|
|
368
|
-
yield a({
|
|
369
|
-
query: "",
|
|
370
|
-
spaceId: i,
|
|
371
|
-
filters: {
|
|
372
|
-
ancestors: [l],
|
|
373
|
-
isDeletedOnly: !1,
|
|
374
|
-
excludeTemplates: !0,
|
|
375
|
-
navigableBlockContentOnly: !0,
|
|
376
|
-
requireEditPermissions: !1
|
|
377
|
-
}
|
|
378
|
-
});
|
|
379
|
-
}), this._searchImpl = () => we(this, null, function* () {
|
|
380
|
-
const { searchNotion: a, rootBlockId: l, rootSpaceId: i } = this.props, { query: s } = this.state;
|
|
381
|
-
if (!s.trim()) {
|
|
382
|
-
this.setState({ isLoading: !1, searchResult: null, searchError: null });
|
|
383
|
-
return;
|
|
384
|
-
}
|
|
385
|
-
this.setState({ isLoading: !0 });
|
|
386
|
-
const r = yield a({
|
|
387
|
-
query: s,
|
|
388
|
-
spaceId: i,
|
|
389
|
-
filters: {
|
|
390
|
-
ancestors: [l],
|
|
391
|
-
isDeletedOnly: !1,
|
|
392
|
-
excludeTemplates: !0,
|
|
393
|
-
navigableBlockContentOnly: !0,
|
|
394
|
-
requireEditPermissions: !1
|
|
395
|
-
}
|
|
396
|
-
});
|
|
397
|
-
console.debug("search", s, r);
|
|
398
|
-
let u = null, c = null;
|
|
399
|
-
if (r.error || r.errorId)
|
|
400
|
-
c = r;
|
|
401
|
-
else {
|
|
402
|
-
u = h({}, r);
|
|
403
|
-
const g = u.results.map((m) => {
|
|
404
|
-
var n, p;
|
|
405
|
-
const E = (n = u.recordMap.block[m.id]) == null ? void 0 : n.value;
|
|
406
|
-
if (!E) return;
|
|
407
|
-
const N = ze(E, u.recordMap);
|
|
408
|
-
if (N && (m.title = N, m.block = E, m.recordMap = u.recordMap, m.page = Ie(E, u.recordMap, {
|
|
409
|
-
inclusive: !0
|
|
410
|
-
}) || E, !!m.page.id))
|
|
411
|
-
return (p = m.highlight) != null && p.text && (m.highlight.html = m.highlight.text.replace(/<gzkNfoUU>/gi, "<b>").replace(/<\/gzkNfoUU>/gi, "</b>")), m;
|
|
412
|
-
}).filter(Boolean).reduce(
|
|
413
|
-
(m, E) => U(h({}, m), {
|
|
414
|
-
[E.page.id]: E
|
|
415
|
-
}),
|
|
416
|
-
{}
|
|
417
|
-
);
|
|
418
|
-
u.results = Object.values(g);
|
|
419
|
-
}
|
|
420
|
-
this.state.query === s && this.setState({ isLoading: !1, searchResult: u, searchError: c });
|
|
421
|
-
}), this._inputRef = e.createRef();
|
|
422
|
-
}
|
|
423
|
-
componentDidMount() {
|
|
424
|
-
this._search = Gt(this._searchImpl.bind(this), 500), this._warmupSearch();
|
|
425
|
-
}
|
|
426
|
-
render() {
|
|
427
|
-
const { isOpen: o, onClose: a } = this.props, { isLoading: l, query: i, searchResult: s, searchError: r } = this.state, u = !!i.trim();
|
|
428
|
-
return /* @__PURE__ */ e.createElement(cn, null, (c) => {
|
|
429
|
-
const { components: d, defaultPageIcon: g, mapPageUrl: m } = c;
|
|
430
|
-
return /* @__PURE__ */ e.createElement(
|
|
431
|
-
d.Modal,
|
|
432
|
-
{
|
|
433
|
-
isOpen: o,
|
|
434
|
-
contentLabel: "Search",
|
|
435
|
-
className: "notion-search",
|
|
436
|
-
overlayClassName: "notion-search-overlay",
|
|
437
|
-
onRequestClose: a,
|
|
438
|
-
onAfterOpen: this._onAfterOpen
|
|
439
|
-
},
|
|
440
|
-
/* @__PURE__ */ e.createElement("div", { className: "quickFindMenu" }, /* @__PURE__ */ e.createElement("div", { className: "searchBar" }, /* @__PURE__ */ e.createElement("div", { className: "inlineIcon" }, l ? /* @__PURE__ */ e.createElement(qt, { className: "loadingIcon" }) : /* @__PURE__ */ e.createElement(vt, null)), /* @__PURE__ */ e.createElement(
|
|
441
|
-
"input",
|
|
442
|
-
{
|
|
443
|
-
className: "searchInput",
|
|
444
|
-
placeholder: "Search",
|
|
445
|
-
value: i,
|
|
446
|
-
ref: this._inputRef,
|
|
447
|
-
onInput: this._onChangeQuery
|
|
448
|
-
}
|
|
449
|
-
), i && /* @__PURE__ */ e.createElement("div", { role: "button", className: "clearButton", onClick: this._onClearQuery }, /* @__PURE__ */ e.createElement(At, { className: "clearIcon" }))), u && s && /* @__PURE__ */ e.createElement(e.Fragment, null, s.results.length ? /* @__PURE__ */ e.createElement(kt, U(h({}, c), { recordMap: s.recordMap }), /* @__PURE__ */ e.createElement("div", { className: "resultsPane" }, s.results.map((E) => {
|
|
450
|
-
var N;
|
|
451
|
-
return /* @__PURE__ */ e.createElement(
|
|
452
|
-
d.PageLink,
|
|
453
|
-
{
|
|
454
|
-
key: E.id,
|
|
455
|
-
className: "result notion-page-link",
|
|
456
|
-
href: m(E.page.id, s.recordMap)
|
|
457
|
-
},
|
|
458
|
-
/* @__PURE__ */ e.createElement(fe, { block: E.page, defaultIcon: g }),
|
|
459
|
-
((N = E.highlight) == null ? void 0 : N.html) && /* @__PURE__ */ e.createElement(
|
|
460
|
-
"div",
|
|
461
|
-
{
|
|
462
|
-
className: "notion-search-result-highlight",
|
|
463
|
-
dangerouslySetInnerHTML: {
|
|
464
|
-
__html: E.highlight.html
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
)
|
|
468
|
-
);
|
|
469
|
-
})), /* @__PURE__ */ e.createElement("footer", { className: "resultsFooter" }, /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("span", { className: "resultsCount" }, s.total), s.total === 1 ? " result" : " results"))) : /* @__PURE__ */ e.createElement("div", { className: "noResultsPane" }, /* @__PURE__ */ e.createElement("div", { className: "noResults" }, "No results"), /* @__PURE__ */ e.createElement("div", { className: "noResultsDetail" }, "Try different search terms"))), u && !s && r && /* @__PURE__ */ e.createElement("div", { className: "noResultsPane" }, /* @__PURE__ */ e.createElement("div", { className: "noResults" }, "Search error")))
|
|
470
|
-
);
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
const Yt = ({ block: t }) => /* @__PURE__ */ e.createElement("header", { className: "notion-header" }, /* @__PURE__ */ e.createElement("div", { className: "notion-nav-header" }, /* @__PURE__ */ e.createElement(Xt, { block: t }), /* @__PURE__ */ e.createElement(Jt, { block: t }))), Xt = ({ block: t, rootOnly: o = !1 }) => {
|
|
475
|
-
const { recordMap: a, mapPageUrl: l, components: i } = V(), s = e.useMemo(() => {
|
|
476
|
-
const r = It(a, t.id);
|
|
477
|
-
return o ? [r[0]].filter(Boolean) : r;
|
|
478
|
-
}, [a, t.id, o]);
|
|
479
|
-
return /* @__PURE__ */ e.createElement("div", { className: "breadcrumbs", key: "breadcrumbs" }, s.map((r, u) => {
|
|
480
|
-
if (!r) return null;
|
|
481
|
-
const c = {}, d = {
|
|
482
|
-
pageLink: i.PageLink
|
|
483
|
-
};
|
|
484
|
-
return r.active ? d.pageLink = (g) => /* @__PURE__ */ e.createElement("div", h({}, g)) : c.href = l(r.pageId), /* @__PURE__ */ e.createElement(e.Fragment, { key: r.pageId }, /* @__PURE__ */ e.createElement(d.pageLink, h({ className: `breadcrumb ${r.active && "active"}` }, c), r.icon && /* @__PURE__ */ e.createElement(pe, { className: "icon", block: r.block }), r.title && /* @__PURE__ */ e.createElement("span", { className: "title" }, r.title)), u < s.length - 1 && /* @__PURE__ */ e.createElement("span", { className: "spacer" }, "/"));
|
|
485
|
-
}));
|
|
486
|
-
}, Jt = ({ block: t, search: o, title: a = "Search" }) => {
|
|
487
|
-
const { searchNotion: l, rootPageId: i, isShowingSearch: s, onHideSearch: r, rootSpaceId: u } = V(), c = o || l, [d, g] = e.useState(s);
|
|
488
|
-
e.useEffect(() => {
|
|
489
|
-
g(s);
|
|
490
|
-
}, [s]);
|
|
491
|
-
const m = e.useCallback(() => {
|
|
492
|
-
g(!0);
|
|
493
|
-
}, []), E = e.useCallback(() => {
|
|
494
|
-
g(!1), r && r();
|
|
495
|
-
}, [r]);
|
|
496
|
-
ct("cmd+p", (n) => {
|
|
497
|
-
m(), n.preventDefault(), n.stopPropagation();
|
|
498
|
-
}), ct("cmd+k", (n) => {
|
|
499
|
-
m(), n.preventDefault(), n.stopPropagation();
|
|
500
|
-
});
|
|
501
|
-
const N = !!c;
|
|
502
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, N && /* @__PURE__ */ e.createElement("div", { role: "button", className: "breadcrumb button notion-search-button", onClick: m }, /* @__PURE__ */ e.createElement(vt, { className: "searchIcon" }), a && /* @__PURE__ */ e.createElement("span", { className: "title" }, a)), d && N && /* @__PURE__ */ e.createElement(
|
|
503
|
-
Qt,
|
|
504
|
-
{
|
|
505
|
-
isOpen: d,
|
|
506
|
-
rootBlockId: i || (t == null ? void 0 : t.id),
|
|
507
|
-
rootSpaceId: u,
|
|
508
|
-
onClose: E,
|
|
509
|
-
searchNotion: c
|
|
510
|
-
}
|
|
511
|
-
));
|
|
512
|
-
}, Kt = (t) => e.memo(function(g) {
|
|
513
|
-
var m = g, {
|
|
514
|
-
src: a,
|
|
515
|
-
alt: l,
|
|
516
|
-
width: i,
|
|
517
|
-
height: s,
|
|
518
|
-
className: r,
|
|
519
|
-
style: u,
|
|
520
|
-
layout: c
|
|
521
|
-
} = m, d = T(m, [
|
|
522
|
-
"src",
|
|
523
|
-
"alt",
|
|
524
|
-
"width",
|
|
525
|
-
"height",
|
|
526
|
-
"className",
|
|
527
|
-
"style",
|
|
528
|
-
"layout"
|
|
529
|
-
]);
|
|
530
|
-
return c || (c = i && s ? "intrinsic" : "fill"), /* @__PURE__ */ e.createElement(
|
|
531
|
-
t,
|
|
532
|
-
h({
|
|
533
|
-
className: r,
|
|
534
|
-
src: a,
|
|
535
|
-
alt: l,
|
|
536
|
-
width: c === "intrinsic" && i,
|
|
537
|
-
height: c === "intrinsic" && s,
|
|
538
|
-
objectFit: u == null ? void 0 : u.objectFit,
|
|
539
|
-
objectPosition: u == null ? void 0 : u.objectPosition,
|
|
540
|
-
layout: c
|
|
541
|
-
}, d)
|
|
542
|
-
);
|
|
543
|
-
}, zt), en = (t) => function(N) {
|
|
544
|
-
var n = N, {
|
|
545
|
-
href: a,
|
|
546
|
-
as: l,
|
|
547
|
-
passHref: i,
|
|
548
|
-
prefetch: s,
|
|
549
|
-
replace: r,
|
|
550
|
-
scroll: u,
|
|
551
|
-
shallow: c,
|
|
552
|
-
locale: d,
|
|
553
|
-
className: g,
|
|
554
|
-
style: m
|
|
555
|
-
} = n, E = T(n, [
|
|
556
|
-
"href",
|
|
557
|
-
"as",
|
|
558
|
-
"passHref",
|
|
559
|
-
"prefetch",
|
|
560
|
-
"replace",
|
|
561
|
-
"scroll",
|
|
562
|
-
"shallow",
|
|
563
|
-
"locale",
|
|
564
|
-
"className",
|
|
565
|
-
"style"
|
|
566
|
-
]);
|
|
567
|
-
return /* @__PURE__ */ e.createElement(
|
|
568
|
-
t,
|
|
569
|
-
h({
|
|
570
|
-
href: a,
|
|
571
|
-
as: l,
|
|
572
|
-
prefetch: s,
|
|
573
|
-
replace: r,
|
|
574
|
-
scroll: u,
|
|
575
|
-
shallow: c,
|
|
576
|
-
locale: d,
|
|
577
|
-
className: g,
|
|
578
|
-
style: m
|
|
579
|
-
}, E)
|
|
580
|
-
);
|
|
581
|
-
}, tn = (t) => /* @__PURE__ */ e.createElement("a", h({ target: "_blank", rel: "noopener noreferrer" }, t)), nn = e.memo(tn), an = (a) => {
|
|
582
|
-
var l = a, { href: t } = l, o = T(l, ["href"]);
|
|
583
|
-
var u, c;
|
|
584
|
-
const { recordMap: i, rootSpaceId: s } = V();
|
|
585
|
-
let r = t;
|
|
586
|
-
if (typeof t == "string" && s) {
|
|
587
|
-
const d = _e(t);
|
|
588
|
-
if (d) {
|
|
589
|
-
const g = (c = (u = i == null ? void 0 : i.block) == null ? void 0 : u[d]) == null ? void 0 : c.value;
|
|
590
|
-
(!g || g.space_id !== s) && (r = `https://notion.so/${d.replace(/-/g, "")}`);
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
return /* @__PURE__ */ e.createElement("a", h({ href: r }, o));
|
|
594
|
-
}, on = e.memo(an), rn = (t) => /* @__PURE__ */ e.createElement(Me, h({}, t)), ln = Yt, Kn = (s) => {
|
|
595
|
-
var r = s, { href: t, rel: o, target: a, title: l } = r, i = T(r, ["href", "rel", "target", "title"]);
|
|
596
|
-
return /* @__PURE__ */ e.createElement("span", h({}, i));
|
|
597
|
-
}, re = (t) => () => (console.warn(`Warning: using empty component "${t}" (you should override this in NotionRenderer.components)`), null), O = (t, o) => o(), bt = {
|
|
598
|
-
Image: null,
|
|
599
|
-
// disable custom images by default
|
|
600
|
-
Link: nn,
|
|
601
|
-
PageLink: on,
|
|
602
|
-
Checkbox: Tt,
|
|
603
|
-
Callout: void 0,
|
|
604
|
-
// use the built-in callout rendering by default
|
|
605
|
-
Code: re("Code"),
|
|
606
|
-
Equation: re("Equation"),
|
|
607
|
-
Collection: re("Collection"),
|
|
608
|
-
Property: void 0,
|
|
609
|
-
// use the built-in property rendering by default
|
|
610
|
-
propertyTextValue: O,
|
|
611
|
-
propertySelectValue: O,
|
|
612
|
-
propertyRelationValue: O,
|
|
613
|
-
propertyFormulaValue: O,
|
|
614
|
-
propertyTitleValue: O,
|
|
615
|
-
propertyPersonValue: O,
|
|
616
|
-
propertyFileValue: O,
|
|
617
|
-
propertyCheckboxValue: O,
|
|
618
|
-
propertyUrlValue: O,
|
|
619
|
-
propertyEmailValue: O,
|
|
620
|
-
propertyPhoneNumberValue: O,
|
|
621
|
-
propertyNumberValue: O,
|
|
622
|
-
propertyLastEditedTimeValue: O,
|
|
623
|
-
propertyCreatedTimeValue: O,
|
|
624
|
-
propertyDateValue: O,
|
|
625
|
-
Pdf: re("Pdf"),
|
|
626
|
-
Tweet: re("Tweet"),
|
|
627
|
-
Modal: re("Modal"),
|
|
628
|
-
Header: ln,
|
|
629
|
-
Embed: rn
|
|
630
|
-
}, Nt = {
|
|
631
|
-
recordMap: {
|
|
632
|
-
block: {},
|
|
633
|
-
collection: {},
|
|
634
|
-
collection_view: {},
|
|
635
|
-
collection_query: {},
|
|
636
|
-
notion_user: {},
|
|
637
|
-
signed_urls: {}
|
|
638
|
-
},
|
|
639
|
-
components: bt,
|
|
640
|
-
mapPageUrl: Et(),
|
|
641
|
-
mapImageUrl: ht,
|
|
642
|
-
searchNotion: null,
|
|
643
|
-
isShowingSearch: !1,
|
|
644
|
-
onHideSearch: null,
|
|
645
|
-
fullPage: !1,
|
|
646
|
-
darkMode: !1,
|
|
647
|
-
previewImages: !1,
|
|
648
|
-
forceCustomImages: !1,
|
|
649
|
-
showCollectionViewDropdown: !0,
|
|
650
|
-
linkTableTitleProperties: !0,
|
|
651
|
-
isLinkCollectionToUrlProperty: !1,
|
|
652
|
-
showTableOfContents: !1,
|
|
653
|
-
minTableOfContentsItems: 3,
|
|
654
|
-
defaultPageIcon: null,
|
|
655
|
-
defaultPageCover: null,
|
|
656
|
-
defaultPageCoverPosition: 0.5,
|
|
657
|
-
zoom: null
|
|
658
|
-
}, Pe = e.createContext(Nt), kt = (u) => {
|
|
659
|
-
var c = u, {
|
|
660
|
-
components: t = {},
|
|
661
|
-
children: o,
|
|
662
|
-
mapPageUrl: a,
|
|
663
|
-
mapImageUrl: l,
|
|
664
|
-
rootPageId: i,
|
|
665
|
-
rootSpaceId: s
|
|
666
|
-
} = c, r = T(c, [
|
|
667
|
-
"components",
|
|
668
|
-
"children",
|
|
669
|
-
"mapPageUrl",
|
|
670
|
-
"mapImageUrl",
|
|
671
|
-
"rootPageId",
|
|
672
|
-
"rootSpaceId"
|
|
673
|
-
]);
|
|
674
|
-
for (const m of Object.keys(r)) r[m] === void 0 && delete r[m];
|
|
675
|
-
const d = e.useMemo(() => {
|
|
676
|
-
const m = h({}, t);
|
|
677
|
-
if (m.nextImage && (m.Image = Kt(m.nextImage)), m.nextLink) {
|
|
678
|
-
const E = en(m.nextLink);
|
|
679
|
-
m.nextLink = E, m.PageLink || (m.PageLink = E), m.Link || (m.Link = E);
|
|
680
|
-
}
|
|
681
|
-
for (const E of Object.keys(m)) m[E] || delete m[E];
|
|
682
|
-
return m;
|
|
683
|
-
}, [t]), g = e.useMemo(
|
|
684
|
-
() => U(h(h({}, Nt), r), {
|
|
685
|
-
rootPageId: i,
|
|
686
|
-
rootSpaceId: s,
|
|
687
|
-
mapPageUrl: a != null ? a : Et(i),
|
|
688
|
-
mapImageUrl: l != null ? l : ht,
|
|
689
|
-
components: h(h({}, bt), d)
|
|
690
|
-
}),
|
|
691
|
-
[l, a, d, i, s, r]
|
|
692
|
-
);
|
|
693
|
-
return /* @__PURE__ */ e.createElement(Pe.Provider, { value: g }, o);
|
|
694
|
-
}, cn = Pe.Consumer, V = () => e.useContext(Pe), sn = (t) => Object.keys(t).map((o) => `${encodeURIComponent(o)}=${encodeURIComponent(t[o])}`).join("&"), mn = ({
|
|
695
|
-
id: t,
|
|
696
|
-
defaultPlay: o = !1,
|
|
697
|
-
mute: a = !1,
|
|
698
|
-
lazyImage: l = !1,
|
|
699
|
-
iframeTitle: i = "YouTube video",
|
|
700
|
-
alt: s = "Video preview",
|
|
701
|
-
params: r = {},
|
|
702
|
-
adLinksPreconnect: u = !0,
|
|
703
|
-
style: c,
|
|
704
|
-
className: d
|
|
705
|
-
}) => {
|
|
706
|
-
const g = a || o ? "1" : "0", m = e.useMemo(() => sn(h({ autoplay: "1", mute: g }, r)), [g, r]), N = `https://i.ytimg.com/vi/${t}/hqdefault.jpg`, n = "https://www.youtube-nocookie.com", p = `${n}/embed/${t}?${m}`, [x, M] = e.useState(!1), [$, H] = e.useState(o), [w, y] = e.useState(!1), f = e.useCallback(() => {
|
|
707
|
-
x || M(!0);
|
|
708
|
-
}, [x]), v = e.useCallback(() => {
|
|
709
|
-
$ || H(!0);
|
|
710
|
-
}, [$]), _ = e.useCallback(() => {
|
|
711
|
-
y(!0);
|
|
712
|
-
}, []);
|
|
713
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("link", { rel: "preload", href: N, as: "image" }), x && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("link", { rel: "preconnect", href: n }), /* @__PURE__ */ e.createElement("link", { rel: "preconnect", href: "https://www.google.com" })), x && u && /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("link", { rel: "preconnect", href: "https://static.doubleclick.net" }), /* @__PURE__ */ e.createElement("link", { rel: "preconnect", href: "https://googleads.g.doubleclick.net" })), /* @__PURE__ */ e.createElement(
|
|
714
|
-
"div",
|
|
715
|
-
{
|
|
716
|
-
onClick: v,
|
|
717
|
-
onPointerOver: f,
|
|
718
|
-
className: `notion-yt-lite
|
|
719
|
-
${w && "notion-yt-loaded"}
|
|
720
|
-
${$ && "notion-yt-initialized"}
|
|
721
|
-
${d || ""}`,
|
|
722
|
-
style: c
|
|
723
|
-
},
|
|
724
|
-
/* @__PURE__ */ e.createElement("img", { src: N, className: "notion-yt-thumbnail", loading: l ? "lazy" : void 0, alt: s }),
|
|
725
|
-
/* @__PURE__ */ e.createElement("div", { className: "notion-yt-playbtn" }),
|
|
726
|
-
$ && /* @__PURE__ */ e.createElement(
|
|
727
|
-
"iframe",
|
|
728
|
-
{
|
|
729
|
-
width: "560",
|
|
730
|
-
height: "315",
|
|
731
|
-
frameBorder: "0",
|
|
732
|
-
allow: "accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",
|
|
733
|
-
allowFullScreen: !0,
|
|
734
|
-
title: i,
|
|
735
|
-
src: p,
|
|
736
|
-
onLoad: _
|
|
737
|
-
}
|
|
738
|
-
)
|
|
739
|
-
));
|
|
740
|
-
}, un = typeof window == "undefined", dn = [
|
|
741
|
-
"video",
|
|
742
|
-
"image",
|
|
743
|
-
"embed",
|
|
744
|
-
"figma",
|
|
745
|
-
"typeform",
|
|
746
|
-
"excalidraw",
|
|
747
|
-
"maps",
|
|
748
|
-
"tweet",
|
|
749
|
-
"pdf",
|
|
750
|
-
"gist",
|
|
751
|
-
"codepen",
|
|
752
|
-
"drive"
|
|
753
|
-
], pn = ({ block: t, zoomable: o = !0, children: a }) => {
|
|
754
|
-
var g, m, E, N, n, p, x, M, $, H;
|
|
755
|
-
const { recordMap: l, mapImageUrl: i, components: s } = V();
|
|
756
|
-
if (!t || !dn.includes(t.type)) return null;
|
|
757
|
-
const r = {
|
|
758
|
-
position: "relative",
|
|
759
|
-
display: "flex",
|
|
760
|
-
justifyContent: "center",
|
|
761
|
-
alignSelf: "center",
|
|
762
|
-
width: "100%",
|
|
763
|
-
maxWidth: "100%",
|
|
764
|
-
flexDirection: "column"
|
|
765
|
-
}, u = {};
|
|
766
|
-
if (t.format) {
|
|
767
|
-
const { block_aspect_ratio: w, block_height: y, block_width: f, block_full_width: v, block_page_width: _, block_preserve_scale: L } = t.format;
|
|
768
|
-
if (v || _)
|
|
769
|
-
v ? r.width = "100vw" : r.width = "100%", t.type === "video" ? y ? r.height = y : w ? r.paddingBottom = `${w * 100}%` : L && (r.objectFit = "contain") : w && t.type !== "image" ? r.paddingBottom = `${w * 100}%` : y ? r.height = y : L && (t.type === "image" ? r.height = "100%" : (r.paddingBottom = "75%", r.minHeight = 100));
|
|
770
|
-
else {
|
|
771
|
-
switch ((g = t.format) == null ? void 0 : g.block_alignment) {
|
|
772
|
-
case "center": {
|
|
773
|
-
r.alignSelf = "center";
|
|
774
|
-
break;
|
|
775
|
-
}
|
|
776
|
-
case "left": {
|
|
777
|
-
r.alignSelf = "start";
|
|
778
|
-
break;
|
|
779
|
-
}
|
|
780
|
-
case "right": {
|
|
781
|
-
r.alignSelf = "end";
|
|
782
|
-
break;
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
f && (r.width = f), L && t.type !== "image" ? (r.paddingBottom = "50%", r.minHeight = 100) : y && t.type !== "image" && (r.height = y);
|
|
786
|
-
}
|
|
787
|
-
t.type === "image" ? u.objectFit = "cover" : L && (u.objectFit = "contain");
|
|
788
|
-
}
|
|
789
|
-
let c = ((m = l.signed_urls) == null ? void 0 : m[t.id]) || ((n = (N = (E = t.properties) == null ? void 0 : E.source) == null ? void 0 : N[0]) == null ? void 0 : n[0]), d = null;
|
|
790
|
-
if (!c) return null;
|
|
791
|
-
if (t.type === "tweet") {
|
|
792
|
-
const w = c;
|
|
793
|
-
if (!w) return null;
|
|
794
|
-
const y = w.split("?")[0].split("/").pop();
|
|
795
|
-
if (!y) return null;
|
|
796
|
-
d = /* @__PURE__ */ e.createElement(
|
|
797
|
-
"div",
|
|
798
|
-
{
|
|
799
|
-
style: U(h({}, u), {
|
|
800
|
-
maxWidth: 420,
|
|
801
|
-
width: "100%",
|
|
802
|
-
marginLeft: "auto",
|
|
803
|
-
marginRight: "auto"
|
|
804
|
-
})
|
|
805
|
-
},
|
|
806
|
-
/* @__PURE__ */ e.createElement(s.Tweet, { id: y })
|
|
807
|
-
);
|
|
808
|
-
} else if (t.type === "pdf")
|
|
809
|
-
r.overflow = "auto", r.background = "rgb(226, 226, 226)", r.display = "block", r.padding || (r.padding = "8px 16px"), un || (d = /* @__PURE__ */ e.createElement(s.Pdf, { file: c }));
|
|
810
|
-
else if (t.type === "embed" || t.type === "video" || t.type === "figma" || t.type === "typeform" || t.type === "gist" || t.type === "maps" || t.type === "excalidraw" || t.type === "codepen" || t.type === "drive")
|
|
811
|
-
if (t.type === "video" && c && c.indexOf("youtube") < 0 && c.indexOf("youtu.be") < 0 && c.indexOf("vimeo") < 0 && c.indexOf("wistia") < 0 && c.indexOf("loom") < 0 && c.indexOf("videoask") < 0 && c.indexOf("getcloudapp") < 0)
|
|
812
|
-
r.paddingBottom = void 0, d = /* @__PURE__ */ e.createElement("video", { playsInline: !0, controls: !0, preload: "metadata", style: u, src: c, title: t.type });
|
|
813
|
-
else {
|
|
814
|
-
let w = ((p = t.format) == null ? void 0 : p.display_source) || c;
|
|
815
|
-
if (w) {
|
|
816
|
-
const y = t.type === "video" ? Dt(w) : null;
|
|
817
|
-
y ? d = /* @__PURE__ */ e.createElement(mn, { id: y, style: u, className: "notion-asset-object-fit" }) : t.type === "gist" ? (w.endsWith(".pibb") || (w = `${w}.pibb`), u.width = "100%", r.paddingBottom = "50%", d = /* @__PURE__ */ e.createElement(
|
|
818
|
-
"iframe",
|
|
819
|
-
{
|
|
820
|
-
style: u,
|
|
821
|
-
className: "notion-asset-object-fit",
|
|
822
|
-
src: w,
|
|
823
|
-
title: "GitHub Gist",
|
|
824
|
-
frameBorder: "0",
|
|
825
|
-
loading: "lazy",
|
|
826
|
-
scrolling: "auto"
|
|
827
|
-
}
|
|
828
|
-
)) : d = /* @__PURE__ */ e.createElement(
|
|
829
|
-
"iframe",
|
|
830
|
-
{
|
|
831
|
-
className: "notion-asset-object-fit",
|
|
832
|
-
style: u,
|
|
833
|
-
src: w,
|
|
834
|
-
title: `iframe ${t.type}`,
|
|
835
|
-
frameBorder: "0",
|
|
836
|
-
allowFullScreen: !0,
|
|
837
|
-
loading: "lazy",
|
|
838
|
-
scrolling: "auto"
|
|
839
|
-
}
|
|
840
|
-
);
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
else if (t.type === "image") {
|
|
844
|
-
c.includes("file.notion.so") && (c = ($ = (M = (x = t.properties) == null ? void 0 : x.source) == null ? void 0 : M[0]) == null ? void 0 : $[0]);
|
|
845
|
-
const w = i(c, t), f = le((H = t.properties) == null ? void 0 : H.caption) || "notion image";
|
|
846
|
-
d = /* @__PURE__ */ e.createElement(ie, { src: w, alt: f, zoomable: o, height: r.height, style: u });
|
|
847
|
-
}
|
|
848
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { style: r }, d, t.type === "image" && a), t.type !== "image" && a);
|
|
849
|
-
}, fn = { width: "100%" }, Me = ({ blockId: t, block: o }) => {
|
|
850
|
-
var d, g, m, E, N, n;
|
|
851
|
-
const a = o, { components: l, mapPageUrl: i, rootDomain: s, zoom: r } = V();
|
|
852
|
-
let u = !1;
|
|
853
|
-
if (o.type === "image") {
|
|
854
|
-
const p = (m = (g = (d = a == null ? void 0 : a.properties) == null ? void 0 : d.caption) == null ? void 0 : g[0]) == null ? void 0 : m[0];
|
|
855
|
-
if (p) {
|
|
856
|
-
const x = _e(p, { uuid: !0 });
|
|
857
|
-
(p.charAt(0) === "/" && x || gn(p)) && (u = !0);
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
const c = /* @__PURE__ */ e.createElement(
|
|
861
|
-
"figure",
|
|
862
|
-
{
|
|
863
|
-
className: `notion-asset-wrapper
|
|
864
|
-
notion-asset-wrapper-${o.type}
|
|
865
|
-
${(E = a.format) != null && E.block_full_width ? "notion-asset-wrapper-full" : ""}
|
|
866
|
-
${t}`
|
|
867
|
-
},
|
|
868
|
-
/* @__PURE__ */ e.createElement(pn, { block: a, zoomable: r && !u }, ((N = a == null ? void 0 : a.properties) == null ? void 0 : N.caption) && !u && /* @__PURE__ */ e.createElement("figcaption", { className: "notion-asset-caption" }, /* @__PURE__ */ e.createElement(P, { value: a.properties.caption, block: o })))
|
|
869
|
-
);
|
|
870
|
-
if (u) {
|
|
871
|
-
const p = (n = a == null ? void 0 : a.properties) == null ? void 0 : n.caption[0][0], x = _e(p, { uuid: !0 }), M = p.charAt(0) === "/" && x, $ = hn(p);
|
|
872
|
-
return /* @__PURE__ */ e.createElement(
|
|
873
|
-
l.PageLink,
|
|
874
|
-
{
|
|
875
|
-
style: fn,
|
|
876
|
-
href: M ? i(x) : p,
|
|
877
|
-
target: $ && $ !== s && !p.startsWith("/") ? "blank_" : null
|
|
878
|
-
},
|
|
879
|
-
c
|
|
880
|
-
);
|
|
881
|
-
}
|
|
882
|
-
return c;
|
|
883
|
-
};
|
|
884
|
-
function gn(t) {
|
|
885
|
-
return !!new RegExp(
|
|
886
|
-
"^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$",
|
|
887
|
-
"i"
|
|
888
|
-
).test(t);
|
|
889
|
-
}
|
|
890
|
-
function hn(t) {
|
|
43
|
+
const { components: o, mapImageUrl: m } = ce(), r = (g = n.format) == null ? void 0 : g.drive_properties;
|
|
44
|
+
if (!r) return null;
|
|
45
|
+
let d;
|
|
891
46
|
try {
|
|
892
|
-
|
|
893
|
-
} catch (
|
|
894
|
-
return "";
|
|
47
|
+
d = new URL(r.url).hostname;
|
|
48
|
+
} catch (N) {
|
|
895
49
|
}
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
var i, s, r;
|
|
899
|
-
const { recordMap: a } = V(), l = a.signed_urls[t.id] || ((r = (s = (i = t.properties) == null ? void 0 : i.source) == null ? void 0 : s[0]) == null ? void 0 : r[0]);
|
|
900
|
-
return /* @__PURE__ */ e.createElement("div", { className: `notion-audio ${o || ""}` }, /* @__PURE__ */ e.createElement("audio", { controls: !0, preload: "none", src: l }));
|
|
901
|
-
}, vn = (t) => {
|
|
902
|
-
const l = t, { className: o } = l, a = T(l, ["className"]);
|
|
903
|
-
return /* @__PURE__ */ e.createElement("svg", U(h({ className: o }, a), { viewBox: "0 0 30 30" }), /* @__PURE__ */ e.createElement("path", { d: "M22,8v12c0,3.866-3.134,7-7,7s-7-3.134-7-7V8c0-2.762,2.238-5,5-5s5,2.238,5,5v12c0,1.657-1.343,3-3,3s-3-1.343-3-3V8h-2v12c0,2.762,2.238,5,5,5s5-2.238,5-5V8c0-3.866-3.134-7-7-7S6,4.134,6,8v12c0,4.971,4.029,9,9,9s9-4.029,9-9V8H22z" }));
|
|
904
|
-
}, yn = ({ block: t, className: o }) => {
|
|
905
|
-
var s, r, u, c, d;
|
|
906
|
-
const { components: a, recordMap: l } = V(), i = l.signed_urls[t.id] || ((u = (r = (s = t.properties) == null ? void 0 : s.source) == null ? void 0 : r[0]) == null ? void 0 : u[0]);
|
|
907
|
-
return /* @__PURE__ */ e.createElement("div", { className: `notion-file ${o || ""}` }, /* @__PURE__ */ e.createElement(a.Link, { className: "notion-file-link", href: i, target: "_blank", rel: "noopener noreferrer" }, /* @__PURE__ */ e.createElement(vn, { className: "notion-file-icon" }), /* @__PURE__ */ e.createElement("div", { className: "notion-file-info" }, /* @__PURE__ */ e.createElement("div", { className: "notion-file-title" }, /* @__PURE__ */ e.createElement(P, { value: ((c = t.properties) == null ? void 0 : c.title) || [["File"]], block: t })), ((d = t.properties) == null ? void 0 : d.size) && /* @__PURE__ */ e.createElement("div", { className: "notion-file-size" }, /* @__PURE__ */ e.createElement(P, { value: t.properties.size, block: t })))));
|
|
908
|
-
}, bn = ({ block: t, className: o }) => {
|
|
909
|
-
var r;
|
|
910
|
-
const { components: a, mapImageUrl: l } = V(), i = (r = t.format) == null ? void 0 : r.drive_properties;
|
|
911
|
-
if (!i) return null;
|
|
912
|
-
let s;
|
|
913
|
-
try {
|
|
914
|
-
s = new URL(i.url).hostname;
|
|
915
|
-
} catch (u) {
|
|
916
|
-
}
|
|
917
|
-
return /* @__PURE__ */ e.createElement("div", { className: `notion-google-drive ${o || ""}` }, /* @__PURE__ */ e.createElement(a.Link, { className: "notion-google-drive-link", href: i.url, target: "_blank", rel: "noopener noreferrer" }, /* @__PURE__ */ e.createElement("div", { className: "notion-google-drive-preview" }, /* @__PURE__ */ e.createElement(
|
|
918
|
-
Se,
|
|
50
|
+
return /* @__PURE__ */ e.createElement("div", { className: `notion-google-drive ${a || ""}` }, /* @__PURE__ */ e.createElement(o.Link, { className: "notion-google-drive-link", href: r.url, target: "_blank", rel: "noopener noreferrer" }, /* @__PURE__ */ e.createElement("div", { className: "notion-google-drive-preview" }, /* @__PURE__ */ e.createElement(
|
|
51
|
+
mt,
|
|
919
52
|
{
|
|
920
|
-
src:
|
|
921
|
-
alt:
|
|
53
|
+
src: m(r.thumbnail, n),
|
|
54
|
+
alt: r.title || "Google Drive Document",
|
|
922
55
|
loading: "lazy"
|
|
923
56
|
}
|
|
924
|
-
)), /* @__PURE__ */ e.createElement("div", { className: "notion-google-drive-body" },
|
|
57
|
+
)), /* @__PURE__ */ e.createElement("div", { className: "notion-google-drive-body" }, r.title && /* @__PURE__ */ e.createElement("div", { className: "notion-google-drive-body-title" }, r.title), r.icon && d && /* @__PURE__ */ e.createElement("div", { className: "notion-google-drive-body-source" }, r.icon && /* @__PURE__ */ e.createElement(
|
|
925
58
|
"div",
|
|
926
59
|
{
|
|
927
60
|
className: "notion-google-drive-body-source-icon",
|
|
928
61
|
style: {
|
|
929
|
-
backgroundImage: `url(${
|
|
62
|
+
backgroundImage: `url(${r.icon})`
|
|
930
63
|
}
|
|
931
64
|
}
|
|
932
|
-
),
|
|
65
|
+
), d && /* @__PURE__ */ e.createElement("div", { className: "notion-google-drive-body-source-domain" }, d)))));
|
|
933
66
|
};
|
|
934
|
-
var ke
|
|
935
|
-
function
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
var
|
|
939
|
-
|
|
940
|
-
if (st) return Le;
|
|
941
|
-
st = 1;
|
|
942
|
-
var t = "Expected a function", o = NaN, a = "[object Symbol]", l = /^\s+|\s+$/g, i = /^[-+]0x[0-9a-f]+$/i, s = /^0b[01]+$/i, r = /^0o[0-7]+$/i, u = parseInt, c = typeof ke == "object" && ke && ke.Object === Object && ke, d = typeof self == "object" && self && self.Object === Object && self, g = c || d || Function("return this")(), m = Object.prototype, E = m.toString, N = Math.max, n = Math.min, p = function() {
|
|
943
|
-
return g.Date.now();
|
|
67
|
+
var ke, et;
|
|
68
|
+
function ht() {
|
|
69
|
+
if (et) return ke;
|
|
70
|
+
et = 1;
|
|
71
|
+
var n = "Expected a function", a = NaN, o = "[object Symbol]", m = /^\s+|\s+$/g, r = /^[-+]0x[0-9a-f]+$/i, d = /^0b[01]+$/i, g = /^0o[0-7]+$/i, N = parseInt, _ = typeof ve == "object" && ve && ve.Object === Object && ve, v = typeof self == "object" && self && self.Object === Object && self, y = _ || v || Function("return this")(), T = Object.prototype, O = T.toString, L = Math.max, t = Math.min, f = function() {
|
|
72
|
+
return y.Date.now();
|
|
944
73
|
};
|
|
945
|
-
function
|
|
946
|
-
var
|
|
947
|
-
if (typeof
|
|
948
|
-
throw new TypeError(
|
|
949
|
-
|
|
950
|
-
function
|
|
951
|
-
var
|
|
952
|
-
return
|
|
953
|
-
}
|
|
954
|
-
function
|
|
955
|
-
return
|
|
956
|
-
}
|
|
957
|
-
function
|
|
958
|
-
var
|
|
959
|
-
return
|
|
960
|
-
}
|
|
961
|
-
function
|
|
962
|
-
var
|
|
963
|
-
return
|
|
964
|
-
}
|
|
965
|
-
function
|
|
966
|
-
var
|
|
967
|
-
if (
|
|
968
|
-
return
|
|
969
|
-
|
|
970
|
-
}
|
|
971
|
-
function
|
|
972
|
-
return
|
|
973
|
-
}
|
|
974
|
-
function
|
|
975
|
-
|
|
976
|
-
}
|
|
977
|
-
function
|
|
978
|
-
return
|
|
979
|
-
}
|
|
980
|
-
function
|
|
981
|
-
var
|
|
982
|
-
if (
|
|
983
|
-
if (
|
|
984
|
-
return
|
|
985
|
-
if (
|
|
986
|
-
return
|
|
74
|
+
function B(i, u, h) {
|
|
75
|
+
var k, I, q, c, w, S, H = 0, te = !1, A = !1, G = !0;
|
|
76
|
+
if (typeof i != "function")
|
|
77
|
+
throw new TypeError(n);
|
|
78
|
+
u = R(u) || 0, M(h) && (te = !!h.leading, A = "maxWait" in h, q = A ? L(R(h.maxWait) || 0, u) : q, G = "trailing" in h ? !!h.trailing : G);
|
|
79
|
+
function Y(p) {
|
|
80
|
+
var P = k, F = I;
|
|
81
|
+
return k = I = void 0, H = p, c = i.apply(F, P), c;
|
|
82
|
+
}
|
|
83
|
+
function se(p) {
|
|
84
|
+
return H = p, w = setTimeout(z, u), te ? Y(p) : c;
|
|
85
|
+
}
|
|
86
|
+
function me(p) {
|
|
87
|
+
var P = p - S, F = p - H, ae = u - P;
|
|
88
|
+
return A ? t(ae, q - F) : ae;
|
|
89
|
+
}
|
|
90
|
+
function ne(p) {
|
|
91
|
+
var P = p - S, F = p - H;
|
|
92
|
+
return S === void 0 || P >= u || P < 0 || A && F >= q;
|
|
93
|
+
}
|
|
94
|
+
function z() {
|
|
95
|
+
var p = f();
|
|
96
|
+
if (ne(p))
|
|
97
|
+
return oe(p);
|
|
98
|
+
w = setTimeout(z, me(p));
|
|
99
|
+
}
|
|
100
|
+
function oe(p) {
|
|
101
|
+
return w = void 0, G && k ? Y(p) : (k = I = void 0, c);
|
|
102
|
+
}
|
|
103
|
+
function de() {
|
|
104
|
+
w !== void 0 && clearTimeout(w), H = 0, k = S = I = w = void 0;
|
|
105
|
+
}
|
|
106
|
+
function ue() {
|
|
107
|
+
return w === void 0 ? c : oe(f());
|
|
108
|
+
}
|
|
109
|
+
function Z() {
|
|
110
|
+
var p = f(), P = ne(p);
|
|
111
|
+
if (k = arguments, I = this, S = p, P) {
|
|
112
|
+
if (w === void 0)
|
|
113
|
+
return se(S);
|
|
114
|
+
if (A)
|
|
115
|
+
return w = setTimeout(z, u), Y(S);
|
|
987
116
|
}
|
|
988
|
-
return
|
|
117
|
+
return w === void 0 && (w = setTimeout(z, u)), c;
|
|
989
118
|
}
|
|
990
|
-
return
|
|
119
|
+
return Z.cancel = de, Z.flush = ue, Z;
|
|
991
120
|
}
|
|
992
|
-
function
|
|
993
|
-
var
|
|
994
|
-
if (typeof
|
|
995
|
-
throw new TypeError(
|
|
996
|
-
return
|
|
997
|
-
leading:
|
|
998
|
-
maxWait:
|
|
999
|
-
trailing:
|
|
121
|
+
function V(i, u, h) {
|
|
122
|
+
var k = !0, I = !0;
|
|
123
|
+
if (typeof i != "function")
|
|
124
|
+
throw new TypeError(n);
|
|
125
|
+
return M(h) && (k = "leading" in h ? !!h.leading : k, I = "trailing" in h ? !!h.trailing : I), B(i, u, {
|
|
126
|
+
leading: k,
|
|
127
|
+
maxWait: u,
|
|
128
|
+
trailing: I
|
|
1000
129
|
});
|
|
1001
130
|
}
|
|
1002
|
-
function
|
|
1003
|
-
var
|
|
1004
|
-
return !!
|
|
131
|
+
function M(i) {
|
|
132
|
+
var u = typeof i;
|
|
133
|
+
return !!i && (u == "object" || u == "function");
|
|
1005
134
|
}
|
|
1006
|
-
function
|
|
1007
|
-
return !!
|
|
135
|
+
function Q(i) {
|
|
136
|
+
return !!i && typeof i == "object";
|
|
1008
137
|
}
|
|
1009
|
-
function
|
|
1010
|
-
return typeof
|
|
138
|
+
function ee(i) {
|
|
139
|
+
return typeof i == "symbol" || Q(i) && O.call(i) == o;
|
|
1011
140
|
}
|
|
1012
|
-
function
|
|
1013
|
-
if (typeof
|
|
1014
|
-
return
|
|
1015
|
-
if (
|
|
1016
|
-
return
|
|
1017
|
-
if (
|
|
1018
|
-
var
|
|
1019
|
-
|
|
1020
|
-
}
|
|
1021
|
-
if (typeof
|
|
1022
|
-
return
|
|
1023
|
-
|
|
1024
|
-
var
|
|
1025
|
-
return
|
|
141
|
+
function R(i) {
|
|
142
|
+
if (typeof i == "number")
|
|
143
|
+
return i;
|
|
144
|
+
if (ee(i))
|
|
145
|
+
return a;
|
|
146
|
+
if (M(i)) {
|
|
147
|
+
var u = typeof i.valueOf == "function" ? i.valueOf() : i;
|
|
148
|
+
i = M(u) ? u + "" : u;
|
|
149
|
+
}
|
|
150
|
+
if (typeof i != "string")
|
|
151
|
+
return i === 0 ? i : +i;
|
|
152
|
+
i = i.replace(m, "");
|
|
153
|
+
var h = d.test(i);
|
|
154
|
+
return h || g.test(i) ? N(i.slice(2), h ? 2 : 8) : r.test(i) ? a : +i;
|
|
1026
155
|
}
|
|
1027
|
-
return
|
|
156
|
+
return ke = V, ke;
|
|
1028
157
|
}
|
|
1029
|
-
var
|
|
1030
|
-
const
|
|
1031
|
-
const
|
|
1032
|
-
() =>
|
|
1033
|
-
const
|
|
1034
|
-
let
|
|
1035
|
-
for (let
|
|
1036
|
-
const
|
|
1037
|
-
if (!
|
|
1038
|
-
|
|
1039
|
-
const
|
|
1040
|
-
if (
|
|
1041
|
-
|
|
158
|
+
var Nt = ht();
|
|
159
|
+
const kt = /* @__PURE__ */ pt(Nt), _t = ({ toc: n, activeSection: a, setActiveSection: o, pageAside: m, hasToc: r, hasAside: d, className: g }) => {
|
|
160
|
+
const _ = e.useMemo(
|
|
161
|
+
() => kt(() => {
|
|
162
|
+
const v = document.getElementsByClassName("notion-h");
|
|
163
|
+
let y = null, T = a;
|
|
164
|
+
for (let O = 0; O < v.length; ++O) {
|
|
165
|
+
const L = v[O];
|
|
166
|
+
if (!L || !(L instanceof Element)) continue;
|
|
167
|
+
T || (T = L.getAttribute("data-id"));
|
|
168
|
+
const t = L.getBoundingClientRect(), f = y ? t.top - y.bottom : 0, B = Math.max(150, f / 4);
|
|
169
|
+
if (t.top - B < 0) {
|
|
170
|
+
T = L.getAttribute("data-id"), y = t;
|
|
1042
171
|
continue;
|
|
1043
172
|
}
|
|
1044
173
|
break;
|
|
1045
174
|
}
|
|
1046
|
-
|
|
175
|
+
o(T);
|
|
1047
176
|
}, 100),
|
|
1048
177
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1049
178
|
[
|
|
1050
179
|
// explicitly not taking a dependency on activeSection
|
|
1051
|
-
|
|
180
|
+
o
|
|
1052
181
|
]
|
|
1053
182
|
);
|
|
1054
183
|
return e.useEffect(() => {
|
|
1055
|
-
if (
|
|
1056
|
-
return window.addEventListener("scroll",
|
|
1057
|
-
window.removeEventListener("scroll",
|
|
184
|
+
if (r)
|
|
185
|
+
return window.addEventListener("scroll", _), _(), () => {
|
|
186
|
+
window.removeEventListener("scroll", _);
|
|
1058
187
|
};
|
|
1059
|
-
}, [
|
|
1060
|
-
const
|
|
188
|
+
}, [r, _]), d ? /* @__PURE__ */ e.createElement("aside", { className: `notion-aside ${g || ""}` }, r && /* @__PURE__ */ e.createElement("div", { className: "notion-aside-table-of-contents" }, /* @__PURE__ */ e.createElement("div", { className: "notion-aside-table-of-contents-header" }, "Table of Contents"), /* @__PURE__ */ e.createElement("nav", { className: "notion-table-of-contents" }, n.map((v) => {
|
|
189
|
+
const y = Ee(v.id);
|
|
1061
190
|
return /* @__PURE__ */ e.createElement(
|
|
1062
191
|
"a",
|
|
1063
192
|
{
|
|
1064
|
-
key:
|
|
1065
|
-
href: `#${
|
|
193
|
+
key: y,
|
|
194
|
+
href: `#${y}`,
|
|
1066
195
|
className: `notion-table-of-contents-item
|
|
1067
|
-
notion-table-of-contents-item-indent-level-${
|
|
1068
|
-
${
|
|
196
|
+
notion-table-of-contents-item-indent-level-${v.indentLevel}
|
|
197
|
+
${a === y && "notion-table-of-contents-active-item"}`
|
|
1069
198
|
},
|
|
1070
199
|
/* @__PURE__ */ e.createElement(
|
|
1071
200
|
"span",
|
|
@@ -1073,158 +202,158 @@ const _n = /* @__PURE__ */ Nn(Cn), wn = ({ toc: t, activeSection: o, setActiveSe
|
|
|
1073
202
|
className: "notion-table-of-contents-item-body",
|
|
1074
203
|
style: {
|
|
1075
204
|
display: "inline-block",
|
|
1076
|
-
marginLeft:
|
|
205
|
+
marginLeft: v.indentLevel * 16
|
|
1077
206
|
}
|
|
1078
207
|
},
|
|
1079
|
-
|
|
208
|
+
v.text
|
|
1080
209
|
)
|
|
1081
210
|
);
|
|
1082
|
-
}))),
|
|
1083
|
-
},
|
|
1084
|
-
var
|
|
1085
|
-
if (!
|
|
1086
|
-
return process.env.NODE_ENV !== "production" && console.warn("missing sync pointer block",
|
|
1087
|
-
const
|
|
1088
|
-
return
|
|
1089
|
-
}, $
|
|
1090
|
-
const
|
|
1091
|
-
return /* @__PURE__ */ e.createElement("svg",
|
|
211
|
+
}))), m) : null;
|
|
212
|
+
}, yt = ({ block: n, level: a }) => {
|
|
213
|
+
var r, d;
|
|
214
|
+
if (!n)
|
|
215
|
+
return process.env.NODE_ENV !== "production" && console.warn("missing sync pointer block", n.id), null;
|
|
216
|
+
const o = n, m = (d = (r = o == null ? void 0 : o.format) == null ? void 0 : r.transclusion_reference_pointer) == null ? void 0 : d.id;
|
|
217
|
+
return m ? /* @__PURE__ */ e.createElement(_e, { key: m, level: a, blockId: m }) : null;
|
|
218
|
+
}, $t = (n) => {
|
|
219
|
+
const m = n, { className: a } = m, o = le(m, ["className"]);
|
|
220
|
+
return /* @__PURE__ */ e.createElement("svg", be(W({ className: a }, o), { viewBox: "0 0 16 16", width: "16", height: "16" }), /* @__PURE__ */ e.createElement(
|
|
1092
221
|
"path",
|
|
1093
222
|
{
|
|
1094
223
|
fillRule: "evenodd",
|
|
1095
224
|
d: "M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"
|
|
1096
225
|
}
|
|
1097
226
|
));
|
|
1098
|
-
},
|
|
1099
|
-
var
|
|
1100
|
-
const
|
|
1101
|
-
components:
|
|
1102
|
-
fullPage:
|
|
1103
|
-
recordMap:
|
|
1104
|
-
mapPageUrl:
|
|
1105
|
-
mapImageUrl:
|
|
1106
|
-
showTableOfContents:
|
|
1107
|
-
minTableOfContentsItems:
|
|
1108
|
-
defaultPageIcon:
|
|
1109
|
-
defaultPageCover:
|
|
1110
|
-
defaultPageCoverPosition:
|
|
1111
|
-
} =
|
|
1112
|
-
block:
|
|
1113
|
-
children:
|
|
1114
|
-
level:
|
|
1115
|
-
className:
|
|
1116
|
-
bodyClassName:
|
|
1117
|
-
header:
|
|
1118
|
-
footer:
|
|
1119
|
-
pageHeader:
|
|
1120
|
-
pageFooter:
|
|
1121
|
-
pageTitle:
|
|
1122
|
-
pageAside:
|
|
1123
|
-
pageCover:
|
|
1124
|
-
hideBlockId:
|
|
1125
|
-
disableHeader:
|
|
1126
|
-
} =
|
|
1127
|
-
if (!
|
|
1128
|
-
if (
|
|
1129
|
-
const
|
|
1130
|
-
|
|
227
|
+
}, tt = {}, nt = {}, Ct = (n) => {
|
|
228
|
+
var w, S, H, te, A, G, Y, se, me, ne, z, oe, de, ue, Z, p, P, F, ae, ye, $e, Ce, we, xe, Ie, Le, Pe, Te, Se, je, Oe, Be, Me, He, Ae, Fe, De, Re, ze, Ue, We, Ve, qe;
|
|
229
|
+
const a = ce(), {
|
|
230
|
+
components: o,
|
|
231
|
+
fullPage: m,
|
|
232
|
+
recordMap: r,
|
|
233
|
+
mapPageUrl: d,
|
|
234
|
+
mapImageUrl: g,
|
|
235
|
+
showTableOfContents: N,
|
|
236
|
+
minTableOfContentsItems: _,
|
|
237
|
+
defaultPageIcon: v,
|
|
238
|
+
defaultPageCover: y,
|
|
239
|
+
defaultPageCoverPosition: T
|
|
240
|
+
} = a, [O, L] = e.useState(null), {
|
|
241
|
+
block: t,
|
|
242
|
+
children: f,
|
|
243
|
+
level: B,
|
|
244
|
+
className: V,
|
|
245
|
+
bodyClassName: M,
|
|
246
|
+
header: Q,
|
|
247
|
+
footer: ee,
|
|
248
|
+
pageHeader: R,
|
|
249
|
+
pageFooter: i,
|
|
250
|
+
pageTitle: u,
|
|
251
|
+
pageAside: h,
|
|
252
|
+
pageCover: k,
|
|
253
|
+
hideBlockId: I,
|
|
254
|
+
disableHeader: q
|
|
255
|
+
} = n;
|
|
256
|
+
if (!t) return null;
|
|
257
|
+
if (B === 0 && t.type === "collection_view") {
|
|
258
|
+
const l = t;
|
|
259
|
+
l.type = "collection_view_page";
|
|
1131
260
|
}
|
|
1132
|
-
const
|
|
1133
|
-
switch (
|
|
261
|
+
const c = I ? "notion-block" : `notion-block-${Ee(t.id)}`;
|
|
262
|
+
switch (t.type) {
|
|
1134
263
|
case "collection_view_page":
|
|
1135
264
|
// fallthrough
|
|
1136
265
|
case "page":
|
|
1137
|
-
if (
|
|
266
|
+
if (B === 0) {
|
|
1138
267
|
const {
|
|
1139
|
-
page_icon:
|
|
1140
|
-
page_cover:
|
|
1141
|
-
page_cover_position:
|
|
1142
|
-
page_full_width:
|
|
1143
|
-
page_small_text:
|
|
1144
|
-
} =
|
|
1145
|
-
if (
|
|
1146
|
-
const
|
|
1147
|
-
title: (
|
|
1148
|
-
},
|
|
1149
|
-
let
|
|
1150
|
-
|
|
1151
|
-
objectPosition:
|
|
268
|
+
page_icon: l = v,
|
|
269
|
+
page_cover: s = y,
|
|
270
|
+
page_cover_position: E = T,
|
|
271
|
+
page_full_width: b,
|
|
272
|
+
page_small_text: x
|
|
273
|
+
} = t.format || {};
|
|
274
|
+
if (m) {
|
|
275
|
+
const $ = t.type === "page" ? t.properties : {
|
|
276
|
+
title: (S = (w = r.collection[it(t, r)]) == null ? void 0 : w.value) == null ? void 0 : S.name
|
|
277
|
+
}, D = `center ${(1 - (E || 0.5)) * 100}%`;
|
|
278
|
+
let j = nt[D];
|
|
279
|
+
j || (j = nt[D] = {
|
|
280
|
+
objectPosition: D
|
|
1152
281
|
});
|
|
1153
|
-
const
|
|
1154
|
-
return /* @__PURE__ */ e.createElement("div", { className: `notion notion-app ${
|
|
1155
|
-
|
|
282
|
+
const X = (H = ct(t, r)) != null ? H : v, U = X && st(X), re = he(t, r), fe = N && re.length >= _, K = (fe || h) && !b, pe = k || s;
|
|
283
|
+
return /* @__PURE__ */ e.createElement("div", { className: `notion notion-app ${c} ${V || ""}` }, /* @__PURE__ */ e.createElement("div", { className: "notion-viewport" }), /* @__PURE__ */ e.createElement("div", { className: "notion-frame" }, !q && /* @__PURE__ */ e.createElement(o.Header, { block: t }), Q, /* @__PURE__ */ e.createElement("div", { className: "notion-page-scroller" }, pe && (k || /* @__PURE__ */ e.createElement("div", { className: "notion-page-cover-wrapper" }, /* @__PURE__ */ e.createElement(
|
|
284
|
+
Ne,
|
|
1156
285
|
{
|
|
1157
|
-
src:
|
|
1158
|
-
alt:
|
|
286
|
+
src: g(s, t),
|
|
287
|
+
alt: ie($ == null ? void 0 : $.title),
|
|
1159
288
|
priority: !0,
|
|
1160
289
|
className: "notion-page-cover",
|
|
1161
|
-
style:
|
|
290
|
+
style: j
|
|
1162
291
|
}
|
|
1163
292
|
))), /* @__PURE__ */ e.createElement(
|
|
1164
293
|
"main",
|
|
1165
294
|
{
|
|
1166
295
|
className: `notion-page
|
|
1167
|
-
${
|
|
1168
|
-
${
|
|
1169
|
-
${
|
|
296
|
+
${pe ? "notion-page-has-cover" : "notion-page-no-cover"}
|
|
297
|
+
${l ? "notion-page-has-icon" : "notion-page-no-icon"}
|
|
298
|
+
${U ? "notion-page-has-image-icon" : "notion-page-has-text-icon"}
|
|
1170
299
|
notion-full-page
|
|
1171
|
-
${
|
|
1172
|
-
${
|
|
1173
|
-
${
|
|
300
|
+
${b && "notion-full-width"}
|
|
301
|
+
${x && "notion-small-text"}
|
|
302
|
+
${M}`
|
|
1174
303
|
},
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
/* @__PURE__ */ e.createElement("h1", { className: "notion-title" },
|
|
1178
|
-
(
|
|
1179
|
-
|
|
304
|
+
l && /* @__PURE__ */ e.createElement(Ke, { block: t, defaultIcon: v, inline: !1 }),
|
|
305
|
+
R,
|
|
306
|
+
/* @__PURE__ */ e.createElement("h1", { className: "notion-title" }, u != null ? u : /* @__PURE__ */ e.createElement(C, { value: $ == null ? void 0 : $.title, block: t })),
|
|
307
|
+
(t.type === "collection_view_page" || t.type === "page" && t.parent_table === "collection") && /* @__PURE__ */ e.createElement(o.Collection, { block: t, ctx: a }),
|
|
308
|
+
t.type !== "collection_view_page" && /* @__PURE__ */ e.createElement(
|
|
1180
309
|
"div",
|
|
1181
310
|
{
|
|
1182
311
|
className: `notion-page-content
|
|
1183
|
-
${
|
|
1184
|
-
${
|
|
312
|
+
${K && "notion-page-content-has-aside"}
|
|
313
|
+
${fe && "notion-page-content-has-toc"}`
|
|
1185
314
|
},
|
|
1186
|
-
/* @__PURE__ */ e.createElement("article", { className: "notion-page-content-inner" },
|
|
1187
|
-
|
|
1188
|
-
|
|
315
|
+
/* @__PURE__ */ e.createElement("article", { className: "notion-page-content-inner" }, f),
|
|
316
|
+
K && /* @__PURE__ */ e.createElement(
|
|
317
|
+
_t,
|
|
1189
318
|
{
|
|
1190
|
-
toc:
|
|
1191
|
-
activeSection:
|
|
1192
|
-
setActiveSection:
|
|
1193
|
-
hasToc:
|
|
1194
|
-
hasAside:
|
|
1195
|
-
pageAside:
|
|
319
|
+
toc: re,
|
|
320
|
+
activeSection: O,
|
|
321
|
+
setActiveSection: L,
|
|
322
|
+
hasToc: fe,
|
|
323
|
+
hasAside: K,
|
|
324
|
+
pageAside: h
|
|
1196
325
|
}
|
|
1197
326
|
)
|
|
1198
327
|
),
|
|
1199
|
-
|
|
1200
|
-
),
|
|
328
|
+
i
|
|
329
|
+
), ee)));
|
|
1201
330
|
} else
|
|
1202
331
|
return /* @__PURE__ */ e.createElement(
|
|
1203
332
|
"main",
|
|
1204
333
|
{
|
|
1205
334
|
className: `notion
|
|
1206
335
|
notion-page
|
|
1207
|
-
${
|
|
1208
|
-
${
|
|
1209
|
-
${
|
|
1210
|
-
${
|
|
1211
|
-
${
|
|
336
|
+
${b && "notion-full-width"}
|
|
337
|
+
${x && "notion-small-text"}
|
|
338
|
+
${c}
|
|
339
|
+
${V || ""}
|
|
340
|
+
${M}`
|
|
1212
341
|
},
|
|
1213
342
|
/* @__PURE__ */ e.createElement("div", { className: "notion-viewport" }),
|
|
1214
|
-
|
|
1215
|
-
(
|
|
1216
|
-
|
|
1217
|
-
|
|
343
|
+
R,
|
|
344
|
+
(t.type === "collection_view_page" || t.type === "page" && t.parent_table === "collection") && /* @__PURE__ */ e.createElement(o.Collection, { block: t, ctx: a }),
|
|
345
|
+
t.type !== "collection_view_page" && f,
|
|
346
|
+
i
|
|
1218
347
|
);
|
|
1219
348
|
} else {
|
|
1220
|
-
const
|
|
349
|
+
const l = (te = t.format) == null ? void 0 : te.block_color;
|
|
1221
350
|
return /* @__PURE__ */ e.createElement(
|
|
1222
|
-
|
|
351
|
+
o.PageLink,
|
|
1223
352
|
{
|
|
1224
|
-
className: `notion-page-link ${
|
|
1225
|
-
href:
|
|
353
|
+
className: `notion-page-link ${l && `notion-${l}`} ${c}`,
|
|
354
|
+
href: d(t.id)
|
|
1226
355
|
},
|
|
1227
|
-
/* @__PURE__ */ e.createElement(
|
|
356
|
+
/* @__PURE__ */ e.createElement(Xe, { block: t })
|
|
1228
357
|
);
|
|
1229
358
|
}
|
|
1230
359
|
case "header":
|
|
@@ -1232,44 +361,44 @@ const _n = /* @__PURE__ */ Nn(Cn), wn = ({ toc: t, activeSection: o, setActiveSe
|
|
|
1232
361
|
case "sub_header":
|
|
1233
362
|
// fallthrough
|
|
1234
363
|
case "sub_sub_header": {
|
|
1235
|
-
if (!
|
|
1236
|
-
const
|
|
1237
|
-
let
|
|
1238
|
-
if (
|
|
1239
|
-
const
|
|
1240
|
-
if (
|
|
1241
|
-
const
|
|
1242
|
-
|
|
364
|
+
if (!t.properties) return null;
|
|
365
|
+
const l = (A = t.format) == null ? void 0 : A.block_color, s = Ee(t.id), E = ie(t.properties.title) || `Notion Header ${s}`;
|
|
366
|
+
let b = tt[t.id], x;
|
|
367
|
+
if (b === void 0) {
|
|
368
|
+
const re = Je(t, r);
|
|
369
|
+
if (re) {
|
|
370
|
+
const K = he(re, r).find((pe) => pe.id === t.id);
|
|
371
|
+
K && (b = K.indentLevel, tt[t.id] = b);
|
|
1243
372
|
}
|
|
1244
373
|
}
|
|
1245
|
-
|
|
1246
|
-
const
|
|
1247
|
-
${
|
|
1248
|
-
${
|
|
1249
|
-
${
|
|
1250
|
-
${
|
|
1251
|
-
${
|
|
1252
|
-
let
|
|
1253
|
-
return
|
|
374
|
+
b !== void 0 && (x = `notion-h-indent-${b}`);
|
|
375
|
+
const $ = t.type === "header", J = t.type === "sub_header", D = t.type === "sub_sub_header", j = `${$ && "notion-h notion-h1"}
|
|
376
|
+
${J && "notion-h notion-h2"}
|
|
377
|
+
${D && "notion-h notion-h3"}
|
|
378
|
+
${l && `notion-${l}`}
|
|
379
|
+
${x},
|
|
380
|
+
${c}`, X = /* @__PURE__ */ e.createElement("span", null, /* @__PURE__ */ e.createElement("div", { id: s, className: "notion-header-anchor" }), !((G = t.format) != null && G.toggleable) && /* @__PURE__ */ e.createElement("a", { className: "notion-hash-link", href: `#${s}`, title: E }, /* @__PURE__ */ e.createElement($t, null)), /* @__PURE__ */ e.createElement("span", { className: "notion-h-title" }, /* @__PURE__ */ e.createElement(C, { value: t.properties.title, block: t })));
|
|
381
|
+
let U = null;
|
|
382
|
+
return $ ? U = /* @__PURE__ */ e.createElement("h2", { className: j, "data-id": s }, X) : J ? U = /* @__PURE__ */ e.createElement("h3", { className: j, "data-id": s }, X) : U = /* @__PURE__ */ e.createElement("h4", { className: j, "data-id": s }, X), (Y = t.format) != null && Y.toggleable ? /* @__PURE__ */ e.createElement("details", { className: `notion-toggle ${c}` }, /* @__PURE__ */ e.createElement("summary", null, U), /* @__PURE__ */ e.createElement("div", null, f)) : U;
|
|
1254
383
|
}
|
|
1255
384
|
case "divider":
|
|
1256
|
-
return /* @__PURE__ */ e.createElement("hr", { className: `notion-hr ${
|
|
385
|
+
return /* @__PURE__ */ e.createElement("hr", { className: `notion-hr ${c}` });
|
|
1257
386
|
case "text": {
|
|
1258
|
-
if (!
|
|
1259
|
-
const
|
|
1260
|
-
return /* @__PURE__ */ e.createElement("div", { className: `notion-text ${
|
|
387
|
+
if (!t.properties && !((se = t.content) != null && se.length)) return /* @__PURE__ */ e.createElement("div", { className: `notion-blank ${c}` }, " ");
|
|
388
|
+
const l = (me = t.format) == null ? void 0 : me.block_color;
|
|
389
|
+
return /* @__PURE__ */ e.createElement("div", { className: `notion-text ${l && `notion-${l}`} ${c}` }, ((ne = t.properties) == null ? void 0 : ne.title) && /* @__PURE__ */ e.createElement(C, { value: t.properties.title, block: t }), f && /* @__PURE__ */ e.createElement("div", { className: "notion-text-children" }, f));
|
|
1261
390
|
}
|
|
1262
391
|
case "bulleted_list":
|
|
1263
392
|
// fallthrough
|
|
1264
393
|
case "numbered_list": {
|
|
1265
|
-
const
|
|
1266
|
-
let
|
|
1267
|
-
|
|
1268
|
-
const
|
|
1269
|
-
return
|
|
394
|
+
const l = (x, $) => t.type === "bulleted_list" ? /* @__PURE__ */ e.createElement("ul", { className: `notion-list notion-list-disc ${c}` }, x) : /* @__PURE__ */ e.createElement("ol", { start: $, className: `notion-list notion-list-numbered ${c}` }, x);
|
|
395
|
+
let s = null;
|
|
396
|
+
t.content ? s = /* @__PURE__ */ e.createElement(e.Fragment, null, t.properties && /* @__PURE__ */ e.createElement("li", null, /* @__PURE__ */ e.createElement(C, { value: t.properties.title, block: t })), l(f)) : s = t.properties ? /* @__PURE__ */ e.createElement("li", null, /* @__PURE__ */ e.createElement(C, { value: t.properties.title, block: t })) : null;
|
|
397
|
+
const E = t.type !== ((oe = (z = r.block[t.parent_id]) == null ? void 0 : z.value) == null ? void 0 : oe.type), b = ut(t.id, r.block);
|
|
398
|
+
return E ? l(s, b) : s;
|
|
1270
399
|
}
|
|
1271
400
|
case "embed":
|
|
1272
|
-
return /* @__PURE__ */ e.createElement(
|
|
401
|
+
return /* @__PURE__ */ e.createElement(o.Embed, { blockId: c, block: t });
|
|
1273
402
|
case "tweet":
|
|
1274
403
|
// fallthrough
|
|
1275
404
|
case "maps":
|
|
@@ -1289,63 +418,63 @@ const _n = /* @__PURE__ */ Nn(Cn), wn = ({ toc: t, activeSection: o, setActiveSe
|
|
|
1289
418
|
case "gist":
|
|
1290
419
|
// fallthrough
|
|
1291
420
|
case "video":
|
|
1292
|
-
return /* @__PURE__ */ e.createElement(
|
|
421
|
+
return /* @__PURE__ */ e.createElement(Qe, { blockId: c, block: t });
|
|
1293
422
|
case "drive":
|
|
1294
|
-
return !((
|
|
423
|
+
return !((de = t.format) == null ? void 0 : de.drive_properties) && (ue = t.format) != null && ue.display_source ? /* @__PURE__ */ e.createElement(Qe, { blockId: c, block: t }) : /* @__PURE__ */ e.createElement(bt, { block: t, className: c });
|
|
1295
424
|
case "audio":
|
|
1296
|
-
return /* @__PURE__ */ e.createElement(
|
|
425
|
+
return /* @__PURE__ */ e.createElement(gt, { block: t, className: c });
|
|
1297
426
|
case "file":
|
|
1298
|
-
return /* @__PURE__ */ e.createElement(
|
|
427
|
+
return /* @__PURE__ */ e.createElement(Et, { block: t, className: c });
|
|
1299
428
|
case "equation":
|
|
1300
|
-
return /* @__PURE__ */ e.createElement(
|
|
429
|
+
return /* @__PURE__ */ e.createElement(o.Equation, { block: t, inline: !1, className: c });
|
|
1301
430
|
case "code":
|
|
1302
|
-
return /* @__PURE__ */ e.createElement(
|
|
431
|
+
return /* @__PURE__ */ e.createElement(o.Code, { block: t });
|
|
1303
432
|
case "column_list":
|
|
1304
|
-
return /* @__PURE__ */ e.createElement("div", { className: `notion-row ${
|
|
433
|
+
return /* @__PURE__ */ e.createElement("div", { className: `notion-row ${c}` }, f);
|
|
1305
434
|
case "column": {
|
|
1306
|
-
const
|
|
1307
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: `notion-column ${
|
|
435
|
+
const l = "min(32px, 4vw)", s = ((Z = t.format) == null ? void 0 : Z.column_ratio) || 0.5, E = (p = r.block[t.parent_id]) == null ? void 0 : p.value, $ = { width: `calc((100% - (${(((P = E == null ? void 0 : E.content) == null ? void 0 : P.length) || Math.max(2, Math.ceil(1 / s))) - 1} * ${l})) * ${s})` };
|
|
436
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", { className: `notion-column ${c}`, style: $ }, f), /* @__PURE__ */ e.createElement("div", { className: "notion-spacer" }));
|
|
1308
437
|
}
|
|
1309
438
|
case "quote": {
|
|
1310
|
-
if (!
|
|
1311
|
-
const
|
|
1312
|
-
return /* @__PURE__ */ e.createElement("blockquote", { className: `notion-quote ${
|
|
439
|
+
if (!t.properties) return null;
|
|
440
|
+
const l = (F = t.format) == null ? void 0 : F.block_color;
|
|
441
|
+
return /* @__PURE__ */ e.createElement("blockquote", { className: `notion-quote ${l && `notion-${l}`} ${c}` }, /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement(C, { value: t.properties.title, block: t })), f);
|
|
1313
442
|
}
|
|
1314
443
|
case "collection_view":
|
|
1315
|
-
return /* @__PURE__ */ e.createElement(
|
|
444
|
+
return /* @__PURE__ */ e.createElement(o.Collection, { block: t, className: c, ctx: a });
|
|
1316
445
|
case "callout":
|
|
1317
|
-
return
|
|
446
|
+
return o.Callout ? /* @__PURE__ */ e.createElement(o.Callout, { block: t, className: c }) : /* @__PURE__ */ e.createElement(
|
|
1318
447
|
"div",
|
|
1319
448
|
{
|
|
1320
|
-
className: `notion-callout ${((
|
|
449
|
+
className: `notion-callout ${((ae = t.format) == null ? void 0 : ae.block_color) && `notion-${(ye = t.format) == null ? void 0 : ye.block_color}_co`} ${c}`
|
|
1321
450
|
},
|
|
1322
|
-
/* @__PURE__ */ e.createElement(
|
|
1323
|
-
/* @__PURE__ */ e.createElement("div", { className: "notion-callout-text" }, /* @__PURE__ */ e.createElement(
|
|
451
|
+
/* @__PURE__ */ e.createElement(Ke, { block: t }),
|
|
452
|
+
/* @__PURE__ */ e.createElement("div", { className: "notion-callout-text" }, /* @__PURE__ */ e.createElement(C, { value: ($e = t.properties) == null ? void 0 : $e.title, block: t }), f)
|
|
1324
453
|
);
|
|
1325
454
|
case "bookmark": {
|
|
1326
|
-
if (!
|
|
1327
|
-
const
|
|
1328
|
-
if (!
|
|
1329
|
-
let
|
|
1330
|
-
if (
|
|
455
|
+
if (!t.properties) return null;
|
|
456
|
+
const l = t.properties.link;
|
|
457
|
+
if (!l || !((Ce = l[0]) != null && Ce[0])) return null;
|
|
458
|
+
let s = ie(t.properties.title);
|
|
459
|
+
if (s || (s = ie(l)), s && s.startsWith("http"))
|
|
1331
460
|
try {
|
|
1332
|
-
|
|
1333
|
-
} catch (
|
|
461
|
+
s = new URL(s).hostname;
|
|
462
|
+
} catch (E) {
|
|
1334
463
|
}
|
|
1335
464
|
return /* @__PURE__ */ e.createElement("div", { className: "notion-row" }, /* @__PURE__ */ e.createElement(
|
|
1336
|
-
|
|
465
|
+
o.Link,
|
|
1337
466
|
{
|
|
1338
467
|
target: "_blank",
|
|
1339
468
|
rel: "noopener noreferrer",
|
|
1340
|
-
className: `notion-bookmark ${((
|
|
1341
|
-
href:
|
|
469
|
+
className: `notion-bookmark ${((we = t.format) == null ? void 0 : we.block_color) && `notion-${t.format.block_color}`} ${c}`,
|
|
470
|
+
href: l[0][0]
|
|
1342
471
|
},
|
|
1343
|
-
/* @__PURE__ */ e.createElement("div", null,
|
|
1344
|
-
((
|
|
1345
|
-
|
|
472
|
+
/* @__PURE__ */ e.createElement("div", null, s && /* @__PURE__ */ e.createElement("div", { className: "notion-bookmark-title" }, /* @__PURE__ */ e.createElement(C, { value: [[s]], block: t })), ((xe = t.properties) == null ? void 0 : xe.description) && /* @__PURE__ */ e.createElement("div", { className: "notion-bookmark-description" }, /* @__PURE__ */ e.createElement(C, { value: (Ie = t.properties) == null ? void 0 : Ie.description, block: t })), /* @__PURE__ */ e.createElement("div", { className: "notion-bookmark-link" }, ((Le = t.format) == null ? void 0 : Le.bookmark_icon) && /* @__PURE__ */ e.createElement("div", { className: "notion-bookmark-link-icon" }, /* @__PURE__ */ e.createElement(Ne, { src: g((Pe = t.format) == null ? void 0 : Pe.bookmark_icon, t), alt: s })), /* @__PURE__ */ e.createElement("div", { className: "notion-bookmark-link-text" }, /* @__PURE__ */ e.createElement(C, { value: l, block: t })))),
|
|
473
|
+
((Te = t.format) == null ? void 0 : Te.bookmark_cover) && /* @__PURE__ */ e.createElement("div", { className: "notion-bookmark-image" }, /* @__PURE__ */ e.createElement(
|
|
474
|
+
Ne,
|
|
1346
475
|
{
|
|
1347
|
-
src:
|
|
1348
|
-
alt:
|
|
476
|
+
src: g((Se = t.format) == null ? void 0 : Se.bookmark_cover, t),
|
|
477
|
+
alt: ie((je = t.properties) == null ? void 0 : je.title),
|
|
1349
478
|
style: {
|
|
1350
479
|
objectFit: "cover"
|
|
1351
480
|
}
|
|
@@ -1354,86 +483,86 @@ const _n = /* @__PURE__ */ Nn(Cn), wn = ({ toc: t, activeSection: o, setActiveSe
|
|
|
1354
483
|
));
|
|
1355
484
|
}
|
|
1356
485
|
case "toggle":
|
|
1357
|
-
return /* @__PURE__ */ e.createElement("details", { className: `notion-toggle ${
|
|
486
|
+
return /* @__PURE__ */ e.createElement("details", { className: `notion-toggle ${c}` }, /* @__PURE__ */ e.createElement("summary", null, /* @__PURE__ */ e.createElement(C, { value: (Oe = t.properties) == null ? void 0 : Oe.title, block: t })), /* @__PURE__ */ e.createElement("div", null, f));
|
|
1358
487
|
case "table_of_contents": {
|
|
1359
|
-
const
|
|
1360
|
-
if (!
|
|
1361
|
-
const
|
|
1362
|
-
return /* @__PURE__ */ e.createElement("div", { className: `notion-table-of-contents ${
|
|
488
|
+
const l = Je(t, r);
|
|
489
|
+
if (!l) return null;
|
|
490
|
+
const s = he(l, r), E = (Be = t.format) == null ? void 0 : Be.block_color;
|
|
491
|
+
return /* @__PURE__ */ e.createElement("div", { className: `notion-table-of-contents ${E && `notion-${E}`} ${c}` }, s.map((b) => /* @__PURE__ */ e.createElement("a", { key: b.id, href: `#${Ee(b.id)}`, className: "notion-table-of-contents-item" }, /* @__PURE__ */ e.createElement(
|
|
1363
492
|
"span",
|
|
1364
493
|
{
|
|
1365
494
|
className: "notion-table-of-contents-item-body",
|
|
1366
495
|
style: {
|
|
1367
496
|
display: "inline-block",
|
|
1368
|
-
marginLeft:
|
|
497
|
+
marginLeft: b.indentLevel * 24
|
|
1369
498
|
}
|
|
1370
499
|
},
|
|
1371
|
-
|
|
500
|
+
b.text
|
|
1372
501
|
))));
|
|
1373
502
|
}
|
|
1374
503
|
case "to_do": {
|
|
1375
|
-
const
|
|
1376
|
-
return /* @__PURE__ */ e.createElement("div", { className: `notion-to-do ${
|
|
504
|
+
const l = ((Ae = (He = (Me = t.properties) == null ? void 0 : Me.checked) == null ? void 0 : He[0]) == null ? void 0 : Ae[0]) === "Yes";
|
|
505
|
+
return /* @__PURE__ */ e.createElement("div", { className: `notion-to-do ${c}` }, /* @__PURE__ */ e.createElement("div", { className: "notion-to-do-item" }, /* @__PURE__ */ e.createElement(o.Checkbox, { blockId: c, isChecked: l }), /* @__PURE__ */ e.createElement("div", { className: `notion-to-do-body ${l && "notion-to-do-checked"}` }, /* @__PURE__ */ e.createElement(C, { value: (Fe = t.properties) == null ? void 0 : Fe.title, block: t }))), /* @__PURE__ */ e.createElement("div", { className: "notion-to-do-children" }, f));
|
|
1377
506
|
}
|
|
1378
507
|
case "transclusion_container":
|
|
1379
|
-
return /* @__PURE__ */ e.createElement("div", { className: `notion-sync-block ${
|
|
508
|
+
return /* @__PURE__ */ e.createElement("div", { className: `notion-sync-block ${c}` }, f);
|
|
1380
509
|
case "transclusion_reference":
|
|
1381
|
-
return /* @__PURE__ */ e.createElement(
|
|
510
|
+
return /* @__PURE__ */ e.createElement(yt, W({ block: t, level: B + 1 }, n));
|
|
1382
511
|
case "alias": {
|
|
1383
|
-
const
|
|
1384
|
-
return
|
|
512
|
+
const l = (Re = (De = t == null ? void 0 : t.format) == null ? void 0 : De.alias_pointer) == null ? void 0 : Re.id, s = (ze = r.block[l]) == null ? void 0 : ze.value;
|
|
513
|
+
return s ? /* @__PURE__ */ e.createElement(o.PageLink, { className: `notion-page-link ${l}}`, href: d(l) }, /* @__PURE__ */ e.createElement(Xe, { block: s })) : (console.debug('"alias" missing block', l), null);
|
|
1385
514
|
}
|
|
1386
515
|
case "table":
|
|
1387
|
-
return /* @__PURE__ */ e.createElement("table", { className: `notion-simple-table ${
|
|
516
|
+
return /* @__PURE__ */ e.createElement("table", { className: `notion-simple-table ${c}` }, /* @__PURE__ */ e.createElement("tbody", null, f));
|
|
1388
517
|
case "table_row": {
|
|
1389
|
-
const
|
|
1390
|
-
return !
|
|
1391
|
-
var
|
|
1392
|
-
const
|
|
518
|
+
const l = (Ue = r.block[t.parent_id]) == null ? void 0 : Ue.value, s = (We = l.format) == null ? void 0 : We.table_block_column_order, E = (Ve = l.format) == null ? void 0 : Ve.table_block_column_format, b = (qe = t.format) == null ? void 0 : qe.block_color;
|
|
519
|
+
return !l || !s ? null : /* @__PURE__ */ e.createElement("tr", { className: `notion-simple-table-row ${b && `notion-${b}`} ${c}` }, s.map((x) => {
|
|
520
|
+
var J, D, j;
|
|
521
|
+
const $ = (J = E == null ? void 0 : E[x]) == null ? void 0 : J.color;
|
|
1393
522
|
return /* @__PURE__ */ e.createElement(
|
|
1394
523
|
"td",
|
|
1395
524
|
{
|
|
1396
|
-
key:
|
|
1397
|
-
className:
|
|
525
|
+
key: x,
|
|
526
|
+
className: $ ? `notion-${$}` : "",
|
|
1398
527
|
style: {
|
|
1399
|
-
width: ((
|
|
528
|
+
width: ((D = E == null ? void 0 : E[x]) == null ? void 0 : D.width) || 120
|
|
1400
529
|
}
|
|
1401
530
|
},
|
|
1402
|
-
/* @__PURE__ */ e.createElement("div", { className: "notion-simple-table-cell" }, /* @__PURE__ */ e.createElement(
|
|
531
|
+
/* @__PURE__ */ e.createElement("div", { className: "notion-simple-table-cell" }, /* @__PURE__ */ e.createElement(C, { value: ((j = t.properties) == null ? void 0 : j[x]) || [["ㅤ"]], block: t }))
|
|
1403
532
|
);
|
|
1404
533
|
}));
|
|
1405
534
|
}
|
|
1406
535
|
case "external_object_instance":
|
|
1407
|
-
return /* @__PURE__ */ e.createElement(
|
|
536
|
+
return /* @__PURE__ */ e.createElement(dt, { block: t, className: c });
|
|
1408
537
|
default:
|
|
1409
|
-
return process.env.NODE_ENV !== "production" && console.debug("Unsupported type " +
|
|
538
|
+
return process.env.NODE_ENV !== "production" && console.debug("Unsupported type " + t.type, JSON.stringify(t, null, 2)), /* @__PURE__ */ e.createElement("div", null);
|
|
1410
539
|
}
|
|
1411
|
-
},
|
|
1412
|
-
var
|
|
1413
|
-
components:
|
|
1414
|
-
recordMap:
|
|
1415
|
-
mapPageUrl:
|
|
1416
|
-
mapImageUrl:
|
|
1417
|
-
searchNotion:
|
|
1418
|
-
isShowingSearch:
|
|
1419
|
-
onHideSearch:
|
|
1420
|
-
fullPage:
|
|
1421
|
-
rootPageId:
|
|
1422
|
-
rootDomain:
|
|
1423
|
-
rootSpaceId:
|
|
1424
|
-
darkMode:
|
|
1425
|
-
previewImages:
|
|
1426
|
-
forceCustomImages:
|
|
1427
|
-
showCollectionViewDropdown:
|
|
1428
|
-
linkTableTitleProperties:
|
|
1429
|
-
isLinkCollectionToUrlProperty:
|
|
1430
|
-
isImageZoomable:
|
|
1431
|
-
showTableOfContents:
|
|
1432
|
-
minTableOfContentsItems:
|
|
1433
|
-
defaultPageIcon:
|
|
1434
|
-
defaultPageCover:
|
|
1435
|
-
defaultPageCoverPosition:
|
|
1436
|
-
} =
|
|
540
|
+
}, jt = (h) => {
|
|
541
|
+
var k = h, {
|
|
542
|
+
components: n,
|
|
543
|
+
recordMap: a,
|
|
544
|
+
mapPageUrl: o,
|
|
545
|
+
mapImageUrl: m,
|
|
546
|
+
searchNotion: r,
|
|
547
|
+
isShowingSearch: d,
|
|
548
|
+
onHideSearch: g,
|
|
549
|
+
fullPage: N,
|
|
550
|
+
rootPageId: _,
|
|
551
|
+
rootDomain: v,
|
|
552
|
+
rootSpaceId: y,
|
|
553
|
+
darkMode: T,
|
|
554
|
+
previewImages: O,
|
|
555
|
+
forceCustomImages: L,
|
|
556
|
+
showCollectionViewDropdown: t,
|
|
557
|
+
linkTableTitleProperties: f,
|
|
558
|
+
isLinkCollectionToUrlProperty: B,
|
|
559
|
+
isImageZoomable: V = !0,
|
|
560
|
+
showTableOfContents: M,
|
|
561
|
+
minTableOfContentsItems: Q,
|
|
562
|
+
defaultPageIcon: ee,
|
|
563
|
+
defaultPageCover: R,
|
|
564
|
+
defaultPageCoverPosition: i
|
|
565
|
+
} = k, u = le(k, [
|
|
1437
566
|
"components",
|
|
1438
567
|
"recordMap",
|
|
1439
568
|
"mapPageUrl",
|
|
@@ -1458,162 +587,90 @@ const _n = /* @__PURE__ */ Nn(Cn), wn = ({ toc: t, activeSection: o, setActiveSe
|
|
|
1458
587
|
"defaultPageCover",
|
|
1459
588
|
"defaultPageCoverPosition"
|
|
1460
589
|
]);
|
|
1461
|
-
const
|
|
1462
|
-
() => typeof window != "undefined" &&
|
|
590
|
+
const I = e.useMemo(
|
|
591
|
+
() => typeof window != "undefined" && lt({
|
|
1463
592
|
background: "rgba(0, 0, 0, 0.8)",
|
|
1464
593
|
minZoomScale: 2,
|
|
1465
|
-
margin:
|
|
594
|
+
margin: wt()
|
|
1466
595
|
}),
|
|
1467
596
|
[]
|
|
1468
597
|
);
|
|
1469
598
|
return /* @__PURE__ */ e.createElement(
|
|
1470
|
-
|
|
599
|
+
ft,
|
|
1471
600
|
{
|
|
1472
|
-
components:
|
|
1473
|
-
recordMap:
|
|
1474
|
-
mapPageUrl:
|
|
1475
|
-
mapImageUrl:
|
|
1476
|
-
searchNotion:
|
|
1477
|
-
isShowingSearch:
|
|
1478
|
-
onHideSearch:
|
|
1479
|
-
fullPage:
|
|
1480
|
-
rootPageId:
|
|
1481
|
-
rootDomain:
|
|
1482
|
-
rootSpaceId:
|
|
1483
|
-
darkMode:
|
|
1484
|
-
previewImages:
|
|
1485
|
-
forceCustomImages:
|
|
1486
|
-
showCollectionViewDropdown:
|
|
1487
|
-
linkTableTitleProperties:
|
|
1488
|
-
isLinkCollectionToUrlProperty:
|
|
1489
|
-
showTableOfContents:
|
|
1490
|
-
minTableOfContentsItems:
|
|
1491
|
-
defaultPageIcon:
|
|
1492
|
-
defaultPageCover:
|
|
1493
|
-
defaultPageCoverPosition:
|
|
1494
|
-
zoom:
|
|
601
|
+
components: n,
|
|
602
|
+
recordMap: a,
|
|
603
|
+
mapPageUrl: o,
|
|
604
|
+
mapImageUrl: m,
|
|
605
|
+
searchNotion: r,
|
|
606
|
+
isShowingSearch: d,
|
|
607
|
+
onHideSearch: g,
|
|
608
|
+
fullPage: N,
|
|
609
|
+
rootPageId: _,
|
|
610
|
+
rootDomain: v,
|
|
611
|
+
rootSpaceId: y,
|
|
612
|
+
darkMode: T,
|
|
613
|
+
previewImages: O,
|
|
614
|
+
forceCustomImages: L,
|
|
615
|
+
showCollectionViewDropdown: t,
|
|
616
|
+
linkTableTitleProperties: f,
|
|
617
|
+
isLinkCollectionToUrlProperty: B,
|
|
618
|
+
showTableOfContents: M,
|
|
619
|
+
minTableOfContentsItems: Q,
|
|
620
|
+
defaultPageIcon: ee,
|
|
621
|
+
defaultPageCover: R,
|
|
622
|
+
defaultPageCoverPosition: i,
|
|
623
|
+
zoom: V ? I : null
|
|
1495
624
|
},
|
|
1496
|
-
/* @__PURE__ */ e.createElement(
|
|
625
|
+
/* @__PURE__ */ e.createElement(_e, W({}, u))
|
|
1497
626
|
);
|
|
1498
|
-
},
|
|
1499
|
-
var
|
|
1500
|
-
var
|
|
1501
|
-
const { recordMap:
|
|
1502
|
-
return
|
|
627
|
+
}, _e = (m) => {
|
|
628
|
+
var r = m, { level: n = 0, blockId: a } = r, o = le(r, ["level", "blockId"]);
|
|
629
|
+
var _, v;
|
|
630
|
+
const { recordMap: d } = ce(), g = a || Object.keys(d.block)[0], N = (_ = d.block[g]) == null ? void 0 : _.value;
|
|
631
|
+
return N ? /* @__PURE__ */ e.createElement(Ct, W({ key: g, level: n, block: N }, o), (v = N == null ? void 0 : N.content) == null ? void 0 : v.map((y) => /* @__PURE__ */ e.createElement(_e, W({ key: y, blockId: y, level: n + 1 }, o)))) : (process.env.NODE_ENV !== "production" && console.warn("missing block", a), null);
|
|
1503
632
|
};
|
|
1504
|
-
function
|
|
1505
|
-
const
|
|
1506
|
-
return
|
|
1507
|
-
}
|
|
1508
|
-
function Sn(t) {
|
|
1509
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 14 14" }, t), /* @__PURE__ */ e.createElement("path", { d: "M0 3a3 3 0 013-3h8a3 3 0 013 3v8a3 3 0 01-3 3H3a3 3 0 01-3-3V3zm3-1.5A1.5 1.5 0 001.5 3v8A1.5 1.5 0 003 12.5h8a1.5 1.5 0 001.5-1.5V3A1.5 1.5 0 0011 1.5H3zm-.167 5.316l.566-.542.177-.17.347-.332.346.334.176.17 1.139 1.098 3.699-3.563.177-.17.347-.335.347.334.177.17.563.543.177.171.372.36-.372.36-.177.17-4.786 4.615-.177.171-.347.334-.347-.334-.177-.17-2.23-2.15-.177-.172-.375-.361.376-.36.179-.17z" }));
|
|
1510
|
-
}
|
|
1511
|
-
function Mn(t) {
|
|
1512
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 14 14" }, t), /* @__PURE__ */ e.createElement("path", { d: "M10.889 5.5H3.11v1.556h7.778V5.5zm1.555-4.444h-.777V0H10.11v1.056H3.89V0H2.333v1.056h-.777c-.864 0-1.548.7-1.548 1.555L0 12.5c0 .856.692 1.5 1.556 1.5h10.888C13.3 14 14 13.356 14 12.5V2.611c0-.855-.7-1.555-1.556-1.555zm0 11.444H1.556V3.944h10.888V12.5zM8.556 8.611H3.11v1.556h5.445V8.61z" }));
|
|
1513
|
-
}
|
|
1514
|
-
function zn(t) {
|
|
1515
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 14 14" }, t), /* @__PURE__ */ e.createElement("path", { d: "M14 6.225c0 .822-.133 1.574-.4 2.256-.267.683-.644 1.218-1.13 1.606-.488.388-.946.6-1.494.6-.429 0-.808-.102-1.139-.305a1.753 1.753 0 01-.713-.8c-.613.736-1.563 1.104-2.531 1.104-1.027 0-1.835-.304-2.427-.912-.591-.608-.887-1.44-.887-2.496 0-1.204.389-2.175 1.166-2.911.776-.736 1.791-1.105 3.044-1.105.498 0 2.032.212 2.252.268.51.13.86.593.835 1.112l-.156 3.287c0 .794.22 1.19.66 1.19.372 0 .668-.267.888-.8.22-.534.33-1.232.33-2.094 0-.919-.194-1.731-.582-2.436a3.924 3.924 0 00-1.64-1.614c-.704-.371-1.509-.557-2.413-.557-1.172 0-2.19.237-3.053.711a4.785 4.785 0 00-1.988 2.05c-.46.894-.691 1.926-.691 3.096 0 1.576.428 2.784 1.283 3.627.855.841 2.094 1.262 3.718 1.262.615 0 1.29-.067 2.027-.2.225-.042.518-.108.877-.2a.863.863 0 011.025.527.76.76 0 01-.502.993c-1.052.316-2.17.488-3.357.516-2.204 0-3.922-.57-5.154-1.713C.616 11.146 0 9.56 0 7.527c0-1.41.315-2.69.944-3.84A6.792 6.792 0 013.63.98C4.794.327 6.131 0 7.645 0c1.276 0 2.514.29 3.418.77.905.481 1.574 1.228 2.12 2.176.544.947.817 2.04.817 3.28zm-8.615 1.01c0 1.208.488 1.811 1.466 1.811.511 0 .9-.181 1.168-.545.267-.363.429-.954.486-1.772l.11-1.896a4.638 4.638 0 00-.98-.095c-.71 0-1.263.224-1.658.67-.395.446-.592 1.055-.592 1.828z" }));
|
|
1516
|
-
}
|
|
1517
|
-
function Pn(t) {
|
|
1518
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 14 14" }, t), /* @__PURE__ */ e.createElement("path", { d: "M5.946 14a4.975 4.975 0 01-3.497-1.415A4.731 4.731 0 011 9.174c0-1.288.515-2.5 1.449-3.41L7.456.986c1.345-1.313 3.722-1.318 5.08.007a3.453 3.453 0 010 4.961L8.03 10.241c-.867.847-2.293.848-3.17-.006a2.158 2.158 0 010-3.102l1.744-1.701 1.272 1.24-1.744 1.701a.43.43 0 000 .621c.23.223.405.223.636 0l4.503-4.288a1.723 1.723 0 00-.007-2.473c-.68-.663-1.864-.663-2.543 0L3.713 7.011a3.006 3.006 0 00-.915 2.163c0 .82.328 1.591.922 2.17 1.19 1.162 3.262 1.162 4.451 0l2.248-2.192 1.272 1.24-2.248 2.193A4.978 4.978 0 015.946 14z" }));
|
|
1519
|
-
}
|
|
1520
|
-
function Tn(t) {
|
|
1521
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 14 14" }, t), /* @__PURE__ */ e.createElement("path", { d: "M7.779 7.063l-3.157 4.224a.49.49 0 00-.072.218.35.35 0 00.346.357h6.242c.476 0 .862.398.862.889v.36c0 .491-.386.889-.862.889H1.862A.876.876 0 011 13.111v-.425a.82.82 0 01.177-.54L4.393 7.8a1.367 1.367 0 00-.006-1.625L1.4 2.194a.822.822 0 01-.18-.544V.89C1.22.398 1.604 0 2.08 0h8.838c.476 0 .861.398.861.889v.36c0 .491-.385.89-.86.89H5.135c-.19 0-.345.159-.345.356a.489.489 0 00.07.216l2.92 3.975c.049.062.063.107.06.188a.246.246 0 01-.062.189z" }));
|
|
1522
|
-
}
|
|
1523
|
-
function Bn(t) {
|
|
1524
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 14 14" }, t), /* @__PURE__ */ e.createElement("path", { d: "M4 3a1 1 0 011-1h7a1 1 0 110 2H5a1 1 0 01-1-1zm0 4a1 1 0 011-1h7a1 1 0 110 2H5a1 1 0 01-1-1zm0 4a1 1 0 011-1h7a1 1 0 110 2H5a1 1 0 01-1-1zM2 4a1 1 0 110-2 1 1 0 010 2zm0 4a1 1 0 110-2 1 1 0 010 2zm0 4a1 1 0 110-2 1 1 0 010 2z" }));
|
|
1525
|
-
}
|
|
1526
|
-
function Hn(t) {
|
|
1527
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 14 14" }, t), /* @__PURE__ */ e.createElement("path", { d: "M4.462 0c-.595 0-1.078.482-1.078 1.078v2.306H1.078a1.078 1.078 0 100 2.155h2.306v2.922H1.078a1.078 1.078 0 100 2.155h2.306v2.306a1.078 1.078 0 002.155 0v-2.306H8.46v2.306a1.078 1.078 0 002.156 0v-2.306h2.306a1.078 1.078 0 100-2.155h-2.306V5.539h2.306a1.078 1.078 0 100-2.155h-2.306V1.078a1.078 1.078 0 00-2.156 0v2.306H5.54V1.078C5.54.482 5.056 0 4.461 0zm1.077 8.46V5.54H8.46v2.92H5.54z" }));
|
|
1528
|
-
}
|
|
1529
|
-
function On(t) {
|
|
1530
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 14 14" }, t), /* @__PURE__ */ e.createElement("path", { d: "M9.625 10.847C8.912 10.289 8.121 9.926 7 9.26v-.54a3.33 3.33 0 00.538-.888c.408-.1.774-.498.774-.832 0-.482-.202-.673-.44-.829 0-.015.003-.03.003-.046 0-.711-.438-2.625-2.625-2.625-2.188 0-2.625 1.915-2.625 2.625 0 .017.003.03.003.046-.238.156-.44.347-.44.829 0 .334.366.731.774.833.146.343.326.643.538.886v.541c-1.12.665-1.912 1.028-2.625 1.587C.041 11.498 0 12.469 0 14h10.5c0-1.531-.041-2.502-.875-3.153zm3.5-3.5c-.713-.558-1.504-.921-2.625-1.587v-.54c.212-.244.392-.544.538-.888.408-.1.774-.498.774-.832 0-.482-.202-.673-.44-.829 0-.015.003-.03.003-.046C11.375 1.914 10.937 0 8.75 0 6.562 0 6.125 1.915 6.125 2.625c0 .017.003.03.003.046-.016.012-.03.025-.047.036 1.751.359 2.516 1.841 2.647 3.04.248.262.46.65.46 1.253 0 .603-.417 1.203-1.004 1.515-.057.109-.117.214-.181.315l.437.245c.64.357 1.194.666 1.724 1.081.138.108.256.224.365.343H14c0-1.53-.041-2.5-.875-3.153z" }));
|
|
1531
|
-
}
|
|
1532
|
-
function dt(t) {
|
|
1533
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 14 14" }, t), /* @__PURE__ */ e.createElement("path", { d: "M13.125 10.035c-.571-.55-2.324-1.504-3.5-2.16v-.834c.224-.322.42-.671.566-1.055.394-.242.746-.702.746-1.173 0-.458-.005-.87-.47-1.208C10.305 1.558 9.436 0 7 0S3.695 1.558 3.533 3.605c-.465.338-.47.75-.47 1.208 0 .471.352.93.746 1.173.146.384.342.733.566 1.055v.834c-1.176.656-2.929 1.61-3.5 2.16C.165 10.72 0 11.812 0 14h14c0-2.188-.164-3.281-.875-3.965z" }));
|
|
1534
|
-
}
|
|
1535
|
-
function Vn(t) {
|
|
1536
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 14 14" }, t), /* @__PURE__ */ e.createElement("path", { d: "M2.207.013a.487.487 0 00-.29.02C.87.438.213 1.93.058 2.955c-.484 3.33 2.15 6.215 4.57 8.113 2.149 1.684 6.273 4.453 8.713 1.781.31-.329.678-.813.658-1.297-.058-.813-.813-1.394-1.394-1.84-.445-.329-1.375-1.239-1.956-1.22-.522.02-.851.562-1.18.891l-.582.581c-.096.097-1.336-.716-1.471-.813a9.881 9.881 0 01-1.414-1.104A9.13 9.13 0 014.86 6.732c-.097-.136-.89-1.317-.813-1.414 0 0 .677-.736.871-1.026.407-.62.717-1.104.252-1.84-.174-.27-.387-.484-.62-.716-.406-.387-.813-.794-1.278-1.123-.251-.194-.677-.542-1.065-.6z" }));
|
|
1537
|
-
}
|
|
1538
|
-
function Rn(t) {
|
|
1539
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 14 14" }, t), /* @__PURE__ */ e.createElement("path", { d: "M4.5 1v2h5.086L1 11.586 2.414 13 11 4.414V9.5h2V1z" }));
|
|
1540
|
-
}
|
|
1541
|
-
function jn(t) {
|
|
1542
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 14 14" }, t), /* @__PURE__ */ e.createElement("path", { d: "M7 13A6 6 0 107 1a6 6 0 000 12zM3.751 5.323A.2.2 0 013.909 5h6.182a.2.2 0 01.158.323L7.158 9.297a.2.2 0 01-.316 0L3.751 5.323z" }));
|
|
1543
|
-
}
|
|
1544
|
-
function Dn(t) {
|
|
1545
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 14 14" }, t), /* @__PURE__ */ e.createElement("path", { d: "M7 4.568a.5.5 0 00-.5-.5h-6a.5.5 0 00-.5.5v1.046a.5.5 0 00.5.5h6a.5.5 0 00.5-.5V4.568zM.5 1a.5.5 0 00-.5.5v1.045a.5.5 0 00.5.5h12a.5.5 0 00.5-.5V1.5a.5.5 0 00-.5-.5H.5zM0 8.682a.5.5 0 00.5.5h11a.5.5 0 00.5-.5V7.636a.5.5 0 00-.5-.5H.5a.5.5 0 00-.5.5v1.046zm0 3.068a.5.5 0 00.5.5h9a.5.5 0 00.5-.5v-1.045a.5.5 0 00-.5-.5h-9a.5.5 0 00-.5.5v1.045z" }));
|
|
1546
|
-
}
|
|
1547
|
-
function pt(t) {
|
|
1548
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 14 14" }, t), /* @__PURE__ */ e.createElement("path", { d: "M6.986 14c-1.79 0-3.582-.69-4.944-2.068-2.723-2.72-2.723-7.172 0-9.892 2.725-2.72 7.182-2.72 9.906 0A6.972 6.972 0 0114 6.996c0 1.88-.728 3.633-2.052 4.955A7.058 7.058 0 016.986 14zm3.285-6.99v1.645H5.526v-5.47h1.841v3.63h2.904v.194zm1.89-.014c0-1.379-.542-2.67-1.522-3.648-2.006-2.005-5.287-2.007-7.297-.009l-.009.009a5.168 5.168 0 000 7.295c2.01 2.007 5.297 2.007 7.306 0a5.119 5.119 0 001.521-3.647z" }));
|
|
1549
|
-
}
|
|
1550
|
-
function Fn(t) {
|
|
1551
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 14 14" }, t), /* @__PURE__ */ e.createElement("path", { d: "M7.74 8.697a.81.81 0 01.073.308.894.894 0 01-.9.888.867.867 0 01-.825-.592l-.333-.961H2.058l-.333.961a.882.882 0 01-.838.592A.884.884 0 010 9.005c0-.11.025-.222.062-.308l2.403-6.211c.222-.58.776-.986 1.442-.986.653 0 1.22.407 1.442.986l2.39 6.211zM2.6 6.824h2.613L3.907 3.102 2.6 6.824zm8.8-3.118c1.355 0 2.6.542 2.6 2.255V9.08a.8.8 0 01-.789.814.797.797 0 01-.788-.703c-.395.468-1.097.764-1.874.764-.949 0-2.07-.64-2.07-1.972 0-1.392 1.121-1.897 2.07-1.897.789 0 1.491.246 1.886.727v-.826c0-.604-.518-.998-1.306-.998-.469 0-.888.123-1.32.394a.64.64 0 01-.307.086.602.602 0 01-.592-.604c0-.221.123-.419.284-.517a3.963 3.963 0 012.206-.641zm-.222 5.188c.505 0 .998-.172 1.257-.517v-.74c-.259-.345-.752-.517-1.257-.517-.616 0-1.122.332-1.122.9 0 .554.506.874 1.122.874zM.656 11.125h12.688a.656.656 0 110 1.313H.656a.656.656 0 110-1.313z" }));
|
|
1552
|
-
}
|
|
1553
|
-
function Un(t) {
|
|
1554
|
-
return /* @__PURE__ */ e.createElement("svg", h({ viewBox: "0 0 14 14" }, t), /* @__PURE__ */ e.createElement("path", { d: "M3.733 3.867h3.734c1.03 0 1.866.837 1.866 1.866 0 1.03-.837 1.867-1.866 1.867h-.934a.934.934 0 000 1.867h.934a3.734 3.734 0 000-7.467H3.733A3.73 3.73 0 001.89 8.977a4.637 4.637 0 01.314-2.18 1.854 1.854 0 01-.336-1.064c0-1.03.837-1.866 1.866-1.866zm8.377 1.422a4.6 4.6 0 01-.316 2.176c.212.303.34.67.34 1.068 0 1.03-.838 1.867-1.867 1.867H6.533a1.869 1.869 0 01-1.866-1.867c0-1.03.837-1.866 1.866-1.866h.934a.934.934 0 000-1.867h-.934a3.733 3.733 0 000 7.467h3.734a3.73 3.73 0 001.843-6.978z" }));
|
|
633
|
+
function wt() {
|
|
634
|
+
const n = window.innerWidth;
|
|
635
|
+
return n < 500 ? 8 : n < 800 ? 20 : n < 1280 ? 30 : n < 1600 ? 40 : n < 1920 ? 48 : 72;
|
|
1555
636
|
}
|
|
1556
|
-
const An = {
|
|
1557
|
-
title: Fn,
|
|
1558
|
-
text: Dn,
|
|
1559
|
-
number: Hn,
|
|
1560
|
-
select: jn,
|
|
1561
|
-
multi_select: Bn,
|
|
1562
|
-
date: Mn,
|
|
1563
|
-
person: On,
|
|
1564
|
-
file: Pn,
|
|
1565
|
-
checkbox: Sn,
|
|
1566
|
-
url: Un,
|
|
1567
|
-
email: zn,
|
|
1568
|
-
phone_number: Vn,
|
|
1569
|
-
formula: Tn,
|
|
1570
|
-
relation: Rn,
|
|
1571
|
-
created_time: pt,
|
|
1572
|
-
last_edited_time: pt,
|
|
1573
|
-
created_by: dt,
|
|
1574
|
-
last_edited_by: dt
|
|
1575
|
-
}, qn = (a) => {
|
|
1576
|
-
var l = a, { type: t } = l, o = T(l, ["type"]);
|
|
1577
|
-
const i = An[t];
|
|
1578
|
-
return i ? i(o) : null;
|
|
1579
|
-
}, ta = ({ schema: t }) => /* @__PURE__ */ e.createElement("div", { className: "notion-collection-column-title" }, /* @__PURE__ */ e.createElement(qn, { className: "notion-collection-column-title-icon", type: t.type }), /* @__PURE__ */ e.createElement("div", { className: "notion-collection-column-title-body" }, t.name));
|
|
1580
637
|
export {
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
638
|
+
Dt as Asset,
|
|
639
|
+
Qe as AssetWrapper,
|
|
640
|
+
gt as Audio,
|
|
641
|
+
Ct as Block,
|
|
642
|
+
Rt as Breadcrumbs,
|
|
643
|
+
zt as Checkbox,
|
|
644
|
+
tn as CollectionColumnTitle,
|
|
645
|
+
dt as EOI,
|
|
646
|
+
Et as File,
|
|
647
|
+
bt as GoogleDrive,
|
|
648
|
+
mt as GracefulImage,
|
|
649
|
+
Ut as Header,
|
|
650
|
+
Wt as LiteYouTubeEmbed,
|
|
651
|
+
_e as NotionBlockRenderer,
|
|
652
|
+
Vt as NotionContextConsumer,
|
|
653
|
+
ft as NotionContextProvider,
|
|
654
|
+
jt as NotionRenderer,
|
|
655
|
+
_t as PageAside,
|
|
656
|
+
Ke as PageIcon,
|
|
657
|
+
qt as PageIconImpl,
|
|
658
|
+
Xe as PageTitle,
|
|
659
|
+
Gt as PageTitleImpl,
|
|
660
|
+
nn as PropertyIcon,
|
|
661
|
+
Yt as Search,
|
|
662
|
+
Zt as SearchDialog,
|
|
663
|
+
yt as SyncPointerBlock,
|
|
664
|
+
C as Text,
|
|
665
|
+
Jt as dummyLink,
|
|
666
|
+
Mt as formatDate,
|
|
667
|
+
Ht as formatNotionDateTime,
|
|
668
|
+
Xt as getHashFragmentValue,
|
|
669
|
+
ut as getListNumber,
|
|
670
|
+
Kt as getYoutubeId,
|
|
671
|
+
on as iconMap,
|
|
672
|
+
Qt as isBrowser,
|
|
673
|
+
At as isUrl,
|
|
674
|
+
ce as useNotionContext
|
|
1618
675
|
};
|
|
1619
676
|
//# sourceMappingURL=index.js.map
|