@adyen/bento-vue3 1.8.0 → 1.9.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/@types/packages/vue2/src/components/data-grid/composables/useKeyboardNavigator/useKeyboardNavigator.d.ts +6 -2
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useScroller/useScroller.d.ts +6 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +23 -422
- package/dist/@types/packages/vue2/src/components/divider/divider.vue.d.ts +1 -5
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-default-textbox/dropdown-default-textbox.vue.d.ts +10 -0
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +12 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/input-field/input-field.types.d.ts +1 -3
- package/dist/@types/packages/vue2/src/components/internal/field-label/field-label.vue.d.ts +9 -0
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +4 -4
- package/dist/alert.js +58 -59
- package/dist/alert.js.map +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/copy.css +1 -1
- package/dist/assets/cross.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/field-label.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/listbox.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/button.js +3 -3
- package/dist/card.js +2 -2
- package/dist/checkbox.js +5 -5
- package/dist/chunks/arrow-left.81a91b8f.js +29 -0
- package/dist/chunks/arrow-left.81a91b8f.js.map +1 -0
- package/dist/chunks/{base-modal.3dcf8376.js → base-modal.a629cb32.js} +3 -3
- package/dist/chunks/{base-modal.3dcf8376.js.map → base-modal.a629cb32.js.map} +1 -1
- package/dist/chunks/{button-actions-with-menu.3f52ea2d.js → button-actions-with-menu.f6dfb14d.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.3f52ea2d.js.map → button-actions-with-menu.f6dfb14d.js.map} +1 -1
- package/dist/chunks/{calendar.d4ab387d.js → calendar.fa7712e8.js} +2 -2
- package/dist/chunks/{calendar.d4ab387d.js.map → calendar.fa7712e8.js.map} +1 -1
- package/dist/chunks/{checkbox.03c4b0fe.js → checkbox.731dc0ab.js} +71 -72
- package/dist/chunks/checkbox.731dc0ab.js.map +1 -0
- package/dist/chunks/checkmark-circle-fill.c45a999d.js +44 -0
- package/dist/chunks/checkmark-circle-fill.c45a999d.js.map +1 -0
- package/dist/chunks/checkmark-small.c79220d9.js +29 -0
- package/dist/chunks/checkmark-small.c79220d9.js.map +1 -0
- package/dist/chunks/checkmark.eb3c7a06.js +29 -0
- package/dist/chunks/checkmark.eb3c7a06.js.map +1 -0
- package/dist/chunks/chevron-left.4ee92950.js +52 -0
- package/dist/chunks/chevron-left.4ee92950.js.map +1 -0
- package/dist/chunks/chevron-up.46afb34c.js +52 -0
- package/dist/chunks/chevron-up.46afb34c.js.map +1 -0
- package/dist/chunks/{controls-group.807b5fb0.js → controls-group.d6543674.js} +2 -2
- package/dist/chunks/{controls-group.807b5fb0.js.map → controls-group.d6543674.js.map} +1 -1
- package/dist/chunks/{copy.28bd4298.js → copy.330d594e.js} +36 -37
- package/dist/chunks/copy.330d594e.js.map +1 -0
- package/dist/chunks/cross-circle-fill.1abec1a2.js +44 -0
- package/dist/chunks/cross-circle-fill.1abec1a2.js.map +1 -0
- package/dist/chunks/cross.26509efc.js +29 -0
- package/dist/chunks/cross.26509efc.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.74c4584a.js → dropdown-default-textbox.4108b289.js} +63 -58
- package/dist/chunks/{dropdown-default-textbox.74c4584a.js.map → dropdown-default-textbox.4108b289.js.map} +1 -1
- package/dist/chunks/{dropdown.502e1f5c.js → dropdown.63de9aac.js} +209 -201
- package/dist/chunks/dropdown.63de9aac.js.map +1 -0
- package/dist/chunks/field-label.3c19a29a.js +146 -0
- package/dist/chunks/field-label.3c19a29a.js.map +1 -0
- package/dist/chunks/{fixed-scroller.92bb77a6.js → fixed-scroller.bced60dd.js} +2 -2
- package/dist/chunks/{fixed-scroller.92bb77a6.js.map → fixed-scroller.bced60dd.js.map} +1 -1
- package/dist/chunks/{index.cf0d3be3.js → index.4d2a13e1.js} +2 -2
- package/dist/chunks/{index.cf0d3be3.js.map → index.4d2a13e1.js.map} +1 -1
- package/dist/chunks/{index.d2542c6a.js → index.73ed22a7.js} +145 -150
- package/dist/chunks/index.73ed22a7.js.map +1 -0
- package/dist/chunks/{index.7262642e.js → index.85832db5.js} +3 -3
- package/dist/chunks/{index.7262642e.js.map → index.85832db5.js.map} +1 -1
- package/dist/chunks/{index.abb2a1d5.js → index.89dfe209.js} +2 -2
- package/dist/chunks/{index.abb2a1d5.js.map → index.89dfe209.js.map} +1 -1
- package/dist/chunks/{index.726e2f3c.js → index.98174339.js} +4 -4
- package/dist/chunks/{index.726e2f3c.js.map → index.98174339.js.map} +1 -1
- package/dist/chunks/{index.e9156fe3.js → index.c6fecf1c.js} +7 -7
- package/dist/chunks/{index.e9156fe3.js.map → index.c6fecf1c.js.map} +1 -1
- package/dist/chunks/{index.b043371e.js → index.edcaf766.js} +5 -5
- package/dist/chunks/{index.b043371e.js.map → index.edcaf766.js.map} +1 -1
- package/dist/chunks/info-filled.e591599f.js +67 -0
- package/dist/chunks/info-filled.e591599f.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.5b00c85f.js → listbox-option-tag.b1eb32bd.js} +2 -2
- package/dist/chunks/{listbox-option-tag.5b00c85f.js.map → listbox-option-tag.b1eb32bd.js.map} +1 -1
- package/dist/chunks/{listbox.d07c24e6.js → listbox.ac43f8ab.js} +39 -36
- package/dist/chunks/{listbox.d07c24e6.js.map → listbox.ac43f8ab.js.map} +1 -1
- package/dist/chunks/{loading-button.ad7cfaee.js → loading-button.4b88e24d.js} +3 -3
- package/dist/chunks/{loading-button.ad7cfaee.js.map → loading-button.4b88e24d.js.map} +1 -1
- package/dist/chunks/refresh.bd60f6a8.js +29 -0
- package/dist/chunks/refresh.bd60f6a8.js.map +1 -0
- package/dist/chunks/search.ade93bda.js +44 -0
- package/dist/chunks/search.ade93bda.js.map +1 -0
- package/dist/chunks/{tooltip.054d2eb6.js → tooltip.27c32d36.js} +2 -2
- package/dist/chunks/{tooltip.054d2eb6.js.map → tooltip.27c32d36.js.map} +1 -1
- package/dist/code-snippet.js +425 -428
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +1 -1
- package/dist/data-grid.js +1080 -1140
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +6 -6
- package/dist/date-range-picker.js +2 -2
- package/dist/divider.js +9 -26
- package/dist/divider.js.map +1 -1
- package/dist/dropdown.js +3 -3
- package/dist/empty-state.js +1 -1
- package/dist/filter-bar.js +1035 -836
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +1 -1
- package/dist/header.js +2 -2
- package/dist/index.js +12 -12
- package/dist/info-icon.js +38 -39
- package/dist/info-icon.js.map +1 -1
- package/dist/input-field.js +105 -107
- package/dist/input-field.js.map +1 -1
- package/dist/internal.js +7 -7
- package/dist/link.js +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +1 -1
- package/dist/pagination.js +149 -157
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +2 -2
- package/dist/payment-method.js.map +1 -1
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +3 -3
- package/dist/search-bar.js +4 -4
- package/dist/segmented-control.js +3 -3
- package/dist/sidepanel.js +4 -4
- package/dist/status.js +1 -1
- package/dist/stepper.js +78 -79
- package/dist/stepper.js.map +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +2 -2
- package/dist/tabs.js +2 -2
- package/dist/tag.js +2 -2
- package/dist/textarea.js +46 -47
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +92 -93
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +2 -2
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +86 -87
- package/dist/tutorial.js.map +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +4 -4
- package/dist/assets/arrow-left.css +0 -1
- package/dist/assets/checkmark-circle-fill.css +0 -1
- package/dist/assets/checkmark-small.css +0 -1
- package/dist/assets/checkmark.css +0 -1
- package/dist/assets/chevron-left.css +0 -1
- package/dist/assets/chevron-up.css +0 -1
- package/dist/assets/cross-circle-fill.css +0 -1
- package/dist/assets/info-filled.css +0 -1
- package/dist/assets/refresh.css +0 -1
- package/dist/assets/search.css +0 -1
- package/dist/chunks/arrow-left.cdbcc128.js +0 -30
- package/dist/chunks/arrow-left.cdbcc128.js.map +0 -1
- package/dist/chunks/checkbox.03c4b0fe.js.map +0 -1
- package/dist/chunks/checkmark-circle-fill.e6b84561.js +0 -45
- package/dist/chunks/checkmark-circle-fill.e6b84561.js.map +0 -1
- package/dist/chunks/checkmark-small.3e93a119.js +0 -30
- package/dist/chunks/checkmark-small.3e93a119.js.map +0 -1
- package/dist/chunks/checkmark.83e4f1e0.js +0 -30
- package/dist/chunks/checkmark.83e4f1e0.js.map +0 -1
- package/dist/chunks/chevron-left.2fd6b083.js +0 -54
- package/dist/chunks/chevron-left.2fd6b083.js.map +0 -1
- package/dist/chunks/chevron-up.9bf21068.js +0 -54
- package/dist/chunks/chevron-up.9bf21068.js.map +0 -1
- package/dist/chunks/copy.28bd4298.js.map +0 -1
- package/dist/chunks/cross-circle-fill.0feb37b3.js +0 -45
- package/dist/chunks/cross-circle-fill.0feb37b3.js.map +0 -1
- package/dist/chunks/cross.5c36a670.js +0 -30
- package/dist/chunks/cross.5c36a670.js.map +0 -1
- package/dist/chunks/dropdown.502e1f5c.js.map +0 -1
- package/dist/chunks/field-label.61679178.js +0 -132
- package/dist/chunks/field-label.61679178.js.map +0 -1
- package/dist/chunks/index.d2542c6a.js.map +0 -1
- package/dist/chunks/info-filled.514a2db6.js +0 -69
- package/dist/chunks/info-filled.514a2db6.js.map +0 -1
- package/dist/chunks/refresh.c38c9eee.js +0 -30
- package/dist/chunks/refresh.c38c9eee.js.map +0 -1
- package/dist/chunks/search.d18f9657.js +0 -45
- package/dist/chunks/search.d18f9657.js.map +0 -1
package/dist/code-snippet.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { openBlock as z, createElementBlock as le, mergeProps as qe, toDisplayString as Ae, createCommentVNode as q,
|
|
2
|
-
import { highlightActiveLine as
|
|
3
|
-
import { Compartment as Ne, EditorState as
|
|
4
|
-
import { indentWithTab as
|
|
5
|
-
import { syntaxHighlighting as
|
|
6
|
-
import { json as
|
|
7
|
-
import { xml as
|
|
8
|
-
import { javascript as
|
|
9
|
-
import { java as
|
|
10
|
-
import { B as
|
|
11
|
-
import { f as
|
|
12
|
-
import { a as
|
|
13
|
-
import { B as
|
|
14
|
-
import { b as wt } from "./chunks/tooltip.
|
|
15
|
-
import { BentoLoadingIndicator as
|
|
16
|
-
import { u as
|
|
17
|
-
import { _ as
|
|
18
|
-
import { C as
|
|
19
|
-
import "./assets/
|
|
20
|
-
const
|
|
21
|
-
let
|
|
1
|
+
import { openBlock as z, createElementBlock as le, mergeProps as qe, toDisplayString as Ae, createCommentVNode as q, createElementVNode as ae, defineComponent as Ye, ref as ge, computed as ue, shallowRef as Te, onMounted as et, watch as tt, watchEffect as nt, resolveComponent as K, normalizeClass as $e, createBlock as oe, createVNode as me, withCtx as fe, createTextVNode as He, renderSlot as rt, normalizeProps as it, guardReactiveProps as st, pushScopeId as ot, popScopeId as lt } from "vue";
|
|
2
|
+
import { highlightActiveLine as at, keymap as ut, EditorView as Ve, lineNumbers as ft } from "@codemirror/view";
|
|
3
|
+
import { Compartment as Ne, EditorState as je } from "@codemirror/state";
|
|
4
|
+
import { indentWithTab as ht, history as dt } from "@codemirror/commands";
|
|
5
|
+
import { syntaxHighlighting as ct, HighlightStyle as pt } from "@codemirror/language";
|
|
6
|
+
import { json as gt } from "@codemirror/lang-json";
|
|
7
|
+
import { xml as mt } from "@codemirror/lang-xml";
|
|
8
|
+
import { javascript as bt } from "@codemirror/lang-javascript";
|
|
9
|
+
import { java as yt } from "@codemirror/lang-java";
|
|
10
|
+
import { B as xt } from "./chunks/dropdown.63de9aac.js";
|
|
11
|
+
import { f as kt } from "./chunks/base-modal.a629cb32.js";
|
|
12
|
+
import { a as _t } from "./chunks/button.82ed953e.js";
|
|
13
|
+
import { B as vt } from "./chunks/index.75f3672e.js";
|
|
14
|
+
import { b as wt } from "./chunks/tooltip.27c32d36.js";
|
|
15
|
+
import { BentoLoadingIndicator as Ct } from "./loading-indicator.js";
|
|
16
|
+
import { u as Nt } from "./chunks/i18n.6c402773.js";
|
|
17
|
+
import { _ as Fe } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
18
|
+
import { C as St } from "./chunks/copy.330d594e.js";
|
|
19
|
+
import "./assets/index10.css";
|
|
20
|
+
const At = 1024;
|
|
21
|
+
let It = 0;
|
|
22
22
|
class v {
|
|
23
23
|
/**
|
|
24
24
|
Create a new node prop type.
|
|
25
25
|
*/
|
|
26
26
|
constructor(e = {}) {
|
|
27
|
-
this.id =
|
|
27
|
+
this.id = It++, this.perNode = !!e.perNode, this.deserialize = e.deserialize || (() => {
|
|
28
28
|
throw new Error("This node type doesn't define a deserialize function");
|
|
29
29
|
});
|
|
30
30
|
}
|
|
@@ -41,25 +41,25 @@ class v {
|
|
|
41
41
|
if (this.perNode)
|
|
42
42
|
throw new RangeError("Can't add per-node props to node types");
|
|
43
43
|
return typeof e != "function" && (e = G.match(e)), (t) => {
|
|
44
|
-
let
|
|
45
|
-
return
|
|
44
|
+
let n = e(t);
|
|
45
|
+
return n === void 0 ? null : [this, n];
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
v.closedBy = new v({ deserialize: (
|
|
50
|
-
v.openedBy = new v({ deserialize: (
|
|
51
|
-
v.group = new v({ deserialize: (
|
|
52
|
-
v.isolate = new v({ deserialize: (
|
|
53
|
-
if (
|
|
54
|
-
throw new RangeError("Invalid value for isolate: " +
|
|
55
|
-
return
|
|
49
|
+
v.closedBy = new v({ deserialize: (r) => r.split(" ") });
|
|
50
|
+
v.openedBy = new v({ deserialize: (r) => r.split(" ") });
|
|
51
|
+
v.group = new v({ deserialize: (r) => r.split(" ") });
|
|
52
|
+
v.isolate = new v({ deserialize: (r) => {
|
|
53
|
+
if (r && r != "rtl" && r != "ltr" && r != "auto")
|
|
54
|
+
throw new RangeError("Invalid value for isolate: " + r);
|
|
55
|
+
return r || "auto";
|
|
56
56
|
} });
|
|
57
57
|
v.contextHash = new v({ perNode: !0 });
|
|
58
58
|
v.lookAhead = new v({ perNode: !0 });
|
|
59
59
|
v.mounted = new v({ perNode: !0 });
|
|
60
|
-
class
|
|
61
|
-
constructor(e, t,
|
|
62
|
-
this.tree = e, this.overlay = t, this.parser =
|
|
60
|
+
class we {
|
|
61
|
+
constructor(e, t, n) {
|
|
62
|
+
this.tree = e, this.overlay = t, this.parser = n;
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
65
|
@internal
|
|
@@ -73,14 +73,14 @@ class G {
|
|
|
73
73
|
/**
|
|
74
74
|
@internal
|
|
75
75
|
*/
|
|
76
|
-
constructor(e, t,
|
|
77
|
-
this.name = e, this.props = t, this.id =
|
|
76
|
+
constructor(e, t, n, i = 0) {
|
|
77
|
+
this.name = e, this.props = t, this.id = n, this.flags = i;
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
80
80
|
Define a node type.
|
|
81
81
|
*/
|
|
82
82
|
static define(e) {
|
|
83
|
-
let t = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : Lt,
|
|
83
|
+
let t = e.props && e.props.length ? /* @__PURE__ */ Object.create(null) : Lt, n = (e.top ? 1 : 0) | (e.skipped ? 2 : 0) | (e.error ? 4 : 0) | (e.name == null ? 8 : 0), i = new G(e.name || "", t, e.id, n);
|
|
84
84
|
if (e.props) {
|
|
85
85
|
for (let s of e.props)
|
|
86
86
|
if (Array.isArray(s) || (s = s(i)), s) {
|
|
@@ -146,12 +146,12 @@ class G {
|
|
|
146
146
|
*/
|
|
147
147
|
static match(e) {
|
|
148
148
|
let t = /* @__PURE__ */ Object.create(null);
|
|
149
|
-
for (let
|
|
150
|
-
for (let i of
|
|
151
|
-
t[i] = e[
|
|
152
|
-
return (
|
|
153
|
-
for (let i =
|
|
154
|
-
let o = t[s < 0 ?
|
|
149
|
+
for (let n in e)
|
|
150
|
+
for (let i of n.split(" "))
|
|
151
|
+
t[i] = e[n];
|
|
152
|
+
return (n) => {
|
|
153
|
+
for (let i = n.prop(v.group), s = -1; s < (i ? i.length : 0); s++) {
|
|
154
|
+
let o = t[s < 0 ? n.name : i[s]];
|
|
155
155
|
if (o)
|
|
156
156
|
return o;
|
|
157
157
|
}
|
|
@@ -167,15 +167,15 @@ G.none = new G(
|
|
|
167
167
|
);
|
|
168
168
|
const be = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap();
|
|
169
169
|
var I;
|
|
170
|
-
(function(
|
|
171
|
-
|
|
170
|
+
(function(r) {
|
|
171
|
+
r[r.ExcludeBuffers = 1] = "ExcludeBuffers", r[r.IncludeAnonymous = 2] = "IncludeAnonymous", r[r.IgnoreMounts = 4] = "IgnoreMounts", r[r.IgnoreOverlays = 8] = "IgnoreOverlays";
|
|
172
172
|
})(I || (I = {}));
|
|
173
173
|
class R {
|
|
174
174
|
/**
|
|
175
175
|
Construct a new tree. See also [`Tree.build`](#common.Tree^build).
|
|
176
176
|
*/
|
|
177
|
-
constructor(e, t,
|
|
178
|
-
if (this.type = e, this.children = t, this.positions =
|
|
177
|
+
constructor(e, t, n, i, s) {
|
|
178
|
+
if (this.type = e, this.children = t, this.positions = n, this.length = i, this.props = null, s && s.length) {
|
|
179
179
|
this.props = /* @__PURE__ */ Object.create(null);
|
|
180
180
|
for (let [o, u] of s)
|
|
181
181
|
this.props[typeof o == "number" ? o : o.id] = u;
|
|
@@ -185,12 +185,12 @@ class R {
|
|
|
185
185
|
@internal
|
|
186
186
|
*/
|
|
187
187
|
toString() {
|
|
188
|
-
let e =
|
|
188
|
+
let e = we.get(this);
|
|
189
189
|
if (e && !e.overlay)
|
|
190
190
|
return e.tree.toString();
|
|
191
191
|
let t = "";
|
|
192
|
-
for (let
|
|
193
|
-
let i =
|
|
192
|
+
for (let n of this.children) {
|
|
193
|
+
let i = n.toString();
|
|
194
194
|
i && (t && (t += ","), t += i);
|
|
195
195
|
}
|
|
196
196
|
return this.type.name ? (/\W/.test(this.type.name) && !this.type.isError ? JSON.stringify(this.type.name) : this.type.name) + (t.length ? "(" + t + ")" : "") : t;
|
|
@@ -201,15 +201,15 @@ class R {
|
|
|
201
201
|
nodes the cursor visits.
|
|
202
202
|
*/
|
|
203
203
|
cursor(e = 0) {
|
|
204
|
-
return new
|
|
204
|
+
return new Le(this.topNode, e);
|
|
205
205
|
}
|
|
206
206
|
/**
|
|
207
207
|
Get a [tree cursor](#common.TreeCursor) pointing into this tree
|
|
208
208
|
at the given position and side (see
|
|
209
209
|
[`moveTo`](#common.TreeCursor.moveTo).
|
|
210
210
|
*/
|
|
211
|
-
cursorAt(e, t = 0,
|
|
212
|
-
let i = be.get(this) || this.topNode, s = new
|
|
211
|
+
cursorAt(e, t = 0, n = 0) {
|
|
212
|
+
let i = be.get(this) || this.topNode, s = new Le(i);
|
|
213
213
|
return s.moveTo(e, t), be.set(this, s._tree), s;
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
@@ -231,8 +231,8 @@ class R {
|
|
|
231
231
|
[`resolveInner`](#common.Tree.resolveInner) instead.
|
|
232
232
|
*/
|
|
233
233
|
resolve(e, t = 0) {
|
|
234
|
-
let
|
|
235
|
-
return be.set(this,
|
|
234
|
+
let n = ce(be.get(this) || this.topNode, e, t, !1);
|
|
235
|
+
return be.set(this, n), n;
|
|
236
236
|
}
|
|
237
237
|
/**
|
|
238
238
|
Like [`resolve`](#common.Tree.resolve), but will enter
|
|
@@ -242,8 +242,8 @@ class R {
|
|
|
242
242
|
the host trees).
|
|
243
243
|
*/
|
|
244
244
|
resolveInner(e, t = 0) {
|
|
245
|
-
let
|
|
246
|
-
return Re.set(this,
|
|
245
|
+
let n = ce(Re.get(this) || this.topNode, e, t, !0);
|
|
246
|
+
return Re.set(this, n), n;
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
249
249
|
In some situations, it can be useful to iterate through all
|
|
@@ -253,7 +253,7 @@ class R {
|
|
|
253
253
|
position.
|
|
254
254
|
*/
|
|
255
255
|
resolveStack(e, t = 0) {
|
|
256
|
-
return
|
|
256
|
+
return zt(this, e, t);
|
|
257
257
|
}
|
|
258
258
|
/**
|
|
259
259
|
Iterate over the tree and its children, calling `enter` for any
|
|
@@ -263,7 +263,7 @@ class R {
|
|
|
263
263
|
not have its children iterated over (or `leave` called).
|
|
264
264
|
*/
|
|
265
265
|
iterate(e) {
|
|
266
|
-
let { enter: t, leave:
|
|
266
|
+
let { enter: t, leave: n, from: i = 0, to: s = this.length } = e, o = e.mode || 0, u = (o & I.IncludeAnonymous) > 0;
|
|
267
267
|
for (let h = this.cursor(o | I.IncludeAnonymous); ; ) {
|
|
268
268
|
let x = !1;
|
|
269
269
|
if (h.from <= s && h.to >= i && (!u && h.type.isAnonymous || t(h) !== !1)) {
|
|
@@ -271,7 +271,7 @@ class R {
|
|
|
271
271
|
continue;
|
|
272
272
|
x = !0;
|
|
273
273
|
}
|
|
274
|
-
for (; x &&
|
|
274
|
+
for (; x && n && (u || !h.type.isAnonymous) && n(h), !h.nextSibling(); ) {
|
|
275
275
|
if (!h.parent())
|
|
276
276
|
return;
|
|
277
277
|
x = !0;
|
|
@@ -303,14 +303,14 @@ class R {
|
|
|
303
303
|
[`NodeType.none`](#common.NodeType^none).
|
|
304
304
|
*/
|
|
305
305
|
balance(e = {}) {
|
|
306
|
-
return this.children.length <= 8 ? this : Ee(G.none, this.children, this.positions, 0, this.children.length, 0, this.length, (t,
|
|
306
|
+
return this.children.length <= 8 ? this : Ee(G.none, this.children, this.positions, 0, this.children.length, 0, this.length, (t, n, i) => new R(this.type, t, n, i, this.propValues), e.makeTree || ((t, n, i) => new R(G.none, t, n, i)));
|
|
307
307
|
}
|
|
308
308
|
/**
|
|
309
309
|
Build a tree from a postfix-ordered buffer of node information,
|
|
310
310
|
or a cursor over such a buffer.
|
|
311
311
|
*/
|
|
312
312
|
static build(e) {
|
|
313
|
-
return
|
|
313
|
+
return Et(e);
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
R.empty = new R(G.none, [], [], 0);
|
|
@@ -344,8 +344,8 @@ class Q {
|
|
|
344
344
|
/**
|
|
345
345
|
Create a tree buffer.
|
|
346
346
|
*/
|
|
347
|
-
constructor(e, t,
|
|
348
|
-
this.buffer = e, this.length = t, this.set =
|
|
347
|
+
constructor(e, t, n) {
|
|
348
|
+
this.buffer = e, this.length = t, this.set = n;
|
|
349
349
|
}
|
|
350
350
|
/**
|
|
351
351
|
@internal
|
|
@@ -366,80 +366,80 @@ class Q {
|
|
|
366
366
|
@internal
|
|
367
367
|
*/
|
|
368
368
|
childString(e) {
|
|
369
|
-
let t = this.buffer[e],
|
|
370
|
-
if (/\W/.test(s) && !i.isError && (s = JSON.stringify(s)), e += 4,
|
|
369
|
+
let t = this.buffer[e], n = this.buffer[e + 3], i = this.set.types[t], s = i.name;
|
|
370
|
+
if (/\W/.test(s) && !i.isError && (s = JSON.stringify(s)), e += 4, n == e)
|
|
371
371
|
return s;
|
|
372
372
|
let o = [];
|
|
373
|
-
for (; e <
|
|
373
|
+
for (; e < n; )
|
|
374
374
|
o.push(this.childString(e)), e = this.buffer[e + 3];
|
|
375
375
|
return s + "(" + o.join(",") + ")";
|
|
376
376
|
}
|
|
377
377
|
/**
|
|
378
378
|
@internal
|
|
379
379
|
*/
|
|
380
|
-
findChild(e, t,
|
|
380
|
+
findChild(e, t, n, i, s) {
|
|
381
381
|
let { buffer: o } = this, u = -1;
|
|
382
|
-
for (let h = e; h != t && !(
|
|
382
|
+
for (let h = e; h != t && !(Xe(s, i, o[h + 1], o[h + 2]) && (u = h, n > 0)); h = o[h + 3])
|
|
383
383
|
;
|
|
384
384
|
return u;
|
|
385
385
|
}
|
|
386
386
|
/**
|
|
387
387
|
@internal
|
|
388
388
|
*/
|
|
389
|
-
slice(e, t,
|
|
389
|
+
slice(e, t, n) {
|
|
390
390
|
let i = this.buffer, s = new Uint16Array(t - e), o = 0;
|
|
391
391
|
for (let u = e, h = 0; u < t; ) {
|
|
392
|
-
s[h++] = i[u++], s[h++] = i[u++] -
|
|
393
|
-
let x = s[h++] = i[u++] -
|
|
392
|
+
s[h++] = i[u++], s[h++] = i[u++] - n;
|
|
393
|
+
let x = s[h++] = i[u++] - n;
|
|
394
394
|
s[h++] = i[u++] - e, o = Math.max(o, x);
|
|
395
395
|
}
|
|
396
396
|
return new Q(s, o, this.set);
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
|
-
function
|
|
400
|
-
switch (
|
|
399
|
+
function Xe(r, e, t, n) {
|
|
400
|
+
switch (r) {
|
|
401
401
|
case -2:
|
|
402
402
|
return t < e;
|
|
403
403
|
case -1:
|
|
404
|
-
return
|
|
404
|
+
return n >= e && t < e;
|
|
405
405
|
case 0:
|
|
406
|
-
return t < e &&
|
|
406
|
+
return t < e && n > e;
|
|
407
407
|
case 1:
|
|
408
|
-
return t <= e &&
|
|
408
|
+
return t <= e && n > e;
|
|
409
409
|
case 2:
|
|
410
|
-
return
|
|
410
|
+
return n > e;
|
|
411
411
|
case 4:
|
|
412
412
|
return !0;
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
function ce(
|
|
416
|
-
for (var i;
|
|
417
|
-
let o = !
|
|
415
|
+
function ce(r, e, t, n) {
|
|
416
|
+
for (var i; r.from == r.to || (t < 1 ? r.from >= e : r.from > e) || (t > -1 ? r.to <= e : r.to < e); ) {
|
|
417
|
+
let o = !n && r instanceof E && r.index < 0 ? null : r.parent;
|
|
418
418
|
if (!o)
|
|
419
|
-
return
|
|
420
|
-
|
|
419
|
+
return r;
|
|
420
|
+
r = o;
|
|
421
421
|
}
|
|
422
|
-
let s =
|
|
423
|
-
if (
|
|
424
|
-
for (let o =
|
|
425
|
-
o instanceof E && o.index < 0 && ((i = u.enter(e, t, s)) === null || i === void 0 ? void 0 : i.from) != o.from && (
|
|
422
|
+
let s = n ? 0 : I.IgnoreOverlays;
|
|
423
|
+
if (n)
|
|
424
|
+
for (let o = r, u = o.parent; u; o = u, u = o.parent)
|
|
425
|
+
o instanceof E && o.index < 0 && ((i = u.enter(e, t, s)) === null || i === void 0 ? void 0 : i.from) != o.from && (r = u);
|
|
426
426
|
for (; ; ) {
|
|
427
|
-
let o =
|
|
427
|
+
let o = r.enter(e, t, s);
|
|
428
428
|
if (!o)
|
|
429
|
-
return
|
|
430
|
-
|
|
429
|
+
return r;
|
|
430
|
+
r = o;
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
-
class
|
|
433
|
+
class Ze {
|
|
434
434
|
cursor(e = 0) {
|
|
435
|
-
return new
|
|
435
|
+
return new Le(this, e);
|
|
436
436
|
}
|
|
437
|
-
getChild(e, t = null,
|
|
438
|
-
let i = De(this, e, t,
|
|
437
|
+
getChild(e, t = null, n = null) {
|
|
438
|
+
let i = De(this, e, t, n);
|
|
439
439
|
return i.length ? i[0] : null;
|
|
440
440
|
}
|
|
441
|
-
getChildren(e, t = null,
|
|
442
|
-
return De(this, e, t,
|
|
441
|
+
getChildren(e, t = null, n = null) {
|
|
442
|
+
return De(this, e, t, n);
|
|
443
443
|
}
|
|
444
444
|
resolve(e, t = 0) {
|
|
445
445
|
return ce(this, e, t, !1);
|
|
@@ -451,14 +451,14 @@ class Ye {
|
|
|
451
451
|
return Ie(this, e);
|
|
452
452
|
}
|
|
453
453
|
enterUnfinishedNodesBefore(e) {
|
|
454
|
-
let t = this.childBefore(e),
|
|
454
|
+
let t = this.childBefore(e), n = this;
|
|
455
455
|
for (; t; ) {
|
|
456
456
|
let i = t.lastChild;
|
|
457
457
|
if (!i || i.to != t.to)
|
|
458
458
|
break;
|
|
459
|
-
i.type.isError && i.from == i.to ? (
|
|
459
|
+
i.type.isError && i.from == i.to ? (n = t, t = i.prevSibling) : t = i;
|
|
460
460
|
}
|
|
461
|
-
return
|
|
461
|
+
return n;
|
|
462
462
|
}
|
|
463
463
|
get node() {
|
|
464
464
|
return this;
|
|
@@ -467,9 +467,9 @@ class Ye {
|
|
|
467
467
|
return this.parent;
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
class E extends
|
|
471
|
-
constructor(e, t,
|
|
472
|
-
super(), this._tree = e, this.from = t, this.index =
|
|
470
|
+
class E extends Ze {
|
|
471
|
+
constructor(e, t, n, i) {
|
|
472
|
+
super(), this._tree = e, this.from = t, this.index = n, this._parent = i;
|
|
473
473
|
}
|
|
474
474
|
get type() {
|
|
475
475
|
return this._tree.type;
|
|
@@ -480,23 +480,23 @@ class E extends Ye {
|
|
|
480
480
|
get to() {
|
|
481
481
|
return this.from + this._tree.length;
|
|
482
482
|
}
|
|
483
|
-
nextChild(e, t,
|
|
483
|
+
nextChild(e, t, n, i, s = 0) {
|
|
484
484
|
for (let o = this; ; ) {
|
|
485
485
|
for (let { children: u, positions: h } = o._tree, x = t > 0 ? u.length : -1; e != x; e += t) {
|
|
486
|
-
let
|
|
487
|
-
if (
|
|
488
|
-
if (
|
|
486
|
+
let w = u[e], C = h[e] + o.from;
|
|
487
|
+
if (Xe(i, n, C, C + w.length)) {
|
|
488
|
+
if (w instanceof Q) {
|
|
489
489
|
if (s & I.ExcludeBuffers)
|
|
490
490
|
continue;
|
|
491
|
-
let A =
|
|
491
|
+
let A = w.findChild(0, w.buffer.length, t, n - C, i);
|
|
492
492
|
if (A > -1)
|
|
493
|
-
return new Z(new
|
|
494
|
-
} else if (s & I.IncludeAnonymous || !
|
|
493
|
+
return new Z(new Bt(o, w, e, C), null, A);
|
|
494
|
+
} else if (s & I.IncludeAnonymous || !w.type.isAnonymous || ze(w)) {
|
|
495
495
|
let A;
|
|
496
|
-
if (!(s & I.IgnoreMounts) && (A =
|
|
497
|
-
return new E(A.tree,
|
|
498
|
-
let
|
|
499
|
-
return s & I.IncludeAnonymous || !
|
|
496
|
+
if (!(s & I.IgnoreMounts) && (A = we.get(w)) && !A.overlay)
|
|
497
|
+
return new E(A.tree, C, e, o);
|
|
498
|
+
let B = new E(w, C, e, o);
|
|
499
|
+
return s & I.IncludeAnonymous || !B.type.isAnonymous ? B : B.nextChild(t < 0 ? w.children.length - 1 : 0, t, n, i);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
}
|
|
@@ -540,15 +540,15 @@ class E extends Ye {
|
|
|
540
540
|
/* Side.Before */
|
|
541
541
|
);
|
|
542
542
|
}
|
|
543
|
-
enter(e, t,
|
|
543
|
+
enter(e, t, n = 0) {
|
|
544
544
|
let i;
|
|
545
|
-
if (!(
|
|
545
|
+
if (!(n & I.IgnoreOverlays) && (i = we.get(this._tree)) && i.overlay) {
|
|
546
546
|
let s = e - this.from;
|
|
547
547
|
for (let { from: o, to: u } of i.overlay)
|
|
548
548
|
if ((t > 0 ? o <= s : o < s) && (t < 0 ? u >= s : u > s))
|
|
549
549
|
return new E(i.tree, i.overlay[0].from + this.from, -1, this);
|
|
550
550
|
}
|
|
551
|
-
return this.nextChild(0, 1, e, t,
|
|
551
|
+
return this.nextChild(0, 1, e, t, n);
|
|
552
552
|
}
|
|
553
553
|
nextSignificantParent() {
|
|
554
554
|
let e = this;
|
|
@@ -590,8 +590,8 @@ class E extends Ye {
|
|
|
590
590
|
return this._tree.toString();
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
|
-
function De(
|
|
594
|
-
let i =
|
|
593
|
+
function De(r, e, t, n) {
|
|
594
|
+
let i = r.cursor(), s = [];
|
|
595
595
|
if (!i.firstChild())
|
|
596
596
|
return s;
|
|
597
597
|
if (t != null) {
|
|
@@ -600,30 +600,30 @@ function De(n, e, t, r) {
|
|
|
600
600
|
return s;
|
|
601
601
|
}
|
|
602
602
|
for (; ; ) {
|
|
603
|
-
if (
|
|
603
|
+
if (n != null && i.type.is(n))
|
|
604
604
|
return s;
|
|
605
605
|
if (i.type.is(e) && s.push(i.node), !i.nextSibling())
|
|
606
|
-
return
|
|
606
|
+
return n == null ? s : [];
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
|
-
function Ie(
|
|
610
|
-
for (let
|
|
611
|
-
if (!
|
|
609
|
+
function Ie(r, e, t = e.length - 1) {
|
|
610
|
+
for (let n = r.parent; t >= 0; n = n.parent) {
|
|
611
|
+
if (!n)
|
|
612
612
|
return !1;
|
|
613
|
-
if (!
|
|
614
|
-
if (e[t] && e[t] !=
|
|
613
|
+
if (!n.type.isAnonymous) {
|
|
614
|
+
if (e[t] && e[t] != n.name)
|
|
615
615
|
return !1;
|
|
616
616
|
t--;
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
619
|
return !0;
|
|
620
620
|
}
|
|
621
|
-
class
|
|
622
|
-
constructor(e, t,
|
|
623
|
-
this.parent = e, this.buffer = t, this.index =
|
|
621
|
+
class Bt {
|
|
622
|
+
constructor(e, t, n, i) {
|
|
623
|
+
this.parent = e, this.buffer = t, this.index = n, this.start = i;
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
|
-
class Z extends
|
|
626
|
+
class Z extends Ze {
|
|
627
627
|
get name() {
|
|
628
628
|
return this.type.name;
|
|
629
629
|
}
|
|
@@ -633,11 +633,11 @@ class Z extends Ye {
|
|
|
633
633
|
get to() {
|
|
634
634
|
return this.context.start + this.context.buffer.buffer[this.index + 2];
|
|
635
635
|
}
|
|
636
|
-
constructor(e, t,
|
|
637
|
-
super(), this.context = e, this._parent = t, this.index =
|
|
636
|
+
constructor(e, t, n) {
|
|
637
|
+
super(), this.context = e, this._parent = t, this.index = n, this.type = e.buffer.set.types[e.buffer.buffer[n]];
|
|
638
638
|
}
|
|
639
|
-
child(e, t,
|
|
640
|
-
let { buffer: i } = this.context, s = i.findChild(this.index + 4, i.buffer[this.index + 3], e, t - this.context.start,
|
|
639
|
+
child(e, t, n) {
|
|
640
|
+
let { buffer: i } = this.context, s = i.findChild(this.index + 4, i.buffer[this.index + 3], e, t - this.context.start, n);
|
|
641
641
|
return s < 0 ? null : new Z(this.context, this, s);
|
|
642
642
|
}
|
|
643
643
|
get firstChild() {
|
|
@@ -672,8 +672,8 @@ class Z extends Ye {
|
|
|
672
672
|
/* Side.Before */
|
|
673
673
|
);
|
|
674
674
|
}
|
|
675
|
-
enter(e, t,
|
|
676
|
-
if (
|
|
675
|
+
enter(e, t, n = 0) {
|
|
676
|
+
if (n & I.ExcludeBuffers)
|
|
677
677
|
return null;
|
|
678
678
|
let { buffer: i } = this.context, s = i.findChild(this.index + 4, i.buffer[this.index + 3], t > 0 ? 1 : -1, e - this.context.start, t);
|
|
679
679
|
return s < 0 ? null : new Z(this.context, this, s);
|
|
@@ -709,10 +709,10 @@ class Z extends Ye {
|
|
|
709
709
|
return null;
|
|
710
710
|
}
|
|
711
711
|
toTree() {
|
|
712
|
-
let e = [], t = [], { buffer:
|
|
712
|
+
let e = [], t = [], { buffer: n } = this.context, i = this.index + 4, s = n.buffer[this.index + 3];
|
|
713
713
|
if (s > i) {
|
|
714
|
-
let o =
|
|
715
|
-
e.push(
|
|
714
|
+
let o = n.buffer[this.index + 1];
|
|
715
|
+
e.push(n.slice(i, s, o)), t.push(0);
|
|
716
716
|
}
|
|
717
717
|
return new R(this.type, e, t, this.to - this.from);
|
|
718
718
|
}
|
|
@@ -723,41 +723,41 @@ class Z extends Ye {
|
|
|
723
723
|
return this.context.buffer.childString(this.index);
|
|
724
724
|
}
|
|
725
725
|
}
|
|
726
|
-
function
|
|
727
|
-
if (!
|
|
726
|
+
function Qe(r) {
|
|
727
|
+
if (!r.length)
|
|
728
728
|
return null;
|
|
729
|
-
let e = 0, t =
|
|
730
|
-
for (let s = 1; s <
|
|
731
|
-
let o =
|
|
729
|
+
let e = 0, t = r[0];
|
|
730
|
+
for (let s = 1; s < r.length; s++) {
|
|
731
|
+
let o = r[s];
|
|
732
732
|
(o.from > t.from || o.to < t.to) && (t = o, e = s);
|
|
733
733
|
}
|
|
734
|
-
let
|
|
735
|
-
return
|
|
734
|
+
let n = t instanceof E && t.index < 0 ? null : t.parent, i = r.slice();
|
|
735
|
+
return n ? i[e] = n : i.splice(e, 1), new Ot(i, t);
|
|
736
736
|
}
|
|
737
|
-
class
|
|
737
|
+
class Ot {
|
|
738
738
|
constructor(e, t) {
|
|
739
739
|
this.heads = e, this.node = t;
|
|
740
740
|
}
|
|
741
741
|
get next() {
|
|
742
|
-
return
|
|
742
|
+
return Qe(this.heads);
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
|
-
function
|
|
746
|
-
let
|
|
747
|
-
for (let s =
|
|
745
|
+
function zt(r, e, t) {
|
|
746
|
+
let n = r.resolveInner(e, t), i = null;
|
|
747
|
+
for (let s = n instanceof E ? n : n.context.parent; s; s = s.parent)
|
|
748
748
|
if (s.index < 0) {
|
|
749
749
|
let o = s.parent;
|
|
750
|
-
(i || (i = [
|
|
750
|
+
(i || (i = [n])).push(o.resolve(e, t)), s = o;
|
|
751
751
|
} else {
|
|
752
|
-
let o =
|
|
752
|
+
let o = we.get(s.tree);
|
|
753
753
|
if (o && o.overlay && o.overlay[0].from <= e && o.overlay[o.overlay.length - 1].to >= e) {
|
|
754
754
|
let u = new E(o.tree, o.overlay[0].from + s.from, -1, s);
|
|
755
|
-
(i || (i = [
|
|
755
|
+
(i || (i = [n])).push(ce(u, e, t, !1));
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
|
-
return i ?
|
|
758
|
+
return i ? Qe(i) : n;
|
|
759
759
|
}
|
|
760
|
-
class
|
|
760
|
+
class Le {
|
|
761
761
|
/**
|
|
762
762
|
Shorthand for `.type.name`.
|
|
763
763
|
*/
|
|
@@ -772,8 +772,8 @@ class Be {
|
|
|
772
772
|
this.yieldNode(e);
|
|
773
773
|
else {
|
|
774
774
|
this._tree = e.context.parent, this.buffer = e.context;
|
|
775
|
-
for (let
|
|
776
|
-
this.stack.unshift(
|
|
775
|
+
for (let n = e._parent; n; n = n._parent)
|
|
776
|
+
this.stack.unshift(n.index);
|
|
777
777
|
this.bufferNode = e, this.yieldBuf(e.index);
|
|
778
778
|
}
|
|
779
779
|
}
|
|
@@ -782,8 +782,8 @@ class Be {
|
|
|
782
782
|
}
|
|
783
783
|
yieldBuf(e, t) {
|
|
784
784
|
this.index = e;
|
|
785
|
-
let { start:
|
|
786
|
-
return this.type = t || i.set.types[i.buffer[e]], this.from =
|
|
785
|
+
let { start: n, buffer: i } = this.buffer;
|
|
786
|
+
return this.type = t || i.set.types[i.buffer[e]], this.from = n + i.buffer[e + 1], this.to = n + i.buffer[e + 2], !0;
|
|
787
787
|
}
|
|
788
788
|
/**
|
|
789
789
|
@internal
|
|
@@ -800,10 +800,10 @@ class Be {
|
|
|
800
800
|
/**
|
|
801
801
|
@internal
|
|
802
802
|
*/
|
|
803
|
-
enterChild(e, t,
|
|
803
|
+
enterChild(e, t, n) {
|
|
804
804
|
if (!this.buffer)
|
|
805
|
-
return this.yield(this._tree.nextChild(e < 0 ? this._tree._tree.children.length - 1 : 0, e, t,
|
|
806
|
-
let { buffer: i } = this.buffer, s = i.findChild(this.index + 4, i.buffer[this.index + 3], e, t - this.buffer.start,
|
|
805
|
+
return this.yield(this._tree.nextChild(e < 0 ? this._tree._tree.children.length - 1 : 0, e, t, n, this.mode));
|
|
806
|
+
let { buffer: i } = this.buffer, s = i.findChild(this.index + 4, i.buffer[this.index + 3], e, t - this.buffer.start, n);
|
|
807
807
|
return s < 0 ? !1 : (this.stack.push(this.index), this.yieldBuf(s));
|
|
808
808
|
}
|
|
809
809
|
/**
|
|
@@ -858,8 +858,8 @@ class Be {
|
|
|
858
858
|
[mounted](#common.NodeProp^mounted) trees unless `overlays` is
|
|
859
859
|
set to false.
|
|
860
860
|
*/
|
|
861
|
-
enter(e, t,
|
|
862
|
-
return this.buffer ?
|
|
861
|
+
enter(e, t, n = this.mode) {
|
|
862
|
+
return this.buffer ? n & I.ExcludeBuffers ? !1 : this.enterChild(1, e, t) : this.yield(this._tree.enter(e, t, n));
|
|
863
863
|
}
|
|
864
864
|
/**
|
|
865
865
|
Move to the node's parent node, if this isn't the top node.
|
|
@@ -878,9 +878,9 @@ class Be {
|
|
|
878
878
|
sibling(e) {
|
|
879
879
|
if (!this.buffer)
|
|
880
880
|
return this._tree._parent ? this.yield(this._tree.index < 0 ? null : this._tree._parent.nextChild(this._tree.index + e, e, 0, 4, this.mode)) : !1;
|
|
881
|
-
let { buffer: t } = this.buffer,
|
|
881
|
+
let { buffer: t } = this.buffer, n = this.stack.length - 1;
|
|
882
882
|
if (e < 0) {
|
|
883
|
-
let i =
|
|
883
|
+
let i = n < 0 ? 0 : this.stack[n] + 4;
|
|
884
884
|
if (this.index != i)
|
|
885
885
|
return this.yieldBuf(t.findChild(
|
|
886
886
|
i,
|
|
@@ -892,10 +892,10 @@ class Be {
|
|
|
892
892
|
));
|
|
893
893
|
} else {
|
|
894
894
|
let i = t.buffer[this.index + 3];
|
|
895
|
-
if (i < (
|
|
895
|
+
if (i < (n < 0 ? t.buffer.length : t.buffer[this.stack[n] + 3]))
|
|
896
896
|
return this.yieldBuf(i);
|
|
897
897
|
}
|
|
898
|
-
return
|
|
898
|
+
return n < 0 ? this.yield(this.buffer.parent.nextChild(this.buffer.index + e, e, 0, 4, this.mode)) : !1;
|
|
899
899
|
}
|
|
900
900
|
/**
|
|
901
901
|
Move to this node's next sibling, if any.
|
|
@@ -910,7 +910,7 @@ class Be {
|
|
|
910
910
|
return this.sibling(-1);
|
|
911
911
|
}
|
|
912
912
|
atLastNode(e) {
|
|
913
|
-
let t,
|
|
913
|
+
let t, n, { buffer: i } = this;
|
|
914
914
|
if (i) {
|
|
915
915
|
if (e > 0) {
|
|
916
916
|
if (this.index < i.buffer.buffer.length)
|
|
@@ -919,13 +919,13 @@ class Be {
|
|
|
919
919
|
for (let s = 0; s < this.index; s++)
|
|
920
920
|
if (i.buffer.buffer[s + 3] < this.index)
|
|
921
921
|
return !1;
|
|
922
|
-
({ index: t, parent:
|
|
922
|
+
({ index: t, parent: n } = i);
|
|
923
923
|
} else
|
|
924
|
-
({ index: t, _parent:
|
|
925
|
-
for (;
|
|
924
|
+
({ index: t, _parent: n } = this._tree);
|
|
925
|
+
for (; n; { index: t, _parent: n } = n)
|
|
926
926
|
if (t > -1)
|
|
927
|
-
for (let s = t + e, o = e < 0 ? -1 :
|
|
928
|
-
let u =
|
|
927
|
+
for (let s = t + e, o = e < 0 ? -1 : n._tree.children.length; s != o; s += e) {
|
|
928
|
+
let u = n._tree.children[s];
|
|
929
929
|
if (this.mode & I.IncludeAnonymous || u instanceof Q || !u.type.isAnonymous || ze(u))
|
|
930
930
|
return !1;
|
|
931
931
|
}
|
|
@@ -984,7 +984,7 @@ class Be {
|
|
|
984
984
|
get node() {
|
|
985
985
|
if (!this.buffer)
|
|
986
986
|
return this._tree;
|
|
987
|
-
let e = this.bufferNode, t = null,
|
|
987
|
+
let e = this.bufferNode, t = null, n = 0;
|
|
988
988
|
if (e && e.context == this.buffer)
|
|
989
989
|
e:
|
|
990
990
|
for (let i = this.index, s = this.stack.length; s >= 0; ) {
|
|
@@ -992,12 +992,12 @@ class Be {
|
|
|
992
992
|
if (o.index == i) {
|
|
993
993
|
if (i == this.index)
|
|
994
994
|
return o;
|
|
995
|
-
t = o,
|
|
995
|
+
t = o, n = s + 1;
|
|
996
996
|
break e;
|
|
997
997
|
}
|
|
998
998
|
i = this.stack[--s];
|
|
999
999
|
}
|
|
1000
|
-
for (let i =
|
|
1000
|
+
for (let i = n; i < this.stack.length; i++)
|
|
1001
1001
|
t = new Z(this.buffer, t, this.stack[i]);
|
|
1002
1002
|
return this.bufferNode = new Z(this.buffer, t, this.index);
|
|
1003
1003
|
}
|
|
@@ -1016,19 +1016,19 @@ class Be {
|
|
|
1016
1016
|
skipped, and `leave` isn't called for it.
|
|
1017
1017
|
*/
|
|
1018
1018
|
iterate(e, t) {
|
|
1019
|
-
for (let
|
|
1019
|
+
for (let n = 0; ; ) {
|
|
1020
1020
|
let i = !1;
|
|
1021
1021
|
if (this.type.isAnonymous || e(this) !== !1) {
|
|
1022
1022
|
if (this.firstChild()) {
|
|
1023
|
-
|
|
1023
|
+
n++;
|
|
1024
1024
|
continue;
|
|
1025
1025
|
}
|
|
1026
1026
|
this.type.isAnonymous || (i = !0);
|
|
1027
1027
|
}
|
|
1028
1028
|
for (; i && t && t(this), i = this.type.isAnonymous, !this.nextSibling(); ) {
|
|
1029
|
-
if (!
|
|
1029
|
+
if (!n)
|
|
1030
1030
|
return;
|
|
1031
|
-
this.parent(),
|
|
1031
|
+
this.parent(), n--, i = !0;
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
@@ -1040,11 +1040,11 @@ class Be {
|
|
|
1040
1040
|
matchContext(e) {
|
|
1041
1041
|
if (!this.buffer)
|
|
1042
1042
|
return Ie(this.node, e);
|
|
1043
|
-
let { buffer: t } = this.buffer, { types:
|
|
1043
|
+
let { buffer: t } = this.buffer, { types: n } = t.set;
|
|
1044
1044
|
for (let i = e.length - 1, s = this.stack.length - 1; i >= 0; s--) {
|
|
1045
1045
|
if (s < 0)
|
|
1046
1046
|
return Ie(this.node, e, i);
|
|
1047
|
-
let o =
|
|
1047
|
+
let o = n[t.buffer[this.stack[s]]];
|
|
1048
1048
|
if (!o.isAnonymous) {
|
|
1049
1049
|
if (e[i] && e[i] != o.name)
|
|
1050
1050
|
return !1;
|
|
@@ -1054,14 +1054,14 @@ class Be {
|
|
|
1054
1054
|
return !0;
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
|
-
function ze(
|
|
1058
|
-
return
|
|
1057
|
+
function ze(r) {
|
|
1058
|
+
return r.children.some((e) => e instanceof Q || !e.type.isAnonymous || ze(e));
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1060
|
+
function Et(r) {
|
|
1061
1061
|
var e;
|
|
1062
|
-
let { buffer: t, nodeSet:
|
|
1063
|
-
function
|
|
1064
|
-
let { id: d, start: c, end:
|
|
1062
|
+
let { buffer: t, nodeSet: n, maxBufferLength: i = At, reused: s = [], minRepeatType: o = n.types.length } = r, u = Array.isArray(t) ? new Oe(t, t.length) : t, h = n.types, x = 0, w = 0;
|
|
1063
|
+
function C(g, b, f, y, p, m) {
|
|
1064
|
+
let { id: d, start: c, end: _, size: k } = u, L = w;
|
|
1065
1065
|
for (; k < 0; )
|
|
1066
1066
|
if (u.next(), k == -1) {
|
|
1067
1067
|
let W = s[d];
|
|
@@ -1071,50 +1071,50 @@ function Mt(n) {
|
|
|
1071
1071
|
x = d;
|
|
1072
1072
|
return;
|
|
1073
1073
|
} else if (k == -4) {
|
|
1074
|
-
|
|
1074
|
+
w = d;
|
|
1075
1075
|
return;
|
|
1076
1076
|
} else
|
|
1077
1077
|
throw new RangeError(`Unrecognized record size: ${k}`);
|
|
1078
1078
|
let Y = h[d], ie, ee, Me = c - g;
|
|
1079
|
-
if (
|
|
1080
|
-
let W = new Uint16Array(ee.size - ee.skip), O = u.pos - ee.size,
|
|
1079
|
+
if (_ - c <= i && (ee = M(u.pos - b, p))) {
|
|
1080
|
+
let W = new Uint16Array(ee.size - ee.skip), O = u.pos - ee.size, T = W.length;
|
|
1081
1081
|
for (; u.pos > O; )
|
|
1082
|
-
|
|
1083
|
-
ie = new Q(W,
|
|
1082
|
+
T = D(ee.start, W, T);
|
|
1083
|
+
ie = new Q(W, _ - ee.start, n), Me = ee.start - g;
|
|
1084
1084
|
} else {
|
|
1085
1085
|
let W = u.pos - k;
|
|
1086
1086
|
u.next();
|
|
1087
|
-
let O = [],
|
|
1087
|
+
let O = [], T = [], te = d >= o ? d : -1, se = 0, pe = _;
|
|
1088
1088
|
for (; u.pos > W; )
|
|
1089
|
-
te >= 0 && u.id == te && u.size >= 0 ? (u.end <= pe - i && (N(O,
|
|
1090
|
-
if (te >= 0 && se > 0 && se < O.length && N(O,
|
|
1091
|
-
let Pe =
|
|
1092
|
-
ie = Ee(Y, O,
|
|
1089
|
+
te >= 0 && u.id == te && u.size >= 0 ? (u.end <= pe - i && (N(O, T, c, se, u.end, pe, te, L), se = O.length, pe = u.end), u.next()) : m > 2500 ? A(c, W, O, T) : C(c, W, O, T, te, m + 1);
|
|
1090
|
+
if (te >= 0 && se > 0 && se < O.length && N(O, T, c, se, c, pe, te, L), O.reverse(), T.reverse(), te > -1 && se > 0) {
|
|
1091
|
+
let Pe = B(Y);
|
|
1092
|
+
ie = Ee(Y, O, T, 0, O.length, 0, _ - c, Pe, Pe);
|
|
1093
1093
|
} else
|
|
1094
|
-
ie = P(Y, O,
|
|
1094
|
+
ie = P(Y, O, T, _ - c, L - _);
|
|
1095
1095
|
}
|
|
1096
1096
|
f.push(ie), y.push(Me);
|
|
1097
1097
|
}
|
|
1098
1098
|
function A(g, b, f, y) {
|
|
1099
1099
|
let p = [], m = 0, d = -1;
|
|
1100
1100
|
for (; u.pos > b; ) {
|
|
1101
|
-
let { id: c, start:
|
|
1102
|
-
if (
|
|
1101
|
+
let { id: c, start: _, end: k, size: L } = u;
|
|
1102
|
+
if (L > 4)
|
|
1103
1103
|
u.next();
|
|
1104
1104
|
else {
|
|
1105
|
-
if (d > -1 &&
|
|
1105
|
+
if (d > -1 && _ < d)
|
|
1106
1106
|
break;
|
|
1107
|
-
d < 0 && (d = k - i), p.push(c,
|
|
1107
|
+
d < 0 && (d = k - i), p.push(c, _, k), m++, u.next();
|
|
1108
1108
|
}
|
|
1109
1109
|
}
|
|
1110
1110
|
if (m) {
|
|
1111
|
-
let c = new Uint16Array(m * 4),
|
|
1112
|
-
for (let k = p.length - 3,
|
|
1113
|
-
c[
|
|
1114
|
-
f.push(new Q(c, p[2] -
|
|
1111
|
+
let c = new Uint16Array(m * 4), _ = p[p.length - 2];
|
|
1112
|
+
for (let k = p.length - 3, L = 0; k >= 0; k -= 3)
|
|
1113
|
+
c[L++] = p[k], c[L++] = p[k + 1] - _, c[L++] = p[k + 2] - _, c[L++] = L;
|
|
1114
|
+
f.push(new Q(c, p[2] - _, n)), y.push(_ - g);
|
|
1115
1115
|
}
|
|
1116
1116
|
}
|
|
1117
|
-
function
|
|
1117
|
+
function B(g) {
|
|
1118
1118
|
return (b, f, y) => {
|
|
1119
1119
|
let p = 0, m = b.length - 1, d, c;
|
|
1120
1120
|
if (m >= 0 && (d = b[m]) instanceof R) {
|
|
@@ -1126,10 +1126,10 @@ function Mt(n) {
|
|
|
1126
1126
|
};
|
|
1127
1127
|
}
|
|
1128
1128
|
function N(g, b, f, y, p, m, d, c) {
|
|
1129
|
-
let
|
|
1129
|
+
let _ = [], k = [];
|
|
1130
1130
|
for (; g.length > y; )
|
|
1131
|
-
|
|
1132
|
-
g.push(P(
|
|
1131
|
+
_.push(g.pop()), k.push(b.pop() + f - p);
|
|
1132
|
+
g.push(P(n.types[d], _, k, m - p, c - m)), b.push(p - f);
|
|
1133
1133
|
}
|
|
1134
1134
|
function P(g, b, f, y, p = 0, m) {
|
|
1135
1135
|
if (x) {
|
|
@@ -1145,17 +1145,17 @@ function Mt(n) {
|
|
|
1145
1145
|
function M(g, b) {
|
|
1146
1146
|
let f = u.fork(), y = 0, p = 0, m = 0, d = f.end - i, c = { size: 0, start: 0, skip: 0 };
|
|
1147
1147
|
e:
|
|
1148
|
-
for (let
|
|
1148
|
+
for (let _ = f.pos - g; f.pos > _; ) {
|
|
1149
1149
|
let k = f.size;
|
|
1150
1150
|
if (f.id == b && k >= 0) {
|
|
1151
1151
|
c.size = y, c.start = p, c.skip = m, m += 4, y += 4, f.next();
|
|
1152
1152
|
continue;
|
|
1153
1153
|
}
|
|
1154
|
-
let
|
|
1155
|
-
if (k < 0 ||
|
|
1154
|
+
let L = f.pos - k;
|
|
1155
|
+
if (k < 0 || L < _ || f.start < d)
|
|
1156
1156
|
break;
|
|
1157
1157
|
let Y = f.id >= o ? 4 : 0, ie = f.start;
|
|
1158
|
-
for (f.next(); f.pos >
|
|
1158
|
+
for (f.next(); f.pos > L; ) {
|
|
1159
1159
|
if (f.size < 0)
|
|
1160
1160
|
if (f.size == -3)
|
|
1161
1161
|
Y += 4;
|
|
@@ -1174,80 +1174,80 @@ function Mt(n) {
|
|
|
1174
1174
|
if (u.next(), d >= 0 && y < o) {
|
|
1175
1175
|
let c = f;
|
|
1176
1176
|
if (d > 4) {
|
|
1177
|
-
let
|
|
1178
|
-
for (; u.pos >
|
|
1177
|
+
let _ = u.pos - (d - 4);
|
|
1178
|
+
for (; u.pos > _; )
|
|
1179
1179
|
f = D(g, b, f);
|
|
1180
1180
|
}
|
|
1181
1181
|
b[--f] = c, b[--f] = m - g, b[--f] = p - g, b[--f] = y;
|
|
1182
1182
|
} else
|
|
1183
|
-
d == -3 ? x = y : d == -4 && (
|
|
1183
|
+
d == -3 ? x = y : d == -4 && (w = y);
|
|
1184
1184
|
return f;
|
|
1185
1185
|
}
|
|
1186
1186
|
let U = [], S = [];
|
|
1187
1187
|
for (; u.pos > 0; )
|
|
1188
|
-
|
|
1189
|
-
let J = (e =
|
|
1190
|
-
return new R(h[
|
|
1188
|
+
C(r.start || 0, r.bufferStart || 0, U, S, -1, 0);
|
|
1189
|
+
let J = (e = r.length) !== null && e !== void 0 ? e : U.length ? S[0] + U[0].length : 0;
|
|
1190
|
+
return new R(h[r.topID], U.reverse(), S.reverse(), J);
|
|
1191
1191
|
}
|
|
1192
1192
|
const Ue = /* @__PURE__ */ new WeakMap();
|
|
1193
|
-
function
|
|
1194
|
-
if (!
|
|
1193
|
+
function _e(r, e) {
|
|
1194
|
+
if (!r.isAnonymous || e instanceof Q || e.type != r)
|
|
1195
1195
|
return 1;
|
|
1196
1196
|
let t = Ue.get(e);
|
|
1197
1197
|
if (t == null) {
|
|
1198
1198
|
t = 1;
|
|
1199
|
-
for (let
|
|
1200
|
-
if (
|
|
1199
|
+
for (let n of e.children) {
|
|
1200
|
+
if (n.type != r || !(n instanceof R)) {
|
|
1201
1201
|
t = 1;
|
|
1202
1202
|
break;
|
|
1203
1203
|
}
|
|
1204
|
-
t +=
|
|
1204
|
+
t += _e(r, n);
|
|
1205
1205
|
}
|
|
1206
1206
|
Ue.set(e, t);
|
|
1207
1207
|
}
|
|
1208
1208
|
return t;
|
|
1209
1209
|
}
|
|
1210
|
-
function Ee(
|
|
1210
|
+
function Ee(r, e, t, n, i, s, o, u, h) {
|
|
1211
1211
|
let x = 0;
|
|
1212
|
-
for (let N =
|
|
1213
|
-
x +=
|
|
1214
|
-
let
|
|
1212
|
+
for (let N = n; N < i; N++)
|
|
1213
|
+
x += _e(r, e[N]);
|
|
1214
|
+
let w = Math.ceil(
|
|
1215
1215
|
x * 1.5 / 8
|
|
1216
1216
|
/* Balance.BranchFactor */
|
|
1217
|
-
),
|
|
1218
|
-
function
|
|
1217
|
+
), C = [], A = [];
|
|
1218
|
+
function B(N, P, M, D, U) {
|
|
1219
1219
|
for (let S = M; S < D; ) {
|
|
1220
|
-
let J = S, g = P[S], b =
|
|
1220
|
+
let J = S, g = P[S], b = _e(r, N[S]);
|
|
1221
1221
|
for (S++; S < D; S++) {
|
|
1222
|
-
let f =
|
|
1223
|
-
if (b + f >=
|
|
1222
|
+
let f = _e(r, N[S]);
|
|
1223
|
+
if (b + f >= w)
|
|
1224
1224
|
break;
|
|
1225
1225
|
b += f;
|
|
1226
1226
|
}
|
|
1227
1227
|
if (S == J + 1) {
|
|
1228
|
-
if (b >
|
|
1228
|
+
if (b > w) {
|
|
1229
1229
|
let f = N[J];
|
|
1230
|
-
|
|
1230
|
+
B(f.children, f.positions, 0, f.children.length, P[J] + U);
|
|
1231
1231
|
continue;
|
|
1232
1232
|
}
|
|
1233
|
-
|
|
1233
|
+
C.push(N[J]);
|
|
1234
1234
|
} else {
|
|
1235
1235
|
let f = P[S - 1] + N[S - 1].length - g;
|
|
1236
|
-
|
|
1236
|
+
C.push(Ee(r, N, P, J, S, g, f, null, h));
|
|
1237
1237
|
}
|
|
1238
1238
|
A.push(g + U - s);
|
|
1239
1239
|
}
|
|
1240
1240
|
}
|
|
1241
|
-
return
|
|
1241
|
+
return B(e, t, n, i, 0), (u || h)(C, A, o);
|
|
1242
1242
|
}
|
|
1243
1243
|
new v({ perNode: !0 });
|
|
1244
|
-
let
|
|
1245
|
-
class
|
|
1244
|
+
let Mt = 0;
|
|
1245
|
+
class j {
|
|
1246
1246
|
/**
|
|
1247
1247
|
@internal
|
|
1248
1248
|
*/
|
|
1249
|
-
constructor(e, t,
|
|
1250
|
-
this.set = e, this.base = t, this.modified =
|
|
1249
|
+
constructor(e, t, n) {
|
|
1250
|
+
this.set = e, this.base = t, this.modified = n, this.id = Mt++;
|
|
1251
1251
|
}
|
|
1252
1252
|
/**
|
|
1253
1253
|
Define a new tag. If `parent` is given, the tag is treated as a
|
|
@@ -1259,10 +1259,10 @@ class V {
|
|
|
1259
1259
|
static define(e) {
|
|
1260
1260
|
if (e != null && e.base)
|
|
1261
1261
|
throw new Error("Can not derive from a modified tag");
|
|
1262
|
-
let t = new
|
|
1262
|
+
let t = new j([], null, []);
|
|
1263
1263
|
if (t.set.push(t), e)
|
|
1264
|
-
for (let
|
|
1265
|
-
t.set.push(
|
|
1264
|
+
for (let n of e.set)
|
|
1265
|
+
t.set.push(n);
|
|
1266
1266
|
return t;
|
|
1267
1267
|
}
|
|
1268
1268
|
/**
|
|
@@ -1278,52 +1278,52 @@ class V {
|
|
|
1278
1278
|
`m1(m3(t1)`, and so on.
|
|
1279
1279
|
*/
|
|
1280
1280
|
static defineModifier() {
|
|
1281
|
-
let e = new
|
|
1282
|
-
return (t) => t.modified.indexOf(e) > -1 ? t :
|
|
1281
|
+
let e = new Ce();
|
|
1282
|
+
return (t) => t.modified.indexOf(e) > -1 ? t : Ce.get(t.base || t, t.modified.concat(e).sort((n, i) => n.id - i.id));
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
|
-
let
|
|
1286
|
-
class
|
|
1285
|
+
let Pt = 0;
|
|
1286
|
+
class Ce {
|
|
1287
1287
|
constructor() {
|
|
1288
|
-
this.instances = [], this.id =
|
|
1288
|
+
this.instances = [], this.id = Pt++;
|
|
1289
1289
|
}
|
|
1290
1290
|
static get(e, t) {
|
|
1291
1291
|
if (!t.length)
|
|
1292
1292
|
return e;
|
|
1293
|
-
let
|
|
1294
|
-
if (
|
|
1295
|
-
return
|
|
1296
|
-
let i = [], s = new
|
|
1293
|
+
let n = t[0].instances.find((u) => u.base == e && Tt(t, u.modified));
|
|
1294
|
+
if (n)
|
|
1295
|
+
return n;
|
|
1296
|
+
let i = [], s = new j(i, e, t);
|
|
1297
1297
|
for (let u of t)
|
|
1298
1298
|
u.instances.push(s);
|
|
1299
|
-
let o =
|
|
1299
|
+
let o = $t(t);
|
|
1300
1300
|
for (let u of e.set)
|
|
1301
1301
|
if (!u.modified.length)
|
|
1302
1302
|
for (let h of o)
|
|
1303
|
-
i.push(
|
|
1303
|
+
i.push(Ce.get(u, h));
|
|
1304
1304
|
return s;
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
|
-
function Tt(
|
|
1308
|
-
return
|
|
1307
|
+
function Tt(r, e) {
|
|
1308
|
+
return r.length == e.length && r.every((t, n) => t == e[n]);
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function $t(r) {
|
|
1311
1311
|
let e = [[]];
|
|
1312
|
-
for (let t = 0; t <
|
|
1313
|
-
for (let
|
|
1314
|
-
e.push(e[
|
|
1315
|
-
return e.sort((t,
|
|
1312
|
+
for (let t = 0; t < r.length; t++)
|
|
1313
|
+
for (let n = 0, i = e.length; n < i; n++)
|
|
1314
|
+
e.push(e[n].concat(r[t]));
|
|
1315
|
+
return e.sort((t, n) => n.length - t.length);
|
|
1316
1316
|
}
|
|
1317
1317
|
new v();
|
|
1318
|
-
function Ht(
|
|
1318
|
+
function Ht(r, e) {
|
|
1319
1319
|
let t = /* @__PURE__ */ Object.create(null);
|
|
1320
|
-
for (let s of
|
|
1320
|
+
for (let s of r)
|
|
1321
1321
|
if (!Array.isArray(s.tag))
|
|
1322
1322
|
t[s.tag.id] = s.class;
|
|
1323
1323
|
else
|
|
1324
1324
|
for (let o of s.tag)
|
|
1325
1325
|
t[o.id] = s.class;
|
|
1326
|
-
let { scope:
|
|
1326
|
+
let { scope: n, all: i = null } = e || {};
|
|
1327
1327
|
return {
|
|
1328
1328
|
style: (s) => {
|
|
1329
1329
|
let o = i;
|
|
@@ -1337,10 +1337,10 @@ function Ht(n, e) {
|
|
|
1337
1337
|
}
|
|
1338
1338
|
return o;
|
|
1339
1339
|
},
|
|
1340
|
-
scope:
|
|
1340
|
+
scope: n
|
|
1341
1341
|
};
|
|
1342
1342
|
}
|
|
1343
|
-
const a =
|
|
1343
|
+
const a = j.define, ye = a(), F = a(), Je = a(F), We = a(F), X = a(), xe = a(X), Se = a(X), V = a(), ne = a(V), $ = a(), H = a(), Be = a(), he = a(Be), ke = a(), l = {
|
|
1344
1344
|
/**
|
|
1345
1345
|
A comment.
|
|
1346
1346
|
*/
|
|
@@ -1453,94 +1453,94 @@ const a = V.define, ye = a(), F = a(), Je = a(F), We = a(F), X = a(), xe = a(X),
|
|
|
1453
1453
|
/**
|
|
1454
1454
|
A language keyword.
|
|
1455
1455
|
*/
|
|
1456
|
-
keyword:
|
|
1456
|
+
keyword: $,
|
|
1457
1457
|
/**
|
|
1458
1458
|
The [keyword](#highlight.tags.keyword) for the self or this
|
|
1459
1459
|
object.
|
|
1460
1460
|
*/
|
|
1461
|
-
self: a(
|
|
1461
|
+
self: a($),
|
|
1462
1462
|
/**
|
|
1463
1463
|
The [keyword](#highlight.tags.keyword) for null.
|
|
1464
1464
|
*/
|
|
1465
|
-
null: a(
|
|
1465
|
+
null: a($),
|
|
1466
1466
|
/**
|
|
1467
1467
|
A [keyword](#highlight.tags.keyword) denoting some atomic value.
|
|
1468
1468
|
*/
|
|
1469
|
-
atom: a(
|
|
1469
|
+
atom: a($),
|
|
1470
1470
|
/**
|
|
1471
1471
|
A [keyword](#highlight.tags.keyword) that represents a unit.
|
|
1472
1472
|
*/
|
|
1473
|
-
unit: a(
|
|
1473
|
+
unit: a($),
|
|
1474
1474
|
/**
|
|
1475
1475
|
A modifier [keyword](#highlight.tags.keyword).
|
|
1476
1476
|
*/
|
|
1477
|
-
modifier: a(
|
|
1477
|
+
modifier: a($),
|
|
1478
1478
|
/**
|
|
1479
1479
|
A [keyword](#highlight.tags.keyword) that acts as an operator.
|
|
1480
1480
|
*/
|
|
1481
|
-
operatorKeyword: a(
|
|
1481
|
+
operatorKeyword: a($),
|
|
1482
1482
|
/**
|
|
1483
1483
|
A control-flow related [keyword](#highlight.tags.keyword).
|
|
1484
1484
|
*/
|
|
1485
|
-
controlKeyword: a(
|
|
1485
|
+
controlKeyword: a($),
|
|
1486
1486
|
/**
|
|
1487
1487
|
A [keyword](#highlight.tags.keyword) that defines something.
|
|
1488
1488
|
*/
|
|
1489
|
-
definitionKeyword: a(
|
|
1489
|
+
definitionKeyword: a($),
|
|
1490
1490
|
/**
|
|
1491
1491
|
A [keyword](#highlight.tags.keyword) related to defining or
|
|
1492
1492
|
interfacing with modules.
|
|
1493
1493
|
*/
|
|
1494
|
-
moduleKeyword: a(
|
|
1494
|
+
moduleKeyword: a($),
|
|
1495
1495
|
/**
|
|
1496
1496
|
An operator.
|
|
1497
1497
|
*/
|
|
1498
|
-
operator:
|
|
1498
|
+
operator: H,
|
|
1499
1499
|
/**
|
|
1500
1500
|
An [operator](#highlight.tags.operator) that dereferences something.
|
|
1501
1501
|
*/
|
|
1502
|
-
derefOperator: a(
|
|
1502
|
+
derefOperator: a(H),
|
|
1503
1503
|
/**
|
|
1504
1504
|
Arithmetic-related [operator](#highlight.tags.operator).
|
|
1505
1505
|
*/
|
|
1506
|
-
arithmeticOperator: a(
|
|
1506
|
+
arithmeticOperator: a(H),
|
|
1507
1507
|
/**
|
|
1508
1508
|
Logical [operator](#highlight.tags.operator).
|
|
1509
1509
|
*/
|
|
1510
|
-
logicOperator: a(
|
|
1510
|
+
logicOperator: a(H),
|
|
1511
1511
|
/**
|
|
1512
1512
|
Bit [operator](#highlight.tags.operator).
|
|
1513
1513
|
*/
|
|
1514
|
-
bitwiseOperator: a(
|
|
1514
|
+
bitwiseOperator: a(H),
|
|
1515
1515
|
/**
|
|
1516
1516
|
Comparison [operator](#highlight.tags.operator).
|
|
1517
1517
|
*/
|
|
1518
|
-
compareOperator: a(
|
|
1518
|
+
compareOperator: a(H),
|
|
1519
1519
|
/**
|
|
1520
1520
|
[Operator](#highlight.tags.operator) that updates its operand.
|
|
1521
1521
|
*/
|
|
1522
|
-
updateOperator: a(
|
|
1522
|
+
updateOperator: a(H),
|
|
1523
1523
|
/**
|
|
1524
1524
|
[Operator](#highlight.tags.operator) that defines something.
|
|
1525
1525
|
*/
|
|
1526
|
-
definitionOperator: a(
|
|
1526
|
+
definitionOperator: a(H),
|
|
1527
1527
|
/**
|
|
1528
1528
|
Type-related [operator](#highlight.tags.operator).
|
|
1529
1529
|
*/
|
|
1530
|
-
typeOperator: a(
|
|
1530
|
+
typeOperator: a(H),
|
|
1531
1531
|
/**
|
|
1532
1532
|
Control-flow [operator](#highlight.tags.operator).
|
|
1533
1533
|
*/
|
|
1534
|
-
controlOperator: a(
|
|
1534
|
+
controlOperator: a(H),
|
|
1535
1535
|
/**
|
|
1536
1536
|
Program or markup punctuation.
|
|
1537
1537
|
*/
|
|
1538
|
-
punctuation:
|
|
1538
|
+
punctuation: Be,
|
|
1539
1539
|
/**
|
|
1540
1540
|
[Punctuation](#highlight.tags.punctuation) that separates
|
|
1541
1541
|
things.
|
|
1542
1542
|
*/
|
|
1543
|
-
separator: a(
|
|
1543
|
+
separator: a(Be),
|
|
1544
1544
|
/**
|
|
1545
1545
|
Bracket-style [punctuation](#highlight.tags.punctuation).
|
|
1546
1546
|
*/
|
|
@@ -1568,7 +1568,7 @@ const a = V.define, ye = a(), F = a(), Je = a(F), We = a(F), X = a(), xe = a(X),
|
|
|
1568
1568
|
/**
|
|
1569
1569
|
Content, for example plain text in XML or markup documents.
|
|
1570
1570
|
*/
|
|
1571
|
-
content:
|
|
1571
|
+
content: V,
|
|
1572
1572
|
/**
|
|
1573
1573
|
[Content](#highlight.tags.content) that represents a heading.
|
|
1574
1574
|
*/
|
|
@@ -1600,37 +1600,37 @@ const a = V.define, ye = a(), F = a(), Je = a(F), We = a(F), X = a(), xe = a(X),
|
|
|
1600
1600
|
/**
|
|
1601
1601
|
A prose separator (such as a horizontal rule).
|
|
1602
1602
|
*/
|
|
1603
|
-
contentSeparator: a(
|
|
1603
|
+
contentSeparator: a(V),
|
|
1604
1604
|
/**
|
|
1605
1605
|
[Content](#highlight.tags.content) that represents a list.
|
|
1606
1606
|
*/
|
|
1607
|
-
list: a(
|
|
1607
|
+
list: a(V),
|
|
1608
1608
|
/**
|
|
1609
1609
|
[Content](#highlight.tags.content) that represents a quote.
|
|
1610
1610
|
*/
|
|
1611
|
-
quote: a(
|
|
1611
|
+
quote: a(V),
|
|
1612
1612
|
/**
|
|
1613
1613
|
[Content](#highlight.tags.content) that is emphasized.
|
|
1614
1614
|
*/
|
|
1615
|
-
emphasis: a(
|
|
1615
|
+
emphasis: a(V),
|
|
1616
1616
|
/**
|
|
1617
1617
|
[Content](#highlight.tags.content) that is styled strong.
|
|
1618
1618
|
*/
|
|
1619
|
-
strong: a(
|
|
1619
|
+
strong: a(V),
|
|
1620
1620
|
/**
|
|
1621
1621
|
[Content](#highlight.tags.content) that is part of a link.
|
|
1622
1622
|
*/
|
|
1623
|
-
link: a(
|
|
1623
|
+
link: a(V),
|
|
1624
1624
|
/**
|
|
1625
1625
|
[Content](#highlight.tags.content) that is styled as code or
|
|
1626
1626
|
monospace.
|
|
1627
1627
|
*/
|
|
1628
|
-
monospace: a(
|
|
1628
|
+
monospace: a(V),
|
|
1629
1629
|
/**
|
|
1630
1630
|
[Content](#highlight.tags.content) that has a strike-through
|
|
1631
1631
|
style.
|
|
1632
1632
|
*/
|
|
1633
|
-
strikethrough: a(
|
|
1633
|
+
strikethrough: a(V),
|
|
1634
1634
|
/**
|
|
1635
1635
|
Inserted text in a change-tracking format.
|
|
1636
1636
|
*/
|
|
@@ -1671,31 +1671,31 @@ const a = V.define, ye = a(), F = a(), Je = a(F), We = a(F), X = a(), xe = a(X),
|
|
|
1671
1671
|
given element is being defined. Expected to be used with the
|
|
1672
1672
|
various [name](#highlight.tags.name) tags.
|
|
1673
1673
|
*/
|
|
1674
|
-
definition:
|
|
1674
|
+
definition: j.defineModifier(),
|
|
1675
1675
|
/**
|
|
1676
1676
|
[Modifier](#highlight.Tag^defineModifier) that indicates that
|
|
1677
1677
|
something is constant. Mostly expected to be used with
|
|
1678
1678
|
[variable names](#highlight.tags.variableName).
|
|
1679
1679
|
*/
|
|
1680
|
-
constant:
|
|
1680
|
+
constant: j.defineModifier(),
|
|
1681
1681
|
/**
|
|
1682
1682
|
[Modifier](#highlight.Tag^defineModifier) used to indicate that
|
|
1683
1683
|
a [variable](#highlight.tags.variableName) or [property
|
|
1684
1684
|
name](#highlight.tags.propertyName) is being called or defined
|
|
1685
1685
|
as a function.
|
|
1686
1686
|
*/
|
|
1687
|
-
function:
|
|
1687
|
+
function: j.defineModifier(),
|
|
1688
1688
|
/**
|
|
1689
1689
|
[Modifier](#highlight.Tag^defineModifier) that can be applied to
|
|
1690
1690
|
[names](#highlight.tags.name) to indicate that they belong to
|
|
1691
1691
|
the language's standard environment.
|
|
1692
1692
|
*/
|
|
1693
|
-
standard:
|
|
1693
|
+
standard: j.defineModifier(),
|
|
1694
1694
|
/**
|
|
1695
1695
|
[Modifier](#highlight.Tag^defineModifier) that indicates a given
|
|
1696
1696
|
[names](#highlight.tags.name) is local to some scope.
|
|
1697
1697
|
*/
|
|
1698
|
-
local:
|
|
1698
|
+
local: j.defineModifier(),
|
|
1699
1699
|
/**
|
|
1700
1700
|
A generic variant [modifier](#highlight.Tag^defineModifier) that
|
|
1701
1701
|
can be used to tag language-specific alternative variants of
|
|
@@ -1704,7 +1704,7 @@ const a = V.define, ye = a(), F = a(), Je = a(F), We = a(F), X = a(), xe = a(X),
|
|
|
1704
1704
|
[variable name](#highlight.tags.variableName) tags, since those
|
|
1705
1705
|
come up a lot.
|
|
1706
1706
|
*/
|
|
1707
|
-
special:
|
|
1707
|
+
special: j.defineModifier()
|
|
1708
1708
|
};
|
|
1709
1709
|
Ht([
|
|
1710
1710
|
{ tag: l.link, class: "tok-link" },
|
|
@@ -1738,44 +1738,44 @@ Ht([
|
|
|
1738
1738
|
{ tag: l.invalid, class: "tok-invalid" },
|
|
1739
1739
|
{ tag: l.punctuation, class: "tok-punctuation" }
|
|
1740
1740
|
]);
|
|
1741
|
-
const Vt = "#c72727",
|
|
1741
|
+
const Vt = "#c72727", jt = "#9b5700", Rt = "#067934", Dt = "#0063d7", Ut = {
|
|
1742
1742
|
red: Vt,
|
|
1743
|
-
orange:
|
|
1744
|
-
green:
|
|
1745
|
-
blue:
|
|
1743
|
+
orange: jt,
|
|
1744
|
+
green: Rt,
|
|
1745
|
+
blue: Dt,
|
|
1746
1746
|
invalid: "#ffffff"
|
|
1747
|
-
},
|
|
1747
|
+
}, Jt = (r) => pt.define([
|
|
1748
1748
|
{
|
|
1749
1749
|
tag: l.keyword,
|
|
1750
|
-
color:
|
|
1750
|
+
color: r.red
|
|
1751
1751
|
},
|
|
1752
1752
|
{
|
|
1753
1753
|
tag: [l.name, l.deleted, l.character, l.propertyName, l.macroName],
|
|
1754
|
-
color:
|
|
1754
|
+
color: r.green
|
|
1755
1755
|
},
|
|
1756
1756
|
{
|
|
1757
1757
|
tag: [l.function(l.variableName), l.labelName],
|
|
1758
|
-
color:
|
|
1758
|
+
color: r.blue
|
|
1759
1759
|
},
|
|
1760
1760
|
{
|
|
1761
1761
|
tag: [l.color, l.constant(l.name), l.standard(l.name)],
|
|
1762
|
-
color:
|
|
1762
|
+
color: r.red
|
|
1763
1763
|
},
|
|
1764
1764
|
{
|
|
1765
1765
|
tag: [l.definition(l.name), l.separator],
|
|
1766
|
-
color:
|
|
1766
|
+
color: r.red
|
|
1767
1767
|
},
|
|
1768
1768
|
{
|
|
1769
1769
|
tag: [l.typeName, l.className, l.number, l.changed, l.annotation, l.modifier, l.self, l.namespace],
|
|
1770
|
-
color:
|
|
1770
|
+
color: r.orange
|
|
1771
1771
|
},
|
|
1772
1772
|
{
|
|
1773
1773
|
tag: [l.operator, l.operatorKeyword, l.url, l.escape, l.regexp, l.link, l.special(l.string)],
|
|
1774
|
-
color:
|
|
1774
|
+
color: r.blue
|
|
1775
1775
|
},
|
|
1776
1776
|
{
|
|
1777
1777
|
tag: [l.meta, l.comment],
|
|
1778
|
-
color:
|
|
1778
|
+
color: r.orange
|
|
1779
1779
|
},
|
|
1780
1780
|
{
|
|
1781
1781
|
tag: l.strong,
|
|
@@ -1791,80 +1791,77 @@ const Vt = "#c72727", Rt = "#9b5700", Dt = "#067934", Ut = "#0063d7", Jt = {
|
|
|
1791
1791
|
},
|
|
1792
1792
|
{
|
|
1793
1793
|
tag: l.link,
|
|
1794
|
-
color:
|
|
1794
|
+
color: r.orange,
|
|
1795
1795
|
textDecoration: "underline"
|
|
1796
1796
|
},
|
|
1797
1797
|
{
|
|
1798
1798
|
tag: l.heading,
|
|
1799
1799
|
fontWeight: "bold",
|
|
1800
|
-
color:
|
|
1800
|
+
color: r.blue
|
|
1801
1801
|
},
|
|
1802
1802
|
{
|
|
1803
1803
|
tag: [l.atom, l.bool, l.special(l.variableName)],
|
|
1804
|
-
color:
|
|
1804
|
+
color: r.red
|
|
1805
1805
|
},
|
|
1806
1806
|
{
|
|
1807
1807
|
tag: [l.processingInstruction, l.string, l.inserted],
|
|
1808
|
-
color:
|
|
1808
|
+
color: r.blue
|
|
1809
1809
|
},
|
|
1810
1810
|
{
|
|
1811
1811
|
tag: l.invalid,
|
|
1812
|
-
color:
|
|
1813
|
-
}
|
|
1814
|
-
]),
|
|
1815
|
-
var ve = /* @__PURE__ */ ((
|
|
1816
|
-
const
|
|
1817
|
-
[re.JSON]:
|
|
1818
|
-
[re.XML]:
|
|
1819
|
-
[re.JAVASCRIPT]:
|
|
1820
|
-
[re.JAVA]:
|
|
1821
|
-
},
|
|
1822
|
-
loadLang: async () =>
|
|
1812
|
+
color: r.invalid
|
|
1813
|
+
}
|
|
1814
|
+
]), Wt = ct(Jt(Ut));
|
|
1815
|
+
var ve = /* @__PURE__ */ ((r) => (r.INLINE = "inline", r.SINGLELINE = "singleline", r.MULTILINE = "multiline", r))(ve || {}), re = /* @__PURE__ */ ((r) => (r.JSON = "json", r.XML = "xml", r.JAVA = "java", r.JAVASCRIPT = "javascript", r))(re || {}), de = /* @__PURE__ */ ((r) => (r.ACTION = "action", r.CHANGE = "change", r))(de || {});
|
|
1816
|
+
const Gt = {
|
|
1817
|
+
[re.JSON]: gt,
|
|
1818
|
+
[re.XML]: mt,
|
|
1819
|
+
[re.JAVASCRIPT]: bt,
|
|
1820
|
+
[re.JAVA]: yt
|
|
1821
|
+
}, Kt = (r) => ({
|
|
1822
|
+
loadLang: async () => Gt[r]
|
|
1823
1823
|
});
|
|
1824
1824
|
let Ge = 0;
|
|
1825
|
-
const
|
|
1825
|
+
const qt = {
|
|
1826
1826
|
beforeCreate() {
|
|
1827
1827
|
this.uuid = Ge.toString(), Ge += 1;
|
|
1828
1828
|
}
|
|
1829
|
-
},
|
|
1829
|
+
}, Ft = { key: 0 }, Xt = /* @__PURE__ */ ae("path", {
|
|
1830
1830
|
fill: "#00112C",
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
"clip-rule": "evenodd"
|
|
1834
|
-
}, null, -1)), Qt = /* @__PURE__ */ tt(() => /* @__PURE__ */ ae("path", {
|
|
1831
|
+
d: "M14.75 1.25V6.75H13.25V3.81083L10.0001 7.06072L8.93945 6.00006L12.1895 2.75H9.25V1.25H14.75Z"
|
|
1832
|
+
}, null, -1), Zt = /* @__PURE__ */ ae("path", {
|
|
1835
1833
|
fill: "#00112C",
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
},
|
|
1840
|
-
|
|
1841
|
-
return z(), le("svg", qe({ role: "img" }, n.$attrs, {
|
|
1834
|
+
d: "M2.75 12.1895V9.25H1.25V14.75H6.75V13.25H3.81083L7.06072 10.0001L6.00006 8.93945L2.75 12.1895Z"
|
|
1835
|
+
}, null, -1);
|
|
1836
|
+
function Qt(r, e, t, n, i, s) {
|
|
1837
|
+
return z(), le("svg", qe({ role: "img" }, r.$attrs, {
|
|
1838
|
+
class: "ui-assets-icons-16",
|
|
1842
1839
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1843
1840
|
width: "16",
|
|
1844
1841
|
height: "16",
|
|
1845
1842
|
fill: "none"
|
|
1846
1843
|
}), [
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1844
|
+
r.$attrs["svg-title"] ? (z(), le("title", Ft, Ae(r.$attrs["svg-title"]), 1)) : q("", !0),
|
|
1845
|
+
Xt,
|
|
1846
|
+
Zt
|
|
1850
1847
|
], 16);
|
|
1851
1848
|
}
|
|
1852
|
-
const
|
|
1849
|
+
const Yt = /* @__PURE__ */ Fe(qt, [["render", Qt]]), Ke = {
|
|
1853
1850
|
"en-US": {
|
|
1854
1851
|
run: "Run",
|
|
1855
1852
|
expand: "Expand"
|
|
1856
1853
|
}
|
|
1857
|
-
},
|
|
1854
|
+
}, en = Ye({
|
|
1858
1855
|
i18n: { messages: Ke },
|
|
1859
1856
|
name: "bento-code-snippet",
|
|
1860
1857
|
components: {
|
|
1861
|
-
BentoTypography:
|
|
1862
|
-
BentoButton:
|
|
1863
|
-
BentoDropdown:
|
|
1864
|
-
Copy:
|
|
1865
|
-
BaseModal:
|
|
1866
|
-
BentoLoadingIndicator:
|
|
1867
|
-
ExpandIcon:
|
|
1858
|
+
BentoTypography: vt,
|
|
1859
|
+
BentoButton: _t,
|
|
1860
|
+
BentoDropdown: xt,
|
|
1861
|
+
Copy: St,
|
|
1862
|
+
BaseModal: kt,
|
|
1863
|
+
BentoLoadingIndicator: Ct,
|
|
1864
|
+
ExpandIcon: Yt
|
|
1868
1865
|
},
|
|
1869
1866
|
directives: { BentoTooltipDirective: wt },
|
|
1870
1867
|
props: {
|
|
@@ -1874,7 +1871,7 @@ const en = /* @__PURE__ */ Ze(Ft, [["render", Yt], ["__scopeId", "data-v-012ee7f
|
|
|
1874
1871
|
variant: {
|
|
1875
1872
|
type: String,
|
|
1876
1873
|
default: ve.MULTILINE,
|
|
1877
|
-
validator: (
|
|
1874
|
+
validator: (r) => Object.values(ve).includes(r)
|
|
1878
1875
|
},
|
|
1879
1876
|
/**
|
|
1880
1877
|
* Language name for syntax highlighting rules
|
|
@@ -1882,7 +1879,7 @@ const en = /* @__PURE__ */ Ze(Ft, [["render", Yt], ["__scopeId", "data-v-012ee7f
|
|
|
1882
1879
|
lang: {
|
|
1883
1880
|
type: String,
|
|
1884
1881
|
default: re.JSON,
|
|
1885
|
-
validator: (
|
|
1882
|
+
validator: (r) => Object.values(re).includes(r)
|
|
1886
1883
|
},
|
|
1887
1884
|
/**
|
|
1888
1885
|
* Label to show in the action-bar, describing the language
|
|
@@ -1938,55 +1935,55 @@ const en = /* @__PURE__ */ Ze(Ft, [["render", Yt], ["__scopeId", "data-v-012ee7f
|
|
|
1938
1935
|
}
|
|
1939
1936
|
},
|
|
1940
1937
|
emits: [de.ACTION, de.CHANGE],
|
|
1941
|
-
setup(
|
|
1942
|
-
const { t } =
|
|
1943
|
-
}, o = ue(() =>
|
|
1938
|
+
setup(r, { emit: e }) {
|
|
1939
|
+
const { t } = Nt({ messages: Ke }), n = ge(null), i = [], s = () => {
|
|
1940
|
+
}, o = ue(() => r.langLabel ?? r.lang.toUpperCase()), u = ue(() => r.variant === ve.INLINE), h = ue(() => ({
|
|
1944
1941
|
"b-code-snippet--inline": u.value,
|
|
1945
1942
|
"b-code-snippet--scrollable": !u.value
|
|
1946
1943
|
})), x = ue(() => ({
|
|
1947
|
-
"b-code-snippet__code-area-content--editable":
|
|
1948
|
-
})), { loadLang:
|
|
1949
|
-
|
|
1950
|
-
const g = await
|
|
1951
|
-
M.value =
|
|
1944
|
+
"b-code-snippet__code-area-content--editable": r.editable
|
|
1945
|
+
})), { loadLang: w } = Kt(r.lang), C = Te(), A = Te(), B = new Ne(), N = new Ne(), P = new Ne(), M = ge(null), D = ge(0);
|
|
1946
|
+
et(async () => {
|
|
1947
|
+
const g = await w();
|
|
1948
|
+
M.value = r.content;
|
|
1952
1949
|
const b = ({ state: p }) => {
|
|
1953
1950
|
M.value = p.doc.toString();
|
|
1954
1951
|
}, f = [
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
N.of(
|
|
1959
|
-
P.of(
|
|
1960
|
-
|
|
1952
|
+
at(),
|
|
1953
|
+
ut.of([ht]),
|
|
1954
|
+
B.of(g()),
|
|
1955
|
+
N.of(Wt),
|
|
1956
|
+
P.of(je.readOnly.of(!r.editable)),
|
|
1957
|
+
Ve.updateListener.of((p) => b(p))
|
|
1961
1958
|
];
|
|
1962
|
-
|
|
1963
|
-
const y =
|
|
1964
|
-
doc:
|
|
1959
|
+
r.variant === "multiline" && f.push([ft(), dt()]);
|
|
1960
|
+
const y = je.create({
|
|
1961
|
+
doc: r.content,
|
|
1965
1962
|
extensions: [...f]
|
|
1966
1963
|
});
|
|
1967
|
-
D.value = y.doc.length, A.value = new
|
|
1964
|
+
D.value = y.doc.length, A.value = new Ve({
|
|
1968
1965
|
state: y,
|
|
1969
|
-
parent:
|
|
1966
|
+
parent: C.value
|
|
1970
1967
|
});
|
|
1971
|
-
}),
|
|
1972
|
-
() =>
|
|
1968
|
+
}), tt(
|
|
1969
|
+
() => r.content,
|
|
1973
1970
|
() => {
|
|
1974
|
-
if (
|
|
1975
|
-
const g =
|
|
1971
|
+
if (r.content !== M.value) {
|
|
1972
|
+
const g = r.content.length;
|
|
1976
1973
|
A.value.dispatch({
|
|
1977
1974
|
changes: {
|
|
1978
1975
|
from: 0,
|
|
1979
1976
|
to: D.value,
|
|
1980
|
-
insert:
|
|
1977
|
+
insert: r.content
|
|
1981
1978
|
}
|
|
1982
1979
|
}), D.value = g;
|
|
1983
1980
|
}
|
|
1984
1981
|
}
|
|
1985
1982
|
);
|
|
1986
|
-
const U = ue(() => t(
|
|
1983
|
+
const U = ue(() => t(r.actionableText)), S = () => {
|
|
1987
1984
|
e(de.ACTION, M.value);
|
|
1988
1985
|
};
|
|
1989
|
-
|
|
1986
|
+
nt(() => {
|
|
1990
1987
|
M.value !== null && e(de.CHANGE, M.value);
|
|
1991
1988
|
});
|
|
1992
1989
|
const J = ge(!1);
|
|
@@ -1995,11 +1992,11 @@ const en = /* @__PURE__ */ Ze(Ft, [["render", Yt], ["__scopeId", "data-v-012ee7f
|
|
|
1995
1992
|
availableLanguages: i,
|
|
1996
1993
|
codeAreaContentConditionalClasses: x,
|
|
1997
1994
|
conditionalClasses: h,
|
|
1998
|
-
container:
|
|
1995
|
+
container: C,
|
|
1999
1996
|
currentContents: M,
|
|
2000
1997
|
displayedLang: o,
|
|
2001
1998
|
editor: A,
|
|
2002
|
-
selectedLanguage:
|
|
1999
|
+
selectedLanguage: n,
|
|
2003
2000
|
showModal: J,
|
|
2004
2001
|
isInlineVariant: u,
|
|
2005
2002
|
// Methods
|
|
@@ -2011,65 +2008,65 @@ const en = /* @__PURE__ */ Ze(Ft, [["render", Yt], ["__scopeId", "data-v-012ee7f
|
|
|
2011
2008
|
};
|
|
2012
2009
|
}
|
|
2013
2010
|
});
|
|
2014
|
-
const
|
|
2011
|
+
const tn = (r) => (ot("data-v-fdff494b"), r = r(), lt(), r), nn = {
|
|
2015
2012
|
key: 0,
|
|
2016
2013
|
class: "b-code-snippet__action-bar"
|
|
2017
|
-
},
|
|
2014
|
+
}, rn = { class: "b-code-snippet__action-bar--start" }, sn = { class: "b-code-snippet__action-bar--end" }, on = {
|
|
2018
2015
|
key: 1,
|
|
2019
2016
|
class: "b-code-snippet__code-area"
|
|
2020
|
-
},
|
|
2021
|
-
function
|
|
2022
|
-
const o = K("bento-dropdown"), u = K("bento-typography"), h = K("bento-loading-indicator"), x = K("copy"),
|
|
2017
|
+
}, ln = { key: 2 }, an = /* @__PURE__ */ tn(() => /* @__PURE__ */ ae("div", { class: "b-code-snippet__empty-state" }, "Nothing to show", -1));
|
|
2018
|
+
function un(r, e, t, n, i, s) {
|
|
2019
|
+
const o = K("bento-dropdown"), u = K("bento-typography"), h = K("bento-loading-indicator"), x = K("copy"), w = K("expand-icon"), C = K("bento-button"), A = K("bento-code-snippet"), B = K("base-modal");
|
|
2023
2020
|
return z(), le("div", {
|
|
2024
|
-
class:
|
|
2021
|
+
class: $e(["b-code-snippet", r.conditionalClasses])
|
|
2025
2022
|
}, [
|
|
2026
|
-
|
|
2027
|
-
ae("div",
|
|
2028
|
-
|
|
2023
|
+
r.isInlineVariant ? q("", !0) : (z(), le("section", nn, [
|
|
2024
|
+
ae("div", rn, [
|
|
2025
|
+
r.availableLanguages.length > 0 ? (z(), oe(o, qe({
|
|
2029
2026
|
key: 0,
|
|
2030
|
-
modelValue:
|
|
2031
|
-
"onUpdate:modelValue": e[0] || (e[0] = (N) =>
|
|
2032
|
-
},
|
|
2033
|
-
disabled:
|
|
2034
|
-
items:
|
|
2027
|
+
modelValue: r.selectedLanguage,
|
|
2028
|
+
"onUpdate:modelValue": e[0] || (e[0] = (N) => r.selectedLanguage = N)
|
|
2029
|
+
}, r.$props, {
|
|
2030
|
+
disabled: r.availableLanguages.length === 1,
|
|
2031
|
+
items: r.availableLanguages,
|
|
2035
2032
|
class: "b-code-snippet__language-picker",
|
|
2036
|
-
onInput:
|
|
2033
|
+
onInput: r.handleChangeLanguage
|
|
2037
2034
|
}), null, 16, ["modelValue", "disabled", "items", "onInput"])) : q("", !0),
|
|
2038
2035
|
me(u, {
|
|
2039
2036
|
el: "span",
|
|
2040
2037
|
stronger: ""
|
|
2041
2038
|
}, {
|
|
2042
2039
|
default: fe(() => [
|
|
2043
|
-
|
|
2040
|
+
He(Ae(r.displayedLang), 1)
|
|
2044
2041
|
]),
|
|
2045
2042
|
_: 1
|
|
2046
2043
|
})
|
|
2047
2044
|
]),
|
|
2048
|
-
ae("div",
|
|
2049
|
-
|
|
2050
|
-
|
|
2045
|
+
ae("div", sn, [
|
|
2046
|
+
r.loading ? (z(), oe(h, { key: 0 })) : q("", !0),
|
|
2047
|
+
r.currentContents !== null ? (z(), oe(x, {
|
|
2051
2048
|
key: 1,
|
|
2052
2049
|
class: "b-structured-list__icon",
|
|
2053
|
-
text:
|
|
2050
|
+
text: r.currentContents
|
|
2054
2051
|
}, null, 8, ["text"])) : q("", !0),
|
|
2055
|
-
|
|
2052
|
+
r.expandable ? (z(), oe(C, {
|
|
2056
2053
|
key: 2,
|
|
2057
2054
|
variant: "tertiary",
|
|
2058
2055
|
condensed: "",
|
|
2059
|
-
"aria-label":
|
|
2060
|
-
onClick: e[1] || (e[1] = (N) =>
|
|
2056
|
+
"aria-label": r.t("expand"),
|
|
2057
|
+
onClick: e[1] || (e[1] = (N) => r.showModal = !0)
|
|
2061
2058
|
}, {
|
|
2062
2059
|
iconLeft: fe(() => [
|
|
2063
|
-
me(
|
|
2060
|
+
me(w)
|
|
2064
2061
|
]),
|
|
2065
2062
|
_: 1
|
|
2066
2063
|
}, 8, ["aria-label"])) : q("", !0),
|
|
2067
|
-
|
|
2064
|
+
r.actionable ? (z(), oe(C, {
|
|
2068
2065
|
key: 3,
|
|
2069
2066
|
variant: "primary",
|
|
2070
2067
|
tertiary: "",
|
|
2071
2068
|
condensed: "",
|
|
2072
|
-
onClick:
|
|
2069
|
+
onClick: r.onActionClicked
|
|
2073
2070
|
}, {
|
|
2074
2071
|
iconLeft: fe(() => [
|
|
2075
2072
|
me(u, {
|
|
@@ -2077,7 +2074,7 @@ function fn(n, e, t, r, i, s) {
|
|
|
2077
2074
|
class: "b-code-snippet__action-button"
|
|
2078
2075
|
}, {
|
|
2079
2076
|
default: fe(() => [
|
|
2080
|
-
|
|
2077
|
+
He(Ae(r.runText), 1)
|
|
2081
2078
|
]),
|
|
2082
2079
|
_: 1
|
|
2083
2080
|
})
|
|
@@ -2086,36 +2083,36 @@ function fn(n, e, t, r, i, s) {
|
|
|
2086
2083
|
}, 8, ["onClick"])) : q("", !0)
|
|
2087
2084
|
])
|
|
2088
2085
|
])),
|
|
2089
|
-
|
|
2086
|
+
r.content || r.editable ? (z(), le("code", on, [
|
|
2090
2087
|
ae("div", {
|
|
2091
2088
|
ref: "container",
|
|
2092
|
-
class:
|
|
2089
|
+
class: $e(["b-code-snippet__code-area-content", r.codeAreaContentConditionalClasses])
|
|
2093
2090
|
}, null, 2)
|
|
2094
|
-
])) : (z(), le("section",
|
|
2095
|
-
|
|
2096
|
-
|
|
2091
|
+
])) : (z(), le("section", ln, [
|
|
2092
|
+
rt(r.$slots, "empty-state", {}, () => [
|
|
2093
|
+
an
|
|
2097
2094
|
], !0)
|
|
2098
2095
|
])),
|
|
2099
|
-
|
|
2096
|
+
r.expandable ? (z(), oe(B, {
|
|
2100
2097
|
key: 3,
|
|
2101
2098
|
class: "b-code-snippet__modal",
|
|
2102
2099
|
"hide-close-button": !0,
|
|
2103
2100
|
"custom-padding": "0px",
|
|
2104
2101
|
"is-dismissible": !0,
|
|
2105
|
-
"is-open":
|
|
2102
|
+
"is-open": r.showModal,
|
|
2106
2103
|
size: "large",
|
|
2107
|
-
onCloseModal: e[2] || (e[2] = (N) =>
|
|
2104
|
+
onCloseModal: e[2] || (e[2] = (N) => r.showModal = !1)
|
|
2108
2105
|
}, {
|
|
2109
2106
|
content: fe(() => [
|
|
2110
|
-
me(A,
|
|
2107
|
+
me(A, it(st({ ...r.$props, expandable: !1 })), null, 16)
|
|
2111
2108
|
]),
|
|
2112
2109
|
_: 1
|
|
2113
2110
|
}, 8, ["is-open"])) : q("", !0)
|
|
2114
2111
|
], 2);
|
|
2115
2112
|
}
|
|
2116
|
-
const
|
|
2113
|
+
const In = /* @__PURE__ */ Fe(en, [["render", un], ["__scopeId", "data-v-fdff494b"]]);
|
|
2117
2114
|
export {
|
|
2118
|
-
|
|
2115
|
+
In as BentoCodeSnippet,
|
|
2119
2116
|
de as BentoCodeSnippetEvent,
|
|
2120
2117
|
re as BentoCodeSnippetSupportedLanguage,
|
|
2121
2118
|
ve as BentoCodeSnippetVariant
|