@blogmcp/sdk 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/community/index.d.ts +2 -2
- package/dist/community/index.js +56 -55
- package/dist/community/links.d.ts +9 -1
- package/dist/community/links.js +10 -6
- package/dist/community/shapes.d.ts +16 -1
- package/dist/community/shapes.js +38 -26
- package/dist/packages/tripmap-core/dist/generated/maplibre-worker.bundle.js +1 -1
- package/package.json +3 -3
- package/src/community/index.ts +2 -0
- package/src/community/links.ts +9 -1
- package/src/community/shapes.ts +29 -1
|
@@ -22,8 +22,8 @@ export { COMMUNITY_UI_CODES, COMMUNITY_API_CODES, COMMUNITY_OUTCOME_OF_KB, COMMU
|
|
|
22
22
|
export type { CommunityUiCode, CommunityApiCode, CommunityHostCode, CommunityOutcome, CommunityFailure, CommunityLogger, } from './outcome.js';
|
|
23
23
|
export { fetchTransport, isRelativeCommunityBase, assertCommunityBase, communityOpUrl } from './transport.js';
|
|
24
24
|
export type { CommunityTransport, CommunityTransportAnswer, FetchTransportOptions } from './transport.js';
|
|
25
|
-
export { MESSAGE_STATES, AUTHOR_KINDS, NEEDS, RESTRICTION_KINDS, NOTIFICATION_CODES, CASE_CATEGORIES, CATEGORY_WITHOUT_NOTIFIER, AGE_BANDS, LEGAL_TEXT_KINDS, isKnownState, isKnownAuthorKind, isKnownAuthor, isKnownNeed, isKnownRestrictionKind, isKnownNotificationCode, isCaseCategory, communityRulesOf, } from './shapes.js';
|
|
26
|
-
export type { KnownMessageState, MessageState, KnownAuthorKind, AuthorKind, KnownNeed, Need, KnownRestrictionKind, RestrictionKind, KnownNotificationCode, NotificationCode, CaseCategory, AgeBand, LegalTextKind, AcceptanceState, MemberAuthor, DeletedMemberAuthor, StaffAuthor, SystemAuthor, KnownAuthor, UnknownAuthor, Author, ReactionSummary, PublicMessage, RestrictionInEffect, DiscussionViewerState, Discussion, DiscussionHead, WriteAnswer, ReactionTarget, BlockEntry, PublicProfile, OwnProfile, MyState, NotificationItem, CommunityPage, DecisionSummary, StatementSubject, Statement, AppealItem, ReportItem, CurrentLegalText, CommunityRule, MemberExport, NoticeTarget, NoticeReceipt, NoticeStatus, DiscussionListInput, MessagePostInput, MessageEditInput, MessageReportInput, OnboardInput, ProfileUpdateInput, NoticeSubmitInput, } from './shapes.js';
|
|
25
|
+
export { MESSAGE_STATES, AUTHOR_KINDS, NEEDS, RESTRICTION_KINDS, NOTIFICATION_CODES, CASE_CATEGORIES, CATEGORY_WITHOUT_NOTIFIER, AGE_BANDS, LEGAL_TEXT_KINDS, isKnownState, isKnownAuthorKind, isKnownAuthor, isKnownNeed, isKnownRestrictionKind, isKnownNotificationCode, isCaseCategory, communityRulesOf, communityLegalSectionsOf, } from './shapes.js';
|
|
26
|
+
export type { KnownMessageState, MessageState, KnownAuthorKind, AuthorKind, KnownNeed, Need, KnownRestrictionKind, RestrictionKind, KnownNotificationCode, NotificationCode, CaseCategory, AgeBand, LegalTextKind, AcceptanceState, MemberAuthor, DeletedMemberAuthor, StaffAuthor, SystemAuthor, KnownAuthor, UnknownAuthor, Author, ReactionSummary, PublicMessage, RestrictionInEffect, DiscussionViewerState, Discussion, DiscussionHead, WriteAnswer, ReactionTarget, BlockEntry, PublicProfile, OwnProfile, MyState, NotificationItem, CommunityPage, DecisionSummary, StatementSubject, Statement, AppealItem, ReportItem, CurrentLegalText, CommunityRule, CommunityLegalSection, MemberExport, NoticeTarget, NoticeReceipt, NoticeStatus, DiscussionListInput, MessagePostInput, MessageEditInput, MessageReportInput, OnboardInput, ProfileUpdateInput, NoticeSubmitInput, } from './shapes.js';
|
|
27
27
|
export { createDiscussionStore, refreshDiscussion, loadMoreDiscussion, viewerNeeds, findMessage, isOwnMessage, reactionsFor, reactionAfter, } from './store.js';
|
|
28
28
|
export type { DiscussionStore, DiscussionState, DiscussionMessage, DiscussionViewer, DiscussionRestriction, MessageChange, ViewerNeeds, } from './store.js';
|
|
29
29
|
export { pollDiscussionHead, POLL_INTERVAL_MS, POLL_MAX_BACKOFF_MS } from './poll.js';
|
package/dist/community/index.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { createCommunityClient as
|
|
2
|
-
import { COMMUNITY_APPEAL_MAX as O, COMMUNITY_BIO_MAX as
|
|
3
|
-
import { COMMUNITY_API_CODES as
|
|
4
|
-
import { assertCommunityBase as h, communityOpUrl as
|
|
5
|
-
import { AGE_BANDS as k, AUTHOR_KINDS as v, CASE_CATEGORIES as V, CATEGORY_WITHOUT_NOTIFIER as W, LEGAL_TEXT_KINDS as Z, MESSAGE_STATES as b, NEEDS as j, NOTIFICATION_CODES as q, RESTRICTION_KINDS as z,
|
|
6
|
-
import { createDiscussionStore as
|
|
7
|
-
import { POLL_INTERVAL_MS as
|
|
8
|
-
import { COMMUNITY_CHANNELS as
|
|
9
|
-
import { COMMUNITY_RECEIPT_RE as
|
|
10
|
-
import { COMMUNITY_MESSAGES as
|
|
1
|
+
import { createCommunityClient as _ } from "./client.js";
|
|
2
|
+
import { COMMUNITY_APPEAL_MAX as O, COMMUNITY_BIO_MAX as t, COMMUNITY_CLIENT_MSG_ID_RE as I, COMMUNITY_DISPLAY_NAME_MAX as C, COMMUNITY_DISPLAY_NAME_MIN as T, COMMUNITY_GOOD_FAITH as i, COMMUNITY_HANDLE_CHANGE_DAYS as s, COMMUNITY_HANDLE_RE as n, COMMUNITY_HEAD_ARTICLES_MAX as N, COMMUNITY_MESSAGE_LINKS_MAX as E, COMMUNITY_MESSAGE_MAX as r, COMMUNITY_NOTICE_DESCRIPTION_MAX as m, COMMUNITY_NOTICE_TURNSTILE_ACTION as A, COMMUNITY_NOTIFIER_NAME_MAX as S, COMMUNITY_OPS as a, COMMUNITY_PAGE_SIZE as U, COMMUNITY_REPLIES_MAX as Y, COMMUNITY_REPORT_NOTE_MAX as u, communityOpPath as c, newClientMsgId as L } from "./routes.js";
|
|
3
|
+
import { COMMUNITY_API_CODES as y, COMMUNITY_HOST_CODES as D, COMMUNITY_OUTCOME_OF_HOST as f, COMMUNITY_OUTCOME_OF_KB as p, COMMUNITY_UI_CODES as g, CommunityTransportError as K, communityFailureOf as P, communityOutcomeOf as H, isCommunityTransportError as d, isCommunityUiCode as F, isLoggedCommunityOutcome as G } from "./outcome.js";
|
|
4
|
+
import { assertCommunityBase as h, communityOpUrl as l, fetchTransport as w, isRelativeCommunityBase as x } from "./transport.js";
|
|
5
|
+
import { AGE_BANDS as k, AUTHOR_KINDS as v, CASE_CATEGORIES as V, CATEGORY_WITHOUT_NOTIFIER as W, LEGAL_TEXT_KINDS as Z, MESSAGE_STATES as b, NEEDS as j, NOTIFICATION_CODES as q, RESTRICTION_KINDS as z, communityLegalSectionsOf as J, communityRulesOf as Q, isCaseCategory as $, isKnownAuthor as MM, isKnownAuthorKind as eM, isKnownNeed as _M, isKnownNotificationCode as oM, isKnownRestrictionKind as OM, isKnownState as tM } from "./shapes.js";
|
|
6
|
+
import { createDiscussionStore as CM, findMessage as TM, isOwnMessage as iM, loadMoreDiscussion as sM, reactionAfter as nM, reactionsFor as NM, refreshDiscussion as EM, viewerNeeds as rM } from "./store.js";
|
|
7
|
+
import { POLL_INTERVAL_MS as AM, POLL_MAX_BACKOFF_MS as SM, pollDiscussionHead as aM } from "./poll.js";
|
|
8
|
+
import { COMMUNITY_CHANNELS as YM } from "./channels.js";
|
|
9
|
+
import { COMMUNITY_RECEIPT_RE as cM, COMMUNITY_ROUTES as LM, myCommunityPath as RM, noticeStatusLink as yM, readReceiptFromHash as DM, receiptFromHash as fM, signInLink as pM, statementPath as gM } from "./links.js";
|
|
10
|
+
import { COMMUNITY_MESSAGES as PM, communityMessage as HM, communityMessageLanguage as dM, confirmMessageKey as FM, hasCommunityMessage as GM, noteMessageKey as XM, warningMessageKey as hM } from "./messages.js";
|
|
11
11
|
export {
|
|
12
12
|
k as AGE_BANDS,
|
|
13
13
|
v as AUTHOR_KINDS,
|
|
14
14
|
V as CASE_CATEGORIES,
|
|
15
15
|
W as CATEGORY_WITHOUT_NOTIFIER,
|
|
16
|
-
|
|
16
|
+
y as COMMUNITY_API_CODES,
|
|
17
17
|
O as COMMUNITY_APPEAL_MAX,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
t as COMMUNITY_BIO_MAX,
|
|
19
|
+
YM as COMMUNITY_CHANNELS,
|
|
20
|
+
I as COMMUNITY_CLIENT_MSG_ID_RE,
|
|
21
21
|
C as COMMUNITY_DISPLAY_NAME_MAX,
|
|
22
22
|
T as COMMUNITY_DISPLAY_NAME_MIN,
|
|
23
23
|
i as COMMUNITY_GOOD_FAITH,
|
|
24
24
|
s as COMMUNITY_HANDLE_CHANGE_DAYS,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
n as COMMUNITY_HANDLE_RE,
|
|
26
|
+
N as COMMUNITY_HEAD_ARTICLES_MAX,
|
|
27
|
+
D as COMMUNITY_HOST_CODES,
|
|
28
|
+
PM as COMMUNITY_MESSAGES,
|
|
29
29
|
E as COMMUNITY_MESSAGE_LINKS_MAX,
|
|
30
30
|
r as COMMUNITY_MESSAGE_MAX,
|
|
31
31
|
m as COMMUNITY_NOTICE_DESCRIPTION_MAX,
|
|
@@ -35,58 +35,59 @@ export {
|
|
|
35
35
|
f as COMMUNITY_OUTCOME_OF_HOST,
|
|
36
36
|
p as COMMUNITY_OUTCOME_OF_KB,
|
|
37
37
|
U as COMMUNITY_PAGE_SIZE,
|
|
38
|
-
|
|
38
|
+
cM as COMMUNITY_RECEIPT_RE,
|
|
39
39
|
Y as COMMUNITY_REPLIES_MAX,
|
|
40
40
|
u as COMMUNITY_REPORT_NOTE_MAX,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
LM as COMMUNITY_ROUTES,
|
|
42
|
+
g as COMMUNITY_UI_CODES,
|
|
43
|
+
K as CommunityTransportError,
|
|
44
44
|
Z as LEGAL_TEXT_KINDS,
|
|
45
45
|
b as MESSAGE_STATES,
|
|
46
46
|
j as NEEDS,
|
|
47
47
|
q as NOTIFICATION_CODES,
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
AM as POLL_INTERVAL_MS,
|
|
49
|
+
SM as POLL_MAX_BACKOFF_MS,
|
|
50
50
|
z as RESTRICTION_KINDS,
|
|
51
51
|
h as assertCommunityBase,
|
|
52
52
|
P as communityFailureOf,
|
|
53
|
-
|
|
54
|
-
HM as
|
|
53
|
+
J as communityLegalSectionsOf,
|
|
54
|
+
HM as communityMessage,
|
|
55
|
+
dM as communityMessageLanguage,
|
|
55
56
|
c as communityOpPath,
|
|
56
|
-
|
|
57
|
+
l as communityOpUrl,
|
|
57
58
|
H as communityOutcomeOf,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
Q as communityRulesOf,
|
|
60
|
+
FM as confirmMessageKey,
|
|
61
|
+
_ as createCommunityClient,
|
|
62
|
+
CM as createDiscussionStore,
|
|
63
|
+
w as fetchTransport,
|
|
64
|
+
TM as findMessage,
|
|
65
|
+
GM as hasCommunityMessage,
|
|
66
|
+
$ as isCaseCategory,
|
|
66
67
|
d as isCommunityTransportError,
|
|
67
68
|
F as isCommunityUiCode,
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
MM as isKnownAuthor,
|
|
70
|
+
eM as isKnownAuthorKind,
|
|
70
71
|
_M as isKnownNeed,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
oM as isKnownNotificationCode,
|
|
73
|
+
OM as isKnownRestrictionKind,
|
|
74
|
+
tM as isKnownState,
|
|
74
75
|
G as isLoggedCommunityOutcome,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
iM as isOwnMessage,
|
|
77
|
+
x as isRelativeCommunityBase,
|
|
78
|
+
sM as loadMoreDiscussion,
|
|
78
79
|
RM as myCommunityPath,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
L as newClientMsgId,
|
|
81
|
+
XM as noteMessageKey,
|
|
82
|
+
yM as noticeStatusLink,
|
|
83
|
+
aM as pollDiscussionHead,
|
|
84
|
+
nM as reactionAfter,
|
|
84
85
|
NM as reactionsFor,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
86
|
+
DM as readReceiptFromHash,
|
|
87
|
+
fM as receiptFromHash,
|
|
88
|
+
EM as refreshDiscussion,
|
|
89
|
+
pM as signInLink,
|
|
90
|
+
gM as statementPath,
|
|
91
|
+
rM as viewerNeeds,
|
|
92
|
+
hM as warningMessageKey
|
|
92
93
|
};
|
|
@@ -11,7 +11,11 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Browser-safe; readReceiptFromHash is the one function that touches `window` (on call, never on import).
|
|
13
13
|
*/
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* The managed blog's community pages (router-relative; the blog prepends its own base). The three legal pages —
|
|
16
|
+
* `rules`, `terms`, `privacy` — are each the tenant's current `legal/current` text of that kind, rendered by the blog's
|
|
17
|
+
* server without JavaScript, with `/community/<kind>.json` as the machine-readable alternate (DSA art. 14(1)).
|
|
18
|
+
*/
|
|
15
19
|
export declare const COMMUNITY_ROUTES: Readonly<{
|
|
16
20
|
/** The „Moje komunita" panel. */
|
|
17
21
|
readonly myCommunity: "/community";
|
|
@@ -23,6 +27,10 @@ export declare const COMMUNITY_ROUTES: Readonly<{
|
|
|
23
27
|
readonly notices: "/community/notices";
|
|
24
28
|
/** The rules, rendered on the server without JavaScript. */
|
|
25
29
|
readonly rules: "/community/rules";
|
|
30
|
+
/** The discussion terms (DSA art. 14), rendered on the server without JavaScript, as the rules. */
|
|
31
|
+
readonly terms: "/community/terms";
|
|
32
|
+
/** The discussion privacy notice, rendered the same way. */
|
|
33
|
+
readonly privacy: "/community/privacy";
|
|
26
34
|
}>;
|
|
27
35
|
/** A notifier's receipt: kb-api's `kbnt_` capability token (≤ 512 characters, base64url). */
|
|
28
36
|
export declare const COMMUNITY_RECEIPT_RE: RegExp;
|
package/dist/community/links.js
CHANGED
|
@@ -8,14 +8,18 @@ const f = Object.freeze({
|
|
|
8
8
|
/** A notifier's status page; the receipt goes in its fragment (noticeStatusLink). */
|
|
9
9
|
notices: "/community/notices",
|
|
10
10
|
/** The rules, rendered on the server without JavaScript. */
|
|
11
|
-
rules: "/community/rules"
|
|
12
|
-
|
|
11
|
+
rules: "/community/rules",
|
|
12
|
+
/** The discussion terms (DSA art. 14), rendered on the server without JavaScript, as the rules. */
|
|
13
|
+
terms: "/community/terms",
|
|
14
|
+
/** The discussion privacy notice, rendered the same way. */
|
|
15
|
+
privacy: "/community/privacy"
|
|
16
|
+
}), y = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, a = /^kbnt_[A-Za-z0-9_-]{1,507}$/, m = "t";
|
|
13
17
|
function c(t) {
|
|
14
18
|
return typeof t == "string" && /^\/(?![/\\])/.test(t) && !/[\s\\\u0000-\u001f\u007f]/.test(t);
|
|
15
19
|
}
|
|
16
20
|
function g(t, n) {
|
|
17
21
|
const e = t == null || t === "" ? f.statement : t;
|
|
18
|
-
return !c(e) || !e.includes("{id}") || /[{}]/.test(e.split("{id}").join("")) || typeof n != "string" || !
|
|
22
|
+
return !c(e) || !e.includes("{id}") || /[{}]/.test(e.split("{id}").join("")) || typeof n != "string" || !y.test(n) ? null : e.split("{id}").join(n.toLowerCase());
|
|
19
23
|
}
|
|
20
24
|
function E(t) {
|
|
21
25
|
return c(t) ? t : f.myCommunity;
|
|
@@ -27,7 +31,7 @@ function C(t, n) {
|
|
|
27
31
|
function R(t, n) {
|
|
28
32
|
return c(t) ? t.includes("#") || !c(n) || n.includes("#") ? t : `${t}#${n}` : null;
|
|
29
33
|
}
|
|
30
|
-
function
|
|
34
|
+
function d(t) {
|
|
31
35
|
const e = /^#t=([^&]*)/.exec(typeof t == "string" ? t : "")?.[1] ?? "";
|
|
32
36
|
return a.test(e) ? e : null;
|
|
33
37
|
}
|
|
@@ -66,7 +70,7 @@ function O(t, n, e) {
|
|
|
66
70
|
return o ? i : t;
|
|
67
71
|
}
|
|
68
72
|
function $(t = h()) {
|
|
69
|
-
const n = t.location.hash, e =
|
|
73
|
+
const n = t.location.hash, e = d(n), o = !u.has(t);
|
|
70
74
|
return n.startsWith(`#${m}=`) && t.history.replaceState(O(t.history.state, n, e), "", t.location.pathname + t.location.search), (o || e !== null) && u.set(t, e), u.get(t) ?? null;
|
|
71
75
|
}
|
|
72
76
|
export {
|
|
@@ -75,7 +79,7 @@ export {
|
|
|
75
79
|
E as myCommunityPath,
|
|
76
80
|
C as noticeStatusLink,
|
|
77
81
|
$ as readReceiptFromHash,
|
|
78
|
-
|
|
82
|
+
d as receiptFromHash,
|
|
79
83
|
R as signInLink,
|
|
80
84
|
g as statementPath
|
|
81
85
|
};
|
|
@@ -326,7 +326,10 @@ export interface CurrentLegalText {
|
|
|
326
326
|
* An element renders text only: it shows `communityRulesOf(bodyJson)` and links to that page.
|
|
327
327
|
*/
|
|
328
328
|
readonly body: string;
|
|
329
|
-
/**
|
|
329
|
+
/**
|
|
330
|
+
* The machine-readable form (DSA art. 14(1)); for `rules` `{ version, rules: [{ id, title, summary?, anchor }] }`
|
|
331
|
+
* (communityRulesOf), for `terms` and `privacy` `{ sections: [{ id, title, anchor }] }` (communityLegalSectionsOf).
|
|
332
|
+
*/
|
|
330
333
|
readonly bodyJson: Readonly<Record<string, unknown>> | null;
|
|
331
334
|
readonly reconsentRequired: boolean;
|
|
332
335
|
readonly publishedAt: string | null;
|
|
@@ -341,6 +344,18 @@ export interface CommunityRule {
|
|
|
341
344
|
}
|
|
342
345
|
/** The rules of a `rules` text's `bodyJson`, in order; an entry without a string id, title and anchor is skipped. */
|
|
343
346
|
export declare function communityRulesOf(bodyJson: unknown): CommunityRule[];
|
|
347
|
+
/** One section of a `terms` or `privacy` text: what the page's contents list and link. */
|
|
348
|
+
export interface CommunityLegalSection {
|
|
349
|
+
readonly id: string;
|
|
350
|
+
readonly title: string;
|
|
351
|
+
/** The section's anchor on the page (`#<anchor>`). */
|
|
352
|
+
readonly anchor: string;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* The sections of a `terms` or `privacy` text's `bodyJson` (`{ sections: [{ id, title, anchor }] }`), in order; an
|
|
356
|
+
* entry without a string id, title and anchor is skipped. A `rules` text has none (its rules are communityRulesOf).
|
|
357
|
+
*/
|
|
358
|
+
export declare function communityLegalSectionsOf(bodyJson: unknown): CommunityLegalSection[];
|
|
344
359
|
/** `me/export`: every section, `providerEntity` on every row; offer it as a JSON download. */
|
|
345
360
|
export interface MemberExport {
|
|
346
361
|
readonly generatedAt: string;
|
package/dist/community/shapes.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const s = (e, t) => typeof t == "string" && e.includes(t), u = Object.freeze(["visible", "held", "removed", "deleted"]), O = (e) => s(u, e), a = Object.freeze(["member", "staff", "system"]), l = (e) => s(a, e), _ = Object.freeze(["sign_in", "onboarding", "reconsent_rules", "art9_consent"]), h = (e) => s(_, e), p = Object.freeze(["restriction", "suspension", "ban"]), m = (e) => s(p, e), d = Object.freeze(["decision", "appeal_resolved", "erasure_scheduled", "inactivity_warning"]), g = (e) => s(d, e), y = Object.freeze([
|
|
2
2
|
"fraud_spam",
|
|
3
3
|
"harassment",
|
|
4
4
|
"hate",
|
|
@@ -15,37 +15,49 @@ const t = (e, n) => typeof n == "string" && e.includes(n), _ = Object.freeze(["v
|
|
|
15
15
|
"adverse_event",
|
|
16
16
|
"third_party_health_data",
|
|
17
17
|
"suspected_minor"
|
|
18
|
-
]),
|
|
19
|
-
function
|
|
18
|
+
]), A = (e) => s(y, e), b = "child_at_risk", j = Object.freeze(["16_17", "18_plus"]), E = Object.freeze(["rules", "terms", "privacy", "art9_consent"]);
|
|
19
|
+
function S(e) {
|
|
20
20
|
return typeof e == "object" && e !== null && l(e.kind);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
const
|
|
24
|
-
if (!Array.isArray(
|
|
25
|
-
const
|
|
26
|
-
for (const
|
|
27
|
-
if (typeof
|
|
28
|
-
const { id:
|
|
29
|
-
typeof
|
|
22
|
+
function T(e) {
|
|
23
|
+
const t = typeof e == "object" && e !== null ? e.rules : void 0;
|
|
24
|
+
if (!Array.isArray(t)) return [];
|
|
25
|
+
const o = [];
|
|
26
|
+
for (const n of t) {
|
|
27
|
+
if (typeof n != "object" || n === null) continue;
|
|
28
|
+
const { id: r, title: i, summary: c, anchor: f } = n;
|
|
29
|
+
typeof r != "string" || typeof i != "string" || typeof f != "string" || o.push(Object.freeze({ id: r, title: i, summary: typeof c == "string" ? c : null, anchor: f }));
|
|
30
30
|
}
|
|
31
|
-
return
|
|
31
|
+
return o;
|
|
32
|
+
}
|
|
33
|
+
function I(e) {
|
|
34
|
+
const t = typeof e == "object" && e !== null ? e.sections : void 0;
|
|
35
|
+
if (!Array.isArray(t)) return [];
|
|
36
|
+
const o = [];
|
|
37
|
+
for (const n of t) {
|
|
38
|
+
if (typeof n != "object" || n === null) continue;
|
|
39
|
+
const { id: r, title: i, anchor: c } = n;
|
|
40
|
+
typeof r != "string" || typeof i != "string" || typeof c != "string" || o.push(Object.freeze({ id: r, title: i, anchor: c }));
|
|
41
|
+
}
|
|
42
|
+
return o;
|
|
32
43
|
}
|
|
33
44
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
j as AGE_BANDS,
|
|
46
|
+
a as AUTHOR_KINDS,
|
|
47
|
+
y as CASE_CATEGORIES,
|
|
48
|
+
b as CATEGORY_WITHOUT_NOTIFIER,
|
|
49
|
+
E as LEGAL_TEXT_KINDS,
|
|
50
|
+
u as MESSAGE_STATES,
|
|
51
|
+
_ as NEEDS,
|
|
52
|
+
d as NOTIFICATION_CODES,
|
|
53
|
+
p as RESTRICTION_KINDS,
|
|
54
|
+
I as communityLegalSectionsOf,
|
|
55
|
+
T as communityRulesOf,
|
|
56
|
+
A as isCaseCategory,
|
|
57
|
+
S as isKnownAuthor,
|
|
46
58
|
l as isKnownAuthorKind,
|
|
47
59
|
h as isKnownNeed,
|
|
48
|
-
|
|
60
|
+
g as isKnownNotificationCode,
|
|
49
61
|
m as isKnownRestrictionKind,
|
|
50
|
-
|
|
62
|
+
O as isKnownState
|
|
51
63
|
};
|