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