@texonom/nreact 1.6.2 → 1.6.5

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.
Files changed (34) hide show
  1. package/build/asset-wrapper-BjCXzGmC.js +1056 -0
  2. package/build/asset-wrapper-BjCXzGmC.js.map +1 -0
  3. package/build/block.d.ts +1 -0
  4. package/build/block.d.ts.map +1 -1
  5. package/build/collection-column-title-Bw3sXBSk.js +113 -0
  6. package/build/collection-column-title-Bw3sXBSk.js.map +1 -0
  7. package/build/components/editable-text.d.ts +18 -0
  8. package/build/components/editable-text.d.ts.map +1 -0
  9. package/build/components/editable-text.test.d.ts +2 -0
  10. package/build/components/editable-text.test.d.ts.map +1 -0
  11. package/build/context.d.ts +4 -0
  12. package/build/context.d.ts.map +1 -1
  13. package/build/index.js +596 -689
  14. package/build/index.js.map +1 -1
  15. package/build/renderer.d.ts +3 -0
  16. package/build/renderer.d.ts.map +1 -1
  17. package/build/rolldown-runtime-CEFd7nDs.js +30 -0
  18. package/build/third-party/code.js +559 -196
  19. package/build/third-party/code.js.map +1 -1
  20. package/build/third-party/collection.js +2690 -3432
  21. package/build/third-party/collection.js.map +1 -1
  22. package/build/third-party/equation.js +27 -43
  23. package/build/third-party/equation.js.map +1 -1
  24. package/build/third-party/modal.js +1355 -1615
  25. package/build/third-party/modal.js.map +1 -1
  26. package/license +21 -0
  27. package/package.json +16 -13
  28. package/src/styles.css +16 -0
  29. package/build/_commonjsHelpers-ByYUsBRP.js +0 -34
  30. package/build/_commonjsHelpers-ByYUsBRP.js.map +0 -1
  31. package/build/asset-wrapper-CVJvW06J.js +0 -984
  32. package/build/asset-wrapper-CVJvW06J.js.map +0 -1
  33. package/build/collection-column-title-l4hmVo49.js +0 -99
  34. package/build/collection-column-title-l4hmVo49.js.map +0 -1
