@nebularstreams/statify 3.0.0
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/.DS_Store +0 -0
- package/dist/website.simple/webfonts/fa-brands-400.woff2 +0 -0
- package/dist/website.simple/webfonts/fa-solid-900.eot +0 -0
- package/dist/website.simple/webfonts/fa-solid-900.svg +4649 -0
- package/dist/website.simple/webfonts/fa-solid-900.ttf +0 -0
- package/dist/website.simple/webfonts/fa-solid-900.woff +0 -0
- package/dist/website.simple/webfonts/fa-solid-900.woff2 +0 -0
- package/dist/website.simple/website.css +32 -0
- package/dist/website.simple/website.min.js +6 -0
- package/dist/website.software/webfonts/fa-brands-400.woff2 +0 -0
- package/dist/website.software/webfonts/fa-solid-900.eot +0 -0
- package/dist/website.software/webfonts/fa-solid-900.svg +4649 -0
- package/dist/website.software/webfonts/fa-solid-900.ttf +0 -0
- package/dist/website.software/webfonts/fa-solid-900.woff +0 -0
- package/dist/website.software/webfonts/fa-solid-900.woff2 +0 -0
- package/dist/website.software/website.css +32 -0
- package/dist/website.software/website.min.js +6 -0
- package/dist/website.worlds/webfonts/fa-brands-400.woff2 +0 -0
- package/dist/website.worlds/webfonts/fa-solid-900.eot +0 -0
- package/dist/website.worlds/webfonts/fa-solid-900.svg +4649 -0
- package/dist/website.worlds/webfonts/fa-solid-900.ttf +0 -0
- package/dist/website.worlds/webfonts/fa-solid-900.woff +0 -0
- package/dist/website.worlds/webfonts/fa-solid-900.woff2 +0 -0
- package/dist/website.worlds/website.css +32 -0
- package/dist/website.worlds/website.min.js +6 -0
- package/package.json +49 -0
- package/readme.md +105 -0
- package/src/publisher-lib.js +179 -0
- package/src/publisher-list.js +91 -0
- package/src/publisher.js +38 -0
- package/src/util/cdn/nobj.cdn.js +88 -0
- package/src/util/htmlroute.js +39 -0
- package/src/util/markdown/lib.showdown.icon.js +62 -0
- package/src/util/markdown/lib.showdown.yt.js +54 -0
- package/src/util/markdown/markdown.js +144 -0
- package/src/util/navibar/util.navibar.js +63 -0
- package/src/util/sha.js +20 -0
- package/src/util/tokenizer.js +234 -0
- package/src/util/widgets/NoticeWidget.js +30 -0
- package/src/util/widgets/app.widgets.js +70 -0
- package/src/util/widgets/util.definewidget.js +14 -0
- package/src/widgets/Cookies.js +55 -0
- package/src/widgets/Frameset-simple.js +114 -0
- package/src/widgets/Frameset.js +124 -0
- package/src/widgets/Page.js +356 -0
- package/src/widgets/RightSide.js +93 -0
- package/src/widgets/Snippets.js +75 -0
- package/src/widgets/Tail.js +11 -0
- package/src/widgets/Widgets.js +10 -0
- package/src/widgets.client/Client.js +22 -0
- package/src/widgets.features/FeatureList.js +364 -0
- package/src/widgets.features/Youtube.js +23 -0
- package/src/widgets.features/bootcol.js +29 -0
- package/src/widgets.features/css/feature.css +112 -0
- package/src/widgets.features/css/tail.css +4 -0
- package/src/widgets.howto/Faq.js +201 -0
- package/src/widgets.howto/HowTo.js +419 -0
- package/src/widgets.howto/Tiles.js +51 -0
- package/src/widgets.howto/script-contractable.js +31 -0
- package/src/widgets.markdown/Document.js +84 -0
- package/src/widgets.market/MarketItem.js +278 -0
- package/src/widgets.market/MarketItem.orig.js +268 -0
- package/src/widgets.market/MarketItem.strips.js +276 -0
- package/src/widgets.market/StoryLicenseWIdget.js +45 -0
- package/src/widgets.market/app.utils.js +238 -0
- package/src.website/css/app/animations.css +27 -0
- package/src.website/css/app/ismobile.css +7 -0
- package/src.website/css/app/style.css +51 -0
- package/src.website/css/app/style.fullheight.css +9 -0
- package/src.website/css/app/style.mdblocks.css +59 -0
- package/src.website/css/app/style.putosafari.css +3 -0
- package/src.website/css/bootstrap/bootstrap-tiny-core.css +47 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-columns.css +1276 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-custom.css +59 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-display.css +279 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-flex.css +881 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-fonts.css +39 -0
- package/src.website/css/bootstrap/bootstrap-tiny-media-paddings.css +1348 -0
- package/src.website/css/css-core/core.ext.css +65 -0
- package/src.website/css/css-core/frontpage.css +28 -0
- package/src.website/css/css-core/root.css +34 -0
- package/src.website/css/css-core/root.fullheight.css +12 -0
- package/src.website/css/css-core/ui.dialog.round.css +14 -0
- package/src.website/css/css-core/ui.navibar.css +28 -0
- package/src.website/css/css-core/ui.notifications.css +12 -0
- package/src.website/css/css-featurelist/feature.css +196 -0
- package/src.website/css/css-featurelist/tail.css +4 -0
- package/src.website/css/css-screens/doc.css +22 -0
- package/src.website/css/css-screens/screens-meta.css +3 -0
- package/src.website/css/css-unsplash/unsplash.css +32 -0
- package/src.website/css/css-videos/youtube.css +28 -0
- package/src.website/css/css-wiki/wiki.css +206 -0
- package/src.website/css/css-wiki/wiki.sidepane.css +16 -0
- package/src.website/css/fontawesome/fa-brands.css +18 -0
- package/src.website/css/fontawesome/fa-solid.css +16 -0
- package/src.website/css/fontawesome/fa.css +4359 -0
- package/src.website/css/skin/mierda.css +15 -0
- package/src.website/css/skin/skin.dark.css +85 -0
- package/src.website/css/skin/skin.light.css +27 -0
- package/src.website/css/skin/vars.font.css +8 -0
- package/src.website/css/skin/vars.sizes.css +4 -0
- package/src.website/package-lock.json +2160 -0
- package/src.website/package.json +28 -0
- package/src.website/public/webfonts/fa-brands-400.woff2 +0 -0
- package/src.website/public/webfonts/fa-solid-900.eot +0 -0
- package/src.website/public/webfonts/fa-solid-900.svg +4649 -0
- package/src.website/public/webfonts/fa-solid-900.ttf +0 -0
- package/src.website/public/webfonts/fa-solid-900.woff +0 -0
- package/src.website/public/webfonts/fa-solid-900.woff2 +0 -0
- package/src.website/rollup.simple.mjs +36 -0
- package/src.website/rollup.software.mjs +36 -0
- package/src.website/rollup.terser.mjs +24 -0
- package/src.website/rollup.worlds.mjs +36 -0
- package/src.website/src/app/app.style.mjs +36 -0
- package/src.website/src/app/index.mjs +118 -0
- package/src.website/src/config.js +8 -0
- package/src.website/src/core/cdnmodel.mjs +7 -0
- package/src.website/src/core/clientruntime.mjs +41 -0
- package/src.website/src/core.cookies/analytics.mjs +96 -0
- package/src.website/src/core.cookies/cookiemanager.mjs +128 -0
- package/src.website/src/core.cookies/css/cookies.css +80 -0
- package/src.website/src/core.cookies/css/nocookies.css +48 -0
- package/src.website/src/core.extra/css/contractable.css +12 -0
- package/src.website/src/core.extra/css/faq.css +42 -0
- package/src.website/src/core.extra/css/howto.css +81 -0
- package/src.website/src/core.extra/extra.document.mjs +83 -0
- package/src.website/src/core.extra/extra.faq.mjs +30 -0
- package/src.website/src/core.extra/extra.mjs +62 -0
- package/src.website/src/main.simple.mjs +4 -0
- package/src.website/src/main.software.mjs +10 -0
- package/src.website/src/main.worlds.mjs +9 -0
- package/src.website/src/support/ismobile.mjs +4 -0
- package/src.website/src/support/nonce.mjs +4 -0
- package/src.website/src/support/persistsettings.mjs +41 -0
- package/src.website/src/support/qrcode.mjs +1269 -0
- package/src.website/src/support/timeutils.mjs +237 -0
- package/src.website/src/widgets/index.mjs +22 -0
- package/src.website/src.widgets/widgets.market/index.mjs +11 -0
- package/src.website/src.widgets/widgets.market/widgets/market/DiscoverWidget.mjs +401 -0
- package/src.website/src.widgets/widgets.market/widgets/market/EmptyNew.mjs +28 -0
- package/src.website/src.widgets/widgets.market/widgets/market/MarketDetail.mjs +78 -0
- package/src.website/src.widgets/widgets.market/widgets/market/MarketItem.mjs +349 -0
- package/src.website/src.widgets/widgets.market/widgets/market/MarketWidget.mjs +437 -0
- package/src.website/src.widgets/widgets.market/widgets/market/StoryLicenseWidget.mjs +34 -0
- package/src.website/src.widgets/widgets.market/widgets/market/css/market.css +394 -0
- package/src.website/src.widgets/widgets.market/widgets/market/css/notice.css +6 -0
- package/src.website/src.widgets/widgets.market/widgets/navibar/NaviBarWidget.mjs +58 -0
- package/src.website/src.widgets/widgets.market/widgets/navibar/css/titlebar.css +68 -0
- package/src.website/src.widgets/widgets.market/widgets/navibar/css/ui.navibar.css +28 -0
- package/src.website/src.widgets/widgets.software/index.mjs +9 -0
- package/src.website/src.widgets/widgets.software/widgets/BootStrapColumnWidget.mjs +17 -0
- package/src.website/src.widgets/widgets.software/widgets/DownloadWidget.mjs +210 -0
- package/src.website/src.widgets/widgets.software/widgets/LicenseWidget.js +103 -0
- package/src.website/src.widgets/widgets.software/widgets/css/download/download.css +110 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/beta.css +28 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/button.css +30 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/front.css +46 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/licenses.css +13 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/overstate.css +15 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/story.css +8 -0
- package/src.website/src.widgets/widgets.software/widgets/css/license/toolbar.css +9 -0
- package/src.website/src.widgets/widgets.software/widgets/support/version.mjs +88 -0
- package/src.website/src.widgets/widgets.worlds/index.mjs +11 -0
- package/src.website/src.widgets/widgets.worlds/widgets/LocalBrowser.mjs +386 -0
- package/src.website/src.widgets/widgets.worlds/widgets/LocalLauncher.code.mjs +247 -0
- package/src.website/src.widgets/widgets.worlds/widgets/LocalLauncher.mjs +239 -0
- package/src.website/src.widgets/widgets.worlds/widgets/css/input.css +32 -0
- package/src.website/src.widgets/widgets.worlds/widgets/css/localprojects.css +188 -0
- package/templates/documentation/assets/docs.css +7 -0
- package/templates/documentation/assets/images/right.webp +0 -0
- package/templates/documentation/images.json +12 -0
- package/templates/documentation/metadata.json +120 -0
- package/templates/documentation/pages/cookies.md +25 -0
- package/templates/documentation/pages/index.md +13 -0
- package/templates/documentation/pages/privacy.md +50 -0
- package/templates/documentation/pages/tos.md +49 -0
- package/templates/landing/assets/res/carousel/image-1.webp +0 -0
- package/templates/landing/assets/res/carousel/image-2.webp +0 -0
- package/templates/landing/assets/res/carousel/image-3.webp +0 -0
- package/templates/landing/assets/res/custom.css +122 -0
- package/templates/landing/assets/res/logos/favicon.ico +0 -0
- package/templates/landing/assets/res/logos/favicon.png +0 -0
- package/templates/landing/assets/res/logos/logo.medallion.png +0 -0
- package/templates/landing/assets/res/logos/logo.white.png +0 -0
- package/templates/landing/assets/res/proj/banda-tech-client.webp +0 -0
- package/templates/landing/assets/res/proj/banda-tech-server.webp +0 -0
- package/templates/landing/assets/res/proj/proj-common-ground.webp +0 -0
- package/templates/landing/assets/res/proj/proj-fieldnote.webp +0 -0
- package/templates/landing/assets/res/proj/proj-tribes.webp +0 -0
- package/templates/landing/images.json +932 -0
- package/templates/landing/metadata.json +115 -0
- package/templates/landing/pages/index.json +268 -0
- package/tool/cli.js +183 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const
|
|
2
|
+
m = require("mithril"),
|
|
3
|
+
defineWidget = require("../widgets/util.definewidget"),
|
|
4
|
+
{Icon} = require("../widgets/app.widgets"),
|
|
5
|
+
RES_LOGO_BANNER = "frontpage-over.png",
|
|
6
|
+
ENABLE = true;
|
|
7
|
+
|
|
8
|
+
const
|
|
9
|
+
ButtonNew = defineWidget(
|
|
10
|
+
({attrs}) => m("button", {
|
|
11
|
+
id: attrs.id,
|
|
12
|
+
class: attrs.class,
|
|
13
|
+
title: attrs["aria-label"],
|
|
14
|
+
"aria-label": attrs["aria-label"]
|
|
15
|
+
}, [m(Icon, {icon: attrs.icon})])
|
|
16
|
+
),
|
|
17
|
+
NaviBar = defineWidget(
|
|
18
|
+
({attrs, children}) => {
|
|
19
|
+
const navibar = attrs.pageMetadata.navibar || attrs.metadata.navibar || {};
|
|
20
|
+
return m(
|
|
21
|
+
"nav.flexrow.pad-h.noshrink.shadow-2" + (navibar.autoHide ? ".autohide" : ""),
|
|
22
|
+
{
|
|
23
|
+
class: attrs.class,
|
|
24
|
+
"aria-label": attrs.label || "Main Navigation"
|
|
25
|
+
},
|
|
26
|
+
attrs.subbar
|
|
27
|
+
? children
|
|
28
|
+
: [
|
|
29
|
+
m(
|
|
30
|
+
"a.mute",
|
|
31
|
+
{href: navibar.home || "/"},
|
|
32
|
+
m("img.unitsizesmall", {
|
|
33
|
+
alt: "Logo",
|
|
34
|
+
src: navibar.logo || attrs.cdnModel
|
|
35
|
+
.platform
|
|
36
|
+
.resources(RES_LOGO_BANNER),
|
|
37
|
+
id: "logo"
|
|
38
|
+
})
|
|
39
|
+
),
|
|
40
|
+
...children,
|
|
41
|
+
...ENABLE
|
|
42
|
+
? [
|
|
43
|
+
m(ButtonNew, {
|
|
44
|
+
id: "showCookies",
|
|
45
|
+
icon: "cookie",
|
|
46
|
+
"aria-label": "change cookie settings",
|
|
47
|
+
class: "unitsize d-none with-nocookies noshrink transbutton"
|
|
48
|
+
}),
|
|
49
|
+
m(ButtonNew, {
|
|
50
|
+
id: "skin",
|
|
51
|
+
icon: "sun",
|
|
52
|
+
"aria-label": "dark or light skin",
|
|
53
|
+
class: "unitsize noshrink transbutton"
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
: []
|
|
57
|
+
]
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
module.exports = NaviBar;
|
package/src/util/sha.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const
|
|
2
|
+
m = require("mithril"),
|
|
3
|
+
crypto = require("crypto"),
|
|
4
|
+
defineWidget = require("./widgets/util.definewidget");
|
|
5
|
+
|
|
6
|
+
function getSha(text) {
|
|
7
|
+
|
|
8
|
+
return crypto
|
|
9
|
+
.createHash("sha256")
|
|
10
|
+
.update(text)
|
|
11
|
+
.digest("base64");
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const
|
|
15
|
+
|
|
16
|
+
Script = defineWidget(
|
|
17
|
+
({ attrs }) => m("script", { integrity: "sha256-"+getSha(attrs.script) }, m.trust(attrs.script))
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
module.exports = Script;
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* String Tokenizer functions
|
|
5
|
+
*
|
|
6
|
+
* Substitutes parameters inside strings
|
|
7
|
+
* Parameters are separated by $ at the beggining and end: $PARAM$, $PARAM1$
|
|
8
|
+
* Parameters can navigate source object like $object/very/deep$
|
|
9
|
+
* Parameters can include VERY SIMPLE default values like $object/very/deep=myvalue$
|
|
10
|
+
*
|
|
11
|
+
* Note that default values cannot contain conflicting regexp symbols. This is a side functionality
|
|
12
|
+
* and never meant to support any default value use case, but alpha chars and numbers
|
|
13
|
+
*
|
|
14
|
+
* (c) Rodolfo LP 2001 - Public Domain
|
|
15
|
+
*
|
|
16
|
+
* @typedef {{ id:string,url:string}} UrlDefinition
|
|
17
|
+
* @typedef {{ message:string, getTitle:boolean=false, defaultTitle:string="url" }} ResolveUrlOptions
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/* eslint-disable no-use-before-define,no-unused-vars,prefer-destructuring,no-param-reassign,no-prototype-builtins */
|
|
21
|
+
|
|
22
|
+
// eslint-disable-next-line no-useless-escape
|
|
23
|
+
// noinspection RegExpRedundantEscape
|
|
24
|
+
const
|
|
25
|
+
TAG = "[TOKENIZER]",
|
|
26
|
+
TOK_EXPR = /\$([A-Za-z0-9_\/\:\=]+)\$/g,
|
|
27
|
+
|
|
28
|
+
tokenize = (str, obj, isEncode) => tokenizeCore(str, obj, {
|
|
29
|
+
encode: isEncode,
|
|
30
|
+
defvalue: ""
|
|
31
|
+
}),
|
|
32
|
+
tokenizeKeep = (str, obj, isEncode) => tokenizeCore(str, obj, {encode: isEncode}),
|
|
33
|
+
tokenizeWithDefault = (str, obj, defaultValue) => tokenizeCore(str, obj, defaultValue == null ? null : {defvalue: defaultValue}),
|
|
34
|
+
tokenizeStrict = (str, obj, isEncode, isUnescape) => tokenizeCore(str, obj, {
|
|
35
|
+
encode: isEncode,
|
|
36
|
+
unescape: isUnescape,
|
|
37
|
+
dothrow: true
|
|
38
|
+
}),
|
|
39
|
+
|
|
40
|
+
Parsers = {
|
|
41
|
+
daterel: epoch => new Date(epoch).toISOString()
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
function tokenizeCore(str, obj, options) {
|
|
45
|
+
|
|
46
|
+
if (!str) return "";
|
|
47
|
+
if (typeof (str) !== "string") return str;
|
|
48
|
+
|
|
49
|
+
// eslint-disable-next-line no-param-reassign
|
|
50
|
+
options = options || {};
|
|
51
|
+
obj = obj || {};
|
|
52
|
+
|
|
53
|
+
let ckey;
|
|
54
|
+
|
|
55
|
+
return str.replace(TOK_EXPR, (match, complexkey) => {
|
|
56
|
+
|
|
57
|
+
let defval = null,
|
|
58
|
+
isFreak = false;
|
|
59
|
+
|
|
60
|
+
if (complexkey.indexOf("=") > 0) {
|
|
61
|
+
ckey = complexkey.split("=");
|
|
62
|
+
complexkey = ckey[0];
|
|
63
|
+
isFreak = (ckey.length === 3);
|
|
64
|
+
// eslint-disable-next-line no-nested-ternary
|
|
65
|
+
defval = isFreak
|
|
66
|
+
? options.dothrow ? ckey[2] : null
|
|
67
|
+
: ckey[1];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const typed = complexkey.split(":"),
|
|
71
|
+
key = typed[0],
|
|
72
|
+
keytype = typed[1] || null,
|
|
73
|
+
|
|
74
|
+
keys = key.split("/"),
|
|
75
|
+
root = keys.shift();
|
|
76
|
+
|
|
77
|
+
let
|
|
78
|
+
data = obj[root];
|
|
79
|
+
|
|
80
|
+
if (typeof (data) === "number") data = "" + data;
|
|
81
|
+
|
|
82
|
+
let fdata = (keys.length ? getPointedData(data, keys.join("/")) : data) || defval;
|
|
83
|
+
|
|
84
|
+
if (fdata == null && options.dothrow) {
|
|
85
|
+
throw new Error("Parameter " + root + (keys.length ? "/" + keys.join("/") : "") + " is required");
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (fdata == null) {
|
|
89
|
+
fdata = options.hasOwnProperty("defvalue")
|
|
90
|
+
? options.defvalue
|
|
91
|
+
: "$" + key + (isFreak ? "==" + ckey[2] : "") + "$";
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (keytype && Parsers[keytype]) {
|
|
95
|
+
fdata = Parsers[keytype](fdata);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
if (options.unescape) {
|
|
99
|
+
fdata = unescape(fdata);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return (options.encode ? escape(fdata) : fdata);
|
|
103
|
+
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Resolves a pointer into a JSON data structure
|
|
109
|
+
* @param {Object} data JSON Data
|
|
110
|
+
* @param {String} pointer Pointer expression
|
|
111
|
+
* @return {Object | null} resolved data
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
const getPointedData = function (data, pointer) {
|
|
115
|
+
if (!pointer) return data;
|
|
116
|
+
try {
|
|
117
|
+
const ps = pointer.split("/");
|
|
118
|
+
let d = data;
|
|
119
|
+
// eslint-disable-next-line guard-for-in
|
|
120
|
+
for (const l in ps) {
|
|
121
|
+
d = d[ps[l]];
|
|
122
|
+
if (!d) {
|
|
123
|
+
d = null;
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return d;
|
|
128
|
+
} catch (e) {
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Tokenizes one object with another
|
|
135
|
+
* @param {object} source
|
|
136
|
+
* @param {object} tokenizeValues
|
|
137
|
+
* @param strict Whether to require all templates to be resolved
|
|
138
|
+
* @retuen {object} source
|
|
139
|
+
*/
|
|
140
|
+
|
|
141
|
+
function tokenizeObject(source, tokenizeValues, strict, asNewObject) {
|
|
142
|
+
|
|
143
|
+
const tokenizer = strict ? tokenizeStrict : tokenizeKeep;
|
|
144
|
+
const retObject = asNewObject ? {} : source;
|
|
145
|
+
|
|
146
|
+
if (typeof source === "string") {
|
|
147
|
+
return tokenizer(source, tokenizeValues);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (typeof source === "object") {
|
|
151
|
+
|
|
152
|
+
if (source.length) {
|
|
153
|
+
// root is an array
|
|
154
|
+
// an array
|
|
155
|
+
const arr = [];
|
|
156
|
+
for (const item of source) {
|
|
157
|
+
arr.push(tokenizeObject(item, tokenizeValues, strict, true));
|
|
158
|
+
}
|
|
159
|
+
return arr;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
for (const prop of Object.keys(source)) {
|
|
163
|
+
const value = source[prop];
|
|
164
|
+
if (typeof value === "object") {
|
|
165
|
+
retObject[prop] = tokenizeObject(value, tokenizeValues, strict, true);
|
|
166
|
+
} else if (typeof value === "string") {
|
|
167
|
+
retObject[prop] = tokenizer(source[prop], tokenizeValues);
|
|
168
|
+
} else {
|
|
169
|
+
retObject[prop] = value;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return retObject;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Resolves a playout URL
|
|
178
|
+
* @param {string|UrlDefinition} tokenizedUrl The URL to parse
|
|
179
|
+
* @param {Object=} parameters Parameters to tokenize the URL with
|
|
180
|
+
* @param {ResolveUrlOptions=} options Miscellaneous options for this call
|
|
181
|
+
* @return string
|
|
182
|
+
*/
|
|
183
|
+
|
|
184
|
+
function tokenizeUrl(tokenizedUrl, parameters, options) {
|
|
185
|
+
|
|
186
|
+
options = options || {};
|
|
187
|
+
|
|
188
|
+
const
|
|
189
|
+
{message, getTitle, defaultTitle} = options,
|
|
190
|
+
finalDefaultTitle = defaultTitle || "Url",
|
|
191
|
+
title = typeof tokenizedUrl === "string"
|
|
192
|
+
? defaultTitle
|
|
193
|
+
: (typeof tokenizedUrl === "object" && tokenizedUrl.id ? tokenizedUrl.id || finalDefaultTitle : finalDefaultTitle);
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
// just return the title of an URL
|
|
197
|
+
if (getTitle) {
|
|
198
|
+
return title;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// return the url itself
|
|
202
|
+
const
|
|
203
|
+
url = typeof tokenizedUrl === "string"
|
|
204
|
+
? tokenizedUrl
|
|
205
|
+
: (typeof tokenizedUrl === "object" && tokenizedUrl.url ? tokenizedUrl.url : null);
|
|
206
|
+
|
|
207
|
+
try {
|
|
208
|
+
return tokenizeStrict(
|
|
209
|
+
url,
|
|
210
|
+
parameters || {},
|
|
211
|
+
"..."
|
|
212
|
+
);
|
|
213
|
+
} catch (e) {
|
|
214
|
+
console.log(TAG, e.message);
|
|
215
|
+
return message || "(not enough parameters)";
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Tokenizer
|
|
221
|
+
* @type {{tokenize: (function(*=, *=, *=): (string|*)),
|
|
222
|
+
* tokenizeStrict: (function(*=, *=, *=, *=): (string|*)), getPointedData: getPointedData}}
|
|
223
|
+
*/
|
|
224
|
+
|
|
225
|
+
// noinspection JSUnusedGlobalSymbols
|
|
226
|
+
module.exports = {
|
|
227
|
+
tokenize,
|
|
228
|
+
tokenizeStrict,
|
|
229
|
+
tokenizeObject,
|
|
230
|
+
tokenizeKeep,
|
|
231
|
+
tokenizeWithDefault,
|
|
232
|
+
tokenizeUrl,
|
|
233
|
+
getPointedData
|
|
234
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* global m */
|
|
2
|
+
const
|
|
3
|
+
defineWidget = require("widgetutils"),
|
|
4
|
+
{ Icon } = require("app.widgets");
|
|
5
|
+
|
|
6
|
+
module.exports = defineWidget(
|
|
7
|
+
({ attrs, children }) => (
|
|
8
|
+
children.length
|
|
9
|
+
? m(
|
|
10
|
+
".notice.cardie.flexcol.pad-3",
|
|
11
|
+
{ class: attrs.class || "marg-2 font-75" },
|
|
12
|
+
m(
|
|
13
|
+
".flexrow",
|
|
14
|
+
[
|
|
15
|
+
m(Icon, attrs),
|
|
16
|
+
m(".pad-2.pad-h", attrs.text)
|
|
17
|
+
]
|
|
18
|
+
),
|
|
19
|
+
...children
|
|
20
|
+
)
|
|
21
|
+
: m(
|
|
22
|
+
".notice.cardie.flexrow.pad-3",
|
|
23
|
+
{ class: attrs.class || "marg-2 font-75", onclick: attrs.onClick },
|
|
24
|
+
[
|
|
25
|
+
m(Icon, attrs),
|
|
26
|
+
m(".pad-2.pad-h", attrs.text)
|
|
27
|
+
]
|
|
28
|
+
)
|
|
29
|
+
)
|
|
30
|
+
);
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
const
|
|
2
|
+
m = require("mithril"),
|
|
3
|
+
defineWidget = require("./util.definewidget"),
|
|
4
|
+
|
|
5
|
+
Icon = defineWidget(
|
|
6
|
+
({ attrs }) => m(
|
|
7
|
+
`i.icon.${attrs.pack || "fas"}.fa-${attrs.icon || "cog"}${attrs.size ? ".fa-" + attrs.size + "x" : ""}`,
|
|
8
|
+
{
|
|
9
|
+
role: "img",
|
|
10
|
+
onclick: attrs.onclick || null,
|
|
11
|
+
...attrs.iconClass && { class: attrs.iconClass },
|
|
12
|
+
"aria-label": attrs.icon + " icon"
|
|
13
|
+
}
|
|
14
|
+
)
|
|
15
|
+
),
|
|
16
|
+
|
|
17
|
+
Empty = defineWidget(
|
|
18
|
+
({ attrs, children }) => m(
|
|
19
|
+
".flexcol.flexcenter.al-center.grows.emptywidget",
|
|
20
|
+
{
|
|
21
|
+
...attrs.class && { class: attrs.class },
|
|
22
|
+
...attrs.key && { key: attrs.key },
|
|
23
|
+
...attrs.onClick && { onclick: attrs.onClick },
|
|
24
|
+
role: "presentation"
|
|
25
|
+
},
|
|
26
|
+
[
|
|
27
|
+
|
|
28
|
+
...attrs.icon
|
|
29
|
+
? [m(Icon, attrs)]
|
|
30
|
+
: attrs.image
|
|
31
|
+
? [m("img.iconimage", { class: "size-" + attrs.size + (attrs.imageClass ? " " + attrs.imageClass : ""), src: attrs.image })]
|
|
32
|
+
: [],
|
|
33
|
+
|
|
34
|
+
...attrs.message
|
|
35
|
+
? [
|
|
36
|
+
m(
|
|
37
|
+
".marg-2.marg-v",
|
|
38
|
+
{
|
|
39
|
+
class: attrs.size > 4 ? "font-150" : "font-100",
|
|
40
|
+
role: "status",
|
|
41
|
+
"aria-label": attrs.message
|
|
42
|
+
},
|
|
43
|
+
attrs.message.split("\n")
|
|
44
|
+
.map((txt, i) => m(".emptyline.l" + i, txt)))]
|
|
45
|
+
: [],
|
|
46
|
+
...children
|
|
47
|
+
? [m(".flexcol.additional", children)]
|
|
48
|
+
: []
|
|
49
|
+
]
|
|
50
|
+
)
|
|
51
|
+
),
|
|
52
|
+
|
|
53
|
+
Button = {
|
|
54
|
+
view: ({ attrs, state, children }) => m((attrs.download || attrs.link) ? "a.button" : "button", {
|
|
55
|
+
...attrs.link && { href: attrs.link },
|
|
56
|
+
...attrs.download && { rel: "nofollow", download: attrs.download },
|
|
57
|
+
...attrs.target && { target: attrs.target },
|
|
58
|
+
"aria-label": attrs["aria-label"] || attrs.title || attrs.text,
|
|
59
|
+
title: attrs.title || attrs["aria-label"],
|
|
60
|
+
class: (attrs.class || "") + (state.busy ? " busy" : ""),
|
|
61
|
+
...state.error && { "data-error": state.error.message }
|
|
62
|
+
}, [
|
|
63
|
+
...(attrs.icon && !attrs.right) ? [m(Icon, attrs)] : [],
|
|
64
|
+
...attrs.text ? [m("span.pad-1.pad-h", { class: attrs.textClass || null }, attrs.text)] : [],
|
|
65
|
+
...(attrs.icon && attrs.right) ? [m(Icon, attrs)] : [],
|
|
66
|
+
...children
|
|
67
|
+
])
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
module.exports = { Icon, Empty, Button };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* global EXPORTS, OBFUSC */
|
|
2
|
+
|
|
3
|
+
const
|
|
4
|
+
defineWidget = (view, oninit = null, oncreate = null, onremove = null, onupdate = null, rest = null, previous = null) => ({
|
|
5
|
+
...(previous || {}),
|
|
6
|
+
...view && {view},
|
|
7
|
+
...oninit && {oninit},
|
|
8
|
+
...oncreate && {oncreate},
|
|
9
|
+
...onremove && {onremove},
|
|
10
|
+
...onupdate && {onupdate},
|
|
11
|
+
...(rest || {})
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
module.exports = defineWidget;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
const COOKIES_FOOTER_FULL = (productName = "Obscene Studio", domain="obscene.studio") => `
|
|
3
|
+
<div id="cookies" class="screen d-none" role="alert" aria-label="GDPR-Compliant Cookie Constent Dialog">
|
|
4
|
+
<div id="cookies-dialog" class="cookies-notice flexrow w-100 wrap" aria-label="Simplified Cookie Consent dialog">
|
|
5
|
+
<p class="grows">
|
|
6
|
+
${productName}, and selected third parties, use cookies or similar technologies for technical purposes and, with your consent, for the purposes
|
|
7
|
+
specified in the <a href="https://${domain}/doc/cookies">Cookie Policy</a>. In compliance with the European GDPR Law, you can click on <b>CUSTOMIZE</b> and grant or deny your consent to the specific use cases described in the document. You can also click on <b>ACCEPT ALL COOKIES</b> to accept the usage of cookies and proceed to the document.
|
|
8
|
+
</p>
|
|
9
|
+
<div class="flexrow grows">
|
|
10
|
+
<button aria-label="Customize Accepted Cookies" class="grows bg-warning" data-action="customize">CUSTOMIZE</button>
|
|
11
|
+
<button aria-label="Accept All Cookies" class="grows bg-ok" data-action="accept">ACCEPT ALL COOKIES</button>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
<div id="cookies-custom" class="cookies-custom flexrow w-100 wrap d-none" aria-label="Customized Cookie Settings">
|
|
15
|
+
<button aria-label="Reject All Cookies" class="col-4 bg-error" data-action="reject">REJECT ALL</button>
|
|
16
|
+
<div class="col-6 grows">Do not use any cookies. Disable Videos and Third party images.</div>
|
|
17
|
+
<button aria-label="Accept Analytical Cookies" class="col-4 bg-warning" data-action="accept-analytics">ONLY ANALYTICS</button>
|
|
18
|
+
<div class="col-6 grows">Allow anonymous analytics, but disable Videos and Third party images</div>
|
|
19
|
+
<button aria-label="Accept third party cookies" class="col-4 bg-warning" data-action="accept-thirdparty">ONLY THIRD PARTY SERVICES</button>
|
|
20
|
+
<div class="col-6 grows">Disable anonymous analytics, but allow Videos and Third party images</div>
|
|
21
|
+
<button aria-label="Accept all cookies" class="col-4 bg-ok" data-action="accept">ACCEPT ALL</button>
|
|
22
|
+
<div class="col-6 grows">Allow Analytics, and Third Party Videos and images</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
const COOKIES_FOOTER_FUNCTIONAL = (productName = "Obscene Studio", domain="obscene.studio") => `
|
|
29
|
+
<aside id="cookies" class="screen d-none" aria-label="GDPR-Compliant Cookie Constent Dialog">
|
|
30
|
+
<div id="cookies-dialog" class="cookies-notice flexrow w-100 wrap" aria-label="Simplified Cookie Consent dialog">
|
|
31
|
+
<p class="grows">
|
|
32
|
+
${productName} only uses functional cookies for strictly technical purposes
|
|
33
|
+
as specified in the <a href="https://${domain}/doc/cookies">Cookie Policy</a>. In compliance with the European GDPR Law, you must click <b>ACCEPT COOKIES</b> to accept the usage of cookies and proceed to the application. Unfortunately, the application will not work without the required functional cookies.
|
|
34
|
+
</p>
|
|
35
|
+
<div class="flexrow grows w-100">
|
|
36
|
+
<button aria-label="Accept All Cookies" class="grows bg-ok" data-action="accept">ACCEPT COOKIES</button>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</aside>
|
|
40
|
+
`;
|
|
41
|
+
const COOKIES_FOOTER_NONE = (productName = "Obscene Studio", domain="obscene.studio") => `
|
|
42
|
+
<aside id="cookies" class="screen d-none" aria-label="GDPR-Compliant Cookie Constent Dialog">
|
|
43
|
+
<div id="cookies-dialog" class="cookies-notice flexrow w-100 wrap" aria-label="Simplified Cookie Consent dialog">
|
|
44
|
+
<p class="grows">
|
|
45
|
+
${productName} does not use any cookies in this website
|
|
46
|
+
as specified in the <a href="https://${domain}/doc/cookies">Cookie Policy</a>. In compliance with the European GDPR Law, you must click <b>ACKNOWLEDGE</b> to proceed to the application.
|
|
47
|
+
</p>
|
|
48
|
+
<div class="flexrow grows w-100">
|
|
49
|
+
<button aria-label="Accept Cookies" class="grows bg-ok" data-action="accept">ACKNOWLEDGE</button>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</aside>
|
|
53
|
+
`;
|
|
54
|
+
|
|
55
|
+
module.exports = {full: COOKIES_FOOTER_FULL, functional: COOKIES_FOOTER_FUNCTIONAL, none: COOKIES_FOOTER_NONE};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
const
|
|
2
|
+
m = require("mithril"),
|
|
3
|
+
|
|
4
|
+
defineWidget = require("../util/widgets/util.definewidget"),
|
|
5
|
+
{Empty, Icon} = require("../util/widgets/app.widgets"),
|
|
6
|
+
NaviBar = require("../util/navibar/util.navibar"),
|
|
7
|
+
|
|
8
|
+
Widgets = require("./Widgets");
|
|
9
|
+
|
|
10
|
+
function getLink(url, metadata) {
|
|
11
|
+
if (!url) return "";
|
|
12
|
+
if (url.startsWith("http")) return url;
|
|
13
|
+
if (url.startsWith("/")) return metadata.site.url + url;
|
|
14
|
+
return [metadata.canonical, url].join("/");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const
|
|
18
|
+
|
|
19
|
+
NaviOption = defineWidget(({attrs}) => {
|
|
20
|
+
|
|
21
|
+
const
|
|
22
|
+
{link, metadata, id, relativeRoute} = attrs,
|
|
23
|
+
{title, icon, linkClass = icon ? "d-none d-sm-flex" : "", iconClass = "d-sm-none", url} = link,
|
|
24
|
+
el = (link.static || !link.url) ? "div" : "a";
|
|
25
|
+
|
|
26
|
+
return m(
|
|
27
|
+
".naviholder.flexrow" + (url ? "[itemscope]" : ""),
|
|
28
|
+
{
|
|
29
|
+
class: (link.class || "") + (relativeRoute === url ? " accent" : "") + (attrs.link.separator ? " grows" : ""),
|
|
30
|
+
...url
|
|
31
|
+
? {
|
|
32
|
+
itemtype: "https://schema.org/SiteNavigationElement"
|
|
33
|
+
}
|
|
34
|
+
: {
|
|
35
|
+
role: "presentation"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
[
|
|
39
|
+
m(
|
|
40
|
+
el + ".flexrow",
|
|
41
|
+
{
|
|
42
|
+
title: title || id,
|
|
43
|
+
...url && {itemprop: "url", href: getLink(url, metadata)}
|
|
44
|
+
},
|
|
45
|
+
[
|
|
46
|
+
// icon
|
|
47
|
+
...icon ? [m(Icon, {iconClass, icon})] : [],
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
// text
|
|
51
|
+
m(
|
|
52
|
+
link.static ? "b.ellipsis" : ".ellipsis",
|
|
53
|
+
{class: linkClass, itemprop: "name"},
|
|
54
|
+
link.separator ? "" : (title || id)
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
])
|
|
58
|
+
]);
|
|
59
|
+
}),
|
|
60
|
+
Frame = defineWidget(
|
|
61
|
+
({attrs}) => {
|
|
62
|
+
|
|
63
|
+
const
|
|
64
|
+
{metadata, pageMetadata, dynamicData, relativeRoute} = attrs,
|
|
65
|
+
widget = Widgets[pageMetadata.widget],
|
|
66
|
+
navibar = pageMetadata.navibar || metadata.navibar,
|
|
67
|
+
links = navibar?.links || pageMetadata.links;
|
|
68
|
+
|
|
69
|
+
return [
|
|
70
|
+
...pageMetadata.notitlebar
|
|
71
|
+
? []
|
|
72
|
+
: [
|
|
73
|
+
m(
|
|
74
|
+
NaviBar,
|
|
75
|
+
{class: "titlebar", cdnModel: attrs.cdnModel, metadata, pageMetadata},
|
|
76
|
+
[
|
|
77
|
+
...Object.keys(links)
|
|
78
|
+
.map((id) => m(NaviOption, {
|
|
79
|
+
id,
|
|
80
|
+
link: links[id],
|
|
81
|
+
metadata,
|
|
82
|
+
relativeRoute
|
|
83
|
+
})),
|
|
84
|
+
|
|
85
|
+
...pageMetadata.displayTitle || navibar?.displayTitle
|
|
86
|
+
? [m(".tititem.grows", pageMetadata.title)]
|
|
87
|
+
: dynamicData?.item?.meta
|
|
88
|
+
? [m(".tititem.grows", dynamicData.item?.meta.title)]
|
|
89
|
+
: []
|
|
90
|
+
]
|
|
91
|
+
)
|
|
92
|
+
],
|
|
93
|
+
|
|
94
|
+
...widget
|
|
95
|
+
? [
|
|
96
|
+
m(widget, {
|
|
97
|
+
cdnModel: attrs.cdnModel,
|
|
98
|
+
metadata,
|
|
99
|
+
pageMetadata,
|
|
100
|
+
dynamicData,
|
|
101
|
+
relativeRoute,
|
|
102
|
+
source: attrs.source
|
|
103
|
+
})
|
|
104
|
+
]
|
|
105
|
+
: [
|
|
106
|
+
m(Empty, {
|
|
107
|
+
message: "Unknown widget " + pageMetadata.widget
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
module.exports = Frame;
|