hlrender 0.0.12 → 0.0.14
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/{affix-widget-b1888905.js → affix-widget-8f77919e.js} +16 -16
- package/{alert-widget-0fcb1c7a.js → alert-widget-4ee79690.js} +16 -16
- package/{anchor-widget-59057f01.js → anchor-widget-d37e686e.js} +13 -13
- package/{auto-complete-widget-d6fb74ec.js → auto-complete-widget-0602e9f6.js} +16 -16
- package/{avatar-widget-1d51e0be.js → avatar-widget-0f043473.js} +16 -16
- package/{backtop-widget-382aad2a.js → backtop-widget-a04cd38f.js} +16 -16
- package/{badge-widget-cd9de0ec.js → badge-widget-eaf26e8d.js} +19 -19
- package/{baseImp-0de857ff.js → baseImp-f65fae6f.js} +29 -28
- package/{breadcrumb-widget-9a083759.js → breadcrumb-widget-b7418560.js} +13 -13
- package/{button-widget-ee32585b.js → button-widget-091eea68.js} +16 -16
- package/{cache-widget-45d8b824.js → cache-widget-360e4aa4.js} +15 -15
- package/{card-widget-47d273d1.js → card-widget-dfe1b93b.js} +14 -14
- package/{carousel-widget-2821110b.js → carousel-widget-2aaa16ae.js} +18 -18
- package/{cascader-widget-b46bf0de.js → cascader-widget-a0d0f95c.js} +20 -20
- package/{chart-widget-3b860da9.js → chart-widget-a0a1743f.js} +13 -13
- package/{checkbox-widget-f7c18bf8.js → checkbox-widget-8b6bdc99.js} +15 -15
- package/{collapse-widget-95271b15.js → collapse-widget-84fcaf46.js} +18 -18
- package/{color-picker-widget-2aea063d.js → color-picker-widget-53dbb10a.js} +15 -15
- package/{cont-cell-widget-dc3aab15.js → cont-cell-widget-3a5f3290.js} +1 -1
- package/{cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-2b164e0f.js → cont-cell-widget.vue_vue_type_script_setup_true_name_cont-cell-widget_lang-2e713f22.js} +5 -5
- package/{cont-widget-e5ad6ff5.js → cont-widget-a4b02e62.js} +8 -8
- package/content-wrapper-af55adf4.js +14 -0
- package/{content-wrapper.vue_vue_type_script_setup_true_lang-88a84e7b.js → content-wrapper.vue_vue_type_script_setup_true_lang-82696e29.js} +3 -3
- package/{date-picker-range-widget-0c9e8f12.js → date-picker-range-widget-d6852579.js} +15 -15
- package/{date-picker-widget-7f06b89a.js → date-picker-widget-4bd7c70f.js} +15 -15
- package/default-slot-widget-d53c8a11.js +24 -0
- package/{default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-15880256.js → default-slot-widget.vue_vue_type_script_setup_true_name_default-slot-widget_lang-14aa0ba6.js} +7 -7
- package/{descriptions-widget-f8fd60c4.js → descriptions-widget-37a207b2.js} +14 -14
- package/{dialog-701b8c0a.js → dialog-7d33aaed.js} +2 -2
- package/{dialog-widget-170c321c.js → dialog-widget-b5df0e78.js} +15 -15
- package/{divider-widget-e2b7367f.js → divider-widget-1b9c6370.js} +16 -16
- package/{drag-wrapper-5ad8db42.js → drag-wrapper-97c58b05.js} +9 -9
- package/{drawer-widget-fea1468b.js → drawer-widget-00bc1997.js} +15 -15
- package/{dropdown-widget-e5543973.js → dropdown-widget-27f98978.js} +14 -14
- package/{empty-widget-25e180d2.js → empty-widget-cde1ce6c.js} +16 -16
- package/{enum-type-965ecb4e.js → enum-type-6c2444c7.js} +23 -23
- package/{enum-type-0083e5e5.js → enum-type-f19f3faf.js} +1 -1
- package/{expression-78a5f136.js → expression-d0d5b99e.js} +7 -7
- package/feedback-widget-38ce0856.js +24 -0
- package/{feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-0517fb10.js → feedback-widget.vue_vue_type_script_setup_true_name_feedback-widget_lang-e425d56f.js} +5 -5
- package/{fieldobj-079cc6a1.js → fieldobj-3d0327a8.js} +3 -3
- package/{file-upload-widget-b4100f36.js → file-upload-widget-6e9c1988.js} +16 -16
- package/{form-item-wrapper-b998aca1.js → form-item-wrapper-120aa413.js} +11 -11
- package/{form-widget-63abf671.js → form-widget-023619d7.js} +42 -42
- package/{grid-col-widget-6cbfe8ab.js → grid-col-widget-cd15ea4d.js} +1 -1
- package/{grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-fa341ff6.js → grid-col-widget.vue_vue_type_script_setup_true_name_grid-col-widget_lang-41d365c1.js} +5 -5
- package/{grid-widget-57a31c84.js → grid-widget-bc068dd2.js} +8 -8
- package/{html-text-widget-48f93f47.js → html-text-widget-842c6619.js} +14 -14
- package/{iframe-widget-616c8a3f.js → iframe-widget-90d1e50c.js} +22 -22
- package/{image-widget-a3c593da.js → image-widget-34604638.js} +13 -13
- package/{index-22bda53a.js → index-6f9269bf.js} +1 -1
- package/{index-94d0325b.js → index-84cb8278.js} +4 -4
- package/{index-10821241.js → index-86d2f339.js} +5 -5
- package/{input-number-widget-2a425e66.js → input-number-widget-b8391659.js} +15 -15
- package/{input-widget-e5b28111.js → input-widget-73607a50.js} +16 -16
- package/{label-wrapper-bb67454d.js → label-wrapper-bc320280.js} +5 -5
- package/{label-wrapper.vue_vue_type_style_index_0_lang-406a5b48.js → label-wrapper.vue_vue_type_style_index_0_lang-a0cb6bb5.js} +3 -3
- package/{link-widget-ddd24624.js → link-widget-cf4f1f44.js} +16 -16
- package/{ltable-col-widget-6d4148b1.js → ltable-col-widget-faf4bc83.js} +1 -1
- package/{ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-9d6dead6.js → ltable-col-widget.vue_vue_type_script_setup_true_name_ltable-col-widget_lang-3ff698b3.js} +10 -10
- package/{ltable-widget-3677191f.js → ltable-widget-f54e2209.js} +5 -5
- package/{menu-widget-098a3854.js → menu-widget-16ddaccc.js} +14 -14
- package/{model-widget-f1c2e49f.js → model-widget-e6fcecd7.js} +13 -13
- package/{multirow-4f8b5ed9.js → multirow-402897e3.js} +15 -15
- package/{multirow-widget-929eca74.js → multirow-widget-7e7edd83.js} +15 -15
- package/package.json +1 -1
- package/{pagination-widget-f92cdfb3.js → pagination-widget-8a20ca10.js} +13 -13
- package/{picture-upload-widget-1f5d0e1e.js → picture-upload-widget-a303d9fc.js} +16 -16
- package/{progress-widget-43c8779a.js → progress-widget-53984c6f.js} +14 -14
- package/{propresult-92830dff.js → propresult-e19b76cc.js} +1 -1
- package/{radio-widget-feb01b9d.js → radio-widget-0bb3371b.js} +15 -15
- package/{range-widget-afc91de9.js → range-widget-59228a71.js} +16 -16
- package/{rate-widget-d0b37c8b.js → rate-widget-a7670291.js} +15 -15
- package/render.es.js +829 -825
- package/render.style.css +1 -1
- package/render.umd.js +144 -121
- package/{result-widget-15624772.js → result-widget-948d5222.js} +14 -14
- package/{rich-editor-widget-37eeb53b.js → rich-editor-widget-3910c97d.js} +21 -21
- package/{router-widget-f359ffc6.js → router-widget-a2ba9038.js} +13 -13
- package/{select-widget-207eac04.js → select-widget-50c108e9.js} +15 -15
- package/{sfc-3f7c333c.js → sfc-277c323f.js} +798 -757
- package/{share-field-acd9f496.js → share-field-291c4695.js} +79 -79
- package/{share-file-c320fa13.js → share-file-68af343b.js} +14 -14
- package/{slider-widget-a1693b0e.js → slider-widget-5e02a8a2.js} +20 -20
- package/{slot-89e9df20.js → slot-179831f9.js} +7 -7
- package/{static-text-widget-d069ccf2.js → static-text-widget-d7dbdac0.js} +14 -14
- package/{steps-widget-984902b0.js → steps-widget-b7f994af.js} +13 -13
- package/subMenu-widget-afc6d7ef.js +16 -0
- package/{subMenu-widget.vue_vue_type_script_setup_true_lang-859cce1d.js → subMenu-widget.vue_vue_type_script_setup_true_lang-40d660b0.js} +3 -3
- package/{switch-widget-332cbcf7.js → switch-widget-191dd8e1.js} +15 -15
- package/{tab-pane-widget-b930be60.js → tab-pane-widget-5fa4f0b7.js} +1 -1
- package/{tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-b13fb030.js → tab-pane-widget.vue_vue_type_script_setup_true_name_tab-pane-widget_lang-1f77050a.js} +5 -5
- package/table-col-widget-447c6f12.js +20 -0
- package/{table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-6677c8a9.js → table-col-widget.vue_vue_type_script_setup_true_name_table-col-widget_lang-8bcbaeb0.js} +15 -15
- package/{table-widget-54348d4a.js → table-widget-6b4ecd25.js} +47 -47
- package/{tabs-widget-38f227e2.js → tabs-widget-78b20bcc.js} +11 -11
- package/{tag-widget-9ab01cc3.js → tag-widget-3240bf6b.js} +16 -16
- package/{text-widget-b67fbcb8.js → text-widget-2642866a.js} +16 -16
- package/{textarea-widget-1e9ece65.js → textarea-widget-e01ce3a7.js} +15 -15
- package/{time-picker-range-widget-926be65f.js → time-picker-range-widget-780da29b.js} +15 -15
- package/{time-picker-widget-e200e804.js → time-picker-widget-98d666f3.js} +15 -15
- package/{time-select-widget-54a4b4d5.js → time-select-widget-3a2fae63.js} +15 -15
- package/{tmpl-widget-f0969f40.js → tmpl-widget-d91e6eb5.js} +23 -23
- package/{tree-select-widget-c692845c.js → tree-select-widget-796b88ab.js} +15 -15
- package/{tree-widget-27362c18.js → tree-widget-c15051cf.js} +26 -26
- package/{uuid-8f83f4bc.js → uuid-85303a38.js} +10 -10
- package/{widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-da8e5f63.js → widget-wrapper.vue_vue_type_script_setup_true_name_form-item-wrapper_lang-32b1f85d.js} +7 -7
- package/{wrapper-widget-231b0ddd.js → wrapper-widget-c45400a7.js} +6 -6
- package/content-wrapper-dec4f0ad.js +0 -14
- package/default-slot-widget-678e17ab.js +0 -24
- package/feedback-widget-4e7b24c0.js +0 -24
- package/subMenu-widget-8d6bdf07.js +0 -16
- package/table-col-widget-12ed1e63.js +0 -20
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Y = (t, i, s) => (
|
|
4
|
-
import { d as
|
|
5
|
-
import { B as w, P as
|
|
6
|
-
import { d as E, e as
|
|
7
|
-
import { c as
|
|
8
|
-
import { t as
|
|
9
|
-
import {
|
|
10
|
-
import { a as
|
|
1
|
+
var Ue = Object.defineProperty;
|
|
2
|
+
var ze = (t, i, s) => i in t ? Ue(t, i, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[i] = s;
|
|
3
|
+
var Y = (t, i, s) => (ze(t, typeof i != "symbol" ? i + "" : i, s), s);
|
|
4
|
+
import { d as M, t as H, o as _t, J as qe, e as Mt, K as Ve, L as q, f as Fe, M as Xe, x as Oe, j as Ge } from "./enum-type-6c2444c7.js";
|
|
5
|
+
import { B as w, P as I, A as Te, F as Qe, C as He, D as Je, b as mt, G as Ye } from "./baseImp-f65fae6f.js";
|
|
6
|
+
import { d as E, e as Ze, H as Ht, f as Jt, aa as ti } from "./enum-type-f19f3faf.js";
|
|
7
|
+
import { c as Bt } from "./uuid-85303a38.js";
|
|
8
|
+
import { t as ei, l as Ee, m as ke } from "./index-86d2f339.js";
|
|
9
|
+
import { g as J, o as F, k as rt, q as Re } from "./expression-d0d5b99e.js";
|
|
10
|
+
import { a as Ae } from "./slot-179831f9.js";
|
|
11
11
|
import "./icon-e9532b43.js";
|
|
12
12
|
import "vue";
|
|
13
|
-
import "./dialog-
|
|
13
|
+
import "./dialog-7d33aaed.js";
|
|
14
14
|
import "./_commonjsHelpers-e7ea1525.js";
|
|
15
15
|
import "element-plus";
|
|
16
|
-
const
|
|
16
|
+
const ii = (t) => {
|
|
17
17
|
let i = {};
|
|
18
18
|
const s = t.type, e = w.getName(t);
|
|
19
|
-
s === E.tabs ? t.tabs.length > 0 &&
|
|
19
|
+
s === E.tabs ? t.tabs.length > 0 && M(i, {
|
|
20
20
|
[`${e}ActiveTab`]: w.getName(t.tabs[0])
|
|
21
21
|
}) : [
|
|
22
22
|
E.radio,
|
|
@@ -28,122 +28,163 @@ const Ze = (t) => {
|
|
|
28
28
|
E.dropdown,
|
|
29
29
|
E.steps,
|
|
30
30
|
E.collapse
|
|
31
|
-
].includes(s) ?
|
|
32
|
-
[`${e}Options`]:
|
|
33
|
-
}) : [E.pictureUpload, E.fileUpload].includes(s) &&
|
|
31
|
+
].includes(s) ? M(i, {
|
|
32
|
+
[`${e}Options`]: I.getValue(w.getOrgOption(t, J.optionItems))
|
|
33
|
+
}) : [E.pictureUpload, E.fileUpload].includes(s) && M(i, {
|
|
34
34
|
[`${e}FileList`]: [],
|
|
35
35
|
[`${e}UploadHeaders`]: {},
|
|
36
36
|
[`${e}UploadData`]: {}
|
|
37
37
|
});
|
|
38
|
-
let
|
|
39
|
-
return !
|
|
40
|
-
},
|
|
38
|
+
let n = Se(t);
|
|
39
|
+
return !n && e && (n = Ce(t)), n && M(i, n), i;
|
|
40
|
+
}, Se = (t) => {
|
|
41
41
|
const i = w.getName(t);
|
|
42
42
|
if (t.formItemFlag) {
|
|
43
43
|
const s = w.getOptions(t, "defaultValue");
|
|
44
|
-
return { [i]:
|
|
44
|
+
return { [i]: Mt(s) ? null : s };
|
|
45
45
|
}
|
|
46
|
-
}, Se = (t) => {
|
|
47
|
-
var i = Ee(t);
|
|
48
|
-
return Ce(i);
|
|
49
46
|
}, Ce = (t) => {
|
|
47
|
+
var i = ke(t);
|
|
48
|
+
return $e(i);
|
|
49
|
+
}, $e = (t) => {
|
|
50
50
|
let i = {};
|
|
51
|
-
var s =
|
|
52
|
-
const e = s == null ? void 0 : s.map((
|
|
53
|
-
return s == null || s.map((
|
|
51
|
+
var s = Ee(t, E.form);
|
|
52
|
+
const e = s == null ? void 0 : s.map((n) => w.getName(n));
|
|
53
|
+
return s == null || s.map((n) => {
|
|
54
54
|
var l;
|
|
55
55
|
let r = {};
|
|
56
|
-
const u = w.getName(
|
|
57
|
-
(l =
|
|
58
|
-
const x = w.getName(
|
|
59
|
-
let b =
|
|
60
|
-
e != null && e.includes(x) && (b =
|
|
61
|
-
}),
|
|
56
|
+
const u = w.getName(n), o = w.getOptions(n, "modelName") || u;
|
|
57
|
+
(l = n.widgetList) == null || l.map((y) => {
|
|
58
|
+
const x = w.getName(y);
|
|
59
|
+
let b = Se(y);
|
|
60
|
+
e != null && e.includes(x) && (b = Ce(y)), M(r, b);
|
|
61
|
+
}), M(i, { [o]: r });
|
|
62
62
|
}), i;
|
|
63
63
|
}, Wt = (t) => {
|
|
64
|
-
var
|
|
64
|
+
var n;
|
|
65
65
|
let i = {};
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
ei(t, (r) => {
|
|
67
|
+
M(i, ii(r));
|
|
68
68
|
});
|
|
69
|
-
const s =
|
|
70
|
-
|
|
71
|
-
const e =
|
|
72
|
-
return (
|
|
69
|
+
const s = $e(t);
|
|
70
|
+
M(i, s);
|
|
71
|
+
const e = qe(s, !0);
|
|
72
|
+
return (n = _t(i)) == null || n.forEach((r) => {
|
|
73
73
|
e != null && e.includes(r) && delete i[r];
|
|
74
74
|
}), i;
|
|
75
|
-
},
|
|
75
|
+
}, si = (t) => {
|
|
76
76
|
t.options;
|
|
77
77
|
let i = [];
|
|
78
78
|
var s = w.getOptions(t, "required");
|
|
79
79
|
s && i.push({
|
|
80
80
|
required: !0,
|
|
81
|
-
message: `${
|
|
81
|
+
message: `${Ve("render.hint.fieldRequired")}`
|
|
82
82
|
});
|
|
83
83
|
var e = w.getOptions(t, "expValidate", !0);
|
|
84
|
-
const
|
|
85
|
-
if (e &&
|
|
86
|
-
let r =
|
|
87
|
-
const u =
|
|
84
|
+
const n = Bt(e == null ? void 0 : e.options);
|
|
85
|
+
if (e && n && n.enable) {
|
|
86
|
+
let r = n == null ? void 0 : n.expression;
|
|
87
|
+
const u = Qe[r] ? He(r) : new RegExp(r);
|
|
88
88
|
i.push({
|
|
89
89
|
pattern: `${u}`,
|
|
90
90
|
trigger: ["blur", "change"],
|
|
91
|
-
message: `${
|
|
91
|
+
message: `${n.errorMsg}`
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
return i;
|
|
95
95
|
}, Kt = (t) => {
|
|
96
96
|
let i = {};
|
|
97
|
-
var s =
|
|
97
|
+
var s = Ee(t, E.form);
|
|
98
98
|
return s == null || s.map((e) => {
|
|
99
99
|
var u;
|
|
100
|
-
let
|
|
100
|
+
let n = {};
|
|
101
101
|
const r = w.getOptions(e, "rulesName") || name + "_rules";
|
|
102
102
|
(u = e.widgetList) == null || u.map((o) => {
|
|
103
103
|
const l = w.getOptions(o, "name");
|
|
104
|
-
let
|
|
104
|
+
let y = {};
|
|
105
105
|
if (o.formItemFlag)
|
|
106
|
-
|
|
106
|
+
y = { [l]: si(o) };
|
|
107
107
|
else if (o.type !== E.form) {
|
|
108
|
-
var x =
|
|
109
|
-
|
|
108
|
+
var x = ke(o);
|
|
109
|
+
y = Kt(x);
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
}),
|
|
111
|
+
M(n, y);
|
|
112
|
+
}), M(i, { [r]: n });
|
|
113
113
|
}), i;
|
|
114
|
-
},
|
|
115
|
-
|
|
114
|
+
}, Ne = (t, i) => {
|
|
115
|
+
var e;
|
|
116
|
+
var s = I.getValue(t.pageCreated);
|
|
117
|
+
if (i)
|
|
118
|
+
return `
|
|
119
|
+
${s}
|
|
120
|
+
`;
|
|
121
|
+
{
|
|
122
|
+
const n = Te(s);
|
|
123
|
+
return `function pageCreated(${(e = n == null ? void 0 : n.params) == null ? void 0 : e.join(",")}){
|
|
124
|
+
${n == null ? void 0 : n.body}
|
|
125
|
+
}`;
|
|
126
|
+
}
|
|
127
|
+
}, Pe = (t, i) => {
|
|
128
|
+
var e;
|
|
129
|
+
var s = I.getValue(t.pageMounted);
|
|
130
|
+
if (i)
|
|
131
|
+
return `
|
|
132
|
+
${s}
|
|
133
|
+
`;
|
|
134
|
+
{
|
|
135
|
+
const n = Te(s);
|
|
136
|
+
return `function pageMounted(${(e = n == null ? void 0 : n.params) == null ? void 0 : e.join(",")}){
|
|
137
|
+
${n == null ? void 0 : n.body}
|
|
138
|
+
}`;
|
|
139
|
+
}
|
|
140
|
+
}, ni = function(t, i) {
|
|
141
|
+
const s = Wt(i), e = Kt(i), n = M(s, e), r = Ne(t, !1), u = Pe(t, !1);
|
|
116
142
|
return `
|
|
117
143
|
export default {
|
|
118
144
|
components: {},
|
|
119
|
-
props: {},
|
|
145
|
+
props: {ctx:Object},
|
|
120
146
|
data() {
|
|
121
147
|
return
|
|
122
|
-
${H(
|
|
148
|
+
${H(n)};
|
|
123
149
|
},
|
|
124
150
|
computed: {},
|
|
125
151
|
watch: {},
|
|
126
|
-
created() {
|
|
127
|
-
|
|
152
|
+
created() {
|
|
153
|
+
${r}
|
|
154
|
+
pageCreated(this.ctx);
|
|
155
|
+
},
|
|
156
|
+
mounted() {
|
|
157
|
+
${u}
|
|
158
|
+
pageMounted(this.ctx);
|
|
159
|
+
},
|
|
128
160
|
methods: {}
|
|
129
161
|
}`;
|
|
130
|
-
},
|
|
131
|
-
var
|
|
132
|
-
const
|
|
162
|
+
}, ai = function(t, i) {
|
|
163
|
+
var v, A;
|
|
164
|
+
const s = Wt(i), e = Kt(i), n = M(s, e), r = ($) => !Array.isArray($), u = (v = _t(n)) == null ? void 0 : v.map(($) => `const ${$} =${r(n == null ? void 0 : n[$]) ? "ref" : "reactive"} (${H(n == null ? void 0 : n[$])});`), o = ((A = _t(n)) == null ? void 0 : A.length) > 0 ? "import { ref,reactive } from 'vue';" : "", l = `
|
|
165
|
+
${Ne(t, !0)}
|
|
166
|
+
pageCreated(props.ctx);
|
|
167
|
+
`, y = `onMounted(()=>{
|
|
168
|
+
${Pe(t, !0)}
|
|
169
|
+
pageMounted(props.ctx);
|
|
170
|
+
});`;
|
|
133
171
|
return `
|
|
134
|
-
${
|
|
135
|
-
|
|
172
|
+
${o}
|
|
173
|
+
const props=defineProps({ctx:{type:Object}});
|
|
174
|
+
${u.join(`
|
|
136
175
|
`)}
|
|
176
|
+
${l}
|
|
177
|
+
${y}
|
|
137
178
|
`;
|
|
138
179
|
};
|
|
139
|
-
var it = {},
|
|
180
|
+
var it = {}, _i = {
|
|
140
181
|
get exports() {
|
|
141
182
|
return it;
|
|
142
183
|
},
|
|
143
184
|
set exports(t) {
|
|
144
185
|
it = t;
|
|
145
186
|
}
|
|
146
|
-
}, Z = {}, st = {},
|
|
187
|
+
}, Z = {}, st = {}, ri = {
|
|
147
188
|
get exports() {
|
|
148
189
|
return st;
|
|
149
190
|
},
|
|
@@ -164,12 +205,12 @@ function Ut() {
|
|
|
164
205
|
}, t.prototype.item = function(e) {
|
|
165
206
|
return e < 0 ? this.__items[this.__items.length + e] : this.__items[e];
|
|
166
207
|
}, t.prototype.has_match = function(e) {
|
|
167
|
-
for (var
|
|
168
|
-
if (this.__items[
|
|
208
|
+
for (var n = this.__items.length - 1; n >= 0; n--)
|
|
209
|
+
if (this.__items[n].match(e))
|
|
169
210
|
return !0;
|
|
170
211
|
return !1;
|
|
171
|
-
}, t.prototype.set_indent = function(e,
|
|
172
|
-
this.is_empty() && (this.__indent_count = e || 0, this.__alignment_count =
|
|
212
|
+
}, t.prototype.set_indent = function(e, n) {
|
|
213
|
+
this.is_empty() && (this.__indent_count = e || 0, this.__alignment_count = n || 0, this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count));
|
|
173
214
|
}, t.prototype._set_wrap_point = function() {
|
|
174
215
|
this.__parent.wrap_line_length && (this.__wrap_point_index = this.__items.length, this.__wrap_point_character_count = this.__character_count, this.__wrap_point_indent_count = this.__parent.next_line.__indent_count, this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count);
|
|
175
216
|
}, t.prototype._should_wrap = function() {
|
|
@@ -187,9 +228,9 @@ function Ut() {
|
|
|
187
228
|
return this.is_empty() ? null : this.__items[this.__items.length - 1];
|
|
188
229
|
}, t.prototype.push = function(e) {
|
|
189
230
|
this.__items.push(e);
|
|
190
|
-
var
|
|
231
|
+
var n = e.lastIndexOf(`
|
|
191
232
|
`);
|
|
192
|
-
|
|
233
|
+
n !== -1 ? this.__character_count = e.length - n : this.__character_count += e.length;
|
|
193
234
|
}, t.prototype.pop = function() {
|
|
194
235
|
var e = null;
|
|
195
236
|
return this.is_empty() || (e = this.__items.pop(), this.__character_count -= e.length), e;
|
|
@@ -204,52 +245,52 @@ function Ut() {
|
|
|
204
245
|
var e = "";
|
|
205
246
|
return this.is_empty() ? this.__parent.indent_empty_lines && (e = this.__parent.get_indent_string(this.__indent_count)) : (e = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count), e += this.__items.join("")), e;
|
|
206
247
|
};
|
|
207
|
-
function i(e,
|
|
208
|
-
this.__cache = [""], this.__indent_size = e.indent_size, this.__indent_string = e.indent_char, e.indent_with_tabs || (this.__indent_string = new Array(e.indent_size + 1).join(e.indent_char)),
|
|
248
|
+
function i(e, n) {
|
|
249
|
+
this.__cache = [""], this.__indent_size = e.indent_size, this.__indent_string = e.indent_char, e.indent_with_tabs || (this.__indent_string = new Array(e.indent_size + 1).join(e.indent_char)), n = n || "", e.indent_level > 0 && (n = new Array(e.indent_level + 1).join(this.__indent_string)), this.__base_string = n, this.__base_string_length = n.length;
|
|
209
250
|
}
|
|
210
|
-
i.prototype.get_indent_size = function(e,
|
|
251
|
+
i.prototype.get_indent_size = function(e, n) {
|
|
211
252
|
var r = this.__base_string_length;
|
|
212
|
-
return
|
|
213
|
-
}, i.prototype.get_indent_string = function(e,
|
|
253
|
+
return n = n || 0, e < 0 && (r = 0), r += e * this.__indent_size, r += n, r;
|
|
254
|
+
}, i.prototype.get_indent_string = function(e, n) {
|
|
214
255
|
var r = this.__base_string;
|
|
215
|
-
return
|
|
256
|
+
return n = n || 0, e < 0 && (e = 0, r = ""), n += e * this.__indent_size, this.__ensure_cache(n), r += this.__cache[n], r;
|
|
216
257
|
}, i.prototype.__ensure_cache = function(e) {
|
|
217
258
|
for (; e >= this.__cache.length; )
|
|
218
259
|
this.__add_column();
|
|
219
260
|
}, i.prototype.__add_column = function() {
|
|
220
|
-
var e = this.__cache.length,
|
|
221
|
-
this.__indent_size && e >= this.__indent_size && (
|
|
261
|
+
var e = this.__cache.length, n = 0, r = "";
|
|
262
|
+
this.__indent_size && e >= this.__indent_size && (n = Math.floor(e / this.__indent_size), e -= n * this.__indent_size, r = new Array(n + 1).join(this.__indent_string)), e && (r += new Array(e + 1).join(" ")), this.__cache.push(r);
|
|
222
263
|
};
|
|
223
|
-
function s(e,
|
|
224
|
-
this.__indent_cache = new i(e,
|
|
264
|
+
function s(e, n) {
|
|
265
|
+
this.__indent_cache = new i(e, n), this.raw = !1, this._end_with_newline = e.end_with_newline, this.indent_size = e.indent_size, this.wrap_line_length = e.wrap_line_length, this.indent_empty_lines = e.indent_empty_lines, this.__lines = [], this.previous_line = null, this.current_line = null, this.next_line = new t(this), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = !1, this.__add_outputline();
|
|
225
266
|
}
|
|
226
267
|
return s.prototype.__add_outputline = function() {
|
|
227
268
|
this.previous_line = this.current_line, this.current_line = this.next_line.clone_empty(), this.__lines.push(this.current_line);
|
|
228
269
|
}, s.prototype.get_line_number = function() {
|
|
229
270
|
return this.__lines.length;
|
|
230
|
-
}, s.prototype.get_indent_string = function(e,
|
|
231
|
-
return this.__indent_cache.get_indent_string(e,
|
|
232
|
-
}, s.prototype.get_indent_size = function(e,
|
|
233
|
-
return this.__indent_cache.get_indent_size(e,
|
|
271
|
+
}, s.prototype.get_indent_string = function(e, n) {
|
|
272
|
+
return this.__indent_cache.get_indent_string(e, n);
|
|
273
|
+
}, s.prototype.get_indent_size = function(e, n) {
|
|
274
|
+
return this.__indent_cache.get_indent_size(e, n);
|
|
234
275
|
}, s.prototype.is_empty = function() {
|
|
235
276
|
return !this.previous_line && this.current_line.is_empty();
|
|
236
277
|
}, s.prototype.add_new_line = function(e) {
|
|
237
278
|
return this.is_empty() || !e && this.just_added_newline() ? !1 : (this.raw || this.__add_outputline(), !0);
|
|
238
279
|
}, s.prototype.get_code = function(e) {
|
|
239
280
|
this.trim(!0);
|
|
240
|
-
var
|
|
241
|
-
|
|
242
|
-
` && (
|
|
281
|
+
var n = this.current_line.pop();
|
|
282
|
+
n && (n[n.length - 1] === `
|
|
283
|
+
` && (n = n.replace(/\n+$/g, "")), this.current_line.push(n)), this._end_with_newline && this.__add_outputline();
|
|
243
284
|
var r = this.__lines.join(`
|
|
244
285
|
`);
|
|
245
286
|
return e !== `
|
|
246
287
|
` && (r = r.replace(/[\n]/g, e)), r;
|
|
247
288
|
}, s.prototype.set_wrap_point = function() {
|
|
248
289
|
this.current_line._set_wrap_point();
|
|
249
|
-
}, s.prototype.set_indent = function(e,
|
|
250
|
-
return e = e || 0,
|
|
290
|
+
}, s.prototype.set_indent = function(e, n) {
|
|
291
|
+
return e = e || 0, n = n || 0, this.next_line.set_indent(e, n), this.__lines.length > 1 ? (this.current_line.set_indent(e, n), !0) : (this.current_line.set_indent(), !1);
|
|
251
292
|
}, s.prototype.add_raw_token = function(e) {
|
|
252
|
-
for (var
|
|
293
|
+
for (var n = 0; n < e.newlines; n++)
|
|
253
294
|
this.__add_outputline();
|
|
254
295
|
this.current_line.set_indent(-1), this.current_line.push(e.whitespace_before), this.current_line.push(e.text), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = !1;
|
|
255
296
|
}, s.prototype.add_token = function(e) {
|
|
@@ -257,7 +298,7 @@ function Ut() {
|
|
|
257
298
|
}, s.prototype.__add_space_before_token = function() {
|
|
258
299
|
this.space_before_token && !this.just_added_newline() && (this.non_breaking_space || this.set_wrap_point(), this.current_line.push(" "));
|
|
259
300
|
}, s.prototype.remove_indent = function(e) {
|
|
260
|
-
for (var
|
|
301
|
+
for (var n = this.__lines.length; e < n; )
|
|
261
302
|
this.__lines[e]._remove_indent(), e++;
|
|
262
303
|
this.current_line._remove_wrap_indent();
|
|
263
304
|
}, s.prototype.trim = function(e) {
|
|
@@ -268,12 +309,12 @@ function Ut() {
|
|
|
268
309
|
return this.current_line.is_empty();
|
|
269
310
|
}, s.prototype.just_added_blankline = function() {
|
|
270
311
|
return this.is_empty() || this.current_line.is_empty() && this.previous_line.is_empty();
|
|
271
|
-
}, s.prototype.ensure_empty_line_above = function(e,
|
|
312
|
+
}, s.prototype.ensure_empty_line_above = function(e, n) {
|
|
272
313
|
for (var r = this.__lines.length - 2; r >= 0; ) {
|
|
273
314
|
var u = this.__lines[r];
|
|
274
315
|
if (u.is_empty())
|
|
275
316
|
break;
|
|
276
|
-
if (u.item(0).indexOf(e) !== 0 && u.item(-1) !==
|
|
317
|
+
if (u.item(0).indexOf(e) !== 0 && u.item(-1) !== n) {
|
|
277
318
|
this.__lines.splice(r + 1, 0, new t(this)), this.previous_line = this.__lines[this.__lines.length - 2];
|
|
278
319
|
break;
|
|
279
320
|
}
|
|
@@ -282,20 +323,20 @@ function Ut() {
|
|
|
282
323
|
}, Ot.Output = s, Ot;
|
|
283
324
|
}
|
|
284
325
|
var Tt = {}, Zt;
|
|
285
|
-
function
|
|
326
|
+
function Le() {
|
|
286
327
|
if (Zt)
|
|
287
328
|
return Tt;
|
|
288
329
|
Zt = 1;
|
|
289
|
-
function t(i, s, e,
|
|
290
|
-
this.type = i, this.text = s, this.comments_before = null, this.newlines = e || 0, this.whitespace_before =
|
|
330
|
+
function t(i, s, e, n) {
|
|
331
|
+
this.type = i, this.text = s, this.comments_before = null, this.newlines = e || 0, this.whitespace_before = n || "", this.parent = null, this.next = null, this.previous = null, this.opened = null, this.closed = null, this.directives = null;
|
|
291
332
|
}
|
|
292
333
|
return Tt.Token = t, Tt;
|
|
293
334
|
}
|
|
294
335
|
var Et = {}, te;
|
|
295
|
-
function
|
|
336
|
+
function je() {
|
|
296
337
|
return te || (te = 1, function(t) {
|
|
297
|
-
var i = "\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a", s = "\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a", e = "\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",
|
|
298
|
-
t.identifier = new RegExp(r + u, "g"), t.identifierStart = new RegExp(r), t.identifierMatch = new RegExp("(?:\\\\u[0-9a-fA-F]{4}|[" + s + e +
|
|
338
|
+
var i = "\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a", s = "\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a", e = "\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc", n = "\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f", r = "(?:\\\\u[0-9a-fA-F]{4}|[" + i + e + "])", u = "(?:\\\\u[0-9a-fA-F]{4}|[" + s + e + n + "])*";
|
|
339
|
+
t.identifier = new RegExp(r + u, "g"), t.identifierStart = new RegExp(r), t.identifierMatch = new RegExp("(?:\\\\u[0-9a-fA-F]{4}|[" + s + e + n + "])+"), t.newline = /[\n\r\u2028\u2029]/, t.lineBreak = new RegExp(`\r
|
|
299
340
|
|` + t.newline.source), t.allLineBreaks = new RegExp(t.lineBreak.source, "g");
|
|
300
341
|
}(Et)), Et;
|
|
301
342
|
}
|
|
@@ -304,82 +345,82 @@ function zt() {
|
|
|
304
345
|
if (ee)
|
|
305
346
|
return tt;
|
|
306
347
|
ee = 1;
|
|
307
|
-
function t(e,
|
|
308
|
-
this.raw_options = i(e,
|
|
348
|
+
function t(e, n) {
|
|
349
|
+
this.raw_options = i(e, n), this.disabled = this._get_boolean("disabled"), this.eol = this._get_characters("eol", "auto"), this.end_with_newline = this._get_boolean("end_with_newline"), this.indent_size = this._get_number("indent_size", 4), this.indent_char = this._get_characters("indent_char", " "), this.indent_level = this._get_number("indent_level"), this.preserve_newlines = this._get_boolean("preserve_newlines", !0), this.max_preserve_newlines = this._get_number("max_preserve_newlines", 32786), this.preserve_newlines || (this.max_preserve_newlines = 0), this.indent_with_tabs = this._get_boolean("indent_with_tabs", this.indent_char === " "), this.indent_with_tabs && (this.indent_char = " ", this.indent_size === 1 && (this.indent_size = 4)), this.wrap_line_length = this._get_number("wrap_line_length", this._get_number("max_char")), this.indent_empty_lines = this._get_boolean("indent_empty_lines"), this.templating = this._get_selection_list("templating", ["auto", "none", "django", "erb", "handlebars", "php", "smarty"], ["auto"]);
|
|
309
350
|
}
|
|
310
|
-
t.prototype._get_array = function(e,
|
|
311
|
-
var r = this.raw_options[e], u =
|
|
351
|
+
t.prototype._get_array = function(e, n) {
|
|
352
|
+
var r = this.raw_options[e], u = n || [];
|
|
312
353
|
return typeof r == "object" ? r !== null && typeof r.concat == "function" && (u = r.concat()) : typeof r == "string" && (u = r.split(/[^a-zA-Z0-9_\/\-]+/)), u;
|
|
313
|
-
}, t.prototype._get_boolean = function(e,
|
|
314
|
-
var r = this.raw_options[e], u = r === void 0 ? !!
|
|
354
|
+
}, t.prototype._get_boolean = function(e, n) {
|
|
355
|
+
var r = this.raw_options[e], u = r === void 0 ? !!n : !!r;
|
|
315
356
|
return u;
|
|
316
|
-
}, t.prototype._get_characters = function(e,
|
|
317
|
-
var r = this.raw_options[e], u =
|
|
357
|
+
}, t.prototype._get_characters = function(e, n) {
|
|
358
|
+
var r = this.raw_options[e], u = n || "";
|
|
318
359
|
return typeof r == "string" && (u = r.replace(/\\r/, "\r").replace(/\\n/, `
|
|
319
360
|
`).replace(/\\t/, " ")), u;
|
|
320
|
-
}, t.prototype._get_number = function(e,
|
|
361
|
+
}, t.prototype._get_number = function(e, n) {
|
|
321
362
|
var r = this.raw_options[e];
|
|
322
|
-
|
|
363
|
+
n = parseInt(n, 10), isNaN(n) && (n = 0);
|
|
323
364
|
var u = parseInt(r, 10);
|
|
324
|
-
return isNaN(u) && (u =
|
|
325
|
-
}, t.prototype._get_selection = function(e,
|
|
326
|
-
var u = this._get_selection_list(e,
|
|
365
|
+
return isNaN(u) && (u = n), u;
|
|
366
|
+
}, t.prototype._get_selection = function(e, n, r) {
|
|
367
|
+
var u = this._get_selection_list(e, n, r);
|
|
327
368
|
if (u.length !== 1)
|
|
328
369
|
throw new Error(
|
|
329
370
|
"Invalid Option Value: The option '" + e + `' can only be one of the following values:
|
|
330
|
-
` +
|
|
371
|
+
` + n + `
|
|
331
372
|
You passed in: '` + this.raw_options[e] + "'"
|
|
332
373
|
);
|
|
333
374
|
return u[0];
|
|
334
|
-
}, t.prototype._get_selection_list = function(e,
|
|
335
|
-
if (!
|
|
375
|
+
}, t.prototype._get_selection_list = function(e, n, r) {
|
|
376
|
+
if (!n || n.length === 0)
|
|
336
377
|
throw new Error("Selection list cannot be empty.");
|
|
337
|
-
if (r = r || [
|
|
378
|
+
if (r = r || [n[0]], !this._is_valid_selection(r, n))
|
|
338
379
|
throw new Error("Invalid Default Value!");
|
|
339
380
|
var u = this._get_array(e, r);
|
|
340
|
-
if (!this._is_valid_selection(u,
|
|
381
|
+
if (!this._is_valid_selection(u, n))
|
|
341
382
|
throw new Error(
|
|
342
383
|
"Invalid Option Value: The option '" + e + `' can contain only the following values:
|
|
343
|
-
` +
|
|
384
|
+
` + n + `
|
|
344
385
|
You passed in: '` + this.raw_options[e] + "'"
|
|
345
386
|
);
|
|
346
387
|
return u;
|
|
347
|
-
}, t.prototype._is_valid_selection = function(e,
|
|
348
|
-
return e.length &&
|
|
349
|
-
return
|
|
388
|
+
}, t.prototype._is_valid_selection = function(e, n) {
|
|
389
|
+
return e.length && n.length && !e.some(function(r) {
|
|
390
|
+
return n.indexOf(r) === -1;
|
|
350
391
|
});
|
|
351
392
|
};
|
|
352
|
-
function i(e,
|
|
393
|
+
function i(e, n) {
|
|
353
394
|
var r = {};
|
|
354
395
|
e = s(e);
|
|
355
396
|
var u;
|
|
356
397
|
for (u in e)
|
|
357
|
-
u !==
|
|
358
|
-
if (
|
|
359
|
-
for (u in e[
|
|
360
|
-
r[u] = e[
|
|
398
|
+
u !== n && (r[u] = e[u]);
|
|
399
|
+
if (n && e[n])
|
|
400
|
+
for (u in e[n])
|
|
401
|
+
r[u] = e[n][u];
|
|
361
402
|
return r;
|
|
362
403
|
}
|
|
363
404
|
function s(e) {
|
|
364
|
-
var
|
|
405
|
+
var n = {}, r;
|
|
365
406
|
for (r in e) {
|
|
366
407
|
var u = r.replace(/-/g, "_");
|
|
367
|
-
|
|
408
|
+
n[u] = e[r];
|
|
368
409
|
}
|
|
369
|
-
return
|
|
410
|
+
return n;
|
|
370
411
|
}
|
|
371
412
|
return tt.Options = t, tt.normalizeOpts = s, tt.mergeOpts = i, tt;
|
|
372
413
|
}
|
|
373
414
|
var ie;
|
|
374
|
-
function
|
|
415
|
+
function De() {
|
|
375
416
|
if (ie)
|
|
376
417
|
return kt;
|
|
377
418
|
ie = 1;
|
|
378
419
|
var t = zt().Options, i = ["before-newline", "after-newline", "preserve-newline"];
|
|
379
420
|
function s(e) {
|
|
380
421
|
t.call(this, e, "js");
|
|
381
|
-
var
|
|
382
|
-
|
|
422
|
+
var n = this.raw_options.brace_style || null;
|
|
423
|
+
n === "expand-strict" ? this.raw_options.brace_style = "expand" : n === "collapse-preserve-inline" ? this.raw_options.brace_style = "collapse,preserve-inline" : this.raw_options.braces_on_own_line !== void 0 && (this.raw_options.brace_style = this.raw_options.braces_on_own_line ? "expand" : "collapse");
|
|
383
424
|
var r = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
|
|
384
425
|
this.brace_preserve_inline = !1, this.brace_style = "collapse";
|
|
385
426
|
for (var u = 0; u < r.length; u++)
|
|
@@ -411,41 +452,41 @@ function qt() {
|
|
|
411
452
|
return s = s || 0, s += this.__position, s >= 0 && s < this.__input_length && (e = this.__input.charAt(s)), e;
|
|
412
453
|
}, i.prototype.__match = function(s, e) {
|
|
413
454
|
s.lastIndex = e;
|
|
414
|
-
var
|
|
415
|
-
return
|
|
455
|
+
var n = s.exec(this.__input);
|
|
456
|
+
return n && !(t && s.sticky) && n.index !== e && (n = null), n;
|
|
416
457
|
}, i.prototype.test = function(s, e) {
|
|
417
458
|
return e = e || 0, e += this.__position, e >= 0 && e < this.__input_length ? !!this.__match(s, e) : !1;
|
|
418
459
|
}, i.prototype.testChar = function(s, e) {
|
|
419
|
-
var
|
|
420
|
-
return s.lastIndex = 0,
|
|
460
|
+
var n = this.peek(e);
|
|
461
|
+
return s.lastIndex = 0, n !== null && s.test(n);
|
|
421
462
|
}, i.prototype.match = function(s) {
|
|
422
463
|
var e = this.__match(s, this.__position);
|
|
423
464
|
return e ? this.__position += e[0].length : e = null, e;
|
|
424
|
-
}, i.prototype.read = function(s, e,
|
|
465
|
+
}, i.prototype.read = function(s, e, n) {
|
|
425
466
|
var r = "", u;
|
|
426
|
-
return s && (u = this.match(s), u && (r += u[0])), e && (u || !s) && (r += this.readUntil(e,
|
|
467
|
+
return s && (u = this.match(s), u && (r += u[0])), e && (u || !s) && (r += this.readUntil(e, n)), r;
|
|
427
468
|
}, i.prototype.readUntil = function(s, e) {
|
|
428
|
-
var
|
|
469
|
+
var n = "", r = this.__position;
|
|
429
470
|
s.lastIndex = this.__position;
|
|
430
471
|
var u = s.exec(this.__input);
|
|
431
|
-
return u ? (r = u.index, e && (r += u[0].length)) : r = this.__input_length,
|
|
472
|
+
return u ? (r = u.index, e && (r += u[0].length)) : r = this.__input_length, n = this.__input.substring(this.__position, r), this.__position = r, n;
|
|
432
473
|
}, i.prototype.readUntilAfter = function(s) {
|
|
433
474
|
return this.readUntil(s, !0);
|
|
434
475
|
}, i.prototype.get_regexp = function(s, e) {
|
|
435
|
-
var
|
|
436
|
-
return e && t && (r = "y"), typeof s == "string" && s !== "" ?
|
|
476
|
+
var n = null, r = "g";
|
|
477
|
+
return e && t && (r = "y"), typeof s == "string" && s !== "" ? n = new RegExp(s, r) : s && (n = new RegExp(s.source, r)), n;
|
|
437
478
|
}, i.prototype.get_literal_regexp = function(s) {
|
|
438
479
|
return RegExp(s.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"));
|
|
439
480
|
}, i.prototype.peekUntilAfter = function(s) {
|
|
440
|
-
var e = this.__position,
|
|
441
|
-
return this.__position = e,
|
|
481
|
+
var e = this.__position, n = this.readUntilAfter(s);
|
|
482
|
+
return this.__position = e, n;
|
|
442
483
|
}, i.prototype.lookBack = function(s) {
|
|
443
484
|
var e = this.__position - 1;
|
|
444
485
|
return e >= s.length && this.__input.substring(e - s.length, e).toLowerCase() === s;
|
|
445
486
|
}, Rt.InputScanner = i, Rt;
|
|
446
487
|
}
|
|
447
488
|
var ut = {}, At = {}, ne;
|
|
448
|
-
function
|
|
489
|
+
function oi() {
|
|
449
490
|
if (ne)
|
|
450
491
|
return At;
|
|
451
492
|
ne = 1;
|
|
@@ -499,7 +540,7 @@ function gt() {
|
|
|
499
540
|
}, Ct.Pattern = t, Ct;
|
|
500
541
|
}
|
|
501
542
|
var _e;
|
|
502
|
-
function
|
|
543
|
+
function li() {
|
|
503
544
|
if (_e)
|
|
504
545
|
return St;
|
|
505
546
|
_e = 1;
|
|
@@ -525,15 +566,15 @@ function _i() {
|
|
|
525
566
|
}
|
|
526
567
|
return s;
|
|
527
568
|
}, i.prototype.matching = function(s, e) {
|
|
528
|
-
var
|
|
529
|
-
return
|
|
569
|
+
var n = this._create();
|
|
570
|
+
return n.__set_whitespace_patterns(s, e), n._update(), n;
|
|
530
571
|
}, i.prototype._create = function() {
|
|
531
572
|
return new i(this._input, this);
|
|
532
573
|
}, i.prototype.__split = function(s, e) {
|
|
533
574
|
s.lastIndex = 0;
|
|
534
|
-
for (var
|
|
535
|
-
r.push(e.substring(
|
|
536
|
-
return
|
|
575
|
+
for (var n = 0, r = [], u = s.exec(e); u; )
|
|
576
|
+
r.push(e.substring(n, u.index)), n = u.index + u[0].length, u = s.exec(e);
|
|
577
|
+
return n < e.length ? r.push(e.substring(n, e.length)) : r.push(""), r;
|
|
537
578
|
}, St.WhitespacePattern = i, St;
|
|
538
579
|
}
|
|
539
580
|
var re;
|
|
@@ -541,7 +582,7 @@ function dt() {
|
|
|
541
582
|
if (re)
|
|
542
583
|
return ut;
|
|
543
584
|
re = 1;
|
|
544
|
-
var t = qt().InputScanner, i =
|
|
585
|
+
var t = qt().InputScanner, i = Le().Token, s = oi().TokenStream, e = li().WhitespacePattern, n = {
|
|
545
586
|
START: "TK_START",
|
|
546
587
|
RAW: "TK_RAW",
|
|
547
588
|
EOF: "TK_EOF"
|
|
@@ -550,10 +591,10 @@ function dt() {
|
|
|
550
591
|
};
|
|
551
592
|
return r.prototype.tokenize = function() {
|
|
552
593
|
this._input.restart(), this.__tokens = new s(), this._reset();
|
|
553
|
-
for (var u, o = new i(
|
|
594
|
+
for (var u, o = new i(n.START, ""), l = null, y = [], x = new s(); o.type !== n.EOF; ) {
|
|
554
595
|
for (u = this._get_next_token(o, l); this._is_comment(u); )
|
|
555
596
|
x.add(u), u = this._get_next_token(o, l);
|
|
556
|
-
x.isEmpty() || (u.comments_before = x, x = new s()), u.parent = l, this._is_opening(u) ? (
|
|
597
|
+
x.isEmpty() || (u.comments_before = x, x = new s()), u.parent = l, this._is_opening(u) ? (y.push(l), l = u) : l && this._is_closing(u, l) && (u.opened = l, l.closed = u, l = y.pop(), u.parent = l), u.previous = o, o.next = u, this.__tokens.add(u), o = u;
|
|
557
598
|
}
|
|
558
599
|
return this.__tokens;
|
|
559
600
|
}, r.prototype._is_first_token = function() {
|
|
@@ -562,7 +603,7 @@ function dt() {
|
|
|
562
603
|
}, r.prototype._get_next_token = function(u, o) {
|
|
563
604
|
this._readWhitespace();
|
|
564
605
|
var l = this._input.read(/.+/g);
|
|
565
|
-
return l ? this._create_token(
|
|
606
|
+
return l ? this._create_token(n.RAW, l) : this._create_token(n.EOF, "");
|
|
566
607
|
}, r.prototype._is_comment = function(u) {
|
|
567
608
|
return !1;
|
|
568
609
|
}, r.prototype._is_opening = function(u) {
|
|
@@ -579,12 +620,12 @@ function dt() {
|
|
|
579
620
|
return l;
|
|
580
621
|
}, r.prototype._readWhitespace = function() {
|
|
581
622
|
return this._patterns.whitespace.read();
|
|
582
|
-
}, ut.Tokenizer = r, ut.TOKEN =
|
|
623
|
+
}, ut.Tokenizer = r, ut.TOKEN = n, ut;
|
|
583
624
|
}
|
|
584
|
-
var
|
|
625
|
+
var $t = {}, oe;
|
|
585
626
|
function Vt() {
|
|
586
627
|
if (oe)
|
|
587
|
-
return
|
|
628
|
+
return $t;
|
|
588
629
|
oe = 1;
|
|
589
630
|
function t(i, s) {
|
|
590
631
|
i = typeof i == "string" ? i : i.source, s = typeof s == "string" ? s : s.source, this.__directives_block_pattern = new RegExp(i + / beautify( \w+[:]\w+)+ /.source + s, "g"), this.__directive_pattern = / (\w+)[:](\w+)/g, this.__directives_end_ignore_pattern = new RegExp(i + /\sbeautify\signore:end\s/.source + s, "g");
|
|
@@ -599,12 +640,12 @@ function Vt() {
|
|
|
599
640
|
return s;
|
|
600
641
|
}, t.prototype.readIgnored = function(i) {
|
|
601
642
|
return i.readUntilAfter(this.__directives_end_ignore_pattern);
|
|
602
|
-
},
|
|
643
|
+
}, $t.Directives = t, $t;
|
|
603
644
|
}
|
|
604
|
-
var
|
|
605
|
-
function
|
|
645
|
+
var Nt = {}, le;
|
|
646
|
+
function Ie() {
|
|
606
647
|
if (le)
|
|
607
|
-
return
|
|
648
|
+
return Nt;
|
|
608
649
|
le = 1;
|
|
609
650
|
var t = gt().Pattern, i = {
|
|
610
651
|
django: !1,
|
|
@@ -613,8 +654,8 @@ function je() {
|
|
|
613
654
|
php: !1,
|
|
614
655
|
smarty: !1
|
|
615
656
|
};
|
|
616
|
-
function s(e,
|
|
617
|
-
t.call(this, e,
|
|
657
|
+
function s(e, n) {
|
|
658
|
+
t.call(this, e, n), this.__template_pattern = null, this._disabled = Object.assign({}, i), this._excluded = Object.assign({}, i), n && (this.__template_pattern = this._input.get_regexp(n.__template_pattern), this._excluded = Object.assign(this._excluded, n._excluded), this._disabled = Object.assign(this._disabled, n._disabled));
|
|
618
659
|
var r = new t(e);
|
|
619
660
|
this.__patterns = {
|
|
620
661
|
handlebars_comment: r.starting_with(/{{!--/).until_after(/--}}/),
|
|
@@ -636,41 +677,41 @@ function je() {
|
|
|
636
677
|
}, s.prototype._update = function() {
|
|
637
678
|
this.__set_templated_pattern();
|
|
638
679
|
}, s.prototype.disable = function(e) {
|
|
639
|
-
var
|
|
640
|
-
return
|
|
680
|
+
var n = this._create();
|
|
681
|
+
return n._disabled[e] = !0, n._update(), n;
|
|
641
682
|
}, s.prototype.read_options = function(e) {
|
|
642
|
-
var
|
|
683
|
+
var n = this._create();
|
|
643
684
|
for (var r in i)
|
|
644
|
-
|
|
645
|
-
return
|
|
685
|
+
n._disabled[r] = e.templating.indexOf(r) === -1;
|
|
686
|
+
return n._update(), n;
|
|
646
687
|
}, s.prototype.exclude = function(e) {
|
|
647
|
-
var
|
|
648
|
-
return
|
|
688
|
+
var n = this._create();
|
|
689
|
+
return n._excluded[e] = !0, n._update(), n;
|
|
649
690
|
}, s.prototype.read = function() {
|
|
650
691
|
var e = "";
|
|
651
692
|
this._match_pattern ? e = this._input.read(this._starting_pattern) : e = this._input.read(this._starting_pattern, this.__template_pattern);
|
|
652
|
-
for (var
|
|
653
|
-
this._match_pattern ?
|
|
693
|
+
for (var n = this._read_template(); n; )
|
|
694
|
+
this._match_pattern ? n += this._input.read(this._match_pattern) : n += this._input.readUntil(this.__template_pattern), e += n, n = this._read_template();
|
|
654
695
|
return this._until_after && (e += this._input.readUntilAfter(this._until_pattern)), e;
|
|
655
696
|
}, s.prototype.__set_templated_pattern = function() {
|
|
656
697
|
var e = [];
|
|
657
698
|
this._disabled.php || e.push(this.__patterns.php._starting_pattern.source), this._disabled.handlebars || e.push(this.__patterns.handlebars._starting_pattern.source), this._disabled.erb || e.push(this.__patterns.erb._starting_pattern.source), this._disabled.django || (e.push(this.__patterns.django._starting_pattern.source), e.push(this.__patterns.django_value._starting_pattern.source), e.push(this.__patterns.django_comment._starting_pattern.source)), this._disabled.smarty || e.push(this.__patterns.smarty._starting_pattern.source), this._until_pattern && e.push(this._until_pattern.source), this.__template_pattern = this._input.get_regexp("(?:" + e.join("|") + ")");
|
|
658
699
|
}, s.prototype._read_template = function() {
|
|
659
|
-
var e = "",
|
|
660
|
-
if (
|
|
700
|
+
var e = "", n = this._input.peek();
|
|
701
|
+
if (n === "<") {
|
|
661
702
|
var r = this._input.peek(1);
|
|
662
703
|
!this._disabled.php && !this._excluded.php && r === "?" && (e = e || this.__patterns.php.read()), !this._disabled.erb && !this._excluded.erb && r === "%" && (e = e || this.__patterns.erb.read());
|
|
663
704
|
} else
|
|
664
|
-
|
|
705
|
+
n === "{" && (!this._disabled.handlebars && !this._excluded.handlebars && (e = e || this.__patterns.handlebars_comment.read(), e = e || this.__patterns.handlebars_unescaped.read(), e = e || this.__patterns.handlebars.read()), this._disabled.django || (!this._excluded.django && !this._excluded.handlebars && (e = e || this.__patterns.django_value.read()), this._excluded.django || (e = e || this.__patterns.django_comment.read(), e = e || this.__patterns.django.read())), this._disabled.smarty || this._disabled.django && this._disabled.handlebars && (e = e || this.__patterns.smarty_comment.read(), e = e || this.__patterns.smarty_literal.read(), e = e || this.__patterns.smarty.read()));
|
|
665
706
|
return e;
|
|
666
|
-
},
|
|
707
|
+
}, Nt.TemplatablePattern = s, Nt;
|
|
667
708
|
}
|
|
668
709
|
var ue;
|
|
669
710
|
function pt() {
|
|
670
711
|
if (ue)
|
|
671
712
|
return Q;
|
|
672
713
|
ue = 1;
|
|
673
|
-
var t = qt().InputScanner, i = dt().Tokenizer, s = dt().TOKEN, e = Vt().Directives,
|
|
714
|
+
var t = qt().InputScanner, i = dt().Tokenizer, s = dt().TOKEN, e = Vt().Directives, n = je(), r = gt().Pattern, u = Ie().TemplatablePattern;
|
|
674
715
|
function o(c, g) {
|
|
675
716
|
return g.indexOf(c) !== -1;
|
|
676
717
|
}
|
|
@@ -693,9 +734,9 @@ function pt() {
|
|
|
693
734
|
START: s.START,
|
|
694
735
|
RAW: s.RAW,
|
|
695
736
|
EOF: s.EOF
|
|
696
|
-
},
|
|
697
|
-
|
|
698
|
-
var
|
|
737
|
+
}, y = new e(/\/\*/, /\*\//), x = /0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/, b = /[0-9]/, v = /[^\d\.]/, A = ">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "), $ = ">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";
|
|
738
|
+
$ = $.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&"), $ = "\\?\\.(?!\\d) " + $, $ = $.replace(/ /g, "|");
|
|
739
|
+
var N = new RegExp($), p = "continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","), _ = p.concat(["do", "in", "of", "else", "get", "set", "new", "catch", "finally", "typeof", "yield", "async", "await", "from", "as", "class", "extends"]), h = new RegExp("^(?:" + _.join("|") + ")$"), k, O = function(c, g) {
|
|
699
740
|
i.call(this, c, g), this._patterns.whitespace = this._patterns.whitespace.matching(
|
|
700
741
|
/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,
|
|
701
742
|
/\u2028\u2029/.source
|
|
@@ -703,17 +744,17 @@ function pt() {
|
|
|
703
744
|
var f = new r(this._input), T = new u(this._input).read_options(this._options);
|
|
704
745
|
this.__patterns = {
|
|
705
746
|
template: T,
|
|
706
|
-
identifier: T.starting_with(
|
|
747
|
+
identifier: T.starting_with(n.identifier).matching(n.identifierMatch),
|
|
707
748
|
number: f.matching(x),
|
|
708
|
-
punct: f.matching(
|
|
749
|
+
punct: f.matching(N),
|
|
709
750
|
// comment ends just before nearest linefeed or end of file
|
|
710
751
|
comment: f.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),
|
|
711
752
|
// /* ... */ comment ends with nearest */ or end of file
|
|
712
753
|
block_comment: f.starting_with(/\/\*/).until_after(/\*\//),
|
|
713
754
|
html_comment_start: f.matching(/<!--/),
|
|
714
755
|
html_comment_end: f.matching(/-->/),
|
|
715
|
-
include: f.starting_with(/#include/).until_after(
|
|
716
|
-
shebang: f.starting_with(/#!/).until_after(
|
|
756
|
+
include: f.starting_with(/#include/).until_after(n.lineBreak),
|
|
757
|
+
shebang: f.starting_with(/#!/).until_after(n.lineBreak),
|
|
717
758
|
xml: f.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),
|
|
718
759
|
single_quote: T.until(/['\\\n\r\u2028\u2029]/),
|
|
719
760
|
double_quote: T.until(/["\\\n\r\u2028\u2029]/),
|
|
@@ -737,13 +778,13 @@ function pt() {
|
|
|
737
778
|
}, O.prototype._read_word = function(c) {
|
|
738
779
|
var g;
|
|
739
780
|
if (g = this.__patterns.identifier.read(), g !== "")
|
|
740
|
-
return g = g.replace(
|
|
781
|
+
return g = g.replace(n.allLineBreaks, `
|
|
741
782
|
`), !(c.type === l.DOT || c.type === l.RESERVED && (c.text === "set" || c.text === "get")) && h.test(g) ? (g === "in" || g === "of") && (c.type === l.WORD || c.type === l.STRING) ? this._create_token(l.OPERATOR, g) : this._create_token(l.RESERVED, g) : this._create_token(l.WORD, g);
|
|
742
783
|
if (g = this.__patterns.number.read(), g !== "")
|
|
743
784
|
return this._create_token(l.WORD, g);
|
|
744
785
|
}, O.prototype._read_singles = function(c) {
|
|
745
786
|
var g = null;
|
|
746
|
-
return c === "(" || c === "[" ? g = this._create_token(l.START_EXPR, c) : c === ")" || c === "]" ? g = this._create_token(l.END_EXPR, c) : c === "{" ? g = this._create_token(l.START_BLOCK, c) : c === "}" ? g = this._create_token(l.END_BLOCK, c) : c === ";" ? g = this._create_token(l.SEMICOLON, c) : c === "." &&
|
|
787
|
+
return c === "(" || c === "[" ? g = this._create_token(l.START_EXPR, c) : c === ")" || c === "]" ? g = this._create_token(l.END_EXPR, c) : c === "{" ? g = this._create_token(l.START_BLOCK, c) : c === "}" ? g = this._create_token(l.END_BLOCK, c) : c === ";" ? g = this._create_token(l.SEMICOLON, c) : c === "." && v.test(this._input.peek(1)) ? g = this._create_token(l.DOT, c) : c === "," && (g = this._create_token(l.COMMA, c)), g && this._input.next(), g;
|
|
747
788
|
}, O.prototype._read_pair = function(c, g) {
|
|
748
789
|
var f = null;
|
|
749
790
|
return c === "#" && g === "{" && (f = this._create_token(l.START_BLOCK, c + g)), f && (this._input.next(), this._input.next()), f;
|
|
@@ -771,7 +812,7 @@ function pt() {
|
|
|
771
812
|
this._input.back();
|
|
772
813
|
} else if (c === "<" && this._is_first_token()) {
|
|
773
814
|
if (g = this.__patterns.html_comment_start.read(), g) {
|
|
774
|
-
for (; this._input.hasNext() && !this._input.testChar(
|
|
815
|
+
for (; this._input.hasNext() && !this._input.testChar(n.newline); )
|
|
775
816
|
g += this._input.next();
|
|
776
817
|
return k = !0, this._create_token(l.COMMENT, g);
|
|
777
818
|
}
|
|
@@ -784,8 +825,8 @@ function pt() {
|
|
|
784
825
|
var f = "";
|
|
785
826
|
if (this._input.peek(1) === "*") {
|
|
786
827
|
f = this.__patterns.block_comment.read();
|
|
787
|
-
var T =
|
|
788
|
-
T && T.ignore === "start" && (f +=
|
|
828
|
+
var T = y.get_directives(f);
|
|
829
|
+
T && T.ignore === "start" && (f += y.readIgnored(this._input)), f = f.replace(n.allLineBreaks, `
|
|
789
830
|
`), g = this._create_token(l.BLOCK_COMMENT, f), g.directives = T;
|
|
790
831
|
} else
|
|
791
832
|
this._input.peek(1) === "/" && (f = this.__patterns.comment.read(), g = this._create_token(l.COMMENT, f));
|
|
@@ -794,7 +835,7 @@ function pt() {
|
|
|
794
835
|
}, O.prototype._read_string = function(c) {
|
|
795
836
|
if (c === "`" || c === "'" || c === '"') {
|
|
796
837
|
var g = this._input.next();
|
|
797
|
-
return this.has_char_escapes = !1, c === "`" ? g += this._read_string_recursive("`", !0, "${") : g += this._read_string_recursive(c), this.has_char_escapes && this._options.unescape_strings && (g =
|
|
838
|
+
return this.has_char_escapes = !1, c === "`" ? g += this._read_string_recursive("`", !0, "${") : g += this._read_string_recursive(c), this.has_char_escapes && this._options.unescape_strings && (g = S(g)), this._input.peek() === c && (g += this._input.next()), g = g.replace(n.allLineBreaks, `
|
|
798
839
|
`), this._create_token(l.STRING, g);
|
|
799
840
|
}
|
|
800
841
|
return null;
|
|
@@ -813,42 +854,42 @@ function pt() {
|
|
|
813
854
|
]);
|
|
814
855
|
}, O.prototype._read_regexp = function(c, g) {
|
|
815
856
|
if (c === "/" && this._allow_regexp_or_xml(g)) {
|
|
816
|
-
for (var f = this._input.next(), T = !1,
|
|
817
|
-
f += this._input.peek(), T ? T = !1 : (T = this._input.peek() === "\\", this._input.peek() === "[" ?
|
|
818
|
-
return this._input.peek() === c && (f += this._input.next(), f += this._input.read(
|
|
857
|
+
for (var f = this._input.next(), T = !1, a = !1; this._input.hasNext() && (T || a || this._input.peek() !== c) && !this._input.testChar(n.newline); )
|
|
858
|
+
f += this._input.peek(), T ? T = !1 : (T = this._input.peek() === "\\", this._input.peek() === "[" ? a = !0 : this._input.peek() === "]" && (a = !1)), this._input.next();
|
|
859
|
+
return this._input.peek() === c && (f += this._input.next(), f += this._input.read(n.identifier)), this._create_token(l.STRING, f);
|
|
819
860
|
}
|
|
820
861
|
return null;
|
|
821
862
|
}, O.prototype._read_xml = function(c, g) {
|
|
822
863
|
if (this._options.e4x && c === "<" && this._allow_regexp_or_xml(g)) {
|
|
823
864
|
var f = "", T = this.__patterns.xml.read_match();
|
|
824
865
|
if (T) {
|
|
825
|
-
for (var
|
|
866
|
+
for (var a = T[2].replace(/^{\s+/, "{").replace(/\s+}$/, "}"), d = a.indexOf("{") === 0, m = 0; T; ) {
|
|
826
867
|
var R = !!T[1], C = T[2], P = !!T[T.length - 1] || C.slice(0, 8) === "![CDATA[";
|
|
827
|
-
if (!P && (C ===
|
|
868
|
+
if (!P && (C === a || d && C.replace(/^{\s+/, "{").replace(/\s+}$/, "}")) && (R ? --m : ++m), f += T[0], m <= 0)
|
|
828
869
|
break;
|
|
829
870
|
T = this.__patterns.xml.read_match();
|
|
830
871
|
}
|
|
831
|
-
return T || (f += this._input.match(/[\s\S]*/g)[0]), f = f.replace(
|
|
872
|
+
return T || (f += this._input.match(/[\s\S]*/g)[0]), f = f.replace(n.allLineBreaks, `
|
|
832
873
|
`), this._create_token(l.STRING, f);
|
|
833
874
|
}
|
|
834
875
|
}
|
|
835
876
|
return null;
|
|
836
877
|
};
|
|
837
|
-
function
|
|
838
|
-
for (var g = "", f = 0, T = new t(c),
|
|
839
|
-
if (
|
|
878
|
+
function S(c) {
|
|
879
|
+
for (var g = "", f = 0, T = new t(c), a = null; T.hasNext(); )
|
|
880
|
+
if (a = T.match(/([\s]|[^\\]|\\\\)+/g), a && (g += a[0]), T.peek() === "\\") {
|
|
840
881
|
if (T.next(), T.peek() === "x")
|
|
841
|
-
|
|
882
|
+
a = T.match(/x([0-9A-Fa-f]{2})/g);
|
|
842
883
|
else if (T.peek() === "u")
|
|
843
|
-
|
|
884
|
+
a = T.match(/u([0-9A-Fa-f]{4})/g);
|
|
844
885
|
else {
|
|
845
886
|
g += "\\", T.hasNext() && (g += T.next());
|
|
846
887
|
continue;
|
|
847
888
|
}
|
|
848
|
-
if (!
|
|
889
|
+
if (!a || (f = parseInt(a[1], 16), f > 126 && f <= 255 && a[0].indexOf("x") === 0))
|
|
849
890
|
return c;
|
|
850
891
|
if (f >= 0 && f < 32) {
|
|
851
|
-
g += "\\" +
|
|
892
|
+
g += "\\" + a[0];
|
|
852
893
|
continue;
|
|
853
894
|
} else
|
|
854
895
|
f === 34 || f === 39 || f === 92 ? g += "\\" + String.fromCharCode(f) : g += String.fromCharCode(f);
|
|
@@ -856,44 +897,44 @@ function pt() {
|
|
|
856
897
|
return g;
|
|
857
898
|
}
|
|
858
899
|
return O.prototype._read_string_recursive = function(c, g, f) {
|
|
859
|
-
var T,
|
|
860
|
-
c === "'" ?
|
|
861
|
-
for (var d =
|
|
862
|
-
if (m = this._input.next(), m === c || !g &&
|
|
900
|
+
var T, a;
|
|
901
|
+
c === "'" ? a = this.__patterns.single_quote : c === '"' ? a = this.__patterns.double_quote : c === "`" ? a = this.__patterns.template_text : c === "}" && (a = this.__patterns.template_expression);
|
|
902
|
+
for (var d = a.read(), m = ""; this._input.hasNext(); ) {
|
|
903
|
+
if (m = this._input.next(), m === c || !g && n.newline.test(m)) {
|
|
863
904
|
this._input.back();
|
|
864
905
|
break;
|
|
865
906
|
} else
|
|
866
907
|
m === "\\" && this._input.hasNext() ? (T = this._input.peek(), T === "x" || T === "u" ? this.has_char_escapes = !0 : T === "\r" && this._input.peek(1) === `
|
|
867
908
|
` && this._input.next(), m += this._input.next()) : f && (f === "${" && m === "$" && this._input.peek() === "{" && (m += this._input.next()), f === m && (c === "`" ? m += this._read_string_recursive("}", g, "`") : m += this._read_string_recursive("`", g, "${"), this._input.hasNext() && (m += this._input.next())));
|
|
868
|
-
m +=
|
|
909
|
+
m += a.read(), d += m;
|
|
869
910
|
}
|
|
870
911
|
return d;
|
|
871
|
-
}, Q.Tokenizer = O, Q.TOKEN = l, Q.positionable_operators =
|
|
912
|
+
}, Q.Tokenizer = O, Q.TOKEN = l, Q.positionable_operators = A.slice(), Q.line_starters = p.slice(), Q;
|
|
872
913
|
}
|
|
873
914
|
var pe;
|
|
874
|
-
function
|
|
915
|
+
function ui() {
|
|
875
916
|
if (pe)
|
|
876
917
|
return wt;
|
|
877
918
|
pe = 1;
|
|
878
|
-
var t = Ut().Output, i =
|
|
879
|
-
function l(
|
|
880
|
-
return d.indexOf(
|
|
919
|
+
var t = Ut().Output, i = Le().Token, s = je(), e = De().Options, n = pt().Tokenizer, r = pt().line_starters, u = pt().positionable_operators, o = pt().TOKEN;
|
|
920
|
+
function l(a, d) {
|
|
921
|
+
return d.indexOf(a) !== -1;
|
|
881
922
|
}
|
|
882
|
-
function
|
|
883
|
-
return
|
|
923
|
+
function y(a) {
|
|
924
|
+
return a.replace(/^\s+/g, "");
|
|
884
925
|
}
|
|
885
|
-
function x(
|
|
886
|
-
for (var d = {}, m = 0; m <
|
|
887
|
-
d[
|
|
926
|
+
function x(a) {
|
|
927
|
+
for (var d = {}, m = 0; m < a.length; m++)
|
|
928
|
+
d[a[m].replace(/-/g, "_")] = a[m];
|
|
888
929
|
return d;
|
|
889
930
|
}
|
|
890
|
-
function b(
|
|
891
|
-
return
|
|
931
|
+
function b(a, d) {
|
|
932
|
+
return a && a.type === o.RESERVED && a.text === d;
|
|
892
933
|
}
|
|
893
|
-
function
|
|
894
|
-
return
|
|
934
|
+
function v(a, d) {
|
|
935
|
+
return a && a.type === o.RESERVED && l(a.text, d);
|
|
895
936
|
}
|
|
896
|
-
var
|
|
937
|
+
var A = ["case", "return", "do", "if", "throw", "else", "await", "break", "continue", "async"], $ = ["before-newline", "after-newline", "preserve-newline"], N = x($), p = [N.before_newline, N.preserve_newline], _ = {
|
|
897
938
|
BlockStatement: "BlockStatement",
|
|
898
939
|
// 'BLOCK'
|
|
899
940
|
Statement: "Statement",
|
|
@@ -909,50 +950,50 @@ function ri() {
|
|
|
909
950
|
Expression: "Expression"
|
|
910
951
|
//'(EXPRESSION)'
|
|
911
952
|
};
|
|
912
|
-
function h(
|
|
913
|
-
d.multiline_frame || d.mode === _.ForInitializer || d.mode === _.Conditional ||
|
|
953
|
+
function h(a, d) {
|
|
954
|
+
d.multiline_frame || d.mode === _.ForInitializer || d.mode === _.Conditional || a.remove_indent(d.start_line_index);
|
|
914
955
|
}
|
|
915
|
-
function k(
|
|
916
|
-
|
|
956
|
+
function k(a) {
|
|
957
|
+
a = a.replace(s.allLineBreaks, `
|
|
917
958
|
`);
|
|
918
|
-
for (var d = [], m =
|
|
959
|
+
for (var d = [], m = a.indexOf(`
|
|
919
960
|
`); m !== -1; )
|
|
920
|
-
d.push(
|
|
961
|
+
d.push(a.substring(0, m)), a = a.substring(m + 1), m = a.indexOf(`
|
|
921
962
|
`);
|
|
922
|
-
return
|
|
963
|
+
return a.length && d.push(a), d;
|
|
923
964
|
}
|
|
924
|
-
function O(
|
|
925
|
-
return
|
|
965
|
+
function O(a) {
|
|
966
|
+
return a === _.ArrayLiteral;
|
|
926
967
|
}
|
|
927
|
-
function
|
|
928
|
-
return l(
|
|
968
|
+
function S(a) {
|
|
969
|
+
return l(a, [_.Expression, _.ForInitializer, _.Conditional]);
|
|
929
970
|
}
|
|
930
|
-
function c(
|
|
931
|
-
for (var m = 0; m <
|
|
932
|
-
var R =
|
|
971
|
+
function c(a, d) {
|
|
972
|
+
for (var m = 0; m < a.length; m++) {
|
|
973
|
+
var R = a[m].trim();
|
|
933
974
|
if (R.charAt(0) !== d)
|
|
934
975
|
return !1;
|
|
935
976
|
}
|
|
936
977
|
return !0;
|
|
937
978
|
}
|
|
938
|
-
function g(
|
|
939
|
-
for (var m = 0, R =
|
|
940
|
-
if (C =
|
|
979
|
+
function g(a, d) {
|
|
980
|
+
for (var m = 0, R = a.length, C; m < R; m++)
|
|
981
|
+
if (C = a[m], C && C.indexOf(d) !== 0)
|
|
941
982
|
return !1;
|
|
942
983
|
return !0;
|
|
943
984
|
}
|
|
944
|
-
function f(
|
|
945
|
-
d = d || {}, this._source_text =
|
|
985
|
+
function f(a, d) {
|
|
986
|
+
d = d || {}, this._source_text = a || "", this._output = null, this._tokens = null, this._last_last_text = null, this._flags = null, this._previous_flags = null, this._flag_store = null, this._options = new e(d);
|
|
946
987
|
}
|
|
947
|
-
f.prototype.create_flags = function(
|
|
988
|
+
f.prototype.create_flags = function(a, d) {
|
|
948
989
|
var m = 0;
|
|
949
|
-
|
|
990
|
+
a && (m = a.indentation_level, !this._output.just_added_newline() && a.line_indent_level > m && (m = a.line_indent_level));
|
|
950
991
|
var R = {
|
|
951
992
|
mode: d,
|
|
952
|
-
parent:
|
|
953
|
-
last_token:
|
|
993
|
+
parent: a,
|
|
994
|
+
last_token: a ? a.last_token : new i(o.START_BLOCK, ""),
|
|
954
995
|
// last token text
|
|
955
|
-
last_word:
|
|
996
|
+
last_word: a ? a.last_word : "",
|
|
956
997
|
// last TOKEN.WORD passed
|
|
957
998
|
declaration_statement: !1,
|
|
958
999
|
declaration_assignment: !1,
|
|
@@ -975,182 +1016,182 @@ function ri() {
|
|
|
975
1016
|
// the indented case-action block is wrapped with {}
|
|
976
1017
|
indentation_level: m,
|
|
977
1018
|
alignment: 0,
|
|
978
|
-
line_indent_level:
|
|
1019
|
+
line_indent_level: a ? a.line_indent_level : m,
|
|
979
1020
|
start_line_index: this._output.get_line_number(),
|
|
980
1021
|
ternary_depth: 0
|
|
981
1022
|
};
|
|
982
1023
|
return R;
|
|
983
|
-
}, f.prototype._reset = function(
|
|
984
|
-
var d =
|
|
1024
|
+
}, f.prototype._reset = function(a) {
|
|
1025
|
+
var d = a.match(/^[\t ]*/)[0];
|
|
985
1026
|
this._last_last_text = "", this._output = new t(this._options, d), this._output.raw = this._options.test_output_raw, this._flag_store = [], this.set_mode(_.BlockStatement);
|
|
986
|
-
var m = new a
|
|
987
|
-
return this._tokens = m.tokenize(),
|
|
1027
|
+
var m = new n(a, this._options);
|
|
1028
|
+
return this._tokens = m.tokenize(), a;
|
|
988
1029
|
}, f.prototype.beautify = function() {
|
|
989
1030
|
if (this._options.disabled)
|
|
990
1031
|
return this._source_text;
|
|
991
|
-
var
|
|
1032
|
+
var a, d = this._reset(this._source_text), m = this._options.eol;
|
|
992
1033
|
this._options.eol === "auto" && (m = `
|
|
993
1034
|
`, d && s.lineBreak.test(d || "") && (m = d.match(s.lineBreak)[0]));
|
|
994
1035
|
for (var R = this._tokens.next(); R; )
|
|
995
1036
|
this.handle_token(R), this._last_last_text = this._flags.last_token.text, this._flags.last_token = R, R = this._tokens.next();
|
|
996
|
-
return
|
|
997
|
-
}, f.prototype.handle_token = function(
|
|
998
|
-
|
|
999
|
-
}, f.prototype.handle_whitespace_and_comments = function(
|
|
1000
|
-
var m =
|
|
1001
|
-
if (
|
|
1002
|
-
for (var C =
|
|
1003
|
-
this.handle_whitespace_and_comments(C, d), this.handle_token(C, d), C =
|
|
1037
|
+
return a = this._output.get_code(m), a;
|
|
1038
|
+
}, f.prototype.handle_token = function(a, d) {
|
|
1039
|
+
a.type === o.START_EXPR ? this.handle_start_expr(a) : a.type === o.END_EXPR ? this.handle_end_expr(a) : a.type === o.START_BLOCK ? this.handle_start_block(a) : a.type === o.END_BLOCK ? this.handle_end_block(a) : a.type === o.WORD ? this.handle_word(a) : a.type === o.RESERVED ? this.handle_word(a) : a.type === o.SEMICOLON ? this.handle_semicolon(a) : a.type === o.STRING ? this.handle_string(a) : a.type === o.EQUALS ? this.handle_equals(a) : a.type === o.OPERATOR ? this.handle_operator(a) : a.type === o.COMMA ? this.handle_comma(a) : a.type === o.BLOCK_COMMENT ? this.handle_block_comment(a, d) : a.type === o.COMMENT ? this.handle_comment(a, d) : a.type === o.DOT ? this.handle_dot(a) : a.type === o.EOF ? this.handle_eof(a) : a.type === o.UNKNOWN ? this.handle_unknown(a, d) : this.handle_unknown(a, d);
|
|
1040
|
+
}, f.prototype.handle_whitespace_and_comments = function(a, d) {
|
|
1041
|
+
var m = a.newlines, R = this._options.keep_array_indentation && O(this._flags.mode);
|
|
1042
|
+
if (a.comments_before)
|
|
1043
|
+
for (var C = a.comments_before.next(); C; )
|
|
1044
|
+
this.handle_whitespace_and_comments(C, d), this.handle_token(C, d), C = a.comments_before.next();
|
|
1004
1045
|
if (R)
|
|
1005
1046
|
for (var P = 0; P < m; P += 1)
|
|
1006
1047
|
this.print_newline(P > 0, d);
|
|
1007
1048
|
else if (this._options.max_preserve_newlines && m > this._options.max_preserve_newlines && (m = this._options.max_preserve_newlines), this._options.preserve_newlines && m > 1) {
|
|
1008
1049
|
this.print_newline(!1, d);
|
|
1009
|
-
for (var
|
|
1050
|
+
for (var j = 1; j < m; j += 1)
|
|
1010
1051
|
this.print_newline(!0, d);
|
|
1011
1052
|
}
|
|
1012
1053
|
};
|
|
1013
1054
|
var T = ["async", "break", "continue", "return", "throw", "yield"];
|
|
1014
|
-
return f.prototype.allow_wrap_or_preserved_newline = function(
|
|
1055
|
+
return f.prototype.allow_wrap_or_preserved_newline = function(a, d) {
|
|
1015
1056
|
if (d = d === void 0 ? !1 : d, !this._output.just_added_newline()) {
|
|
1016
|
-
var m = this._options.preserve_newlines &&
|
|
1057
|
+
var m = this._options.preserve_newlines && a.newlines || d, R = l(this._flags.last_token.text, u) || l(a.text, u);
|
|
1017
1058
|
if (R) {
|
|
1018
|
-
var C = l(this._flags.last_token.text, u) && l(this._options.operator_position, p) || l(
|
|
1059
|
+
var C = l(this._flags.last_token.text, u) && l(this._options.operator_position, p) || l(a.text, u);
|
|
1019
1060
|
m = m && C;
|
|
1020
1061
|
}
|
|
1021
1062
|
if (m)
|
|
1022
1063
|
this.print_newline(!1, !0);
|
|
1023
1064
|
else if (this._options.wrap_line_length) {
|
|
1024
|
-
if (
|
|
1065
|
+
if (v(this._flags.last_token, T))
|
|
1025
1066
|
return;
|
|
1026
1067
|
this._output.set_wrap_point();
|
|
1027
1068
|
}
|
|
1028
1069
|
}
|
|
1029
|
-
}, f.prototype.print_newline = function(
|
|
1070
|
+
}, f.prototype.print_newline = function(a, d) {
|
|
1030
1071
|
if (!d && this._flags.last_token.text !== ";" && this._flags.last_token.text !== "," && this._flags.last_token.text !== "=" && (this._flags.last_token.type !== o.OPERATOR || this._flags.last_token.text === "--" || this._flags.last_token.text === "++"))
|
|
1031
1072
|
for (var m = this._tokens.peek(); this._flags.mode === _.Statement && !(this._flags.if_block && b(m, "else")) && !this._flags.do_block; )
|
|
1032
1073
|
this.restore_mode();
|
|
1033
|
-
this._output.add_new_line(
|
|
1034
|
-
}, f.prototype.print_token_line_indentation = function(
|
|
1035
|
-
this._output.just_added_newline() && (this._options.keep_array_indentation &&
|
|
1036
|
-
}, f.prototype.print_token = function(
|
|
1074
|
+
this._output.add_new_line(a) && (this._flags.multiline_frame = !0);
|
|
1075
|
+
}, f.prototype.print_token_line_indentation = function(a) {
|
|
1076
|
+
this._output.just_added_newline() && (this._options.keep_array_indentation && a.newlines && (a.text === "[" || O(this._flags.mode)) ? (this._output.current_line.set_indent(-1), this._output.current_line.push(a.whitespace_before), this._output.space_before_token = !1) : this._output.set_indent(this._flags.indentation_level, this._flags.alignment) && (this._flags.line_indent_level = this._flags.indentation_level));
|
|
1077
|
+
}, f.prototype.print_token = function(a) {
|
|
1037
1078
|
if (this._output.raw) {
|
|
1038
|
-
this._output.add_raw_token(
|
|
1079
|
+
this._output.add_raw_token(a);
|
|
1039
1080
|
return;
|
|
1040
1081
|
}
|
|
1041
|
-
if (this._options.comma_first &&
|
|
1082
|
+
if (this._options.comma_first && a.previous && a.previous.type === o.COMMA && this._output.just_added_newline() && this._output.previous_line.last() === ",") {
|
|
1042
1083
|
var d = this._output.previous_line.pop();
|
|
1043
|
-
this._output.previous_line.is_empty() && (this._output.previous_line.push(d), this._output.trim(!0), this._output.current_line.pop(), this._output.trim()), this.print_token_line_indentation(
|
|
1084
|
+
this._output.previous_line.is_empty() && (this._output.previous_line.push(d), this._output.trim(!0), this._output.current_line.pop(), this._output.trim()), this.print_token_line_indentation(a), this._output.add_token(","), this._output.space_before_token = !0;
|
|
1044
1085
|
}
|
|
1045
|
-
this.print_token_line_indentation(
|
|
1086
|
+
this.print_token_line_indentation(a), this._output.non_breaking_space = !0, this._output.add_token(a.text), this._output.previous_token_wrapped && (this._flags.multiline_frame = !0);
|
|
1046
1087
|
}, f.prototype.indent = function() {
|
|
1047
1088
|
this._flags.indentation_level += 1, this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
|
|
1048
1089
|
}, f.prototype.deindent = function() {
|
|
1049
1090
|
this._flags.indentation_level > 0 && (!this._flags.parent || this._flags.indentation_level > this._flags.parent.indentation_level) && (this._flags.indentation_level -= 1, this._output.set_indent(this._flags.indentation_level, this._flags.alignment));
|
|
1050
|
-
}, f.prototype.set_mode = function(
|
|
1051
|
-
this._flags ? (this._flag_store.push(this._flags), this._previous_flags = this._flags) : this._previous_flags = this.create_flags(null,
|
|
1091
|
+
}, f.prototype.set_mode = function(a) {
|
|
1092
|
+
this._flags ? (this._flag_store.push(this._flags), this._previous_flags = this._flags) : this._previous_flags = this.create_flags(null, a), this._flags = this.create_flags(this._previous_flags, a), this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
|
|
1052
1093
|
}, f.prototype.restore_mode = function() {
|
|
1053
1094
|
this._flag_store.length > 0 && (this._previous_flags = this._flags, this._flags = this._flag_store.pop(), this._previous_flags.mode === _.Statement && h(this._output, this._previous_flags), this._output.set_indent(this._flags.indentation_level, this._flags.alignment));
|
|
1054
1095
|
}, f.prototype.start_of_object_property = function() {
|
|
1055
|
-
return this._flags.parent.mode === _.ObjectLiteral && this._flags.mode === _.Statement && (this._flags.last_token.text === ":" && this._flags.ternary_depth === 0 ||
|
|
1056
|
-
}, f.prototype.start_of_statement = function(
|
|
1096
|
+
return this._flags.parent.mode === _.ObjectLiteral && this._flags.mode === _.Statement && (this._flags.last_token.text === ":" && this._flags.ternary_depth === 0 || v(this._flags.last_token, ["get", "set"]));
|
|
1097
|
+
}, f.prototype.start_of_statement = function(a) {
|
|
1057
1098
|
var d = !1;
|
|
1058
|
-
return d = d ||
|
|
1059
|
-
|
|
1060
|
-
|
|
1099
|
+
return d = d || v(this._flags.last_token, ["var", "let", "const"]) && a.type === o.WORD, d = d || b(this._flags.last_token, "do"), d = d || !(this._flags.parent.mode === _.ObjectLiteral && this._flags.mode === _.Statement) && v(this._flags.last_token, T) && !a.newlines, d = d || b(this._flags.last_token, "else") && !(b(a, "if") && !a.comments_before), d = d || this._flags.last_token.type === o.END_EXPR && (this._previous_flags.mode === _.ForInitializer || this._previous_flags.mode === _.Conditional), d = d || this._flags.last_token.type === o.WORD && this._flags.mode === _.BlockStatement && !this._flags.in_case && !(a.text === "--" || a.text === "++") && this._last_last_text !== "function" && a.type !== o.WORD && a.type !== o.RESERVED, d = d || this._flags.mode === _.ObjectLiteral && (this._flags.last_token.text === ":" && this._flags.ternary_depth === 0 || v(this._flags.last_token, ["get", "set"])), d ? (this.set_mode(_.Statement), this.indent(), this.handle_whitespace_and_comments(a, !0), this.start_of_object_property() || this.allow_wrap_or_preserved_newline(
|
|
1100
|
+
a,
|
|
1101
|
+
v(a, ["do", "for", "if", "while"])
|
|
1061
1102
|
), !0) : !1;
|
|
1062
|
-
}, f.prototype.handle_start_expr = function(
|
|
1063
|
-
this.start_of_statement(
|
|
1103
|
+
}, f.prototype.handle_start_expr = function(a) {
|
|
1104
|
+
this.start_of_statement(a) || this.handle_whitespace_and_comments(a);
|
|
1064
1105
|
var d = _.Expression;
|
|
1065
|
-
if (
|
|
1106
|
+
if (a.text === "[") {
|
|
1066
1107
|
if (this._flags.last_token.type === o.WORD || this._flags.last_token.text === ")") {
|
|
1067
|
-
|
|
1108
|
+
v(this._flags.last_token, r) && (this._output.space_before_token = !0), this.print_token(a), this.set_mode(d), this.indent(), this._options.space_in_paren && (this._output.space_before_token = !0);
|
|
1068
1109
|
return;
|
|
1069
1110
|
}
|
|
1070
1111
|
d = _.ArrayLiteral, O(this._flags.mode) && (this._flags.last_token.text === "[" || this._flags.last_token.text === "," && (this._last_last_text === "]" || this._last_last_text === "}")) && (this._options.keep_array_indentation || this.print_newline()), l(this._flags.last_token.type, [o.START_EXPR, o.END_EXPR, o.WORD, o.OPERATOR, o.DOT]) || (this._output.space_before_token = !0);
|
|
1071
1112
|
} else {
|
|
1072
1113
|
if (this._flags.last_token.type === o.RESERVED)
|
|
1073
|
-
this._flags.last_token.text === "for" ? (this._output.space_before_token = this._options.space_before_conditional, d = _.ForInitializer) : l(this._flags.last_token.text, ["if", "while", "switch"]) ? (this._output.space_before_token = this._options.space_before_conditional, d = _.Conditional) : l(this._flags.last_word, ["await", "async"]) ? this._output.space_before_token = !0 : this._flags.last_token.text === "import" &&
|
|
1114
|
+
this._flags.last_token.text === "for" ? (this._output.space_before_token = this._options.space_before_conditional, d = _.ForInitializer) : l(this._flags.last_token.text, ["if", "while", "switch"]) ? (this._output.space_before_token = this._options.space_before_conditional, d = _.Conditional) : l(this._flags.last_word, ["await", "async"]) ? this._output.space_before_token = !0 : this._flags.last_token.text === "import" && a.whitespace_before === "" ? this._output.space_before_token = !1 : (l(this._flags.last_token.text, r) || this._flags.last_token.text === "catch") && (this._output.space_before_token = !0);
|
|
1074
1115
|
else if (this._flags.last_token.type === o.EQUALS || this._flags.last_token.type === o.OPERATOR)
|
|
1075
|
-
this.start_of_object_property() || this.allow_wrap_or_preserved_newline(
|
|
1116
|
+
this.start_of_object_property() || this.allow_wrap_or_preserved_newline(a);
|
|
1076
1117
|
else if (this._flags.last_token.type === o.WORD) {
|
|
1077
1118
|
this._output.space_before_token = !1;
|
|
1078
1119
|
var m = this._tokens.peek(-3);
|
|
1079
1120
|
if (this._options.space_after_named_function && m) {
|
|
1080
1121
|
var R = this._tokens.peek(-4);
|
|
1081
|
-
|
|
1122
|
+
v(m, ["async", "function"]) || m.text === "*" && v(R, ["async", "function"]) ? this._output.space_before_token = !0 : this._flags.mode === _.ObjectLiteral ? (m.text === "{" || m.text === "," || m.text === "*" && (R.text === "{" || R.text === ",")) && (this._output.space_before_token = !0) : this._flags.parent && this._flags.parent.class_start_block && (this._output.space_before_token = !0);
|
|
1082
1123
|
}
|
|
1083
1124
|
} else
|
|
1084
|
-
this.allow_wrap_or_preserved_newline(
|
|
1125
|
+
this.allow_wrap_or_preserved_newline(a);
|
|
1085
1126
|
(this._flags.last_token.type === o.RESERVED && (this._flags.last_word === "function" || this._flags.last_word === "typeof") || this._flags.last_token.text === "*" && (l(this._last_last_text, ["function", "yield"]) || this._flags.mode === _.ObjectLiteral && l(this._last_last_text, ["{", ","]))) && (this._output.space_before_token = this._options.space_after_anon_function);
|
|
1086
1127
|
}
|
|
1087
|
-
this._flags.last_token.text === ";" || this._flags.last_token.type === o.START_BLOCK ? this.print_newline() : (this._flags.last_token.type === o.END_EXPR || this._flags.last_token.type === o.START_EXPR || this._flags.last_token.type === o.END_BLOCK || this._flags.last_token.text === "." || this._flags.last_token.type === o.COMMA) && this.allow_wrap_or_preserved_newline(
|
|
1088
|
-
}, f.prototype.handle_end_expr = function(
|
|
1128
|
+
this._flags.last_token.text === ";" || this._flags.last_token.type === o.START_BLOCK ? this.print_newline() : (this._flags.last_token.type === o.END_EXPR || this._flags.last_token.type === o.START_EXPR || this._flags.last_token.type === o.END_BLOCK || this._flags.last_token.text === "." || this._flags.last_token.type === o.COMMA) && this.allow_wrap_or_preserved_newline(a, a.newlines), this.print_token(a), this.set_mode(d), this._options.space_in_paren && (this._output.space_before_token = !0), this.indent();
|
|
1129
|
+
}, f.prototype.handle_end_expr = function(a) {
|
|
1089
1130
|
for (; this._flags.mode === _.Statement; )
|
|
1090
1131
|
this.restore_mode();
|
|
1091
|
-
this.handle_whitespace_and_comments(
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
), this._options.space_in_paren && (this._flags.last_token.type === o.START_EXPR && !this._options.space_in_empty_paren ? (this._output.trim(), this._output.space_before_token = !1) : this._output.space_before_token = !0), this.deindent(), this.print_token(
|
|
1095
|
-
}, f.prototype.handle_start_block = function(
|
|
1096
|
-
this.handle_whitespace_and_comments(
|
|
1132
|
+
this.handle_whitespace_and_comments(a), this._flags.multiline_frame && this.allow_wrap_or_preserved_newline(
|
|
1133
|
+
a,
|
|
1134
|
+
a.text === "]" && O(this._flags.mode) && !this._options.keep_array_indentation
|
|
1135
|
+
), this._options.space_in_paren && (this._flags.last_token.type === o.START_EXPR && !this._options.space_in_empty_paren ? (this._output.trim(), this._output.space_before_token = !1) : this._output.space_before_token = !0), this.deindent(), this.print_token(a), this.restore_mode(), h(this._output, this._previous_flags), this._flags.do_while && this._previous_flags.mode === _.Conditional && (this._previous_flags.mode = _.Expression, this._flags.do_block = !1, this._flags.do_while = !1);
|
|
1136
|
+
}, f.prototype.handle_start_block = function(a) {
|
|
1137
|
+
this.handle_whitespace_and_comments(a);
|
|
1097
1138
|
var d = this._tokens.peek(), m = this._tokens.peek(1);
|
|
1098
|
-
this._flags.last_word === "switch" && this._flags.last_token.type === o.END_EXPR ? (this.set_mode(_.BlockStatement), this._flags.in_case_statement = !0) : this._flags.case_body ? this.set_mode(_.BlockStatement) : m && (l(m.text, [":", ","]) && l(d.type, [o.STRING, o.WORD, o.RESERVED]) || l(d.text, ["get", "set", "..."]) && l(m.type, [o.WORD, o.RESERVED])) ? l(this._last_last_text, ["class", "interface"]) && !l(m.text, [":", ","]) ? this.set_mode(_.BlockStatement) : this.set_mode(_.ObjectLiteral) : this._flags.last_token.type === o.OPERATOR && this._flags.last_token.text === "=>" ? this.set_mode(_.BlockStatement) : l(this._flags.last_token.type, [o.EQUALS, o.START_EXPR, o.COMMA, o.OPERATOR]) ||
|
|
1139
|
+
this._flags.last_word === "switch" && this._flags.last_token.type === o.END_EXPR ? (this.set_mode(_.BlockStatement), this._flags.in_case_statement = !0) : this._flags.case_body ? this.set_mode(_.BlockStatement) : m && (l(m.text, [":", ","]) && l(d.type, [o.STRING, o.WORD, o.RESERVED]) || l(d.text, ["get", "set", "..."]) && l(m.type, [o.WORD, o.RESERVED])) ? l(this._last_last_text, ["class", "interface"]) && !l(m.text, [":", ","]) ? this.set_mode(_.BlockStatement) : this.set_mode(_.ObjectLiteral) : this._flags.last_token.type === o.OPERATOR && this._flags.last_token.text === "=>" ? this.set_mode(_.BlockStatement) : l(this._flags.last_token.type, [o.EQUALS, o.START_EXPR, o.COMMA, o.OPERATOR]) || v(this._flags.last_token, ["return", "throw", "import", "default"]) ? this.set_mode(_.ObjectLiteral) : this.set_mode(_.BlockStatement), this._flags.last_token && v(this._flags.last_token.previous, ["class", "extends"]) && (this._flags.class_start_block = !0);
|
|
1099
1140
|
var R = !d.comments_before && d.text === "}", C = R && this._flags.last_word === "function" && this._flags.last_token.type === o.END_EXPR;
|
|
1100
1141
|
if (this._options.brace_preserve_inline) {
|
|
1101
|
-
var P = 0,
|
|
1142
|
+
var P = 0, j = null;
|
|
1102
1143
|
this._flags.inline_frame = !0;
|
|
1103
1144
|
do
|
|
1104
|
-
if (P += 1,
|
|
1145
|
+
if (P += 1, j = this._tokens.peek(P - 1), j.newlines) {
|
|
1105
1146
|
this._flags.inline_frame = !1;
|
|
1106
1147
|
break;
|
|
1107
1148
|
}
|
|
1108
|
-
while (
|
|
1149
|
+
while (j.type !== o.EOF && !(j.type === o.END_BLOCK && j.opened === a));
|
|
1109
1150
|
}
|
|
1110
|
-
(this._options.brace_style === "expand" || this._options.brace_style === "none" &&
|
|
1111
|
-
}, f.prototype.handle_end_block = function(
|
|
1112
|
-
for (this.handle_whitespace_and_comments(
|
|
1151
|
+
(this._options.brace_style === "expand" || this._options.brace_style === "none" && a.newlines) && !this._flags.inline_frame ? this._flags.last_token.type !== o.OPERATOR && (C || this._flags.last_token.type === o.EQUALS || v(this._flags.last_token, A) && this._flags.last_token.text !== "else") ? this._output.space_before_token = !0 : this.print_newline(!1, !0) : (O(this._previous_flags.mode) && (this._flags.last_token.type === o.START_EXPR || this._flags.last_token.type === o.COMMA) && ((this._flags.last_token.type === o.COMMA || this._options.space_in_paren) && (this._output.space_before_token = !0), (this._flags.last_token.type === o.COMMA || this._flags.last_token.type === o.START_EXPR && this._flags.inline_frame) && (this.allow_wrap_or_preserved_newline(a), this._previous_flags.multiline_frame = this._previous_flags.multiline_frame || this._flags.multiline_frame, this._flags.multiline_frame = !1)), this._flags.last_token.type !== o.OPERATOR && this._flags.last_token.type !== o.START_EXPR && (l(this._flags.last_token.type, [o.START_BLOCK, o.SEMICOLON]) && !this._flags.inline_frame ? this.print_newline() : this._output.space_before_token = !0)), this.print_token(a), this.indent(), !R && !(this._options.brace_preserve_inline && this._flags.inline_frame) && this.print_newline();
|
|
1152
|
+
}, f.prototype.handle_end_block = function(a) {
|
|
1153
|
+
for (this.handle_whitespace_and_comments(a); this._flags.mode === _.Statement; )
|
|
1113
1154
|
this.restore_mode();
|
|
1114
1155
|
var d = this._flags.last_token.type === o.START_BLOCK;
|
|
1115
|
-
this._flags.inline_frame && !d ? this._output.space_before_token = !0 : this._options.brace_style === "expand" ? d || this.print_newline() : d || (O(this._flags.mode) && this._options.keep_array_indentation ? (this._options.keep_array_indentation = !1, this.print_newline(), this._options.keep_array_indentation = !0) : this.print_newline()), this.restore_mode(), this.print_token(
|
|
1116
|
-
}, f.prototype.handle_word = function(
|
|
1117
|
-
if (
|
|
1118
|
-
if (l(
|
|
1119
|
-
|
|
1120
|
-
else if (
|
|
1121
|
-
|
|
1122
|
-
else if (l(
|
|
1123
|
-
|
|
1156
|
+
this._flags.inline_frame && !d ? this._output.space_before_token = !0 : this._options.brace_style === "expand" ? d || this.print_newline() : d || (O(this._flags.mode) && this._options.keep_array_indentation ? (this._options.keep_array_indentation = !1, this.print_newline(), this._options.keep_array_indentation = !0) : this.print_newline()), this.restore_mode(), this.print_token(a);
|
|
1157
|
+
}, f.prototype.handle_word = function(a) {
|
|
1158
|
+
if (a.type === o.RESERVED) {
|
|
1159
|
+
if (l(a.text, ["set", "get"]) && this._flags.mode !== _.ObjectLiteral)
|
|
1160
|
+
a.type = o.WORD;
|
|
1161
|
+
else if (a.text === "import" && l(this._tokens.peek().text, ["(", "."]))
|
|
1162
|
+
a.type = o.WORD;
|
|
1163
|
+
else if (l(a.text, ["as", "from"]) && !this._flags.import_block)
|
|
1164
|
+
a.type = o.WORD;
|
|
1124
1165
|
else if (this._flags.mode === _.ObjectLiteral) {
|
|
1125
1166
|
var d = this._tokens.peek();
|
|
1126
|
-
d.text === ":" && (
|
|
1167
|
+
d.text === ":" && (a.type = o.WORD);
|
|
1127
1168
|
}
|
|
1128
1169
|
}
|
|
1129
|
-
if (this.start_of_statement(
|
|
1130
|
-
if (b(
|
|
1131
|
-
this._output.space_before_token = !0, this.print_token(
|
|
1170
|
+
if (this.start_of_statement(a) ? v(this._flags.last_token, ["var", "let", "const"]) && a.type === o.WORD && (this._flags.declaration_statement = !0) : a.newlines && !S(this._flags.mode) && (this._flags.last_token.type !== o.OPERATOR || this._flags.last_token.text === "--" || this._flags.last_token.text === "++") && this._flags.last_token.type !== o.EQUALS && (this._options.preserve_newlines || !v(this._flags.last_token, ["var", "let", "const", "set", "get"])) ? (this.handle_whitespace_and_comments(a), this.print_newline()) : this.handle_whitespace_and_comments(a), this._flags.do_block && !this._flags.do_while)
|
|
1171
|
+
if (b(a, "while")) {
|
|
1172
|
+
this._output.space_before_token = !0, this.print_token(a), this._output.space_before_token = !0, this._flags.do_while = !0;
|
|
1132
1173
|
return;
|
|
1133
1174
|
} else
|
|
1134
1175
|
this.print_newline(), this._flags.do_block = !1;
|
|
1135
1176
|
if (this._flags.if_block)
|
|
1136
|
-
if (!this._flags.else_block && b(
|
|
1177
|
+
if (!this._flags.else_block && b(a, "else"))
|
|
1137
1178
|
this._flags.else_block = !0;
|
|
1138
1179
|
else {
|
|
1139
1180
|
for (; this._flags.mode === _.Statement; )
|
|
1140
1181
|
this.restore_mode();
|
|
1141
1182
|
this._flags.if_block = !1, this._flags.else_block = !1;
|
|
1142
1183
|
}
|
|
1143
|
-
if (this._flags.in_case_statement &&
|
|
1144
|
-
this.print_newline(), !this._flags.case_block && (this._flags.case_body || this._options.jslint_happy) && this.deindent(), this._flags.case_body = !1, this.print_token(
|
|
1184
|
+
if (this._flags.in_case_statement && v(a, ["case", "default"])) {
|
|
1185
|
+
this.print_newline(), !this._flags.case_block && (this._flags.case_body || this._options.jslint_happy) && this.deindent(), this._flags.case_body = !1, this.print_token(a), this._flags.in_case = !0;
|
|
1145
1186
|
return;
|
|
1146
1187
|
}
|
|
1147
|
-
if ((this._flags.last_token.type === o.COMMA || this._flags.last_token.type === o.START_EXPR || this._flags.last_token.type === o.EQUALS || this._flags.last_token.type === o.OPERATOR) && (this.start_of_object_property() || this.allow_wrap_or_preserved_newline(
|
|
1148
|
-
(l(this._flags.last_token.text, ["}", ";"]) || this._output.just_added_newline() && !(l(this._flags.last_token.text, ["(", "[", "{", ":", "=", ","]) || this._flags.last_token.type === o.OPERATOR)) && !this._output.just_added_blankline() && !
|
|
1188
|
+
if ((this._flags.last_token.type === o.COMMA || this._flags.last_token.type === o.START_EXPR || this._flags.last_token.type === o.EQUALS || this._flags.last_token.type === o.OPERATOR) && (this.start_of_object_property() || this.allow_wrap_or_preserved_newline(a)), b(a, "function")) {
|
|
1189
|
+
(l(this._flags.last_token.text, ["}", ";"]) || this._output.just_added_newline() && !(l(this._flags.last_token.text, ["(", "[", "{", ":", "=", ","]) || this._flags.last_token.type === o.OPERATOR)) && !this._output.just_added_blankline() && !a.comments_before && (this.print_newline(), this.print_newline(!0)), this._flags.last_token.type === o.RESERVED || this._flags.last_token.type === o.WORD ? v(this._flags.last_token, ["get", "set", "new", "export"]) || v(this._flags.last_token, T) ? this._output.space_before_token = !0 : b(this._flags.last_token, "default") && this._last_last_text === "export" ? this._output.space_before_token = !0 : this._flags.last_token.text === "declare" ? this._output.space_before_token = !0 : this.print_newline() : this._flags.last_token.type === o.OPERATOR || this._flags.last_token.text === "=" ? this._output.space_before_token = !0 : !this._flags.multiline_frame && (S(this._flags.mode) || O(this._flags.mode)) || this.print_newline(), this.print_token(a), this._flags.last_word = a.text;
|
|
1149
1190
|
return;
|
|
1150
1191
|
}
|
|
1151
1192
|
var m = "NONE";
|
|
1152
|
-
if (this._flags.last_token.type === o.END_BLOCK ? this._previous_flags.inline_frame ? m = "SPACE" :
|
|
1153
|
-
if ((!(this._flags.last_token.type === o.END_BLOCK && this._previous_flags.mode === _.BlockStatement) || this._options.brace_style === "expand" || this._options.brace_style === "end-expand" || this._options.brace_style === "none" &&
|
|
1193
|
+
if (this._flags.last_token.type === o.END_BLOCK ? this._previous_flags.inline_frame ? m = "SPACE" : v(a, ["else", "catch", "finally", "from"]) ? this._options.brace_style === "expand" || this._options.brace_style === "end-expand" || this._options.brace_style === "none" && a.newlines ? m = "NEWLINE" : (m = "SPACE", this._output.space_before_token = !0) : m = "NEWLINE" : this._flags.last_token.type === o.SEMICOLON && this._flags.mode === _.BlockStatement ? m = "NEWLINE" : this._flags.last_token.type === o.SEMICOLON && S(this._flags.mode) ? m = "SPACE" : this._flags.last_token.type === o.STRING ? m = "NEWLINE" : this._flags.last_token.type === o.RESERVED || this._flags.last_token.type === o.WORD || this._flags.last_token.text === "*" && (l(this._last_last_text, ["function", "yield"]) || this._flags.mode === _.ObjectLiteral && l(this._last_last_text, ["{", ","])) ? m = "SPACE" : this._flags.last_token.type === o.START_BLOCK ? this._flags.inline_frame ? m = "SPACE" : m = "NEWLINE" : this._flags.last_token.type === o.END_EXPR && (this._output.space_before_token = !0, m = "NEWLINE"), v(a, r) && this._flags.last_token.text !== ")" && (this._flags.inline_frame || this._flags.last_token.text === "else" || this._flags.last_token.text === "export" ? m = "SPACE" : m = "NEWLINE"), v(a, ["else", "catch", "finally"]))
|
|
1194
|
+
if ((!(this._flags.last_token.type === o.END_BLOCK && this._previous_flags.mode === _.BlockStatement) || this._options.brace_style === "expand" || this._options.brace_style === "end-expand" || this._options.brace_style === "none" && a.newlines) && !this._flags.inline_frame)
|
|
1154
1195
|
this.print_newline();
|
|
1155
1196
|
else {
|
|
1156
1197
|
this._output.trim(!0);
|
|
@@ -1158,149 +1199,149 @@ function ri() {
|
|
|
1158
1199
|
R.last() !== "}" && this.print_newline(), this._output.space_before_token = !0;
|
|
1159
1200
|
}
|
|
1160
1201
|
else
|
|
1161
|
-
m === "NEWLINE" ?
|
|
1162
|
-
|
|
1163
|
-
}, f.prototype.handle_semicolon = function(
|
|
1164
|
-
this.start_of_statement(
|
|
1202
|
+
m === "NEWLINE" ? v(this._flags.last_token, A) ? this._output.space_before_token = !0 : this._flags.last_token.text === "declare" && v(a, ["var", "let", "const"]) ? this._output.space_before_token = !0 : this._flags.last_token.type !== o.END_EXPR ? (this._flags.last_token.type !== o.START_EXPR || !v(a, ["var", "let", "const"])) && this._flags.last_token.text !== ":" && (b(a, "if") && b(a.previous, "else") ? this._output.space_before_token = !0 : this.print_newline()) : v(a, r) && this._flags.last_token.text !== ")" && this.print_newline() : this._flags.multiline_frame && O(this._flags.mode) && this._flags.last_token.text === "," && this._last_last_text === "}" ? this.print_newline() : m === "SPACE" && (this._output.space_before_token = !0);
|
|
1203
|
+
a.previous && (a.previous.type === o.WORD || a.previous.type === o.RESERVED) && (this._output.space_before_token = !0), this.print_token(a), this._flags.last_word = a.text, a.type === o.RESERVED && (a.text === "do" ? this._flags.do_block = !0 : a.text === "if" ? this._flags.if_block = !0 : a.text === "import" ? this._flags.import_block = !0 : this._flags.import_block && b(a, "from") && (this._flags.import_block = !1));
|
|
1204
|
+
}, f.prototype.handle_semicolon = function(a) {
|
|
1205
|
+
this.start_of_statement(a) ? this._output.space_before_token = !1 : this.handle_whitespace_and_comments(a);
|
|
1165
1206
|
for (var d = this._tokens.peek(); this._flags.mode === _.Statement && !(this._flags.if_block && b(d, "else")) && !this._flags.do_block; )
|
|
1166
1207
|
this.restore_mode();
|
|
1167
|
-
this._flags.import_block && (this._flags.import_block = !1), this.print_token(
|
|
1168
|
-
}, f.prototype.handle_string = function(
|
|
1169
|
-
|
|
1170
|
-
}, f.prototype.handle_equals = function(
|
|
1171
|
-
this.start_of_statement(
|
|
1172
|
-
}, f.prototype.handle_comma = function(
|
|
1173
|
-
this.handle_whitespace_and_comments(
|
|
1174
|
-
}, f.prototype.handle_operator = function(
|
|
1175
|
-
var d =
|
|
1176
|
-
if (!this.start_of_statement(
|
|
1208
|
+
this._flags.import_block && (this._flags.import_block = !1), this.print_token(a);
|
|
1209
|
+
}, f.prototype.handle_string = function(a) {
|
|
1210
|
+
a.text.startsWith("`") && a.newlines === 0 && a.whitespace_before === "" && (a.previous.text === ")" || this._flags.last_token.type === o.WORD) || (this.start_of_statement(a) ? this._output.space_before_token = !0 : (this.handle_whitespace_and_comments(a), this._flags.last_token.type === o.RESERVED || this._flags.last_token.type === o.WORD || this._flags.inline_frame ? this._output.space_before_token = !0 : this._flags.last_token.type === o.COMMA || this._flags.last_token.type === o.START_EXPR || this._flags.last_token.type === o.EQUALS || this._flags.last_token.type === o.OPERATOR ? this.start_of_object_property() || this.allow_wrap_or_preserved_newline(a) : a.text.startsWith("`") && this._flags.last_token.type === o.END_EXPR && (a.previous.text === "]" || a.previous.text === ")") && a.newlines === 0 ? this._output.space_before_token = !0 : this.print_newline())), this.print_token(a);
|
|
1211
|
+
}, f.prototype.handle_equals = function(a) {
|
|
1212
|
+
this.start_of_statement(a) || this.handle_whitespace_and_comments(a), this._flags.declaration_statement && (this._flags.declaration_assignment = !0), this._output.space_before_token = !0, this.print_token(a), this._output.space_before_token = !0;
|
|
1213
|
+
}, f.prototype.handle_comma = function(a) {
|
|
1214
|
+
this.handle_whitespace_and_comments(a, !0), this.print_token(a), this._output.space_before_token = !0, this._flags.declaration_statement ? (S(this._flags.parent.mode) && (this._flags.declaration_assignment = !1), this._flags.declaration_assignment ? (this._flags.declaration_assignment = !1, this.print_newline(!1, !0)) : this._options.comma_first && this.allow_wrap_or_preserved_newline(a)) : this._flags.mode === _.ObjectLiteral || this._flags.mode === _.Statement && this._flags.parent.mode === _.ObjectLiteral ? (this._flags.mode === _.Statement && this.restore_mode(), this._flags.inline_frame || this.print_newline()) : this._options.comma_first && this.allow_wrap_or_preserved_newline(a);
|
|
1215
|
+
}, f.prototype.handle_operator = function(a) {
|
|
1216
|
+
var d = a.text === "*" && (v(this._flags.last_token, ["function", "yield"]) || l(this._flags.last_token.type, [o.START_BLOCK, o.COMMA, o.END_BLOCK, o.SEMICOLON])), m = l(a.text, ["-", "+"]) && (l(this._flags.last_token.type, [o.START_BLOCK, o.START_EXPR, o.EQUALS, o.OPERATOR]) || l(this._flags.last_token.text, r) || this._flags.last_token.text === ",");
|
|
1217
|
+
if (!this.start_of_statement(a)) {
|
|
1177
1218
|
var R = !d;
|
|
1178
|
-
this.handle_whitespace_and_comments(
|
|
1219
|
+
this.handle_whitespace_and_comments(a, R);
|
|
1179
1220
|
}
|
|
1180
|
-
if (
|
|
1181
|
-
this.print_token(
|
|
1221
|
+
if (a.text === "*" && this._flags.last_token.type === o.DOT) {
|
|
1222
|
+
this.print_token(a);
|
|
1182
1223
|
return;
|
|
1183
1224
|
}
|
|
1184
|
-
if (
|
|
1185
|
-
this.print_token(
|
|
1225
|
+
if (a.text === "::") {
|
|
1226
|
+
this.print_token(a);
|
|
1186
1227
|
return;
|
|
1187
1228
|
}
|
|
1188
|
-
if (this._flags.last_token.type === o.OPERATOR && l(this._options.operator_position, p) && this.allow_wrap_or_preserved_newline(
|
|
1189
|
-
this.print_token(
|
|
1229
|
+
if (this._flags.last_token.type === o.OPERATOR && l(this._options.operator_position, p) && this.allow_wrap_or_preserved_newline(a), a.text === ":" && this._flags.in_case) {
|
|
1230
|
+
this.print_token(a), this._flags.in_case = !1, this._flags.case_body = !0, this._tokens.peek().type !== o.START_BLOCK ? (this.indent(), this.print_newline(), this._flags.case_block = !1) : (this._flags.case_block = !0, this._output.space_before_token = !0);
|
|
1190
1231
|
return;
|
|
1191
1232
|
}
|
|
1192
|
-
var C = !0, P = !0,
|
|
1193
|
-
if (
|
|
1194
|
-
var z =
|
|
1233
|
+
var C = !0, P = !0, j = !1;
|
|
1234
|
+
if (a.text === ":" ? this._flags.ternary_depth === 0 ? C = !1 : (this._flags.ternary_depth -= 1, j = !0) : a.text === "?" && (this._flags.ternary_depth += 1), !m && !d && this._options.preserve_newlines && l(a.text, u)) {
|
|
1235
|
+
var z = a.text === ":", lt = z && j, xt = z && !j;
|
|
1195
1236
|
switch (this._options.operator_position) {
|
|
1196
|
-
case
|
|
1197
|
-
this._output.space_before_token = !xt, this.print_token(
|
|
1237
|
+
case N.before_newline:
|
|
1238
|
+
this._output.space_before_token = !xt, this.print_token(a), (!z || lt) && this.allow_wrap_or_preserved_newline(a), this._output.space_before_token = !0;
|
|
1198
1239
|
return;
|
|
1199
|
-
case
|
|
1200
|
-
this._output.space_before_token = !0, !z || lt ? this._tokens.peek().newlines ? this.print_newline(!1, !0) : this.allow_wrap_or_preserved_newline(
|
|
1240
|
+
case N.after_newline:
|
|
1241
|
+
this._output.space_before_token = !0, !z || lt ? this._tokens.peek().newlines ? this.print_newline(!1, !0) : this.allow_wrap_or_preserved_newline(a) : this._output.space_before_token = !1, this.print_token(a), this._output.space_before_token = !0;
|
|
1201
1242
|
return;
|
|
1202
|
-
case
|
|
1203
|
-
xt || this.allow_wrap_or_preserved_newline(
|
|
1243
|
+
case N.preserve_newline:
|
|
1244
|
+
xt || this.allow_wrap_or_preserved_newline(a), C = !(this._output.just_added_newline() || xt), this._output.space_before_token = C, this.print_token(a), this._output.space_before_token = !0;
|
|
1204
1245
|
return;
|
|
1205
1246
|
}
|
|
1206
1247
|
}
|
|
1207
1248
|
if (d) {
|
|
1208
|
-
this.allow_wrap_or_preserved_newline(
|
|
1249
|
+
this.allow_wrap_or_preserved_newline(a), C = !1;
|
|
1209
1250
|
var Gt = this._tokens.peek();
|
|
1210
1251
|
P = Gt && l(Gt.type, [o.WORD, o.RESERVED]);
|
|
1211
|
-
} else if (
|
|
1212
|
-
this.allow_wrap_or_preserved_newline(
|
|
1213
|
-
else if (l(
|
|
1214
|
-
if ((this._flags.last_token.type === o.COMMA || this._flags.last_token.type === o.START_EXPR) && this.allow_wrap_or_preserved_newline(
|
|
1215
|
-
var Qt =
|
|
1252
|
+
} else if (a.text === "...")
|
|
1253
|
+
this.allow_wrap_or_preserved_newline(a), C = this._flags.last_token.type === o.START_BLOCK, P = !1;
|
|
1254
|
+
else if (l(a.text, ["--", "++", "!", "~"]) || m) {
|
|
1255
|
+
if ((this._flags.last_token.type === o.COMMA || this._flags.last_token.type === o.START_EXPR) && this.allow_wrap_or_preserved_newline(a), C = !1, P = !1, a.newlines && (a.text === "--" || a.text === "++" || a.text === "~")) {
|
|
1256
|
+
var Qt = v(this._flags.last_token, A) && a.newlines;
|
|
1216
1257
|
Qt && (this._previous_flags.if_block || this._previous_flags.else_block) && this.restore_mode(), this.print_newline(Qt, !0);
|
|
1217
1258
|
}
|
|
1218
|
-
this._flags.last_token.text === ";" &&
|
|
1259
|
+
this._flags.last_token.text === ";" && S(this._flags.mode) && (C = !0), this._flags.last_token.type === o.RESERVED ? C = !0 : this._flags.last_token.type === o.END_EXPR ? C = !(this._flags.last_token.text === "]" && (a.text === "--" || a.text === "++")) : this._flags.last_token.type === o.OPERATOR && (C = l(a.text, ["--", "-", "++", "+"]) && l(this._flags.last_token.text, ["--", "-", "++", "+"]), l(a.text, ["+", "-"]) && l(this._flags.last_token.text, ["--", "++"]) && (P = !0)), (this._flags.mode === _.BlockStatement && !this._flags.inline_frame || this._flags.mode === _.Statement) && (this._flags.last_token.text === "{" || this._flags.last_token.text === ";") && this.print_newline();
|
|
1219
1260
|
}
|
|
1220
|
-
this._output.space_before_token = this._output.space_before_token || C, this.print_token(
|
|
1221
|
-
}, f.prototype.handle_block_comment = function(
|
|
1261
|
+
this._output.space_before_token = this._output.space_before_token || C, this.print_token(a), this._output.space_before_token = P;
|
|
1262
|
+
}, f.prototype.handle_block_comment = function(a, d) {
|
|
1222
1263
|
if (this._output.raw) {
|
|
1223
|
-
this._output.add_raw_token(
|
|
1264
|
+
this._output.add_raw_token(a), a.directives && a.directives.preserve === "end" && (this._output.raw = this._options.test_output_raw);
|
|
1224
1265
|
return;
|
|
1225
1266
|
}
|
|
1226
|
-
if (
|
|
1227
|
-
this.print_newline(!1, d), this.print_token(
|
|
1267
|
+
if (a.directives) {
|
|
1268
|
+
this.print_newline(!1, d), this.print_token(a), a.directives.preserve === "start" && (this._output.raw = !0), this.print_newline(!1, !0);
|
|
1228
1269
|
return;
|
|
1229
1270
|
}
|
|
1230
|
-
if (!s.newline.test(
|
|
1231
|
-
this._output.space_before_token = !0, this.print_token(
|
|
1271
|
+
if (!s.newline.test(a.text) && !a.newlines) {
|
|
1272
|
+
this._output.space_before_token = !0, this.print_token(a), this._output.space_before_token = !0;
|
|
1232
1273
|
return;
|
|
1233
1274
|
} else
|
|
1234
|
-
this.print_block_commment(
|
|
1235
|
-
}, f.prototype.print_block_commment = function(
|
|
1236
|
-
var m = k(
|
|
1237
|
-
if (this.print_newline(!1, d), this.print_token_line_indentation(
|
|
1238
|
-
for (m = m.slice(1), C = c(m, "*"), P = g(m,
|
|
1239
|
-
C ? (this.print_token_line_indentation(
|
|
1275
|
+
this.print_block_commment(a, d);
|
|
1276
|
+
}, f.prototype.print_block_commment = function(a, d) {
|
|
1277
|
+
var m = k(a.text), R, C = !1, P = !1, j = a.whitespace_before, z = j.length;
|
|
1278
|
+
if (this.print_newline(!1, d), this.print_token_line_indentation(a), this._output.add_token(m[0]), this.print_newline(!1, d), m.length > 1) {
|
|
1279
|
+
for (m = m.slice(1), C = c(m, "*"), P = g(m, j), C && (this._flags.alignment = 1), R = 0; R < m.length; R++)
|
|
1280
|
+
C ? (this.print_token_line_indentation(a), this._output.add_token(y(m[R]))) : P && m[R] ? (this.print_token_line_indentation(a), this._output.add_token(m[R].substring(z))) : (this._output.current_line.set_indent(-1), this._output.add_token(m[R])), this.print_newline(!1, d);
|
|
1240
1281
|
this._flags.alignment = 0;
|
|
1241
1282
|
}
|
|
1242
|
-
}, f.prototype.handle_comment = function(
|
|
1243
|
-
|
|
1244
|
-
}, f.prototype.handle_dot = function(
|
|
1245
|
-
this.start_of_statement(
|
|
1246
|
-
|
|
1283
|
+
}, f.prototype.handle_comment = function(a, d) {
|
|
1284
|
+
a.newlines ? this.print_newline(!1, d) : this._output.trim(!0), this._output.space_before_token = !0, this.print_token(a), this.print_newline(!1, d);
|
|
1285
|
+
}, f.prototype.handle_dot = function(a) {
|
|
1286
|
+
this.start_of_statement(a) || this.handle_whitespace_and_comments(a, !0), this._flags.last_token.text.match("^[0-9]+$") && (this._output.space_before_token = !0), v(this._flags.last_token, A) ? this._output.space_before_token = !1 : this.allow_wrap_or_preserved_newline(
|
|
1287
|
+
a,
|
|
1247
1288
|
this._flags.last_token.text === ")" && this._options.break_chained_methods
|
|
1248
|
-
), this._options.unindent_chained_methods && this._output.just_added_newline() && this.deindent(), this.print_token(
|
|
1249
|
-
}, f.prototype.handle_unknown = function(
|
|
1250
|
-
this.print_token(
|
|
1289
|
+
), this._options.unindent_chained_methods && this._output.just_added_newline() && this.deindent(), this.print_token(a);
|
|
1290
|
+
}, f.prototype.handle_unknown = function(a, d) {
|
|
1291
|
+
this.print_token(a), a.text[a.text.length - 1] === `
|
|
1251
1292
|
` && this.print_newline(!1, d);
|
|
1252
|
-
}, f.prototype.handle_eof = function(
|
|
1293
|
+
}, f.prototype.handle_eof = function(a) {
|
|
1253
1294
|
for (; this._flags.mode === _.Statement; )
|
|
1254
1295
|
this.restore_mode();
|
|
1255
|
-
this.handle_whitespace_and_comments(
|
|
1296
|
+
this.handle_whitespace_and_comments(a);
|
|
1256
1297
|
}, wt.Beautifier = f, wt;
|
|
1257
1298
|
}
|
|
1258
1299
|
var he;
|
|
1259
|
-
function
|
|
1300
|
+
function pi() {
|
|
1260
1301
|
if (he)
|
|
1261
1302
|
return st;
|
|
1262
1303
|
he = 1;
|
|
1263
|
-
var t =
|
|
1264
|
-
function s(e,
|
|
1265
|
-
var r = new t(e,
|
|
1304
|
+
var t = ui().Beautifier, i = De().Options;
|
|
1305
|
+
function s(e, n) {
|
|
1306
|
+
var r = new t(e, n);
|
|
1266
1307
|
return r.beautify();
|
|
1267
1308
|
}
|
|
1268
|
-
return
|
|
1309
|
+
return ri.exports = s, st.defaultOptions = function() {
|
|
1269
1310
|
return new i();
|
|
1270
1311
|
}, st;
|
|
1271
1312
|
}
|
|
1272
|
-
var nt = {},
|
|
1313
|
+
var nt = {}, hi = {
|
|
1273
1314
|
get exports() {
|
|
1274
1315
|
return nt;
|
|
1275
1316
|
},
|
|
1276
1317
|
set exports(t) {
|
|
1277
1318
|
nt = t;
|
|
1278
1319
|
}
|
|
1279
|
-
}, Pt = {},
|
|
1280
|
-
function
|
|
1320
|
+
}, Pt = {}, Lt = {}, fe;
|
|
1321
|
+
function Me() {
|
|
1281
1322
|
if (fe)
|
|
1282
|
-
return
|
|
1323
|
+
return Lt;
|
|
1283
1324
|
fe = 1;
|
|
1284
1325
|
var t = zt().Options;
|
|
1285
1326
|
function i(s) {
|
|
1286
1327
|
t.call(this, s, "css"), this.selector_separator_newline = this._get_boolean("selector_separator_newline", !0), this.newline_between_rules = this._get_boolean("newline_between_rules", !0);
|
|
1287
1328
|
var e = this._get_boolean("space_around_selector_separator");
|
|
1288
1329
|
this.space_around_combinator = this._get_boolean("space_around_combinator") || e;
|
|
1289
|
-
var
|
|
1330
|
+
var n = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
|
|
1290
1331
|
this.brace_style = "collapse";
|
|
1291
|
-
for (var r = 0; r <
|
|
1292
|
-
|
|
1332
|
+
for (var r = 0; r < n.length; r++)
|
|
1333
|
+
n[r] !== "expand" ? this.brace_style = "collapse" : this.brace_style = n[r];
|
|
1293
1334
|
}
|
|
1294
|
-
return i.prototype = new t(),
|
|
1335
|
+
return i.prototype = new t(), Lt.Options = i, Lt;
|
|
1295
1336
|
}
|
|
1296
1337
|
var ce;
|
|
1297
|
-
function
|
|
1338
|
+
function fi() {
|
|
1298
1339
|
if (ce)
|
|
1299
1340
|
return Pt;
|
|
1300
1341
|
ce = 1;
|
|
1301
|
-
var t =
|
|
1302
|
-
function b(
|
|
1303
|
-
this._source_text =
|
|
1342
|
+
var t = Me().Options, i = Ut().Output, s = qt().InputScanner, e = Vt().Directives, n = new e(/\/\*/, /\*\//), r = /\r\n|[\r\n]/, u = /\r\n|[\r\n]/g, o = /\s/, l = /(?:\s|\n)+/g, y = /\/\*(?:[\s\S]*?)((?:\*\/)|$)/g, x = /\/\/(?:[^\n\r\u2028\u2029]*)/g;
|
|
1343
|
+
function b(v, A) {
|
|
1344
|
+
this._source_text = v || "", this._options = new t(A), this._ch = null, this._input = null, this.NESTED_AT_RULE = {
|
|
1304
1345
|
page: !0,
|
|
1305
1346
|
"font-face": !0,
|
|
1306
1347
|
keyframes: !0,
|
|
@@ -1317,41 +1358,41 @@ function ui() {
|
|
|
1317
1358
|
"grid-template"
|
|
1318
1359
|
];
|
|
1319
1360
|
}
|
|
1320
|
-
return b.prototype.eatString = function(
|
|
1321
|
-
var
|
|
1361
|
+
return b.prototype.eatString = function(v) {
|
|
1362
|
+
var A = "";
|
|
1322
1363
|
for (this._ch = this._input.next(); this._ch; ) {
|
|
1323
|
-
if (
|
|
1324
|
-
|
|
1325
|
-
else if (
|
|
1364
|
+
if (A += this._ch, this._ch === "\\")
|
|
1365
|
+
A += this._input.next();
|
|
1366
|
+
else if (v.indexOf(this._ch) !== -1 || this._ch === `
|
|
1326
1367
|
`)
|
|
1327
1368
|
break;
|
|
1328
1369
|
this._ch = this._input.next();
|
|
1329
1370
|
}
|
|
1330
|
-
return
|
|
1331
|
-
}, b.prototype.eatWhitespace = function(
|
|
1332
|
-
for (var
|
|
1333
|
-
this._ch = this._input.next(),
|
|
1334
|
-
` && (
|
|
1335
|
-
return
|
|
1371
|
+
return A;
|
|
1372
|
+
}, b.prototype.eatWhitespace = function(v) {
|
|
1373
|
+
for (var A = o.test(this._input.peek()), $ = 0; o.test(this._input.peek()); )
|
|
1374
|
+
this._ch = this._input.next(), v && this._ch === `
|
|
1375
|
+
` && ($ === 0 || $ < this._options.max_preserve_newlines) && ($++, this._output.add_new_line(!0));
|
|
1376
|
+
return A;
|
|
1336
1377
|
}, b.prototype.foundNestedPseudoClass = function() {
|
|
1337
|
-
for (var
|
|
1338
|
-
if (
|
|
1378
|
+
for (var v = 0, A = 1, $ = this._input.peek(A); $; ) {
|
|
1379
|
+
if ($ === "{")
|
|
1339
1380
|
return !0;
|
|
1340
|
-
if (
|
|
1341
|
-
|
|
1342
|
-
else if (
|
|
1343
|
-
if (
|
|
1381
|
+
if ($ === "(")
|
|
1382
|
+
v += 1;
|
|
1383
|
+
else if ($ === ")") {
|
|
1384
|
+
if (v === 0)
|
|
1344
1385
|
return !1;
|
|
1345
|
-
|
|
1346
|
-
} else if (
|
|
1386
|
+
v -= 1;
|
|
1387
|
+
} else if ($ === ";" || $ === "}")
|
|
1347
1388
|
return !1;
|
|
1348
|
-
|
|
1389
|
+
A++, $ = this._input.peek(A);
|
|
1349
1390
|
}
|
|
1350
1391
|
return !1;
|
|
1351
|
-
}, b.prototype.print_string = function(
|
|
1352
|
-
this._output.set_indent(this._indentLevel), this._output.non_breaking_space = !0, this._output.add_token(
|
|
1353
|
-
}, b.prototype.preserveSingleSpace = function(
|
|
1354
|
-
|
|
1392
|
+
}, b.prototype.print_string = function(v) {
|
|
1393
|
+
this._output.set_indent(this._indentLevel), this._output.non_breaking_space = !0, this._output.add_token(v);
|
|
1394
|
+
}, b.prototype.preserveSingleSpace = function(v) {
|
|
1395
|
+
v && (this._output.space_before_token = !0);
|
|
1355
1396
|
}, b.prototype.indent = function() {
|
|
1356
1397
|
this._indentLevel++;
|
|
1357
1398
|
}, b.prototype.outdent = function() {
|
|
@@ -1359,30 +1400,30 @@ function ui() {
|
|
|
1359
1400
|
}, b.prototype.beautify = function() {
|
|
1360
1401
|
if (this._options.disabled)
|
|
1361
1402
|
return this._source_text;
|
|
1362
|
-
var
|
|
1363
|
-
|
|
1364
|
-
`,
|
|
1403
|
+
var v = this._source_text, A = this._options.eol;
|
|
1404
|
+
A === "auto" && (A = `
|
|
1405
|
+
`, v && r.test(v || "") && (A = v.match(r)[0])), v = v.replace(u, `
|
|
1365
1406
|
`);
|
|
1366
|
-
var
|
|
1367
|
-
this._output = new i(this._options,
|
|
1368
|
-
for (var
|
|
1407
|
+
var $ = v.match(/^[\t ]*/)[0];
|
|
1408
|
+
this._output = new i(this._options, $), this._input = new s(v), this._indentLevel = 0, this._nestedLevel = 0, this._ch = null;
|
|
1409
|
+
for (var N = 0, p = !1, _ = !1, h = !1, k = !1, O = !1, S = this._ch, c = !1, g, f, T; g = this._input.read(l), f = g !== "", T = S, this._ch = this._input.next(), this._ch === "\\" && this._input.hasNext() && (this._ch += this._input.next()), S = this._ch, this._ch; )
|
|
1369
1410
|
if (this._ch === "/" && this._input.peek() === "*") {
|
|
1370
1411
|
this._output.add_new_line(), this._input.back();
|
|
1371
|
-
var
|
|
1372
|
-
d && d.ignore === "start" && (
|
|
1412
|
+
var a = this._input.read(y), d = n.get_directives(a);
|
|
1413
|
+
d && d.ignore === "start" && (a += n.readIgnored(this._input)), this.print_string(a), this.eatWhitespace(!0), this._output.add_new_line();
|
|
1373
1414
|
} else if (this._ch === "/" && this._input.peek() === "/")
|
|
1374
1415
|
this._output.space_before_token = !0, this._input.back(), this.print_string(this._input.read(x)), this.eatWhitespace(!0);
|
|
1375
1416
|
else if (this._ch === "$") {
|
|
1376
1417
|
this.preserveSingleSpace(f), this.print_string(this._ch);
|
|
1377
1418
|
var m = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
|
|
1378
|
-
m.match(/[ :]$/) && (m = this.eatString(": ").replace(/\s$/, ""), this.print_string(m), this._output.space_before_token = !0), m = m.replace(/\s$/, ""),
|
|
1419
|
+
m.match(/[ :]$/) && (m = this.eatString(": ").replace(/\s$/, ""), this.print_string(m), this._output.space_before_token = !0), m = m.replace(/\s$/, ""), N === 0 && m.indexOf(":") !== -1 && (_ = !0, this.indent());
|
|
1379
1420
|
} else if (this._ch === "@")
|
|
1380
1421
|
if (this.preserveSingleSpace(f), this._input.peek() === "{")
|
|
1381
1422
|
this.print_string(this._ch + this.eatString("}"));
|
|
1382
1423
|
else {
|
|
1383
1424
|
this.print_string(this._ch);
|
|
1384
1425
|
var R = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
|
|
1385
|
-
R.match(/[ :]$/) && (R = this.eatString(": ").replace(/\s$/, ""), this.print_string(R), this._output.space_before_token = !0), R = R.replace(/\s$/, ""),
|
|
1426
|
+
R.match(/[ :]$/) && (R = this.eatString(": ").replace(/\s$/, ""), this.print_string(R), this._output.space_before_token = !0), R = R.replace(/\s$/, ""), N === 0 && R.indexOf(":") !== -1 ? (_ = !0, this.indent()) : R in this.NESTED_AT_RULE ? (this._nestedLevel += 1, R in this.CONDITIONAL_GROUP_RULE && (h = !0)) : N === 0 && !_ && (k = !0);
|
|
1386
1427
|
}
|
|
1387
1428
|
else if (this._ch === "#" && this._input.peek() === "{")
|
|
1388
1429
|
this.preserveSingleSpace(f), this.print_string(this._ch + this.eatString("}"));
|
|
@@ -1396,24 +1437,24 @@ function ui() {
|
|
|
1396
1437
|
c = !0;
|
|
1397
1438
|
break;
|
|
1398
1439
|
}
|
|
1399
|
-
(p || h) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !k &&
|
|
1440
|
+
(p || h) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !k && N === 0 ? (this.print_string(":"), _ || (_ = !0, this._output.space_before_token = !0, this.eatWhitespace(!0), this.indent())) : (this._input.lookBack(" ") && (this._output.space_before_token = !0), this._input.peek() === ":" ? (this._ch = this._input.next(), this.print_string("::")) : this.print_string(":"));
|
|
1400
1441
|
} else if (this._ch === '"' || this._ch === "'") {
|
|
1401
1442
|
var P = T === '"' || T === "'";
|
|
1402
1443
|
this.preserveSingleSpace(P || f), this.print_string(this._ch + this.eatString(this._ch)), this.eatWhitespace(!0);
|
|
1403
1444
|
} else if (this._ch === ";")
|
|
1404
|
-
c = !1,
|
|
1445
|
+
c = !1, N === 0 ? (_ && (this.outdent(), _ = !1), k = !1, this.print_string(this._ch), this.eatWhitespace(!0), this._input.peek() !== "/" && this._output.add_new_line()) : (this.print_string(this._ch), this.eatWhitespace(!0), this._output.space_before_token = !0);
|
|
1405
1446
|
else if (this._ch === "(")
|
|
1406
1447
|
if (this._input.lookBack("url"))
|
|
1407
|
-
this.print_string(this._ch), this.eatWhitespace(),
|
|
1448
|
+
this.print_string(this._ch), this.eatWhitespace(), N++, this.indent(), this._ch = this._input.next(), this._ch === ")" || this._ch === '"' || this._ch === "'" ? this._input.back() : this._ch && (this.print_string(this._ch + this.eatString(")")), N && (N--, this.outdent()));
|
|
1408
1449
|
else {
|
|
1409
|
-
var
|
|
1410
|
-
this._input.lookBack("with") && (
|
|
1450
|
+
var j = !1;
|
|
1451
|
+
this._input.lookBack("with") && (j = !0), this.preserveSingleSpace(f || j), this.print_string(this._ch), _ && T === "$" && this._options.selector_separator_newline ? (this._output.add_new_line(), O = !0) : (this.eatWhitespace(), N++, this.indent());
|
|
1411
1452
|
}
|
|
1412
1453
|
else if (this._ch === ")")
|
|
1413
|
-
|
|
1454
|
+
N && (N--, this.outdent()), O && this._input.peek() === ";" && this._options.selector_separator_newline && (O = !1, this.outdent(), this._output.add_new_line()), this.print_string(this._ch);
|
|
1414
1455
|
else if (this._ch === ",")
|
|
1415
|
-
this.print_string(this._ch), this.eatWhitespace(!0), this._options.selector_separator_newline && (!_ || O) &&
|
|
1416
|
-
else if ((this._ch === ">" || this._ch === "+" || this._ch === "~") && !_ &&
|
|
1456
|
+
this.print_string(this._ch), this.eatWhitespace(!0), this._options.selector_separator_newline && (!_ || O) && N === 0 && !k ? this._output.add_new_line() : this._output.space_before_token = !0;
|
|
1457
|
+
else if ((this._ch === ">" || this._ch === "+" || this._ch === "~") && !_ && N === 0)
|
|
1417
1458
|
this._options.space_around_combinator ? (this._output.space_before_token = !0, this.print_string(this._ch), this._output.space_before_token = !0) : (this.print_string(this._ch), this.eatWhitespace(), this._ch && o.test(this._ch) && (this._ch = ""));
|
|
1418
1459
|
else if (this._ch === "]")
|
|
1419
1460
|
this.print_string(this._ch);
|
|
@@ -1428,33 +1469,33 @@ function ui() {
|
|
|
1428
1469
|
this.preserveSingleSpace(z || f), this.print_string(this._ch), !this._output.just_added_newline() && this._input.peek() === `
|
|
1429
1470
|
` && c && this._output.add_new_line();
|
|
1430
1471
|
}
|
|
1431
|
-
var lt = this._output.get_code(
|
|
1472
|
+
var lt = this._output.get_code(A);
|
|
1432
1473
|
return lt;
|
|
1433
1474
|
}, Pt.Beautifier = b, Pt;
|
|
1434
1475
|
}
|
|
1435
1476
|
var de;
|
|
1436
|
-
function
|
|
1477
|
+
function ci() {
|
|
1437
1478
|
if (de)
|
|
1438
1479
|
return nt;
|
|
1439
1480
|
de = 1;
|
|
1440
|
-
var t =
|
|
1441
|
-
function s(e,
|
|
1442
|
-
var r = new t(e,
|
|
1481
|
+
var t = fi().Beautifier, i = Me().Options;
|
|
1482
|
+
function s(e, n) {
|
|
1483
|
+
var r = new t(e, n);
|
|
1443
1484
|
return r.beautify();
|
|
1444
1485
|
}
|
|
1445
|
-
return
|
|
1486
|
+
return hi.exports = s, nt.defaultOptions = function() {
|
|
1446
1487
|
return new i();
|
|
1447
1488
|
}, nt;
|
|
1448
1489
|
}
|
|
1449
|
-
var at = {},
|
|
1490
|
+
var at = {}, di = {
|
|
1450
1491
|
get exports() {
|
|
1451
1492
|
return at;
|
|
1452
1493
|
},
|
|
1453
1494
|
set exports(t) {
|
|
1454
1495
|
at = t;
|
|
1455
1496
|
}
|
|
1456
|
-
},
|
|
1457
|
-
function
|
|
1497
|
+
}, jt = {}, Dt = {}, me;
|
|
1498
|
+
function Be() {
|
|
1458
1499
|
if (me)
|
|
1459
1500
|
return Dt;
|
|
1460
1501
|
me = 1;
|
|
@@ -1564,7 +1605,7 @@ function be() {
|
|
|
1564
1605
|
if (ge)
|
|
1565
1606
|
return ht;
|
|
1566
1607
|
ge = 1;
|
|
1567
|
-
var t = dt().Tokenizer, i = dt().TOKEN, s = Vt().Directives, e =
|
|
1608
|
+
var t = dt().Tokenizer, i = dt().TOKEN, s = Vt().Directives, e = Ie().TemplatablePattern, n = gt().Pattern, r = {
|
|
1568
1609
|
TAG_OPEN: "TK_TAG_OPEN",
|
|
1569
1610
|
TAG_CLOSE: "TK_TAG_CLOSE",
|
|
1570
1611
|
ATTRIBUTE: "TK_ATTRIBUTE",
|
|
@@ -1576,9 +1617,9 @@ function be() {
|
|
|
1576
1617
|
START: i.START,
|
|
1577
1618
|
RAW: i.RAW,
|
|
1578
1619
|
EOF: i.EOF
|
|
1579
|
-
}, u = new s(/<\!--/, /-->/), o = function(l,
|
|
1580
|
-
t.call(this, l,
|
|
1581
|
-
var x = new e(this._input).read_options(this._options), b = new
|
|
1620
|
+
}, u = new s(/<\!--/, /-->/), o = function(l, y) {
|
|
1621
|
+
t.call(this, l, y), this._current_tag_name = "";
|
|
1622
|
+
var x = new e(this._input).read_options(this._options), b = new n(this._input);
|
|
1582
1623
|
if (this.__patterns = {
|
|
1583
1624
|
word: x.until(/[\n\r\t <]/),
|
|
1584
1625
|
single_quote: x.until_after(/'/),
|
|
@@ -1595,86 +1636,86 @@ function be() {
|
|
|
1595
1636
|
conditional_comment: b.starting_with(/<!\[/).until_after(/]>/),
|
|
1596
1637
|
processing: b.starting_with(/<\?/).until_after(/\?>/)
|
|
1597
1638
|
}, this._options.indent_handlebars && (this.__patterns.word = this.__patterns.word.exclude("handlebars")), this._unformatted_content_delimiter = null, this._options.unformatted_content_delimiter) {
|
|
1598
|
-
var
|
|
1599
|
-
this.__patterns.unformatted_content_delimiter = b.matching(
|
|
1639
|
+
var v = this._input.get_literal_regexp(this._options.unformatted_content_delimiter);
|
|
1640
|
+
this.__patterns.unformatted_content_delimiter = b.matching(v).until_after(v);
|
|
1600
1641
|
}
|
|
1601
1642
|
};
|
|
1602
1643
|
return o.prototype = new t(), o.prototype._is_comment = function(l) {
|
|
1603
1644
|
return !1;
|
|
1604
1645
|
}, o.prototype._is_opening = function(l) {
|
|
1605
1646
|
return l.type === r.TAG_OPEN;
|
|
1606
|
-
}, o.prototype._is_closing = function(l,
|
|
1607
|
-
return l.type === r.TAG_CLOSE &&
|
|
1647
|
+
}, o.prototype._is_closing = function(l, y) {
|
|
1648
|
+
return l.type === r.TAG_CLOSE && y && ((l.text === ">" || l.text === "/>") && y.text[0] === "<" || l.text === "}}" && y.text[0] === "{" && y.text[1] === "{");
|
|
1608
1649
|
}, o.prototype._reset = function() {
|
|
1609
1650
|
this._current_tag_name = "";
|
|
1610
|
-
}, o.prototype._get_next_token = function(l,
|
|
1651
|
+
}, o.prototype._get_next_token = function(l, y) {
|
|
1611
1652
|
var x = null;
|
|
1612
1653
|
this._readWhitespace();
|
|
1613
1654
|
var b = this._input.peek();
|
|
1614
|
-
return b === null ? this._create_token(r.EOF, "") : (x = x || this._read_open_handlebars(b,
|
|
1655
|
+
return b === null ? this._create_token(r.EOF, "") : (x = x || this._read_open_handlebars(b, y), x = x || this._read_attribute(b, l, y), x = x || this._read_close(b, y), x = x || this._read_raw_content(b, l, y), x = x || this._read_content_word(b), x = x || this._read_comment_or_cdata(b), x = x || this._read_processing(b), x = x || this._read_open(b, y), x = x || this._create_token(r.UNKNOWN, this._input.next()), x);
|
|
1615
1656
|
}, o.prototype._read_comment_or_cdata = function(l) {
|
|
1616
|
-
var
|
|
1657
|
+
var y = null, x = null, b = null;
|
|
1617
1658
|
if (l === "<") {
|
|
1618
|
-
var
|
|
1619
|
-
|
|
1659
|
+
var v = this._input.peek(1);
|
|
1660
|
+
v === "!" && (x = this.__patterns.comment.read(), x ? (b = u.get_directives(x), b && b.ignore === "start" && (x += u.readIgnored(this._input))) : x = this.__patterns.cdata.read()), x && (y = this._create_token(r.COMMENT, x), y.directives = b);
|
|
1620
1661
|
}
|
|
1621
|
-
return
|
|
1662
|
+
return y;
|
|
1622
1663
|
}, o.prototype._read_processing = function(l) {
|
|
1623
|
-
var
|
|
1664
|
+
var y = null, x = null, b = null;
|
|
1624
1665
|
if (l === "<") {
|
|
1625
|
-
var
|
|
1626
|
-
(
|
|
1666
|
+
var v = this._input.peek(1);
|
|
1667
|
+
(v === "!" || v === "?") && (x = this.__patterns.conditional_comment.read(), x = x || this.__patterns.processing.read()), x && (y = this._create_token(r.COMMENT, x), y.directives = b);
|
|
1627
1668
|
}
|
|
1628
|
-
return
|
|
1629
|
-
}, o.prototype._read_open = function(l,
|
|
1669
|
+
return y;
|
|
1670
|
+
}, o.prototype._read_open = function(l, y) {
|
|
1630
1671
|
var x = null, b = null;
|
|
1631
|
-
return
|
|
1632
|
-
}, o.prototype._read_open_handlebars = function(l,
|
|
1672
|
+
return y || l === "<" && (x = this._input.next(), this._input.peek() === "/" && (x += this._input.next()), x += this.__patterns.element_name.read(), b = this._create_token(r.TAG_OPEN, x)), b;
|
|
1673
|
+
}, o.prototype._read_open_handlebars = function(l, y) {
|
|
1633
1674
|
var x = null, b = null;
|
|
1634
|
-
return
|
|
1635
|
-
}, o.prototype._read_close = function(l,
|
|
1675
|
+
return y || this._options.indent_handlebars && l === "{" && this._input.peek(1) === "{" && (this._input.peek(2) === "!" ? (x = this.__patterns.handlebars_comment.read(), x = x || this.__patterns.handlebars.read(), b = this._create_token(r.COMMENT, x)) : (x = this.__patterns.handlebars_open.read(), b = this._create_token(r.TAG_OPEN, x))), b;
|
|
1676
|
+
}, o.prototype._read_close = function(l, y) {
|
|
1636
1677
|
var x = null, b = null;
|
|
1637
|
-
return
|
|
1638
|
-
}, o.prototype._read_attribute = function(l,
|
|
1639
|
-
var b = null,
|
|
1678
|
+
return y && (y.text[0] === "<" && (l === ">" || l === "/" && this._input.peek(1) === ">") ? (x = this._input.next(), l === "/" && (x += this._input.next()), b = this._create_token(r.TAG_CLOSE, x)) : y.text[0] === "{" && l === "}" && this._input.peek(1) === "}" && (this._input.next(), this._input.next(), b = this._create_token(r.TAG_CLOSE, "}}"))), b;
|
|
1679
|
+
}, o.prototype._read_attribute = function(l, y, x) {
|
|
1680
|
+
var b = null, v = "";
|
|
1640
1681
|
if (x && x.text[0] === "<")
|
|
1641
1682
|
if (l === "=")
|
|
1642
1683
|
b = this._create_token(r.EQUALS, this._input.next());
|
|
1643
1684
|
else if (l === '"' || l === "'") {
|
|
1644
|
-
var
|
|
1645
|
-
l === '"' ?
|
|
1685
|
+
var A = this._input.next();
|
|
1686
|
+
l === '"' ? A += this.__patterns.double_quote.read() : A += this.__patterns.single_quote.read(), b = this._create_token(r.VALUE, A);
|
|
1646
1687
|
} else
|
|
1647
|
-
|
|
1688
|
+
v = this.__patterns.attribute.read(), v && (y.type === r.EQUALS ? b = this._create_token(r.VALUE, v) : b = this._create_token(r.ATTRIBUTE, v));
|
|
1648
1689
|
return b;
|
|
1649
1690
|
}, o.prototype._is_content_unformatted = function(l) {
|
|
1650
1691
|
return this._options.void_elements.indexOf(l) === -1 && (this._options.content_unformatted.indexOf(l) !== -1 || this._options.unformatted.indexOf(l) !== -1);
|
|
1651
|
-
}, o.prototype._read_raw_content = function(l,
|
|
1692
|
+
}, o.prototype._read_raw_content = function(l, y, x) {
|
|
1652
1693
|
var b = "";
|
|
1653
1694
|
if (x && x.text[0] === "{")
|
|
1654
1695
|
b = this.__patterns.handlebars_raw_close.read();
|
|
1655
|
-
else if (
|
|
1656
|
-
var
|
|
1657
|
-
if (
|
|
1658
|
-
var
|
|
1659
|
-
if (
|
|
1660
|
-
return
|
|
1661
|
-
b = this._input.readUntil(new RegExp("</" +
|
|
1696
|
+
else if (y.type === r.TAG_CLOSE && y.opened.text[0] === "<" && y.text[0] !== "/") {
|
|
1697
|
+
var v = y.opened.text.substr(1).toLowerCase();
|
|
1698
|
+
if (v === "script" || v === "style") {
|
|
1699
|
+
var A = this._read_comment_or_cdata(l);
|
|
1700
|
+
if (A)
|
|
1701
|
+
return A.type = r.TEXT, A;
|
|
1702
|
+
b = this._input.readUntil(new RegExp("</" + v + "[\\n\\r\\t ]*?>", "ig"));
|
|
1662
1703
|
} else
|
|
1663
|
-
this._is_content_unformatted(
|
|
1704
|
+
this._is_content_unformatted(v) && (b = this._input.readUntil(new RegExp("</" + v + "[\\n\\r\\t ]*?>", "ig")));
|
|
1664
1705
|
}
|
|
1665
1706
|
return b ? this._create_token(r.TEXT, b) : null;
|
|
1666
1707
|
}, o.prototype._read_content_word = function(l) {
|
|
1667
|
-
var
|
|
1668
|
-
if (this._options.unformatted_content_delimiter && l === this._options.unformatted_content_delimiter[0] && (
|
|
1669
|
-
return this._create_token(r.TEXT,
|
|
1708
|
+
var y = "";
|
|
1709
|
+
if (this._options.unformatted_content_delimiter && l === this._options.unformatted_content_delimiter[0] && (y = this.__patterns.unformatted_content_delimiter.read()), y || (y = this.__patterns.word.read()), y)
|
|
1710
|
+
return this._create_token(r.TEXT, y);
|
|
1670
1711
|
}, ht.Tokenizer = o, ht.TOKEN = r, ht;
|
|
1671
1712
|
}
|
|
1672
1713
|
var ve;
|
|
1673
|
-
function
|
|
1714
|
+
function mi() {
|
|
1674
1715
|
if (ve)
|
|
1675
|
-
return
|
|
1716
|
+
return jt;
|
|
1676
1717
|
ve = 1;
|
|
1677
|
-
var t =
|
|
1718
|
+
var t = Be().Options, i = Ut().Output, s = be().Tokenizer, e = be().TOKEN, n = /\r\n|[\r\n]/, r = /\r\n|[\r\n]/g, u = function(p, _) {
|
|
1678
1719
|
this.indent_level = 0, this.alignment_size = 0, this.max_preserve_newlines = p.max_preserve_newlines, this.preserve_newlines = p.preserve_newlines, this._output = new i(p, _);
|
|
1679
1720
|
};
|
|
1680
1721
|
u.prototype.current_line_has_match = function(p) {
|
|
@@ -1717,7 +1758,7 @@ function fi() {
|
|
|
1717
1758
|
var h = null, k = null;
|
|
1718
1759
|
return _.closed ? (p === "script" ? h = "text/javascript" : p === "style" && (h = "text/css"), h = o(_) || h, h.search("text/css") > -1 ? k = "css" : h.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/) > -1 ? k = "javascript" : h.search(/(text|application|dojo)\/(x-)?(html)/) > -1 ? k = "html" : h.search(/test\/null/) > -1 && (k = "null"), k) : null;
|
|
1719
1760
|
};
|
|
1720
|
-
function
|
|
1761
|
+
function y(p, _) {
|
|
1721
1762
|
return _.indexOf(p) !== -1;
|
|
1722
1763
|
}
|
|
1723
1764
|
function x(p, _, h) {
|
|
@@ -1750,74 +1791,74 @@ function fi() {
|
|
|
1750
1791
|
var _ = this._get_frame(p);
|
|
1751
1792
|
_ && (this._printer.indent_level = _.indent_level);
|
|
1752
1793
|
};
|
|
1753
|
-
function
|
|
1794
|
+
function v(p, _, h, k) {
|
|
1754
1795
|
this._source_text = p || "", _ = _ || {}, this._js_beautify = h, this._css_beautify = k, this._tag_stack = null;
|
|
1755
1796
|
var O = new t(_, "html");
|
|
1756
1797
|
this._options = O, this._is_wrap_attributes_force = this._options.wrap_attributes.substr(0, 5) === "force", this._is_wrap_attributes_force_expand_multiline = this._options.wrap_attributes === "force-expand-multiline", this._is_wrap_attributes_force_aligned = this._options.wrap_attributes === "force-aligned", this._is_wrap_attributes_aligned_multiple = this._options.wrap_attributes === "aligned-multiple", this._is_wrap_attributes_preserve = this._options.wrap_attributes.substr(0, 8) === "preserve", this._is_wrap_attributes_preserve_aligned = this._options.wrap_attributes === "preserve-aligned";
|
|
1757
1798
|
}
|
|
1758
|
-
|
|
1799
|
+
v.prototype.beautify = function() {
|
|
1759
1800
|
if (this._options.disabled)
|
|
1760
1801
|
return this._source_text;
|
|
1761
1802
|
var p = this._source_text, _ = this._options.eol;
|
|
1762
1803
|
this._options.eol === "auto" && (_ = `
|
|
1763
|
-
`, p &&
|
|
1804
|
+
`, p && n.test(p) && (_ = p.match(n)[0])), p = p.replace(r, `
|
|
1764
1805
|
`);
|
|
1765
1806
|
var h = p.match(/^[\t ]*/)[0], k = {
|
|
1766
1807
|
text: "",
|
|
1767
1808
|
type: ""
|
|
1768
|
-
}, O = new
|
|
1769
|
-
this._tag_stack = new b(
|
|
1809
|
+
}, O = new A(), S = new u(this._options, h), c = new s(p, this._options).tokenize();
|
|
1810
|
+
this._tag_stack = new b(S);
|
|
1770
1811
|
for (var g = null, f = c.next(); f.type !== e.EOF; )
|
|
1771
|
-
f.type === e.TAG_OPEN || f.type === e.COMMENT ? (g = this._handle_tag_open(
|
|
1772
|
-
var T =
|
|
1812
|
+
f.type === e.TAG_OPEN || f.type === e.COMMENT ? (g = this._handle_tag_open(S, f, O, k, c), O = g) : f.type === e.ATTRIBUTE || f.type === e.EQUALS || f.type === e.VALUE || f.type === e.TEXT && !O.tag_complete ? g = this._handle_inside_tag(S, f, O, k) : f.type === e.TAG_CLOSE ? g = this._handle_tag_close(S, f, O) : f.type === e.TEXT ? g = this._handle_text(S, f, O) : S.add_raw_token(f), k = g, f = c.next();
|
|
1813
|
+
var T = S._output.get_code(_);
|
|
1773
1814
|
return T;
|
|
1774
|
-
},
|
|
1815
|
+
}, v.prototype._handle_tag_close = function(p, _, h) {
|
|
1775
1816
|
var k = {
|
|
1776
1817
|
text: _.text,
|
|
1777
1818
|
type: _.type
|
|
1778
1819
|
};
|
|
1779
1820
|
return p.alignment_size = 0, h.tag_complete = !0, p.set_space_before_token(_.newlines || _.whitespace_before !== "", !0), h.is_unformatted ? p.add_raw_token(_) : (h.tag_start_char === "<" && (p.set_space_before_token(_.text[0] === "/", !0), this._is_wrap_attributes_force_expand_multiline && h.has_wrapped_attrs && p.print_newline(!1)), p.print_token(_)), h.indent_content && !(h.is_unformatted || h.is_content_unformatted) && (p.indent(), h.indent_content = !1), !h.is_inline_element && !(h.is_unformatted || h.is_content_unformatted) && p.set_wrap_point(), k;
|
|
1780
|
-
},
|
|
1781
|
-
var O = h.has_wrapped_attrs,
|
|
1821
|
+
}, v.prototype._handle_inside_tag = function(p, _, h, k) {
|
|
1822
|
+
var O = h.has_wrapped_attrs, S = {
|
|
1782
1823
|
text: _.text,
|
|
1783
1824
|
type: _.type
|
|
1784
1825
|
};
|
|
1785
1826
|
return p.set_space_before_token(_.newlines || _.whitespace_before !== "", !0), h.is_unformatted ? p.add_raw_token(_) : h.tag_start_char === "{" && _.type === e.TEXT ? p.print_preserved_newlines(_) ? (_.newlines = 0, p.add_raw_token(_)) : p.print_token(_) : (_.type === e.ATTRIBUTE ? p.set_space_before_token(!0) : (_.type === e.EQUALS || _.type === e.VALUE && _.previous.type === e.EQUALS) && p.set_space_before_token(!1), _.type === e.ATTRIBUTE && h.tag_start_char === "<" && ((this._is_wrap_attributes_preserve || this._is_wrap_attributes_preserve_aligned) && (p.traverse_whitespace(_), O = O || _.newlines !== 0), this._is_wrap_attributes_force && h.attr_count >= this._options.wrap_attributes_min_attrs && (k.type !== e.TAG_OPEN || // ie. second attribute and beyond
|
|
1786
|
-
this._is_wrap_attributes_force_expand_multiline) && (p.print_newline(!1), O = !0)), p.print_token(_), O = O || p.previous_token_wrapped(), h.has_wrapped_attrs = O),
|
|
1787
|
-
},
|
|
1827
|
+
this._is_wrap_attributes_force_expand_multiline) && (p.print_newline(!1), O = !0)), p.print_token(_), O = O || p.previous_token_wrapped(), h.has_wrapped_attrs = O), S;
|
|
1828
|
+
}, v.prototype._handle_text = function(p, _, h) {
|
|
1788
1829
|
var k = {
|
|
1789
1830
|
text: _.text,
|
|
1790
1831
|
type: "TK_CONTENT"
|
|
1791
1832
|
};
|
|
1792
1833
|
return h.custom_beautifier_name ? this._print_custom_beatifier_text(p, _, h) : h.is_unformatted || h.is_content_unformatted ? p.add_raw_token(_) : (p.traverse_whitespace(_), p.print_token(_)), k;
|
|
1793
|
-
},
|
|
1834
|
+
}, v.prototype._print_custom_beatifier_text = function(p, _, h) {
|
|
1794
1835
|
var k = this;
|
|
1795
1836
|
if (_.text !== "") {
|
|
1796
|
-
var O = _.text,
|
|
1797
|
-
h.custom_beautifier_name === "javascript" && typeof this._js_beautify == "function" ?
|
|
1798
|
-
var
|
|
1799
|
-
return
|
|
1837
|
+
var O = _.text, S, c = 1, g = "", f = "";
|
|
1838
|
+
h.custom_beautifier_name === "javascript" && typeof this._js_beautify == "function" ? S = this._js_beautify : h.custom_beautifier_name === "css" && typeof this._css_beautify == "function" ? S = this._css_beautify : h.custom_beautifier_name === "html" && (S = function(C, P) {
|
|
1839
|
+
var j = new v(C, P, k._js_beautify, k._css_beautify);
|
|
1840
|
+
return j.beautify();
|
|
1800
1841
|
}), this._options.indent_scripts === "keep" ? c = 0 : this._options.indent_scripts === "separate" && (c = -p.indent_level);
|
|
1801
1842
|
var T = p.get_full_indent(c);
|
|
1802
1843
|
if (O = O.replace(/\n[ \t]*$/, ""), h.custom_beautifier_name !== "html" && O[0] === "<" && O.match(/^(<!--|<!\[CDATA\[)/)) {
|
|
1803
|
-
var
|
|
1804
|
-
if (!
|
|
1844
|
+
var a = /^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(O);
|
|
1845
|
+
if (!a) {
|
|
1805
1846
|
p.add_raw_token(_);
|
|
1806
1847
|
return;
|
|
1807
1848
|
}
|
|
1808
|
-
g = T +
|
|
1809
|
-
`, O =
|
|
1810
|
-
`) !== -1) && (
|
|
1849
|
+
g = T + a[1] + `
|
|
1850
|
+
`, O = a[4], a[5] && (f = T + a[5]), O = O.replace(/\n[ \t]*$/, ""), (a[2] || a[3].indexOf(`
|
|
1851
|
+
`) !== -1) && (a = a[3].match(/[ \t]+$/), a && (_.whitespace_before = a[0]));
|
|
1811
1852
|
}
|
|
1812
1853
|
if (O)
|
|
1813
|
-
if (
|
|
1854
|
+
if (S) {
|
|
1814
1855
|
var d = function() {
|
|
1815
1856
|
this.eol = `
|
|
1816
1857
|
`;
|
|
1817
1858
|
};
|
|
1818
1859
|
d.prototype = this._options.raw_options;
|
|
1819
1860
|
var m = new d();
|
|
1820
|
-
O =
|
|
1861
|
+
O = S(T + O, m);
|
|
1821
1862
|
} else {
|
|
1822
1863
|
var R = _.whitespace_before;
|
|
1823
1864
|
R && (O = O.replace(new RegExp(`
|
|
@@ -1828,17 +1869,17 @@ function fi() {
|
|
|
1828
1869
|
g && (O ? O = g + O + `
|
|
1829
1870
|
` + f : O = g + f), p.print_newline(!1), O && (_.text = O, _.whitespace_before = "", _.newlines = 0, p.add_raw_token(_), p.print_newline(!0));
|
|
1830
1871
|
}
|
|
1831
|
-
},
|
|
1832
|
-
var
|
|
1833
|
-
if ((h.is_unformatted || h.is_content_unformatted) && !h.is_empty_element && _.type === e.TAG_OPEN && !
|
|
1872
|
+
}, v.prototype._handle_tag_open = function(p, _, h, k, O) {
|
|
1873
|
+
var S = this._get_tag_open_token(_);
|
|
1874
|
+
if ((h.is_unformatted || h.is_content_unformatted) && !h.is_empty_element && _.type === e.TAG_OPEN && !S.is_start_tag ? (p.add_raw_token(_), S.start_tag_token = this._tag_stack.try_pop(S.tag_name)) : (p.traverse_whitespace(_), this._set_tag_position(p, _, S, h, k), S.is_inline_element || p.set_wrap_point(), p.print_token(_)), S.is_start_tag && this._is_wrap_attributes_force) {
|
|
1834
1875
|
var c = 0, g;
|
|
1835
1876
|
do
|
|
1836
|
-
g = O.peek(c), g.type === e.ATTRIBUTE && (
|
|
1877
|
+
g = O.peek(c), g.type === e.ATTRIBUTE && (S.attr_count += 1), c += 1;
|
|
1837
1878
|
while (g.type !== e.EOF && g.type !== e.TAG_CLOSE);
|
|
1838
1879
|
}
|
|
1839
|
-
return (this._is_wrap_attributes_force_aligned || this._is_wrap_attributes_aligned_multiple || this._is_wrap_attributes_preserve_aligned) && (
|
|
1880
|
+
return (this._is_wrap_attributes_force_aligned || this._is_wrap_attributes_aligned_multiple || this._is_wrap_attributes_preserve_aligned) && (S.alignment_size = _.text.length + 1), !S.tag_complete && !S.is_unformatted && (p.alignment_size = S.alignment_size), S;
|
|
1840
1881
|
};
|
|
1841
|
-
var
|
|
1882
|
+
var A = function(p, _) {
|
|
1842
1883
|
if (this.parent = p || null, this.text = "", this.type = "TK_TAG_OPEN", this.tag_name = "", this.is_inline_element = !1, this.is_unformatted = !1, this.is_content_unformatted = !1, this.is_empty_element = !1, this.is_start_tag = !1, this.is_end_tag = !1, this.indent_content = !1, this.multiline_content = !1, this.custom_beautifier_name = null, this.start_tag_token = null, this.attr_count = 0, this.has_wrapped_attrs = !1, this.alignment_size = 0, this.tag_complete = !1, this.tag_start_char = "", this.tag_check = "", !_)
|
|
1843
1884
|
this.tag_complete = !0;
|
|
1844
1885
|
else {
|
|
@@ -1848,15 +1889,15 @@ function fi() {
|
|
|
1848
1889
|
this.tag_start_char === "{" && this.text.length >= 3 && this.text.charAt(2) === "~" && (k = 3), this.is_end_tag = this.is_end_tag || this.tag_start_char === "{" && (this.text.length < 3 || /[^#\^]/.test(this.text.charAt(k)));
|
|
1849
1890
|
}
|
|
1850
1891
|
};
|
|
1851
|
-
|
|
1852
|
-
var _ = new
|
|
1853
|
-
return _.alignment_size = this._options.wrap_attributes_indent_size, _.is_end_tag = _.is_end_tag ||
|
|
1854
|
-
},
|
|
1855
|
-
if (h.is_empty_element || (h.is_end_tag ? h.start_tag_token = this._tag_stack.try_pop(h.tag_name) : (this._do_optional_end_element(h) && (h.is_inline_element || p.print_newline(!1)), this._tag_stack.record_tag(h), (h.tag_name === "script" || h.tag_name === "style") && !(h.is_unformatted || h.is_content_unformatted) && (h.custom_beautifier_name = l(h.tag_check, _)))),
|
|
1892
|
+
v.prototype._get_tag_open_token = function(p) {
|
|
1893
|
+
var _ = new A(this._tag_stack.get_parser_token(), p);
|
|
1894
|
+
return _.alignment_size = this._options.wrap_attributes_indent_size, _.is_end_tag = _.is_end_tag || y(_.tag_check, this._options.void_elements), _.is_empty_element = _.tag_complete || _.is_start_tag && _.is_end_tag, _.is_unformatted = !_.tag_complete && y(_.tag_check, this._options.unformatted), _.is_content_unformatted = !_.is_empty_element && y(_.tag_check, this._options.content_unformatted), _.is_inline_element = y(_.tag_name, this._options.inline) || this._options.inline_custom_elements && _.tag_name.includes("-") || _.tag_start_char === "{", _;
|
|
1895
|
+
}, v.prototype._set_tag_position = function(p, _, h, k, O) {
|
|
1896
|
+
if (h.is_empty_element || (h.is_end_tag ? h.start_tag_token = this._tag_stack.try_pop(h.tag_name) : (this._do_optional_end_element(h) && (h.is_inline_element || p.print_newline(!1)), this._tag_stack.record_tag(h), (h.tag_name === "script" || h.tag_name === "style") && !(h.is_unformatted || h.is_content_unformatted) && (h.custom_beautifier_name = l(h.tag_check, _)))), y(h.tag_check, this._options.extra_liners) && (p.print_newline(!1), p._output.just_added_blankline() || p.print_newline(!0)), h.is_empty_element) {
|
|
1856
1897
|
if (h.tag_start_char === "{" && h.tag_check === "else") {
|
|
1857
1898
|
this._tag_stack.indent_to_tag(["if", "unless", "each"]), h.indent_content = !0;
|
|
1858
|
-
var
|
|
1859
|
-
|
|
1899
|
+
var S = p.current_line_has_match(/{{#if/);
|
|
1900
|
+
S || p.print_newline(!1);
|
|
1860
1901
|
}
|
|
1861
1902
|
h.tag_name === "!--" && O.type === e.TAG_CLOSE && k.is_end_tag && h.text.indexOf(`
|
|
1862
1903
|
`) === -1 || (h.is_inline_element || h.is_unformatted || p.print_newline(!1), this._calcluate_parent_multiline(p, h));
|
|
@@ -1865,11 +1906,11 @@ function fi() {
|
|
|
1865
1906
|
c = h.start_tag_token && h.start_tag_token.multiline_content, c = c || !h.is_inline_element && !(k.is_inline_element || k.is_unformatted) && !(O.type === e.TAG_CLOSE && h.start_tag_token === k) && O.type !== "TK_CONTENT", (h.is_content_unformatted || h.is_unformatted) && (c = !1), c && p.print_newline(!1);
|
|
1866
1907
|
} else
|
|
1867
1908
|
h.indent_content = !h.custom_beautifier_name, h.tag_start_char === "<" && (h.tag_name === "html" ? h.indent_content = this._options.indent_inner_html : h.tag_name === "head" ? h.indent_content = this._options.indent_head_inner_html : h.tag_name === "body" && (h.indent_content = this._options.indent_body_inner_html)), !(h.is_inline_element || h.is_unformatted) && (O.type !== "TK_CONTENT" || h.is_content_unformatted) && p.print_newline(!1), this._calcluate_parent_multiline(p, h);
|
|
1868
|
-
},
|
|
1909
|
+
}, v.prototype._calcluate_parent_multiline = function(p, _) {
|
|
1869
1910
|
_.parent && p._output.just_added_newline() && !((_.is_inline_element || _.is_unformatted) && _.parent.is_inline_element) && (_.parent.multiline_content = !0);
|
|
1870
1911
|
};
|
|
1871
|
-
var
|
|
1872
|
-
return
|
|
1912
|
+
var $ = ["address", "article", "aside", "blockquote", "details", "div", "dl", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hr", "main", "menu", "nav", "ol", "p", "pre", "section", "table", "ul"], N = ["a", "audio", "del", "ins", "map", "noscript", "video"];
|
|
1913
|
+
return v.prototype._do_optional_end_element = function(p) {
|
|
1873
1914
|
var _ = null;
|
|
1874
1915
|
if (!(p.is_empty_element || !p.is_start_tag || !p.parent)) {
|
|
1875
1916
|
if (p.tag_name === "body")
|
|
@@ -1878,52 +1919,52 @@ function fi() {
|
|
|
1878
1919
|
_ = _ || this._tag_stack.try_pop("li", ["ol", "ul", "menu"]);
|
|
1879
1920
|
else if (p.tag_name === "dd" || p.tag_name === "dt")
|
|
1880
1921
|
_ = _ || this._tag_stack.try_pop("dt", ["dl"]), _ = _ || this._tag_stack.try_pop("dd", ["dl"]);
|
|
1881
|
-
else if (p.parent.tag_name === "p" &&
|
|
1922
|
+
else if (p.parent.tag_name === "p" && $.indexOf(p.tag_name) !== -1) {
|
|
1882
1923
|
var h = p.parent.parent;
|
|
1883
|
-
(!h ||
|
|
1924
|
+
(!h || N.indexOf(h.tag_name) === -1) && (_ = _ || this._tag_stack.try_pop("p"));
|
|
1884
1925
|
} else
|
|
1885
1926
|
p.tag_name === "rp" || p.tag_name === "rt" ? (_ = _ || this._tag_stack.try_pop("rt", ["ruby", "rtc"]), _ = _ || this._tag_stack.try_pop("rp", ["ruby", "rtc"])) : p.tag_name === "optgroup" ? _ = _ || this._tag_stack.try_pop("optgroup", ["select"]) : p.tag_name === "option" ? _ = _ || this._tag_stack.try_pop("option", ["select", "datalist", "optgroup"]) : p.tag_name === "colgroup" ? _ = _ || this._tag_stack.try_pop("caption", ["table"]) : p.tag_name === "thead" ? (_ = _ || this._tag_stack.try_pop("caption", ["table"]), _ = _ || this._tag_stack.try_pop("colgroup", ["table"])) : p.tag_name === "tbody" || p.tag_name === "tfoot" ? (_ = _ || this._tag_stack.try_pop("caption", ["table"]), _ = _ || this._tag_stack.try_pop("colgroup", ["table"]), _ = _ || this._tag_stack.try_pop("thead", ["table"]), _ = _ || this._tag_stack.try_pop("tbody", ["table"])) : p.tag_name === "tr" ? (_ = _ || this._tag_stack.try_pop("caption", ["table"]), _ = _ || this._tag_stack.try_pop("colgroup", ["table"]), _ = _ || this._tag_stack.try_pop("tr", ["table", "thead", "tbody", "tfoot"])) : (p.tag_name === "th" || p.tag_name === "td") && (_ = _ || this._tag_stack.try_pop("td", ["table", "thead", "tbody", "tfoot", "tr"]), _ = _ || this._tag_stack.try_pop("th", ["table", "thead", "tbody", "tfoot", "tr"]));
|
|
1886
1927
|
return p.parent = this._tag_stack.get_parser_token(), _;
|
|
1887
1928
|
}
|
|
1888
|
-
},
|
|
1929
|
+
}, jt.Beautifier = v, jt;
|
|
1889
1930
|
}
|
|
1890
1931
|
var ye;
|
|
1891
|
-
function
|
|
1932
|
+
function gi() {
|
|
1892
1933
|
if (ye)
|
|
1893
1934
|
return at;
|
|
1894
1935
|
ye = 1;
|
|
1895
|
-
var t =
|
|
1896
|
-
function s(e,
|
|
1897
|
-
var o = new t(e,
|
|
1936
|
+
var t = mi().Beautifier, i = Be().Options;
|
|
1937
|
+
function s(e, n, r, u) {
|
|
1938
|
+
var o = new t(e, n, r, u);
|
|
1898
1939
|
return o.beautify();
|
|
1899
1940
|
}
|
|
1900
|
-
return
|
|
1941
|
+
return di.exports = s, at.defaultOptions = function() {
|
|
1901
1942
|
return new i();
|
|
1902
1943
|
}, at;
|
|
1903
1944
|
}
|
|
1904
1945
|
var xe;
|
|
1905
|
-
function
|
|
1946
|
+
function bi() {
|
|
1906
1947
|
if (xe)
|
|
1907
1948
|
return Z;
|
|
1908
1949
|
xe = 1;
|
|
1909
|
-
var t =
|
|
1910
|
-
function e(
|
|
1911
|
-
return u = u || t, o = o || i, s(
|
|
1950
|
+
var t = pi(), i = ci(), s = gi();
|
|
1951
|
+
function e(n, r, u, o) {
|
|
1952
|
+
return u = u || t, o = o || i, s(n, r, u, o);
|
|
1912
1953
|
}
|
|
1913
1954
|
return e.defaultOptions = s.defaultOptions, Z.js = t, Z.css = i, Z.html = e, Z;
|
|
1914
1955
|
}
|
|
1915
1956
|
(function(t) {
|
|
1916
|
-
function i(s, e,
|
|
1957
|
+
function i(s, e, n) {
|
|
1917
1958
|
var r = function(u, o) {
|
|
1918
1959
|
return s.js_beautify(u, o);
|
|
1919
1960
|
};
|
|
1920
|
-
return r.js = s.js_beautify, r.css = e.css_beautify, r.html =
|
|
1961
|
+
return r.js = s.js_beautify, r.css = e.css_beautify, r.html = n.html_beautify, r.js_beautify = s.js_beautify, r.css_beautify = e.css_beautify, r.html_beautify = n.html_beautify, r;
|
|
1921
1962
|
}
|
|
1922
1963
|
(function(s) {
|
|
1923
|
-
var e =
|
|
1964
|
+
var e = bi();
|
|
1924
1965
|
e.js_beautify = e.js, e.css_beautify = e.css, e.html_beautify = e.html, s.exports = i(e, e, e);
|
|
1925
1966
|
})(t);
|
|
1926
|
-
})(
|
|
1967
|
+
})(_i);
|
|
1927
1968
|
const It = {
|
|
1928
1969
|
html: {
|
|
1929
1970
|
indent_size: "2",
|
|
@@ -1992,14 +2033,14 @@ function ft(t, i) {
|
|
|
1992
2033
|
case q.javascript:
|
|
1993
2034
|
return it.js(i, It.js);
|
|
1994
2035
|
case q.json: {
|
|
1995
|
-
var s =
|
|
1996
|
-
return
|
|
2036
|
+
var s = Fe(i);
|
|
2037
|
+
return Mt(s) && i ? i : H(s, void 0, " ");
|
|
1997
2038
|
}
|
|
1998
2039
|
default:
|
|
1999
2040
|
return i;
|
|
2000
2041
|
}
|
|
2001
2042
|
}
|
|
2002
|
-
const
|
|
2043
|
+
const vi = (t) => t ? t.replace(/[A-Z]/g, function(i) {
|
|
2003
2044
|
return "-" + i.toLowerCase();
|
|
2004
2045
|
}) : "";
|
|
2005
2046
|
class W {
|
|
@@ -2010,74 +2051,74 @@ class W {
|
|
|
2010
2051
|
Y(this, "autoProp");
|
|
2011
2052
|
}
|
|
2012
2053
|
}
|
|
2013
|
-
const
|
|
2014
|
-
${t.cols.map((
|
|
2054
|
+
const yi = (t, i) => `<el-row ${U(t)}>
|
|
2055
|
+
${t.cols.map((n) => xi(n, i)).join("")}
|
|
2015
2056
|
</el-row>
|
|
2016
|
-
`,
|
|
2057
|
+
`, xi = (t, i) => {
|
|
2017
2058
|
const s = w.getOptions(t, "responsive");
|
|
2018
2059
|
["span", "xs", "sm", "md", "lg", "xl"].forEach((r) => {
|
|
2019
2060
|
let u = null;
|
|
2020
2061
|
const o = !!s, l = w.getOptions(t, r);
|
|
2021
2062
|
r == "span" ? u = o ? null : l : u = o ? l : null, w.setOrgOption(t, r, u);
|
|
2022
2063
|
}), delete t.options.responsive;
|
|
2023
|
-
const
|
|
2024
|
-
return bt(t, { wdName: "el-col", props:
|
|
2025
|
-
},
|
|
2064
|
+
const n = vt(t, i);
|
|
2065
|
+
return bt(t, { wdName: "el-col", props: n });
|
|
2066
|
+
}, wi = (t, i) => `<div class="table-container">
|
|
2026
2067
|
<table ${U(t, "table-layout")}>
|
|
2027
2068
|
<tbody>
|
|
2028
|
-
${t.rows.map((
|
|
2069
|
+
${t.rows.map((n) => Oi(n, i)).join("")}
|
|
2029
2070
|
</tbody>
|
|
2030
2071
|
</table>
|
|
2031
|
-
</div>`,
|
|
2072
|
+
</div>`, Oi = (t, i) => `<tr>${t.cols.filter((s) => !s.merged).map((s) => Ti(s, i)).join("")}</tr>`, Ti = (t, i) => {
|
|
2032
2073
|
const s = t.options, e = U(t);
|
|
2033
2074
|
["colspan", "rowspan"].forEach((o) => {
|
|
2034
2075
|
let l = w.getOptions(t, o);
|
|
2035
|
-
const
|
|
2036
|
-
w.setOptions(t, o, String(
|
|
2076
|
+
const y = Ge(l) && !isNaN(l) && l !== 1 ? l : "";
|
|
2077
|
+
w.setOptions(t, o, String(y));
|
|
2037
2078
|
}), delete t.options.name;
|
|
2038
2079
|
const r = vt(t, i);
|
|
2039
2080
|
let u = [];
|
|
2040
2081
|
return s.cellWidth && u.push("width: " + s.cellWidth + " !important"), s.cellHeight && u.push("height: " + s.cellHeight + " !important"), bt(t, { wdName: "td", props: r, classAttr: e, styleArray: u });
|
|
2041
|
-
},
|
|
2042
|
-
const s = U(t), e = t.tabs && t.tabs.length > 0 ? `v-model="${w.getName(t)}ActiveTab"` : "",
|
|
2082
|
+
}, Ei = (t, i) => {
|
|
2083
|
+
const s = U(t), e = t.tabs && t.tabs.length > 0 ? `v-model="${w.getName(t)}ActiveTab"` : "", n = vt(t, i);
|
|
2043
2084
|
return `
|
|
2044
|
-
<el-tabs ${e} type="${t.displayType}" ${
|
|
2085
|
+
<el-tabs ${e} type="${t.displayType}" ${n} ${s}>
|
|
2045
2086
|
${t.tabs.map((u) => {
|
|
2046
|
-
const o = w.getOptions(u, "disabled"), l = w.getOptions(u, "name"),
|
|
2087
|
+
const o = w.getOptions(u, "disabled"), l = w.getOptions(u, "name"), y = w.getOptions(u, "label");
|
|
2047
2088
|
return `
|
|
2048
|
-
<el-tab-pane name="${l}" label="${
|
|
2089
|
+
<el-tab-pane name="${l}" label="${y}" ${o === !0 ? "disabled" : ""}>
|
|
2049
2090
|
${X(u.widgetList)}
|
|
2050
2091
|
</el-tab-pane>
|
|
2051
2092
|
`;
|
|
2052
2093
|
}).join("")}
|
|
2053
2094
|
</el-tabs>
|
|
2054
2095
|
`;
|
|
2055
|
-
},
|
|
2056
|
-
var
|
|
2096
|
+
}, ki = (t) => {
|
|
2097
|
+
var n;
|
|
2057
2098
|
const { slots: i } = mt(t, void 0, { s_slots: !0 });
|
|
2058
2099
|
var s = [
|
|
2059
2100
|
D("header", w.getOptions(t, "label")),
|
|
2060
|
-
D("default", X((
|
|
2101
|
+
D("default", X((n = Ae(i.value, "default")) == null ? void 0 : n.widgetList), !0)
|
|
2061
2102
|
];
|
|
2062
2103
|
let e = {
|
|
2063
2104
|
exContent: s.join("")
|
|
2064
2105
|
};
|
|
2065
|
-
return
|
|
2066
|
-
},
|
|
2067
|
-
const i = w.getOptions(t, "label"), s = w.getOptions(t, "labelTooltip"), e = w.getOptions(t, "labelIconClass"),
|
|
2106
|
+
return B(t, e);
|
|
2107
|
+
}, Ri = (t) => {
|
|
2108
|
+
const i = w.getOptions(t, "label"), s = w.getOptions(t, "labelTooltip"), e = w.getOptions(t, "labelIconClass"), n = w.getOptions(t, "labelIconPosition");
|
|
2068
2109
|
if (!s && !e)
|
|
2069
2110
|
return i;
|
|
2070
|
-
let r = F(e, '<i class="', '"></i>'), u = F(r, `<el-tooltip content="${s}" effect="light">`, "</el-tooltip>"), o = `${
|
|
2111
|
+
let r = F(e, '<i class="', '"></i>'), u = F(r, `<el-tooltip content="${s}" effect="light">`, "</el-tooltip>"), o = `${n === Jt.rear ? i : ""}${u}${n === Jt.front ? i : ""}`;
|
|
2071
2112
|
return o ? F(o, "<template #label>", "</template>") : i;
|
|
2072
|
-
},
|
|
2113
|
+
}, Ai = (t, i) => {
|
|
2073
2114
|
var o;
|
|
2074
|
-
const s = U(t), e = w.getOptions(t, "modelName") || w.getName(t),
|
|
2115
|
+
const s = U(t), e = w.getOptions(t, "modelName") || w.getName(t), n = t.widgetList && t.widgetList.length > 0 ? `:model="${e}"` : "", r = vt(t, {});
|
|
2075
2116
|
return `
|
|
2076
|
-
<el-form ${
|
|
2117
|
+
<el-form ${n} ${r} ${s}>
|
|
2077
2118
|
${(o = t.widgetList) == null ? void 0 : o.map((l) => {
|
|
2078
|
-
const
|
|
2119
|
+
const y = w.getOptions(l, "labelHidden"), x = w.getOptions(l, "label"), b = w.getOptions(l, "labelWidth"), v = w.getOptions(l, "labelPosition"), A = y ? "" : x, $ = y ? 'label-width="0"' : b ? `label-width="${b}"` : "", N = !y && v ? `label-position="${v}"` : "", p = Ri(l);
|
|
2079
2120
|
let _ = X([l], i);
|
|
2080
|
-
const h = ` prop="${w.getName(t)}"`, k = `<el-form-item label="${
|
|
2121
|
+
const h = ` prop="${w.getName(t)}"`, k = `<el-form-item label="${A}" ${$} ${N} ${s} ${h}>
|
|
2081
2122
|
${p}
|
|
2082
2123
|
${_}
|
|
2083
2124
|
</el-form-item>`;
|
|
@@ -2085,79 +2126,79 @@ const gi = (t, i) => `<el-row ${U(t)}>
|
|
|
2085
2126
|
}).join("")}
|
|
2086
2127
|
</el-form>
|
|
2087
2128
|
`;
|
|
2088
|
-
},
|
|
2129
|
+
}, Si = (t) => {
|
|
2089
2130
|
var s;
|
|
2090
|
-
const i =
|
|
2131
|
+
const i = Re((s = _t(t)) == null ? void 0 : s.map((e) => t[e] ? `${e}:${t[e]}` : ""), ";");
|
|
2091
2132
|
return i ? `style="${i}"` : "";
|
|
2092
|
-
},
|
|
2133
|
+
}, Ci = (t) => {
|
|
2093
2134
|
var s;
|
|
2094
|
-
return
|
|
2095
|
-
},
|
|
2096
|
-
var b,
|
|
2097
|
-
const i = t, s = `${
|
|
2098
|
-
return
|
|
2099
|
-
<${
|
|
2100
|
-
${(
|
|
2101
|
-
${bt(
|
|
2102
|
-
</${
|
|
2135
|
+
return Re((s = _t(t)) == null ? void 0 : s.map((e) => t[e] ? `${e}="${t[e]}"` : ""), " ");
|
|
2136
|
+
}, $i = (t) => `${t.cols.map((s) => Ft(s)).join("")}`, Ft = (t) => {
|
|
2137
|
+
var b, v;
|
|
2138
|
+
const i = t, s = `${I.getValue(i.partName)}`, e = `${I.getValue(i.direction)}`, n = `${I.getValue(i.cellWidth)}`, r = `${I.getValue(i.cellHeight)}`, u = U({ type: E.contCell, options: i }), o = { width: n, height: r }, l = { direction: e }, y = `el-${s}`;
|
|
2139
|
+
return y ? `
|
|
2140
|
+
<${y} ${u} ${Ci(l)} ${Si(o)}>
|
|
2141
|
+
${(v = (b = t == null ? void 0 : t.children) == null ? void 0 : b.map((A) => Ft(A))) == null ? void 0 : v.join("")}
|
|
2142
|
+
${bt(Bt(t))}
|
|
2143
|
+
</${y}>
|
|
2103
2144
|
` : "";
|
|
2104
|
-
},
|
|
2145
|
+
}, Ni = (t, i) => B(t, {
|
|
2105
2146
|
tag: "el-input",
|
|
2106
2147
|
exProp: 'type="textarea"'
|
|
2107
|
-
}, i),
|
|
2108
|
-
const s = G(t, i), e =
|
|
2148
|
+
}, i), Pi = (t, i) => {
|
|
2149
|
+
const s = G(t, i), e = Li(t);
|
|
2109
2150
|
return `<el-radio-group ${s}>${e}</el-radio-group>`;
|
|
2110
2151
|
};
|
|
2111
|
-
function
|
|
2112
|
-
const i = w.getOptions(t, "buttonStyle") ? "el-radio-button" : "el-radio", s = w.getOptions(t, "border") ? "border" : "", e = `style="display: ${w.getOptions(t, "displayStyle")}"`,
|
|
2113
|
-
return
|
|
2152
|
+
function Li(t) {
|
|
2153
|
+
const i = w.getOptions(t, "buttonStyle") ? "el-radio-button" : "el-radio", s = w.getOptions(t, "border") ? "border" : "", e = `style="display: ${w.getOptions(t, "displayStyle")}"`, n = new W();
|
|
2154
|
+
return n.tag = i, n.autoProp = !1, n.exContent = "{{item.label}}", n.exProp = [
|
|
2114
2155
|
s,
|
|
2115
2156
|
e,
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
].join(" "), K(t,
|
|
2157
|
+
L("item.value", ":label"),
|
|
2158
|
+
L(w.getOptions(t, "disabled") ? "true" : "item.disabled", ":disabled"),
|
|
2159
|
+
L(w.getOptions(t, "border") ? "true" : "item.border", ":border")
|
|
2160
|
+
].join(" "), K(t, n);
|
|
2120
2161
|
}
|
|
2121
|
-
const
|
|
2122
|
-
const s = G(t, i), e =
|
|
2162
|
+
const ji = (t, i) => {
|
|
2163
|
+
const s = G(t, i), e = Di(t);
|
|
2123
2164
|
return `<el-checkbox-group ${s}>${e}</el-checkbox-group>`;
|
|
2124
2165
|
};
|
|
2125
|
-
function
|
|
2126
|
-
const i = w.getOptions(t, "buttonStyle") ? "el-checkbox-button" : "el-checkbox", s = w.getOptions(t, "border") ? "border" : "", e = `style="display: ${w.getOptions(t, "displayStyle")}"`,
|
|
2127
|
-
return
|
|
2166
|
+
function Di(t) {
|
|
2167
|
+
const i = w.getOptions(t, "buttonStyle") ? "el-checkbox-button" : "el-checkbox", s = w.getOptions(t, "border") ? "border" : "", e = `style="display: ${w.getOptions(t, "displayStyle")}"`, n = new W();
|
|
2168
|
+
return n.tag = i, n.autoProp = !1, n.exContent = "{{item.label}}", n.exProp = [
|
|
2128
2169
|
s,
|
|
2129
2170
|
e,
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
].join(" "), K(t,
|
|
2171
|
+
L("item.value", ":label"),
|
|
2172
|
+
L(w.getOptions(t, "disabled") ? "true" : "item.disabled", ":disabled"),
|
|
2173
|
+
L(w.getOptions(t, "border") ? "true" : "item.border", ":border")
|
|
2174
|
+
].join(" "), K(t, n);
|
|
2134
2175
|
}
|
|
2135
|
-
const
|
|
2136
|
-
const s = G(t, i), e =
|
|
2137
|
-
var
|
|
2176
|
+
const Ii = (t, i) => {
|
|
2177
|
+
const s = G(t, i), e = Mi(t);
|
|
2178
|
+
var n = [
|
|
2138
2179
|
D("prefix", w.getOptions(t, "slotPrefix"))
|
|
2139
2180
|
];
|
|
2140
|
-
return `<el-select ${s}>${e}${
|
|
2181
|
+
return `<el-select ${s}>${e}${n.join("")}</el-select>`;
|
|
2141
2182
|
};
|
|
2142
|
-
function
|
|
2183
|
+
function Mi(t) {
|
|
2143
2184
|
var i = w.getOptions(t, J.optionItems);
|
|
2144
2185
|
return i != null && i.length ? i.some((s) => {
|
|
2145
2186
|
var e;
|
|
2146
2187
|
return ((e = s.children) == null ? void 0 : e.length) > 0;
|
|
2147
|
-
}) ?
|
|
2188
|
+
}) ? Wi(t) : Bi(t) : "";
|
|
2148
2189
|
}
|
|
2149
|
-
function
|
|
2190
|
+
function Bi(t) {
|
|
2150
2191
|
const i = "el-option", s = new W();
|
|
2151
2192
|
return s.tag = i, s.autoProp = !0, K(t, s);
|
|
2152
2193
|
}
|
|
2153
|
-
function
|
|
2194
|
+
function Wi(t) {
|
|
2154
2195
|
var i = w.getOptions(t, J.optionItems);
|
|
2155
2196
|
if (!(i != null && i.length))
|
|
2156
2197
|
return "";
|
|
2157
|
-
var s = i == null ? void 0 : i.map((e) =>
|
|
2198
|
+
var s = i == null ? void 0 : i.map((e) => Ki(e));
|
|
2158
2199
|
return s == null ? void 0 : s.join("");
|
|
2159
2200
|
}
|
|
2160
|
-
function
|
|
2201
|
+
function Ki(t) {
|
|
2161
2202
|
var s;
|
|
2162
2203
|
if (((s = t == null ? void 0 : t.children) == null ? void 0 : s.length) > 0) {
|
|
2163
2204
|
var i = "el-option-group";
|
|
@@ -2169,91 +2210,91 @@ function Bi(t) {
|
|
|
2169
2210
|
}
|
|
2170
2211
|
function we(t) {
|
|
2171
2212
|
var i = [
|
|
2172
|
-
|
|
2173
|
-
|
|
2213
|
+
L(t.value, "value"),
|
|
2214
|
+
L(t.label, "label")
|
|
2174
2215
|
];
|
|
2175
2216
|
return `
|
|
2176
2217
|
<el-option ${i}></el-option>
|
|
2177
2218
|
`;
|
|
2178
2219
|
}
|
|
2179
|
-
const
|
|
2220
|
+
const Ui = (t, i) => {
|
|
2180
2221
|
const s = U(t, "");
|
|
2181
2222
|
var e = w.getOptions(t, J.optionItems);
|
|
2182
|
-
const
|
|
2223
|
+
const n = G(t, i);
|
|
2183
2224
|
return `
|
|
2184
|
-
<el-table ${s} ${
|
|
2185
|
-
${e == null ? void 0 : e.map((u) =>
|
|
2225
|
+
<el-table ${s} ${n}>
|
|
2226
|
+
${e == null ? void 0 : e.map((u) => We(u, i)).join("")}
|
|
2186
2227
|
</el-table>
|
|
2187
2228
|
`;
|
|
2188
|
-
},
|
|
2189
|
-
var l,
|
|
2229
|
+
}, We = (t, i) => {
|
|
2230
|
+
var l, y;
|
|
2190
2231
|
const s = Oe(t);
|
|
2191
2232
|
delete s.children;
|
|
2192
|
-
const e =
|
|
2233
|
+
const e = Bt({ type: E.eltableCol, options: s }), n = G(e, i), { slots: r } = mt(e, void 0, { s_slots: !0 });
|
|
2193
2234
|
var u = [
|
|
2194
|
-
D("default", X((l =
|
|
2235
|
+
D("default", X((l = Ae(r.value, "default")) == null ? void 0 : l.widgetList), !1)
|
|
2195
2236
|
];
|
|
2196
2237
|
return `
|
|
2197
|
-
<el-table-column ${
|
|
2198
|
-
${((
|
|
2238
|
+
<el-table-column ${n}>
|
|
2239
|
+
${((y = t == null ? void 0 : t.children) == null ? void 0 : y.map((x) => We(x, i))) || ""}
|
|
2199
2240
|
${u}
|
|
2200
2241
|
</el-table-column>
|
|
2201
2242
|
`;
|
|
2202
|
-
},
|
|
2203
|
-
const { pictureUploadIconChild: s, uploadTipSlotChild: e } = yt(t),
|
|
2243
|
+
}, zi = (t, i) => {
|
|
2244
|
+
const { pictureUploadIconChild: s, uploadTipSlotChild: e } = yt(t), n = G(t, i);
|
|
2204
2245
|
let r = t.options, u = r == null ? void 0 : r.name;
|
|
2205
2246
|
return `<el-upload
|
|
2206
2247
|
:file-list="${u}FileList"
|
|
2207
2248
|
:headers="${u}UploadHeaders"
|
|
2208
2249
|
:data="${u}UploadData"
|
|
2209
2250
|
list-type="picture-card"
|
|
2210
|
-
${
|
|
2251
|
+
${n}>
|
|
2211
2252
|
${D(rt.tip, e)}
|
|
2212
2253
|
${D(rt.default, s)}
|
|
2213
2254
|
</el-upload>`;
|
|
2214
|
-
},
|
|
2215
|
-
const { fileUploadIconChild: s, uploadTipSlotChild: e } = yt(t),
|
|
2255
|
+
}, qi = (t, i) => {
|
|
2256
|
+
const { fileUploadIconChild: s, uploadTipSlotChild: e } = yt(t), n = G(t, i);
|
|
2216
2257
|
let r = t.options, u = r == null ? void 0 : r.name;
|
|
2217
2258
|
return `<el-upload
|
|
2218
2259
|
:file-list="${u}FileList"
|
|
2219
2260
|
:headers="${u}UploadHeaders"
|
|
2220
2261
|
:data="${u}UploadData"
|
|
2221
2262
|
list-type="picture-card"
|
|
2222
|
-
${
|
|
2263
|
+
${n}>
|
|
2223
2264
|
${D(rt.tip, e)}
|
|
2224
2265
|
${D(rt.default, s)}
|
|
2225
2266
|
</el-upload>`;
|
|
2226
|
-
},
|
|
2267
|
+
}, Vi = (t) => B(t, {
|
|
2227
2268
|
tag: "vue-editor"
|
|
2228
|
-
}),
|
|
2269
|
+
}), Fi = (t) => {
|
|
2229
2270
|
let i = t.options;
|
|
2230
2271
|
var s = ["checkStrictly", "multiple", "expandTrigger", "lazy", "emitPath", "hoverThreshold"], e = {};
|
|
2231
2272
|
s.forEach((r) => {
|
|
2232
2273
|
(i == null ? void 0 : i[r]) !== void 0 && (e[r] = i == null ? void 0 : i[r]);
|
|
2233
2274
|
});
|
|
2234
|
-
let
|
|
2275
|
+
let n = {
|
|
2235
2276
|
exProp: [
|
|
2236
2277
|
`:options="${w.getOptions(t, "name")}Options"`,
|
|
2237
2278
|
`:props="${H(e).replaceAll('"', "'")}"`
|
|
2238
2279
|
].join(" ")
|
|
2239
2280
|
};
|
|
2240
|
-
return
|
|
2241
|
-
},
|
|
2281
|
+
return B(t, n);
|
|
2282
|
+
}, Xi = (t) => {
|
|
2242
2283
|
var i = Oe(t);
|
|
2243
2284
|
const { linkPrefixIcon: s, linkSuffixIcon: e } = yt(i);
|
|
2244
|
-
return
|
|
2245
|
-
},
|
|
2285
|
+
return I.getValue(i.defalut) || I.setValue(i, "default", ` ${s}${w.getOptions(t, "content")}${e}`), B(i);
|
|
2286
|
+
}, Gi = (t) => {
|
|
2246
2287
|
var e;
|
|
2247
2288
|
let i = t.options, s = {
|
|
2248
2289
|
// exContent: arr.join(''),
|
|
2249
|
-
exProp: `:preview-src-list=${H((e =
|
|
2290
|
+
exProp: `:preview-src-list=${H((e = I.getValue(i.optionItems)) == null ? void 0 : e.map((n) => n.label))}`
|
|
2250
2291
|
};
|
|
2251
|
-
return
|
|
2252
|
-
},
|
|
2292
|
+
return B(t, s);
|
|
2293
|
+
}, Qi = (t) => {
|
|
2253
2294
|
const i = w.getOptions(t, "label"), s = U(t, "");
|
|
2254
2295
|
return `<router-view name="${i}" :key="$route.fullPath" ${s}></router-view>`;
|
|
2255
2296
|
};
|
|
2256
|
-
function
|
|
2297
|
+
function Hi(t) {
|
|
2257
2298
|
const i = ot(t);
|
|
2258
2299
|
var s = [
|
|
2259
2300
|
'<div v-html="item?.content"></div>'
|
|
@@ -2261,32 +2302,32 @@ function Xi(t) {
|
|
|
2261
2302
|
V("name", "item?.name"),
|
|
2262
2303
|
V("label", "item?.label")
|
|
2263
2304
|
];
|
|
2264
|
-
const
|
|
2265
|
-
return
|
|
2305
|
+
const n = new W();
|
|
2306
|
+
return n.tag = i, n.autoProp = !1, n.exContent = s.join(""), n.exProp = e.join(""), K(t, n);
|
|
2266
2307
|
}
|
|
2267
|
-
const
|
|
2308
|
+
const Ji = (t) => {
|
|
2268
2309
|
t.options;
|
|
2269
|
-
const i =
|
|
2310
|
+
const i = Yi(t);
|
|
2270
2311
|
var e = [
|
|
2271
2312
|
`<div v-html="${w.getOptions(t, "label")}"></div>`,
|
|
2272
2313
|
D("dropdown", i)
|
|
2273
2314
|
];
|
|
2274
|
-
let
|
|
2315
|
+
let n = {
|
|
2275
2316
|
exContent: e.join("")
|
|
2276
2317
|
};
|
|
2277
|
-
return
|
|
2318
|
+
return B(t, n);
|
|
2278
2319
|
};
|
|
2279
|
-
function
|
|
2320
|
+
function Yi(t) {
|
|
2280
2321
|
const i = ot(t);
|
|
2281
2322
|
var s = [
|
|
2282
2323
|
"{{item.label}}"
|
|
2283
2324
|
], e = [
|
|
2284
2325
|
'v-bind="item"'
|
|
2285
2326
|
];
|
|
2286
|
-
const
|
|
2287
|
-
return
|
|
2327
|
+
const n = new W();
|
|
2328
|
+
return n.tag = i, n.autoProp = !1, n.exContent = s.join(""), n.exProp = e.join(""), K(t, n);
|
|
2288
2329
|
}
|
|
2289
|
-
function
|
|
2330
|
+
function Zi(t) {
|
|
2290
2331
|
const i = ot(t);
|
|
2291
2332
|
var s = [
|
|
2292
2333
|
D("title", '<span v-html="item?.label"></span>'),
|
|
@@ -2295,22 +2336,22 @@ function Hi(t) {
|
|
|
2295
2336
|
'v-bind="item"',
|
|
2296
2337
|
V("name", "item?.value")
|
|
2297
2338
|
];
|
|
2298
|
-
const
|
|
2299
|
-
return
|
|
2339
|
+
const n = new W();
|
|
2340
|
+
return n.tag = i, n.autoProp = !1, n.exContent = s.join(""), n.exProp = e.join(""), K(t, n);
|
|
2300
2341
|
}
|
|
2301
|
-
const
|
|
2302
|
-
const i =
|
|
2303
|
-
var
|
|
2342
|
+
const ts = (t) => {
|
|
2343
|
+
const i = es(t), s = w.getOptions(t, "title"), e = w.getOptions(t, "extra");
|
|
2344
|
+
var n = [
|
|
2304
2345
|
D("title", `${s}`),
|
|
2305
2346
|
D("extra", `${e}`),
|
|
2306
2347
|
i
|
|
2307
2348
|
];
|
|
2308
2349
|
let r = {
|
|
2309
|
-
exContent:
|
|
2350
|
+
exContent: n.join("")
|
|
2310
2351
|
};
|
|
2311
|
-
return
|
|
2352
|
+
return B(t, r);
|
|
2312
2353
|
};
|
|
2313
|
-
function
|
|
2354
|
+
function es(t) {
|
|
2314
2355
|
const i = ot(t);
|
|
2315
2356
|
var s = [
|
|
2316
2357
|
'<div v-html="item?.content"></div>',
|
|
@@ -2319,7 +2360,7 @@ function Yi(t) {
|
|
|
2319
2360
|
const e = new W();
|
|
2320
2361
|
return e.tag = i, e.autoProp = !0, e.exContent = s.join(""), K(t, e);
|
|
2321
2362
|
}
|
|
2322
|
-
function
|
|
2363
|
+
function is(t) {
|
|
2323
2364
|
const i = ot(t);
|
|
2324
2365
|
var s = [
|
|
2325
2366
|
`<a :href="item.to" :target="item.replace===true?'_self':'_blank'">{{ item.label }}</a>`
|
|
@@ -2327,23 +2368,23 @@ function Zi(t) {
|
|
|
2327
2368
|
const e = new W();
|
|
2328
2369
|
return e.tag = i, e.autoProp = !1, e.exContent = s.join(""), K(t, e);
|
|
2329
2370
|
}
|
|
2330
|
-
function
|
|
2371
|
+
function Ke(t) {
|
|
2331
2372
|
if (!(t != null && t.length))
|
|
2332
2373
|
return "";
|
|
2333
|
-
var i = t == null ? void 0 : t.map((s) =>
|
|
2374
|
+
var i = t == null ? void 0 : t.map((s) => ss(s));
|
|
2334
2375
|
return i == null ? void 0 : i.join("");
|
|
2335
2376
|
}
|
|
2336
|
-
function
|
|
2377
|
+
function ss(t) {
|
|
2337
2378
|
var s;
|
|
2338
2379
|
if (t != null && t.children && ((s = t == null ? void 0 : t.children) == null ? void 0 : s.length) > 0) {
|
|
2339
|
-
var i = (t == null ? void 0 : t.menuItemType) ===
|
|
2380
|
+
var i = (t == null ? void 0 : t.menuItemType) === ti.MenuItemGroup ? "el-menu-item-group" : "el-sub-menu";
|
|
2340
2381
|
return `
|
|
2341
|
-
<${i}>${
|
|
2382
|
+
<${i}>${Ke(t.children)}</${i}>
|
|
2342
2383
|
`;
|
|
2343
2384
|
} else
|
|
2344
|
-
return
|
|
2385
|
+
return ns(t);
|
|
2345
2386
|
}
|
|
2346
|
-
function
|
|
2387
|
+
function ns(t) {
|
|
2347
2388
|
return `
|
|
2348
2389
|
<el-menu-item>
|
|
2349
2390
|
<template #title>
|
|
@@ -2352,7 +2393,7 @@ function es(t) {
|
|
|
2352
2393
|
</el-menu-item>
|
|
2353
2394
|
`;
|
|
2354
2395
|
}
|
|
2355
|
-
function
|
|
2396
|
+
function as(t) {
|
|
2356
2397
|
const i = "el-step";
|
|
2357
2398
|
var s = [
|
|
2358
2399
|
D("title", "{{item.label}}"),
|
|
@@ -2361,29 +2402,29 @@ function is(t) {
|
|
|
2361
2402
|
], e = [
|
|
2362
2403
|
V("status", "item?.status")
|
|
2363
2404
|
];
|
|
2364
|
-
const
|
|
2365
|
-
return
|
|
2405
|
+
const n = new W();
|
|
2406
|
+
return n.tag = i, n.autoProp = !1, n.exContent = s.join(""), n.exProp = e.join(""), K(t, n);
|
|
2366
2407
|
}
|
|
2367
|
-
const
|
|
2408
|
+
const _s = (t) => B(t, { tag: "div", exContent: w.getOptions(t, "content"), autoProp: !1 }), rs = (t) => {
|
|
2368
2409
|
var i = t == null ? void 0 : t.options;
|
|
2369
2410
|
return i == null ? void 0 : i.content;
|
|
2370
|
-
},
|
|
2371
|
-
var
|
|
2372
|
-
const e = i == null ? void 0 : i.exContent,
|
|
2373
|
-
let l = u !== !1 ? (p = (
|
|
2411
|
+
}, os = (t, i) => B(t, void 0, i), B = (t, i, s) => {
|
|
2412
|
+
var N, p, _;
|
|
2413
|
+
const e = i == null ? void 0 : i.exContent, n = i == null ? void 0 : i.tag, r = i == null ? void 0 : i.exProp, u = i == null ? void 0 : i.autoProp, o = Xt(t, s);
|
|
2414
|
+
let l = u !== !1 ? (p = (N = Object.values(o)) == null ? void 0 : N.filter((h) => !!h)) == null ? void 0 : p.join(" ") : "";
|
|
2374
2415
|
l = [r || "", l || ""].join(" ");
|
|
2375
|
-
const
|
|
2416
|
+
const y = w.getOptions(t, "content"), x = w.getOptions(t, "label"), { originSlots: b } = mt(t, void 0, { s_slots: !0 }), v = (_ = b.value) == null ? void 0 : _.map((h) => {
|
|
2376
2417
|
var k;
|
|
2377
|
-
return ((k = h == null ? void 0 : h.widgetList) == null ? void 0 : k.length) > 0 ? bt(h, { wdName: "template", props: `#${h == null ? void 0 : h.slotName}` }) : D(h == null ? void 0 : h.slotName,
|
|
2418
|
+
return ((k = h == null ? void 0 : h.widgetList) == null ? void 0 : k.length) > 0 ? bt(h, { wdName: "template", props: `#${h == null ? void 0 : h.slotName}` }) : D(h == null ? void 0 : h.slotName, Ye(h.default) || h.default || ((h == null ? void 0 : h.slotName) == rt.default ? y || x : ""));
|
|
2378
2419
|
}).join(" ");
|
|
2379
|
-
let
|
|
2380
|
-
const
|
|
2381
|
-
return `<${
|
|
2420
|
+
let A = [e, v].join(" ");
|
|
2421
|
+
const $ = n || `el-${t == null ? void 0 : t.type}`;
|
|
2422
|
+
return `<${$} ${l}>${A}</${$}>`;
|
|
2382
2423
|
};
|
|
2383
2424
|
function K(t, i) {
|
|
2384
|
-
var
|
|
2425
|
+
var n;
|
|
2385
2426
|
const s = w.getOptions(t, J.optionItems);
|
|
2386
|
-
(
|
|
2427
|
+
(n = I.getValue(s)) == null || n[0];
|
|
2387
2428
|
const e = i.autoProp !== !1 ? 'v-bind="item"' : "";
|
|
2388
2429
|
return `
|
|
2389
2430
|
<${i.tag} v-for="(item, index) in ${w.getOptions(t, "name")}Options" :key="index" ${e || ""} ${i.exProp || ""}>
|
|
@@ -2395,33 +2436,33 @@ const ot = (t) => `el-${t == null ? void 0 : t.type}-item`, et = (t) => {
|
|
|
2395
2436
|
let i = "";
|
|
2396
2437
|
switch (t == null ? void 0 : t.type) {
|
|
2397
2438
|
case E.menu:
|
|
2398
|
-
i =
|
|
2439
|
+
i = Ke(w.getOptions(t, J.optionItems));
|
|
2399
2440
|
break;
|
|
2400
2441
|
case E.collapse:
|
|
2401
|
-
i =
|
|
2442
|
+
i = Zi(t);
|
|
2402
2443
|
break;
|
|
2403
2444
|
case E.breadcrumb:
|
|
2404
|
-
i =
|
|
2445
|
+
i = is(t);
|
|
2405
2446
|
break;
|
|
2406
2447
|
case E.steps:
|
|
2407
|
-
i =
|
|
2448
|
+
i = as(t);
|
|
2408
2449
|
break;
|
|
2409
2450
|
case E.carousel:
|
|
2410
|
-
i =
|
|
2451
|
+
i = Hi(t);
|
|
2411
2452
|
break;
|
|
2412
2453
|
}
|
|
2413
|
-
return
|
|
2454
|
+
return B(t, { exContent: i });
|
|
2414
2455
|
};
|
|
2415
2456
|
function U(t, i = "") {
|
|
2416
2457
|
const s = t == null ? void 0 : t.options;
|
|
2417
2458
|
let e = [];
|
|
2418
2459
|
i && i !== "" && e.push(i);
|
|
2419
|
-
const
|
|
2420
|
-
return
|
|
2460
|
+
const n = I.getValue(s == null ? void 0 : s.customClass);
|
|
2461
|
+
return n && Array.isArray(n) && n.length > 0 && e.push(Array.from(n).join(" ")), e.length > 0 ? `class="${e.join(" ")}"` : "";
|
|
2421
2462
|
}
|
|
2422
2463
|
const bt = (t, i) => {
|
|
2423
|
-
const s = U(t) || "", e = (i == null ? void 0 : i.wdName) || "",
|
|
2424
|
-
let o = (
|
|
2464
|
+
const s = U(t) || "", e = (i == null ? void 0 : i.wdName) || "", n = i == null ? void 0 : i.styleArray, r = (i == null ? void 0 : i.classAttr) || "", u = (i == null ? void 0 : i.props) || "";
|
|
2465
|
+
let o = (n == null ? void 0 : n.length) > 0 ? `style="${n == null ? void 0 : n.join(";")}"` : "";
|
|
2425
2466
|
return e ? `
|
|
2426
2467
|
<${e} ${s} ${o} ${r} ${u}>
|
|
2427
2468
|
${X(t == null ? void 0 : t.widgetList)}
|
|
@@ -2429,65 +2470,65 @@ const bt = (t, i) => {
|
|
|
2429
2470
|
` : `
|
|
2430
2471
|
${X(t == null ? void 0 : t.widgetList)}
|
|
2431
2472
|
`;
|
|
2432
|
-
},
|
|
2473
|
+
}, ls = () => {
|
|
2433
2474
|
var t = {};
|
|
2434
|
-
return t[E.grid + ""] =
|
|
2435
|
-
},
|
|
2475
|
+
return t[E.grid + ""] = yi, t[E.table + ""] = wi, t[E.tabs + ""] = Ei, t[E.cont + ""] = $i, t[E.contCell + ""] = Ft, t[E.form + ""] = Ai, t;
|
|
2476
|
+
}, us = ls();
|
|
2436
2477
|
function X(t, i) {
|
|
2437
2478
|
var s = [];
|
|
2438
2479
|
return t == null || t.forEach((e) => {
|
|
2439
|
-
e.category ===
|
|
2480
|
+
e.category === Ze.container ? s.push(ps(e, i)) : s.push(cs(e, i));
|
|
2440
2481
|
}), s.length ? s.join(`
|
|
2441
2482
|
`) : "";
|
|
2442
2483
|
}
|
|
2443
|
-
function
|
|
2444
|
-
const s =
|
|
2484
|
+
function ps(t, i) {
|
|
2485
|
+
const s = us[t.type];
|
|
2445
2486
|
return s ? s(t, i) : null;
|
|
2446
2487
|
}
|
|
2447
2488
|
function G(t, i) {
|
|
2448
|
-
var e,
|
|
2489
|
+
var e, n;
|
|
2449
2490
|
const s = Xt(t, i);
|
|
2450
|
-
return (
|
|
2491
|
+
return (n = (e = Object.values(s)) == null ? void 0 : e.filter((r) => !!r)) == null ? void 0 : n.join(" ");
|
|
2451
2492
|
}
|
|
2452
2493
|
function vt(t, i) {
|
|
2453
|
-
var e,
|
|
2494
|
+
var e, n;
|
|
2454
2495
|
var s = Xt(t, i);
|
|
2455
|
-
return (
|
|
2496
|
+
return (n = (e = Object.values(s)) == null ? void 0 : e.filter((r) => !!r)) == null ? void 0 : n.join(" ");
|
|
2456
2497
|
}
|
|
2457
2498
|
function Xt(t, i) {
|
|
2458
2499
|
var l;
|
|
2459
2500
|
let s = t.options, e = {};
|
|
2460
|
-
const { attrs:
|
|
2461
|
-
var r =
|
|
2501
|
+
const { attrs: n } = mt(t, void 0, { s_attr: !0 });
|
|
2502
|
+
var r = n.value;
|
|
2462
2503
|
let u = yt(t, i);
|
|
2463
|
-
(l = Object.keys(r)) == null || l.map((
|
|
2464
|
-
var x =
|
|
2465
|
-
e[
|
|
2504
|
+
(l = Object.keys(r)) == null || l.map((y) => {
|
|
2505
|
+
var x = vi(y), b = I.getValue(s[y]);
|
|
2506
|
+
e[y] = u[y] || L(b, x);
|
|
2466
2507
|
});
|
|
2467
2508
|
var o = "vModel";
|
|
2468
2509
|
return u[o] && (e[o] = u[o]), e;
|
|
2469
2510
|
}
|
|
2470
2511
|
function yt(t, i) {
|
|
2471
|
-
var
|
|
2472
|
-
const s = w.getOptions(t, "name"), e = (
|
|
2512
|
+
var n;
|
|
2513
|
+
const s = w.getOptions(t, "name"), e = (n = i == null ? void 0 : i.getFieldModel) == null ? void 0 : n.call(i, s);
|
|
2473
2514
|
return {
|
|
2474
2515
|
vModel: (t == null ? void 0 : t.formItemFlag) === !0 && e ? `v-model="${e}"` : "",
|
|
2475
|
-
defaultFirstOption:
|
|
2476
|
-
type:
|
|
2516
|
+
defaultFirstOption: L(w.getOptions(t, "filterable") && w.getOptions(t, "allowCreate"), "default-first-option"),
|
|
2517
|
+
type: L(w.getOptions(t, "type") === "number" ? "text" : w.getOptions(t, "type"), "type"),
|
|
2477
2518
|
// rows: buildProp((!isNone(wop.rows) && !isNaN(wop.rows)) ? wop.rows : '', 'rows'),
|
|
2478
|
-
controlsPosition:
|
|
2479
|
-
contentPosition:
|
|
2480
|
-
readonly:
|
|
2519
|
+
controlsPosition: L(w.getOptions(t, "controlsPosition") === Ht.right ? w.getOptions(t, "controlsPosition") : "", "controls-position"),
|
|
2520
|
+
contentPosition: L(w.getOptions(t, "contentPosition") !== Ht.center ? w.getOptions(t, "contentPosition") : "", "content-position"),
|
|
2521
|
+
readonly: L(w.getOptions(t, "readonly"), "readonly"),
|
|
2481
2522
|
// disabled: buildProp(wop.disabled, `:disabled="true"`),
|
|
2482
2523
|
// showWordLimit: buildProp(wop.showWordLimit, `:show-word-limit="true"`),
|
|
2483
|
-
rateMax:
|
|
2484
|
-
sliderMin:
|
|
2485
|
-
sliderMax:
|
|
2486
|
-
sliderStep:
|
|
2524
|
+
rateMax: L(!isNaN(w.getOptions(t, "max") || 0) && w.getOptions(t, "max") !== 5 ? w.getOptions(t, "max") : "", "max"),
|
|
2525
|
+
sliderMin: L(w.getOptions(t, "min") !== 0 ? w.getOptions(t, "min") : "", "min"),
|
|
2526
|
+
sliderMax: L(w.getOptions(t, "max") !== 100 ? w.getOptions(t, "max") : "", "max"),
|
|
2527
|
+
sliderStep: L(w.getOptions(t, "step") !== 1 ? w.getOptions(t, "step") : "", "step"),
|
|
2487
2528
|
// multipleLimit: buildProp((wop.multipleLimit > 0) ? wop.multipleLimit : '', 'multiple-limit'),
|
|
2488
|
-
switchWidth:
|
|
2489
|
-
lowThreshold:
|
|
2490
|
-
highThreshold:
|
|
2529
|
+
switchWidth: L(w.getOptions(t, "switchWidth") !== 40 ? w.getOptions(t, "switchWidth") : "", "width"),
|
|
2530
|
+
lowThreshold: L(w.getOptions(t, "lowThreshold") !== 2 ? w.getOptions(t, "lowThreshold") : "", "low-threshold"),
|
|
2531
|
+
highThreshold: L(w.getOptions(t, "highThreshold") !== 4 ? w.getOptions(t, "highThreshold") : "", "high-threshold"),
|
|
2491
2532
|
uploadTipSlotChild: w.getOptions(t, "uploadTip") ? `<div class="el-upload__tip">${w.getOptions(t, "uploadTip")}</div>` : "",
|
|
2492
2533
|
//!!wop.uploadTip ? `<template #tip><div class="el-upload__tip">${wop.uploadTip}</div></template>` : '',
|
|
2493
2534
|
// appendButtonChild: !!wop.appendButton ? getSlotTemplate('append', `<el-button class="${wop.buttonIcon}" ${!!wop.appendButtonDisabled ? 'disabled' : ''}></el-button>`) : '',
|
|
@@ -2513,31 +2554,31 @@ function D(t, i, s = !1) {
|
|
|
2513
2554
|
</template>
|
|
2514
2555
|
` : "";
|
|
2515
2556
|
}
|
|
2516
|
-
function
|
|
2557
|
+
function L(t, i) {
|
|
2517
2558
|
if (t) {
|
|
2518
2559
|
var s = typeof t;
|
|
2519
2560
|
if (s == "boolean")
|
|
2520
2561
|
return V(i, t, ":");
|
|
2521
2562
|
if (s == "number") {
|
|
2522
|
-
if (!
|
|
2563
|
+
if (!Mt(t) && !isNaN(t))
|
|
2523
2564
|
return V(i, t, ":");
|
|
2524
2565
|
} else
|
|
2525
2566
|
return s == "object" ? V(i, H(t), ":") : V(i, t, "");
|
|
2526
2567
|
}
|
|
2527
2568
|
return "";
|
|
2528
2569
|
}
|
|
2529
|
-
const
|
|
2570
|
+
const hs = () => {
|
|
2530
2571
|
var t = {};
|
|
2531
|
-
return
|
|
2532
|
-
t[i.label] =
|
|
2533
|
-
}), t[E.textarea + ""] =
|
|
2534
|
-
},
|
|
2535
|
-
function
|
|
2536
|
-
const s =
|
|
2572
|
+
return Je(E).forEach((i) => {
|
|
2573
|
+
t[i.label] = os;
|
|
2574
|
+
}), t[E.textarea + ""] = Ni, t[E.radio + ""] = Pi, t[E.checkbox + ""] = ji, t[E.select + ""] = Ii, t[E.pictureUpload + ""] = zi, t[E.fileUpload + ""] = qi, t[E.richEditor + ""] = Vi, t[E.cascader + ""] = Fi, t[E.link + ""] = Xi, t[E.staticText + ""] = _s, t[E.htmlText + ""] = rs, t[E.card + ""] = ki, t[E.router + ""] = Qi, t[E.descriptions + ""] = ts, t[E.dropdown + ""] = Ji, t[E.image + ""] = Gi, t[E.eltable + ""] = Ui, t[E.carousel + ""] = et, t[E.steps + ""] = et, t[E.collapse + ""] = et, t[E.breadcrumb + ""] = et, t[E.menu + ""] = et, t;
|
|
2575
|
+
}, fs = hs();
|
|
2576
|
+
function cs(t, i) {
|
|
2577
|
+
const s = fs[t.type];
|
|
2537
2578
|
return ` ${s ? s(t, i) : null}`;
|
|
2538
2579
|
}
|
|
2539
|
-
function
|
|
2540
|
-
const s = Wt(t), e =
|
|
2580
|
+
function ds(t, i = !1) {
|
|
2581
|
+
const s = Wt(t), e = Xe(s, !0);
|
|
2541
2582
|
var r = X(t, {
|
|
2542
2583
|
getFieldModel: (u) => {
|
|
2543
2584
|
var o;
|
|
@@ -2546,23 +2587,23 @@ function hs(t, i = !1) {
|
|
|
2546
2587
|
});
|
|
2547
2588
|
return r;
|
|
2548
2589
|
}
|
|
2549
|
-
const
|
|
2590
|
+
const ms = function(t) {
|
|
2550
2591
|
return `
|
|
2551
|
-
${
|
|
2592
|
+
${I.getValue(t == null ? void 0 : t.cssCode) || ""}
|
|
2552
2593
|
`;
|
|
2553
|
-
},
|
|
2594
|
+
}, gs = function(t, i = !1) {
|
|
2554
2595
|
return "";
|
|
2555
|
-
},
|
|
2556
|
-
var e =
|
|
2557
|
-
const o = ft(q.html, e), l = ft(q.javascript,
|
|
2596
|
+
}, $s = (t, i, s = !1) => {
|
|
2597
|
+
var e = ds(i, s), n = s ? ai(t, i) : ni(t, i), r = ms(t), u = gs(t, s);
|
|
2598
|
+
const o = ft(q.html, e), l = ft(q.javascript, n), y = ft(q.css, r), x = ft(q.css, u);
|
|
2558
2599
|
return `
|
|
2559
2600
|
${F(o, "<template>", "</template>", void 0, !0)}
|
|
2560
2601
|
${F(l, `<script${s ? " setup" : ""}>`, "<\/script>", void 0, !0)}
|
|
2561
2602
|
|
|
2562
|
-
${F(
|
|
2603
|
+
${F(y, "<style>", "</style>", void 0, !0)}
|
|
2563
2604
|
${F(x, "<style scoped>", "</style>", void 0, !0)}
|
|
2564
2605
|
`;
|
|
2565
2606
|
};
|
|
2566
2607
|
export {
|
|
2567
|
-
|
|
2608
|
+
$s as genSFC
|
|
2568
2609
|
};
|