@texonom/nreact 1.6.5 → 1.6.7
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/asset-wrapper-saop46mm.js +1042 -0
- package/build/asset-wrapper-saop46mm.js.map +1 -0
- package/build/block.d.ts +0 -1
- package/build/block.d.ts.map +1 -1
- package/build/{collection-column-title-Bw3sXBSk.js → collection-column-title-B2x01rzc.js} +76 -59
- package/build/collection-column-title-B2x01rzc.js.map +1 -0
- package/build/components/editable-text.d.ts +34 -10
- package/build/components/editable-text.d.ts.map +1 -1
- package/build/context.d.ts +0 -2
- package/build/context.d.ts.map +1 -1
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +409 -235
- package/build/index.js.map +1 -1
- package/build/objectSpread2-DfFXoz5f.js +101 -0
- package/build/renderer.d.ts +0 -2
- package/build/renderer.d.ts.map +1 -1
- package/build/third-party/code.js +41 -43
- package/build/third-party/code.js.map +1 -1
- package/build/third-party/collection.js +454 -421
- package/build/third-party/collection.js.map +1 -1
- package/build/third-party/equation.js +14 -12
- package/build/third-party/equation.js.map +1 -1
- package/build/third-party/modal.js +225 -219
- package/build/third-party/modal.js.map +1 -1
- package/package.json +3 -3
- package/src/styles.css +2 -12
- package/build/asset-wrapper-BjCXzGmC.js +0 -1056
- package/build/asset-wrapper-BjCXzGmC.js.map +0 -1
- package/build/collection-column-title-Bw3sXBSk.js.map +0 -1
- package/build/rolldown-runtime-CEFd7nDs.js +0 -30
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as
|
|
3
|
-
import { t as
|
|
4
|
-
import
|
|
5
|
-
import { getBlockCollectionId as
|
|
1
|
+
import { n as e, r as t, s as n, t as r } from "../objectSpread2-DfFXoz5f.js";
|
|
2
|
+
import { A as i, S as a, _ as o, a as s, g as c, k as l, m as u, o as d, s as f, x as p, y as m } from "../asset-wrapper-saop46mm.js";
|
|
3
|
+
import { t as h } from "../collection-column-title-B2x01rzc.js";
|
|
4
|
+
import g, { useCallback as _, useEffect as v, useLayoutEffect as y, useRef as b, useState as x } from "react";
|
|
5
|
+
import { getBlockCollectionId as S, getBlockParentPage as C, getDateValue as w, getTextContent as T } from "@texonom/nutils";
|
|
6
6
|
//#region ../../node_modules/.pnpm/react-use@17.6.1_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/react-use/esm/misc/util.js
|
|
7
|
-
var
|
|
8
|
-
function
|
|
7
|
+
var E = function() {};
|
|
8
|
+
function D(e) {
|
|
9
9
|
var t = [...arguments].slice(1);
|
|
10
10
|
e && e.addEventListener && e.addEventListener.apply(e, t);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function O(e) {
|
|
13
13
|
var t = [...arguments].slice(1);
|
|
14
14
|
e && e.removeEventListener && e.removeEventListener.apply(e, t);
|
|
15
15
|
}
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
if (!
|
|
16
|
+
var k = typeof window < "u", A = function(e) {
|
|
17
|
+
v(e, []);
|
|
18
|
+
}, j = function(e, t, n) {
|
|
19
|
+
if (!k) return [
|
|
20
20
|
t,
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
E,
|
|
22
|
+
E
|
|
23
23
|
];
|
|
24
24
|
if (!e) throw Error("useLocalStorage key may not be falsy");
|
|
25
25
|
var r = n ? n.raw ? function(e) {
|
|
26
26
|
return e;
|
|
27
|
-
} : n.deserializer : JSON.parse, i =
|
|
27
|
+
} : n.deserializer : JSON.parse, i = b(function(e) {
|
|
28
28
|
try {
|
|
29
29
|
var i = n ? n.raw ? String : n.serializer : JSON.stringify, a = localStorage.getItem(e);
|
|
30
30
|
return a === null ? (t && localStorage.setItem(e, i(t)), t) : r(a);
|
|
31
31
|
} catch (e) {
|
|
32
32
|
return t;
|
|
33
33
|
}
|
|
34
|
-
}), a =
|
|
34
|
+
}), a = x(function() {
|
|
35
35
|
return i.current(e);
|
|
36
36
|
}), o = a[0], s = a[1];
|
|
37
|
-
return
|
|
37
|
+
return y(function() {
|
|
38
38
|
return s(i.current(e));
|
|
39
39
|
}, [e]), [
|
|
40
40
|
o,
|
|
41
|
-
|
|
41
|
+
_(function(t) {
|
|
42
42
|
try {
|
|
43
43
|
var i = typeof t == "function" ? t(o) : t;
|
|
44
44
|
if (i === void 0) return;
|
|
@@ -46,35 +46,35 @@ var O = typeof window < "u", k = function(e) {
|
|
|
46
46
|
a = n ? n.raw ? typeof i == "string" ? i : JSON.stringify(i) : n.serializer ? n.serializer(i) : JSON.stringify(i) : JSON.stringify(i), localStorage.setItem(e, a), s(r(a));
|
|
47
47
|
} catch (e) {}
|
|
48
48
|
}, [e, s]),
|
|
49
|
-
|
|
49
|
+
_(function() {
|
|
50
50
|
try {
|
|
51
51
|
localStorage.removeItem(e), s(void 0);
|
|
52
52
|
} catch (e) {}
|
|
53
53
|
}, [e, s])
|
|
54
54
|
];
|
|
55
|
-
},
|
|
56
|
-
var t =
|
|
57
|
-
t.current = e,
|
|
55
|
+
}, M = function(e) {
|
|
56
|
+
var t = b(e);
|
|
57
|
+
t.current = e, A(function() {
|
|
58
58
|
return function() {
|
|
59
59
|
return t.current();
|
|
60
60
|
};
|
|
61
61
|
});
|
|
62
|
-
},
|
|
63
|
-
var t =
|
|
62
|
+
}, N = function(e) {
|
|
63
|
+
var t = b(0), n = x(e), r = n[0], i = n[1], a = _(function(e) {
|
|
64
64
|
cancelAnimationFrame(t.current), t.current = requestAnimationFrame(function() {
|
|
65
65
|
i(e);
|
|
66
66
|
});
|
|
67
67
|
}, []);
|
|
68
|
-
return
|
|
68
|
+
return M(function() {
|
|
69
69
|
cancelAnimationFrame(t.current);
|
|
70
70
|
}), [r, a];
|
|
71
|
-
},
|
|
72
|
-
var t = e === void 0 ? {} : e, n = t.initialWidth, r = n === void 0 ? Infinity : n, i = t.initialHeight, a = i === void 0 ? Infinity : i, o = t.onChange, s =
|
|
73
|
-
width:
|
|
74
|
-
height:
|
|
71
|
+
}, P = function(e) {
|
|
72
|
+
var t = e === void 0 ? {} : e, n = t.initialWidth, r = n === void 0 ? Infinity : n, i = t.initialHeight, a = i === void 0 ? Infinity : i, o = t.onChange, s = N({
|
|
73
|
+
width: k ? window.innerWidth : r,
|
|
74
|
+
height: k ? window.innerHeight : a
|
|
75
75
|
}), c = s[0], l = s[1];
|
|
76
|
-
return
|
|
77
|
-
if (
|
|
76
|
+
return v(function() {
|
|
77
|
+
if (k) {
|
|
78
78
|
var e = function() {
|
|
79
79
|
var e = window.innerWidth, t = window.innerHeight;
|
|
80
80
|
l({
|
|
@@ -82,47 +82,52 @@ var O = typeof window < "u", k = function(e) {
|
|
|
82
82
|
height: t
|
|
83
83
|
}), o && o(e, t);
|
|
84
84
|
};
|
|
85
|
-
return
|
|
86
|
-
|
|
85
|
+
return D(window, "resize", e), function() {
|
|
86
|
+
O(window, "resize", e);
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
}, []), c;
|
|
90
90
|
};
|
|
91
91
|
//#endregion
|
|
92
92
|
//#region src/icons/collection-view-board.tsx
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
e();
|
|
94
|
+
function F(e) {
|
|
95
|
+
return /* @__PURE__ */ g.createElement("svg", r({ viewBox: "0 0 14 14" }, e), /* @__PURE__ */ g.createElement("path", { d: "M12 1.5H2a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h10a.5.5 0 00.5-.5V2a.5.5 0 00-.5-.5zM2 0h10a2 2 0 012 2v10a2 2 0 01-2 2H2a2 2 0 01-2-2V2a2 2 0 012-2zm1 3h2v6H3V3zm3 0h2v8H6V3zm3 0h2v4H9V3z" }));
|
|
95
96
|
}
|
|
96
97
|
//#endregion
|
|
97
98
|
//#region src/icons/collection-view-calendar.tsx
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
e();
|
|
100
|
+
function I(e) {
|
|
101
|
+
return /* @__PURE__ */ g.createElement("svg", r({ viewBox: "0 0 14 14" }, e), /* @__PURE__ */ g.createElement("path", { d: "M2.564 4.004c-.586 0-.71.024-.833.09a.319.319 0 00-.141.14c-.066.124-.09.247-.09.834v6.368c0 .586.024.71.09.833a.319.319 0 00.14.141c.124.066.248.09.834.09h8.872c.586 0 .71-.024.833-.09a.319.319 0 00.141-.14c.066-.124.09-.248.09-.834V5.068c0-.587-.024-.71-.09-.834a.319.319 0 00-.14-.14c-.124-.066-.248-.09-.834-.09H2.564zm0-4.004h8.872c.892 0 1.215.093 1.54.267.327.174.583.43.757.756.174.326.267.65.267 1.54v8.873c0 .892-.093 1.215-.267 1.54-.174.327-.43.583-.756.757-.326.174-.65.267-1.54.267H2.563c-.892 0-1.215-.093-1.54-.267a1.817 1.817 0 01-.757-.756C.093 12.65 0 12.327 0 11.437V2.563c0-.892.093-1.215.267-1.54.174-.327.43-.583.756-.757C1.35.093 1.673 0 2.563 0zm4.044 7.88c.179.11.318.256.418.436.1.18.148.394.148.64 0 .304-.08.597-.238.876-.16.28-.392.498-.692.65-.299.15-.685.224-1.16.224-.46 0-.827-.055-1.1-.166a1.687 1.687 0 01-.68-.492 2.227 2.227 0 01-.404-.802l.083-.127 1.37-.182.112.08c.05.258.126.431.221.52a.507.507 0 00.364.133.495.495 0 00.386-.169c.105-.115.158-.27.158-.472 0-.205-.051-.358-.15-.463a.527.527 0 00-.407-.157 1.65 1.65 0 00-.417.077l-.127-.104.07-.98.115-.091c.072.01.127.015.164.015.154 0 .28-.047.38-.144.1-.096.15-.205.15-.335a.388.388 0 00-.106-.29c-.07-.07-.168-.105-.3-.105a.444.444 0 00-.324.118c-.083.08-.143.232-.176.457l-.117.084-1.297-.233-.079-.123c.114-.435.334-.772.66-1.006.326-.234.78-.349 1.36-.349.666 0 1.153.126 1.462.384.31.259.467.589.467.982 0 .233-.064.446-.192.636a1.43 1.43 0 01-.37.365c.1.034.182.072.248.113zm1.747-.145a5.186 5.186 0 01-.806.31l-.129-.097V6.824l.07-.096c.455-.147.807-.322 1.055-.524.246-.202.439-.45.579-.747l.09-.057h1.135l.1.1v5.021l-.1.1H8.961l-.1-.1V7.428a4.053 4.053 0 01-.506.307z" }));
|
|
100
102
|
}
|
|
101
103
|
//#endregion
|
|
102
104
|
//#region src/icons/collection-view-gallery.tsx
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
e();
|
|
106
|
+
function L(e) {
|
|
107
|
+
return /* @__PURE__ */ g.createElement("svg", r({ viewBox: "0 0 14 14" }, e), /* @__PURE__ */ g.createElement("path", { d: "M12 1.5H2a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h10a.5.5 0 00.5-.5V2a.5.5 0 00-.5-.5zM2 0h10a2 2 0 012 2v10a2 2 0 01-2 2H2a2 2 0 01-2-2V2a2 2 0 012-2zm1 3h3.5v3.5H3V3zm4.5 0H11v3.5H7.5V3zM3 7.5h3.5V11H3V7.5zm4.5 0H11V11H7.5V7.5z" }));
|
|
105
108
|
}
|
|
106
109
|
//#endregion
|
|
107
110
|
//#region src/icons/collection-view-list.tsx
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
e();
|
|
112
|
+
function R(e) {
|
|
113
|
+
return /* @__PURE__ */ g.createElement("svg", r({ viewBox: "0 0 14 14" }, e), /* @__PURE__ */ g.createElement("path", { d: "M12 1.5H2a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h10a.5.5 0 00.5-.5V2a.5.5 0 00-.5-.5zM2 0h10a2 2 0 012 2v10a2 2 0 01-2 2H2a2 2 0 01-2-2V2a2 2 0 012-2zm1 3h6v1.5H3V3zm0 2.5h8V7H3V5.5zM3 8h4v1.5H3V8z" }));
|
|
110
114
|
}
|
|
111
115
|
//#endregion
|
|
112
116
|
//#region src/icons/collection-view-table.tsx
|
|
113
|
-
|
|
114
|
-
|
|
117
|
+
e();
|
|
118
|
+
function z(e) {
|
|
119
|
+
return /* @__PURE__ */ g.createElement("svg", r({ viewBox: "0 0 14 14" }, e), /* @__PURE__ */ g.createElement("path", { d: "M2 0h10a2 2 0 012 2v10a2 2 0 01-2 2H2a2 2 0 01-2-2V2a2 2 0 012-2zm3.75 5.67v2.66h6.75V5.67H5.75zm0 4.17v2.66h5.75a1 1 0 001-1V9.84H5.75zM1.5 5.67v2.66h2.75V5.67H1.5zm0 4.17v1.66a1 1 0 001 1h1.75V9.84H1.5zm1-8.34a1 1 0 00-1 1v1.66h2.75V1.5H2.5zm3.25 0v2.66h6.75V2.5a1 1 0 00-1-1H5.75z" }));
|
|
115
120
|
}
|
|
116
121
|
//#endregion
|
|
117
122
|
//#region src/icons/collection-view-icon.tsx
|
|
118
|
-
var
|
|
119
|
-
table:
|
|
120
|
-
board:
|
|
121
|
-
gallery:
|
|
122
|
-
list:
|
|
123
|
-
calendar:
|
|
124
|
-
},
|
|
125
|
-
let { type: t } = e, n =
|
|
123
|
+
var B = ["type"], V = {
|
|
124
|
+
table: z,
|
|
125
|
+
board: F,
|
|
126
|
+
gallery: L,
|
|
127
|
+
list: R,
|
|
128
|
+
calendar: I
|
|
129
|
+
}, ee = (e) => {
|
|
130
|
+
let { type: t } = e, n = l(e, B), r = V[t];
|
|
126
131
|
return r ? r(n) : null;
|
|
127
132
|
}, H = /* @__PURE__ */ t(((e, t) => {
|
|
128
133
|
function n(e) {
|
|
@@ -145,7 +150,7 @@ var z = ["type"], B = {
|
|
|
145
150
|
if (t.length < e) throw TypeError(e + " argument" + (e > 1 ? "s" : "") + " required, but only " + t.length + " present");
|
|
146
151
|
}
|
|
147
152
|
t.exports = e.default;
|
|
148
|
-
})),
|
|
153
|
+
})), te = /* @__PURE__ */ t(((e, t) => {
|
|
149
154
|
var n = H().default;
|
|
150
155
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
151
156
|
var r = n(U()), i = n(W());
|
|
@@ -163,10 +168,10 @@ var z = ["type"], B = {
|
|
|
163
168
|
return e instanceof Date || (0, r.default)(e) === "object" && t === "[object Date]" ? new Date(e.getTime()) : typeof e == "number" || t === "[object Number]" ? new Date(e) : ((typeof e == "string" || t === "[object String]") && typeof console < "u" && (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"), console.warn((/* @__PURE__ */ Error()).stack)), /* @__PURE__ */ new Date(NaN));
|
|
164
169
|
}
|
|
165
170
|
t.exports = e.default;
|
|
166
|
-
})),
|
|
171
|
+
})), ne = /* @__PURE__ */ t(((e, t) => {
|
|
167
172
|
var n = H().default;
|
|
168
173
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
169
|
-
var r = n(
|
|
174
|
+
var r = n(te()), i = n(G()), a = n(W());
|
|
170
175
|
function o(e) {
|
|
171
176
|
if ((0, a.default)(1, arguments), !(0, r.default)(e) && typeof e != "number") return !1;
|
|
172
177
|
var t = (0, i.default)(e);
|
|
@@ -181,7 +186,7 @@ var z = ["type"], B = {
|
|
|
181
186
|
return isNaN(t) ? t : t < 0 ? Math.ceil(t) : Math.floor(t);
|
|
182
187
|
}
|
|
183
188
|
t.exports = e.default;
|
|
184
|
-
})),
|
|
189
|
+
})), re = /* @__PURE__ */ t(((e, t) => {
|
|
185
190
|
var n = H().default;
|
|
186
191
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
187
192
|
var r = n(K()), i = n(G()), a = n(W());
|
|
@@ -191,17 +196,17 @@ var z = ["type"], B = {
|
|
|
191
196
|
return new Date(n + o);
|
|
192
197
|
}
|
|
193
198
|
t.exports = e.default;
|
|
194
|
-
})),
|
|
199
|
+
})), ie = /* @__PURE__ */ t(((e, t) => {
|
|
195
200
|
var n = H().default;
|
|
196
201
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
197
|
-
var r = n(
|
|
202
|
+
var r = n(re()), i = n(W()), a = n(K());
|
|
198
203
|
function o(e, t) {
|
|
199
204
|
(0, i.default)(2, arguments);
|
|
200
205
|
var n = (0, a.default)(t);
|
|
201
206
|
return (0, r.default)(e, -n);
|
|
202
207
|
}
|
|
203
208
|
t.exports = e.default;
|
|
204
|
-
})),
|
|
209
|
+
})), ae = /* @__PURE__ */ t(((e, t) => {
|
|
205
210
|
var n = H().default;
|
|
206
211
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
207
212
|
var r = n(G()), i = n(W()), a = 864e5;
|
|
@@ -213,7 +218,7 @@ var z = ["type"], B = {
|
|
|
213
218
|
return Math.floor(o / a) + 1;
|
|
214
219
|
}
|
|
215
220
|
t.exports = e.default;
|
|
216
|
-
})),
|
|
221
|
+
})), oe = /* @__PURE__ */ t(((e, t) => {
|
|
217
222
|
var n = H().default;
|
|
218
223
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
219
224
|
var r = n(G()), i = n(W());
|
|
@@ -223,10 +228,10 @@ var z = ["type"], B = {
|
|
|
223
228
|
return n.setUTCDate(n.getUTCDate() - o), n.setUTCHours(0, 0, 0, 0), n;
|
|
224
229
|
}
|
|
225
230
|
t.exports = e.default;
|
|
226
|
-
})),
|
|
231
|
+
})), se = /* @__PURE__ */ t(((e, t) => {
|
|
227
232
|
var n = H().default;
|
|
228
233
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
229
|
-
var r = n(G()), i = n(W()), a = n(
|
|
234
|
+
var r = n(G()), i = n(W()), a = n(oe());
|
|
230
235
|
function o(e) {
|
|
231
236
|
(0, i.default)(1, arguments);
|
|
232
237
|
var t = (0, r.default)(e), n = t.getUTCFullYear(), o = /* @__PURE__ */ new Date(0);
|
|
@@ -237,20 +242,20 @@ var z = ["type"], B = {
|
|
|
237
242
|
return t.getTime() >= s.getTime() ? n + 1 : t.getTime() >= l.getTime() ? n : n - 1;
|
|
238
243
|
}
|
|
239
244
|
t.exports = e.default;
|
|
240
|
-
})),
|
|
245
|
+
})), ce = /* @__PURE__ */ t(((e, t) => {
|
|
241
246
|
var n = H().default;
|
|
242
247
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
243
|
-
var r = n(
|
|
248
|
+
var r = n(se()), i = n(oe()), a = n(W());
|
|
244
249
|
function o(e) {
|
|
245
250
|
(0, a.default)(1, arguments);
|
|
246
251
|
var t = (0, r.default)(e), n = /* @__PURE__ */ new Date(0);
|
|
247
252
|
return n.setUTCFullYear(t, 0, 4), n.setUTCHours(0, 0, 0, 0), (0, i.default)(n);
|
|
248
253
|
}
|
|
249
254
|
t.exports = e.default;
|
|
250
|
-
})),
|
|
255
|
+
})), le = /* @__PURE__ */ t(((e, t) => {
|
|
251
256
|
var n = H().default;
|
|
252
257
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = c;
|
|
253
|
-
var r = n(G()), i = n(
|
|
258
|
+
var r = n(G()), i = n(oe()), a = n(ce()), o = n(W()), s = 6048e5;
|
|
254
259
|
function c(e) {
|
|
255
260
|
(0, o.default)(1, arguments);
|
|
256
261
|
var t = (0, r.default)(e), n = (0, i.default)(t).getTime() - (0, a.default)(t).getTime();
|
|
@@ -266,7 +271,7 @@ var z = ["type"], B = {
|
|
|
266
271
|
function r(e) {
|
|
267
272
|
t = e;
|
|
268
273
|
}
|
|
269
|
-
})),
|
|
274
|
+
})), ue = /* @__PURE__ */ t(((e, t) => {
|
|
270
275
|
var n = H().default;
|
|
271
276
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = s;
|
|
272
277
|
var r = n(G()), i = n(W()), a = n(K()), o = q();
|
|
@@ -279,10 +284,10 @@ var z = ["type"], B = {
|
|
|
279
284
|
return g.setUTCDate(g.getUTCDate() - v), g.setUTCHours(0, 0, 0, 0), g;
|
|
280
285
|
}
|
|
281
286
|
t.exports = e.default;
|
|
282
|
-
})),
|
|
287
|
+
})), de = /* @__PURE__ */ t(((e, t) => {
|
|
283
288
|
var n = H().default;
|
|
284
289
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = c;
|
|
285
|
-
var r = n(G()), i = n(W()), a = n(
|
|
290
|
+
var r = n(G()), i = n(W()), a = n(ue()), o = n(K()), s = q();
|
|
286
291
|
function c(e, t) {
|
|
287
292
|
var n, c, l, u, d, f, p, m;
|
|
288
293
|
(0, i.default)(1, arguments);
|
|
@@ -296,10 +301,10 @@ var z = ["type"], B = {
|
|
|
296
301
|
return h.getTime() >= b.getTime() ? g + 1 : h.getTime() >= S.getTime() ? g : g - 1;
|
|
297
302
|
}
|
|
298
303
|
t.exports = e.default;
|
|
299
|
-
})),
|
|
304
|
+
})), fe = /* @__PURE__ */ t(((e, t) => {
|
|
300
305
|
var n = H().default;
|
|
301
306
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = c;
|
|
302
|
-
var r = n(
|
|
307
|
+
var r = n(de()), i = n(W()), a = n(ue()), o = n(K()), s = q();
|
|
303
308
|
function c(e, t) {
|
|
304
309
|
var n, c, l, u, d, f, p, m;
|
|
305
310
|
(0, i.default)(1, arguments);
|
|
@@ -307,27 +312,27 @@ var z = ["type"], B = {
|
|
|
307
312
|
return v.setUTCFullYear(_, 0, g), v.setUTCHours(0, 0, 0, 0), (0, a.default)(v, t);
|
|
308
313
|
}
|
|
309
314
|
t.exports = e.default;
|
|
310
|
-
})),
|
|
315
|
+
})), pe = /* @__PURE__ */ t(((e, t) => {
|
|
311
316
|
var n = H().default;
|
|
312
317
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = c;
|
|
313
|
-
var r = n(G()), i = n(
|
|
318
|
+
var r = n(G()), i = n(ue()), a = n(fe()), o = n(W()), s = 6048e5;
|
|
314
319
|
function c(e, t) {
|
|
315
320
|
(0, o.default)(1, arguments);
|
|
316
321
|
var n = (0, r.default)(e), c = (0, i.default)(n, t).getTime() - (0, a.default)(n, t).getTime();
|
|
317
322
|
return Math.round(c / s) + 1;
|
|
318
323
|
}
|
|
319
324
|
t.exports = e.default;
|
|
320
|
-
})),
|
|
325
|
+
})), me = /* @__PURE__ */ t(((e, t) => {
|
|
321
326
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = n;
|
|
322
327
|
function n(e, t) {
|
|
323
328
|
for (var n = e < 0 ? "-" : "", r = Math.abs(e).toString(); r.length < t;) r = "0" + r;
|
|
324
329
|
return n + r;
|
|
325
330
|
}
|
|
326
331
|
t.exports = e.default;
|
|
327
|
-
})),
|
|
332
|
+
})), he = /* @__PURE__ */ t(((e, t) => {
|
|
328
333
|
var n = H().default;
|
|
329
334
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
330
|
-
var r = n(
|
|
335
|
+
var r = n(me());
|
|
331
336
|
e.default = {
|
|
332
337
|
y: function(e, t) {
|
|
333
338
|
var n = e.getUTCFullYear(), i = n > 0 ? n : 1 - n;
|
|
@@ -367,10 +372,10 @@ var z = ["type"], B = {
|
|
|
367
372
|
return (0, r.default)(a, t.length);
|
|
368
373
|
}
|
|
369
374
|
}, t.exports = e.default;
|
|
370
|
-
})),
|
|
375
|
+
})), ge = /* @__PURE__ */ t(((e, t) => {
|
|
371
376
|
var n = H().default;
|
|
372
377
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
373
|
-
var r = n(
|
|
378
|
+
var r = n(ae()), i = n(le()), a = n(se()), o = n(pe()), s = n(de()), c = n(me()), l = n(he()), u = {
|
|
374
379
|
am: "am",
|
|
375
380
|
pm: "pm",
|
|
376
381
|
midnight: "midnight",
|
|
@@ -753,7 +758,7 @@ var z = ["type"], B = {
|
|
|
753
758
|
return r + a + n + o;
|
|
754
759
|
}
|
|
755
760
|
e.default = d, t.exports = e.default;
|
|
756
|
-
})),
|
|
761
|
+
})), _e = /* @__PURE__ */ t(((e, t) => {
|
|
757
762
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
758
763
|
var n = function(e, t) {
|
|
759
764
|
switch (e) {
|
|
@@ -791,14 +796,14 @@ var z = ["type"], B = {
|
|
|
791
796
|
return s.replace("{{date}}", n(a, t)).replace("{{time}}", r(o, t));
|
|
792
797
|
}
|
|
793
798
|
}, t.exports = e.default;
|
|
794
|
-
})),
|
|
799
|
+
})), ve = /* @__PURE__ */ t(((e, t) => {
|
|
795
800
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = n;
|
|
796
801
|
function n(e) {
|
|
797
802
|
var t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
|
|
798
803
|
return t.setUTCFullYear(e.getFullYear()), e.getTime() - t.getTime();
|
|
799
804
|
}
|
|
800
805
|
t.exports = e.default;
|
|
801
|
-
})),
|
|
806
|
+
})), ye = /* @__PURE__ */ t(((e) => {
|
|
802
807
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.isProtectedDayOfYearToken = r, e.isProtectedWeekYearToken = i, e.throwProtectedError = a;
|
|
803
808
|
var t = ["D", "DD"], n = ["YY", "YYYY"];
|
|
804
809
|
function r(e) {
|
|
@@ -813,7 +818,7 @@ var z = ["type"], B = {
|
|
|
813
818
|
if (e === "D") throw RangeError(`Use \`d\` instead of \`D\` (in \`${t}\`) for formatting days of the month to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);
|
|
814
819
|
if (e === "DD") throw RangeError(`Use \`dd\` instead of \`DD\` (in \`${t}\`) for formatting days of the month to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);
|
|
815
820
|
}
|
|
816
|
-
})),
|
|
821
|
+
})), be = /* @__PURE__ */ t(((e, t) => {
|
|
817
822
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
818
823
|
var n = {
|
|
819
824
|
lessThanXSeconds: {
|
|
@@ -882,7 +887,7 @@ var z = ["type"], B = {
|
|
|
882
887
|
var i, a = n[e];
|
|
883
888
|
return i = typeof a == "string" ? a : t === 1 ? a.one : a.other.replace("{{count}}", t.toString()), r != null && r.addSuffix ? r.comparison && r.comparison > 0 ? "in " + i : i + " ago" : i;
|
|
884
889
|
}, t.exports = e.default;
|
|
885
|
-
})),
|
|
890
|
+
})), xe = /* @__PURE__ */ t(((e, t) => {
|
|
886
891
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = n;
|
|
887
892
|
function n(e) {
|
|
888
893
|
return function() {
|
|
@@ -891,10 +896,10 @@ var z = ["type"], B = {
|
|
|
891
896
|
};
|
|
892
897
|
}
|
|
893
898
|
t.exports = e.default;
|
|
894
|
-
})),
|
|
899
|
+
})), Se = /* @__PURE__ */ t(((e, t) => {
|
|
895
900
|
var n = H().default;
|
|
896
901
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
897
|
-
var r = n(
|
|
902
|
+
var r = n(xe());
|
|
898
903
|
e.default = {
|
|
899
904
|
date: (0, r.default)({
|
|
900
905
|
formats: {
|
|
@@ -924,7 +929,7 @@ var z = ["type"], B = {
|
|
|
924
929
|
defaultWidth: "full"
|
|
925
930
|
})
|
|
926
931
|
}, t.exports = e.default;
|
|
927
|
-
})),
|
|
932
|
+
})), Ce = /* @__PURE__ */ t(((e, t) => {
|
|
928
933
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
929
934
|
var n = {
|
|
930
935
|
lastWeek: "'last' eeee 'at' p",
|
|
@@ -937,7 +942,7 @@ var z = ["type"], B = {
|
|
|
937
942
|
e.default = function(e, t, r, i) {
|
|
938
943
|
return n[e];
|
|
939
944
|
}, t.exports = e.default;
|
|
940
|
-
})),
|
|
945
|
+
})), we = /* @__PURE__ */ t(((e, t) => {
|
|
941
946
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = n;
|
|
942
947
|
function n(e) {
|
|
943
948
|
return function(t, n) {
|
|
@@ -954,10 +959,10 @@ var z = ["type"], B = {
|
|
|
954
959
|
};
|
|
955
960
|
}
|
|
956
961
|
t.exports = e.default;
|
|
957
|
-
})),
|
|
962
|
+
})), Te = /* @__PURE__ */ t(((e, t) => {
|
|
958
963
|
var n = H().default;
|
|
959
964
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
960
|
-
var r = n(
|
|
965
|
+
var r = n(we());
|
|
961
966
|
e.default = {
|
|
962
967
|
ordinalNumber: function(e, t) {
|
|
963
968
|
var n = Number(e), r = n % 100;
|
|
@@ -1159,7 +1164,7 @@ var z = ["type"], B = {
|
|
|
1159
1164
|
defaultFormattingWidth: "wide"
|
|
1160
1165
|
})
|
|
1161
1166
|
}, t.exports = e.default;
|
|
1162
|
-
})),
|
|
1167
|
+
})), Ee = /* @__PURE__ */ t(((e, t) => {
|
|
1163
1168
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = n;
|
|
1164
1169
|
function n(e) {
|
|
1165
1170
|
return function(t) {
|
|
@@ -1185,7 +1190,7 @@ var z = ["type"], B = {
|
|
|
1185
1190
|
for (var n = 0; n < e.length; n++) if (t(e[n])) return n;
|
|
1186
1191
|
}
|
|
1187
1192
|
t.exports = e.default;
|
|
1188
|
-
})),
|
|
1193
|
+
})), De = /* @__PURE__ */ t(((e, t) => {
|
|
1189
1194
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = n;
|
|
1190
1195
|
function n(e) {
|
|
1191
1196
|
return function(t) {
|
|
@@ -1203,12 +1208,12 @@ var z = ["type"], B = {
|
|
|
1203
1208
|
};
|
|
1204
1209
|
}
|
|
1205
1210
|
t.exports = e.default;
|
|
1206
|
-
})),
|
|
1211
|
+
})), Oe = /* @__PURE__ */ t(((e, t) => {
|
|
1207
1212
|
var n = H().default;
|
|
1208
1213
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
1209
|
-
var r = n(
|
|
1214
|
+
var r = n(Ee());
|
|
1210
1215
|
e.default = {
|
|
1211
|
-
ordinalNumber: (0, n(
|
|
1216
|
+
ordinalNumber: (0, n(De()).default)({
|
|
1212
1217
|
matchPattern: /^(\d+)(th|st|nd|rd)?/i,
|
|
1213
1218
|
parsePattern: /\d+/i,
|
|
1214
1219
|
valueCallback: function(e) {
|
|
@@ -1331,10 +1336,10 @@ var z = ["type"], B = {
|
|
|
1331
1336
|
defaultParseWidth: "any"
|
|
1332
1337
|
})
|
|
1333
1338
|
}, t.exports = e.default;
|
|
1334
|
-
})),
|
|
1339
|
+
})), ke = /* @__PURE__ */ t(((e, t) => {
|
|
1335
1340
|
var n = H().default;
|
|
1336
1341
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
1337
|
-
var r = n(
|
|
1342
|
+
var r = n(be()), i = n(Se()), a = n(Ce()), o = n(Te()), s = n(Oe());
|
|
1338
1343
|
e.default = {
|
|
1339
1344
|
code: "en-US",
|
|
1340
1345
|
formatDistance: r.default,
|
|
@@ -1347,13 +1352,13 @@ var z = ["type"], B = {
|
|
|
1347
1352
|
firstWeekContainsDate: 1
|
|
1348
1353
|
}
|
|
1349
1354
|
}, t.exports = e.default;
|
|
1350
|
-
})), ke = /* @__PURE__ */ t(((e, t) => {
|
|
1351
|
-
var n = H().default;
|
|
1352
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0, e.default = n(Oe()).default, t.exports = e.default;
|
|
1353
1355
|
})), Ae = /* @__PURE__ */ t(((e, t) => {
|
|
1356
|
+
var n = H().default;
|
|
1357
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0, e.default = n(ke()).default, t.exports = e.default;
|
|
1358
|
+
})), je = /* @__PURE__ */ t(((e, t) => {
|
|
1354
1359
|
var n = H().default;
|
|
1355
1360
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = y;
|
|
1356
|
-
var r = n(
|
|
1361
|
+
var r = n(ne()), i = n(ie()), a = n(G()), o = n(ge()), s = n(_e()), c = n(ve()), l = ye(), u = n(K()), d = n(W()), f = q(), p = n(Ae()), m = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, h = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, g = /^'([^]*?)'?$/, _ = /''/g, v = /[a-zA-Z]/;
|
|
1357
1362
|
function y(e, t, n) {
|
|
1358
1363
|
var g, _, y, x, S, C, w, T, E, D, O, k, A, j, M, N, P, F;
|
|
1359
1364
|
(0, d.default)(2, arguments);
|
|
@@ -1365,7 +1370,7 @@ var z = ["type"], B = {
|
|
|
1365
1370
|
if (!R.formatLong) throw RangeError("locale must contain formatLong property");
|
|
1366
1371
|
var V = (0, a.default)(e);
|
|
1367
1372
|
if (!(0, r.default)(V)) throw RangeError("Invalid time value");
|
|
1368
|
-
var
|
|
1373
|
+
var ee = (0, c.default)(V), H = (0, i.default)(V, ee), U = {
|
|
1369
1374
|
firstWeekContainsDate: z,
|
|
1370
1375
|
weekStartsOn: B,
|
|
1371
1376
|
locale: R,
|
|
@@ -1383,7 +1388,7 @@ var z = ["type"], B = {
|
|
|
1383
1388
|
var i = r[0];
|
|
1384
1389
|
if (i === "'") return b(r);
|
|
1385
1390
|
var a = o.default[i];
|
|
1386
|
-
if (a) return !(n != null && n.useAdditionalWeekYearTokens) && (0, l.isProtectedWeekYearToken)(r) && (0, l.throwProtectedError)(r, t, String(e)), !(n != null && n.useAdditionalDayOfYearTokens) && (0, l.isProtectedDayOfYearToken)(r) && (0, l.throwProtectedError)(r, t, String(e)), a(
|
|
1391
|
+
if (a) return !(n != null && n.useAdditionalWeekYearTokens) && (0, l.isProtectedWeekYearToken)(r) && (0, l.throwProtectedError)(r, t, String(e)), !(n != null && n.useAdditionalDayOfYearTokens) && (0, l.isProtectedDayOfYearToken)(r) && (0, l.throwProtectedError)(r, t, String(e)), a(H, r, R.localize, U);
|
|
1387
1392
|
if (i.match(v)) throw RangeError("Format string contains an unescaped latin alphabet character `" + i + "`");
|
|
1388
1393
|
return r;
|
|
1389
1394
|
}).join("");
|
|
@@ -1393,7 +1398,7 @@ var z = ["type"], B = {
|
|
|
1393
1398
|
return t ? t[1].replace(_, "'") : e;
|
|
1394
1399
|
}
|
|
1395
1400
|
t.exports = e.default;
|
|
1396
|
-
})),
|
|
1401
|
+
})), Me = /* @__PURE__ */ t(((e, t) => {
|
|
1397
1402
|
t.exports = n, t.exports.default = n;
|
|
1398
1403
|
function n(e) {
|
|
1399
1404
|
if (e = e || {}, e.negativeType = e.negativeType || (e.negative === "R" ? "right" : "left"), typeof e.negativeLeftSymbol != "string") switch (e.negativeType) {
|
|
@@ -1469,7 +1474,7 @@ var z = ["type"], B = {
|
|
|
1469
1474
|
}
|
|
1470
1475
|
return e;
|
|
1471
1476
|
}
|
|
1472
|
-
})),
|
|
1477
|
+
})), Ne = /* @__PURE__ */ t(((e, t) => {
|
|
1473
1478
|
var n = H().default;
|
|
1474
1479
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
1475
1480
|
var r = n(K()), i = n(G()), a = n(W());
|
|
@@ -1479,7 +1484,7 @@ var z = ["type"], B = {
|
|
|
1479
1484
|
return isNaN(o) ? /* @__PURE__ */ new Date(NaN) : (o && n.setDate(n.getDate() + o), n);
|
|
1480
1485
|
}
|
|
1481
1486
|
t.exports = e.default;
|
|
1482
|
-
})),
|
|
1487
|
+
})), Pe = /* @__PURE__ */ t(((e, t) => {
|
|
1483
1488
|
var n = H().default;
|
|
1484
1489
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
1485
1490
|
var r = n(K()), i = n(G()), a = n(W());
|
|
@@ -1492,17 +1497,17 @@ var z = ["type"], B = {
|
|
|
1492
1497
|
return c.setMonth(n.getMonth() + o + 1, 0), s >= c.getDate() ? c : (n.setFullYear(c.getFullYear(), c.getMonth(), s), n);
|
|
1493
1498
|
}
|
|
1494
1499
|
t.exports = e.default;
|
|
1495
|
-
})),
|
|
1500
|
+
})), Fe = /* @__PURE__ */ t(((e, t) => {
|
|
1496
1501
|
var n = H().default;
|
|
1497
1502
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = l;
|
|
1498
|
-
var r = n(U()), i = n(
|
|
1503
|
+
var r = n(U()), i = n(Ne()), a = n(Pe()), o = n(G()), s = n(W()), c = n(K());
|
|
1499
1504
|
function l(e, t) {
|
|
1500
1505
|
if ((0, s.default)(2, arguments), !t || (0, r.default)(t) !== "object") return /* @__PURE__ */ new Date(NaN);
|
|
1501
1506
|
var n = t.years ? (0, c.default)(t.years) : 0, l = t.months ? (0, c.default)(t.months) : 0, u = t.weeks ? (0, c.default)(t.weeks) : 0, d = t.days ? (0, c.default)(t.days) : 0, f = t.hours ? (0, c.default)(t.hours) : 0, p = t.minutes ? (0, c.default)(t.minutes) : 0, m = t.seconds ? (0, c.default)(t.seconds) : 0, h = (0, o.default)(e), g = l || n ? (0, a.default)(h, l + n * 12) : h, _ = d || u ? (0, i.default)(g, d + u * 7) : g, v = (m + (p + f * 60) * 60) * 1e3;
|
|
1502
1507
|
return new Date(_.getTime() + v);
|
|
1503
1508
|
}
|
|
1504
1509
|
t.exports = e.default;
|
|
1505
|
-
})),
|
|
1510
|
+
})), Ie = /* @__PURE__ */ t(((e, t) => {
|
|
1506
1511
|
var n = H().default;
|
|
1507
1512
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
1508
1513
|
var r = n(G()), i = n(W());
|
|
@@ -1510,7 +1515,7 @@ var z = ["type"], B = {
|
|
|
1510
1515
|
return (0, i.default)(1, arguments), (0, r.default)(e).getDate();
|
|
1511
1516
|
}
|
|
1512
1517
|
t.exports = e.default;
|
|
1513
|
-
})),
|
|
1518
|
+
})), Le = /* @__PURE__ */ t(((e, t) => {
|
|
1514
1519
|
var n = H().default;
|
|
1515
1520
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
1516
1521
|
var r = n(G()), i = n(W());
|
|
@@ -1518,7 +1523,7 @@ var z = ["type"], B = {
|
|
|
1518
1523
|
return (0, i.default)(1, arguments), (0, r.default)(e).getDay();
|
|
1519
1524
|
}
|
|
1520
1525
|
t.exports = e.default;
|
|
1521
|
-
})),
|
|
1526
|
+
})), Re = /* @__PURE__ */ t(((e, t) => {
|
|
1522
1527
|
var n = H().default;
|
|
1523
1528
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
1524
1529
|
var r = n(G()), i = n(W());
|
|
@@ -1526,7 +1531,7 @@ var z = ["type"], B = {
|
|
|
1526
1531
|
return (0, i.default)(1, arguments), (0, r.default)(e).getHours();
|
|
1527
1532
|
}
|
|
1528
1533
|
t.exports = e.default;
|
|
1529
|
-
})),
|
|
1534
|
+
})), ze = /* @__PURE__ */ t(((e, t) => {
|
|
1530
1535
|
var n = H().default;
|
|
1531
1536
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
1532
1537
|
var r = n(G()), i = n(W());
|
|
@@ -1534,7 +1539,7 @@ var z = ["type"], B = {
|
|
|
1534
1539
|
return (0, i.default)(1, arguments), (0, r.default)(e).getMinutes();
|
|
1535
1540
|
}
|
|
1536
1541
|
t.exports = e.default;
|
|
1537
|
-
})),
|
|
1542
|
+
})), Be = /* @__PURE__ */ t(((e, t) => {
|
|
1538
1543
|
var n = H().default;
|
|
1539
1544
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
1540
1545
|
var r = n(G()), i = n(W());
|
|
@@ -1542,7 +1547,7 @@ var z = ["type"], B = {
|
|
|
1542
1547
|
return (0, i.default)(1, arguments), (0, r.default)(e).getMonth();
|
|
1543
1548
|
}
|
|
1544
1549
|
t.exports = e.default;
|
|
1545
|
-
})),
|
|
1550
|
+
})), Ve = /* @__PURE__ */ t(((e, t) => {
|
|
1546
1551
|
var n = H().default;
|
|
1547
1552
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
1548
1553
|
var r = n(G()), i = n(W());
|
|
@@ -1550,7 +1555,7 @@ var z = ["type"], B = {
|
|
|
1550
1555
|
return (0, i.default)(1, arguments), (0, r.default)(e).getFullYear();
|
|
1551
1556
|
}
|
|
1552
1557
|
t.exports = e.default;
|
|
1553
|
-
})),
|
|
1558
|
+
})), He = /* @__PURE__ */ t(((e, t) => {
|
|
1554
1559
|
var n = H().default;
|
|
1555
1560
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
1556
1561
|
var r = n(G()), i = n(W());
|
|
@@ -1560,7 +1565,7 @@ var z = ["type"], B = {
|
|
|
1560
1565
|
return o < 0 ? -1 : o > 0 ? 1 : o;
|
|
1561
1566
|
}
|
|
1562
1567
|
t.exports = e.default;
|
|
1563
|
-
})),
|
|
1568
|
+
})), Ue = /* @__PURE__ */ t(((e, t) => {
|
|
1564
1569
|
var n = H().default;
|
|
1565
1570
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
1566
1571
|
var r = n(G()), i = n(W());
|
|
@@ -1570,20 +1575,20 @@ var z = ["type"], B = {
|
|
|
1570
1575
|
return t.setHours(0, 0, 0, 0), t;
|
|
1571
1576
|
}
|
|
1572
1577
|
t.exports = e.default;
|
|
1573
|
-
})),
|
|
1578
|
+
})), We = /* @__PURE__ */ t(((e, t) => {
|
|
1574
1579
|
var n = H().default;
|
|
1575
1580
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = s;
|
|
1576
|
-
var r = n(
|
|
1581
|
+
var r = n(ve()), i = n(Ue()), a = n(W()), o = 864e5;
|
|
1577
1582
|
function s(e, t) {
|
|
1578
1583
|
(0, a.default)(2, arguments);
|
|
1579
1584
|
var n = (0, i.default)(e), s = (0, i.default)(t), c = n.getTime() - (0, r.default)(n), l = s.getTime() - (0, r.default)(s);
|
|
1580
1585
|
return Math.round((c - l) / o);
|
|
1581
1586
|
}
|
|
1582
1587
|
t.exports = e.default;
|
|
1583
|
-
})),
|
|
1588
|
+
})), Ge = /* @__PURE__ */ t(((e, t) => {
|
|
1584
1589
|
var n = H().default;
|
|
1585
1590
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = s;
|
|
1586
|
-
var r = n(G()), i = n(
|
|
1591
|
+
var r = n(G()), i = n(We()), a = n(W());
|
|
1587
1592
|
function o(e, t) {
|
|
1588
1593
|
var n = e.getFullYear() - t.getFullYear() || e.getMonth() - t.getMonth() || e.getDate() - t.getDate() || e.getHours() - t.getHours() || e.getMinutes() - t.getMinutes() || e.getSeconds() - t.getSeconds() || e.getMilliseconds() - t.getMilliseconds();
|
|
1589
1594
|
return n < 0 ? -1 : n > 0 ? 1 : n;
|
|
@@ -1596,7 +1601,7 @@ var z = ["type"], B = {
|
|
|
1596
1601
|
return u === 0 ? 0 : u;
|
|
1597
1602
|
}
|
|
1598
1603
|
t.exports = e.default;
|
|
1599
|
-
})),
|
|
1604
|
+
})), Ke = /* @__PURE__ */ t(((e) => {
|
|
1600
1605
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.secondsInYear = e.secondsInWeek = e.secondsInQuarter = e.secondsInMonth = e.secondsInMinute = e.secondsInHour = e.secondsInDay = e.quartersInYear = e.monthsInYear = e.monthsInQuarter = e.minutesInHour = e.minTime = e.millisecondsInSecond = e.millisecondsInMinute = e.millisecondsInHour = e.maxTime = e.daysInYear = e.daysInWeek = void 0, e.daysInWeek = 7;
|
|
1601
1606
|
var t = 365.2425;
|
|
1602
1607
|
e.daysInYear = t;
|
|
@@ -1610,7 +1615,7 @@ var z = ["type"], B = {
|
|
|
1610
1615
|
e.secondsInYear = a;
|
|
1611
1616
|
var o = a / 12;
|
|
1612
1617
|
e.secondsInMonth = o, e.secondsInQuarter = o * 3;
|
|
1613
|
-
})),
|
|
1618
|
+
})), qe = /* @__PURE__ */ t(((e, t) => {
|
|
1614
1619
|
var n = H().default;
|
|
1615
1620
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
1616
1621
|
var r = n(G()), i = n(W());
|
|
@@ -1618,7 +1623,7 @@ var z = ["type"], B = {
|
|
|
1618
1623
|
return (0, i.default)(2, arguments), (0, r.default)(e).getTime() - (0, r.default)(t).getTime();
|
|
1619
1624
|
}
|
|
1620
1625
|
t.exports = e.default;
|
|
1621
|
-
})),
|
|
1626
|
+
})), Je = /* @__PURE__ */ t(((e) => {
|
|
1622
1627
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getRoundingMethod = r;
|
|
1623
1628
|
var t = {
|
|
1624
1629
|
ceil: Math.ceil,
|
|
@@ -1631,27 +1636,27 @@ var z = ["type"], B = {
|
|
|
1631
1636
|
function r(e) {
|
|
1632
1637
|
return e ? t[e] : t[n];
|
|
1633
1638
|
}
|
|
1634
|
-
})),
|
|
1639
|
+
})), Ye = /* @__PURE__ */ t(((e, t) => {
|
|
1635
1640
|
var n = H().default;
|
|
1636
1641
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = s;
|
|
1637
|
-
var r =
|
|
1642
|
+
var r = Ke(), i = n(qe()), a = n(W()), o = Je();
|
|
1638
1643
|
function s(e, t, n) {
|
|
1639
1644
|
(0, a.default)(2, arguments);
|
|
1640
1645
|
var s = (0, i.default)(e, t) / r.millisecondsInHour;
|
|
1641
1646
|
return (0, o.getRoundingMethod)(n == null ? void 0 : n.roundingMethod)(s);
|
|
1642
1647
|
}
|
|
1643
1648
|
t.exports = e.default;
|
|
1644
|
-
})),
|
|
1649
|
+
})), Xe = /* @__PURE__ */ t(((e, t) => {
|
|
1645
1650
|
var n = H().default;
|
|
1646
1651
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = s;
|
|
1647
|
-
var r =
|
|
1652
|
+
var r = Ke(), i = n(qe()), a = n(W()), o = Je();
|
|
1648
1653
|
function s(e, t, n) {
|
|
1649
1654
|
(0, a.default)(2, arguments);
|
|
1650
1655
|
var s = (0, i.default)(e, t) / r.millisecondsInMinute;
|
|
1651
1656
|
return (0, o.getRoundingMethod)(n == null ? void 0 : n.roundingMethod)(s);
|
|
1652
1657
|
}
|
|
1653
1658
|
t.exports = e.default;
|
|
1654
|
-
})),
|
|
1659
|
+
})), Ze = /* @__PURE__ */ t(((e, t) => {
|
|
1655
1660
|
var n = H().default;
|
|
1656
1661
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
1657
1662
|
var r = n(G()), i = n(W());
|
|
@@ -1661,7 +1666,7 @@ var z = ["type"], B = {
|
|
|
1661
1666
|
return o * 12 + s;
|
|
1662
1667
|
}
|
|
1663
1668
|
t.exports = e.default;
|
|
1664
|
-
})),
|
|
1669
|
+
})), Qe = /* @__PURE__ */ t(((e, t) => {
|
|
1665
1670
|
var n = H().default;
|
|
1666
1671
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
1667
1672
|
var r = n(G()), i = n(W());
|
|
@@ -1671,7 +1676,7 @@ var z = ["type"], B = {
|
|
|
1671
1676
|
return t.setHours(23, 59, 59, 999), t;
|
|
1672
1677
|
}
|
|
1673
1678
|
t.exports = e.default;
|
|
1674
|
-
})),
|
|
1679
|
+
})), $e = /* @__PURE__ */ t(((e, t) => {
|
|
1675
1680
|
var n = H().default;
|
|
1676
1681
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
1677
1682
|
var r = n(G()), i = n(W());
|
|
@@ -1681,20 +1686,20 @@ var z = ["type"], B = {
|
|
|
1681
1686
|
return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(23, 59, 59, 999), t;
|
|
1682
1687
|
}
|
|
1683
1688
|
t.exports = e.default;
|
|
1684
|
-
})),
|
|
1689
|
+
})), et = /* @__PURE__ */ t(((e, t) => {
|
|
1685
1690
|
var n = H().default;
|
|
1686
1691
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = s;
|
|
1687
|
-
var r = n(G()), i = n(
|
|
1692
|
+
var r = n(G()), i = n(Qe()), a = n($e()), o = n(W());
|
|
1688
1693
|
function s(e) {
|
|
1689
1694
|
(0, o.default)(1, arguments);
|
|
1690
1695
|
var t = (0, r.default)(e);
|
|
1691
1696
|
return (0, i.default)(t).getTime() === (0, a.default)(t).getTime();
|
|
1692
1697
|
}
|
|
1693
1698
|
t.exports = e.default;
|
|
1694
|
-
})),
|
|
1699
|
+
})), tt = /* @__PURE__ */ t(((e, t) => {
|
|
1695
1700
|
var n = H().default;
|
|
1696
1701
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = c;
|
|
1697
|
-
var r = n(G()), i = n(
|
|
1702
|
+
var r = n(G()), i = n(Ze()), a = n(He()), o = n(W()), s = n(et());
|
|
1698
1703
|
function c(e, t) {
|
|
1699
1704
|
(0, o.default)(2, arguments);
|
|
1700
1705
|
var n = (0, r.default)(e), c = (0, r.default)(t), l = (0, a.default)(n, c), u = Math.abs((0, i.default)(n, c)), d;
|
|
@@ -1707,17 +1712,17 @@ var z = ["type"], B = {
|
|
|
1707
1712
|
return d === 0 ? 0 : d;
|
|
1708
1713
|
}
|
|
1709
1714
|
t.exports = e.default;
|
|
1710
|
-
})),
|
|
1715
|
+
})), nt = /* @__PURE__ */ t(((e, t) => {
|
|
1711
1716
|
var n = H().default;
|
|
1712
1717
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
1713
|
-
var r = n(
|
|
1718
|
+
var r = n(qe()), i = n(W()), a = Je();
|
|
1714
1719
|
function o(e, t, n) {
|
|
1715
1720
|
(0, i.default)(2, arguments);
|
|
1716
1721
|
var o = (0, r.default)(e, t) / 1e3;
|
|
1717
1722
|
return (0, a.getRoundingMethod)(n == null ? void 0 : n.roundingMethod)(o);
|
|
1718
1723
|
}
|
|
1719
1724
|
t.exports = e.default;
|
|
1720
|
-
})),
|
|
1725
|
+
})), rt = /* @__PURE__ */ t(((e, t) => {
|
|
1721
1726
|
var n = H().default;
|
|
1722
1727
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
1723
1728
|
var r = n(G()), i = n(W());
|
|
@@ -1727,10 +1732,10 @@ var z = ["type"], B = {
|
|
|
1727
1732
|
return n.getFullYear() - a.getFullYear();
|
|
1728
1733
|
}
|
|
1729
1734
|
t.exports = e.default;
|
|
1730
|
-
})),
|
|
1735
|
+
})), it = /* @__PURE__ */ t(((e, t) => {
|
|
1731
1736
|
var n = H().default;
|
|
1732
1737
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = s;
|
|
1733
|
-
var r = n(G()), i = n(
|
|
1738
|
+
var r = n(G()), i = n(rt()), a = n(He()), o = n(W());
|
|
1734
1739
|
function s(e, t) {
|
|
1735
1740
|
(0, o.default)(2, arguments);
|
|
1736
1741
|
var n = (0, r.default)(e), s = (0, r.default)(t), c = (0, a.default)(n, s), l = Math.abs((0, i.default)(n, s));
|
|
@@ -1739,10 +1744,10 @@ var z = ["type"], B = {
|
|
|
1739
1744
|
return d === 0 ? 0 : d;
|
|
1740
1745
|
}
|
|
1741
1746
|
t.exports = e.default;
|
|
1742
|
-
})),
|
|
1747
|
+
})), at = /* @__PURE__ */ t(((e, t) => {
|
|
1743
1748
|
var n = H().default;
|
|
1744
1749
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = p;
|
|
1745
|
-
var r = n(
|
|
1750
|
+
var r = n(He()), i = n(Fe()), a = n(Ge()), o = n(Ye()), s = n(Xe()), c = n(tt()), l = n(nt()), u = n(it()), d = n(G()), f = n(W());
|
|
1746
1751
|
function p(e) {
|
|
1747
1752
|
(0, f.default)(1, arguments);
|
|
1748
1753
|
var t = (0, d.default)(e.start), n = (0, d.default)(e.end);
|
|
@@ -1762,39 +1767,41 @@ var z = ["type"], B = {
|
|
|
1762
1767
|
return p.seconds = Math.abs((0, l.default)(n, y)), p;
|
|
1763
1768
|
}
|
|
1764
1769
|
t.exports = e.default;
|
|
1765
|
-
})),
|
|
1770
|
+
})), ot = /* @__PURE__ */ t(((e, t) => {
|
|
1766
1771
|
var n = H().default;
|
|
1767
1772
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
1768
|
-
var r = n(
|
|
1773
|
+
var r = n(Ne()), i = n(W()), a = n(K());
|
|
1769
1774
|
function o(e, t) {
|
|
1770
1775
|
(0, i.default)(2, arguments);
|
|
1771
1776
|
var n = (0, a.default)(t);
|
|
1772
1777
|
return (0, r.default)(e, -n);
|
|
1773
1778
|
}
|
|
1774
1779
|
t.exports = e.default;
|
|
1775
|
-
})),
|
|
1780
|
+
})), st = /* @__PURE__ */ t(((e, t) => {
|
|
1776
1781
|
var n = H().default;
|
|
1777
1782
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
1778
|
-
var r = n(K()), i = n(
|
|
1783
|
+
var r = n(K()), i = n(Pe()), a = n(W());
|
|
1779
1784
|
function o(e, t) {
|
|
1780
1785
|
(0, a.default)(2, arguments);
|
|
1781
1786
|
var n = (0, r.default)(t);
|
|
1782
1787
|
return (0, i.default)(e, -n);
|
|
1783
1788
|
}
|
|
1784
1789
|
t.exports = e.default;
|
|
1785
|
-
})),
|
|
1790
|
+
})), ct = /* @__PURE__ */ t(((e, t) => {
|
|
1786
1791
|
var n = H().default;
|
|
1787
1792
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = c;
|
|
1788
|
-
var r = n(U()), i = n(
|
|
1793
|
+
var r = n(U()), i = n(ot()), a = n(st()), o = n(W()), s = n(K());
|
|
1789
1794
|
function c(e, t) {
|
|
1790
1795
|
if ((0, o.default)(2, arguments), !t || (0, r.default)(t) !== "object") return /* @__PURE__ */ new Date(NaN);
|
|
1791
1796
|
var n = t.years ? (0, s.default)(t.years) : 0, c = t.months ? (0, s.default)(t.months) : 0, l = t.weeks ? (0, s.default)(t.weeks) : 0, u = t.days ? (0, s.default)(t.days) : 0, d = t.hours ? (0, s.default)(t.hours) : 0, f = t.minutes ? (0, s.default)(t.minutes) : 0, p = t.seconds ? (0, s.default)(t.seconds) : 0, m = (0, a.default)(e, c + n * 12), h = (0, i.default)(m, u + l * 7), g = (p + (f + d * 60) * 60) * 1e3;
|
|
1792
1797
|
return new Date(h.getTime() - g);
|
|
1793
1798
|
}
|
|
1794
1799
|
t.exports = e.default;
|
|
1795
|
-
})), J = /* @__PURE__ */
|
|
1800
|
+
})), J = /* @__PURE__ */ n(Me(), 1), lt = /* @__PURE__ */ n(Fe(), 1), Y = /* @__PURE__ */ n(je(), 1), ut = /* @__PURE__ */ n(Ie(), 1), dt = /* @__PURE__ */ n(Le(), 1), ft = /* @__PURE__ */ n(Re(), 1), pt = /* @__PURE__ */ n(ze(), 1), mt = /* @__PURE__ */ n(Be(), 1), ht = /* @__PURE__ */ n(Ve(), 1), gt = /* @__PURE__ */ n(at(), 1), _t = /* @__PURE__ */ n(ct(), 1);
|
|
1801
|
+
e();
|
|
1802
|
+
var vt = ["endDate"];
|
|
1796
1803
|
function X(e, t) {
|
|
1797
|
-
let { endDate: n } = t, r =
|
|
1804
|
+
let { endDate: n } = t, r = l(t, vt);
|
|
1798
1805
|
switch (e == null ? void 0 : e.type) {
|
|
1799
1806
|
case "symbol": return e.name === "true";
|
|
1800
1807
|
case "constant": {
|
|
@@ -1806,13 +1813,13 @@ function X(e, t) {
|
|
|
1806
1813
|
}
|
|
1807
1814
|
}
|
|
1808
1815
|
case "property": {
|
|
1809
|
-
let t = r.properties[e.id], i =
|
|
1816
|
+
let t = r.properties[e.id], i = T(t);
|
|
1810
1817
|
switch (e.result_type) {
|
|
1811
1818
|
case "text": return i;
|
|
1812
1819
|
case "number": return parseFloat(i);
|
|
1813
1820
|
case "boolean": return typeof i == "string" ? i === "true" : !!i;
|
|
1814
1821
|
case "date": {
|
|
1815
|
-
let e =
|
|
1822
|
+
let e = w(t);
|
|
1816
1823
|
if (e) {
|
|
1817
1824
|
if (n && e.end_date) {
|
|
1818
1825
|
let t = new Date(e.end_date);
|
|
@@ -1829,11 +1836,11 @@ function X(e, t) {
|
|
|
1829
1836
|
}
|
|
1830
1837
|
}
|
|
1831
1838
|
case "operator":
|
|
1832
|
-
case "function": return
|
|
1839
|
+
case "function": return yt(e, r);
|
|
1833
1840
|
default: throw Error(`invalid or unsupported formula "${e == null ? void 0 : e.type}`);
|
|
1834
1841
|
}
|
|
1835
1842
|
}
|
|
1836
|
-
function
|
|
1843
|
+
function yt(e, t) {
|
|
1837
1844
|
let n = e == null ? void 0 : e.args;
|
|
1838
1845
|
switch (e.name) {
|
|
1839
1846
|
case "and": return X(n[0], t) && X(n[1], t);
|
|
@@ -1903,127 +1910,128 @@ function vt(e, t) {
|
|
|
1903
1910
|
let e = X(n[0], t), r = X(n[1], t);
|
|
1904
1911
|
return new RegExp(r).test(e);
|
|
1905
1912
|
}
|
|
1906
|
-
case "date": return (0,
|
|
1913
|
+
case "date": return (0, ut.default)(X(n[0], t));
|
|
1907
1914
|
case "dateAdd": {
|
|
1908
1915
|
let e = X(n[0], t), r = X(n[1], t), i = X(n[1], t);
|
|
1909
|
-
return (0,
|
|
1916
|
+
return (0, lt.default)(e, { [i]: r });
|
|
1910
1917
|
}
|
|
1911
1918
|
case "dateBetween": {
|
|
1912
1919
|
let e = X(n[0], t), r = X(n[1], t), i = X(n[1], t);
|
|
1913
|
-
return (0,
|
|
1920
|
+
return (0, gt.default)({
|
|
1914
1921
|
start: r,
|
|
1915
1922
|
end: e
|
|
1916
1923
|
})[i];
|
|
1917
1924
|
}
|
|
1918
1925
|
case "dateSubtract": {
|
|
1919
1926
|
let e = X(n[0], t), r = X(n[1], t), i = X(n[1], t);
|
|
1920
|
-
return (0,
|
|
1927
|
+
return (0, _t.default)(e, { [i]: r });
|
|
1921
1928
|
}
|
|
1922
|
-
case "day": return (0,
|
|
1923
|
-
case "end": return X(n[0],
|
|
1929
|
+
case "day": return (0, dt.default)(X(n[0], t));
|
|
1930
|
+
case "end": return X(n[0], r(r({}, t), {}, { endDate: !0 }));
|
|
1924
1931
|
case "formatDate": {
|
|
1925
1932
|
let e = X(n[0], t), r = X(n[1], t).replace("dddd", "eeee");
|
|
1926
1933
|
return (0, Y.default)(e, r);
|
|
1927
1934
|
}
|
|
1928
1935
|
case "fromTimestamp": return new Date(X(n[0], t));
|
|
1929
|
-
case "hour": return (0,
|
|
1930
|
-
case "minute": return (0,
|
|
1931
|
-
case "month": return (0,
|
|
1936
|
+
case "hour": return (0, ft.default)(X(n[0], t));
|
|
1937
|
+
case "minute": return (0, pt.default)(X(n[0], t));
|
|
1938
|
+
case "month": return (0, mt.default)(X(n[0], t));
|
|
1932
1939
|
case "now": return /* @__PURE__ */ new Date();
|
|
1933
|
-
case "start": return X(n[0],
|
|
1940
|
+
case "start": return X(n[0], r(r({}, t), {}, { endDate: !1 }));
|
|
1934
1941
|
case "timestamp": return X(n[0], t).getTime();
|
|
1935
|
-
case "year": return (0,
|
|
1942
|
+
case "year": return (0, ht.default)(X(n[0], t));
|
|
1936
1943
|
default: throw Error(`invalid or unsupported function formula "${e == null ? void 0 : e.type}`);
|
|
1937
1944
|
}
|
|
1938
1945
|
}
|
|
1939
1946
|
//#endregion
|
|
1940
1947
|
//#region src/third-party/property.tsx
|
|
1948
|
+
e();
|
|
1941
1949
|
var Z = (e) => {
|
|
1942
|
-
let { components: t } =
|
|
1943
|
-
return t.Property ? /* @__PURE__ */
|
|
1944
|
-
},
|
|
1945
|
-
let { components: t, mapImageUrl:
|
|
1946
|
-
return /* @__PURE__ */
|
|
1947
|
-
value:
|
|
1950
|
+
let { components: t } = f();
|
|
1951
|
+
return t.Property ? /* @__PURE__ */ g.createElement(t.Property, e) : /* @__PURE__ */ g.createElement(bt, e);
|
|
1952
|
+
}, bt = g.memo((e) => {
|
|
1953
|
+
let { components: t, mapImageUrl: n, mapPageUrl: s } = f(), { schema: l, data: d, block: p, collection: m, inline: h = !1, linkToTitlePage: _ = !0 } = e, v = g.useMemo(() => function() {
|
|
1954
|
+
return /* @__PURE__ */ g.createElement(c, {
|
|
1955
|
+
value: d,
|
|
1948
1956
|
block: p
|
|
1949
1957
|
});
|
|
1950
|
-
}, [p,
|
|
1951
|
-
return /* @__PURE__ */
|
|
1952
|
-
value:
|
|
1958
|
+
}, [p, d]), y = g.useMemo(() => function() {
|
|
1959
|
+
return /* @__PURE__ */ g.createElement(c, {
|
|
1960
|
+
value: d,
|
|
1953
1961
|
block: p
|
|
1954
1962
|
});
|
|
1955
|
-
}, [p,
|
|
1963
|
+
}, [p, d]), b = g.useMemo(() => function() {
|
|
1956
1964
|
let e;
|
|
1957
1965
|
try {
|
|
1958
|
-
e = X(
|
|
1966
|
+
e = X(l.formula, {
|
|
1959
1967
|
schema: m == null ? void 0 : m.schema,
|
|
1960
1968
|
properties: p == null ? void 0 : p.properties
|
|
1961
|
-
}), isNaN(e) && console.debug("NaN",
|
|
1969
|
+
}), isNaN(e) && console.debug("NaN", l.formula), e instanceof Date && (e = (0, Y.default)(e, "MMM d, YYY hh:mm aa"));
|
|
1962
1970
|
} catch (t) {
|
|
1963
|
-
console.error("error evaluating formula",
|
|
1971
|
+
console.error("error evaluating formula", l.formula, t), e = null;
|
|
1964
1972
|
}
|
|
1965
1973
|
return e;
|
|
1966
1974
|
}, [
|
|
1967
1975
|
p == null ? void 0 : p.properties,
|
|
1968
1976
|
m == null ? void 0 : m.schema,
|
|
1969
|
-
|
|
1970
|
-
]), x =
|
|
1971
|
-
return /* @__PURE__ */
|
|
1972
|
-
value:
|
|
1977
|
+
l
|
|
1978
|
+
]), x = g.useMemo(() => function() {
|
|
1979
|
+
return /* @__PURE__ */ g.createElement(c, {
|
|
1980
|
+
value: d,
|
|
1973
1981
|
block: p
|
|
1974
1982
|
});
|
|
1975
|
-
}, [p,
|
|
1976
|
-
return p && _ ? /* @__PURE__ */
|
|
1983
|
+
}, [p, d]), S = g.useMemo(() => function() {
|
|
1984
|
+
return p && _ ? /* @__PURE__ */ g.createElement(t.PageLink, {
|
|
1977
1985
|
className: "notion-page-link",
|
|
1978
|
-
href:
|
|
1979
|
-
}, /* @__PURE__ */
|
|
1980
|
-
value:
|
|
1986
|
+
href: s(p.id)
|
|
1987
|
+
}, /* @__PURE__ */ g.createElement(u, { block: p })) : /* @__PURE__ */ g.createElement(c, {
|
|
1988
|
+
value: d,
|
|
1981
1989
|
block: p
|
|
1982
1990
|
});
|
|
1983
1991
|
}, [
|
|
1984
1992
|
p,
|
|
1985
1993
|
t,
|
|
1986
|
-
|
|
1994
|
+
d,
|
|
1987
1995
|
_,
|
|
1988
|
-
|
|
1989
|
-
]), C =
|
|
1990
|
-
return /* @__PURE__ */
|
|
1996
|
+
s
|
|
1997
|
+
]), C = g.useMemo(() => function() {
|
|
1998
|
+
return /* @__PURE__ */ g.createElement("span", null, /* @__PURE__ */ g.createElement(c, {
|
|
1991
1999
|
block: p,
|
|
1992
2000
|
value: [["‣", [["u", p.created_by_id]]]]
|
|
1993
2001
|
}));
|
|
1994
|
-
}, [p]), w =
|
|
1995
|
-
return
|
|
1996
|
-
key:
|
|
2002
|
+
}, [p]), w = g.useMemo(() => function() {
|
|
2003
|
+
return d.filter((e) => e.length === 2).map((e) => e.flat().flat()).map((e, r) => /* @__PURE__ */ g.createElement(t.Link, {
|
|
2004
|
+
key: r,
|
|
1997
2005
|
className: "notion-property-file",
|
|
1998
|
-
href:
|
|
2006
|
+
href: n(e[2], p),
|
|
1999
2007
|
target: "_blank",
|
|
2000
2008
|
rel: "noreferrer noopener"
|
|
2001
|
-
}, /* @__PURE__ */
|
|
2009
|
+
}, /* @__PURE__ */ g.createElement(o, {
|
|
2002
2010
|
alt: e[0],
|
|
2003
|
-
src:
|
|
2011
|
+
src: n(e[2], p),
|
|
2004
2012
|
loading: "lazy"
|
|
2005
2013
|
})));
|
|
2006
2014
|
}, [
|
|
2007
2015
|
p,
|
|
2008
2016
|
t,
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
]), T =
|
|
2012
|
-
let e =
|
|
2013
|
-
return /* @__PURE__ */
|
|
2017
|
+
d,
|
|
2018
|
+
n
|
|
2019
|
+
]), T = g.useMemo(() => function() {
|
|
2020
|
+
let e = d && d[0][0] === "Yes";
|
|
2021
|
+
return /* @__PURE__ */ g.createElement("div", { className: "notion-property-checkbox-container" }, /* @__PURE__ */ g.createElement(i, {
|
|
2014
2022
|
isChecked: e,
|
|
2015
2023
|
blockId: void 0
|
|
2016
|
-
}), /* @__PURE__ */
|
|
2017
|
-
}, [
|
|
2018
|
-
let e = JSON.parse(JSON.stringify(
|
|
2019
|
-
if (
|
|
2024
|
+
}), /* @__PURE__ */ g.createElement("span", { className: "notion-property-checkbox-text" }, l.name));
|
|
2025
|
+
}, [d, l]), E = g.useMemo(() => function() {
|
|
2026
|
+
let e = JSON.parse(JSON.stringify(d));
|
|
2027
|
+
if (h) try {
|
|
2020
2028
|
let t = new URL(e[0][0]);
|
|
2021
2029
|
e[0][0] = t.hostname.replace(/^www\./, "");
|
|
2022
2030
|
} catch (e) {}
|
|
2023
|
-
return /* @__PURE__ */
|
|
2031
|
+
return /* @__PURE__ */ g.createElement(c, {
|
|
2024
2032
|
value: e,
|
|
2025
2033
|
block: p,
|
|
2026
|
-
inline:
|
|
2034
|
+
inline: h,
|
|
2027
2035
|
linkProps: {
|
|
2028
2036
|
target: "_blank",
|
|
2029
2037
|
rel: "noreferrer noopener"
|
|
@@ -2031,27 +2039,27 @@ var Z = (e) => {
|
|
|
2031
2039
|
});
|
|
2032
2040
|
}, [
|
|
2033
2041
|
p,
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
]), D =
|
|
2037
|
-
return /* @__PURE__ */
|
|
2038
|
-
value:
|
|
2042
|
+
d,
|
|
2043
|
+
h
|
|
2044
|
+
]), D = g.useMemo(() => function() {
|
|
2045
|
+
return /* @__PURE__ */ g.createElement(c, {
|
|
2046
|
+
value: d,
|
|
2039
2047
|
linkProtocol: "mailto",
|
|
2040
2048
|
block: p
|
|
2041
2049
|
});
|
|
2042
|
-
}, [p,
|
|
2043
|
-
return /* @__PURE__ */
|
|
2044
|
-
value:
|
|
2050
|
+
}, [p, d]), O = g.useMemo(() => function() {
|
|
2051
|
+
return /* @__PURE__ */ g.createElement(c, {
|
|
2052
|
+
value: d,
|
|
2045
2053
|
linkProtocol: "tel",
|
|
2046
2054
|
block: p
|
|
2047
2055
|
});
|
|
2048
|
-
}, [p,
|
|
2049
|
-
let e = parseFloat(
|
|
2050
|
-
if (isNaN(e)) return /* @__PURE__ */
|
|
2051
|
-
value:
|
|
2056
|
+
}, [p, d]), k = g.useMemo(() => function() {
|
|
2057
|
+
let e = parseFloat(d[0][0] || "0"), t = "";
|
|
2058
|
+
if (isNaN(e)) return /* @__PURE__ */ g.createElement(c, {
|
|
2059
|
+
value: d,
|
|
2052
2060
|
block: p
|
|
2053
2061
|
});
|
|
2054
|
-
switch (
|
|
2062
|
+
switch (l.number_format) {
|
|
2055
2063
|
case "number_with_commas":
|
|
2056
2064
|
t = (0, J.default)()(e);
|
|
2057
2065
|
break;
|
|
@@ -2105,36 +2113,36 @@ var Z = (e) => {
|
|
|
2105
2113
|
padRight: 2
|
|
2106
2114
|
})(e);
|
|
2107
2115
|
break;
|
|
2108
|
-
default: return /* @__PURE__ */
|
|
2109
|
-
value:
|
|
2116
|
+
default: return /* @__PURE__ */ g.createElement(c, {
|
|
2117
|
+
value: d,
|
|
2110
2118
|
block: p
|
|
2111
2119
|
});
|
|
2112
2120
|
}
|
|
2113
|
-
return /* @__PURE__ */
|
|
2121
|
+
return /* @__PURE__ */ g.createElement(c, {
|
|
2114
2122
|
value: [[t]],
|
|
2115
2123
|
block: p
|
|
2116
2124
|
});
|
|
2117
2125
|
}, [
|
|
2118
2126
|
p,
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
]), A =
|
|
2122
|
-
return /* @__PURE__ */
|
|
2127
|
+
d,
|
|
2128
|
+
l
|
|
2129
|
+
]), A = g.useMemo(() => function() {
|
|
2130
|
+
return /* @__PURE__ */ g.createElement(c, {
|
|
2123
2131
|
block: p,
|
|
2124
|
-
value: [[
|
|
2132
|
+
value: [[a(p == null ? void 0 : p.created_time, { month: "short" })]]
|
|
2125
2133
|
});
|
|
2126
|
-
}, [p]), j =
|
|
2127
|
-
return /* @__PURE__ */
|
|
2134
|
+
}, [p]), j = g.useMemo(() => function() {
|
|
2135
|
+
return /* @__PURE__ */ g.createElement(c, {
|
|
2128
2136
|
block: p,
|
|
2129
|
-
value: [[
|
|
2137
|
+
value: [[a(p == null ? void 0 : p.last_edited_time, { month: "short" })]]
|
|
2130
2138
|
});
|
|
2131
2139
|
}, [p]);
|
|
2132
|
-
if (!
|
|
2133
|
-
value:
|
|
2140
|
+
if (!l) return d ? /* @__PURE__ */ g.createElement(c, {
|
|
2141
|
+
value: d,
|
|
2134
2142
|
block: p
|
|
2135
2143
|
}) : null;
|
|
2136
2144
|
let M = null;
|
|
2137
|
-
if (
|
|
2145
|
+
if (d || l.type === "checkbox" || l.type === "title" || l.type === "formula" || l.type === "created_by" || l.type === "last_edited_by" || l.type === "created_time" || l.type === "last_edited_time") switch (l.type) {
|
|
2138
2146
|
case "relation":
|
|
2139
2147
|
M = t.propertyRelationValue(e, y);
|
|
2140
2148
|
break;
|
|
@@ -2146,17 +2154,17 @@ var Z = (e) => {
|
|
|
2146
2154
|
break;
|
|
2147
2155
|
case "select":
|
|
2148
2156
|
case "multi_select":
|
|
2149
|
-
M = (
|
|
2150
|
-
var
|
|
2151
|
-
let
|
|
2152
|
-
return t.propertySelectValue(
|
|
2153
|
-
key:
|
|
2157
|
+
M = (d[0][0] || "").split(",").map((n, i) => {
|
|
2158
|
+
var a;
|
|
2159
|
+
let o = (a = l.options) == null ? void 0 : a.find((e) => n === e.value), s = o == null ? void 0 : o.color;
|
|
2160
|
+
return t.propertySelectValue(r(r({}, e), {}, {
|
|
2161
|
+
key: i,
|
|
2154
2162
|
value: n,
|
|
2155
|
-
option:
|
|
2156
|
-
color:
|
|
2157
|
-
}), () => /* @__PURE__ */
|
|
2158
|
-
key:
|
|
2159
|
-
className: `notion-property-${
|
|
2163
|
+
option: o,
|
|
2164
|
+
color: s
|
|
2165
|
+
}), () => /* @__PURE__ */ g.createElement("div", {
|
|
2166
|
+
key: i,
|
|
2167
|
+
className: `notion-property-${l.type}-item ${s && `notion-item-${s}`}`
|
|
2160
2168
|
}, n));
|
|
2161
2169
|
});
|
|
2162
2170
|
break;
|
|
@@ -2199,39 +2207,43 @@ var Z = (e) => {
|
|
|
2199
2207
|
case "date":
|
|
2200
2208
|
M = t.propertyDateValue(e, v);
|
|
2201
2209
|
break;
|
|
2202
|
-
default: M = /* @__PURE__ */
|
|
2203
|
-
value:
|
|
2210
|
+
default: M = /* @__PURE__ */ g.createElement(c, {
|
|
2211
|
+
value: d,
|
|
2204
2212
|
block: p
|
|
2205
2213
|
});
|
|
2206
2214
|
}
|
|
2207
|
-
let N =
|
|
2208
|
-
return /* @__PURE__ */
|
|
2215
|
+
let N = l.type === "title";
|
|
2216
|
+
return /* @__PURE__ */ g.createElement("span", { className: `notion-property notion-property-${l.type}` }, N ? null : /* @__PURE__ */ g.createElement("div", { style: {
|
|
2209
2217
|
marginRight: "1em",
|
|
2210
2218
|
display: "inline"
|
|
2211
|
-
} }, /* @__PURE__ */
|
|
2219
|
+
} }, /* @__PURE__ */ g.createElement(c, {
|
|
2212
2220
|
block: p,
|
|
2213
|
-
value: [[
|
|
2221
|
+
value: [[l.name, [["h", "gray"]]]]
|
|
2214
2222
|
}), " "), M);
|
|
2215
|
-
})
|
|
2216
|
-
|
|
2217
|
-
|
|
2223
|
+
});
|
|
2224
|
+
//#endregion
|
|
2225
|
+
//#region src/third-party/collection-row.tsx
|
|
2226
|
+
e();
|
|
2227
|
+
var xt = ({ block: e, pageHeader: t = !1, className: n }) => {
|
|
2228
|
+
var i, a, o;
|
|
2229
|
+
let { recordMap: s } = f(), c = e.parent_id, l = (i = s.collection[c]) == null ? void 0 : i.value, u = l == null ? void 0 : l.schema;
|
|
2218
2230
|
if (!l || !u) return null;
|
|
2219
|
-
let
|
|
2220
|
-
if ((
|
|
2231
|
+
let d = Object.keys(u).filter((e) => e !== "title");
|
|
2232
|
+
if ((a = l.format) != null && a.property_visibility && (d = d.filter((e) => {
|
|
2221
2233
|
var t;
|
|
2222
2234
|
return ((t = l.format.property_visibility.find(({ property: t }) => t === e)) == null ? void 0 : t.visibility) !== "hide";
|
|
2223
|
-
})), (
|
|
2235
|
+
})), (o = l.format) != null && o.collection_page_properties) {
|
|
2224
2236
|
var p;
|
|
2225
|
-
let e = (p = l.format) == null ? void 0 : p.collection_page_properties.reduce((e, t, n) =>
|
|
2226
|
-
|
|
2227
|
-
} else
|
|
2228
|
-
return /* @__PURE__ */
|
|
2237
|
+
let e = (p = l.format) == null ? void 0 : p.collection_page_properties.reduce((e, t, n) => r(r({}, e), {}, { [t.property]: n }), {});
|
|
2238
|
+
d.sort((t, n) => e[t] - e[n]);
|
|
2239
|
+
} else d.sort((e, t) => u[e].name.localeCompare(u[t].name));
|
|
2240
|
+
return /* @__PURE__ */ g.createElement("div", { className: `notion-collection-row ${n || ""}` }, /* @__PURE__ */ g.createElement("div", { className: "notion-collection-row-body" }, d.map((n) => {
|
|
2229
2241
|
var r;
|
|
2230
2242
|
let i = u[n];
|
|
2231
|
-
return /* @__PURE__ */
|
|
2243
|
+
return /* @__PURE__ */ g.createElement("div", {
|
|
2232
2244
|
className: "notion-collection-row-property",
|
|
2233
2245
|
key: n
|
|
2234
|
-
}, /* @__PURE__ */
|
|
2246
|
+
}, /* @__PURE__ */ g.createElement(h, { schema: i }), /* @__PURE__ */ g.createElement("div", { className: "notion-collection-row-value" }, /* @__PURE__ */ g.createElement(Z, {
|
|
2235
2247
|
schema: i,
|
|
2236
2248
|
data: (r = e.properties) == null ? void 0 : r[n],
|
|
2237
2249
|
propertyId: n,
|
|
@@ -2240,13 +2252,21 @@ var Z = (e) => {
|
|
|
2240
2252
|
pageHeader: t
|
|
2241
2253
|
})));
|
|
2242
2254
|
})));
|
|
2243
|
-
}
|
|
2244
|
-
|
|
2245
|
-
|
|
2255
|
+
};
|
|
2256
|
+
//#endregion
|
|
2257
|
+
//#region src/icons/empty-icon.tsx
|
|
2258
|
+
e();
|
|
2259
|
+
var St = ["className"], Ct = (e) => {
|
|
2260
|
+
let { className: t } = e, n = l(e, St);
|
|
2261
|
+
return /* @__PURE__ */ g.createElement("svg", r(r({ className: t }, n), {}, {
|
|
2246
2262
|
viewBox: "0 0 14 14",
|
|
2247
2263
|
width: "14"
|
|
2248
|
-
}), /* @__PURE__ */
|
|
2249
|
-
}
|
|
2264
|
+
}), /* @__PURE__ */ g.createElement("path", { d: "M11.0918,0 C11.5383,0 11.9307,0.295898 12.0533,0.725586 L13.9615,7.40332 C13.9871,7.49316 14,7.58594 14,7.67871 L14,13 C14,13.5527 13.5522,14 13,14 L1,14 C0.447754,14 0,13.5527 0,13 L0,7.67871 C0,7.58594 0.0129395,7.49316 0.0384521,7.40332 L1.94666,0.725586 C2.06934,0.295898 2.46167,0 2.9082,0 L11.0918,0 Z M4.27271,1.5 C3.83728,1.5 3.45178,1.78223 3.31982,2.19727 L1.91455,6.61328 C1.70947,7.25879 2.1908,7.91699 2.86755,7.91699 L4.70837,7.91699 C4.70837,8.93652 5.16663,10.168 7,10.168 C8.83337,10.168 9.29163,8.93652 9.29163,7.91699 L11.1478,7.89355 C11.8201,7.88477 12.2927,7.22852 12.0876,6.58887 L10.681,2.19531 C10.5485,1.78125 10.1635,1.5 9.72864,1.5 L4.27271,1.5 Z" }));
|
|
2265
|
+
};
|
|
2266
|
+
//#endregion
|
|
2267
|
+
//#region src/third-party/collection-card.tsx
|
|
2268
|
+
e();
|
|
2269
|
+
var wt = [
|
|
2250
2270
|
"collection",
|
|
2251
2271
|
"block",
|
|
2252
2272
|
"cover",
|
|
@@ -2254,10 +2274,10 @@ var Z = (e) => {
|
|
|
2254
2274
|
"coverAspect",
|
|
2255
2275
|
"properties",
|
|
2256
2276
|
"className"
|
|
2257
|
-
],
|
|
2258
|
-
var t, n,
|
|
2259
|
-
let { collection:
|
|
2260
|
-
if ((
|
|
2277
|
+
], Tt = (e) => {
|
|
2278
|
+
var t, n, i;
|
|
2279
|
+
let { collection: a, block: o, cover: c, coverSize: u, coverAspect: m, properties: h, className: _ } = e, v = l(e, wt), y = f(), { components: b, recordMap: x, mapPageUrl: S, mapImageUrl: C, isLinkCollectionToUrlProperty: w } = y, E = null, { page_cover_position: D = .5 } = o.format || {}, O = (1 - D) * 100;
|
|
2280
|
+
if ((c == null ? void 0 : c.type) === "page_content") {
|
|
2261
2281
|
var k;
|
|
2262
2282
|
let e = (k = o.content) == null ? void 0 : k.find((e) => {
|
|
2263
2283
|
var t;
|
|
@@ -2270,35 +2290,35 @@ var Z = (e) => {
|
|
|
2270
2290
|
if (n) {
|
|
2271
2291
|
var P;
|
|
2272
2292
|
let e = C(n, t), r = (P = t.properties) == null || (P = P.caption) == null || (P = P[0]) == null ? void 0 : P[0];
|
|
2273
|
-
E = /* @__PURE__ */
|
|
2293
|
+
E = /* @__PURE__ */ g.createElement(p, {
|
|
2274
2294
|
src: e,
|
|
2275
2295
|
alt: r || "notion image",
|
|
2276
2296
|
style: { objectFit: m }
|
|
2277
2297
|
});
|
|
2278
2298
|
}
|
|
2279
2299
|
}
|
|
2280
|
-
E || (E = /* @__PURE__ */
|
|
2281
|
-
} else if ((
|
|
2300
|
+
E || (E = /* @__PURE__ */ g.createElement("div", { className: "notion-collection-card-cover-empty" }));
|
|
2301
|
+
} else if ((c == null ? void 0 : c.type) === "page_cover") {
|
|
2282
2302
|
let { page_cover: e } = o.format || {};
|
|
2283
2303
|
if (e) {
|
|
2284
2304
|
var F;
|
|
2285
2305
|
let t = (1 - D) * 100;
|
|
2286
|
-
E = /* @__PURE__ */
|
|
2306
|
+
E = /* @__PURE__ */ g.createElement(p, {
|
|
2287
2307
|
src: C(e, o),
|
|
2288
|
-
alt:
|
|
2308
|
+
alt: T((F = o.properties) == null ? void 0 : F.title),
|
|
2289
2309
|
style: {
|
|
2290
2310
|
objectFit: m,
|
|
2291
2311
|
objectPosition: `center ${t}%`
|
|
2292
2312
|
}
|
|
2293
2313
|
});
|
|
2294
2314
|
}
|
|
2295
|
-
} else if ((
|
|
2315
|
+
} else if ((c == null ? void 0 : c.type) === "property") {
|
|
2296
2316
|
var I, L;
|
|
2297
|
-
let { property: e } =
|
|
2317
|
+
let { property: e } = c, t = (I = a.schema) == null ? void 0 : I[e], n = (L = o.properties) == null ? void 0 : L[e];
|
|
2298
2318
|
if (t && n) {
|
|
2299
2319
|
if (t.type === "file") {
|
|
2300
2320
|
let e = n.filter((e) => e.length === 2).map((e) => e.flat().flat())[0];
|
|
2301
|
-
e && (E = /* @__PURE__ */
|
|
2321
|
+
e && (E = /* @__PURE__ */ g.createElement("span", { className: `notion-property-${t.type}` }, /* @__PURE__ */ g.createElement(p, {
|
|
2302
2322
|
alt: e[0],
|
|
2303
2323
|
src: C(e[2], o),
|
|
2304
2324
|
style: {
|
|
@@ -2306,7 +2326,7 @@ var Z = (e) => {
|
|
|
2306
2326
|
objectPosition: `center ${O}%`
|
|
2307
2327
|
}
|
|
2308
2328
|
})));
|
|
2309
|
-
} else E = /* @__PURE__ */
|
|
2329
|
+
} else E = /* @__PURE__ */ g.createElement(Z, {
|
|
2310
2330
|
propertyId: e,
|
|
2311
2331
|
schema: t,
|
|
2312
2332
|
data: n
|
|
@@ -2314,46 +2334,50 @@ var Z = (e) => {
|
|
|
2314
2334
|
}
|
|
2315
2335
|
}
|
|
2316
2336
|
let R = [];
|
|
2317
|
-
|
|
2337
|
+
w && (R = h == null || (t = h.filter((e) => {
|
|
2318
2338
|
var t;
|
|
2319
|
-
return e.visible && e.property !== "title" && ((t =
|
|
2339
|
+
return e.visible && e.property !== "title" && ((t = a.schema) == null ? void 0 : t[e.property]);
|
|
2320
2340
|
}).filter((e) => {
|
|
2321
2341
|
var t;
|
|
2322
|
-
return o.properties ? ((t =
|
|
2342
|
+
return o.properties ? ((t = a.schema) == null ? void 0 : t[e.property]).type == "url" : !1;
|
|
2323
2343
|
}).map((e) => o.properties[e.property])) == null ? void 0 : t.filter((e) => e && e.length > 0 && e[0] != null));
|
|
2324
2344
|
let z = null;
|
|
2325
2345
|
R && R.length > 0 && R[0].length > 0 && R[0][0].length > 0 && (z = R[0][0][0]);
|
|
2326
|
-
let B = /* @__PURE__ */
|
|
2327
|
-
schema: (n =
|
|
2328
|
-
data: o == null || (
|
|
2346
|
+
let B = /* @__PURE__ */ g.createElement(g.Fragment, null, (E || (c == null ? void 0 : c.type) !== "none") && /* @__PURE__ */ g.createElement("div", { className: "notion-collection-card-cover" }, E), /* @__PURE__ */ g.createElement("div", { className: "notion-collection-card-body" }, /* @__PURE__ */ g.createElement("div", { className: "notion-collection-card-property" }, /* @__PURE__ */ g.createElement(Z, {
|
|
2347
|
+
schema: (n = a.schema) == null ? void 0 : n.title,
|
|
2348
|
+
data: o == null || (i = o.properties) == null ? void 0 : i.title,
|
|
2329
2349
|
block: o,
|
|
2330
|
-
collection:
|
|
2331
|
-
})),
|
|
2350
|
+
collection: a
|
|
2351
|
+
})), h == null ? void 0 : h.filter((e) => {
|
|
2332
2352
|
var t;
|
|
2333
|
-
return e.visible && e.property !== "title" && ((t =
|
|
2353
|
+
return e.visible && e.property !== "title" && ((t = a.schema) == null ? void 0 : t[e.property]);
|
|
2334
2354
|
}).map((e) => {
|
|
2335
2355
|
var t;
|
|
2336
2356
|
if (!o.properties) return null;
|
|
2337
|
-
let n = (t =
|
|
2338
|
-
return /* @__PURE__ */
|
|
2357
|
+
let n = (t = a.schema) == null ? void 0 : t[e.property], r = o.properties[e.property];
|
|
2358
|
+
return /* @__PURE__ */ g.createElement("div", {
|
|
2339
2359
|
className: "notion-collection-card-property",
|
|
2340
2360
|
key: e.property
|
|
2341
|
-
}, /* @__PURE__ */
|
|
2361
|
+
}, /* @__PURE__ */ g.createElement(Z, {
|
|
2342
2362
|
schema: n,
|
|
2343
2363
|
data: r,
|
|
2344
2364
|
block: o,
|
|
2345
|
-
collection:
|
|
2365
|
+
collection: a,
|
|
2346
2366
|
inline: !0
|
|
2347
2367
|
}));
|
|
2348
2368
|
})));
|
|
2349
|
-
return /* @__PURE__ */
|
|
2350
|
-
className: `notion-collection-card ${`notion-collection-card-size-${
|
|
2369
|
+
return /* @__PURE__ */ g.createElement(s, r(r({}, y), {}, { components: r(r({}, y.components), {}, { PageLink: d }) }), w && z ? /* @__PURE__ */ g.createElement(b.Link, r({
|
|
2370
|
+
className: `notion-collection-card ${`notion-collection-card-size-${u}`} ${_ || ""}`,
|
|
2351
2371
|
href: z
|
|
2352
|
-
}, v), B) : /* @__PURE__ */
|
|
2353
|
-
className: `notion-collection-card ${`notion-collection-card-size-${
|
|
2372
|
+
}, v), B) : /* @__PURE__ */ g.createElement(b.PageLink, r({
|
|
2373
|
+
className: `notion-collection-card ${`notion-collection-card-size-${u}`} ${_ || ""}`,
|
|
2354
2374
|
href: S(o.id)
|
|
2355
2375
|
}, v), B));
|
|
2356
|
-
}
|
|
2376
|
+
};
|
|
2377
|
+
//#endregion
|
|
2378
|
+
//#region src/third-party/collection-group.tsx
|
|
2379
|
+
e();
|
|
2380
|
+
var Et = [
|
|
2357
2381
|
"collectionViewComponent",
|
|
2358
2382
|
"collection",
|
|
2359
2383
|
"collectionGroup",
|
|
@@ -2363,85 +2387,87 @@ var Z = (e) => {
|
|
|
2363
2387
|
"summaryProps",
|
|
2364
2388
|
"detailsProps"
|
|
2365
2389
|
], Q = (e) => {
|
|
2366
|
-
let { collectionViewComponent: t, collection: n, collectionGroup:
|
|
2367
|
-
return
|
|
2390
|
+
let { collectionViewComponent: t, collection: n, collectionGroup: i, schema: a, value: o, hidden: s, summaryProps: c, detailsProps: u } = e, d = l(e, Et);
|
|
2391
|
+
return s ? null : /* @__PURE__ */ g.createElement("details", r({
|
|
2368
2392
|
open: !0,
|
|
2369
2393
|
className: "notion-collection-group"
|
|
2370
|
-
}, u), /* @__PURE__ */
|
|
2371
|
-
schema:
|
|
2372
|
-
data: [[
|
|
2394
|
+
}, u), /* @__PURE__ */ g.createElement("summary", r({ className: "notion-collection-group-title" }, c), /* @__PURE__ */ g.createElement("div", null, /* @__PURE__ */ g.createElement(Z, {
|
|
2395
|
+
schema: a,
|
|
2396
|
+
data: [[o]],
|
|
2373
2397
|
collection: n
|
|
2374
|
-
}), /* @__PURE__ */
|
|
2398
|
+
}), /* @__PURE__ */ g.createElement("span", { className: "notion-board-th-count" }, i == null ? void 0 : i.total))), /* @__PURE__ */ g.createElement(t, r({
|
|
2375
2399
|
collection: n,
|
|
2376
|
-
collectionGroup:
|
|
2400
|
+
collectionGroup: i
|
|
2377
2401
|
}, d)));
|
|
2378
2402
|
};
|
|
2379
2403
|
//#endregion
|
|
2380
2404
|
//#region src/third-party/collection-utils.ts
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2405
|
+
e();
|
|
2406
|
+
function $(e, t, n, ...i) {
|
|
2407
|
+
var a;
|
|
2408
|
+
let o = (t == null || (a = t.format) == null ? void 0 : a.collection_groups) || [];
|
|
2409
|
+
return o == null ? void 0 : o.map(({ property: a, hidden: o, value: { value: s, type: c } }) => {
|
|
2385
2410
|
var l, u, d;
|
|
2386
|
-
let f =
|
|
2387
|
-
return c === "checkbox" &&
|
|
2411
|
+
let f = s === void 0, p = s == null ? void 0 : s.range, m = f ? "uncategorized" : p ? ((l = s.range) == null ? void 0 : l.start_date) || ((u = s.range) == null ? void 0 : u.end_date) : (s == null ? void 0 : s.value) || s, h = n[`results:${c}:${m}`], g = !f && (p || (s == null ? void 0 : s.value) || s), _ = (d = e.schema) == null ? void 0 : d[a];
|
|
2412
|
+
return c === "checkbox" && s && (g = "Yes"), p && (_ = {
|
|
2388
2413
|
type: "text",
|
|
2389
2414
|
name: "text"
|
|
2390
|
-
}, g = (0, Y.default)(new Date(m), "MMM d, YYY hh:mm aa")),
|
|
2415
|
+
}, g = (0, Y.default)(new Date(m), "MMM d, YYY hh:mm aa")), r({
|
|
2391
2416
|
collectionGroup: h,
|
|
2392
2417
|
schema: _,
|
|
2393
2418
|
value: g || "No description",
|
|
2394
|
-
hidden:
|
|
2419
|
+
hidden: o,
|
|
2395
2420
|
collection: e,
|
|
2396
2421
|
collectionView: t,
|
|
2397
2422
|
collectionData: n,
|
|
2398
2423
|
blockIds: h == null ? void 0 : h.blockIds
|
|
2399
|
-
},
|
|
2424
|
+
}, i);
|
|
2400
2425
|
});
|
|
2401
2426
|
}
|
|
2402
2427
|
//#endregion
|
|
2403
2428
|
//#region src/third-party/collection-view-board.tsx
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2429
|
+
e();
|
|
2430
|
+
var Dt = ({ collection: e, collectionView: t, collectionData: n, padding: i }) => {
|
|
2431
|
+
var a;
|
|
2432
|
+
return t != null && (a = t.format) != null && a.collection_group_by ? $(e, t, n, i).map((e, t) => /* @__PURE__ */ g.createElement(Q, r(r({ key: t }, e), {}, {
|
|
2433
|
+
summaryProps: { style: { paddingLeft: i } },
|
|
2434
|
+
collectionViewComponent: (e) => /* @__PURE__ */ g.createElement(Ot, r({ padding: i }, e))
|
|
2435
|
+
}))) : /* @__PURE__ */ g.createElement(Ot, {
|
|
2436
|
+
padding: i,
|
|
2411
2437
|
collectionView: t,
|
|
2412
2438
|
collection: e,
|
|
2413
2439
|
collectionData: n
|
|
2414
2440
|
});
|
|
2415
2441
|
};
|
|
2416
|
-
function
|
|
2442
|
+
function Ot({ collectionView: e, collectionData: t, collection: n, padding: r }) {
|
|
2417
2443
|
var i, a;
|
|
2418
|
-
let { recordMap: o } =
|
|
2419
|
-
return /* @__PURE__ */
|
|
2444
|
+
let { recordMap: o } = f(), { board_cover: s = { type: "none" }, board_cover_size: c = "medium", board_cover_aspect: l = "cover" } = (e == null ? void 0 : e.format) || {}, u = (e == null || (i = e.format) == null ? void 0 : i.board_columns) || (e == null || (a = e.format) == null ? void 0 : a.board_groups2) || [], d = g.useMemo(() => ({ paddingLeft: r }), [r]);
|
|
2445
|
+
return /* @__PURE__ */ g.createElement("div", { className: "notion-board" }, /* @__PURE__ */ g.createElement("div", {
|
|
2420
2446
|
className: `notion-board-view ${`notion-board-view-size-${c}`}`,
|
|
2421
|
-
style:
|
|
2422
|
-
}, /* @__PURE__ */
|
|
2447
|
+
style: d
|
|
2448
|
+
}, /* @__PURE__ */ g.createElement("div", { className: "notion-board-header" }, /* @__PURE__ */ g.createElement("div", { className: "notion-board-header-inner" }, u.map((e, r) => {
|
|
2423
2449
|
var i, a, o, s;
|
|
2424
2450
|
if (!((i = t.board_columns) != null && i.results)) return null;
|
|
2425
2451
|
let c = t.board_columns.results[r], l = (a = n.schema) == null ? void 0 : a[e.property];
|
|
2426
|
-
return !c || !l || e.hidden ? null : /* @__PURE__ */
|
|
2452
|
+
return !c || !l || e.hidden ? null : /* @__PURE__ */ g.createElement("div", {
|
|
2427
2453
|
className: "notion-board-th",
|
|
2428
2454
|
key: r
|
|
2429
|
-
}, /* @__PURE__ */
|
|
2455
|
+
}, /* @__PURE__ */ g.createElement("div", { className: "notion-board-th-body" }, (o = c.value) != null && o.value ? /* @__PURE__ */ g.createElement(Z, {
|
|
2430
2456
|
schema: l,
|
|
2431
2457
|
data: [[(s = c.value) == null ? void 0 : s.value]],
|
|
2432
2458
|
collection: n
|
|
2433
|
-
}) : /* @__PURE__ */
|
|
2434
|
-
}))), /* @__PURE__ */
|
|
2459
|
+
}) : /* @__PURE__ */ g.createElement("span", null, /* @__PURE__ */ g.createElement(Ct, { className: "notion-board-th-empty" }), " No Select"), /* @__PURE__ */ g.createElement("span", { className: "notion-board-th-count" }, c.total)));
|
|
2460
|
+
}))), /* @__PURE__ */ g.createElement("div", { className: "notion-board-header-placeholder" }), /* @__PURE__ */ g.createElement("div", { className: "notion-board-body" }, u.map((r, i) => {
|
|
2435
2461
|
var a, u, d, f, p, m;
|
|
2436
2462
|
if (!((a = t.board_columns) != null && a.results) || !(r != null && (u = r.value) != null && u.type)) return null;
|
|
2437
|
-
let
|
|
2438
|
-
return !_ || !
|
|
2463
|
+
let h = (d = n.schema) == null ? void 0 : d[r.property], _ = t[`results:${r == null || (f = r.value) == null ? void 0 : f.type}:${(r == null || (p = r.value) == null ? void 0 : p.value) || "uncategorized"}`];
|
|
2464
|
+
return !_ || !h || r.hidden ? null : /* @__PURE__ */ g.createElement("div", {
|
|
2439
2465
|
className: "notion-board-group",
|
|
2440
2466
|
key: i
|
|
2441
2467
|
}, (m = _.blockIds) == null ? void 0 : m.map((t) => {
|
|
2442
2468
|
var r, i;
|
|
2443
2469
|
let a = (r = o.block[t]) == null ? void 0 : r.value;
|
|
2444
|
-
return a ? /* @__PURE__ */
|
|
2470
|
+
return a ? /* @__PURE__ */ g.createElement(Tt, {
|
|
2445
2471
|
className: "notion-board-group-card",
|
|
2446
2472
|
collection: n,
|
|
2447
2473
|
block: a,
|
|
@@ -2456,22 +2482,23 @@ function Dt({ collectionView: e, collectionData: t, collection: n, padding: r })
|
|
|
2456
2482
|
}
|
|
2457
2483
|
//#endregion
|
|
2458
2484
|
//#region src/third-party/collection-view-gallery.tsx
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2485
|
+
e();
|
|
2486
|
+
var kt = [], At = ({ collection: e, collectionView: t, collectionData: n }) => {
|
|
2487
|
+
var i, a, o, s, c;
|
|
2488
|
+
if (t != null && (i = t.format) != null && i.collection_group_by) return $(e, t, n).map((e, t) => /* @__PURE__ */ g.createElement(Q, r(r({ key: t }, e), {}, { collectionViewComponent: jt })));
|
|
2489
|
+
let l = ((a = (o = (s = n.collection_group_results) == null ? void 0 : s.blockIds) == null ? (c = n["results:relation:uncategorized"]) == null ? void 0 : c.blockIds : o) == null ? n.blockIds : a) || kt;
|
|
2490
|
+
return /* @__PURE__ */ g.createElement(jt, {
|
|
2464
2491
|
collectionView: t,
|
|
2465
2492
|
collection: e,
|
|
2466
2493
|
blockIds: l
|
|
2467
2494
|
});
|
|
2468
2495
|
};
|
|
2469
|
-
function
|
|
2470
|
-
let { recordMap: r } =
|
|
2471
|
-
return /* @__PURE__ */
|
|
2496
|
+
function jt({ blockIds: e, collectionView: t, collection: n }) {
|
|
2497
|
+
let { recordMap: r } = f(), { gallery_cover: i = { type: "none" }, gallery_cover_size: a = "medium", gallery_cover_aspect: o = "cover" } = t.format || {};
|
|
2498
|
+
return /* @__PURE__ */ g.createElement("div", { className: "notion-gallery" }, /* @__PURE__ */ g.createElement("div", { className: "notion-gallery-view" }, /* @__PURE__ */ g.createElement("div", { className: `notion-gallery-grid ${`notion-gallery-grid-size-${a}`}` }, e == null ? void 0 : e.map((e) => {
|
|
2472
2499
|
var s, c;
|
|
2473
2500
|
let l = (s = r.block[e]) == null ? void 0 : s.value;
|
|
2474
|
-
return l ? /* @__PURE__ */
|
|
2501
|
+
return l ? /* @__PURE__ */ g.createElement(Tt, {
|
|
2475
2502
|
collection: n,
|
|
2476
2503
|
block: l,
|
|
2477
2504
|
cover: i,
|
|
@@ -2484,39 +2511,40 @@ function At({ blockIds: e, collectionView: t, collection: n }) {
|
|
|
2484
2511
|
}
|
|
2485
2512
|
//#endregion
|
|
2486
2513
|
//#region src/third-party/collection-view-list.tsx
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2514
|
+
e();
|
|
2515
|
+
var Mt = [], Nt = ({ collection: e, collectionView: t, collectionData: n }) => {
|
|
2516
|
+
var i, a, o;
|
|
2517
|
+
if (t != null && (i = t.format) != null && i.collection_group_by) return $(e, t, n).map((e, t) => /* @__PURE__ */ g.createElement(Q, r(r({ key: t }, e), {}, { collectionViewComponent: Pt })));
|
|
2518
|
+
let s = ((a = (o = n.collection_group_results) == null ? void 0 : o.blockIds) == null ? n.blockIds : a) || Mt;
|
|
2519
|
+
return /* @__PURE__ */ g.createElement(Pt, {
|
|
2520
|
+
blockIds: s,
|
|
2493
2521
|
collection: e,
|
|
2494
2522
|
collectionView: t
|
|
2495
2523
|
});
|
|
2496
2524
|
};
|
|
2497
|
-
function
|
|
2498
|
-
let { components: r, recordMap: i, mapPageUrl: a } =
|
|
2499
|
-
return /* @__PURE__ */
|
|
2525
|
+
function Pt({ blockIds: e, collection: t, collectionView: n }) {
|
|
2526
|
+
let { components: r, recordMap: i, mapPageUrl: a } = f();
|
|
2527
|
+
return /* @__PURE__ */ g.createElement("div", { className: "notion-list-collection" }, /* @__PURE__ */ g.createElement("div", { className: "notion-list-view" }, /* @__PURE__ */ g.createElement("div", { className: "notion-list-body" }, e == null ? void 0 : e.map((e) => {
|
|
2500
2528
|
var o, s, c, l;
|
|
2501
2529
|
let u = (o = i.block[e]) == null ? void 0 : o.value;
|
|
2502
2530
|
if (!u) return null;
|
|
2503
2531
|
let d = (s = t.schema) == null ? void 0 : s.title, f = u == null || (c = u.properties) == null ? void 0 : c.title;
|
|
2504
|
-
return /* @__PURE__ */
|
|
2532
|
+
return /* @__PURE__ */ g.createElement(r.PageLink, {
|
|
2505
2533
|
className: "notion-list-item notion-page-link",
|
|
2506
2534
|
href: a(u.id),
|
|
2507
2535
|
key: e
|
|
2508
|
-
}, /* @__PURE__ */
|
|
2536
|
+
}, /* @__PURE__ */ g.createElement("div", { className: "notion-list-item-title" }, /* @__PURE__ */ g.createElement(Z, {
|
|
2509
2537
|
schema: d,
|
|
2510
2538
|
data: f,
|
|
2511
2539
|
block: u,
|
|
2512
2540
|
collection: t
|
|
2513
|
-
})), /* @__PURE__ */
|
|
2541
|
+
})), /* @__PURE__ */ g.createElement("div", { className: "notion-list-item-body" }, (l = n.format) == null || (l = l.list_properties) == null ? void 0 : l.filter((e) => e.visible).map((e) => {
|
|
2514
2542
|
var n, r;
|
|
2515
2543
|
let i = (n = t.schema) == null ? void 0 : n[e.property], a = u && ((r = u.properties) == null ? void 0 : r[e.property]);
|
|
2516
|
-
return i ? /* @__PURE__ */
|
|
2544
|
+
return i ? /* @__PURE__ */ g.createElement("div", {
|
|
2517
2545
|
className: "notion-list-item-property",
|
|
2518
2546
|
key: e.property
|
|
2519
|
-
}, /* @__PURE__ */
|
|
2547
|
+
}, /* @__PURE__ */ g.createElement(Z, {
|
|
2520
2548
|
schema: i,
|
|
2521
2549
|
data: a,
|
|
2522
2550
|
block: u,
|
|
@@ -2527,66 +2555,67 @@ function Nt({ blockIds: e, collection: t, collectionView: n }) {
|
|
|
2527
2555
|
}
|
|
2528
2556
|
//#endregion
|
|
2529
2557
|
//#region src/third-party/collection-view-table.tsx
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2558
|
+
e();
|
|
2559
|
+
var Ft = [], It = ({ collection: e, collectionView: t, collectionData: n, padding: i, width: a }) => {
|
|
2560
|
+
var o, s, c;
|
|
2561
|
+
if (t != null && (o = t.format) != null && o.collection_group_by) return $(e, t, n, i, a).map((e, t) => /* @__PURE__ */ g.createElement(Q, r(r({ key: t }, e), {}, {
|
|
2562
|
+
collectionViewComponent: (e) => /* @__PURE__ */ g.createElement(Lt, r(r({}, e), {}, {
|
|
2563
|
+
padding: i,
|
|
2564
|
+
width: a
|
|
2536
2565
|
})),
|
|
2537
2566
|
summaryProps: { style: {
|
|
2538
|
-
paddingLeft:
|
|
2539
|
-
paddingRight:
|
|
2567
|
+
paddingLeft: i,
|
|
2568
|
+
paddingRight: i
|
|
2540
2569
|
} }
|
|
2541
2570
|
})));
|
|
2542
|
-
let l = ((
|
|
2543
|
-
return /* @__PURE__ */
|
|
2571
|
+
let l = ((s = (c = n.collection_group_results) == null ? void 0 : c.blockIds) == null ? n.blockIds : s) || Ft;
|
|
2572
|
+
return /* @__PURE__ */ g.createElement(Lt, {
|
|
2544
2573
|
blockIds: l,
|
|
2545
2574
|
collection: e,
|
|
2546
2575
|
collectionView: t,
|
|
2547
|
-
padding:
|
|
2548
|
-
width:
|
|
2576
|
+
padding: i,
|
|
2577
|
+
width: a
|
|
2549
2578
|
});
|
|
2550
2579
|
};
|
|
2551
|
-
function
|
|
2580
|
+
function Lt({ blockIds: e = [], collection: t, collectionView: n, width: r, padding: i }) {
|
|
2552
2581
|
var a;
|
|
2553
|
-
let { recordMap: o, linkTableTitleProperties: s } =
|
|
2582
|
+
let { recordMap: o, linkTableTitleProperties: s } = f(), c = g.useMemo(() => ({
|
|
2554
2583
|
width: r,
|
|
2555
2584
|
maxWidth: r
|
|
2556
|
-
}), [r]), l =
|
|
2585
|
+
}), [r]), l = g.useMemo(() => ({
|
|
2557
2586
|
paddingLeft: i,
|
|
2558
2587
|
paddingRight: i
|
|
2559
2588
|
}), [i]), u = [];
|
|
2560
2589
|
return u = (a = n.format) != null && a.table_properties ? n.format.table_properties.filter((e) => {
|
|
2561
2590
|
var n;
|
|
2562
2591
|
return e.visible && ((n = t.schema) == null ? void 0 : n[e.property]);
|
|
2563
|
-
}) : [{ property: "title" }].concat(Object.keys(t.schema || {}).filter((e) => e !== "title").map((e) => ({ property: e }))), /* @__PURE__ */
|
|
2592
|
+
}) : [{ property: "title" }].concat(Object.keys(t.schema || {}).filter((e) => e !== "title").map((e) => ({ property: e }))), /* @__PURE__ */ g.createElement("div", {
|
|
2564
2593
|
className: "notion-table",
|
|
2565
2594
|
style: c
|
|
2566
|
-
}, /* @__PURE__ */
|
|
2595
|
+
}, /* @__PURE__ */ g.createElement("div", {
|
|
2567
2596
|
className: "notion-table-view",
|
|
2568
2597
|
style: l
|
|
2569
|
-
}, !!u.length && /* @__PURE__ */
|
|
2598
|
+
}, !!u.length && /* @__PURE__ */ g.createElement(g.Fragment, null, /* @__PURE__ */ g.createElement("div", { className: "notion-table-header" }, /* @__PURE__ */ g.createElement("div", { className: "notion-table-header-inner" }, u.map((e) => {
|
|
2570
2599
|
var n;
|
|
2571
2600
|
let r = (n = t.schema) == null ? void 0 : n[e.property], i = e.property === "title", a = {};
|
|
2572
|
-
return a.width = e.width ? e.width : i ? 280 : 200, /* @__PURE__ */
|
|
2601
|
+
return a.width = e.width ? e.width : i ? 280 : 200, /* @__PURE__ */ g.createElement("div", {
|
|
2573
2602
|
className: "notion-table-th",
|
|
2574
2603
|
key: e.property
|
|
2575
|
-
}, /* @__PURE__ */
|
|
2604
|
+
}, /* @__PURE__ */ g.createElement("div", {
|
|
2576
2605
|
className: "notion-table-view-header-cell",
|
|
2577
2606
|
style: a
|
|
2578
|
-
}, /* @__PURE__ */
|
|
2579
|
-
}))), /* @__PURE__ */
|
|
2607
|
+
}, /* @__PURE__ */ g.createElement("div", { className: "notion-table-view-header-cell-inner" }, /* @__PURE__ */ g.createElement(h, { schema: r }))));
|
|
2608
|
+
}))), /* @__PURE__ */ g.createElement("div", { className: "notion-table-header-placeholder" }), /* @__PURE__ */ g.createElement("div", { className: "notion-table-body" }, e == null ? void 0 : e.map((e) => /* @__PURE__ */ g.createElement("div", {
|
|
2580
2609
|
className: "notion-table-row",
|
|
2581
2610
|
key: e
|
|
2582
2611
|
}, u.map((n) => {
|
|
2583
2612
|
var r, i, a;
|
|
2584
2613
|
let c = (r = t.schema) == null ? void 0 : r[n.property], l = (i = o.block[e]) == null ? void 0 : i.value, u = l == null || (a = l.properties) == null ? void 0 : a[n.property], d = n.property === "title", f = {};
|
|
2585
|
-
return f.width = n.width ? n.width : d ? 280 : 200, /* @__PURE__ */
|
|
2614
|
+
return f.width = n.width ? n.width : d ? 280 : 200, /* @__PURE__ */ g.createElement("div", {
|
|
2586
2615
|
key: n.property,
|
|
2587
2616
|
className: `notion-table-cell ${`notion-table-cell-${c.type}`}`,
|
|
2588
2617
|
style: f
|
|
2589
|
-
}, /* @__PURE__ */
|
|
2618
|
+
}, /* @__PURE__ */ g.createElement(Z, {
|
|
2590
2619
|
schema: c,
|
|
2591
2620
|
data: u,
|
|
2592
2621
|
block: l,
|
|
@@ -2595,40 +2624,44 @@ function It({ blockIds: e = [], collection: t, collectionView: n, width: r, padd
|
|
|
2595
2624
|
}));
|
|
2596
2625
|
})))))));
|
|
2597
2626
|
}
|
|
2598
|
-
var
|
|
2627
|
+
var Rt = g.memo((e) => {
|
|
2599
2628
|
let { collectionView: t } = e;
|
|
2600
2629
|
switch (t.type) {
|
|
2601
|
-
case "table": return /* @__PURE__ */
|
|
2602
|
-
case "gallery": return /* @__PURE__ */
|
|
2603
|
-
case "list": return /* @__PURE__ */
|
|
2604
|
-
case "board": return /* @__PURE__ */
|
|
2630
|
+
case "table": return /* @__PURE__ */ g.createElement(It, e);
|
|
2631
|
+
case "gallery": return /* @__PURE__ */ g.createElement(At, e);
|
|
2632
|
+
case "list": return /* @__PURE__ */ g.createElement(Nt, e);
|
|
2633
|
+
case "board": return /* @__PURE__ */ g.createElement(Dt, e);
|
|
2605
2634
|
default: return console.warn("unsupported collection view", t), null;
|
|
2606
2635
|
}
|
|
2607
|
-
})
|
|
2636
|
+
});
|
|
2637
|
+
//#endregion
|
|
2638
|
+
//#region src/third-party/collection.tsx
|
|
2639
|
+
e();
|
|
2640
|
+
var zt = [
|
|
2608
2641
|
"collectionView",
|
|
2609
2642
|
"className",
|
|
2610
2643
|
"children"
|
|
2611
|
-
],
|
|
2612
|
-
let
|
|
2613
|
-
return e.type === "page" ? e.parent_table === "collection" ? /* @__PURE__ */
|
|
2644
|
+
], Bt = typeof window > "u", Vt = ({ block: e, className: t, ctx: n }) => {
|
|
2645
|
+
let i = g.useMemo(() => r({}, n), [n]);
|
|
2646
|
+
return e.type === "page" ? e.parent_table === "collection" ? /* @__PURE__ */ g.createElement(s, i, /* @__PURE__ */ g.createElement("div", { className: "notion-collection-page-properties" }, /* @__PURE__ */ g.createElement(xt, {
|
|
2614
2647
|
block: e,
|
|
2615
2648
|
pageHeader: !0,
|
|
2616
2649
|
className: t
|
|
2617
|
-
}))) : null : /* @__PURE__ */
|
|
2650
|
+
}))) : null : /* @__PURE__ */ g.createElement(s, i, /* @__PURE__ */ g.createElement(Ht, {
|
|
2618
2651
|
block: e,
|
|
2619
2652
|
className: t
|
|
2620
2653
|
}));
|
|
2621
|
-
},
|
|
2622
|
-
var n,
|
|
2623
|
-
let { recordMap:
|
|
2624
|
-
|
|
2625
|
-
|
|
2654
|
+
}, Ht = ({ block: e, className: t }) => {
|
|
2655
|
+
var n, i, a, o;
|
|
2656
|
+
let { recordMap: s, showCollectionViewDropdown: c } = f(), { view_ids: l } = e, u = S(e, s), [d, p] = g.useState(!1);
|
|
2657
|
+
g.useEffect(() => {
|
|
2658
|
+
p(!0);
|
|
2626
2659
|
}, []);
|
|
2627
|
-
let
|
|
2628
|
-
console.debug("change collection view", e), v(
|
|
2629
|
-
}, [_, v]), { width:
|
|
2630
|
-
|
|
2631
|
-
let
|
|
2660
|
+
let h = l[0], [_, v] = j(e.id, { collectionViewId: h }), y = d && l.find((e) => e === _.collectionViewId) || h, b = g.useCallback((e) => {
|
|
2661
|
+
console.debug("change collection view", e), v(r(r({}, _), {}, { collectionViewId: e }));
|
|
2662
|
+
}, [_, v]), { width: x } = P();
|
|
2663
|
+
Bt && (x = 1024);
|
|
2664
|
+
let w = (n = s.collection[u]) == null ? void 0 : n.value, E = (i = s.collection_view[y]) == null ? void 0 : i.value, D = (a = s.collection_query[u]) == null ? void 0 : a[y], O = C(e, s), { width: k, padding: A } = g.useMemo(() => {
|
|
2632
2665
|
var e;
|
|
2633
2666
|
let t = {};
|
|
2634
2667
|
if ((E == null ? void 0 : E.type) !== "table" && (E == null ? void 0 : E.type) !== "board") return {
|
|
@@ -2636,62 +2669,62 @@ var Lt = h.memo((e) => {
|
|
|
2636
2669
|
width: 0,
|
|
2637
2670
|
padding: 0
|
|
2638
2671
|
};
|
|
2639
|
-
let n =
|
|
2672
|
+
let n = x, r = 708;
|
|
2640
2673
|
r = O != null && (e = O.format) != null && e.page_full_width ? n - 2 * Math.min(96, n * .08) | 0 : n < 708 ? n - n * .02 | 0 : 708;
|
|
2641
|
-
let i =
|
|
2674
|
+
let i = Bt && !d ? 96 : (n - r) / 2 | 0;
|
|
2642
2675
|
return t.paddingLeft = i, t.paddingRight = i, {
|
|
2643
2676
|
style: t,
|
|
2644
2677
|
width: n,
|
|
2645
2678
|
padding: i
|
|
2646
2679
|
};
|
|
2647
2680
|
}, [
|
|
2648
|
-
|
|
2681
|
+
x,
|
|
2649
2682
|
O,
|
|
2650
2683
|
E == null ? void 0 : E.type,
|
|
2651
|
-
|
|
2684
|
+
d
|
|
2652
2685
|
]);
|
|
2653
|
-
if (!(
|
|
2686
|
+
if (!(w && E && D)) return console.warn("skipping missing collection view for block", e.id, {
|
|
2654
2687
|
collectionId: u,
|
|
2655
2688
|
collectionViewId: y,
|
|
2656
2689
|
collectionView: E,
|
|
2657
2690
|
collectionData: D,
|
|
2658
|
-
recordMap:
|
|
2691
|
+
recordMap: s
|
|
2659
2692
|
}), null;
|
|
2660
|
-
let M = w
|
|
2661
|
-
return
|
|
2693
|
+
let M = T(w.name).trim(), N = ((o = E.format) == null ? void 0 : o.hide_linked_collection_name) !== !0 && M;
|
|
2694
|
+
return w.icon && (e.format = r(r({}, e.format), {}, { page_icon: w.icon })), /* @__PURE__ */ g.createElement(g.Fragment, null, /* @__PURE__ */ g.createElement("div", null, /* @__PURE__ */ g.createElement("div", null, l.length > 1 && c && /* @__PURE__ */ g.createElement(Ut, {
|
|
2662
2695
|
collectionViewId: y,
|
|
2663
2696
|
viewIds: l,
|
|
2664
2697
|
onChangeView: b
|
|
2665
|
-
})),
|
|
2698
|
+
})), N && /* @__PURE__ */ g.createElement("div", { className: "notion-collection-header" }, /* @__PURE__ */ g.createElement("div", { className: "notion-collection-header-title" }, /* @__PURE__ */ g.createElement(m, {
|
|
2666
2699
|
block: e,
|
|
2667
2700
|
className: "notion-page-title-icon",
|
|
2668
2701
|
hideDefaultIcon: !0
|
|
2669
|
-
}), M))), /* @__PURE__ */
|
|
2670
|
-
collection:
|
|
2702
|
+
}), M))), /* @__PURE__ */ g.createElement("div", { className: `notion-collection ${t || ""}` }, /* @__PURE__ */ g.createElement(Rt, {
|
|
2703
|
+
collection: w,
|
|
2671
2704
|
collectionView: E,
|
|
2672
2705
|
collectionData: D,
|
|
2673
|
-
padding:
|
|
2706
|
+
padding: A,
|
|
2674
2707
|
width: k
|
|
2675
2708
|
})));
|
|
2676
|
-
},
|
|
2677
|
-
let { recordMap: r } =
|
|
2678
|
-
return /* @__PURE__ */
|
|
2709
|
+
}, Ut = ({ collectionViewId: e, viewIds: t, onChangeView: n }) => {
|
|
2710
|
+
let { recordMap: r } = f();
|
|
2711
|
+
return /* @__PURE__ */ g.createElement("div", { className: "notion-collection-view-tabs-row" }, t.map((t) => {
|
|
2679
2712
|
var i;
|
|
2680
|
-
return /* @__PURE__ */
|
|
2713
|
+
return /* @__PURE__ */ g.createElement("button", {
|
|
2681
2714
|
onClick: () => n(t),
|
|
2682
2715
|
key: t,
|
|
2683
2716
|
className: `notion-collection-view-tabs-content-item
|
|
2684
2717
|
${e === t && "notion-collection-view-tabs-content-item-active"}`
|
|
2685
|
-
}, /* @__PURE__ */
|
|
2718
|
+
}, /* @__PURE__ */ g.createElement(Wt, { collectionView: (i = r.collection_view[t]) == null ? void 0 : i.value }));
|
|
2686
2719
|
}));
|
|
2687
|
-
},
|
|
2688
|
-
let { collectionView: t, className: n, children:
|
|
2689
|
-
return /* @__PURE__ */
|
|
2720
|
+
}, Wt = (e) => {
|
|
2721
|
+
let { collectionView: t, className: n, children: i } = e, a = l(e, zt), { type: o } = t, s = t.name || `${o[0].toUpperCase()}${o.slice(1)} view`;
|
|
2722
|
+
return /* @__PURE__ */ g.createElement("div", r({ className: `notion-collection-view-type ${n || ""}` }, a), /* @__PURE__ */ g.createElement(ee, {
|
|
2690
2723
|
className: "notion-collection-view-type-icon",
|
|
2691
|
-
type:
|
|
2692
|
-
}), /* @__PURE__ */
|
|
2724
|
+
type: o
|
|
2725
|
+
}), /* @__PURE__ */ g.createElement("span", { className: "notion-collection-view-type-title" }, s), i);
|
|
2693
2726
|
};
|
|
2694
2727
|
//#endregion
|
|
2695
|
-
export {
|
|
2728
|
+
export { Vt as Collection, bt as Property };
|
|
2696
2729
|
|
|
2697
2730
|
//# sourceMappingURL=collection.js.map
|