@@ -1,199 +1,562 @@
1
- var P = Object.defineProperty;
2
- var h = Object.getOwnPropertySymbols;
3
- var C = Object.prototype.hasOwnProperty, j = Object.prototype.propertyIsEnumerable;
4
- var y = (e, n, a) => n in e ? P(e, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[n] = a, w = (e, n) => {
5
- for (var a in n || (n = {}))
6
- C.call(n, a) && y(e, a, n[a]);
7
- if (h)
8
- for (var a of h(n))
9
- j.call(n, a) && y(e, a, n[a]);
10
- return e;
11
- };
12
- var g = (e, n, a) => new Promise((c, o) => {
13
- var i = (s) => {
14
- try {
15
- r(a.next(s));
16
- } catch (l) {
17
- o(l);
18
- }
19
- }, t = (s) => {
20
- try {
21
- r(a.throw(s));
22
- } catch (l) {
23
- o(l);
24
- }
25
- }, r = (s) => s.done ? c(s.value) : Promise.resolve(s.value).then(i, t);
26
- r((a = a.apply(e, n)).next());
27
- });
28
- import u from "react";
29
- import { g as E } from "../_commonjsHelpers-ByYUsBRP.js";
30
- import { getBlockTitle as R } from "@texonom/nutils";
31
- import { highlightElement as D } from "prismjs";
32
- import { u as _, T as G } from "../asset-wrapper-CVJvW06J.js";
33
- var m, x;
34
- function z() {
35
- if (x) return m;
36
- x = 1, m = c;
37
- function e() {
38
- return new DOMException("The request is not allowed", "NotAllowedError");
39
- }
40
- function n(o) {
41
- return g(this, null, function* () {
42
- if (!navigator.clipboard)
43
- throw e();
44
- return navigator.clipboard.writeText(o);
45
- });
46
- }
47
- function a(o) {
48
- return g(this, null, function* () {
49
- const i = document.createElement("span");
50
- i.textContent = o, i.style.whiteSpace = "pre", i.style.webkitUserSelect = "auto", i.style.userSelect = "all", document.body.appendChild(i);
51
- const t = window.getSelection(), r = window.document.createRange();
52
- t.removeAllRanges(), r.selectNode(i), t.addRange(r);
53
- let s = !1;
54
- try {
55
- s = window.document.execCommand("copy");
56
- } finally {
57
- t.removeAllRanges(), window.document.body.removeChild(i);
58
- }
59
- if (!s) throw e();
60
- });
61
- }
62
- function c(o) {
63
- return g(this, null, function* () {
64
- try {
65
- yield n(o);
66
- } catch (i) {
67
- try {
68
- yield a(o);
69
- } catch (t) {
70
- throw t || i || e();
71
- }
72
- }
73
- });
74
- }
75
- return m;
76
- }
77
- var M = z();
78
- const T = /* @__PURE__ */ E(M);
79
- Prism.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, boolean: /\b(?:false|true)\b/, function: /\b\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/ };
80
- (function(e) {
81
- var n, a = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;
82
- e.languages.css.selector = { pattern: e.languages.css.selector.pattern, lookbehind: !0, inside: n = { "pseudo-element": /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/, "pseudo-class": /:[-\w]+/, class: /\.[-\w]+/, id: /#[-\w]+/, attribute: { pattern: RegExp(`\\[(?:[^[\\]"']|` + a.source + ")*\\]"), greedy: !0, inside: { punctuation: /^\[|\]$/, "case-sensitivity": { pattern: /(\s)[si]$/i, lookbehind: !0, alias: "keyword" }, namespace: { pattern: /^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/, lookbehind: !0, inside: { punctuation: /\|$/ } }, "attr-name": { pattern: /^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/, lookbehind: !0 }, "attr-value": [a, { pattern: /(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/, lookbehind: !0 }], operator: /[|~*^$]?=/ } }, "n-th": [{ pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/, lookbehind: !0, inside: { number: /[\dn]+/, operator: /[+-]/ } }, { pattern: /(\(\s*)(?:even|odd)(?=\s*\))/i, lookbehind: !0 }], combinator: />|\+|~|\|\|/, punctuation: /[(),]/ } }, e.languages.css.atrule.inside["selector-function-argument"].inside = n, e.languages.insertBefore("css", "property", { variable: { pattern: /(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i, lookbehind: !0 } });
83
- var c = { pattern: /(\b\d+)(?:%|[a-z]+(?![\w-]))/, lookbehind: !0 }, o = { pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/, lookbehind: !0 };
84
- e.languages.insertBefore("css", "function", { operator: { pattern: /(\s)[+\-*\/](?=\s)/, lookbehind: !0 }, hexcode: { pattern: /\B#[\da-f]{3,8}\b/i, alias: "color" }, color: [{ pattern: /(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i, lookbehind: !0 }, { pattern: /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i, inside: { unit: c, number: o, function: /[\w-]+(?=\()/, punctuation: /[(),]/ } }], entity: /\\[\da-f]{1,8}/i, unit: c, number: o });
85
- })(Prism);
86
- (function(e) {
87
- var n = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
88
- e.languages.css = { comment: /\/\*[\s\S]*?\*\//, atrule: { pattern: RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|` + n.source + ")*?(?:;|(?=\\s*\\{))"), inside: { rule: /^@[\w-]+/, "selector-function-argument": { pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/, lookbehind: !0, alias: "selector" }, keyword: { pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/, lookbehind: !0 } } }, url: { pattern: RegExp("\\burl\\((?:" + n.source + `|(?:[^\\\\\r
89
- ()"']|\\\\[^])*)\\)`, "i"), greedy: !0, inside: { function: /^url/i, punctuation: /^\(|\)$/, string: { pattern: RegExp("^" + n.source + "$"), alias: "url" } } }, selector: { pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + n.source + ")*(?=\\s*\\{)"), lookbehind: !0 }, string: { pattern: n, greedy: !0 }, property: { pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i, lookbehind: !0 }, important: /!important\b/i, function: { pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i, lookbehind: !0 }, punctuation: /[(){};:,]/ }, e.languages.css.atrule.inside.rest = e.languages.css;
90
- var a = e.languages.markup;
91
- a && (a.tag.addInlined("style", "css"), a.tag.addAttribute("style", "css"));
92
- })(Prism);
93
- Prism.languages.javascript = Prism.languages.extend("clike", { "class-name": [Prism.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0 }], function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, number: { pattern: RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"), lookbehind: !0 }, operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", { regex: { pattern: RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r
94
- ]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r
95
- ])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r
96
- ]|\\\\.|\\[(?:[^[\\]\\\\\r
97
- ]|\\\\.|\\[(?:[^[\\]\\\\\r
98
- ]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r
99
- ])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r
100
- ,.;:})\\]]|//))`), lookbehind: !0, greedy: !0, inside: { "regex-source": { pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, lookbehind: !0, alias: "language-regex", inside: Prism.languages.regex }, "regex-delimiter": /^\/|\/$/, "regex-flags": /^[a-z]+$/ } }, "function-variable": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, lookbehind: !0, inside: Prism.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), Prism.languages.insertBefore("javascript", "string", { hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" }, "template-string": { pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\$\{|\}$/, alias: "punctuation" }, rest: Prism.languages.javascript } }, string: /[\s\S]+/ } }, "string-property": { pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, lookbehind: !0, greedy: !0, alias: "property" } }), Prism.languages.insertBefore("javascript", "operator", { "literal-property": { pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, lookbehind: !0, alias: "property" } }), Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)", "javascript")), Prism.languages.js = Prism.languages.javascript;
101
- var k = {}, v;
102
- function L() {
103
- return v || (v = 1, (function(e) {
104
- function n(r, s) {
105
- return RegExp(r.replace(/<ID>/g, (function() {
106
- return "(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*";
107
- })), s);
108
- }
109
- e.languages.insertBefore("javascript", "function-variable", { "method-variable": { pattern: RegExp("(\\.\\s*)" + e.languages.javascript["function-variable"].pattern.source), lookbehind: !0, alias: ["function-variable", "method", "function", "property-access"] } }), e.languages.insertBefore("javascript", "function", { method: { pattern: RegExp("(\\.\\s*)" + e.languages.javascript.function.source), lookbehind: !0, alias: ["function", "property-access"] } }), e.languages.insertBefore("javascript", "constant", { "known-class-name": [{ pattern: /\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/, alias: "class-name" }, { pattern: /\b(?:[A-Z]\w*)Error\b/, alias: "class-name" }] }), e.languages.insertBefore("javascript", "keyword", { imports: { pattern: n("(\\bimport\\b\\s*)(?:<ID>(?:\\s*,\\s*(?:\\*\\s*as\\s+<ID>|\\{[^{}]*\\}))?|\\*\\s*as\\s+<ID>|\\{[^{}]*\\})(?=\\s*\\bfrom\\b)"), lookbehind: !0, inside: e.languages.javascript }, exports: { pattern: n("(\\bexport\\b\\s*)(?:\\*(?:\\s*as\\s+<ID>)?(?=\\s*\\bfrom\\b)|\\{[^{}]*\\})"), lookbehind: !0, inside: e.languages.javascript } }), e.languages.javascript.keyword.unshift({ pattern: /\b(?:as|default|export|from|import)\b/, alias: "module" }, { pattern: /\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/, alias: "control-flow" }, { pattern: /\bnull\b/, alias: ["null", "nil"] }, { pattern: /\bundefined\b/, alias: "nil" }), e.languages.insertBefore("javascript", "operator", { spread: { pattern: /\.{3}/, alias: "operator" }, arrow: { pattern: /=>/, alias: "operator" } }), e.languages.insertBefore("javascript", "punctuation", { "property-access": { pattern: n("(\\.\\s*)#?<ID>"), lookbehind: !0 }, "maybe-class-name": { pattern: /(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/, lookbehind: !0 }, dom: { pattern: /\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/, alias: "variable" }, console: { pattern: /\bconsole(?=\s*\.)/, alias: "class-name" } });
110
- for (var a = ["function", "function-variable", "method", "method-variable", "property-access"], c = 0; c < a.length; c++) {
111
- var o = a[c], i = e.languages.javascript[o];
112
- e.util.type(i) === "RegExp" && (i = e.languages.javascript[o] = { pattern: i });
113
- var t = i.inside || {};
114
- i.inside = t, t["maybe-class-name"] = /^[A-Z][\s\S]*/;
115
- }
116
- })(Prism)), k;
117
- }
118
- L();
119
- Prism.languages.json = { property: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, lookbehind: !0, greedy: !0 }, string: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, lookbehind: !0, greedy: !0 }, comment: { pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, punctuation: /[{}[\],]/, operator: /:/, boolean: /\b(?:false|true)\b/, null: { pattern: /\bnull\b/, alias: "keyword" } }, Prism.languages.webmanifest = Prism.languages.json;
120
- (function(e) {
121
- var n = e.util.clone(e.languages.javascript), a = "(?:\\{<S>*\\.{3}(?:[^{}]|<BRACES>)*\\})";
122
- function c(t, r) {
123
- return t = t.replace(/<S>/g, (function() {
124
- return "(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)";
125
- })).replace(/<BRACES>/g, (function() {
126
- return "(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})";
127
- })).replace(/<SPREAD>/g, (function() {
128
- return a;
129
- })), RegExp(t, r);
130
- }
131
- a = c(a).source, e.languages.jsx = e.languages.extend("markup", n), e.languages.jsx.tag.pattern = c(`</?(?:[\\w.:-]+(?:<S>+(?:[\\w.:$-]+(?:=(?:"(?:\\\\[^]|[^\\\\"])*"|'(?:\\\\[^]|[^\\\\'])*'|[^\\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*/?)?>`), e.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/, e.languages.jsx.tag.inside["attr-value"].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/, e.languages.jsx.tag.inside.tag.inside["class-name"] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/, e.languages.jsx.tag.inside.comment = n.comment, e.languages.insertBefore("inside", "attr-name", { spread: { pattern: c("<SPREAD>"), inside: e.languages.jsx } }, e.languages.jsx.tag), e.languages.insertBefore("inside", "special-attr", { script: { pattern: c("=<BRACES>"), alias: "language-javascript", inside: { "script-punctuation": { pattern: /^=(?=\{)/, alias: "punctuation" }, rest: e.languages.jsx } } }, e.languages.jsx.tag);
132
- var o = function(t) {
133
- return t ? typeof t == "string" ? t : typeof t.content == "string" ? t.content : t.content.map(o).join("") : "";
134
- }, i = function(t) {
135
- for (var r = [], s = 0; s < t.length; s++) {
136
- var l = t[s], p = !1;
137
- if (typeof l != "string" && (l.type === "tag" && l.content[0] && l.content[0].type === "tag" ? l.content[0].content[0].content === "</" ? r.length > 0 && r[r.length - 1].tagName === o(l.content[0].content[1]) && r.pop() : l.content[l.content.length - 1].content === "/>" || r.push({ tagName: o(l.content[0].content[1]), openedBraces: 0 }) : r.length > 0 && l.type === "punctuation" && l.content === "{" ? r[r.length - 1].openedBraces++ : r.length > 0 && r[r.length - 1].openedBraces > 0 && l.type === "punctuation" && l.content === "}" ? r[r.length - 1].openedBraces-- : p = !0), (p || typeof l == "string") && r.length > 0 && r[r.length - 1].openedBraces === 0) {
138
- var d = o(l);
139
- s < t.length - 1 && (typeof t[s + 1] == "string" || t[s + 1].type === "plain-text") && (d += o(t[s + 1]), t.splice(s + 1, 1)), s > 0 && (typeof t[s - 1] == "string" || t[s - 1].type === "plain-text") && (d = o(t[s - 1]) + d, t.splice(s - 1, 1), s--), t[s] = new e.Token("plain-text", d, null, d);
140
- }
141
- l.content && typeof l.content != "string" && i(l.content);
142
- }
143
- };
144
- e.hooks.add("after-tokenize", (function(t) {
145
- t.language !== "jsx" && t.language !== "tsx" || i(t.tokens);
146
- }));
147
- })(Prism);
148
- (function(e) {
149
- var n = e.util.clone(e.languages.typescript);
150
- e.languages.tsx = e.languages.extend("jsx", n), delete e.languages.tsx.parameter, delete e.languages.tsx["literal-property"];
151
- var a = e.languages.tsx.tag;
152
- a.pattern = RegExp("(^|[^\\w$]|(?=</))(?:" + a.pattern.source + ")", a.pattern.flags), a.lookbehind = !0;
1
+ import { o as e, t } from "../rolldown-runtime-CEFd7nDs.js";
2
+ import { f as n, g as r, j as i, p as a, s as o } from "../asset-wrapper-BjCXzGmC.js";
3
+ import s from "react";
4
+ import { getBlockTitle as c } from "@texonom/nutils";
5
+ import { highlightElement as l } from "prismjs";
6
+ //#endregion
7
+ //#region ../../node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-clike.min.js
8
+ var u = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
9
+ a(), t.exports = l;
10
+ function r() {
11
+ return new DOMException("The request is not allowed", "NotAllowedError");
12
+ }
13
+ function i(e) {
14
+ return o.apply(this, arguments);
15
+ }
16
+ function o() {
17
+ return o = n(function* (e) {
18
+ if (!navigator.clipboard) throw r();
19
+ return navigator.clipboard.writeText(e);
20
+ }), o.apply(this, arguments);
21
+ }
22
+ function s(e) {
23
+ return c.apply(this, arguments);
24
+ }
25
+ function c() {
26
+ return c = n(function* (e) {
27
+ let t = document.createElement("span");
28
+ t.textContent = e, t.style.whiteSpace = "pre", t.style.webkitUserSelect = "auto", t.style.userSelect = "all", document.body.appendChild(t);
29
+ let n = window.getSelection(), i = window.document.createRange();
30
+ n.removeAllRanges(), i.selectNode(t), n.addRange(i);
31
+ let a = !1;
32
+ try {
33
+ a = window.document.execCommand("copy");
34
+ } finally {
35
+ n.removeAllRanges(), window.document.body.removeChild(t);
36
+ }
37
+ if (!a) throw r();
38
+ }), c.apply(this, arguments);
39
+ }
40
+ function l(e) {
41
+ return u.apply(this, arguments);
42
+ }
43
+ function u() {
44
+ return u = n(function* (e) {
45
+ try {
46
+ yield i(e);
47
+ } catch (t) {
48
+ try {
49
+ yield s(e);
50
+ } catch (e) {
51
+ throw e || t || r();
52
+ }
53
+ }
54
+ }), u.apply(this, arguments);
55
+ }
56
+ })))(), 1);
57
+ //#endregion
58
+ //#region ../../node_modules/.pnpm/prismjs@1.30.0/node_modules/prismjs/components/prism-typescript.min.js
59
+ Prism.languages.clike = {
60
+ comment: [{
61
+ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
62
+ lookbehind: !0,
63
+ greedy: !0
64
+ }, {
65
+ pattern: /(^|[^\\:])\/\/.*/,
66
+ lookbehind: !0,
67
+ greedy: !0
68
+ }],
69
+ string: {
70
+ pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
71
+ greedy: !0
72
+ },
73
+ "class-name": {
74
+ pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,
75
+ lookbehind: !0,
76
+ inside: { punctuation: /[.\\]/ }
77
+ },
78
+ keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,
79
+ boolean: /\b(?:false|true)\b/,
80
+ function: /\b\w+(?=\()/,
81
+ number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
82
+ operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
83
+ punctuation: /[{}[\];(),.:]/
84
+ }, (function(e) {
85
+ var t, n = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;
86
+ e.languages.css.selector = {
87
+ pattern: e.languages.css.selector.pattern,
88
+ lookbehind: !0,
89
+ inside: t = {
90
+ "pseudo-element": /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,
91
+ "pseudo-class": /:[-\w]+/,
92
+ class: /\.[-\w]+/,
93
+ id: /#[-\w]+/,
94
+ attribute: {
95
+ pattern: RegExp("\\[(?:[^[\\]\"']|" + n.source + ")*\\]"),
96
+ greedy: !0,
97
+ inside: {
98
+ punctuation: /^\[|\]$/,
99
+ "case-sensitivity": {
100
+ pattern: /(\s)[si]$/i,
101
+ lookbehind: !0,
102
+ alias: "keyword"
103
+ },
104
+ namespace: {
105
+ pattern: /^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,
106
+ lookbehind: !0,
107
+ inside: { punctuation: /\|$/ }
108
+ },
109
+ "attr-name": {
110
+ pattern: /^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,
111
+ lookbehind: !0
112
+ },
113
+ "attr-value": [n, {
114
+ pattern: /(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,
115
+ lookbehind: !0
116
+ }],
117
+ operator: /[|~*^$]?=/
118
+ }
119
+ },
120
+ "n-th": [{
121
+ pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,
122
+ lookbehind: !0,
123
+ inside: {
124
+ number: /[\dn]+/,
125
+ operator: /[+-]/
126
+ }
127
+ }, {
128
+ pattern: /(\(\s*)(?:even|odd)(?=\s*\))/i,
129
+ lookbehind: !0
130
+ }],
131
+ combinator: />|\+|~|\|\|/,
132
+ punctuation: /[(),]/
133
+ }
134
+ }, e.languages.css.atrule.inside["selector-function-argument"].inside = t, e.languages.insertBefore("css", "property", { variable: {
135
+ pattern: /(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,
136
+ lookbehind: !0
137
+ } });
138
+ var r = {
139
+ pattern: /(\b\d+)(?:%|[a-z]+(?![\w-]))/,
140
+ lookbehind: !0
141
+ }, i = {
142
+ pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,
143
+ lookbehind: !0
144
+ };
145
+ e.languages.insertBefore("css", "function", {
146
+ operator: {
147
+ pattern: /(\s)[+\-*\/](?=\s)/,
148
+ lookbehind: !0
149
+ },
150
+ hexcode: {
151
+ pattern: /\B#[\da-f]{3,8}\b/i,
152
+ alias: "color"
153
+ },
154
+ color: [{
155
+ pattern: /(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,
156
+ lookbehind: !0
157
+ }, {
158
+ pattern: /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,
159
+ inside: {
160
+ unit: r,
161
+ number: i,
162
+ function: /[\w-]+(?=\()/,
163
+ punctuation: /[(),]/
164
+ }
165
+ }],
166
+ entity: /\\[\da-f]{1,8}/i,
167
+ unit: r,
168
+ number: i
169
+ });
170
+ })(Prism), (function(e) {
171
+ var t = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
172
+ e.languages.css = {
173
+ comment: /\/\*[\s\S]*?\*\//,
174
+ atrule: {
175
+ pattern: RegExp("@[\\w-](?:[^;{\\s\"']|\\s+(?!\\s)|" + t.source + ")*?(?:;|(?=\\s*\\{))"),
176
+ inside: {
177
+ rule: /^@[\w-]+/,
178
+ "selector-function-argument": {
179
+ pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,
180
+ lookbehind: !0,
181
+ alias: "selector"
182
+ },
183
+ keyword: {
184
+ pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/,
185
+ lookbehind: !0
186
+ }
187
+ }
188
+ },
189
+ url: {
190
+ pattern: RegExp("\\burl\\((?:" + t.source + "|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)", "i"),
191
+ greedy: !0,
192
+ inside: {
193
+ function: /^url/i,
194
+ punctuation: /^\(|\)$/,
195
+ string: {
196
+ pattern: RegExp("^" + t.source + "$"),
197
+ alias: "url"
198
+ }
199
+ }
200
+ },
201
+ selector: {
202
+ pattern: RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|" + t.source + ")*(?=\\s*\\{)"),
203
+ lookbehind: !0
204
+ },
205
+ string: {
206
+ pattern: t,
207
+ greedy: !0
208
+ },
209
+ property: {
210
+ pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,
211
+ lookbehind: !0
212
+ },
213
+ important: /!important\b/i,
214
+ function: {
215
+ pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,
216
+ lookbehind: !0
217
+ },
218
+ punctuation: /[(){};:,]/
219
+ }, e.languages.css.atrule.inside.rest = e.languages.css;
220
+ var n = e.languages.markup;
221
+ n && (n.tag.addInlined("style", "css"), n.tag.addAttribute("style", "css"));
222
+ })(Prism), Prism.languages.javascript = Prism.languages.extend("clike", {
223
+ "class-name": [Prism.languages.clike["class-name"], {
224
+ pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
225
+ lookbehind: !0
226
+ }],
227
+ keyword: [{
228
+ pattern: /((?:^|\})\s*)catch\b/,
229
+ lookbehind: !0
230
+ }, {
231
+ pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,
232
+ lookbehind: !0
233
+ }],
234
+ function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,
235
+ number: {
236
+ pattern: RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),
237
+ lookbehind: !0
238
+ },
239
+ operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
240
+ }), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", {
241
+ regex: {
242
+ pattern: RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"),
243
+ lookbehind: !0,
244
+ greedy: !0,
245
+ inside: {
246
+ "regex-source": {
247
+ pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
248
+ lookbehind: !0,
249
+ alias: "language-regex",
250
+ inside: Prism.languages.regex
251
+ },
252
+ "regex-delimiter": /^\/|\/$/,
253
+ "regex-flags": /^[a-z]+$/
254
+ }
255
+ },
256
+ "function-variable": {
257
+ pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
258
+ alias: "function"
259
+ },
260
+ parameter: [
261
+ {
262
+ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
263
+ lookbehind: !0,
264
+ inside: Prism.languages.javascript
265
+ },
266
+ {
267
+ pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
268
+ lookbehind: !0,
269
+ inside: Prism.languages.javascript
270
+ },
271
+ {
272
+ pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
273
+ lookbehind: !0,
274
+ inside: Prism.languages.javascript
275
+ },
276
+ {
277
+ pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
278
+ lookbehind: !0,
279
+ inside: Prism.languages.javascript
280
+ }
281
+ ],
282
+ constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
283
+ }), Prism.languages.insertBefore("javascript", "string", {
284
+ hashbang: {
285
+ pattern: /^#!.*/,
286
+ greedy: !0,
287
+ alias: "comment"
288
+ },
289
+ "template-string": {
290
+ pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
291
+ greedy: !0,
292
+ inside: {
293
+ "template-punctuation": {
294
+ pattern: /^`|`$/,
295
+ alias: "string"
296
+ },
297
+ interpolation: {
298
+ pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
299
+ lookbehind: !0,
300
+ inside: {
301
+ "interpolation-punctuation": {
302
+ pattern: /^\$\{|\}$/,
303
+ alias: "punctuation"
304
+ },
305
+ rest: Prism.languages.javascript
306
+ }
307
+ },
308
+ string: /[\s\S]+/
309
+ }
310
+ },
311
+ "string-property": {
312
+ pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,
313
+ lookbehind: !0,
314
+ greedy: !0,
315
+ alias: "property"
316
+ }
317
+ }), Prism.languages.insertBefore("javascript", "operator", { "literal-property": {
318
+ pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
319
+ lookbehind: !0,
320
+ alias: "property"
321
+ } }), Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)", "javascript")), Prism.languages.js = Prism.languages.javascript, (function(e) {
322
+ function t(e, t) {
323
+ return RegExp(e.replace(/<ID>/g, (function() {
324
+ return "(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*";
325
+ })), t);
326
+ }
327
+ e.languages.insertBefore("javascript", "function-variable", { "method-variable": {
328
+ pattern: RegExp("(\\.\\s*)" + e.languages.javascript["function-variable"].pattern.source),
329
+ lookbehind: !0,
330
+ alias: [
331
+ "function-variable",
332
+ "method",
333
+ "function",
334
+ "property-access"
335
+ ]
336
+ } }), e.languages.insertBefore("javascript", "function", { method: {
337
+ pattern: RegExp("(\\.\\s*)" + e.languages.javascript.function.source),
338
+ lookbehind: !0,
339
+ alias: ["function", "property-access"]
340
+ } }), e.languages.insertBefore("javascript", "constant", { "known-class-name": [{
341
+ pattern: /\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,
342
+ alias: "class-name"
343
+ }, {
344
+ pattern: /\b(?:[A-Z]\w*)Error\b/,
345
+ alias: "class-name"
346
+ }] }), e.languages.insertBefore("javascript", "keyword", {
347
+ imports: {
348
+ pattern: t("(\\bimport\\b\\s*)(?:<ID>(?:\\s*,\\s*(?:\\*\\s*as\\s+<ID>|\\{[^{}]*\\}))?|\\*\\s*as\\s+<ID>|\\{[^{}]*\\})(?=\\s*\\bfrom\\b)"),
349
+ lookbehind: !0,
350
+ inside: e.languages.javascript
351
+ },
352
+ exports: {
353
+ pattern: t("(\\bexport\\b\\s*)(?:\\*(?:\\s*as\\s+<ID>)?(?=\\s*\\bfrom\\b)|\\{[^{}]*\\})"),
354
+ lookbehind: !0,
355
+ inside: e.languages.javascript
356
+ }
357
+ }), e.languages.javascript.keyword.unshift({
358
+ pattern: /\b(?:as|default|export|from|import)\b/,
359
+ alias: "module"
360
+ }, {
361
+ pattern: /\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,
362
+ alias: "control-flow"
363
+ }, {
364
+ pattern: /\bnull\b/,
365
+ alias: ["null", "nil"]
366
+ }, {
367
+ pattern: /\bundefined\b/,
368
+ alias: "nil"
369
+ }), e.languages.insertBefore("javascript", "operator", {
370
+ spread: {
371
+ pattern: /\.{3}/,
372
+ alias: "operator"
373
+ },
374
+ arrow: {
375
+ pattern: /=>/,
376
+ alias: "operator"
377
+ }
378
+ }), e.languages.insertBefore("javascript", "punctuation", {
379
+ "property-access": {
380
+ pattern: t("(\\.\\s*)#?<ID>"),
381
+ lookbehind: !0
382
+ },
383
+ "maybe-class-name": {
384
+ pattern: /(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,
385
+ lookbehind: !0
386
+ },
387
+ dom: {
388
+ pattern: /\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,
389
+ alias: "variable"
390
+ },
391
+ console: {
392
+ pattern: /\bconsole(?=\s*\.)/,
393
+ alias: "class-name"
394
+ }
395
+ });
396
+ for (var n = [
397
+ "function",
398
+ "function-variable",
399
+ "method",
400
+ "method-variable",
401
+ "property-access"
402
+ ], r = 0; r < n.length; r++) {
403
+ var i = n[r], a = e.languages.javascript[i];
404
+ e.util.type(a) === "RegExp" && (a = e.languages.javascript[i] = { pattern: a });
405
+ var o = a.inside || {};
406
+ a.inside = o, o["maybe-class-name"] = /^[A-Z][\s\S]*/;
407
+ }
408
+ })(Prism), Prism.languages.json = {
409
+ property: {
410
+ pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
411
+ lookbehind: !0,
412
+ greedy: !0
413
+ },
414
+ string: {
415
+ pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
416
+ lookbehind: !0,
417
+ greedy: !0
418
+ },
419
+ comment: {
420
+ pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
421
+ greedy: !0
422
+ },
423
+ number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
424
+ punctuation: /[{}[\],]/,
425
+ operator: /:/,
426
+ boolean: /\b(?:false|true)\b/,
427
+ null: {
428
+ pattern: /\bnull\b/,
429
+ alias: "keyword"
430
+ }
431
+ }, Prism.languages.webmanifest = Prism.languages.json, (function(e) {
432
+ var t = e.util.clone(e.languages.javascript), n = "(?:\\{<S>*\\.{3}(?:[^{}]|<BRACES>)*\\})";
433
+ function r(e, t) {
434
+ return e = e.replace(/<S>/g, (function() {
435
+ return "(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)";
436
+ })).replace(/<BRACES>/g, (function() {
437
+ return "(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})";
438
+ })).replace(/<SPREAD>/g, (function() {
439
+ return n;
440
+ })), RegExp(e, t);
441
+ }
442
+ n = r(n).source, e.languages.jsx = e.languages.extend("markup", t), e.languages.jsx.tag.pattern = r("</?(?:[\\w.:-]+(?:<S>+(?:[\\w.:$-]+(?:=(?:\"(?:\\\\[^]|[^\\\\\"])*\"|'(?:\\\\[^]|[^\\\\'])*'|[^\\s{'\"/>=]+|<BRACES>))?|<SPREAD>))*<S>*/?)?>"), e.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/, e.languages.jsx.tag.inside["attr-value"].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/, e.languages.jsx.tag.inside.tag.inside["class-name"] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/, e.languages.jsx.tag.inside.comment = t.comment, e.languages.insertBefore("inside", "attr-name", { spread: {
443
+ pattern: r("<SPREAD>"),
444
+ inside: e.languages.jsx
445
+ } }, e.languages.jsx.tag), e.languages.insertBefore("inside", "special-attr", { script: {
446
+ pattern: r("=<BRACES>"),
447
+ alias: "language-javascript",
448
+ inside: {
449
+ "script-punctuation": {
450
+ pattern: /^=(?=\{)/,
451
+ alias: "punctuation"
452
+ },
453
+ rest: e.languages.jsx
454
+ }
455
+ } }, e.languages.jsx.tag);
456
+ var i = function(e) {
457
+ return e ? typeof e == "string" ? e : typeof e.content == "string" ? e.content : e.content.map(i).join("") : "";
458
+ }, a = function(t) {
459
+ for (var n = [], r = 0; r < t.length; r++) {
460
+ var o = t[r], s = !1;
461
+ if (typeof o != "string" && (o.type === "tag" && o.content[0] && o.content[0].type === "tag" ? o.content[0].content[0].content === "</" ? n.length > 0 && n[n.length - 1].tagName === i(o.content[0].content[1]) && n.pop() : o.content[o.content.length - 1].content === "/>" || n.push({
462
+ tagName: i(o.content[0].content[1]),
463
+ openedBraces: 0
464
+ }) : n.length > 0 && o.type === "punctuation" && o.content === "{" ? n[n.length - 1].openedBraces++ : n.length > 0 && n[n.length - 1].openedBraces > 0 && o.type === "punctuation" && o.content === "}" ? n[n.length - 1].openedBraces-- : s = !0), (s || typeof o == "string") && n.length > 0 && n[n.length - 1].openedBraces === 0) {
465
+ var c = i(o);
466
+ r < t.length - 1 && (typeof t[r + 1] == "string" || t[r + 1].type === "plain-text") && (c += i(t[r + 1]), t.splice(r + 1, 1)), r > 0 && (typeof t[r - 1] == "string" || t[r - 1].type === "plain-text") && (c = i(t[r - 1]) + c, t.splice(r - 1, 1), r--), t[r] = new e.Token("plain-text", c, null, c);
467
+ }
468
+ o.content && typeof o.content != "string" && a(o.content);
469
+ }
470
+ };
471
+ e.hooks.add("after-tokenize", (function(e) {
472
+ e.language !== "jsx" && e.language !== "tsx" || a(e.tokens);
473
+ }));
474
+ })(Prism), (function(e) {
475
+ var t = e.util.clone(e.languages.typescript);
476
+ e.languages.tsx = e.languages.extend("jsx", t), delete e.languages.tsx.parameter, delete e.languages.tsx["literal-property"];
477
+ var n = e.languages.tsx.tag;
478
+ n.pattern = RegExp("(^|[^\\w$]|(?=</))(?:" + n.pattern.source + ")", n.pattern.flags), n.lookbehind = !0;
479
+ })(Prism), (function(e) {
480
+ e.languages.typescript = e.languages.extend("javascript", {
481
+ "class-name": {
482
+ pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,
483
+ lookbehind: !0,
484
+ greedy: !0,
485
+ inside: null
486
+ },
487
+ builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/
488
+ }), e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/, /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, /\btype\b(?=\s*(?:[\{*]|$))/), delete e.languages.typescript.parameter, delete e.languages.typescript["literal-property"];
489
+ var t = e.languages.extend("typescript", {});
490
+ delete t["class-name"], e.languages.typescript["class-name"].inside = t, e.languages.insertBefore("typescript", "function", {
491
+ decorator: {
492
+ pattern: /@[$\w\xA0-\uFFFF]+/,
493
+ inside: {
494
+ at: {
495
+ pattern: /^@/,
496
+ alias: "operator"
497
+ },
498
+ function: /^[\s\S]+/
499
+ }
500
+ },
501
+ "generic-function": {
502
+ pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,
503
+ greedy: !0,
504
+ inside: {
505
+ function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,
506
+ generic: {
507
+ pattern: /<[\s\S]+/,
508
+ alias: "class-name",
509
+ inside: t
510
+ }
511
+ }
512
+ }
513
+ }), e.languages.ts = e.languages.typescript;
153
514
  })(Prism);
154
- var A = {}, S;
155
- function Z() {
156
- return S || (S = 1, (function(e) {
157
- e.languages.typescript = e.languages.extend("javascript", { "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/, lookbehind: !0, greedy: !0, inside: null }, builtin: /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/ }), e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/, /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, /\btype\b(?=\s*(?:[\{*]|$))/), delete e.languages.typescript.parameter, delete e.languages.typescript["literal-property"];
158
- var n = e.languages.extend("typescript", {});
159
- delete n["class-name"], e.languages.typescript["class-name"].inside = n, e.languages.insertBefore("typescript", "function", { decorator: { pattern: /@[$\w\xA0-\uFFFF]+/, inside: { at: { pattern: /^@/, alias: "operator" }, function: /^[\s\S]+/ } }, "generic-function": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/, greedy: !0, inside: { function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/, generic: { pattern: /<[\s\S]+/, alias: "class-name", inside: n } } } }), e.languages.ts = e.languages.typescript;
160
- })(Prism)), A;
515
+ //#endregion
516
+ //#region src/icons/copy.tsx
517
+ function d(e) {
518
+ return /* @__PURE__ */ s.createElement("svg", i({
519
+ fill: "currentColor",
520
+ viewBox: "0 0 16 16",
521
+ width: "1em",
522
+ version: "1.1"
523
+ }, e), /* @__PURE__ */ s.createElement("path", {
524
+ fillRule: "evenodd",
525
+ d: "M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"
526
+ }), /* @__PURE__ */ s.createElement("path", {
527
+ fillRule: "evenodd",
528
+ d: "M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"
529
+ }));
161
530
  }
162
- Z();
163
- function q(e) {
164
- return /* @__PURE__ */ u.createElement("svg", w({ fill: "currentColor", viewBox: "0 0 16 16", width: "1em", version: "1.1" }, e), /* @__PURE__ */ u.createElement(
165
- "path",
166
- {
167
- fillRule: "evenodd",
168
- d: "M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"
169
- }
170
- ), /* @__PURE__ */ u.createElement(
171
- "path",
172
- {
173
- fillRule: "evenodd",
174
- d: "M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"
175
- }
176
- ));
177
- }
178
- const J = ({ block: e, defaultLanguage: n = "typescript", className: a }) => {
179
- var F, b, f;
180
- const [c, o] = u.useState(!1), i = u.useRef(null), { recordMap: t } = _(), r = R(e, t), s = (((f = (b = (F = e.properties) == null ? void 0 : F.language) == null ? void 0 : b[0]) == null ? void 0 : f[0]) || n).toLowerCase(), l = e.properties.caption, p = u.useRef(null);
181
- u.useEffect(() => {
182
- if (p.current)
183
- try {
184
- D(p.current);
185
- } catch (B) {
186
- console.warn("prismjs highlight error", B);
187
- }
188
- }, [p]);
189
- const d = u.useCallback(() => {
190
- T(r), o(!0), i.current && (clearTimeout(i.current), i.current = null), i.current = setTimeout(() => {
191
- o(!1);
192
- }, 1200);
193
- }, [r, i]), $ = /* @__PURE__ */ u.createElement("div", { className: "notion-code-copy-button", onClick: d }, /* @__PURE__ */ u.createElement(q, null));
194
- return /* @__PURE__ */ u.createElement(u.Fragment, null, /* @__PURE__ */ u.createElement("pre", { className: `notion-code ${a || ""}` }, /* @__PURE__ */ u.createElement("div", { className: "notion-code-copy" }, $, c && /* @__PURE__ */ u.createElement("div", { className: "notion-code-copy-tooltip" }, /* @__PURE__ */ u.createElement("div", null, c ? "Copied" : "Copy"))), /* @__PURE__ */ u.createElement("code", { className: `language-${s}`, ref: p }, r)), l && /* @__PURE__ */ u.createElement("figcaption", { className: "notion-asset-caption" }, /* @__PURE__ */ u.createElement(G, { value: l, block: e })));
195
- };
196
- export {
197
- J as Code
531
+ //#endregion
532
+ //#region src/third-party/code.tsx
533
+ var f = ({ block: e, defaultLanguage: t = "typescript", className: n }) => {
534
+ var i;
535
+ let [a, f] = s.useState(!1), p = s.useRef(null), { recordMap: m } = o(), h = c(e, m), g = (((i = e.properties) == null || (i = i.language) == null || (i = i[0]) == null ? void 0 : i[0]) || t).toLowerCase(), _ = e.properties.caption, v = s.useRef(null);
536
+ s.useEffect(() => {
537
+ if (v.current) try {
538
+ l(v.current);
539
+ } catch (e) {
540
+ console.warn("prismjs highlight error", e);
541
+ }
542
+ }, [v]);
543
+ let y = s.useCallback(() => {
544
+ (0, u.default)(h), f(!0), p.current && (clearTimeout(p.current), p.current = null), p.current = setTimeout(() => {
545
+ f(!1);
546
+ }, 1200);
547
+ }, [h, p]), b = /* @__PURE__ */ s.createElement("div", {
548
+ className: "notion-code-copy-button",
549
+ onClick: y
550
+ }, /* @__PURE__ */ s.createElement(d, null));
551
+ return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement("pre", { className: `notion-code ${n || ""}` }, /* @__PURE__ */ s.createElement("div", { className: "notion-code-copy" }, b, a && /* @__PURE__ */ s.createElement("div", { className: "notion-code-copy-tooltip" }, /* @__PURE__ */ s.createElement("div", null, a ? "Copied" : "Copy"))), /* @__PURE__ */ s.createElement("code", {
552
+ className: `language-${g}`,
553
+ ref: v
554
+ }, h)), _ && /* @__PURE__ */ s.createElement("figcaption", { className: "notion-asset-caption" }, /* @__PURE__ */ s.createElement(r, {
555
+ value: _,
556
+ block: e
557
+ })));
198
558
  };
199
- //# sourceMappingURL=code.js.map
559
+ //#endregion
560
+ export { f as Code };
561
+
562
+ //# sourceMappingURL=code.js.map