@adyen/bento-vue3 1.4.1 → 1.5.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/components.d.ts +4 -0
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-lazy-load/data-grid-lazy-load.vue.d.ts +17 -0
- package/dist/@types/packages/vue2/src/components/data-grid/components/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useCalculateColumnHeadersTopPosition/useCalculateColumnHeadersTopPosition.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/useLazyLoading/useLazyLoading.d.ts +8 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +28 -2
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +455 -123
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +13 -13
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-button/all-filters-modal-button.vue.d.ts +4 -4
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +12 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter-button/base-filter-button.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/filter-bar/components/date-range-filter/date-range-filter.vue.d.ts +5 -1
- package/dist/@types/packages/vue2/src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue.d.ts +12 -3
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.types.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/form-layout/components/form-layout-group/form-layout-group.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/image/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/base-button/base-button.vue.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/internal/button-actions-with-menu/button-actions-with-menu.vue.d.ts +24 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/popover/popover.vue.d.ts +14 -3
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.types.d.ts +1 -9
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.utils.d.ts +5 -21
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +122 -72
- package/dist/@types/packages/vue2/src/components/segmented-control/segmented-control.vue.d.ts +3 -2
- package/dist/@types/packages/vue2/src/components/stepper/components/step/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/stepper/components/step/step.vue.d.ts +35 -0
- package/dist/@types/packages/vue2/src/components/stepper/composables/useKeyboardNavigation/useKeyboardNavigation.d.ts +15 -0
- package/dist/@types/packages/vue2/src/components/stepper/index.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/stepper/stepper.keys.d.ts +3 -0
- package/dist/@types/packages/vue2/src/components/stepper/stepper.types.d.ts +24 -0
- package/dist/@types/packages/vue2/src/components/stepper/stepper.vue.d.ts +44 -0
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item-amount/summary-grid-item-amount.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +363 -82
- package/dist/@types/packages/vue2/src/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/types/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/types/lazy-load.d.ts +1 -0
- package/dist/accordion.js +3 -3
- package/dist/alert.js +4 -4
- package/dist/assets/base-button.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/calendar.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/index.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/index39.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 -0
- 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/tooltip.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +5 -5
- package/dist/card.js +4 -4
- package/dist/checkbox.js +6 -6
- package/dist/chunks/base-button.9740f320.js +116 -0
- package/dist/chunks/base-button.9740f320.js.map +1 -0
- package/dist/chunks/base-modal.be77971f.js +296 -0
- package/dist/chunks/base-modal.be77971f.js.map +1 -0
- package/dist/chunks/{button.7d09c245.js → button.7072457f.js} +3 -3
- package/dist/chunks/{button.7d09c245.js.map → button.7072457f.js.map} +1 -1
- package/dist/chunks/{calendar.0e42130b.js → calendar.1e50c7d1.js} +5 -5
- package/dist/chunks/{calendar.0e42130b.js.map → calendar.1e50c7d1.js.map} +1 -1
- package/dist/chunks/{checkbox.17462cb0.js → checkbox.638bab98.js} +24 -24
- package/dist/chunks/{checkbox.17462cb0.js.map → checkbox.638bab98.js.map} +1 -1
- package/dist/chunks/{chevron-up.c03b58f8.js → chevron-up.9bf21068.js} +3 -3
- package/dist/chunks/{chevron-up.c03b58f8.js.map → chevron-up.9bf21068.js.map} +1 -1
- package/dist/chunks/{controls-group.0d6db9c0.js → controls-group.efcf4e8d.js} +2 -2
- package/dist/chunks/{controls-group.0d6db9c0.js.map → controls-group.efcf4e8d.js.map} +1 -1
- package/dist/chunks/{copy.c9a29be0.js → copy.527c3d76.js} +3 -3
- package/dist/chunks/{copy.c9a29be0.js.map → copy.527c3d76.js.map} +1 -1
- package/dist/chunks/debounce.b5ef6acf.js +10 -0
- package/dist/chunks/debounce.b5ef6acf.js.map +1 -0
- package/dist/chunks/{dropdown-default-textbox.cd789a95.js → dropdown-default-textbox.a1789dc7.js} +19 -18
- package/dist/chunks/{dropdown-default-textbox.cd789a95.js.map → dropdown-default-textbox.a1789dc7.js.map} +1 -1
- package/dist/chunks/{dropdown.ff4f94a8.js → dropdown.22e51667.js} +9 -7
- package/dist/chunks/dropdown.22e51667.js.map +1 -0
- package/dist/chunks/{error-message.8c67a507.js → error-message.37b6c7aa.js} +2 -2
- package/dist/chunks/{error-message.8c67a507.js.map → error-message.37b6c7aa.js.map} +1 -1
- package/dist/chunks/{footer-actions.a587e374.js → footer-actions.5275203a.js} +3 -3
- package/dist/chunks/{footer-actions.a587e374.js.map → footer-actions.5275203a.js.map} +1 -1
- package/dist/chunks/{grid-layout.984317d7.js → grid-layout.c98e6bc7.js} +2 -2
- package/dist/chunks/{grid-layout.984317d7.js.map → grid-layout.c98e6bc7.js.map} +1 -1
- package/dist/chunks/{index.77c651df.js → index.32ed68b7.js} +2 -2
- package/dist/chunks/{index.77c651df.js.map → index.32ed68b7.js.map} +1 -1
- package/dist/chunks/{index.fdb0c13d.js → index.604da8e9.js} +3 -3
- package/dist/chunks/{index.fdb0c13d.js.map → index.604da8e9.js.map} +1 -1
- package/dist/chunks/{index.fd1cd23a.js → index.a57930ba.js} +197 -188
- package/dist/chunks/index.a57930ba.js.map +1 -0
- package/dist/chunks/{index.ee69b530.js → index.c22c4278.js} +6 -6
- package/dist/chunks/{index.ee69b530.js.map → index.c22c4278.js.map} +1 -1
- package/dist/chunks/{index.140bf28f.js → index.c62ea69f.js} +2 -2
- package/dist/chunks/{index.140bf28f.js.map → index.c62ea69f.js.map} +1 -1
- package/dist/chunks/{index.450b70d5.js → index.dd20095f.js} +3 -3
- package/dist/chunks/{index.450b70d5.js.map → index.dd20095f.js.map} +1 -1
- package/dist/chunks/{debounce.f8d92e44.js → keyboard-navigation.ca47dfa8.js} +11 -17
- package/dist/chunks/keyboard-navigation.ca47dfa8.js.map +1 -0
- package/dist/chunks/{listbox-option-tag.ffe70226.js → listbox-option-tag.fa70334e.js} +3 -3
- package/dist/chunks/{listbox-option-tag.ffe70226.js.map → listbox-option-tag.fa70334e.js.map} +1 -1
- package/dist/chunks/{listbox.f535a736.js → listbox.4205c0de.js} +12 -11
- package/dist/chunks/{listbox.f535a736.js.map → listbox.4205c0de.js.map} +1 -1
- package/dist/chunks/{loading-button.bc6e3967.js → loading-button.41c15584.js} +2 -2
- package/dist/chunks/{loading-button.bc6e3967.js.map → loading-button.41c15584.js.map} +1 -1
- package/dist/chunks/{tooltip.973c86d3.js → tooltip.c8350cd0.js} +37 -36
- package/dist/chunks/{tooltip.973c86d3.js.map → tooltip.c8350cd0.js.map} +1 -1
- package/dist/chunks/use-has-slot.3daaffc6.js +17 -0
- package/dist/chunks/use-has-slot.3daaffc6.js.map +1 -0
- package/dist/code-snippet.js +469 -466
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +963 -834
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +8 -8
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +21 -21
- package/dist/empty-state.js.map +1 -1
- package/dist/filter-bar.js +853 -784
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +72 -51
- package/dist/form-layout.js.map +1 -1
- package/dist/header.js +190 -112
- package/dist/header.js.map +1 -1
- package/dist/image.js +3 -1
- package/dist/index.js +219 -211
- package/dist/index.js.map +1 -1
- package/dist/info-icon.js +2 -2
- package/dist/input-field.js +5 -5
- package/dist/internal.js +7 -7
- package/dist/link.js +2 -2
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +114 -104
- package/dist/menu.js.map +1 -1
- package/dist/modal.js +33 -30
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +4 -4
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +72 -61
- package/dist/popover.js.map +1 -1
- package/dist/popper-container.js +1238 -192
- package/dist/popper-container.js.map +1 -1
- package/dist/radio-group.js +5 -5
- package/dist/search-bar.js +3 -3
- package/dist/segmented-control.js +15 -15
- package/dist/segmented-control.js.map +1 -1
- package/dist/sidepanel.js +7 -7
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +2 -2
- package/dist/stepper.js +276 -0
- package/dist/stepper.js.map +1 -0
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +5 -5
- package/dist/tabs.js +2 -2
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +5 -5
- package/dist/toast.js +4 -4
- package/dist/toggle.js +12 -12
- package/dist/toggle.js.map +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +3 -3
- package/dist/chunks/base-button.c4ac1ad1.js +0 -108
- package/dist/chunks/base-button.c4ac1ad1.js.map +0 -1
- package/dist/chunks/base-modal.db7a9829.js +0 -291
- package/dist/chunks/base-modal.db7a9829.js.map +0 -1
- package/dist/chunks/debounce.f8d92e44.js.map +0 -1
- package/dist/chunks/dropdown.ff4f94a8.js.map +0 -1
- package/dist/chunks/index.fd1cd23a.js.map +0 -1
- package/dist/chunks/use-has-slot.9fac7123.js +0 -16
- package/dist/chunks/use-has-slot.9fac7123.js.map +0 -1
package/dist/code-snippet.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { openBlock as
|
|
2
|
-
import { highlightActiveLine as ut, keymap as
|
|
1
|
+
import { openBlock as z, createElementBlock as le, mergeProps as qe, toDisplayString as Ae, createCommentVNode as q, pushScopeId as Fe, popScopeId as Xe, createElementVNode as ae, defineComponent as nt, ref as ge, computed as ue, shallowRef as $e, onMounted as rt, watch as it, watchEffect as st, resolveComponent as K, normalizeClass as Te, createBlock as oe, createVNode as me, withCtx as fe, createTextVNode as je, renderSlot as ot, normalizeProps as lt, guardReactiveProps as at } from "vue";
|
|
2
|
+
import { highlightActiveLine as ut, keymap as ft, EditorView as He, lineNumbers as ht } from "@codemirror/view";
|
|
3
3
|
import { Compartment as Ne, EditorState as Ve } from "@codemirror/state";
|
|
4
4
|
import { indentWithTab as dt, history as ct } from "@codemirror/commands";
|
|
5
5
|
import { syntaxHighlighting as pt, HighlightStyle as gt } from "@codemirror/language";
|
|
@@ -7,19 +7,19 @@ import { json as mt } from "@codemirror/lang-json";
|
|
|
7
7
|
import { xml as bt } from "@codemirror/lang-xml";
|
|
8
8
|
import { javascript as yt } from "@codemirror/lang-javascript";
|
|
9
9
|
import { java as xt } from "@codemirror/lang-java";
|
|
10
|
-
import { B as kt } from "./chunks/dropdown.
|
|
11
|
-
import { f as Ct } from "./chunks/base-modal.
|
|
12
|
-
import { a as
|
|
13
|
-
import { B as
|
|
14
|
-
import { b as wt } from "./chunks/tooltip.
|
|
10
|
+
import { B as kt } from "./chunks/dropdown.22e51667.js";
|
|
11
|
+
import { f as Ct } from "./chunks/base-modal.be77971f.js";
|
|
12
|
+
import { a as vt } from "./chunks/button.7072457f.js";
|
|
13
|
+
import { B as _t } from "./chunks/index.32ed68b7.js";
|
|
14
|
+
import { b as wt } from "./chunks/tooltip.c8350cd0.js";
|
|
15
15
|
import { BentoLoadingIndicator as Nt } from "./loading-indicator.js";
|
|
16
16
|
import { u as St } from "./chunks/i18n.6c402773.js";
|
|
17
17
|
import { _ as Ze } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
18
|
-
import { C as At } from "./chunks/copy.
|
|
19
|
-
import "./assets/
|
|
18
|
+
import { C as At } from "./chunks/copy.527c3d76.js";
|
|
19
|
+
import "./assets/index17.css";
|
|
20
20
|
const It = 1024;
|
|
21
21
|
let Bt = 0;
|
|
22
|
-
class
|
|
22
|
+
class v {
|
|
23
23
|
/**
|
|
24
24
|
Create a new node prop type.
|
|
25
25
|
*/
|
|
@@ -41,31 +41,31 @@ class _ {
|
|
|
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 r = e(t);
|
|
45
|
+
return r === void 0 ? null : [this, r];
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (
|
|
54
|
-
throw new RangeError("Invalid value for isolate: " +
|
|
55
|
-
return
|
|
49
|
+
v.closedBy = new v({ deserialize: (n) => n.split(" ") });
|
|
50
|
+
v.openedBy = new v({ deserialize: (n) => n.split(" ") });
|
|
51
|
+
v.group = new v({ deserialize: (n) => n.split(" ") });
|
|
52
|
+
v.isolate = new v({ deserialize: (n) => {
|
|
53
|
+
if (n && n != "rtl" && n != "ltr" && n != "auto")
|
|
54
|
+
throw new RangeError("Invalid value for isolate: " + n);
|
|
55
|
+
return n || "auto";
|
|
56
56
|
} });
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
class
|
|
61
|
-
constructor(e, t,
|
|
62
|
-
this.tree = e, this.overlay = t, this.parser =
|
|
57
|
+
v.contextHash = new v({ perNode: !0 });
|
|
58
|
+
v.lookAhead = new v({ perNode: !0 });
|
|
59
|
+
v.mounted = new v({ perNode: !0 });
|
|
60
|
+
class _e {
|
|
61
|
+
constructor(e, t, r) {
|
|
62
|
+
this.tree = e, this.overlay = t, this.parser = r;
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
65
|
@internal
|
|
66
66
|
*/
|
|
67
67
|
static get(e) {
|
|
68
|
-
return e && e.props && e.props[
|
|
68
|
+
return e && e.props && e.props[v.mounted.id];
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
const Lt = /* @__PURE__ */ Object.create(null);
|
|
@@ -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, r, i = 0) {
|
|
77
|
+
this.name = e, this.props = t, this.id = r, 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, r = (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, r);
|
|
84
84
|
if (e.props) {
|
|
85
85
|
for (let s of e.props)
|
|
86
86
|
if (Array.isArray(s) || (s = s(i)), s) {
|
|
@@ -131,7 +131,7 @@ class G {
|
|
|
131
131
|
if (typeof e == "string") {
|
|
132
132
|
if (this.name == e)
|
|
133
133
|
return !0;
|
|
134
|
-
let t = this.prop(
|
|
134
|
+
let t = this.prop(v.group);
|
|
135
135
|
return t ? t.indexOf(e) > -1 : !1;
|
|
136
136
|
}
|
|
137
137
|
return this.id == e;
|
|
@@ -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 r in e)
|
|
150
|
+
for (let i of r.split(" "))
|
|
151
|
+
t[i] = e[r];
|
|
152
|
+
return (r) => {
|
|
153
|
+
for (let i = r.prop(v.group), s = -1; s < (i ? i.length : 0); s++) {
|
|
154
|
+
let o = t[s < 0 ? r.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(n) {
|
|
171
|
+
n[n.ExcludeBuffers = 1] = "ExcludeBuffers", n[n.IncludeAnonymous = 2] = "IncludeAnonymous", n[n.IgnoreMounts = 4] = "IgnoreMounts", n[n.IgnoreOverlays = 8] = "IgnoreOverlays";
|
|
172
172
|
})(I || (I = {}));
|
|
173
|
-
class
|
|
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, r, i, s) {
|
|
178
|
+
if (this.type = e, this.children = t, this.positions = r, 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 V {
|
|
|
185
185
|
@internal
|
|
186
186
|
*/
|
|
187
187
|
toString() {
|
|
188
|
-
let e =
|
|
188
|
+
let e = _e.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 r of this.children) {
|
|
193
|
+
let i = r.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;
|
|
@@ -208,7 +208,7 @@ class V {
|
|
|
208
208
|
at the given position and side (see
|
|
209
209
|
[`moveTo`](#common.TreeCursor.moveTo).
|
|
210
210
|
*/
|
|
211
|
-
cursorAt(e, t = 0,
|
|
211
|
+
cursorAt(e, t = 0, r = 0) {
|
|
212
212
|
let i = be.get(this) || this.topNode, s = new Be(i);
|
|
213
213
|
return s.moveTo(e, t), be.set(this, s._tree), s;
|
|
214
214
|
}
|
|
@@ -217,7 +217,7 @@ class V {
|
|
|
217
217
|
tree.
|
|
218
218
|
*/
|
|
219
219
|
get topNode() {
|
|
220
|
-
return new
|
|
220
|
+
return new E(this, 0, 0, null);
|
|
221
221
|
}
|
|
222
222
|
/**
|
|
223
223
|
Get the [syntax node](#common.SyntaxNode) at the given position.
|
|
@@ -231,8 +231,8 @@ class V {
|
|
|
231
231
|
[`resolveInner`](#common.Tree.resolveInner) instead.
|
|
232
232
|
*/
|
|
233
233
|
resolve(e, t = 0) {
|
|
234
|
-
let
|
|
235
|
-
return be.set(this,
|
|
234
|
+
let r = ce(be.get(this) || this.topNode, e, t, !1);
|
|
235
|
+
return be.set(this, r), r;
|
|
236
236
|
}
|
|
237
237
|
/**
|
|
238
238
|
Like [`resolve`](#common.Tree.resolve), but will enter
|
|
@@ -242,8 +242,8 @@ class V {
|
|
|
242
242
|
the host trees).
|
|
243
243
|
*/
|
|
244
244
|
resolveInner(e, t = 0) {
|
|
245
|
-
let
|
|
246
|
-
return Re.set(this,
|
|
245
|
+
let r = ce(Re.get(this) || this.topNode, e, t, !0);
|
|
246
|
+
return Re.set(this, r), r;
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
249
249
|
In some situations, it can be useful to iterate through all
|
|
@@ -263,16 +263,16 @@ class V {
|
|
|
263
263
|
not have its children iterated over (or `leave` called).
|
|
264
264
|
*/
|
|
265
265
|
iterate(e) {
|
|
266
|
-
let { enter: t, leave:
|
|
267
|
-
for (let
|
|
266
|
+
let { enter: t, leave: r, from: i = 0, to: s = this.length } = e, o = e.mode || 0, u = (o & I.IncludeAnonymous) > 0;
|
|
267
|
+
for (let h = this.cursor(o | I.IncludeAnonymous); ; ) {
|
|
268
268
|
let x = !1;
|
|
269
|
-
if (
|
|
270
|
-
if (
|
|
269
|
+
if (h.from <= s && h.to >= i && (!u && h.type.isAnonymous || t(h) !== !1)) {
|
|
270
|
+
if (h.firstChild())
|
|
271
271
|
continue;
|
|
272
272
|
x = !0;
|
|
273
273
|
}
|
|
274
|
-
for (; x &&
|
|
275
|
-
if (!
|
|
274
|
+
for (; x && r && (u || !h.type.isAnonymous) && r(h), !h.nextSibling(); ) {
|
|
275
|
+
if (!h.parent())
|
|
276
276
|
return;
|
|
277
277
|
x = !0;
|
|
278
278
|
}
|
|
@@ -303,7 +303,7 @@ class V {
|
|
|
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, r, i) => new R(this.type, t, r, i, this.propValues), e.makeTree || ((t, r, i) => new R(G.none, t, r, i)));
|
|
307
307
|
}
|
|
308
308
|
/**
|
|
309
309
|
Build a tree from a postfix-ordered buffer of node information,
|
|
@@ -313,7 +313,7 @@ class V {
|
|
|
313
313
|
return Mt(e);
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
-
|
|
316
|
+
R.empty = new R(G.none, [], [], 0);
|
|
317
317
|
class Oe {
|
|
318
318
|
constructor(e, t) {
|
|
319
319
|
this.buffer = e, this.index = t;
|
|
@@ -340,12 +340,12 @@ class Oe {
|
|
|
340
340
|
return new Oe(this.buffer, this.index);
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
class
|
|
343
|
+
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, r) {
|
|
348
|
+
this.buffer = e, this.length = t, this.set = r;
|
|
349
349
|
}
|
|
350
350
|
/**
|
|
351
351
|
@internal
|
|
@@ -366,99 +366,99 @@ class Z {
|
|
|
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], r = 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, r == e)
|
|
371
371
|
return s;
|
|
372
372
|
let o = [];
|
|
373
|
-
for (; e <
|
|
373
|
+
for (; e < r; )
|
|
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, r, i, s) {
|
|
381
381
|
let { buffer: o } = this, u = -1;
|
|
382
|
-
for (let
|
|
382
|
+
for (let h = e; h != t && !(Qe(s, i, o[h + 1], o[h + 2]) && (u = h, r > 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, r) {
|
|
390
390
|
let i = this.buffer, s = new Uint16Array(t - e), o = 0;
|
|
391
|
-
for (let u = e,
|
|
392
|
-
s[
|
|
393
|
-
let x = s[
|
|
394
|
-
s[
|
|
391
|
+
for (let u = e, h = 0; u < t; ) {
|
|
392
|
+
s[h++] = i[u++], s[h++] = i[u++] - r;
|
|
393
|
+
let x = s[h++] = i[u++] - r;
|
|
394
|
+
s[h++] = i[u++] - e, o = Math.max(o, x);
|
|
395
395
|
}
|
|
396
|
-
return new
|
|
396
|
+
return new Q(s, o, this.set);
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
|
-
function Qe(
|
|
400
|
-
switch (
|
|
399
|
+
function Qe(n, e, t, r) {
|
|
400
|
+
switch (n) {
|
|
401
401
|
case -2:
|
|
402
402
|
return t < e;
|
|
403
403
|
case -1:
|
|
404
|
-
return
|
|
404
|
+
return r >= e && t < e;
|
|
405
405
|
case 0:
|
|
406
|
-
return t < e &&
|
|
406
|
+
return t < e && r > e;
|
|
407
407
|
case 1:
|
|
408
|
-
return t <= e &&
|
|
408
|
+
return t <= e && r > e;
|
|
409
409
|
case 2:
|
|
410
|
-
return
|
|
410
|
+
return r > e;
|
|
411
411
|
case 4:
|
|
412
412
|
return !0;
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
function
|
|
416
|
-
for (var i;
|
|
417
|
-
let o = !
|
|
415
|
+
function ce(n, e, t, r) {
|
|
416
|
+
for (var i; n.from == n.to || (t < 1 ? n.from >= e : n.from > e) || (t > -1 ? n.to <= e : n.to < e); ) {
|
|
417
|
+
let o = !r && n instanceof E && n.index < 0 ? null : n.parent;
|
|
418
418
|
if (!o)
|
|
419
|
-
return
|
|
420
|
-
|
|
419
|
+
return n;
|
|
420
|
+
n = o;
|
|
421
421
|
}
|
|
422
|
-
let s =
|
|
423
|
-
if (
|
|
424
|
-
for (let o =
|
|
425
|
-
o instanceof
|
|
422
|
+
let s = r ? 0 : I.IgnoreOverlays;
|
|
423
|
+
if (r)
|
|
424
|
+
for (let o = n, 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 && (n = u);
|
|
426
426
|
for (; ; ) {
|
|
427
|
-
let o =
|
|
427
|
+
let o = n.enter(e, t, s);
|
|
428
428
|
if (!o)
|
|
429
|
-
return
|
|
430
|
-
|
|
429
|
+
return n;
|
|
430
|
+
n = o;
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
433
|
class Ye {
|
|
434
434
|
cursor(e = 0) {
|
|
435
435
|
return new Be(this, e);
|
|
436
436
|
}
|
|
437
|
-
getChild(e, t = null,
|
|
438
|
-
let i = De(this, e, t,
|
|
437
|
+
getChild(e, t = null, r = null) {
|
|
438
|
+
let i = De(this, e, t, r);
|
|
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, r = null) {
|
|
442
|
+
return De(this, e, t, r);
|
|
443
443
|
}
|
|
444
444
|
resolve(e, t = 0) {
|
|
445
|
-
return
|
|
445
|
+
return ce(this, e, t, !1);
|
|
446
446
|
}
|
|
447
447
|
resolveInner(e, t = 0) {
|
|
448
|
-
return
|
|
448
|
+
return ce(this, e, t, !0);
|
|
449
449
|
}
|
|
450
450
|
matchContext(e) {
|
|
451
451
|
return Ie(this, e);
|
|
452
452
|
}
|
|
453
453
|
enterUnfinishedNodesBefore(e) {
|
|
454
|
-
let t = this.childBefore(e),
|
|
454
|
+
let t = this.childBefore(e), r = 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 ? (r = t, t = i.prevSibling) : t = i;
|
|
460
460
|
}
|
|
461
|
-
return
|
|
461
|
+
return r;
|
|
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
|
|
471
|
-
constructor(e, t,
|
|
472
|
-
super(), this._tree = e, this.from = t, this.index =
|
|
470
|
+
class E extends Ye {
|
|
471
|
+
constructor(e, t, r, i) {
|
|
472
|
+
super(), this._tree = e, this.from = t, this.index = r, this._parent = i;
|
|
473
473
|
}
|
|
474
474
|
get type() {
|
|
475
475
|
return this._tree.type;
|
|
@@ -480,23 +480,23 @@ class z extends Ye {
|
|
|
480
480
|
get to() {
|
|
481
481
|
return this.from + this._tree.length;
|
|
482
482
|
}
|
|
483
|
-
nextChild(e, t,
|
|
483
|
+
nextChild(e, t, r, i, s = 0) {
|
|
484
484
|
for (let o = this; ; ) {
|
|
485
|
-
for (let { children: u, positions:
|
|
486
|
-
let
|
|
487
|
-
if (Qe(i,
|
|
488
|
-
if (
|
|
485
|
+
for (let { children: u, positions: h } = o._tree, x = t > 0 ? u.length : -1; e != x; e += t) {
|
|
486
|
+
let _ = u[e], w = h[e] + o.from;
|
|
487
|
+
if (Qe(i, r, w, w + _.length)) {
|
|
488
|
+
if (_ instanceof Q) {
|
|
489
489
|
if (s & I.ExcludeBuffers)
|
|
490
490
|
continue;
|
|
491
|
-
let A =
|
|
491
|
+
let A = _.findChild(0, _.buffer.length, t, r - w, i);
|
|
492
492
|
if (A > -1)
|
|
493
|
-
return new
|
|
494
|
-
} else if (s & I.IncludeAnonymous || !
|
|
493
|
+
return new Z(new Ot(o, _, e, w), null, A);
|
|
494
|
+
} else if (s & I.IncludeAnonymous || !_.type.isAnonymous || ze(_)) {
|
|
495
495
|
let A;
|
|
496
|
-
if (!(s & I.IgnoreMounts) && (A =
|
|
497
|
-
return new
|
|
498
|
-
let L = new
|
|
499
|
-
return s & I.IncludeAnonymous || !L.type.isAnonymous ? L : L.nextChild(t < 0 ?
|
|
496
|
+
if (!(s & I.IgnoreMounts) && (A = _e.get(_)) && !A.overlay)
|
|
497
|
+
return new E(A.tree, w, e, o);
|
|
498
|
+
let L = new E(_, w, e, o);
|
|
499
|
+
return s & I.IncludeAnonymous || !L.type.isAnonymous ? L : L.nextChild(t < 0 ? _.children.length - 1 : 0, t, r, i);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
}
|
|
@@ -540,15 +540,15 @@ class z extends Ye {
|
|
|
540
540
|
/* Side.Before */
|
|
541
541
|
);
|
|
542
542
|
}
|
|
543
|
-
enter(e, t,
|
|
543
|
+
enter(e, t, r = 0) {
|
|
544
544
|
let i;
|
|
545
|
-
if (!(
|
|
545
|
+
if (!(r & I.IgnoreOverlays) && (i = _e.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
|
-
return new
|
|
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, r);
|
|
552
552
|
}
|
|
553
553
|
nextSignificantParent() {
|
|
554
554
|
let e = this;
|
|
@@ -590,8 +590,8 @@ class z extends Ye {
|
|
|
590
590
|
return this._tree.toString();
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
|
-
function De(
|
|
594
|
-
let i =
|
|
593
|
+
function De(n, e, t, r) {
|
|
594
|
+
let i = n.cursor(), s = [];
|
|
595
595
|
if (!i.firstChild())
|
|
596
596
|
return s;
|
|
597
597
|
if (t != null) {
|
|
@@ -600,18 +600,18 @@ function De(r, e, t, n) {
|
|
|
600
600
|
return s;
|
|
601
601
|
}
|
|
602
602
|
for (; ; ) {
|
|
603
|
-
if (
|
|
603
|
+
if (r != null && i.type.is(r))
|
|
604
604
|
return s;
|
|
605
605
|
if (i.type.is(e) && s.push(i.node), !i.nextSibling())
|
|
606
|
-
return
|
|
606
|
+
return r == null ? s : [];
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
|
-
function Ie(
|
|
610
|
-
for (let
|
|
611
|
-
if (!
|
|
609
|
+
function Ie(n, e, t = e.length - 1) {
|
|
610
|
+
for (let r = n.parent; t >= 0; r = r.parent) {
|
|
611
|
+
if (!r)
|
|
612
612
|
return !1;
|
|
613
|
-
if (!
|
|
614
|
-
if (e[t] && e[t] !=
|
|
613
|
+
if (!r.type.isAnonymous) {
|
|
614
|
+
if (e[t] && e[t] != r.name)
|
|
615
615
|
return !1;
|
|
616
616
|
t--;
|
|
617
617
|
}
|
|
@@ -619,11 +619,11 @@ function Ie(r, e, t = e.length - 1) {
|
|
|
619
619
|
return !0;
|
|
620
620
|
}
|
|
621
621
|
class Ot {
|
|
622
|
-
constructor(e, t,
|
|
623
|
-
this.parent = e, this.buffer = t, this.index =
|
|
622
|
+
constructor(e, t, r, i) {
|
|
623
|
+
this.parent = e, this.buffer = t, this.index = r, this.start = i;
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
|
-
class
|
|
626
|
+
class Z extends Ye {
|
|
627
627
|
get name() {
|
|
628
628
|
return this.type.name;
|
|
629
629
|
}
|
|
@@ -633,12 +633,12 @@ class X 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, r) {
|
|
637
|
+
super(), this.context = e, this._parent = t, this.index = r, this.type = e.buffer.set.types[e.buffer.buffer[r]];
|
|
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,
|
|
641
|
-
return s < 0 ? null : new
|
|
639
|
+
child(e, t, r) {
|
|
640
|
+
let { buffer: i } = this.context, s = i.findChild(this.index + 4, i.buffer[this.index + 3], e, t - this.context.start, r);
|
|
641
|
+
return s < 0 ? null : new Z(this.context, this, s);
|
|
642
642
|
}
|
|
643
643
|
get firstChild() {
|
|
644
644
|
return this.child(
|
|
@@ -672,11 +672,11 @@ class X extends Ye {
|
|
|
672
672
|
/* Side.Before */
|
|
673
673
|
);
|
|
674
674
|
}
|
|
675
|
-
enter(e, t,
|
|
676
|
-
if (
|
|
675
|
+
enter(e, t, r = 0) {
|
|
676
|
+
if (r & 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
|
-
return s < 0 ? null : new
|
|
679
|
+
return s < 0 ? null : new Z(this.context, this, s);
|
|
680
680
|
}
|
|
681
681
|
get parent() {
|
|
682
682
|
return this._parent || this.context.parent.nextSignificantParent();
|
|
@@ -692,11 +692,11 @@ class X extends Ye {
|
|
|
692
692
|
}
|
|
693
693
|
get nextSibling() {
|
|
694
694
|
let { buffer: e } = this.context, t = e.buffer[this.index + 3];
|
|
695
|
-
return t < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new
|
|
695
|
+
return t < (this._parent ? e.buffer[this._parent.index + 3] : e.buffer.length) ? new Z(this.context, this._parent, t) : this.externalSibling(1);
|
|
696
696
|
}
|
|
697
697
|
get prevSibling() {
|
|
698
698
|
let { buffer: e } = this.context, t = this._parent ? this._parent.index + 4 : 0;
|
|
699
|
-
return this.index == t ? this.externalSibling(-1) : new
|
|
699
|
+
return this.index == t ? this.externalSibling(-1) : new Z(this.context, this._parent, e.findChild(
|
|
700
700
|
t,
|
|
701
701
|
this.index,
|
|
702
702
|
-1,
|
|
@@ -709,12 +709,12 @@ class X extends Ye {
|
|
|
709
709
|
return null;
|
|
710
710
|
}
|
|
711
711
|
toTree() {
|
|
712
|
-
let e = [], t = [], { buffer:
|
|
712
|
+
let e = [], t = [], { buffer: r } = this.context, i = this.index + 4, s = r.buffer[this.index + 3];
|
|
713
713
|
if (s > i) {
|
|
714
|
-
let o =
|
|
715
|
-
e.push(
|
|
714
|
+
let o = r.buffer[this.index + 1];
|
|
715
|
+
e.push(r.slice(i, s, o)), t.push(0);
|
|
716
716
|
}
|
|
717
|
-
return new
|
|
717
|
+
return new R(this.type, e, t, this.to - this.from);
|
|
718
718
|
}
|
|
719
719
|
/**
|
|
720
720
|
@internal
|
|
@@ -723,16 +723,16 @@ class X extends Ye {
|
|
|
723
723
|
return this.context.buffer.childString(this.index);
|
|
724
724
|
}
|
|
725
725
|
}
|
|
726
|
-
function et(
|
|
727
|
-
if (!
|
|
726
|
+
function et(n) {
|
|
727
|
+
if (!n.length)
|
|
728
728
|
return null;
|
|
729
|
-
let e = 0, t =
|
|
730
|
-
for (let s = 1; s <
|
|
731
|
-
let o =
|
|
729
|
+
let e = 0, t = n[0];
|
|
730
|
+
for (let s = 1; s < n.length; s++) {
|
|
731
|
+
let o = n[s];
|
|
732
732
|
(o.from > t.from || o.to < t.to) && (t = o, e = s);
|
|
733
733
|
}
|
|
734
|
-
let
|
|
735
|
-
return
|
|
734
|
+
let r = t instanceof E && t.index < 0 ? null : t.parent, i = n.slice();
|
|
735
|
+
return r ? i[e] = r : i.splice(e, 1), new zt(i, t);
|
|
736
736
|
}
|
|
737
737
|
class zt {
|
|
738
738
|
constructor(e, t) {
|
|
@@ -742,20 +742,20 @@ class zt {
|
|
|
742
742
|
return et(this.heads);
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
|
-
function Et(
|
|
746
|
-
let
|
|
747
|
-
for (let s =
|
|
745
|
+
function Et(n, e, t) {
|
|
746
|
+
let r = n.resolveInner(e, t), i = null;
|
|
747
|
+
for (let s = r instanceof E ? r : r.context.parent; s; s = s.parent)
|
|
748
748
|
if (s.index < 0) {
|
|
749
749
|
let o = s.parent;
|
|
750
|
-
(i || (i = [
|
|
750
|
+
(i || (i = [r])).push(o.resolve(e, t)), s = o;
|
|
751
751
|
} else {
|
|
752
|
-
let o =
|
|
752
|
+
let o = _e.get(s.tree);
|
|
753
753
|
if (o && o.overlay && o.overlay[0].from <= e && o.overlay[o.overlay.length - 1].to >= e) {
|
|
754
|
-
let u = new
|
|
755
|
-
(i || (i = [
|
|
754
|
+
let u = new E(o.tree, o.overlay[0].from + s.from, -1, s);
|
|
755
|
+
(i || (i = [r])).push(ce(u, e, t, !1));
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
|
-
return i ? et(i) :
|
|
758
|
+
return i ? et(i) : r;
|
|
759
759
|
}
|
|
760
760
|
class Be {
|
|
761
761
|
/**
|
|
@@ -768,12 +768,12 @@ class Be {
|
|
|
768
768
|
@internal
|
|
769
769
|
*/
|
|
770
770
|
constructor(e, t = 0) {
|
|
771
|
-
if (this.mode = t, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, e instanceof
|
|
771
|
+
if (this.mode = t, this.buffer = null, this.stack = [], this.index = 0, this.bufferNode = null, e instanceof E)
|
|
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 r = e._parent; r; r = r._parent)
|
|
776
|
+
this.stack.unshift(r.index);
|
|
777
777
|
this.bufferNode = e, this.yieldBuf(e.index);
|
|
778
778
|
}
|
|
779
779
|
}
|
|
@@ -782,14 +782,14 @@ 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: r, buffer: i } = this.buffer;
|
|
786
|
+
return this.type = t || i.set.types[i.buffer[e]], this.from = r + i.buffer[e + 1], this.to = r + i.buffer[e + 2], !0;
|
|
787
787
|
}
|
|
788
788
|
/**
|
|
789
789
|
@internal
|
|
790
790
|
*/
|
|
791
791
|
yield(e) {
|
|
792
|
-
return e ? e instanceof
|
|
792
|
+
return e ? e instanceof E ? (this.buffer = null, this.yieldNode(e)) : (this.buffer = e.context, this.yieldBuf(e.index, e.type)) : !1;
|
|
793
793
|
}
|
|
794
794
|
/**
|
|
795
795
|
@internal
|
|
@@ -800,10 +800,10 @@ class Be {
|
|
|
800
800
|
/**
|
|
801
801
|
@internal
|
|
802
802
|
*/
|
|
803
|
-
enterChild(e, t,
|
|
803
|
+
enterChild(e, t, r) {
|
|
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, r, this.mode));
|
|
806
|
+
let { buffer: i } = this.buffer, s = i.findChild(this.index + 4, i.buffer[this.index + 3], e, t - this.buffer.start, r);
|
|
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, r = this.mode) {
|
|
862
|
+
return this.buffer ? r & I.ExcludeBuffers ? !1 : this.enterChild(1, e, t) : this.yield(this._tree.enter(e, t, r));
|
|
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, r = this.stack.length - 1;
|
|
882
882
|
if (e < 0) {
|
|
883
|
-
let i =
|
|
883
|
+
let i = r < 0 ? 0 : this.stack[r] + 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 < (r < 0 ? t.buffer.length : t.buffer[this.stack[r] + 3]))
|
|
896
896
|
return this.yieldBuf(i);
|
|
897
897
|
}
|
|
898
|
-
return
|
|
898
|
+
return r < 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, r, { buffer: i } = this;
|
|
914
914
|
if (i) {
|
|
915
915
|
if (e > 0) {
|
|
916
916
|
if (this.index < i.buffer.buffer.length)
|
|
@@ -919,14 +919,14 @@ 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: r } = i);
|
|
923
923
|
} else
|
|
924
|
-
({ index: t, _parent:
|
|
925
|
-
for (;
|
|
924
|
+
({ index: t, _parent: r } = this._tree);
|
|
925
|
+
for (; r; { index: t, _parent: r } = r)
|
|
926
926
|
if (t > -1)
|
|
927
|
-
for (let s = t + e, o = e < 0 ? -1 :
|
|
928
|
-
let u =
|
|
929
|
-
if (this.mode & I.IncludeAnonymous || u instanceof
|
|
927
|
+
for (let s = t + e, o = e < 0 ? -1 : r._tree.children.length; s != o; s += e) {
|
|
928
|
+
let u = r._tree.children[s];
|
|
929
|
+
if (this.mode & I.IncludeAnonymous || u instanceof Q || !u.type.isAnonymous || ze(u))
|
|
930
930
|
return !1;
|
|
931
931
|
}
|
|
932
932
|
return !0;
|
|
@@ -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, r = 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,14 +992,14 @@ class Be {
|
|
|
992
992
|
if (o.index == i) {
|
|
993
993
|
if (i == this.index)
|
|
994
994
|
return o;
|
|
995
|
-
t = o,
|
|
995
|
+
t = o, r = s + 1;
|
|
996
996
|
break e;
|
|
997
997
|
}
|
|
998
998
|
i = this.stack[--s];
|
|
999
999
|
}
|
|
1000
|
-
for (let i =
|
|
1001
|
-
t = new
|
|
1002
|
-
return this.bufferNode = new
|
|
1000
|
+
for (let i = r; i < this.stack.length; i++)
|
|
1001
|
+
t = new Z(this.buffer, t, this.stack[i]);
|
|
1002
|
+
return this.bufferNode = new Z(this.buffer, t, this.index);
|
|
1003
1003
|
}
|
|
1004
1004
|
/**
|
|
1005
1005
|
Get the [tree](#common.Tree) that represents the current node, if
|
|
@@ -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 r = 0; ; ) {
|
|
1020
1020
|
let i = !1;
|
|
1021
1021
|
if (this.type.isAnonymous || e(this) !== !1) {
|
|
1022
1022
|
if (this.firstChild()) {
|
|
1023
|
-
|
|
1023
|
+
r++;
|
|
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 (!r)
|
|
1030
1030
|
return;
|
|
1031
|
-
this.parent(),
|
|
1031
|
+
this.parent(), r--, 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: r } = 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 = r[t.buffer[this.stack[s]]];
|
|
1048
1048
|
if (!o.isAnonymous) {
|
|
1049
1049
|
if (e[i] && e[i] != o.name)
|
|
1050
1050
|
return !1;
|
|
@@ -1054,48 +1054,48 @@ class Be {
|
|
|
1054
1054
|
return !0;
|
|
1055
1055
|
}
|
|
1056
1056
|
}
|
|
1057
|
-
function ze(
|
|
1058
|
-
return
|
|
1057
|
+
function ze(n) {
|
|
1058
|
+
return n.children.some((e) => e instanceof Q || !e.type.isAnonymous || ze(e));
|
|
1059
1059
|
}
|
|
1060
|
-
function Mt(
|
|
1060
|
+
function Mt(n) {
|
|
1061
1061
|
var e;
|
|
1062
|
-
let { buffer: t, nodeSet:
|
|
1063
|
-
function w(g, b,
|
|
1064
|
-
let { id: d, start: c, end: C, size: k } = u, B =
|
|
1062
|
+
let { buffer: t, nodeSet: r, maxBufferLength: i = It, reused: s = [], minRepeatType: o = r.types.length } = n, u = Array.isArray(t) ? new Oe(t, t.length) : t, h = r.types, x = 0, _ = 0;
|
|
1063
|
+
function w(g, b, f, y, p, m) {
|
|
1064
|
+
let { id: d, start: c, end: C, size: k } = u, B = _;
|
|
1065
1065
|
for (; k < 0; )
|
|
1066
1066
|
if (u.next(), k == -1) {
|
|
1067
1067
|
let W = s[d];
|
|
1068
|
-
|
|
1068
|
+
f.push(W), y.push(c - g);
|
|
1069
1069
|
return;
|
|
1070
1070
|
} else if (k == -3) {
|
|
1071
1071
|
x = d;
|
|
1072
1072
|
return;
|
|
1073
1073
|
} else if (k == -4) {
|
|
1074
|
-
|
|
1074
|
+
_ = d;
|
|
1075
1075
|
return;
|
|
1076
1076
|
} else
|
|
1077
1077
|
throw new RangeError(`Unrecognized record size: ${k}`);
|
|
1078
|
-
let
|
|
1079
|
-
if (C - c <= i && (
|
|
1080
|
-
let W = new Uint16Array(
|
|
1078
|
+
let Y = h[d], ie, ee, Me = c - g;
|
|
1079
|
+
if (C - c <= i && (ee = M(u.pos - b, p))) {
|
|
1080
|
+
let W = new Uint16Array(ee.size - ee.skip), O = u.pos - ee.size, $ = W.length;
|
|
1081
1081
|
for (; u.pos > O; )
|
|
1082
|
-
|
|
1083
|
-
ie = new
|
|
1082
|
+
$ = D(ee.start, W, $);
|
|
1083
|
+
ie = new Q(W, C - ee.start, r), Me = ee.start - g;
|
|
1084
1084
|
} else {
|
|
1085
1085
|
let W = u.pos - k;
|
|
1086
1086
|
u.next();
|
|
1087
|
-
let O = [],
|
|
1087
|
+
let O = [], $ = [], te = d >= o ? d : -1, se = 0, pe = C;
|
|
1088
1088
|
for (; u.pos > W; )
|
|
1089
|
-
|
|
1090
|
-
if (
|
|
1091
|
-
let Pe = L(
|
|
1092
|
-
ie = Ee(
|
|
1089
|
+
te >= 0 && u.id == te && u.size >= 0 ? (u.end <= pe - i && (N(O, $, c, se, u.end, pe, te, B), se = O.length, pe = u.end), u.next()) : m > 2500 ? A(c, W, O, $) : w(c, W, O, $, te, m + 1);
|
|
1090
|
+
if (te >= 0 && se > 0 && se < O.length && N(O, $, c, se, c, pe, te, B), O.reverse(), $.reverse(), te > -1 && se > 0) {
|
|
1091
|
+
let Pe = L(Y);
|
|
1092
|
+
ie = Ee(Y, O, $, 0, O.length, 0, C - c, Pe, Pe);
|
|
1093
1093
|
} else
|
|
1094
|
-
ie =
|
|
1094
|
+
ie = P(Y, O, $, C - c, B - C);
|
|
1095
1095
|
}
|
|
1096
|
-
|
|
1096
|
+
f.push(ie), y.push(Me);
|
|
1097
1097
|
}
|
|
1098
|
-
function A(g, b,
|
|
1098
|
+
function A(g, b, f, y) {
|
|
1099
1099
|
let p = [], m = 0, d = -1;
|
|
1100
1100
|
for (; u.pos > b; ) {
|
|
1101
1101
|
let { id: c, start: C, end: k, size: B } = u;
|
|
@@ -1111,143 +1111,143 @@ function Mt(r) {
|
|
|
1111
1111
|
let c = new Uint16Array(m * 4), C = p[p.length - 2];
|
|
1112
1112
|
for (let k = p.length - 3, B = 0; k >= 0; k -= 3)
|
|
1113
1113
|
c[B++] = p[k], c[B++] = p[k + 1] - C, c[B++] = p[k + 2] - C, c[B++] = B;
|
|
1114
|
-
|
|
1114
|
+
f.push(new Q(c, p[2] - C, r)), y.push(C - g);
|
|
1115
1115
|
}
|
|
1116
1116
|
}
|
|
1117
1117
|
function L(g) {
|
|
1118
|
-
return (b,
|
|
1118
|
+
return (b, f, y) => {
|
|
1119
1119
|
let p = 0, m = b.length - 1, d, c;
|
|
1120
|
-
if (m >= 0 && (d = b[m]) instanceof
|
|
1120
|
+
if (m >= 0 && (d = b[m]) instanceof R) {
|
|
1121
1121
|
if (!m && d.type == g && d.length == y)
|
|
1122
1122
|
return d;
|
|
1123
|
-
(c = d.prop(
|
|
1123
|
+
(c = d.prop(v.lookAhead)) && (p = f[m] + d.length + c);
|
|
1124
1124
|
}
|
|
1125
|
-
return
|
|
1125
|
+
return P(g, b, f, y, p);
|
|
1126
1126
|
};
|
|
1127
1127
|
}
|
|
1128
|
-
function N(g, b,
|
|
1128
|
+
function N(g, b, f, y, p, m, d, c) {
|
|
1129
1129
|
let C = [], k = [];
|
|
1130
1130
|
for (; g.length > y; )
|
|
1131
|
-
C.push(g.pop()), k.push(b.pop() +
|
|
1132
|
-
g.push(
|
|
1131
|
+
C.push(g.pop()), k.push(b.pop() + f - p);
|
|
1132
|
+
g.push(P(r.types[d], C, k, m - p, c - m)), b.push(p - f);
|
|
1133
1133
|
}
|
|
1134
|
-
function
|
|
1134
|
+
function P(g, b, f, y, p = 0, m) {
|
|
1135
1135
|
if (x) {
|
|
1136
|
-
let d = [
|
|
1136
|
+
let d = [v.contextHash, x];
|
|
1137
1137
|
m = m ? [d].concat(m) : [d];
|
|
1138
1138
|
}
|
|
1139
1139
|
if (p > 25) {
|
|
1140
|
-
let d = [
|
|
1140
|
+
let d = [v.lookAhead, p];
|
|
1141
1141
|
m = m ? [d].concat(m) : [d];
|
|
1142
1142
|
}
|
|
1143
|
-
return new
|
|
1143
|
+
return new R(g, b, f, y, m);
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1146
|
-
let
|
|
1145
|
+
function M(g, b) {
|
|
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 C =
|
|
1149
|
-
let k =
|
|
1150
|
-
if (
|
|
1151
|
-
c.size = y, c.start = p, c.skip = m, m += 4, y += 4,
|
|
1148
|
+
for (let C = f.pos - g; f.pos > C; ) {
|
|
1149
|
+
let k = f.size;
|
|
1150
|
+
if (f.id == b && k >= 0) {
|
|
1151
|
+
c.size = y, c.start = p, c.skip = m, m += 4, y += 4, f.next();
|
|
1152
1152
|
continue;
|
|
1153
1153
|
}
|
|
1154
|
-
let B =
|
|
1155
|
-
if (k < 0 || B < C ||
|
|
1154
|
+
let B = f.pos - k;
|
|
1155
|
+
if (k < 0 || B < C || f.start < d)
|
|
1156
1156
|
break;
|
|
1157
|
-
let
|
|
1158
|
-
for (
|
|
1159
|
-
if (
|
|
1160
|
-
if (
|
|
1161
|
-
|
|
1157
|
+
let Y = f.id >= o ? 4 : 0, ie = f.start;
|
|
1158
|
+
for (f.next(); f.pos > B; ) {
|
|
1159
|
+
if (f.size < 0)
|
|
1160
|
+
if (f.size == -3)
|
|
1161
|
+
Y += 4;
|
|
1162
1162
|
else
|
|
1163
1163
|
break e;
|
|
1164
1164
|
else
|
|
1165
|
-
|
|
1166
|
-
|
|
1165
|
+
f.id >= o && (Y += 4);
|
|
1166
|
+
f.next();
|
|
1167
1167
|
}
|
|
1168
|
-
p = ie, y += k, m +=
|
|
1168
|
+
p = ie, y += k, m += Y;
|
|
1169
1169
|
}
|
|
1170
1170
|
return (b < 0 || y == g) && (c.size = y, c.start = p, c.skip = m), c.size > 4 ? c : void 0;
|
|
1171
1171
|
}
|
|
1172
|
-
function D(g, b,
|
|
1172
|
+
function D(g, b, f) {
|
|
1173
1173
|
let { id: y, start: p, end: m, size: d } = u;
|
|
1174
1174
|
if (u.next(), d >= 0 && y < o) {
|
|
1175
|
-
let c =
|
|
1175
|
+
let c = f;
|
|
1176
1176
|
if (d > 4) {
|
|
1177
1177
|
let C = u.pos - (d - 4);
|
|
1178
1178
|
for (; u.pos > C; )
|
|
1179
|
-
|
|
1179
|
+
f = D(g, b, f);
|
|
1180
1180
|
}
|
|
1181
|
-
b[--
|
|
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 && (
|
|
1184
|
-
return
|
|
1183
|
+
d == -3 ? x = y : d == -4 && (_ = y);
|
|
1184
|
+
return f;
|
|
1185
1185
|
}
|
|
1186
1186
|
let U = [], S = [];
|
|
1187
1187
|
for (; u.pos > 0; )
|
|
1188
|
-
w(
|
|
1189
|
-
let J = (e =
|
|
1190
|
-
return new
|
|
1188
|
+
w(n.start || 0, n.bufferStart || 0, U, S, -1, 0);
|
|
1189
|
+
let J = (e = n.length) !== null && e !== void 0 ? e : U.length ? S[0] + U[0].length : 0;
|
|
1190
|
+
return new R(h[n.topID], U.reverse(), S.reverse(), J);
|
|
1191
1191
|
}
|
|
1192
1192
|
const Ue = /* @__PURE__ */ new WeakMap();
|
|
1193
|
-
function Ce(
|
|
1194
|
-
if (!
|
|
1193
|
+
function Ce(n, e) {
|
|
1194
|
+
if (!n.isAnonymous || e instanceof Q || e.type != n)
|
|
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 r of e.children) {
|
|
1200
|
+
if (r.type != n || !(r instanceof R)) {
|
|
1201
1201
|
t = 1;
|
|
1202
1202
|
break;
|
|
1203
1203
|
}
|
|
1204
|
-
t += Ce(
|
|
1204
|
+
t += Ce(n, r);
|
|
1205
1205
|
}
|
|
1206
1206
|
Ue.set(e, t);
|
|
1207
1207
|
}
|
|
1208
1208
|
return t;
|
|
1209
1209
|
}
|
|
1210
|
-
function Ee(
|
|
1210
|
+
function Ee(n, e, t, r, i, s, o, u, h) {
|
|
1211
1211
|
let x = 0;
|
|
1212
|
-
for (let N =
|
|
1213
|
-
x += Ce(
|
|
1214
|
-
let
|
|
1212
|
+
for (let N = r; N < i; N++)
|
|
1213
|
+
x += Ce(n, e[N]);
|
|
1214
|
+
let _ = Math.ceil(
|
|
1215
1215
|
x * 1.5 / 8
|
|
1216
1216
|
/* Balance.BranchFactor */
|
|
1217
1217
|
), w = [], A = [];
|
|
1218
|
-
function L(N,
|
|
1219
|
-
for (let S =
|
|
1220
|
-
let J = S, g =
|
|
1218
|
+
function L(N, P, M, D, U) {
|
|
1219
|
+
for (let S = M; S < D; ) {
|
|
1220
|
+
let J = S, g = P[S], b = Ce(n, N[S]);
|
|
1221
1221
|
for (S++; S < D; S++) {
|
|
1222
|
-
let
|
|
1223
|
-
if (b +
|
|
1222
|
+
let f = Ce(n, N[S]);
|
|
1223
|
+
if (b + f >= _)
|
|
1224
1224
|
break;
|
|
1225
|
-
b +=
|
|
1225
|
+
b += f;
|
|
1226
1226
|
}
|
|
1227
1227
|
if (S == J + 1) {
|
|
1228
|
-
if (b >
|
|
1229
|
-
let
|
|
1230
|
-
L(
|
|
1228
|
+
if (b > _) {
|
|
1229
|
+
let f = N[J];
|
|
1230
|
+
L(f.children, f.positions, 0, f.children.length, P[J] + U);
|
|
1231
1231
|
continue;
|
|
1232
1232
|
}
|
|
1233
1233
|
w.push(N[J]);
|
|
1234
1234
|
} else {
|
|
1235
|
-
let
|
|
1236
|
-
w.push(Ee(
|
|
1235
|
+
let f = P[S - 1] + N[S - 1].length - g;
|
|
1236
|
+
w.push(Ee(n, N, P, J, S, g, f, null, h));
|
|
1237
1237
|
}
|
|
1238
1238
|
A.push(g + U - s);
|
|
1239
1239
|
}
|
|
1240
1240
|
}
|
|
1241
|
-
return L(e, t,
|
|
1241
|
+
return L(e, t, r, i, 0), (u || h)(w, A, o);
|
|
1242
1242
|
}
|
|
1243
|
-
new
|
|
1243
|
+
new v({ perNode: !0 });
|
|
1244
1244
|
let Pt = 0;
|
|
1245
|
-
class
|
|
1245
|
+
class V {
|
|
1246
1246
|
/**
|
|
1247
1247
|
@internal
|
|
1248
1248
|
*/
|
|
1249
|
-
constructor(e, t,
|
|
1250
|
-
this.set = e, this.base = t, this.modified =
|
|
1249
|
+
constructor(e, t, r) {
|
|
1250
|
+
this.set = e, this.base = t, this.modified = r, this.id = Pt++;
|
|
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 H {
|
|
|
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 V([], null, []);
|
|
1263
1263
|
if (t.set.push(t), e)
|
|
1264
|
-
for (let
|
|
1265
|
-
t.set.push(
|
|
1264
|
+
for (let r of e.set)
|
|
1265
|
+
t.set.push(r);
|
|
1266
1266
|
return t;
|
|
1267
1267
|
}
|
|
1268
1268
|
/**
|
|
@@ -1279,7 +1279,7 @@ class H {
|
|
|
1279
1279
|
*/
|
|
1280
1280
|
static defineModifier() {
|
|
1281
1281
|
let e = new we();
|
|
1282
|
-
return (t) => t.modified.indexOf(e) > -1 ? t : we.get(t.base || t, t.modified.concat(e).sort((
|
|
1282
|
+
return (t) => t.modified.indexOf(e) > -1 ? t : we.get(t.base || t, t.modified.concat(e).sort((r, i) => r.id - i.id));
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
1285
|
let $t = 0;
|
|
@@ -1290,46 +1290,46 @@ class we {
|
|
|
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 r = t[0].instances.find((u) => u.base == e && Tt(t, u.modified));
|
|
1294
|
+
if (r)
|
|
1295
|
+
return r;
|
|
1296
|
+
let i = [], s = new V(i, e, t);
|
|
1297
1297
|
for (let u of t)
|
|
1298
1298
|
u.instances.push(s);
|
|
1299
1299
|
let o = jt(t);
|
|
1300
1300
|
for (let u of e.set)
|
|
1301
1301
|
if (!u.modified.length)
|
|
1302
|
-
for (let
|
|
1303
|
-
i.push(we.get(u,
|
|
1302
|
+
for (let h of o)
|
|
1303
|
+
i.push(we.get(u, h));
|
|
1304
1304
|
return s;
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
|
-
function Tt(
|
|
1308
|
-
return
|
|
1307
|
+
function Tt(n, e) {
|
|
1308
|
+
return n.length == e.length && n.every((t, r) => t == e[r]);
|
|
1309
1309
|
}
|
|
1310
|
-
function jt(
|
|
1310
|
+
function jt(n) {
|
|
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 < n.length; t++)
|
|
1313
|
+
for (let r = 0, i = e.length; r < i; r++)
|
|
1314
|
+
e.push(e[r].concat(n[t]));
|
|
1315
|
+
return e.sort((t, r) => r.length - t.length);
|
|
1316
1316
|
}
|
|
1317
|
-
new
|
|
1318
|
-
function Ht(
|
|
1317
|
+
new v();
|
|
1318
|
+
function Ht(n, e) {
|
|
1319
1319
|
let t = /* @__PURE__ */ Object.create(null);
|
|
1320
|
-
for (let s of
|
|
1320
|
+
for (let s of n)
|
|
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: r, all: i = null } = e || {};
|
|
1327
1327
|
return {
|
|
1328
1328
|
style: (s) => {
|
|
1329
1329
|
let o = i;
|
|
1330
1330
|
for (let u of s)
|
|
1331
|
-
for (let
|
|
1332
|
-
let x = t[
|
|
1331
|
+
for (let h of u.set) {
|
|
1332
|
+
let x = t[h.id];
|
|
1333
1333
|
if (x) {
|
|
1334
1334
|
o = o ? o + " " + x : x;
|
|
1335
1335
|
break;
|
|
@@ -1337,10 +1337,10 @@ function Ht(r, e) {
|
|
|
1337
1337
|
}
|
|
1338
1338
|
return o;
|
|
1339
1339
|
},
|
|
1340
|
-
scope:
|
|
1340
|
+
scope: r
|
|
1341
1341
|
};
|
|
1342
1342
|
}
|
|
1343
|
-
const a =
|
|
1343
|
+
const a = V.define, ye = a(), F = a(), Je = a(F), We = a(F), X = a(), xe = a(X), Se = a(X), H = a(), ne = a(H), T = a(), j = a(), Le = a(), he = a(Le), ke = a(), l = {
|
|
1344
1344
|
/**
|
|
1345
1345
|
A comment.
|
|
1346
1346
|
*/
|
|
@@ -1360,11 +1360,11 @@ const a = H.define, ye = a(), q = a(), Je = a(q), We = a(q), F = a(), xe = a(F),
|
|
|
1360
1360
|
/**
|
|
1361
1361
|
Any kind of identifier.
|
|
1362
1362
|
*/
|
|
1363
|
-
name:
|
|
1363
|
+
name: F,
|
|
1364
1364
|
/**
|
|
1365
1365
|
The [name](#highlight.tags.name) of a variable.
|
|
1366
1366
|
*/
|
|
1367
|
-
variableName: a(
|
|
1367
|
+
variableName: a(F),
|
|
1368
1368
|
/**
|
|
1369
1369
|
A type [name](#highlight.tags.name).
|
|
1370
1370
|
*/
|
|
@@ -1384,23 +1384,23 @@ const a = H.define, ye = a(), q = a(), Je = a(q), We = a(q), F = a(), xe = a(F),
|
|
|
1384
1384
|
/**
|
|
1385
1385
|
The [name](#highlight.tags.name) of a class.
|
|
1386
1386
|
*/
|
|
1387
|
-
className: a(
|
|
1387
|
+
className: a(F),
|
|
1388
1388
|
/**
|
|
1389
1389
|
A label [name](#highlight.tags.name).
|
|
1390
1390
|
*/
|
|
1391
|
-
labelName: a(
|
|
1391
|
+
labelName: a(F),
|
|
1392
1392
|
/**
|
|
1393
1393
|
A namespace [name](#highlight.tags.name).
|
|
1394
1394
|
*/
|
|
1395
|
-
namespace: a(
|
|
1395
|
+
namespace: a(F),
|
|
1396
1396
|
/**
|
|
1397
1397
|
The [name](#highlight.tags.name) of a macro.
|
|
1398
1398
|
*/
|
|
1399
|
-
macroName: a(
|
|
1399
|
+
macroName: a(F),
|
|
1400
1400
|
/**
|
|
1401
1401
|
A literal value.
|
|
1402
1402
|
*/
|
|
1403
|
-
literal:
|
|
1403
|
+
literal: X,
|
|
1404
1404
|
/**
|
|
1405
1405
|
A string [literal](#highlight.tags.literal).
|
|
1406
1406
|
*/
|
|
@@ -1432,106 +1432,106 @@ const a = H.define, ye = a(), q = a(), Je = a(q), We = a(q), F = a(), xe = a(F),
|
|
|
1432
1432
|
/**
|
|
1433
1433
|
A boolean [literal](#highlight.tags.literal).
|
|
1434
1434
|
*/
|
|
1435
|
-
bool: a(
|
|
1435
|
+
bool: a(X),
|
|
1436
1436
|
/**
|
|
1437
1437
|
Regular expression [literal](#highlight.tags.literal).
|
|
1438
1438
|
*/
|
|
1439
|
-
regexp: a(
|
|
1439
|
+
regexp: a(X),
|
|
1440
1440
|
/**
|
|
1441
1441
|
An escape [literal](#highlight.tags.literal), for example a
|
|
1442
1442
|
backslash escape in a string.
|
|
1443
1443
|
*/
|
|
1444
|
-
escape: a(
|
|
1444
|
+
escape: a(X),
|
|
1445
1445
|
/**
|
|
1446
1446
|
A color [literal](#highlight.tags.literal).
|
|
1447
1447
|
*/
|
|
1448
|
-
color: a(
|
|
1448
|
+
color: a(X),
|
|
1449
1449
|
/**
|
|
1450
1450
|
A URL [literal](#highlight.tags.literal).
|
|
1451
1451
|
*/
|
|
1452
|
-
url: a(
|
|
1452
|
+
url: a(X),
|
|
1453
1453
|
/**
|
|
1454
1454
|
A language keyword.
|
|
1455
1455
|
*/
|
|
1456
|
-
keyword:
|
|
1456
|
+
keyword: T,
|
|
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(T),
|
|
1462
1462
|
/**
|
|
1463
1463
|
The [keyword](#highlight.tags.keyword) for null.
|
|
1464
1464
|
*/
|
|
1465
|
-
null: a(
|
|
1465
|
+
null: a(T),
|
|
1466
1466
|
/**
|
|
1467
1467
|
A [keyword](#highlight.tags.keyword) denoting some atomic value.
|
|
1468
1468
|
*/
|
|
1469
|
-
atom: a(
|
|
1469
|
+
atom: a(T),
|
|
1470
1470
|
/**
|
|
1471
1471
|
A [keyword](#highlight.tags.keyword) that represents a unit.
|
|
1472
1472
|
*/
|
|
1473
|
-
unit: a(
|
|
1473
|
+
unit: a(T),
|
|
1474
1474
|
/**
|
|
1475
1475
|
A modifier [keyword](#highlight.tags.keyword).
|
|
1476
1476
|
*/
|
|
1477
|
-
modifier: a(
|
|
1477
|
+
modifier: a(T),
|
|
1478
1478
|
/**
|
|
1479
1479
|
A [keyword](#highlight.tags.keyword) that acts as an operator.
|
|
1480
1480
|
*/
|
|
1481
|
-
operatorKeyword: a(
|
|
1481
|
+
operatorKeyword: a(T),
|
|
1482
1482
|
/**
|
|
1483
1483
|
A control-flow related [keyword](#highlight.tags.keyword).
|
|
1484
1484
|
*/
|
|
1485
|
-
controlKeyword: a(
|
|
1485
|
+
controlKeyword: a(T),
|
|
1486
1486
|
/**
|
|
1487
1487
|
A [keyword](#highlight.tags.keyword) that defines something.
|
|
1488
1488
|
*/
|
|
1489
|
-
definitionKeyword: a(
|
|
1489
|
+
definitionKeyword: a(T),
|
|
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(T),
|
|
1495
1495
|
/**
|
|
1496
1496
|
An operator.
|
|
1497
1497
|
*/
|
|
1498
|
-
operator:
|
|
1498
|
+
operator: j,
|
|
1499
1499
|
/**
|
|
1500
1500
|
An [operator](#highlight.tags.operator) that dereferences something.
|
|
1501
1501
|
*/
|
|
1502
|
-
derefOperator: a(
|
|
1502
|
+
derefOperator: a(j),
|
|
1503
1503
|
/**
|
|
1504
1504
|
Arithmetic-related [operator](#highlight.tags.operator).
|
|
1505
1505
|
*/
|
|
1506
|
-
arithmeticOperator: a(
|
|
1506
|
+
arithmeticOperator: a(j),
|
|
1507
1507
|
/**
|
|
1508
1508
|
Logical [operator](#highlight.tags.operator).
|
|
1509
1509
|
*/
|
|
1510
|
-
logicOperator: a(
|
|
1510
|
+
logicOperator: a(j),
|
|
1511
1511
|
/**
|
|
1512
1512
|
Bit [operator](#highlight.tags.operator).
|
|
1513
1513
|
*/
|
|
1514
|
-
bitwiseOperator: a(
|
|
1514
|
+
bitwiseOperator: a(j),
|
|
1515
1515
|
/**
|
|
1516
1516
|
Comparison [operator](#highlight.tags.operator).
|
|
1517
1517
|
*/
|
|
1518
|
-
compareOperator: a(
|
|
1518
|
+
compareOperator: a(j),
|
|
1519
1519
|
/**
|
|
1520
1520
|
[Operator](#highlight.tags.operator) that updates its operand.
|
|
1521
1521
|
*/
|
|
1522
|
-
updateOperator: a(
|
|
1522
|
+
updateOperator: a(j),
|
|
1523
1523
|
/**
|
|
1524
1524
|
[Operator](#highlight.tags.operator) that defines something.
|
|
1525
1525
|
*/
|
|
1526
|
-
definitionOperator: a(
|
|
1526
|
+
definitionOperator: a(j),
|
|
1527
1527
|
/**
|
|
1528
1528
|
Type-related [operator](#highlight.tags.operator).
|
|
1529
1529
|
*/
|
|
1530
|
-
typeOperator: a(
|
|
1530
|
+
typeOperator: a(j),
|
|
1531
1531
|
/**
|
|
1532
1532
|
Control-flow [operator](#highlight.tags.operator).
|
|
1533
1533
|
*/
|
|
1534
|
-
controlOperator: a(
|
|
1534
|
+
controlOperator: a(j),
|
|
1535
1535
|
/**
|
|
1536
1536
|
Program or markup punctuation.
|
|
1537
1537
|
*/
|
|
@@ -1544,93 +1544,93 @@ const a = H.define, ye = a(), q = a(), Je = a(q), We = a(q), F = a(), xe = a(F),
|
|
|
1544
1544
|
/**
|
|
1545
1545
|
Bracket-style [punctuation](#highlight.tags.punctuation).
|
|
1546
1546
|
*/
|
|
1547
|
-
bracket:
|
|
1547
|
+
bracket: he,
|
|
1548
1548
|
/**
|
|
1549
1549
|
Angle [brackets](#highlight.tags.bracket) (usually `<` and `>`
|
|
1550
1550
|
tokens).
|
|
1551
1551
|
*/
|
|
1552
|
-
angleBracket: a(
|
|
1552
|
+
angleBracket: a(he),
|
|
1553
1553
|
/**
|
|
1554
1554
|
Square [brackets](#highlight.tags.bracket) (usually `[` and `]`
|
|
1555
1555
|
tokens).
|
|
1556
1556
|
*/
|
|
1557
|
-
squareBracket: a(
|
|
1557
|
+
squareBracket: a(he),
|
|
1558
1558
|
/**
|
|
1559
1559
|
Parentheses (usually `(` and `)` tokens). Subtag of
|
|
1560
1560
|
[bracket](#highlight.tags.bracket).
|
|
1561
1561
|
*/
|
|
1562
|
-
paren: a(
|
|
1562
|
+
paren: a(he),
|
|
1563
1563
|
/**
|
|
1564
1564
|
Braces (usually `{` and `}` tokens). Subtag of
|
|
1565
1565
|
[bracket](#highlight.tags.bracket).
|
|
1566
1566
|
*/
|
|
1567
|
-
brace: a(
|
|
1567
|
+
brace: a(he),
|
|
1568
1568
|
/**
|
|
1569
1569
|
Content, for example plain text in XML or markup documents.
|
|
1570
1570
|
*/
|
|
1571
|
-
content:
|
|
1571
|
+
content: H,
|
|
1572
1572
|
/**
|
|
1573
1573
|
[Content](#highlight.tags.content) that represents a heading.
|
|
1574
1574
|
*/
|
|
1575
|
-
heading:
|
|
1575
|
+
heading: ne,
|
|
1576
1576
|
/**
|
|
1577
1577
|
A level 1 [heading](#highlight.tags.heading).
|
|
1578
1578
|
*/
|
|
1579
|
-
heading1: a(
|
|
1579
|
+
heading1: a(ne),
|
|
1580
1580
|
/**
|
|
1581
1581
|
A level 2 [heading](#highlight.tags.heading).
|
|
1582
1582
|
*/
|
|
1583
|
-
heading2: a(
|
|
1583
|
+
heading2: a(ne),
|
|
1584
1584
|
/**
|
|
1585
1585
|
A level 3 [heading](#highlight.tags.heading).
|
|
1586
1586
|
*/
|
|
1587
|
-
heading3: a(
|
|
1587
|
+
heading3: a(ne),
|
|
1588
1588
|
/**
|
|
1589
1589
|
A level 4 [heading](#highlight.tags.heading).
|
|
1590
1590
|
*/
|
|
1591
|
-
heading4: a(
|
|
1591
|
+
heading4: a(ne),
|
|
1592
1592
|
/**
|
|
1593
1593
|
A level 5 [heading](#highlight.tags.heading).
|
|
1594
1594
|
*/
|
|
1595
|
-
heading5: a(
|
|
1595
|
+
heading5: a(ne),
|
|
1596
1596
|
/**
|
|
1597
1597
|
A level 6 [heading](#highlight.tags.heading).
|
|
1598
1598
|
*/
|
|
1599
|
-
heading6: a(
|
|
1599
|
+
heading6: a(ne),
|
|
1600
1600
|
/**
|
|
1601
1601
|
A prose separator (such as a horizontal rule).
|
|
1602
1602
|
*/
|
|
1603
|
-
contentSeparator: a(
|
|
1603
|
+
contentSeparator: a(H),
|
|
1604
1604
|
/**
|
|
1605
1605
|
[Content](#highlight.tags.content) that represents a list.
|
|
1606
1606
|
*/
|
|
1607
|
-
list: a(
|
|
1607
|
+
list: a(H),
|
|
1608
1608
|
/**
|
|
1609
1609
|
[Content](#highlight.tags.content) that represents a quote.
|
|
1610
1610
|
*/
|
|
1611
|
-
quote: a(
|
|
1611
|
+
quote: a(H),
|
|
1612
1612
|
/**
|
|
1613
1613
|
[Content](#highlight.tags.content) that is emphasized.
|
|
1614
1614
|
*/
|
|
1615
|
-
emphasis: a(
|
|
1615
|
+
emphasis: a(H),
|
|
1616
1616
|
/**
|
|
1617
1617
|
[Content](#highlight.tags.content) that is styled strong.
|
|
1618
1618
|
*/
|
|
1619
|
-
strong: a(
|
|
1619
|
+
strong: a(H),
|
|
1620
1620
|
/**
|
|
1621
1621
|
[Content](#highlight.tags.content) that is part of a link.
|
|
1622
1622
|
*/
|
|
1623
|
-
link: a(
|
|
1623
|
+
link: a(H),
|
|
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(H),
|
|
1629
1629
|
/**
|
|
1630
1630
|
[Content](#highlight.tags.content) that has a strike-through
|
|
1631
1631
|
style.
|
|
1632
1632
|
*/
|
|
1633
|
-
strikethrough: a(
|
|
1633
|
+
strikethrough: a(H),
|
|
1634
1634
|
/**
|
|
1635
1635
|
Inserted text in a change-tracking format.
|
|
1636
1636
|
*/
|
|
@@ -1671,31 +1671,31 @@ const a = H.define, ye = a(), q = a(), Je = a(q), We = a(q), F = a(), xe = a(F),
|
|
|
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: V.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: V.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: V.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: V.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: V.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 = H.define, ye = a(), q = a(), Je = a(q), We = a(q), F = a(), xe = a(F),
|
|
|
1704
1704
|
[variable name](#highlight.tags.variableName) tags, since those
|
|
1705
1705
|
come up a lot.
|
|
1706
1706
|
*/
|
|
1707
|
-
special:
|
|
1707
|
+
special: V.defineModifier()
|
|
1708
1708
|
};
|
|
1709
1709
|
Ht([
|
|
1710
1710
|
{ tag: l.link, class: "tok-link" },
|
|
@@ -1744,38 +1744,38 @@ const Vt = "#c72727", Rt = "#9b5700", Dt = "#067934", Ut = "#0063d7", Jt = {
|
|
|
1744
1744
|
green: Dt,
|
|
1745
1745
|
blue: Ut,
|
|
1746
1746
|
invalid: "#ffffff"
|
|
1747
|
-
}, Wt = (
|
|
1747
|
+
}, Wt = (n) => gt.define([
|
|
1748
1748
|
{
|
|
1749
1749
|
tag: l.keyword,
|
|
1750
|
-
color:
|
|
1750
|
+
color: n.red
|
|
1751
1751
|
},
|
|
1752
1752
|
{
|
|
1753
1753
|
tag: [l.name, l.deleted, l.character, l.propertyName, l.macroName],
|
|
1754
|
-
color:
|
|
1754
|
+
color: n.green
|
|
1755
1755
|
},
|
|
1756
1756
|
{
|
|
1757
1757
|
tag: [l.function(l.variableName), l.labelName],
|
|
1758
|
-
color:
|
|
1758
|
+
color: n.blue
|
|
1759
1759
|
},
|
|
1760
1760
|
{
|
|
1761
1761
|
tag: [l.color, l.constant(l.name), l.standard(l.name)],
|
|
1762
|
-
color:
|
|
1762
|
+
color: n.red
|
|
1763
1763
|
},
|
|
1764
1764
|
{
|
|
1765
1765
|
tag: [l.definition(l.name), l.separator],
|
|
1766
|
-
color:
|
|
1766
|
+
color: n.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: n.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: n.blue
|
|
1775
1775
|
},
|
|
1776
1776
|
{
|
|
1777
1777
|
tag: [l.meta, l.comment],
|
|
1778
|
-
color:
|
|
1778
|
+
color: n.orange
|
|
1779
1779
|
},
|
|
1780
1780
|
{
|
|
1781
1781
|
tag: l.strong,
|
|
@@ -1791,60 +1791,60 @@ const Vt = "#c72727", Rt = "#9b5700", Dt = "#067934", Ut = "#0063d7", Jt = {
|
|
|
1791
1791
|
},
|
|
1792
1792
|
{
|
|
1793
1793
|
tag: l.link,
|
|
1794
|
-
color:
|
|
1794
|
+
color: n.orange,
|
|
1795
1795
|
textDecoration: "underline"
|
|
1796
1796
|
},
|
|
1797
1797
|
{
|
|
1798
1798
|
tag: l.heading,
|
|
1799
1799
|
fontWeight: "bold",
|
|
1800
|
-
color:
|
|
1800
|
+
color: n.blue
|
|
1801
1801
|
},
|
|
1802
1802
|
{
|
|
1803
1803
|
tag: [l.atom, l.bool, l.special(l.variableName)],
|
|
1804
|
-
color:
|
|
1804
|
+
color: n.red
|
|
1805
1805
|
},
|
|
1806
1806
|
{
|
|
1807
1807
|
tag: [l.processingInstruction, l.string, l.inserted],
|
|
1808
|
-
color:
|
|
1808
|
+
color: n.blue
|
|
1809
1809
|
},
|
|
1810
1810
|
{
|
|
1811
1811
|
tag: l.invalid,
|
|
1812
|
-
color:
|
|
1812
|
+
color: n.invalid
|
|
1813
1813
|
}
|
|
1814
1814
|
]), Gt = pt(Wt(Jt));
|
|
1815
|
-
var
|
|
1815
|
+
var ve = /* @__PURE__ */ ((n) => (n.INLINE = "inline", n.SINGLELINE = "singleline", n.MULTILINE = "multiline", n))(ve || {}), re = /* @__PURE__ */ ((n) => (n.JSON = "json", n.XML = "xml", n.JAVA = "java", n.JAVASCRIPT = "javascript", n))(re || {}), de = /* @__PURE__ */ ((n) => (n.ACTION = "action", n.CHANGE = "change", n))(de || {});
|
|
1816
1816
|
const Kt = {
|
|
1817
1817
|
[re.JSON]: mt,
|
|
1818
1818
|
[re.XML]: bt,
|
|
1819
1819
|
[re.JAVASCRIPT]: yt,
|
|
1820
1820
|
[re.JAVA]: xt
|
|
1821
|
-
}, qt = (
|
|
1822
|
-
loadLang: async () => Kt[
|
|
1821
|
+
}, qt = (n) => ({
|
|
1822
|
+
loadLang: async () => Kt[n]
|
|
1823
1823
|
});
|
|
1824
1824
|
let Ge = 0;
|
|
1825
1825
|
const Ft = {
|
|
1826
1826
|
beforeCreate() {
|
|
1827
1827
|
this.uuid = Ge.toString(), Ge += 1;
|
|
1828
1828
|
}
|
|
1829
|
-
}, tt = (
|
|
1829
|
+
}, tt = (n) => (Fe("data-v-012ee7f3"), n = n(), Xe(), n), Xt = { key: 0 }, Zt = /* @__PURE__ */ tt(() => /* @__PURE__ */ ae("path", {
|
|
1830
1830
|
fill: "#00112C",
|
|
1831
1831
|
"fill-rule": "evenodd",
|
|
1832
1832
|
d: "M14 1.25H10C9.58579 1.25 9.25 1.58579 9.25 2C9.25 2.41421 9.58579 2.75 10 2.75H12.1893L9.46967 5.46967C9.17678 5.76256 9.17678 6.23744 9.46967 6.53033C9.76256 6.82322 10.2374 6.82322 10.5303 6.53033L13.25 3.81066V6C13.25 6.41421 13.5858 6.75 14 6.75C14.4142 6.75 14.75 6.41421 14.75 6V2C14.75 1.80806 14.6768 1.61612 14.5303 1.46967C14.4584 1.39776 14.3755 1.34351 14.2871 1.30691C14.1987 1.27024 14.1017 1.25 14 1.25Z",
|
|
1833
1833
|
"clip-rule": "evenodd"
|
|
1834
|
-
}, null, -1)), Qt = /* @__PURE__ */ tt(() => /* @__PURE__ */
|
|
1834
|
+
}, null, -1)), Qt = /* @__PURE__ */ tt(() => /* @__PURE__ */ ae("path", {
|
|
1835
1835
|
fill: "#00112C",
|
|
1836
1836
|
"fill-rule": "evenodd",
|
|
1837
1837
|
d: "M1.25 10C1.25 9.58579 1.58579 9.25 2 9.25C2.41421 9.25 2.75 9.58579 2.75 10V12.1893L5.46967 9.46967C5.76256 9.17678 6.23744 9.17678 6.53033 9.46967C6.82322 9.76256 6.82322 10.2374 6.53033 10.5303L3.81066 13.25H6C6.41421 13.25 6.75 13.5858 6.75 14C6.75 14.4142 6.41421 14.75 6 14.75H2C1.80806 14.75 1.61612 14.6768 1.46967 14.5303C1.39776 14.4584 1.34351 14.3755 1.30691 14.2871C1.27024 14.1987 1.25 14.1017 1.25 14V10Z",
|
|
1838
1838
|
"clip-rule": "evenodd"
|
|
1839
1839
|
}, null, -1));
|
|
1840
|
-
function Yt(
|
|
1841
|
-
return
|
|
1840
|
+
function Yt(n, e, t, r, i, s) {
|
|
1841
|
+
return z(), le("svg", qe({ role: "img" }, n.$attrs, {
|
|
1842
1842
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1843
1843
|
width: "16",
|
|
1844
1844
|
height: "16",
|
|
1845
1845
|
fill: "none"
|
|
1846
1846
|
}), [
|
|
1847
|
-
|
|
1847
|
+
n.$attrs["svg-title"] ? (z(), le("title", Xt, Ae(n.$attrs["svg-title"]), 1)) : q("", !0),
|
|
1848
1848
|
Zt,
|
|
1849
1849
|
Qt
|
|
1850
1850
|
], 16);
|
|
@@ -1858,8 +1858,8 @@ const en = /* @__PURE__ */ Ze(Ft, [["render", Yt], ["__scopeId", "data-v-012ee7f
|
|
|
1858
1858
|
i18n: { messages: Ke },
|
|
1859
1859
|
name: "bento-code-snippet",
|
|
1860
1860
|
components: {
|
|
1861
|
-
BentoTypography:
|
|
1862
|
-
BentoButton:
|
|
1861
|
+
BentoTypography: _t,
|
|
1862
|
+
BentoButton: vt,
|
|
1863
1863
|
BentoDropdown: kt,
|
|
1864
1864
|
Copy: At,
|
|
1865
1865
|
BaseModal: Ct,
|
|
@@ -1873,8 +1873,8 @@ const en = /* @__PURE__ */ Ze(Ft, [["render", Yt], ["__scopeId", "data-v-012ee7f
|
|
|
1873
1873
|
*/
|
|
1874
1874
|
variant: {
|
|
1875
1875
|
type: String,
|
|
1876
|
-
default:
|
|
1877
|
-
validator: (
|
|
1876
|
+
default: ve.MULTILINE,
|
|
1877
|
+
validator: (n) => Object.values(ve).includes(n)
|
|
1878
1878
|
},
|
|
1879
1879
|
/**
|
|
1880
1880
|
* Language name for syntax highlighting rules
|
|
@@ -1882,7 +1882,7 @@ const en = /* @__PURE__ */ Ze(Ft, [["render", Yt], ["__scopeId", "data-v-012ee7f
|
|
|
1882
1882
|
lang: {
|
|
1883
1883
|
type: String,
|
|
1884
1884
|
default: re.JSON,
|
|
1885
|
-
validator: (
|
|
1885
|
+
validator: (n) => Object.values(re).includes(n)
|
|
1886
1886
|
},
|
|
1887
1887
|
/**
|
|
1888
1888
|
* Label to show in the action-bar, describing the language
|
|
@@ -1937,67 +1937,69 @@ const en = /* @__PURE__ */ Ze(Ft, [["render", Yt], ["__scopeId", "data-v-012ee7f
|
|
|
1937
1937
|
default: !1
|
|
1938
1938
|
}
|
|
1939
1939
|
},
|
|
1940
|
-
emits: [
|
|
1941
|
-
setup(
|
|
1942
|
-
const { t } = St({ messages: Ke }),
|
|
1943
|
-
}, o =
|
|
1940
|
+
emits: [de.ACTION, de.CHANGE],
|
|
1941
|
+
setup(n, { emit: e }) {
|
|
1942
|
+
const { t } = St({ messages: Ke }), r = ge(null), i = [], s = () => {
|
|
1943
|
+
}, o = ue(() => n.langLabel ?? n.lang.toUpperCase()), u = ue(() => n.variant === ve.INLINE), h = ue(() => ({
|
|
1944
1944
|
"b-code-snippet--inline": u.value,
|
|
1945
1945
|
"b-code-snippet--scrollable": !u.value
|
|
1946
|
-
})), x =
|
|
1947
|
-
"b-code-snippet__code-area-content--editable":
|
|
1948
|
-
})), { loadLang:
|
|
1946
|
+
})), x = ue(() => ({
|
|
1947
|
+
"b-code-snippet__code-area-content--editable": n.editable
|
|
1948
|
+
})), { loadLang: _ } = qt(n.lang), w = $e(), A = $e(), L = new Ne(), N = new Ne(), P = new Ne(), M = ge(null), D = ge(0);
|
|
1949
1949
|
rt(async () => {
|
|
1950
|
-
const g = await
|
|
1951
|
-
|
|
1950
|
+
const g = await _();
|
|
1951
|
+
M.value = n.content;
|
|
1952
1952
|
const b = ({ state: p }) => {
|
|
1953
|
-
|
|
1954
|
-
},
|
|
1953
|
+
M.value = p.doc.toString();
|
|
1954
|
+
}, f = [
|
|
1955
1955
|
ut(),
|
|
1956
|
-
|
|
1956
|
+
ft.of([dt]),
|
|
1957
1957
|
L.of(g()),
|
|
1958
1958
|
N.of(Gt),
|
|
1959
|
-
|
|
1959
|
+
P.of(Ve.readOnly.of(!n.editable)),
|
|
1960
1960
|
He.updateListener.of((p) => b(p))
|
|
1961
1961
|
];
|
|
1962
|
-
|
|
1962
|
+
n.variant === "multiline" && f.push([ht(), ct()]);
|
|
1963
1963
|
const y = Ve.create({
|
|
1964
|
-
doc:
|
|
1965
|
-
extensions: [...
|
|
1964
|
+
doc: n.content,
|
|
1965
|
+
extensions: [...f]
|
|
1966
1966
|
});
|
|
1967
1967
|
D.value = y.doc.length, A.value = new He({
|
|
1968
1968
|
state: y,
|
|
1969
1969
|
parent: w.value
|
|
1970
1970
|
});
|
|
1971
1971
|
}), it(
|
|
1972
|
-
() =>
|
|
1972
|
+
() => n.content,
|
|
1973
1973
|
() => {
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1974
|
+
if (n.content !== M.value) {
|
|
1975
|
+
const g = n.content.length;
|
|
1976
|
+
A.value.dispatch({
|
|
1977
|
+
changes: {
|
|
1978
|
+
from: 0,
|
|
1979
|
+
to: D.value,
|
|
1980
|
+
insert: n.content
|
|
1981
|
+
}
|
|
1982
|
+
}), D.value = g;
|
|
1983
|
+
}
|
|
1982
1984
|
}
|
|
1983
1985
|
);
|
|
1984
|
-
const U =
|
|
1985
|
-
e(
|
|
1986
|
+
const U = ue(() => t(n.actionableText)), S = () => {
|
|
1987
|
+
e(de.ACTION, M.value);
|
|
1986
1988
|
};
|
|
1987
1989
|
st(() => {
|
|
1988
|
-
e(
|
|
1990
|
+
M.value !== null && e(de.CHANGE, M.value);
|
|
1989
1991
|
});
|
|
1990
|
-
const J =
|
|
1992
|
+
const J = ge(!1);
|
|
1991
1993
|
return {
|
|
1992
1994
|
// Values
|
|
1993
1995
|
availableLanguages: i,
|
|
1994
1996
|
codeAreaContentConditionalClasses: x,
|
|
1995
|
-
conditionalClasses:
|
|
1997
|
+
conditionalClasses: h,
|
|
1996
1998
|
container: w,
|
|
1997
|
-
currentContents:
|
|
1999
|
+
currentContents: M,
|
|
1998
2000
|
displayedLang: o,
|
|
1999
2001
|
editor: A,
|
|
2000
|
-
selectedLanguage:
|
|
2002
|
+
selectedLanguage: r,
|
|
2001
2003
|
showModal: J,
|
|
2002
2004
|
isInlineVariant: u,
|
|
2003
2005
|
// Methods
|
|
@@ -2009,112 +2011,113 @@ const en = /* @__PURE__ */ Ze(Ft, [["render", Yt], ["__scopeId", "data-v-012ee7f
|
|
|
2009
2011
|
};
|
|
2010
2012
|
}
|
|
2011
2013
|
});
|
|
2012
|
-
const nn = (
|
|
2014
|
+
const nn = (n) => (Fe("data-v-fdff494b"), n = n(), Xe(), n), rn = {
|
|
2013
2015
|
key: 0,
|
|
2014
2016
|
class: "b-code-snippet__action-bar"
|
|
2015
2017
|
}, sn = { class: "b-code-snippet__action-bar--start" }, on = { class: "b-code-snippet__action-bar--end" }, ln = {
|
|
2016
2018
|
key: 1,
|
|
2017
2019
|
class: "b-code-snippet__code-area"
|
|
2018
|
-
}, an = { key: 2 }, un = /* @__PURE__ */ nn(() => /* @__PURE__ */
|
|
2019
|
-
function
|
|
2020
|
-
const o = K("bento-dropdown"), u = K("bento-typography"),
|
|
2021
|
-
return
|
|
2022
|
-
class: Te(["b-code-snippet",
|
|
2020
|
+
}, an = { key: 2 }, un = /* @__PURE__ */ nn(() => /* @__PURE__ */ ae("div", { class: "b-code-snippet__empty-state" }, "Nothing to show", -1));
|
|
2021
|
+
function fn(n, e, t, r, i, s) {
|
|
2022
|
+
const o = K("bento-dropdown"), u = K("bento-typography"), h = K("bento-loading-indicator"), x = K("copy"), _ = K("expand-icon"), w = K("bento-button"), A = K("bento-code-snippet"), L = K("base-modal");
|
|
2023
|
+
return z(), le("div", {
|
|
2024
|
+
class: Te(["b-code-snippet", n.conditionalClasses])
|
|
2023
2025
|
}, [
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2026
|
+
n.isInlineVariant ? q("", !0) : (z(), le("section", rn, [
|
|
2027
|
+
ae("div", sn, [
|
|
2028
|
+
n.availableLanguages.length > 0 ? (z(), oe(o, qe({
|
|
2027
2029
|
key: 0,
|
|
2028
|
-
modelValue:
|
|
2029
|
-
"onUpdate:modelValue": e[0] || (e[0] = (N) =>
|
|
2030
|
-
},
|
|
2031
|
-
disabled:
|
|
2032
|
-
items:
|
|
2030
|
+
modelValue: n.selectedLanguage,
|
|
2031
|
+
"onUpdate:modelValue": e[0] || (e[0] = (N) => n.selectedLanguage = N)
|
|
2032
|
+
}, n.$props, {
|
|
2033
|
+
disabled: n.availableLanguages.length === 1,
|
|
2034
|
+
items: n.availableLanguages,
|
|
2033
2035
|
class: "b-code-snippet__language-picker",
|
|
2034
|
-
onInput:
|
|
2035
|
-
}), null, 16, ["modelValue", "disabled", "items", "onInput"])) :
|
|
2036
|
-
|
|
2036
|
+
onInput: n.handleChangeLanguage
|
|
2037
|
+
}), null, 16, ["modelValue", "disabled", "items", "onInput"])) : q("", !0),
|
|
2038
|
+
me(u, {
|
|
2037
2039
|
el: "span",
|
|
2038
2040
|
stronger: ""
|
|
2039
2041
|
}, {
|
|
2040
2042
|
default: fe(() => [
|
|
2041
|
-
je(Ae(
|
|
2043
|
+
je(Ae(n.displayedLang), 1)
|
|
2042
2044
|
]),
|
|
2043
2045
|
_: 1
|
|
2044
2046
|
})
|
|
2045
2047
|
]),
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
class: "b-structured-list__icon",
|
|
2050
|
-
text: r.currentContents
|
|
2051
|
-
}, null, 8, ["text"]),
|
|
2052
|
-
r.expandable ? (E(), ue(w, {
|
|
2048
|
+
ae("div", on, [
|
|
2049
|
+
n.loading ? (z(), oe(h, { key: 0 })) : q("", !0),
|
|
2050
|
+
n.currentContents !== null ? (z(), oe(x, {
|
|
2053
2051
|
key: 1,
|
|
2052
|
+
class: "b-structured-list__icon",
|
|
2053
|
+
text: n.currentContents
|
|
2054
|
+
}, null, 8, ["text"])) : q("", !0),
|
|
2055
|
+
n.expandable ? (z(), oe(w, {
|
|
2056
|
+
key: 2,
|
|
2054
2057
|
variant: "tertiary",
|
|
2055
2058
|
condensed: "",
|
|
2056
|
-
"aria-label":
|
|
2057
|
-
onClick: e[1] || (e[1] = (N) =>
|
|
2059
|
+
"aria-label": n.t("expand"),
|
|
2060
|
+
onClick: e[1] || (e[1] = (N) => n.showModal = !0)
|
|
2058
2061
|
}, {
|
|
2059
2062
|
iconLeft: fe(() => [
|
|
2060
|
-
|
|
2063
|
+
me(_)
|
|
2061
2064
|
]),
|
|
2062
2065
|
_: 1
|
|
2063
|
-
}, 8, ["aria-label"])) :
|
|
2064
|
-
|
|
2065
|
-
key:
|
|
2066
|
+
}, 8, ["aria-label"])) : q("", !0),
|
|
2067
|
+
n.actionable ? (z(), oe(w, {
|
|
2068
|
+
key: 3,
|
|
2066
2069
|
variant: "primary",
|
|
2067
2070
|
tertiary: "",
|
|
2068
2071
|
condensed: "",
|
|
2069
|
-
onClick:
|
|
2072
|
+
onClick: n.onActionClicked
|
|
2070
2073
|
}, {
|
|
2071
2074
|
iconLeft: fe(() => [
|
|
2072
|
-
|
|
2075
|
+
me(u, {
|
|
2073
2076
|
el: "span",
|
|
2074
2077
|
class: "b-code-snippet__action-button"
|
|
2075
2078
|
}, {
|
|
2076
2079
|
default: fe(() => [
|
|
2077
|
-
je(Ae(
|
|
2080
|
+
je(Ae(n.runText), 1)
|
|
2078
2081
|
]),
|
|
2079
2082
|
_: 1
|
|
2080
2083
|
})
|
|
2081
2084
|
]),
|
|
2082
2085
|
_: 1
|
|
2083
|
-
}, 8, ["onClick"])) :
|
|
2086
|
+
}, 8, ["onClick"])) : q("", !0)
|
|
2084
2087
|
])
|
|
2085
2088
|
])),
|
|
2086
|
-
|
|
2087
|
-
|
|
2089
|
+
n.content || n.editable ? (z(), le("code", ln, [
|
|
2090
|
+
ae("div", {
|
|
2088
2091
|
ref: "container",
|
|
2089
|
-
class: Te(["b-code-snippet__code-area-content",
|
|
2092
|
+
class: Te(["b-code-snippet__code-area-content", n.codeAreaContentConditionalClasses])
|
|
2090
2093
|
}, null, 2)
|
|
2091
|
-
])) : (
|
|
2092
|
-
ot(
|
|
2094
|
+
])) : (z(), le("section", an, [
|
|
2095
|
+
ot(n.$slots, "empty-state", {}, () => [
|
|
2093
2096
|
un
|
|
2094
2097
|
], !0)
|
|
2095
2098
|
])),
|
|
2096
|
-
|
|
2099
|
+
n.expandable ? (z(), oe(L, {
|
|
2097
2100
|
key: 3,
|
|
2098
2101
|
class: "b-code-snippet__modal",
|
|
2099
2102
|
"hide-close-button": !0,
|
|
2100
2103
|
"custom-padding": "0px",
|
|
2101
2104
|
"is-dismissible": !0,
|
|
2102
|
-
"is-open":
|
|
2105
|
+
"is-open": n.showModal,
|
|
2103
2106
|
size: "large",
|
|
2104
|
-
onCloseModal: e[2] || (e[2] = (N) =>
|
|
2107
|
+
onCloseModal: e[2] || (e[2] = (N) => n.showModal = !1)
|
|
2105
2108
|
}, {
|
|
2106
2109
|
content: fe(() => [
|
|
2107
|
-
|
|
2110
|
+
me(A, lt(at({ ...n.$props, expandable: !1 })), null, 16)
|
|
2108
2111
|
]),
|
|
2109
2112
|
_: 1
|
|
2110
|
-
}, 8, ["is-open"])) :
|
|
2113
|
+
}, 8, ["is-open"])) : q("", !0)
|
|
2111
2114
|
], 2);
|
|
2112
2115
|
}
|
|
2113
|
-
const Bn = /* @__PURE__ */ Ze(tn, [["render",
|
|
2116
|
+
const Bn = /* @__PURE__ */ Ze(tn, [["render", fn], ["__scopeId", "data-v-fdff494b"]]);
|
|
2114
2117
|
export {
|
|
2115
2118
|
Bn as BentoCodeSnippet,
|
|
2116
|
-
|
|
2119
|
+
de as BentoCodeSnippetEvent,
|
|
2117
2120
|
re as BentoCodeSnippetSupportedLanguage,
|
|
2118
|
-
|
|
2121
|
+
ve as BentoCodeSnippetVariant
|
|
2119
2122
|
};
|
|
2120
2123
|
//# sourceMappingURL=code-snippet.js.map
|