@vc-shell/framework 2.1.0-pr254.42766e0 → 2.1.0-pr255.4dc5c0d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/ai-agent/index.js +11 -10
  2. package/dist/ai-agent/index.js.map +1 -1
  3. package/dist/charts/index.d.ts +2 -0
  4. package/dist/charts/index.d.ts.map +1 -0
  5. package/dist/charts/index.js +9 -0
  6. package/dist/charts/index.js.map +1 -0
  7. package/dist/chunks/DashboardDonutChart.vue_vue_type_script_setup_true_lang-hTcM33bM.js +446 -0
  8. package/dist/chunks/DashboardDonutChart.vue_vue_type_script_setup_true_lang-hTcM33bM.js.map +1 -0
  9. package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-Cx8_DCu_.js +1124 -0
  10. package/dist/chunks/VcAiAgentPanel.vue_vue_type_script_setup_true_lang-Cx8_DCu_.js.map +1 -0
  11. package/dist/chunks/{VcAiAgentPanel.vue_vue_type_style_index_0_lang-D077_c8I.js → VcAiAgentPanel.vue_vue_type_style_index_0_lang-D2KmNhhl.js} +834 -1907
  12. package/dist/chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-D2KmNhhl.js.map +1 -0
  13. package/dist/chunks/VcTableAdapter.vue_vue_type_script_setup_true_lang-BL653h9q.js +18282 -0
  14. package/dist/chunks/VcTableAdapter.vue_vue_type_script_setup_true_lang-BL653h9q.js.map +1 -0
  15. package/dist/chunks/VcTableAdapter.vue_vue_type_style_index_0_lang-CtkZR5a1.js +4227 -0
  16. package/dist/chunks/VcTableAdapter.vue_vue_type_style_index_0_lang-CtkZR5a1.js.map +1 -0
  17. package/dist/chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-Cs-yidUE.js +641 -0
  18. package/dist/chunks/dashboard-feed-row.vue_vue_type_script_setup_true_lang-Cs-yidUE.js.map +1 -0
  19. package/dist/chunks/{index-DELXU1qy.js → index-CvSe3hjU.js} +11 -10
  20. package/dist/chunks/{index-DELXU1qy.js.map → index-CvSe3hjU.js.map} +1 -1
  21. package/dist/chunks/vendor-js-beautify-D-6mWVv0.js +1784 -0
  22. package/dist/chunks/vendor-js-beautify-D-6mWVv0.js.map +1 -0
  23. package/dist/chunks/{vendor-vueuse-core-CEdpDfzx.js → vendor-vueuse-core-BYWoPpF_.js} +5 -5
  24. package/dist/chunks/{vendor-vueuse-core-CEdpDfzx.js.map → vendor-vueuse-core-BYWoPpF_.js.map} +1 -1
  25. package/dist/core/blade-navigation/bladeConfigRegistry.d.ts +0 -11
  26. package/dist/core/blade-navigation/bladeConfigRegistry.d.ts.map +1 -1
  27. package/dist/core/blade-navigation/descriptorFactory.d.ts +2 -0
  28. package/dist/core/blade-navigation/descriptorFactory.d.ts.map +1 -0
  29. package/dist/core/blade-navigation/singletons.d.ts +0 -2
  30. package/dist/core/blade-navigation/singletons.d.ts.map +1 -1
  31. package/dist/core/blade-navigation/types/index.d.ts +12 -6
  32. package/dist/core/blade-navigation/types/index.d.ts.map +1 -1
  33. package/dist/core/blade-navigation/useBladeMessaging.d.ts +1 -17
  34. package/dist/core/blade-navigation/useBladeMessaging.d.ts.map +1 -1
  35. package/dist/core/blade-navigation/useBladeStack.d.ts +1 -18
  36. package/dist/core/blade-navigation/useBladeStack.d.ts.map +1 -1
  37. package/dist/core/composables/createServiceRegistry.d.ts +42 -0
  38. package/dist/core/composables/createServiceRegistry.d.ts.map +1 -0
  39. package/dist/core/composables/useBladeNavigationAdapter/index.d.ts +0 -5
  40. package/dist/core/composables/useBladeNavigationAdapter/index.d.ts.map +1 -1
  41. package/dist/core/composables/useDashboard/index.d.ts.map +1 -1
  42. package/dist/core/composables/useEnvironmentName/index.d.ts +0 -5
  43. package/dist/core/composables/useEnvironmentName/index.d.ts.map +1 -1
  44. package/dist/core/composables/useMenuService/index.d.ts.map +1 -1
  45. package/dist/core/composables/usePopup/index.d.ts.map +1 -1
  46. package/dist/core/composables/usePopup/preset-registry.d.ts +0 -2
  47. package/dist/core/composables/usePopup/preset-registry.d.ts.map +1 -1
  48. package/dist/core/composables/usePopup/singleton.d.ts +0 -2
  49. package/dist/core/composables/usePopup/singleton.d.ts.map +1 -1
  50. package/dist/core/composables/useSettings/index.d.ts.map +1 -1
  51. package/dist/core/composables/useSettingsMenu/index.d.ts.map +1 -1
  52. package/dist/core/composables/useSlowNetworkDetection/index.d.ts +0 -2
  53. package/dist/core/composables/useSlowNetworkDetection/index.d.ts.map +1 -1
  54. package/dist/core/composables/useTheme/index.d.ts.map +1 -1
  55. package/dist/core/composables/useToolbar/index.d.ts.map +1 -1
  56. package/dist/core/composables/useUser/index.d.ts +0 -2
  57. package/dist/core/composables/useUser/index.d.ts.map +1 -1
  58. package/dist/core/interceptors/index.d.ts.map +1 -1
  59. package/dist/core/notifications/notification.d.ts.map +1 -1
  60. package/dist/core/plugins/ai-agent/constants.d.ts.map +1 -1
  61. package/dist/core/plugins/ai-agent/services/message-transport.d.ts.map +1 -1
  62. package/dist/core/plugins/ai-agent/types.d.ts +12 -1
  63. package/dist/core/plugins/ai-agent/types.d.ts.map +1 -1
  64. package/dist/core/plugins/permissions/index.d.ts.map +1 -1
  65. package/dist/core/plugins/validation/rules.d.ts.map +1 -1
  66. package/dist/core/services/_internal/createGenericItemRegistry.d.ts +35 -0
  67. package/dist/core/services/_internal/createGenericItemRegistry.d.ts.map +1 -0
  68. package/dist/core/services/_internal/index.d.ts +1 -0
  69. package/dist/core/services/_internal/index.d.ts.map +1 -1
  70. package/dist/core/services/app-bar-menu-service.d.ts.map +1 -1
  71. package/dist/core/services/app-bar-mobile-buttons-service.d.ts +2 -0
  72. package/dist/core/services/app-bar-mobile-buttons-service.d.ts.map +1 -1
  73. package/dist/core/services/settings-menu-service.d.ts.map +1 -1
  74. package/dist/core/utilities/backendRegistry.d.ts +38 -0
  75. package/dist/core/utilities/backendRegistry.d.ts.map +1 -0
  76. package/dist/core/utilities/index.d.ts +1 -0
  77. package/dist/core/utilities/index.d.ts.map +1 -1
  78. package/dist/dashboard/index.d.ts +3 -0
  79. package/dist/dashboard/index.d.ts.map +1 -0
  80. package/dist/dashboard/index.js +16 -0
  81. package/dist/dashboard/index.js.map +1 -0
  82. package/dist/framework.js +2149 -3060
  83. package/dist/framework.js.map +1 -1
  84. package/dist/index.css +2 -2
  85. package/dist/index.d.ts +1 -1
  86. package/dist/index.d.ts.map +1 -1
  87. package/dist/locales/de.js +91 -3
  88. package/dist/locales/en.js +91 -3
  89. package/dist/locales/en.json +91 -3
  90. package/dist/locales/types.d.ts +88 -0
  91. package/dist/shell/_internal/blade-navigation/components/vc-blade-slot/vc-blade-slot.vue.d.ts.map +1 -1
  92. package/dist/shell/_internal/notifications/components/notification-container/computeToastOffsets.d.ts +33 -0
  93. package/dist/shell/_internal/notifications/components/notification-container/computeToastOffsets.d.ts.map +1 -0
  94. package/dist/shell/_internal/notifications/components/notification-container/index.d.ts.map +1 -1
  95. package/dist/shell/_internal/notifications/components/notification-container/useToastStack.d.ts +17 -0
  96. package/dist/shell/_internal/notifications/components/notification-container/useToastStack.d.ts.map +1 -0
  97. package/dist/shell/auth/LoginPage/components/login/Login.vue.d.ts.map +1 -1
  98. package/dist/shell/auth/utils.d.ts +6 -2
  99. package/dist/shell/auth/utils.d.ts.map +1 -1
  100. package/dist/tailwind.config.d.ts.map +1 -1
  101. package/dist/tsconfig.tsbuildinfo +1 -1
  102. package/dist/ui/components/atoms/vc-container/vc-container.vue.d.ts.map +1 -1
  103. package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts +8 -0
  104. package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts.map +1 -1
  105. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
  106. package/dist/ui/components/molecules/vc-checkbox/vc-checkbox.vue.d.ts +2 -0
  107. package/dist/ui/components/molecules/vc-checkbox/vc-checkbox.vue.d.ts.map +1 -1
  108. package/dist/ui/components/molecules/vc-color-input/vc-color-input.vue.d.ts.map +1 -1
  109. package/dist/ui/components/molecules/vc-dropdown/vc-dropdown.vue.d.ts +3 -0
  110. package/dist/ui/components/molecules/vc-dropdown/vc-dropdown.vue.d.ts.map +1 -1
  111. package/dist/ui/components/molecules/vc-dropdown-panel/vc-dropdown-panel.vue.d.ts.map +1 -1
  112. package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-custom-button.vue.d.ts.map +1 -1
  113. package/dist/ui/components/molecules/vc-editor/_internal/vc-editor-font-selector.vue.d.ts.map +1 -1
  114. package/dist/ui/components/molecules/vc-editor/vc-editor.vue.d.ts.map +1 -1
  115. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
  116. package/dist/ui/components/molecules/vc-input-currency/vc-input-currency.vue.d.ts.map +1 -1
  117. package/dist/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.vue.d.ts.map +1 -1
  118. package/dist/ui/components/molecules/vc-radio-button/vc-radio-button.vue.d.ts +2 -0
  119. package/dist/ui/components/molecules/vc-radio-button/vc-radio-button.vue.d.ts.map +1 -1
  120. package/dist/ui/components/molecules/vc-switch/vc-switch.vue.d.ts +2 -0
  121. package/dist/ui/components/molecules/vc-switch/vc-switch.vue.d.ts.map +1 -1
  122. package/dist/ui/components/molecules/vc-toast/vc-toast.vue.d.ts.map +1 -1
  123. package/dist/ui/components/organisms/vc-app/_internal/app-bar/components/AppBarMobileActions.vue.d.ts.map +1 -1
  124. package/dist/ui/components/organisms/vc-app/_internal/layouts/DesktopLayout.vue.d.ts.map +1 -1
  125. package/dist/ui/components/organisms/vc-app/_internal/sidebar/SidebarHeader.vue.d.ts.map +1 -1
  126. package/dist/ui/components/organisms/vc-blade/_internal/BladeStatusBanners.vue.d.ts.map +1 -1
  127. package/dist/ui/components/organisms/vc-blade/vc-blade.vue.d.ts.map +1 -1
  128. package/dist/ui/components/organisms/vc-data-table/VcDataTable.vue.d.ts.map +1 -1
  129. package/dist/ui/components/organisms/vc-data-table/components/ColumnFilter.vue.d.ts.map +1 -1
  130. package/dist/ui/components/organisms/vc-data-table/components/DataTableBody.vue.d.ts.map +1 -1
  131. package/dist/ui/components/organisms/vc-data-table/components/DataTableCellRenderer.vue.d.ts.map +1 -1
  132. package/dist/ui/components/organisms/vc-data-table/components/DataTableHeader.vue.d.ts.map +1 -1
  133. package/dist/ui/components/organisms/vc-data-table/components/DataTableRow.vue.d.ts.map +1 -1
  134. package/dist/ui/components/organisms/vc-data-table/components/TableAddRowButton.vue.d.ts.map +1 -1
  135. package/dist/ui/components/organisms/vc-data-table/components/TableCheckbox.vue.d.ts +5 -1
  136. package/dist/ui/components/organisms/vc-data-table/components/TableCheckbox.vue.d.ts.map +1 -1
  137. package/dist/ui/components/organisms/vc-data-table/components/TableGroupRow.vue.d.ts.map +1 -1
  138. package/dist/ui/components/organisms/vc-data-table/components/TableRow.vue.d.ts.map +1 -1
  139. package/dist/ui/components/organisms/vc-data-table/components/TableRowActions.vue.d.ts.map +1 -1
  140. package/dist/ui/components/organisms/vc-data-table/composables/createTableSelectionFacade.d.ts +50 -0
  141. package/dist/ui/components/organisms/vc-data-table/composables/createTableSelectionFacade.d.ts.map +1 -0
  142. package/dist/ui/components/organisms/vc-data-table/composables/index.d.ts +2 -0
  143. package/dist/ui/components/organisms/vc-data-table/composables/index.d.ts.map +1 -1
  144. package/dist/ui/components/organisms/vc-data-table/composables/useDataTableOrchestrator.d.ts +0 -248
  145. package/dist/ui/components/organisms/vc-data-table/composables/useDataTableOrchestrator.d.ts.map +1 -1
  146. package/dist/ui/components/organisms/vc-data-table/composables/useDataTableState.d.ts.map +1 -1
  147. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsResize.d.ts +3 -0
  148. package/dist/ui/components/organisms/vc-data-table/composables/useTableColumnsResize.d.ts.map +1 -1
  149. package/dist/ui/components/organisms/vc-data-table/vc-data-table.stories.helpers.d.ts +32 -0
  150. package/dist/ui/components/organisms/vc-data-table/vc-data-table.stories.helpers.d.ts.map +1 -0
  151. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-filmstrip/vc-gallery-filmstrip.vue.d.ts.map +1 -1
  152. package/dist/ui/index.js +142 -141
  153. package/dist/ui/index.js.map +1 -1
  154. package/package.json +19 -7
  155. package/tailwind.config.ts +0 -6
  156. package/dist/chunks/VcAiAgentPanel.vue_vue_type_style_index_0_lang-D077_c8I.js.map +0 -1
  157. package/dist/chunks/VcTableAdapter.vue_vue_type_style_index_0_lang-BnbquDGw.js +0 -22319
  158. package/dist/chunks/VcTableAdapter.vue_vue_type_style_index_0_lang-BnbquDGw.js.map +0 -1
  159. package/dist/chunks/vendor-prettier-2Sf6a5jB.js +0 -5309
  160. package/dist/chunks/vendor-prettier-2Sf6a5jB.js.map +0 -1
@@ -0,0 +1,1784 @@
1
+ import { g as $t } from "./vendor-iso-639-1-BEjYyfKo.js";
2
+ var V = { exports: {} }, B = {}, I = { exports: {} }, G = {}, Q = {}, dt;
3
+ function ot() {
4
+ if (dt) return Q;
5
+ dt = 1;
6
+ function m(e) {
7
+ this.__parent = e, this.__character_count = 0, this.__indent_count = -1, this.__alignment_count = 0, this.__wrap_point_index = 0, this.__wrap_point_character_count = 0, this.__wrap_point_indent_count = -1, this.__wrap_point_alignment_count = 0, this.__items = [];
8
+ }
9
+ m.prototype.clone_empty = function() {
10
+ var e = new m(this.__parent);
11
+ return e.set_indent(this.__indent_count, this.__alignment_count), e;
12
+ }, m.prototype.item = function(e) {
13
+ return e < 0 ? this.__items[this.__items.length + e] : this.__items[e];
14
+ }, m.prototype.has_match = function(e) {
15
+ for (var s = this.__items.length - 1; s >= 0; s--)
16
+ if (this.__items[s].match(e))
17
+ return !0;
18
+ return !1;
19
+ }, m.prototype.set_indent = function(e, s) {
20
+ this.is_empty() && (this.__indent_count = e || 0, this.__alignment_count = s || 0, this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count));
21
+ }, m.prototype._set_wrap_point = function() {
22
+ 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);
23
+ }, m.prototype._should_wrap = function() {
24
+ return this.__wrap_point_index && this.__character_count > this.__parent.wrap_line_length && this.__wrap_point_character_count > this.__parent.next_line.__character_count;
25
+ }, m.prototype._allow_wrap = function() {
26
+ if (this._should_wrap()) {
27
+ this.__parent.add_new_line();
28
+ var e = this.__parent.current_line;
29
+ return e.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count), e.__items = this.__items.slice(this.__wrap_point_index), this.__items = this.__items.slice(0, this.__wrap_point_index), e.__character_count += this.__character_count - this.__wrap_point_character_count, this.__character_count = this.__wrap_point_character_count, e.__items[0] === " " && (e.__items.splice(0, 1), e.__character_count -= 1), !0;
30
+ }
31
+ return !1;
32
+ }, m.prototype.is_empty = function() {
33
+ return this.__items.length === 0;
34
+ }, m.prototype.last = function() {
35
+ return this.is_empty() ? null : this.__items[this.__items.length - 1];
36
+ }, m.prototype.push = function(e) {
37
+ this.__items.push(e);
38
+ var s = e.lastIndexOf(`
39
+ `);
40
+ s !== -1 ? this.__character_count = e.length - s : this.__character_count += e.length;
41
+ }, m.prototype.pop = function() {
42
+ var e = null;
43
+ return this.is_empty() || (e = this.__items.pop(), this.__character_count -= e.length), e;
44
+ }, m.prototype._remove_indent = function() {
45
+ this.__indent_count > 0 && (this.__indent_count -= 1, this.__character_count -= this.__parent.indent_size);
46
+ }, m.prototype._remove_wrap_indent = function() {
47
+ this.__wrap_point_indent_count > 0 && (this.__wrap_point_indent_count -= 1);
48
+ }, m.prototype.trim = function() {
49
+ for (; this.last() === " "; )
50
+ this.__items.pop(), this.__character_count -= 1;
51
+ }, m.prototype.toString = function() {
52
+ var e = "";
53
+ 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;
54
+ };
55
+ function p(e, s) {
56
+ 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)), s = s || "", e.indent_level > 0 && (s = new Array(e.indent_level + 1).join(this.__indent_string)), this.__base_string = s, this.__base_string_length = s.length;
57
+ }
58
+ p.prototype.get_indent_size = function(e, s) {
59
+ var a = this.__base_string_length;
60
+ return s = s || 0, e < 0 && (a = 0), a += e * this.__indent_size, a += s, a;
61
+ }, p.prototype.get_indent_string = function(e, s) {
62
+ var a = this.__base_string;
63
+ return s = s || 0, e < 0 && (e = 0, a = ""), s += e * this.__indent_size, this.__ensure_cache(s), a += this.__cache[s], a;
64
+ }, p.prototype.__ensure_cache = function(e) {
65
+ for (; e >= this.__cache.length; )
66
+ this.__add_column();
67
+ }, p.prototype.__add_column = function() {
68
+ var e = this.__cache.length, s = 0, a = "";
69
+ this.__indent_size && e >= this.__indent_size && (s = Math.floor(e / this.__indent_size), e -= s * this.__indent_size, a = new Array(s + 1).join(this.__indent_string)), e && (a += new Array(e + 1).join(" ")), this.__cache.push(a);
70
+ };
71
+ function _(e, s) {
72
+ this.__indent_cache = new p(e, s), 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 m(this), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = !1, this.__add_outputline();
73
+ }
74
+ return _.prototype.__add_outputline = function() {
75
+ this.previous_line = this.current_line, this.current_line = this.next_line.clone_empty(), this.__lines.push(this.current_line);
76
+ }, _.prototype.get_line_number = function() {
77
+ return this.__lines.length;
78
+ }, _.prototype.get_indent_string = function(e, s) {
79
+ return this.__indent_cache.get_indent_string(e, s);
80
+ }, _.prototype.get_indent_size = function(e, s) {
81
+ return this.__indent_cache.get_indent_size(e, s);
82
+ }, _.prototype.is_empty = function() {
83
+ return !this.previous_line && this.current_line.is_empty();
84
+ }, _.prototype.add_new_line = function(e) {
85
+ return this.is_empty() || !e && this.just_added_newline() ? !1 : (this.raw || this.__add_outputline(), !0);
86
+ }, _.prototype.get_code = function(e) {
87
+ this.trim(!0);
88
+ var s = this.current_line.pop();
89
+ s && (s[s.length - 1] === `
90
+ ` && (s = s.replace(/\n+$/g, "")), this.current_line.push(s)), this._end_with_newline && this.__add_outputline();
91
+ var a = this.__lines.join(`
92
+ `);
93
+ return e !== `
94
+ ` && (a = a.replace(/[\n]/g, e)), a;
95
+ }, _.prototype.set_wrap_point = function() {
96
+ this.current_line._set_wrap_point();
97
+ }, _.prototype.set_indent = function(e, s) {
98
+ return e = e || 0, s = s || 0, this.next_line.set_indent(e, s), this.__lines.length > 1 ? (this.current_line.set_indent(e, s), !0) : (this.current_line.set_indent(), !1);
99
+ }, _.prototype.add_raw_token = function(e) {
100
+ for (var s = 0; s < e.newlines; s++)
101
+ this.__add_outputline();
102
+ 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;
103
+ }, _.prototype.add_token = function(e) {
104
+ this.__add_space_before_token(), this.current_line.push(e), this.space_before_token = !1, this.non_breaking_space = !1, this.previous_token_wrapped = this.current_line._allow_wrap();
105
+ }, _.prototype.__add_space_before_token = function() {
106
+ this.space_before_token && !this.just_added_newline() && (this.non_breaking_space || this.set_wrap_point(), this.current_line.push(" "));
107
+ }, _.prototype.remove_indent = function(e) {
108
+ for (var s = this.__lines.length; e < s; )
109
+ this.__lines[e]._remove_indent(), e++;
110
+ this.current_line._remove_wrap_indent();
111
+ }, _.prototype.trim = function(e) {
112
+ for (e = e === void 0 ? !1 : e, this.current_line.trim(); e && this.__lines.length > 1 && this.current_line.is_empty(); )
113
+ this.__lines.pop(), this.current_line = this.__lines[this.__lines.length - 1], this.current_line.trim();
114
+ this.previous_line = this.__lines.length > 1 ? this.__lines[this.__lines.length - 2] : null;
115
+ }, _.prototype.just_added_newline = function() {
116
+ return this.current_line.is_empty();
117
+ }, _.prototype.just_added_blankline = function() {
118
+ return this.is_empty() || this.current_line.is_empty() && this.previous_line.is_empty();
119
+ }, _.prototype.ensure_empty_line_above = function(e, s) {
120
+ for (var a = this.__lines.length - 2; a >= 0; ) {
121
+ var f = this.__lines[a];
122
+ if (f.is_empty())
123
+ break;
124
+ if (f.item(0).indexOf(e) !== 0 && f.item(-1) !== s) {
125
+ this.__lines.splice(a + 1, 0, new m(this)), this.previous_line = this.__lines[this.__lines.length - 2];
126
+ break;
127
+ }
128
+ a--;
129
+ }
130
+ }, Q.Output = _, Q;
131
+ }
132
+ var Y = {}, gt;
133
+ function Mt() {
134
+ if (gt) return Y;
135
+ gt = 1;
136
+ function m(p, _, e, s) {
137
+ this.type = p, this.text = _, this.comments_before = null, this.newlines = e || 0, this.whitespace_before = s || "", this.parent = null, this.next = null, this.previous = null, this.opened = null, this.closed = null, this.directives = null;
138
+ }
139
+ return Y.Token = m, Y;
140
+ }
141
+ var Z = {}, mt;
142
+ function zt() {
143
+ return mt || (mt = 1, (function(m) {
144
+ var p = "\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a", _ = "\\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", s = "\\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", a = "\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}", f = "(?:" + a + "|[" + p + e + "])", n = "(?:" + a + "|[" + _ + e + s + "])*";
145
+ m.identifier = new RegExp(f + n, "g"), m.identifierStart = new RegExp(f), m.identifierMatch = new RegExp("(?:" + a + "|[" + _ + e + s + "])+"), m.newline = /[\n\r\u2028\u2029]/, m.lineBreak = new RegExp(`\r
146
+ |` + m.newline.source), m.allLineBreaks = new RegExp(m.lineBreak.source, "g");
147
+ })(Z)), Z;
148
+ }
149
+ var J = {}, W = {}, bt;
150
+ function ht() {
151
+ if (bt) return W;
152
+ bt = 1;
153
+ function m(e, s) {
154
+ this.raw_options = p(e, s), 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", "angular", "django", "erb", "handlebars", "php", "smarty"], ["auto"]);
155
+ }
156
+ m.prototype._get_array = function(e, s) {
157
+ var a = this.raw_options[e], f = s || [];
158
+ return typeof a == "object" ? a !== null && typeof a.concat == "function" && (f = a.concat()) : typeof a == "string" && (f = a.split(/[^a-zA-Z0-9_\/\-]+/)), f;
159
+ }, m.prototype._get_boolean = function(e, s) {
160
+ var a = this.raw_options[e], f = a === void 0 ? !!s : !!a;
161
+ return f;
162
+ }, m.prototype._get_characters = function(e, s) {
163
+ var a = this.raw_options[e], f = s || "";
164
+ return typeof a == "string" && (f = a.replace(/\\r/, "\r").replace(/\\n/, `
165
+ `).replace(/\\t/, " ")), f;
166
+ }, m.prototype._get_number = function(e, s) {
167
+ var a = this.raw_options[e];
168
+ s = parseInt(s, 10), isNaN(s) && (s = 0);
169
+ var f = parseInt(a, 10);
170
+ return isNaN(f) && (f = s), f;
171
+ }, m.prototype._get_selection = function(e, s, a) {
172
+ var f = this._get_selection_list(e, s, a);
173
+ if (f.length !== 1)
174
+ throw new Error(
175
+ "Invalid Option Value: The option '" + e + `' can only be one of the following values:
176
+ ` + s + `
177
+ You passed in: '` + this.raw_options[e] + "'"
178
+ );
179
+ return f[0];
180
+ }, m.prototype._get_selection_list = function(e, s, a) {
181
+ if (!s || s.length === 0)
182
+ throw new Error("Selection list cannot be empty.");
183
+ if (a = a || [s[0]], !this._is_valid_selection(a, s))
184
+ throw new Error("Invalid Default Value!");
185
+ var f = this._get_array(e, a);
186
+ if (!this._is_valid_selection(f, s))
187
+ throw new Error(
188
+ "Invalid Option Value: The option '" + e + `' can contain only the following values:
189
+ ` + s + `
190
+ You passed in: '` + this.raw_options[e] + "'"
191
+ );
192
+ return f;
193
+ }, m.prototype._is_valid_selection = function(e, s) {
194
+ return e.length && s.length && !e.some(function(a) {
195
+ return s.indexOf(a) === -1;
196
+ });
197
+ };
198
+ function p(e, s) {
199
+ var a = {};
200
+ e = _(e);
201
+ var f;
202
+ for (f in e)
203
+ f !== s && (a[f] = e[f]);
204
+ if (s && e[s])
205
+ for (f in e[s])
206
+ a[f] = e[s][f];
207
+ return a;
208
+ }
209
+ function _(e) {
210
+ var s = {}, a;
211
+ for (a in e) {
212
+ var f = a.replace(/-/g, "_");
213
+ s[f] = e[a];
214
+ }
215
+ return s;
216
+ }
217
+ return W.Options = m, W.normalizeOpts = _, W.mergeOpts = p, W;
218
+ }
219
+ var vt;
220
+ function Ut() {
221
+ if (vt) return J;
222
+ vt = 1;
223
+ var m = ht().Options, p = ["before-newline", "after-newline", "preserve-newline"];
224
+ function _(e) {
225
+ m.call(this, e, "js");
226
+ var s = this.raw_options.brace_style || null;
227
+ s === "expand-strict" ? this.raw_options.brace_style = "expand" : s === "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");
228
+ var a = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
229
+ this.brace_preserve_inline = !1, this.brace_style = "collapse";
230
+ for (var f = 0; f < a.length; f++)
231
+ a[f] === "preserve-inline" ? this.brace_preserve_inline = !0 : this.brace_style = a[f];
232
+ this.unindent_chained_methods = this._get_boolean("unindent_chained_methods"), this.break_chained_methods = this._get_boolean("break_chained_methods"), this.space_in_paren = this._get_boolean("space_in_paren"), this.space_in_empty_paren = this._get_boolean("space_in_empty_paren"), this.jslint_happy = this._get_boolean("jslint_happy"), this.space_after_anon_function = this._get_boolean("space_after_anon_function"), this.space_after_named_function = this._get_boolean("space_after_named_function"), this.keep_array_indentation = this._get_boolean("keep_array_indentation"), this.space_before_conditional = this._get_boolean("space_before_conditional", !0), this.unescape_strings = this._get_boolean("unescape_strings"), this.e4x = this._get_boolean("e4x"), this.comma_first = this._get_boolean("comma_first"), this.operator_position = this._get_selection("operator_position", p), this.test_output_raw = this._get_boolean("test_output_raw"), this.jslint_happy && (this.space_after_anon_function = !0);
233
+ }
234
+ return _.prototype = new m(), J.Options = _, J;
235
+ }
236
+ var D = {}, H = {}, yt;
237
+ function lt() {
238
+ if (yt) return H;
239
+ yt = 1;
240
+ var m = RegExp.prototype.hasOwnProperty("sticky");
241
+ function p(_) {
242
+ this.__input = _ || "", this.__input_length = this.__input.length, this.__position = 0;
243
+ }
244
+ return p.prototype.restart = function() {
245
+ this.__position = 0;
246
+ }, p.prototype.back = function() {
247
+ this.__position > 0 && (this.__position -= 1);
248
+ }, p.prototype.hasNext = function() {
249
+ return this.__position < this.__input_length;
250
+ }, p.prototype.next = function() {
251
+ var _ = null;
252
+ return this.hasNext() && (_ = this.__input.charAt(this.__position), this.__position += 1), _;
253
+ }, p.prototype.peek = function(_) {
254
+ var e = null;
255
+ return _ = _ || 0, _ += this.__position, _ >= 0 && _ < this.__input_length && (e = this.__input.charAt(_)), e;
256
+ }, p.prototype.__match = function(_, e) {
257
+ _.lastIndex = e;
258
+ var s = _.exec(this.__input);
259
+ return s && !(m && _.sticky) && s.index !== e && (s = null), s;
260
+ }, p.prototype.test = function(_, e) {
261
+ return e = e || 0, e += this.__position, e >= 0 && e < this.__input_length ? !!this.__match(_, e) : !1;
262
+ }, p.prototype.testChar = function(_, e) {
263
+ var s = this.peek(e);
264
+ return _.lastIndex = 0, s !== null && _.test(s);
265
+ }, p.prototype.match = function(_) {
266
+ var e = this.__match(_, this.__position);
267
+ return e ? this.__position += e[0].length : e = null, e;
268
+ }, p.prototype.read = function(_, e, s) {
269
+ var a = "", f;
270
+ return _ && (f = this.match(_), f && (a += f[0])), e && (f || !_) && (a += this.readUntil(e, s)), a;
271
+ }, p.prototype.readUntil = function(_, e) {
272
+ var s = "", a = this.__position;
273
+ _.lastIndex = this.__position;
274
+ var f = _.exec(this.__input);
275
+ return f ? (a = f.index, e && (a += f[0].length)) : a = this.__input_length, s = this.__input.substring(this.__position, a), this.__position = a, s;
276
+ }, p.prototype.readUntilAfter = function(_) {
277
+ return this.readUntil(_, !0);
278
+ }, p.prototype.get_regexp = function(_, e) {
279
+ var s = null, a = "g";
280
+ return e && m && (a = "y"), typeof _ == "string" && _ !== "" ? s = new RegExp(_, a) : _ && (s = new RegExp(_.source, a)), s;
281
+ }, p.prototype.get_literal_regexp = function(_) {
282
+ return RegExp(_.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"));
283
+ }, p.prototype.peekUntilAfter = function(_) {
284
+ var e = this.__position, s = this.readUntilAfter(_);
285
+ return this.__position = e, s;
286
+ }, p.prototype.lookBack = function(_) {
287
+ var e = this.__position - 1;
288
+ return e >= _.length && this.__input.substring(e - _.length, e).toLowerCase() === _;
289
+ }, H.InputScanner = p, H;
290
+ }
291
+ var K = {}, tt = {}, wt;
292
+ function Vt() {
293
+ if (wt) return tt;
294
+ wt = 1;
295
+ function m(p) {
296
+ this.__tokens = [], this.__tokens_length = this.__tokens.length, this.__position = 0, this.__parent_token = p;
297
+ }
298
+ return m.prototype.restart = function() {
299
+ this.__position = 0;
300
+ }, m.prototype.isEmpty = function() {
301
+ return this.__tokens_length === 0;
302
+ }, m.prototype.hasNext = function() {
303
+ return this.__position < this.__tokens_length;
304
+ }, m.prototype.next = function() {
305
+ var p = null;
306
+ return this.hasNext() && (p = this.__tokens[this.__position], this.__position += 1), p;
307
+ }, m.prototype.peek = function(p) {
308
+ var _ = null;
309
+ return p = p || 0, p += this.__position, p >= 0 && p < this.__tokens_length && (_ = this.__tokens[p]), _;
310
+ }, m.prototype.add = function(p) {
311
+ this.__parent_token && (p.parent = this.__parent_token), this.__tokens.push(p), this.__tokens_length += 1;
312
+ }, tt.TokenStream = m, tt;
313
+ }
314
+ var et = {}, it = {}, xt;
315
+ function X() {
316
+ if (xt) return it;
317
+ xt = 1;
318
+ function m(p, _) {
319
+ this._input = p, this._starting_pattern = null, this._match_pattern = null, this._until_pattern = null, this._until_after = !1, _ && (this._starting_pattern = this._input.get_regexp(_._starting_pattern, !0), this._match_pattern = this._input.get_regexp(_._match_pattern, !0), this._until_pattern = this._input.get_regexp(_._until_pattern), this._until_after = _._until_after);
320
+ }
321
+ return m.prototype.read = function() {
322
+ var p = this._input.read(this._starting_pattern);
323
+ return (!this._starting_pattern || p) && (p += this._input.read(this._match_pattern, this._until_pattern, this._until_after)), p;
324
+ }, m.prototype.read_match = function() {
325
+ return this._input.match(this._match_pattern);
326
+ }, m.prototype.until_after = function(p) {
327
+ var _ = this._create();
328
+ return _._until_after = !0, _._until_pattern = this._input.get_regexp(p), _._update(), _;
329
+ }, m.prototype.until = function(p) {
330
+ var _ = this._create();
331
+ return _._until_after = !1, _._until_pattern = this._input.get_regexp(p), _._update(), _;
332
+ }, m.prototype.starting_with = function(p) {
333
+ var _ = this._create();
334
+ return _._starting_pattern = this._input.get_regexp(p, !0), _._update(), _;
335
+ }, m.prototype.matching = function(p) {
336
+ var _ = this._create();
337
+ return _._match_pattern = this._input.get_regexp(p, !0), _._update(), _;
338
+ }, m.prototype._create = function() {
339
+ return new m(this._input, this);
340
+ }, m.prototype._update = function() {
341
+ }, it.Pattern = m, it;
342
+ }
343
+ var Ot;
344
+ function Gt() {
345
+ if (Ot) return et;
346
+ Ot = 1;
347
+ var m = X().Pattern;
348
+ function p(_, e) {
349
+ m.call(this, _, e), e ? this._line_regexp = this._input.get_regexp(e._line_regexp) : this.__set_whitespace_patterns("", ""), this.newline_count = 0, this.whitespace_before_token = "";
350
+ }
351
+ return p.prototype = new m(), p.prototype.__set_whitespace_patterns = function(_, e) {
352
+ _ += "\\t ", e += "\\n\\r", this._match_pattern = this._input.get_regexp(
353
+ "[" + _ + e + "]+",
354
+ !0
355
+ ), this._newline_regexp = this._input.get_regexp(
356
+ "\\r\\n|[" + e + "]"
357
+ );
358
+ }, p.prototype.read = function() {
359
+ this.newline_count = 0, this.whitespace_before_token = "";
360
+ var _ = this._input.read(this._match_pattern);
361
+ if (_ === " ")
362
+ this.whitespace_before_token = " ";
363
+ else if (_) {
364
+ var e = this.__split(this._newline_regexp, _);
365
+ this.newline_count = e.length - 1, this.whitespace_before_token = e[this.newline_count];
366
+ }
367
+ return _;
368
+ }, p.prototype.matching = function(_, e) {
369
+ var s = this._create();
370
+ return s.__set_whitespace_patterns(_, e), s._update(), s;
371
+ }, p.prototype._create = function() {
372
+ return new p(this._input, this);
373
+ }, p.prototype.__split = function(_, e) {
374
+ _.lastIndex = 0;
375
+ for (var s = 0, a = [], f = _.exec(e); f; )
376
+ a.push(e.substring(s, f.index)), s = f.index + f[0].length, f = _.exec(e);
377
+ return s < e.length ? a.push(e.substring(s, e.length)) : a.push(""), a;
378
+ }, et.WhitespacePattern = p, et;
379
+ }
380
+ var Et;
381
+ function F() {
382
+ if (Et) return K;
383
+ Et = 1;
384
+ var m = lt().InputScanner, p = Mt().Token, _ = Vt().TokenStream, e = Gt().WhitespacePattern, s = {
385
+ START: "TK_START",
386
+ RAW: "TK_RAW",
387
+ EOF: "TK_EOF"
388
+ }, a = function(f, n) {
389
+ this._input = new m(f), this._options = n || {}, this.__tokens = null, this._patterns = {}, this._patterns.whitespace = new e(this._input);
390
+ };
391
+ return a.prototype.tokenize = function() {
392
+ this._input.restart(), this.__tokens = new _(), this._reset();
393
+ for (var f, n = new p(s.START, ""), u = null, O = [], b = new _(); n.type !== s.EOF; ) {
394
+ for (f = this._get_next_token(n, u); this._is_comment(f); )
395
+ b.add(f), f = this._get_next_token(n, u);
396
+ b.isEmpty() || (f.comments_before = b, b = new _()), f.parent = u, this._is_opening(f) ? (O.push(u), u = f) : u && this._is_closing(f, u) && (f.opened = u, u.closed = f, u = O.pop(), f.parent = u), f.previous = n, n.next = f, this.__tokens.add(f), n = f;
397
+ }
398
+ return this.__tokens;
399
+ }, a.prototype._is_first_token = function() {
400
+ return this.__tokens.isEmpty();
401
+ }, a.prototype._reset = function() {
402
+ }, a.prototype._get_next_token = function(f, n) {
403
+ this._readWhitespace();
404
+ var u = this._input.read(/.+/g);
405
+ return u ? this._create_token(s.RAW, u) : this._create_token(s.EOF, "");
406
+ }, a.prototype._is_comment = function(f) {
407
+ return !1;
408
+ }, a.prototype._is_opening = function(f) {
409
+ return !1;
410
+ }, a.prototype._is_closing = function(f, n) {
411
+ return !1;
412
+ }, a.prototype._create_token = function(f, n) {
413
+ var u = new p(
414
+ f,
415
+ n,
416
+ this._patterns.whitespace.newline_count,
417
+ this._patterns.whitespace.whitespace_before_token
418
+ );
419
+ return u;
420
+ }, a.prototype._readWhitespace = function() {
421
+ return this._patterns.whitespace.read();
422
+ }, K.Tokenizer = a, K.TOKEN = s, K;
423
+ }
424
+ var st = {}, Tt;
425
+ function pt() {
426
+ if (Tt) return st;
427
+ Tt = 1;
428
+ function m(p, _) {
429
+ p = typeof p == "string" ? p : p.source, _ = typeof _ == "string" ? _ : _.source, this.__directives_block_pattern = new RegExp(p + / beautify( \w+[:]\w+)+ /.source + _, "g"), this.__directive_pattern = / (\w+)[:](\w+)/g, this.__directives_end_ignore_pattern = new RegExp(p + /\sbeautify\signore:end\s/.source + _, "g");
430
+ }
431
+ return m.prototype.get_directives = function(p) {
432
+ if (!p.match(this.__directives_block_pattern))
433
+ return null;
434
+ var _ = {};
435
+ this.__directive_pattern.lastIndex = 0;
436
+ for (var e = this.__directive_pattern.exec(p); e; )
437
+ _[e[1]] = e[2], e = this.__directive_pattern.exec(p);
438
+ return _;
439
+ }, m.prototype.readIgnored = function(p) {
440
+ return p.readUntilAfter(this.__directives_end_ignore_pattern);
441
+ }, st.Directives = m, st;
442
+ }
443
+ var nt = {}, kt;
444
+ function qt() {
445
+ if (kt) return nt;
446
+ kt = 1;
447
+ var m = X().Pattern, p = {
448
+ django: !1,
449
+ erb: !1,
450
+ handlebars: !1,
451
+ php: !1,
452
+ smarty: !1,
453
+ angular: !1
454
+ };
455
+ function _(e, s) {
456
+ m.call(this, e, s), this.__template_pattern = null, this._disabled = Object.assign({}, p), this._excluded = Object.assign({}, p), s && (this.__template_pattern = this._input.get_regexp(s.__template_pattern), this._excluded = Object.assign(this._excluded, s._excluded), this._disabled = Object.assign(this._disabled, s._disabled));
457
+ var a = new m(e);
458
+ this.__patterns = {
459
+ handlebars_comment: a.starting_with(/{{!--/).until_after(/--}}/),
460
+ handlebars_unescaped: a.starting_with(/{{{/).until_after(/}}}/),
461
+ handlebars: a.starting_with(/{{/).until_after(/}}/),
462
+ php: a.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),
463
+ erb: a.starting_with(/<%[^%]/).until_after(/[^%]%>/),
464
+ // django coflicts with handlebars a bit.
465
+ django: a.starting_with(/{%/).until_after(/%}/),
466
+ django_value: a.starting_with(/{{/).until_after(/}}/),
467
+ django_comment: a.starting_with(/{#/).until_after(/#}/),
468
+ smarty: a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),
469
+ smarty_comment: a.starting_with(/{\*/).until_after(/\*}/),
470
+ smarty_literal: a.starting_with(/{literal}/).until_after(/{\/literal}/)
471
+ };
472
+ }
473
+ return _.prototype = new m(), _.prototype._create = function() {
474
+ return new _(this._input, this);
475
+ }, _.prototype._update = function() {
476
+ this.__set_templated_pattern();
477
+ }, _.prototype.disable = function(e) {
478
+ var s = this._create();
479
+ return s._disabled[e] = !0, s._update(), s;
480
+ }, _.prototype.read_options = function(e) {
481
+ var s = this._create();
482
+ for (var a in p)
483
+ s._disabled[a] = e.templating.indexOf(a) === -1;
484
+ return s._update(), s;
485
+ }, _.prototype.exclude = function(e) {
486
+ var s = this._create();
487
+ return s._excluded[e] = !0, s._update(), s;
488
+ }, _.prototype.read = function() {
489
+ var e = "";
490
+ this._match_pattern ? e = this._input.read(this._starting_pattern) : e = this._input.read(this._starting_pattern, this.__template_pattern);
491
+ for (var s = this._read_template(); s; )
492
+ this._match_pattern ? s += this._input.read(this._match_pattern) : s += this._input.readUntil(this.__template_pattern), e += s, s = this._read_template();
493
+ return this._until_after && (e += this._input.readUntilAfter(this._until_pattern)), e;
494
+ }, _.prototype.__set_templated_pattern = function() {
495
+ var e = [];
496
+ this._disabled.php || e.push(this.__patterns.php._starting_pattern.source), this._disabled.handlebars || e.push(this.__patterns.handlebars._starting_pattern.source), this._disabled.angular || 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("|") + ")");
497
+ }, _.prototype._read_template = function() {
498
+ var e = "", s = this._input.peek();
499
+ if (s === "<") {
500
+ var a = this._input.peek(1);
501
+ !this._disabled.php && !this._excluded.php && a === "?" && (e = e || this.__patterns.php.read()), !this._disabled.erb && !this._excluded.erb && a === "%" && (e = e || this.__patterns.erb.read());
502
+ } else s === "{" && (!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()));
503
+ return e;
504
+ }, nt.TemplatablePattern = _, nt;
505
+ }
506
+ var Rt;
507
+ function M() {
508
+ if (Rt) return D;
509
+ Rt = 1;
510
+ var m = lt().InputScanner, p = F().Tokenizer, _ = F().TOKEN, e = pt().Directives, s = zt(), a = X().Pattern, f = qt().TemplatablePattern;
511
+ function n(l, g) {
512
+ return g.indexOf(l) !== -1;
513
+ }
514
+ var u = {
515
+ START_EXPR: "TK_START_EXPR",
516
+ END_EXPR: "TK_END_EXPR",
517
+ START_BLOCK: "TK_START_BLOCK",
518
+ END_BLOCK: "TK_END_BLOCK",
519
+ WORD: "TK_WORD",
520
+ RESERVED: "TK_RESERVED",
521
+ SEMICOLON: "TK_SEMICOLON",
522
+ STRING: "TK_STRING",
523
+ EQUALS: "TK_EQUALS",
524
+ OPERATOR: "TK_OPERATOR",
525
+ COMMA: "TK_COMMA",
526
+ BLOCK_COMMENT: "TK_BLOCK_COMMENT",
527
+ COMMENT: "TK_COMMENT",
528
+ DOT: "TK_DOT",
529
+ UNKNOWN: "TK_UNKNOWN",
530
+ START: _.START,
531
+ RAW: _.RAW,
532
+ EOF: _.EOF
533
+ }, O = new e(/\/\*/, /\*\//), b = /0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/, v = /[0-9]/, y = /[^\d\.]/, S = ">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "), A = ">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";
534
+ A = A.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&"), A = "\\?\\.(?!\\d) " + A, A = A.replace(/ /g, "|");
535
+ var N = new RegExp(A), r = "continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","), i = r.concat(["do", "in", "of", "else", "get", "set", "new", "catch", "finally", "typeof", "yield", "async", "await", "from", "as", "class", "extends"]), o = new RegExp("^(?:" + i.join("|") + ")$"), E, w = function(l, g) {
536
+ p.call(this, l, g), this._patterns.whitespace = this._patterns.whitespace.matching(
537
+ /\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,
538
+ /\u2028\u2029/.source
539
+ );
540
+ var h = new a(this._input), x = new f(this._input).read_options(this._options);
541
+ this.__patterns = {
542
+ template: x,
543
+ identifier: x.starting_with(s.identifier).matching(s.identifierMatch),
544
+ number: h.matching(b),
545
+ punct: h.matching(N),
546
+ // comment ends just before nearest linefeed or end of file
547
+ comment: h.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),
548
+ // /* ... */ comment ends with nearest */ or end of file
549
+ block_comment: h.starting_with(/\/\*/).until_after(/\*\//),
550
+ html_comment_start: h.matching(/<!--/),
551
+ html_comment_end: h.matching(/-->/),
552
+ include: h.starting_with(/#include/).until_after(s.lineBreak),
553
+ shebang: h.starting_with(/#!/).until_after(s.lineBreak),
554
+ xml: h.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*>/),
555
+ single_quote: x.until(/['\\\n\r\u2028\u2029]/),
556
+ double_quote: x.until(/["\\\n\r\u2028\u2029]/),
557
+ template_text: x.until(/[`\\$]/),
558
+ template_expression: x.until(/[`}\\]/)
559
+ };
560
+ };
561
+ w.prototype = new p(), w.prototype._is_comment = function(l) {
562
+ return l.type === u.COMMENT || l.type === u.BLOCK_COMMENT || l.type === u.UNKNOWN;
563
+ }, w.prototype._is_opening = function(l) {
564
+ return l.type === u.START_BLOCK || l.type === u.START_EXPR;
565
+ }, w.prototype._is_closing = function(l, g) {
566
+ return (l.type === u.END_BLOCK || l.type === u.END_EXPR) && g && (l.text === "]" && g.text === "[" || l.text === ")" && g.text === "(" || l.text === "}" && g.text === "{");
567
+ }, w.prototype._reset = function() {
568
+ E = !1;
569
+ }, w.prototype._get_next_token = function(l, g) {
570
+ var h = null;
571
+ this._readWhitespace();
572
+ var x = this._input.peek();
573
+ return x === null ? this._create_token(u.EOF, "") : (h = h || this._read_non_javascript(x), h = h || this._read_string(x), h = h || this._read_pair(x, this._input.peek(1)), h = h || this._read_word(l), h = h || this._read_singles(x), h = h || this._read_comment(x), h = h || this._read_regexp(x, l), h = h || this._read_xml(x, l), h = h || this._read_punctuation(), h = h || this._create_token(u.UNKNOWN, this._input.next()), h);
574
+ }, w.prototype._read_word = function(l) {
575
+ var g;
576
+ if (g = this.__patterns.identifier.read(), g !== "")
577
+ return g = g.replace(s.allLineBreaks, `
578
+ `), !(l.type === u.DOT || l.type === u.RESERVED && (l.text === "set" || l.text === "get")) && o.test(g) ? (g === "in" || g === "of") && (l.type === u.WORD || l.type === u.STRING) ? this._create_token(u.OPERATOR, g) : this._create_token(u.RESERVED, g) : this._create_token(u.WORD, g);
579
+ if (g = this.__patterns.number.read(), g !== "")
580
+ return this._create_token(u.WORD, g);
581
+ }, w.prototype._read_singles = function(l) {
582
+ var g = null;
583
+ return l === "(" || l === "[" ? g = this._create_token(u.START_EXPR, l) : l === ")" || l === "]" ? g = this._create_token(u.END_EXPR, l) : l === "{" ? g = this._create_token(u.START_BLOCK, l) : l === "}" ? g = this._create_token(u.END_BLOCK, l) : l === ";" ? g = this._create_token(u.SEMICOLON, l) : l === "." && y.test(this._input.peek(1)) ? g = this._create_token(u.DOT, l) : l === "," && (g = this._create_token(u.COMMA, l)), g && this._input.next(), g;
584
+ }, w.prototype._read_pair = function(l, g) {
585
+ var h = null;
586
+ return l === "#" && g === "{" && (h = this._create_token(u.START_BLOCK, l + g)), h && (this._input.next(), this._input.next()), h;
587
+ }, w.prototype._read_punctuation = function() {
588
+ var l = this.__patterns.punct.read();
589
+ if (l !== "")
590
+ return l === "=" ? this._create_token(u.EQUALS, l) : l === "?." ? this._create_token(u.DOT, l) : this._create_token(u.OPERATOR, l);
591
+ }, w.prototype._read_non_javascript = function(l) {
592
+ var g = "";
593
+ if (l === "#") {
594
+ if (this._is_first_token() && (g = this.__patterns.shebang.read(), g))
595
+ return this._create_token(u.UNKNOWN, g.trim() + `
596
+ `);
597
+ if (g = this.__patterns.include.read(), g)
598
+ return this._create_token(u.UNKNOWN, g.trim() + `
599
+ `);
600
+ l = this._input.next();
601
+ var h = "#";
602
+ if (this._input.hasNext() && this._input.testChar(v)) {
603
+ do
604
+ l = this._input.next(), h += l;
605
+ while (this._input.hasNext() && l !== "#" && l !== "=");
606
+ return l === "#" || (this._input.peek() === "[" && this._input.peek(1) === "]" ? (h += "[]", this._input.next(), this._input.next()) : this._input.peek() === "{" && this._input.peek(1) === "}" && (h += "{}", this._input.next(), this._input.next())), this._create_token(u.WORD, h);
607
+ }
608
+ this._input.back();
609
+ } else if (l === "<" && this._is_first_token()) {
610
+ if (g = this.__patterns.html_comment_start.read(), g) {
611
+ for (; this._input.hasNext() && !this._input.testChar(s.newline); )
612
+ g += this._input.next();
613
+ return E = !0, this._create_token(u.COMMENT, g);
614
+ }
615
+ } else if (E && l === "-" && (g = this.__patterns.html_comment_end.read(), g))
616
+ return E = !1, this._create_token(u.COMMENT, g);
617
+ return null;
618
+ }, w.prototype._read_comment = function(l) {
619
+ var g = null;
620
+ if (l === "/") {
621
+ var h = "";
622
+ if (this._input.peek(1) === "*") {
623
+ h = this.__patterns.block_comment.read();
624
+ var x = O.get_directives(h);
625
+ x && x.ignore === "start" && (h += O.readIgnored(this._input)), h = h.replace(s.allLineBreaks, `
626
+ `), g = this._create_token(u.BLOCK_COMMENT, h), g.directives = x;
627
+ } else this._input.peek(1) === "/" && (h = this.__patterns.comment.read(), g = this._create_token(u.COMMENT, h));
628
+ }
629
+ return g;
630
+ }, w.prototype._read_string = function(l) {
631
+ if (l === "`" || l === "'" || l === '"') {
632
+ var g = this._input.next();
633
+ return this.has_char_escapes = !1, l === "`" ? g += this._read_string_recursive("`", !0, "${") : g += this._read_string_recursive(l), this.has_char_escapes && this._options.unescape_strings && (g = k(g)), this._input.peek() === l && (g += this._input.next()), g = g.replace(s.allLineBreaks, `
634
+ `), this._create_token(u.STRING, g);
635
+ }
636
+ return null;
637
+ }, w.prototype._allow_regexp_or_xml = function(l) {
638
+ return l.type === u.RESERVED && n(l.text, ["return", "case", "throw", "else", "do", "typeof", "yield"]) || l.type === u.END_EXPR && l.text === ")" && l.opened.previous.type === u.RESERVED && n(l.opened.previous.text, ["if", "while", "for"]) || n(l.type, [
639
+ u.COMMENT,
640
+ u.START_EXPR,
641
+ u.START_BLOCK,
642
+ u.START,
643
+ u.END_BLOCK,
644
+ u.OPERATOR,
645
+ u.EQUALS,
646
+ u.EOF,
647
+ u.SEMICOLON,
648
+ u.COMMA
649
+ ]);
650
+ }, w.prototype._read_regexp = function(l, g) {
651
+ if (l === "/" && this._allow_regexp_or_xml(g)) {
652
+ for (var h = this._input.next(), x = !1, t = !1; this._input.hasNext() && (x || t || this._input.peek() !== l) && !this._input.testChar(s.newline); )
653
+ h += this._input.peek(), x ? x = !1 : (x = this._input.peek() === "\\", this._input.peek() === "[" ? t = !0 : this._input.peek() === "]" && (t = !1)), this._input.next();
654
+ return this._input.peek() === l && (h += this._input.next(), h += this._input.read(s.identifier)), this._create_token(u.STRING, h);
655
+ }
656
+ return null;
657
+ }, w.prototype._read_xml = function(l, g) {
658
+ if (this._options.e4x && l === "<" && this._allow_regexp_or_xml(g)) {
659
+ var h = "", x = this.__patterns.xml.read_match();
660
+ if (x) {
661
+ for (var t = x[2].replace(/^{\s+/, "{").replace(/\s+}$/, "}"), c = t.indexOf("{") === 0, d = 0; x; ) {
662
+ var T = !!x[1], R = x[2], L = !!x[x.length - 1] || R.slice(0, 8) === "![CDATA[";
663
+ if (!L && (R === t || c && R.replace(/^{\s+/, "{").replace(/\s+}$/, "}")) && (T ? --d : ++d), h += x[0], d <= 0)
664
+ break;
665
+ x = this.__patterns.xml.read_match();
666
+ }
667
+ return x || (h += this._input.match(/[\s\S]*/g)[0]), h = h.replace(s.allLineBreaks, `
668
+ `), this._create_token(u.STRING, h);
669
+ }
670
+ }
671
+ return null;
672
+ };
673
+ function k(l) {
674
+ for (var g = "", h = 0, x = new m(l), t = null; x.hasNext(); )
675
+ if (t = x.match(/([\s]|[^\\]|\\\\)+/g), t && (g += t[0]), x.peek() === "\\") {
676
+ if (x.next(), x.peek() === "x")
677
+ t = x.match(/x([0-9A-Fa-f]{2})/g);
678
+ else if (x.peek() === "u")
679
+ t = x.match(/u([0-9A-Fa-f]{4})/g), t || (t = x.match(/u\{([0-9A-Fa-f]+)\}/g));
680
+ else {
681
+ g += "\\", x.hasNext() && (g += x.next());
682
+ continue;
683
+ }
684
+ if (!t || (h = parseInt(t[1], 16), h > 126 && h <= 255 && t[0].indexOf("x") === 0))
685
+ return l;
686
+ h >= 0 && h < 32 || h > 1114111 ? g += "\\" + t[0] : h === 34 || h === 39 || h === 92 ? g += "\\" + String.fromCharCode(h) : g += String.fromCharCode(h);
687
+ }
688
+ return g;
689
+ }
690
+ return w.prototype._read_string_recursive = function(l, g, h) {
691
+ var x, t;
692
+ l === "'" ? t = this.__patterns.single_quote : l === '"' ? t = this.__patterns.double_quote : l === "`" ? t = this.__patterns.template_text : l === "}" && (t = this.__patterns.template_expression);
693
+ for (var c = t.read(), d = ""; this._input.hasNext(); ) {
694
+ if (d = this._input.next(), d === l || !g && s.newline.test(d)) {
695
+ this._input.back();
696
+ break;
697
+ } else d === "\\" && this._input.hasNext() ? (x = this._input.peek(), x === "x" || x === "u" ? this.has_char_escapes = !0 : x === "\r" && this._input.peek(1) === `
698
+ ` && this._input.next(), d += this._input.next()) : h && (h === "${" && d === "$" && this._input.peek() === "{" && (d += this._input.next()), h === d && (l === "`" ? d += this._read_string_recursive("}", g, "`") : d += this._read_string_recursive("`", g, "${"), this._input.hasNext() && (d += this._input.next())));
699
+ d += t.read(), c += d;
700
+ }
701
+ return c;
702
+ }, D.Tokenizer = w, D.TOKEN = u, D.positionable_operators = S.slice(), D.line_starters = r.slice(), D;
703
+ }
704
+ var St;
705
+ function Qt() {
706
+ if (St) return G;
707
+ St = 1;
708
+ var m = ot().Output, p = Mt().Token, _ = zt(), e = Ut().Options, s = M().Tokenizer, a = M().line_starters, f = M().positionable_operators, n = M().TOKEN;
709
+ function u(t, c) {
710
+ return c.indexOf(t) !== -1;
711
+ }
712
+ function O(t) {
713
+ return t.replace(/^\s+/g, "");
714
+ }
715
+ function b(t) {
716
+ for (var c = {}, d = 0; d < t.length; d++)
717
+ c[t[d].replace(/-/g, "_")] = t[d];
718
+ return c;
719
+ }
720
+ function v(t, c) {
721
+ return t && t.type === n.RESERVED && t.text === c;
722
+ }
723
+ function y(t, c) {
724
+ return t && t.type === n.RESERVED && u(t.text, c);
725
+ }
726
+ var S = ["case", "return", "do", "if", "throw", "else", "await", "break", "continue", "async"], A = ["before-newline", "after-newline", "preserve-newline"], N = b(A), r = [N.before_newline, N.preserve_newline], i = {
727
+ BlockStatement: "BlockStatement",
728
+ // 'BLOCK'
729
+ Statement: "Statement",
730
+ // 'STATEMENT'
731
+ ObjectLiteral: "ObjectLiteral",
732
+ // 'OBJECT',
733
+ ArrayLiteral: "ArrayLiteral",
734
+ //'[EXPRESSION]',
735
+ ForInitializer: "ForInitializer",
736
+ //'(FOR-EXPRESSION)',
737
+ Conditional: "Conditional",
738
+ //'(COND-EXPRESSION)',
739
+ Expression: "Expression"
740
+ //'(EXPRESSION)'
741
+ };
742
+ function o(t, c) {
743
+ c.multiline_frame || c.mode === i.ForInitializer || c.mode === i.Conditional || t.remove_indent(c.start_line_index);
744
+ }
745
+ function E(t) {
746
+ t = t.replace(_.allLineBreaks, `
747
+ `);
748
+ for (var c = [], d = t.indexOf(`
749
+ `); d !== -1; )
750
+ c.push(t.substring(0, d)), t = t.substring(d + 1), d = t.indexOf(`
751
+ `);
752
+ return t.length && c.push(t), c;
753
+ }
754
+ function w(t) {
755
+ return t === i.ArrayLiteral;
756
+ }
757
+ function k(t) {
758
+ return u(t, [i.Expression, i.ForInitializer, i.Conditional]);
759
+ }
760
+ function l(t, c) {
761
+ for (var d = 0; d < t.length; d++) {
762
+ var T = t[d].trim();
763
+ if (T.charAt(0) !== c)
764
+ return !1;
765
+ }
766
+ return !0;
767
+ }
768
+ function g(t, c) {
769
+ for (var d = 0, T = t.length, R; d < T; d++)
770
+ if (R = t[d], R && R.indexOf(c) !== 0)
771
+ return !1;
772
+ return !0;
773
+ }
774
+ function h(t, c) {
775
+ c = c || {}, this._source_text = t || "", 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(c);
776
+ }
777
+ h.prototype.create_flags = function(t, c) {
778
+ var d = 0;
779
+ t && (d = t.indentation_level, !this._output.just_added_newline() && t.line_indent_level > d && (d = t.line_indent_level));
780
+ var T = {
781
+ mode: c,
782
+ parent: t,
783
+ last_token: t ? t.last_token : new p(n.START_BLOCK, ""),
784
+ // last token text
785
+ last_word: t ? t.last_word : "",
786
+ // last TOKEN.WORD passed
787
+ declaration_statement: !1,
788
+ declaration_assignment: !1,
789
+ multiline_frame: !1,
790
+ inline_frame: !1,
791
+ if_block: !1,
792
+ else_block: !1,
793
+ class_start_block: !1,
794
+ // class A { INSIDE HERE } or class B extends C { INSIDE HERE }
795
+ do_block: !1,
796
+ do_while: !1,
797
+ import_block: !1,
798
+ in_case_statement: !1,
799
+ // switch(..){ INSIDE HERE }
800
+ in_case: !1,
801
+ // we're on the exact line with "case 0:"
802
+ case_body: !1,
803
+ // the indented case-action block
804
+ case_block: !1,
805
+ // the indented case-action block is wrapped with {}
806
+ indentation_level: d,
807
+ alignment: 0,
808
+ line_indent_level: t ? t.line_indent_level : d,
809
+ start_line_index: this._output.get_line_number(),
810
+ ternary_depth: 0
811
+ };
812
+ return T;
813
+ }, h.prototype._reset = function(t) {
814
+ var c = t.match(/^[\t ]*/)[0];
815
+ this._last_last_text = "", this._output = new m(this._options, c), this._output.raw = this._options.test_output_raw, this._flag_store = [], this.set_mode(i.BlockStatement);
816
+ var d = new s(t, this._options);
817
+ return this._tokens = d.tokenize(), t;
818
+ }, h.prototype.beautify = function() {
819
+ if (this._options.disabled)
820
+ return this._source_text;
821
+ var t, c = this._reset(this._source_text), d = this._options.eol;
822
+ this._options.eol === "auto" && (d = `
823
+ `, c && _.lineBreak.test(c || "") && (d = c.match(_.lineBreak)[0]));
824
+ for (var T = this._tokens.next(); T; )
825
+ this.handle_token(T), this._last_last_text = this._flags.last_token.text, this._flags.last_token = T, T = this._tokens.next();
826
+ return t = this._output.get_code(d), t;
827
+ }, h.prototype.handle_token = function(t, c) {
828
+ t.type === n.START_EXPR ? this.handle_start_expr(t) : t.type === n.END_EXPR ? this.handle_end_expr(t) : t.type === n.START_BLOCK ? this.handle_start_block(t) : t.type === n.END_BLOCK ? this.handle_end_block(t) : t.type === n.WORD ? this.handle_word(t) : t.type === n.RESERVED ? this.handle_word(t) : t.type === n.SEMICOLON ? this.handle_semicolon(t) : t.type === n.STRING ? this.handle_string(t) : t.type === n.EQUALS ? this.handle_equals(t) : t.type === n.OPERATOR ? this.handle_operator(t) : t.type === n.COMMA ? this.handle_comma(t) : t.type === n.BLOCK_COMMENT ? this.handle_block_comment(t, c) : t.type === n.COMMENT ? this.handle_comment(t, c) : t.type === n.DOT ? this.handle_dot(t) : t.type === n.EOF ? this.handle_eof(t) : t.type === n.UNKNOWN ? this.handle_unknown(t, c) : this.handle_unknown(t, c);
829
+ }, h.prototype.handle_whitespace_and_comments = function(t, c) {
830
+ var d = t.newlines, T = this._options.keep_array_indentation && w(this._flags.mode);
831
+ if (t.comments_before)
832
+ for (var R = t.comments_before.next(); R; )
833
+ this.handle_whitespace_and_comments(R, c), this.handle_token(R, c), R = t.comments_before.next();
834
+ if (T)
835
+ for (var L = 0; L < d; L += 1)
836
+ this.print_newline(L > 0, c);
837
+ else if (this._options.max_preserve_newlines && d > this._options.max_preserve_newlines && (d = this._options.max_preserve_newlines), this._options.preserve_newlines && d > 1) {
838
+ this.print_newline(!1, c);
839
+ for (var C = 1; C < d; C += 1)
840
+ this.print_newline(!0, c);
841
+ }
842
+ };
843
+ var x = ["async", "break", "continue", "return", "throw", "yield"];
844
+ return h.prototype.allow_wrap_or_preserved_newline = function(t, c) {
845
+ if (c = c === void 0 ? !1 : c, !this._output.just_added_newline()) {
846
+ var d = this._options.preserve_newlines && t.newlines || c, T = u(this._flags.last_token.text, f) || u(t.text, f);
847
+ if (T) {
848
+ var R = u(this._flags.last_token.text, f) && u(this._options.operator_position, r) || u(t.text, f);
849
+ d = d && R;
850
+ }
851
+ if (d)
852
+ this.print_newline(!1, !0);
853
+ else if (this._options.wrap_line_length) {
854
+ if (y(this._flags.last_token, x))
855
+ return;
856
+ this._output.set_wrap_point();
857
+ }
858
+ }
859
+ }, h.prototype.print_newline = function(t, c) {
860
+ if (!c && this._flags.last_token.text !== ";" && this._flags.last_token.text !== "," && this._flags.last_token.text !== "=" && (this._flags.last_token.type !== n.OPERATOR || this._flags.last_token.text === "--" || this._flags.last_token.text === "++"))
861
+ for (var d = this._tokens.peek(); this._flags.mode === i.Statement && !(this._flags.if_block && v(d, "else")) && !this._flags.do_block; )
862
+ this.restore_mode();
863
+ this._output.add_new_line(t) && (this._flags.multiline_frame = !0);
864
+ }, h.prototype.print_token_line_indentation = function(t) {
865
+ this._output.just_added_newline() && (this._options.keep_array_indentation && t.newlines && (t.text === "[" || w(this._flags.mode)) ? (this._output.current_line.set_indent(-1), this._output.current_line.push(t.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));
866
+ }, h.prototype.print_token = function(t) {
867
+ if (this._output.raw) {
868
+ this._output.add_raw_token(t);
869
+ return;
870
+ }
871
+ if (this._options.comma_first && t.previous && t.previous.type === n.COMMA && this._output.just_added_newline() && this._output.previous_line.last() === ",") {
872
+ var c = this._output.previous_line.pop();
873
+ this._output.previous_line.is_empty() && (this._output.previous_line.push(c), this._output.trim(!0), this._output.current_line.pop(), this._output.trim()), this.print_token_line_indentation(t), this._output.add_token(","), this._output.space_before_token = !0;
874
+ }
875
+ this.print_token_line_indentation(t), this._output.non_breaking_space = !0, this._output.add_token(t.text), this._output.previous_token_wrapped && (this._flags.multiline_frame = !0);
876
+ }, h.prototype.indent = function() {
877
+ this._flags.indentation_level += 1, this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
878
+ }, h.prototype.deindent = function() {
879
+ 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));
880
+ }, h.prototype.set_mode = function(t) {
881
+ this._flags ? (this._flag_store.push(this._flags), this._previous_flags = this._flags) : this._previous_flags = this.create_flags(null, t), this._flags = this.create_flags(this._previous_flags, t), this._output.set_indent(this._flags.indentation_level, this._flags.alignment);
882
+ }, h.prototype.restore_mode = function() {
883
+ this._flag_store.length > 0 && (this._previous_flags = this._flags, this._flags = this._flag_store.pop(), this._previous_flags.mode === i.Statement && o(this._output, this._previous_flags), this._output.set_indent(this._flags.indentation_level, this._flags.alignment));
884
+ }, h.prototype.start_of_object_property = function() {
885
+ return this._flags.parent.mode === i.ObjectLiteral && this._flags.mode === i.Statement && (this._flags.last_token.text === ":" && this._flags.ternary_depth === 0 || y(this._flags.last_token, ["get", "set"]));
886
+ }, h.prototype.start_of_statement = function(t) {
887
+ var c = !1;
888
+ return c = c || y(this._flags.last_token, ["var", "let", "const"]) && t.type === n.WORD, c = c || v(this._flags.last_token, "do"), c = c || !(this._flags.parent.mode === i.ObjectLiteral && this._flags.mode === i.Statement) && y(this._flags.last_token, x) && !t.newlines, c = c || v(this._flags.last_token, "else") && !(v(t, "if") && !t.comments_before), c = c || this._flags.last_token.type === n.END_EXPR && (this._previous_flags.mode === i.ForInitializer || this._previous_flags.mode === i.Conditional), c = c || this._flags.last_token.type === n.WORD && this._flags.mode === i.BlockStatement && !this._flags.in_case && !(t.text === "--" || t.text === "++") && this._last_last_text !== "function" && t.type !== n.WORD && t.type !== n.RESERVED, c = c || this._flags.mode === i.ObjectLiteral && (this._flags.last_token.text === ":" && this._flags.ternary_depth === 0 || y(this._flags.last_token, ["get", "set"])), c ? (this.set_mode(i.Statement), this.indent(), this.handle_whitespace_and_comments(t, !0), this.start_of_object_property() || this.allow_wrap_or_preserved_newline(
889
+ t,
890
+ y(t, ["do", "for", "if", "while"])
891
+ ), !0) : !1;
892
+ }, h.prototype.handle_start_expr = function(t) {
893
+ this.start_of_statement(t) || this.handle_whitespace_and_comments(t);
894
+ var c = i.Expression;
895
+ if (t.text === "[") {
896
+ if (this._flags.last_token.type === n.WORD || this._flags.last_token.text === ")") {
897
+ y(this._flags.last_token, a) && (this._output.space_before_token = !0), this.print_token(t), this.set_mode(c), this.indent(), this._options.space_in_paren && (this._output.space_before_token = !0);
898
+ return;
899
+ }
900
+ c = i.ArrayLiteral, w(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()), u(this._flags.last_token.type, [n.START_EXPR, n.END_EXPR, n.WORD, n.OPERATOR, n.DOT]) || (this._output.space_before_token = !0);
901
+ } else {
902
+ if (this._flags.last_token.type === n.RESERVED)
903
+ this._flags.last_token.text === "for" ? (this._output.space_before_token = this._options.space_before_conditional, c = i.ForInitializer) : u(this._flags.last_token.text, ["if", "while", "switch"]) ? (this._output.space_before_token = this._options.space_before_conditional, c = i.Conditional) : u(this._flags.last_word, ["await", "async"]) ? this._output.space_before_token = !0 : this._flags.last_token.text === "import" && t.whitespace_before === "" ? this._output.space_before_token = !1 : (u(this._flags.last_token.text, a) || this._flags.last_token.text === "catch") && (this._output.space_before_token = !0);
904
+ else if (this._flags.last_token.type === n.EQUALS || this._flags.last_token.type === n.OPERATOR)
905
+ this.start_of_object_property() || this.allow_wrap_or_preserved_newline(t);
906
+ else if (this._flags.last_token.type === n.WORD) {
907
+ this._output.space_before_token = !1;
908
+ var d = this._tokens.peek(-3);
909
+ if (this._options.space_after_named_function && d) {
910
+ var T = this._tokens.peek(-4);
911
+ y(d, ["async", "function"]) || d.text === "*" && y(T, ["async", "function"]) ? this._output.space_before_token = !0 : this._flags.mode === i.ObjectLiteral ? (d.text === "{" || d.text === "," || d.text === "*" && (T.text === "{" || T.text === ",")) && (this._output.space_before_token = !0) : this._flags.parent && this._flags.parent.class_start_block && (this._output.space_before_token = !0);
912
+ }
913
+ } else
914
+ this.allow_wrap_or_preserved_newline(t);
915
+ (this._flags.last_token.type === n.RESERVED && (this._flags.last_word === "function" || this._flags.last_word === "typeof") || this._flags.last_token.text === "*" && (u(this._last_last_text, ["function", "yield"]) || this._flags.mode === i.ObjectLiteral && u(this._last_last_text, ["{", ","]))) && (this._output.space_before_token = this._options.space_after_anon_function);
916
+ }
917
+ this._flags.last_token.text === ";" || this._flags.last_token.type === n.START_BLOCK ? this.print_newline() : (this._flags.last_token.type === n.END_EXPR || this._flags.last_token.type === n.START_EXPR || this._flags.last_token.type === n.END_BLOCK || this._flags.last_token.text === "." || this._flags.last_token.type === n.COMMA) && this.allow_wrap_or_preserved_newline(t, t.newlines), this.print_token(t), this.set_mode(c), this._options.space_in_paren && (this._output.space_before_token = !0), this.indent();
918
+ }, h.prototype.handle_end_expr = function(t) {
919
+ for (; this._flags.mode === i.Statement; )
920
+ this.restore_mode();
921
+ this.handle_whitespace_and_comments(t), this._flags.multiline_frame && this.allow_wrap_or_preserved_newline(
922
+ t,
923
+ t.text === "]" && w(this._flags.mode) && !this._options.keep_array_indentation
924
+ ), this._options.space_in_paren && (this._flags.last_token.type === n.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(t), this.restore_mode(), o(this._output, this._previous_flags), this._flags.do_while && this._previous_flags.mode === i.Conditional && (this._previous_flags.mode = i.Expression, this._flags.do_block = !1, this._flags.do_while = !1);
925
+ }, h.prototype.handle_start_block = function(t) {
926
+ this.handle_whitespace_and_comments(t);
927
+ var c = this._tokens.peek(), d = this._tokens.peek(1);
928
+ this._flags.last_word === "switch" && this._flags.last_token.type === n.END_EXPR ? (this.set_mode(i.BlockStatement), this._flags.in_case_statement = !0) : this._flags.case_body ? this.set_mode(i.BlockStatement) : d && (u(d.text, [":", ","]) && u(c.type, [n.STRING, n.WORD, n.RESERVED]) || u(c.text, ["get", "set", "..."]) && u(d.type, [n.WORD, n.RESERVED])) ? u(this._last_last_text, ["class", "interface"]) && !u(d.text, [":", ","]) ? this.set_mode(i.BlockStatement) : this.set_mode(i.ObjectLiteral) : this._flags.last_token.type === n.OPERATOR && this._flags.last_token.text === "=>" ? this.set_mode(i.BlockStatement) : u(this._flags.last_token.type, [n.EQUALS, n.START_EXPR, n.COMMA, n.OPERATOR]) || y(this._flags.last_token, ["return", "throw", "import", "default"]) ? this.set_mode(i.ObjectLiteral) : this.set_mode(i.BlockStatement), this._flags.last_token && y(this._flags.last_token.previous, ["class", "extends"]) && (this._flags.class_start_block = !0);
929
+ var T = !c.comments_before && c.text === "}", R = T && this._flags.last_word === "function" && this._flags.last_token.type === n.END_EXPR;
930
+ if (this._options.brace_preserve_inline) {
931
+ var L = 0, C = null;
932
+ this._flags.inline_frame = !0;
933
+ do
934
+ if (L += 1, C = this._tokens.peek(L - 1), C.newlines) {
935
+ this._flags.inline_frame = !1;
936
+ break;
937
+ }
938
+ while (C.type !== n.EOF && !(C.type === n.END_BLOCK && C.opened === t));
939
+ }
940
+ (this._options.brace_style === "expand" || this._options.brace_style === "none" && t.newlines) && !this._flags.inline_frame ? this._flags.last_token.type !== n.OPERATOR && (R || this._flags.last_token.type === n.EQUALS || y(this._flags.last_token, S) && this._flags.last_token.text !== "else") ? this._output.space_before_token = !0 : this.print_newline(!1, !0) : (w(this._previous_flags.mode) && (this._flags.last_token.type === n.START_EXPR || this._flags.last_token.type === n.COMMA) && ((this._flags.last_token.type === n.COMMA || this._options.space_in_paren) && (this._output.space_before_token = !0), (this._flags.last_token.type === n.COMMA || this._flags.last_token.type === n.START_EXPR && this._flags.inline_frame) && (this.allow_wrap_or_preserved_newline(t), this._previous_flags.multiline_frame = this._previous_flags.multiline_frame || this._flags.multiline_frame, this._flags.multiline_frame = !1)), this._flags.last_token.type !== n.OPERATOR && this._flags.last_token.type !== n.START_EXPR && (u(this._flags.last_token.type, [n.START_BLOCK, n.SEMICOLON]) && !this._flags.inline_frame ? this.print_newline() : this._output.space_before_token = !0)), this.print_token(t), this.indent(), !T && !(this._options.brace_preserve_inline && this._flags.inline_frame) && this.print_newline();
941
+ }, h.prototype.handle_end_block = function(t) {
942
+ for (this.handle_whitespace_and_comments(t); this._flags.mode === i.Statement; )
943
+ this.restore_mode();
944
+ var c = this._flags.last_token.type === n.START_BLOCK;
945
+ this._flags.inline_frame && !c ? this._output.space_before_token = !0 : this._options.brace_style === "expand" ? c || this.print_newline() : c || (w(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(t);
946
+ }, h.prototype.handle_word = function(t) {
947
+ if (t.type === n.RESERVED) {
948
+ if (u(t.text, ["set", "get"]) && this._flags.mode !== i.ObjectLiteral)
949
+ t.type = n.WORD;
950
+ else if (t.text === "import" && u(this._tokens.peek().text, ["(", "."]))
951
+ t.type = n.WORD;
952
+ else if (u(t.text, ["as", "from"]) && !this._flags.import_block)
953
+ t.type = n.WORD;
954
+ else if (this._flags.mode === i.ObjectLiteral) {
955
+ var c = this._tokens.peek();
956
+ c.text === ":" && (t.type = n.WORD);
957
+ }
958
+ }
959
+ if (this.start_of_statement(t) ? y(this._flags.last_token, ["var", "let", "const"]) && t.type === n.WORD && (this._flags.declaration_statement = !0) : t.newlines && !k(this._flags.mode) && (this._flags.last_token.type !== n.OPERATOR || this._flags.last_token.text === "--" || this._flags.last_token.text === "++") && this._flags.last_token.type !== n.EQUALS && (this._options.preserve_newlines || !y(this._flags.last_token, ["var", "let", "const", "set", "get"])) ? (this.handle_whitespace_and_comments(t), this.print_newline()) : this.handle_whitespace_and_comments(t), this._flags.do_block && !this._flags.do_while)
960
+ if (v(t, "while")) {
961
+ this._output.space_before_token = !0, this.print_token(t), this._output.space_before_token = !0, this._flags.do_while = !0;
962
+ return;
963
+ } else
964
+ this.print_newline(), this._flags.do_block = !1;
965
+ if (this._flags.if_block)
966
+ if (!this._flags.else_block && v(t, "else"))
967
+ this._flags.else_block = !0;
968
+ else {
969
+ for (; this._flags.mode === i.Statement; )
970
+ this.restore_mode();
971
+ this._flags.if_block = !1, this._flags.else_block = !1;
972
+ }
973
+ if (this._flags.in_case_statement && y(t, ["case", "default"])) {
974
+ 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(t), this._flags.in_case = !0;
975
+ return;
976
+ }
977
+ if ((this._flags.last_token.type === n.COMMA || this._flags.last_token.type === n.START_EXPR || this._flags.last_token.type === n.EQUALS || this._flags.last_token.type === n.OPERATOR) && !this.start_of_object_property() && !// start of object property is different for numeric values with +/- prefix operators
978
+ (u(this._flags.last_token.text, ["+", "-"]) && this._last_last_text === ":" && this._flags.parent.mode === i.ObjectLiteral) && this.allow_wrap_or_preserved_newline(t), v(t, "function")) {
979
+ (u(this._flags.last_token.text, ["}", ";"]) || this._output.just_added_newline() && !(u(this._flags.last_token.text, ["(", "[", "{", ":", "=", ","]) || this._flags.last_token.type === n.OPERATOR)) && !this._output.just_added_blankline() && !t.comments_before && (this.print_newline(), this.print_newline(!0)), this._flags.last_token.type === n.RESERVED || this._flags.last_token.type === n.WORD ? y(this._flags.last_token, ["get", "set", "new", "export"]) || y(this._flags.last_token, x) ? this._output.space_before_token = !0 : v(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 === n.OPERATOR || this._flags.last_token.text === "=" ? this._output.space_before_token = !0 : !this._flags.multiline_frame && (k(this._flags.mode) || w(this._flags.mode)) || this.print_newline(), this.print_token(t), this._flags.last_word = t.text;
980
+ return;
981
+ }
982
+ var d = "NONE";
983
+ if (this._flags.last_token.type === n.END_BLOCK ? this._previous_flags.inline_frame ? d = "SPACE" : y(t, ["else", "catch", "finally", "from"]) ? this._options.brace_style === "expand" || this._options.brace_style === "end-expand" || this._options.brace_style === "none" && t.newlines ? d = "NEWLINE" : (d = "SPACE", this._output.space_before_token = !0) : d = "NEWLINE" : this._flags.last_token.type === n.SEMICOLON && this._flags.mode === i.BlockStatement ? d = "NEWLINE" : this._flags.last_token.type === n.SEMICOLON && k(this._flags.mode) ? d = "SPACE" : this._flags.last_token.type === n.STRING ? d = "NEWLINE" : this._flags.last_token.type === n.RESERVED || this._flags.last_token.type === n.WORD || this._flags.last_token.text === "*" && (u(this._last_last_text, ["function", "yield"]) || this._flags.mode === i.ObjectLiteral && u(this._last_last_text, ["{", ","])) ? d = "SPACE" : this._flags.last_token.type === n.START_BLOCK ? this._flags.inline_frame ? d = "SPACE" : d = "NEWLINE" : this._flags.last_token.type === n.END_EXPR && (this._output.space_before_token = !0, d = "NEWLINE"), y(t, a) && this._flags.last_token.text !== ")" && (this._flags.inline_frame || this._flags.last_token.text === "else" || this._flags.last_token.text === "export" ? d = "SPACE" : d = "NEWLINE"), y(t, ["else", "catch", "finally"]))
984
+ if ((!(this._flags.last_token.type === n.END_BLOCK && this._previous_flags.mode === i.BlockStatement) || this._options.brace_style === "expand" || this._options.brace_style === "end-expand" || this._options.brace_style === "none" && t.newlines) && !this._flags.inline_frame)
985
+ this.print_newline();
986
+ else {
987
+ this._output.trim(!0);
988
+ var T = this._output.current_line;
989
+ T.last() !== "}" && this.print_newline(), this._output.space_before_token = !0;
990
+ }
991
+ else d === "NEWLINE" ? y(this._flags.last_token, S) ? this._output.space_before_token = !0 : this._flags.last_token.text === "declare" && y(t, ["var", "let", "const"]) ? this._output.space_before_token = !0 : this._flags.last_token.type !== n.END_EXPR ? (this._flags.last_token.type !== n.START_EXPR || !y(t, ["var", "let", "const"])) && this._flags.last_token.text !== ":" && (v(t, "if") && v(t.previous, "else") ? this._output.space_before_token = !0 : this.print_newline()) : y(t, a) && this._flags.last_token.text !== ")" && this.print_newline() : this._flags.multiline_frame && w(this._flags.mode) && this._flags.last_token.text === "," && this._last_last_text === "}" ? this.print_newline() : d === "SPACE" && (this._output.space_before_token = !0);
992
+ t.previous && (t.previous.type === n.WORD || t.previous.type === n.RESERVED) && (this._output.space_before_token = !0), this.print_token(t), this._flags.last_word = t.text, t.type === n.RESERVED && (t.text === "do" ? this._flags.do_block = !0 : t.text === "if" ? this._flags.if_block = !0 : t.text === "import" ? this._flags.import_block = !0 : this._flags.import_block && v(t, "from") && (this._flags.import_block = !1));
993
+ }, h.prototype.handle_semicolon = function(t) {
994
+ this.start_of_statement(t) ? this._output.space_before_token = !1 : this.handle_whitespace_and_comments(t);
995
+ for (var c = this._tokens.peek(); this._flags.mode === i.Statement && !(this._flags.if_block && v(c, "else")) && !this._flags.do_block; )
996
+ this.restore_mode();
997
+ this._flags.import_block && (this._flags.import_block = !1), this.print_token(t);
998
+ }, h.prototype.handle_string = function(t) {
999
+ t.text.startsWith("`") && t.newlines === 0 && t.whitespace_before === "" && (t.previous.text === ")" || this._flags.last_token.type === n.WORD) || (this.start_of_statement(t) ? this._output.space_before_token = !0 : (this.handle_whitespace_and_comments(t), this._flags.last_token.type === n.RESERVED || this._flags.last_token.type === n.WORD || this._flags.inline_frame ? this._output.space_before_token = !0 : this._flags.last_token.type === n.COMMA || this._flags.last_token.type === n.START_EXPR || this._flags.last_token.type === n.EQUALS || this._flags.last_token.type === n.OPERATOR ? this.start_of_object_property() || this.allow_wrap_or_preserved_newline(t) : t.text.startsWith("`") && this._flags.last_token.type === n.END_EXPR && (t.previous.text === "]" || t.previous.text === ")") && t.newlines === 0 ? this._output.space_before_token = !0 : this.print_newline())), this.print_token(t);
1000
+ }, h.prototype.handle_equals = function(t) {
1001
+ this.start_of_statement(t) || this.handle_whitespace_and_comments(t), this._flags.declaration_statement && (this._flags.declaration_assignment = !0), this._output.space_before_token = !0, this.print_token(t), this._output.space_before_token = !0;
1002
+ }, h.prototype.handle_comma = function(t) {
1003
+ this.handle_whitespace_and_comments(t, !0), this.print_token(t), this._output.space_before_token = !0, this._flags.declaration_statement ? (k(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(t)) : this._flags.mode === i.ObjectLiteral || this._flags.mode === i.Statement && this._flags.parent.mode === i.ObjectLiteral ? (this._flags.mode === i.Statement && this.restore_mode(), this._flags.inline_frame || this.print_newline()) : this._options.comma_first && this.allow_wrap_or_preserved_newline(t);
1004
+ }, h.prototype.handle_operator = function(t) {
1005
+ var c = t.text === "*" && (y(this._flags.last_token, ["function", "yield"]) || u(this._flags.last_token.type, [n.START_BLOCK, n.COMMA, n.END_BLOCK, n.SEMICOLON])), d = u(t.text, ["-", "+"]) && (u(this._flags.last_token.type, [n.START_BLOCK, n.START_EXPR, n.EQUALS, n.OPERATOR]) || u(this._flags.last_token.text, a) || this._flags.last_token.text === ",");
1006
+ if (!this.start_of_statement(t)) {
1007
+ var T = !c;
1008
+ this.handle_whitespace_and_comments(t, T);
1009
+ }
1010
+ if (t.text === "*" && this._flags.last_token.type === n.DOT) {
1011
+ this.print_token(t);
1012
+ return;
1013
+ }
1014
+ if (t.text === "::") {
1015
+ this.print_token(t);
1016
+ return;
1017
+ }
1018
+ if (u(t.text, ["-", "+"]) && this.start_of_object_property()) {
1019
+ this.print_token(t);
1020
+ return;
1021
+ }
1022
+ if (this._flags.last_token.type === n.OPERATOR && u(this._options.operator_position, r) && this.allow_wrap_or_preserved_newline(t), t.text === ":" && this._flags.in_case) {
1023
+ this.print_token(t), this._flags.in_case = !1, this._flags.case_body = !0, this._tokens.peek().type !== n.START_BLOCK ? (this.indent(), this.print_newline(), this._flags.case_block = !1) : (this._flags.case_block = !0, this._output.space_before_token = !0);
1024
+ return;
1025
+ }
1026
+ var R = !0, L = !0, C = !1;
1027
+ if (t.text === ":" ? this._flags.ternary_depth === 0 ? R = !1 : (this._flags.ternary_depth -= 1, C = !0) : t.text === "?" && (this._flags.ternary_depth += 1), !d && !c && this._options.preserve_newlines && u(t.text, f)) {
1028
+ var P = t.text === ":", j = P && C, $ = P && !C;
1029
+ switch (this._options.operator_position) {
1030
+ case N.before_newline:
1031
+ this._output.space_before_token = !$, this.print_token(t), (!P || j) && this.allow_wrap_or_preserved_newline(t), this._output.space_before_token = !0;
1032
+ return;
1033
+ case N.after_newline:
1034
+ this._output.space_before_token = !0, !P || j ? this._tokens.peek().newlines ? this.print_newline(!1, !0) : this.allow_wrap_or_preserved_newline(t) : this._output.space_before_token = !1, this.print_token(t), this._output.space_before_token = !0;
1035
+ return;
1036
+ case N.preserve_newline:
1037
+ $ || this.allow_wrap_or_preserved_newline(t), R = !(this._output.just_added_newline() || $), this._output.space_before_token = R, this.print_token(t), this._output.space_before_token = !0;
1038
+ return;
1039
+ }
1040
+ }
1041
+ if (c) {
1042
+ this.allow_wrap_or_preserved_newline(t), R = !1;
1043
+ var ft = this._tokens.peek();
1044
+ L = ft && u(ft.type, [n.WORD, n.RESERVED]);
1045
+ } else if (t.text === "...")
1046
+ this.allow_wrap_or_preserved_newline(t), R = this._flags.last_token.type === n.START_BLOCK, L = !1;
1047
+ else if (u(t.text, ["--", "++", "!", "~"]) || d) {
1048
+ if ((this._flags.last_token.type === n.COMMA || this._flags.last_token.type === n.START_EXPR) && this.allow_wrap_or_preserved_newline(t), R = !1, L = !1, t.newlines && (t.text === "--" || t.text === "++" || t.text === "~")) {
1049
+ var ct = y(this._flags.last_token, S) && t.newlines;
1050
+ ct && (this._previous_flags.if_block || this._previous_flags.else_block) && this.restore_mode(), this.print_newline(ct, !0);
1051
+ }
1052
+ this._flags.last_token.text === ";" && k(this._flags.mode) && (R = !0), this._flags.last_token.type === n.RESERVED ? R = !0 : this._flags.last_token.type === n.END_EXPR ? R = !(this._flags.last_token.text === "]" && (t.text === "--" || t.text === "++")) : this._flags.last_token.type === n.OPERATOR && (R = u(t.text, ["--", "-", "++", "+"]) && u(this._flags.last_token.text, ["--", "-", "++", "+"]), u(t.text, ["+", "-"]) && u(this._flags.last_token.text, ["--", "++"]) && (L = !0)), (this._flags.mode === i.BlockStatement && !this._flags.inline_frame || this._flags.mode === i.Statement) && (this._flags.last_token.text === "{" || this._flags.last_token.text === ";") && this.print_newline();
1053
+ }
1054
+ this._output.space_before_token = this._output.space_before_token || R, this.print_token(t), this._output.space_before_token = L;
1055
+ }, h.prototype.handle_block_comment = function(t, c) {
1056
+ if (this._output.raw) {
1057
+ this._output.add_raw_token(t), t.directives && t.directives.preserve === "end" && (this._output.raw = this._options.test_output_raw);
1058
+ return;
1059
+ }
1060
+ if (t.directives) {
1061
+ this.print_newline(!1, c), this.print_token(t), t.directives.preserve === "start" && (this._output.raw = !0), this.print_newline(!1, !0);
1062
+ return;
1063
+ }
1064
+ if (!_.newline.test(t.text) && !t.newlines) {
1065
+ this._output.space_before_token = !0, this.print_token(t), this._output.space_before_token = !0;
1066
+ return;
1067
+ } else
1068
+ this.print_block_commment(t, c);
1069
+ }, h.prototype.print_block_commment = function(t, c) {
1070
+ var d = E(t.text), T, R = !1, L = !1, C = t.whitespace_before, P = C.length;
1071
+ if (this.print_newline(!1, c), this.print_token_line_indentation(t), this._output.add_token(d[0]), this.print_newline(!1, c), d.length > 1) {
1072
+ for (d = d.slice(1), R = l(d, "*"), L = g(d, C), R && (this._flags.alignment = 1), T = 0; T < d.length; T++)
1073
+ R ? (this.print_token_line_indentation(t), this._output.add_token(O(d[T]))) : L && d[T] ? (this.print_token_line_indentation(t), this._output.add_token(d[T].substring(P))) : (this._output.current_line.set_indent(-1), this._output.add_token(d[T])), this.print_newline(!1, c);
1074
+ this._flags.alignment = 0;
1075
+ }
1076
+ }, h.prototype.handle_comment = function(t, c) {
1077
+ t.newlines ? this.print_newline(!1, c) : this._output.trim(!0), this._output.space_before_token = !0, this.print_token(t), this.print_newline(!1, c);
1078
+ }, h.prototype.handle_dot = function(t) {
1079
+ this.start_of_statement(t) || this.handle_whitespace_and_comments(t, !0), this._flags.last_token.text.match("^[0-9]+$") && (this._output.space_before_token = !0), y(this._flags.last_token, S) ? this._output.space_before_token = !1 : this.allow_wrap_or_preserved_newline(
1080
+ t,
1081
+ this._flags.last_token.text === ")" && this._options.break_chained_methods
1082
+ ), this._options.unindent_chained_methods && this._output.just_added_newline() && this.deindent(), this.print_token(t);
1083
+ }, h.prototype.handle_unknown = function(t, c) {
1084
+ this.print_token(t), t.text[t.text.length - 1] === `
1085
+ ` && this.print_newline(!1, c);
1086
+ }, h.prototype.handle_eof = function(t) {
1087
+ for (; this._flags.mode === i.Statement; )
1088
+ this.restore_mode();
1089
+ this.handle_whitespace_and_comments(t);
1090
+ }, G.Beautifier = h, G;
1091
+ }
1092
+ var At;
1093
+ function Yt() {
1094
+ if (At) return I.exports;
1095
+ At = 1;
1096
+ var m = Qt().Beautifier, p = Ut().Options;
1097
+ function _(e, s) {
1098
+ var a = new m(e, s);
1099
+ return a.beautify();
1100
+ }
1101
+ return I.exports = _, I.exports.defaultOptions = function() {
1102
+ return new p();
1103
+ }, I.exports;
1104
+ }
1105
+ var z = { exports: {} }, _t = {}, at = {}, Nt;
1106
+ function Ft() {
1107
+ if (Nt) return at;
1108
+ Nt = 1;
1109
+ var m = ht().Options;
1110
+ function p(_) {
1111
+ m.call(this, _, "css"), this.selector_separator_newline = this._get_boolean("selector_separator_newline", !0), this.newline_between_rules = this._get_boolean("newline_between_rules", !0);
1112
+ var e = this._get_boolean("space_around_selector_separator");
1113
+ this.space_around_combinator = this._get_boolean("space_around_combinator") || e;
1114
+ var s = this._get_selection_list("brace_style", ["collapse", "expand", "end-expand", "none", "preserve-inline"]);
1115
+ this.brace_style = "collapse";
1116
+ for (var a = 0; a < s.length; a++)
1117
+ s[a] !== "expand" ? this.brace_style = "collapse" : this.brace_style = s[a];
1118
+ }
1119
+ return p.prototype = new m(), at.Options = p, at;
1120
+ }
1121
+ var Lt;
1122
+ function Zt() {
1123
+ if (Lt) return _t;
1124
+ Lt = 1;
1125
+ var m = Ft().Options, p = ot().Output, _ = lt().InputScanner, e = pt().Directives, s = new e(/\/\*/, /\*\//), a = /\r\n|[\r\n]/, f = /\r\n|[\r\n]/g, n = /\s/, u = /(?:\s|\n)+/g, O = /\/\*(?:[\s\S]*?)((?:\*\/)|$)/g, b = /\/\/(?:[^\n\r\u2028\u2029]*)/g;
1126
+ function v(y, S) {
1127
+ this._source_text = y || "", this._options = new m(S), this._ch = null, this._input = null, this.NESTED_AT_RULE = {
1128
+ page: !0,
1129
+ "font-face": !0,
1130
+ keyframes: !0,
1131
+ // also in CONDITIONAL_GROUP_RULE below
1132
+ media: !0,
1133
+ supports: !0,
1134
+ document: !0
1135
+ }, this.CONDITIONAL_GROUP_RULE = {
1136
+ media: !0,
1137
+ supports: !0,
1138
+ document: !0
1139
+ }, this.NON_SEMICOLON_NEWLINE_PROPERTY = [
1140
+ "grid-template-areas",
1141
+ "grid-template"
1142
+ ];
1143
+ }
1144
+ return v.prototype.eatString = function(y) {
1145
+ var S = "";
1146
+ for (this._ch = this._input.next(); this._ch; ) {
1147
+ if (S += this._ch, this._ch === "\\")
1148
+ S += this._input.next();
1149
+ else if (y.indexOf(this._ch) !== -1 || this._ch === `
1150
+ `)
1151
+ break;
1152
+ this._ch = this._input.next();
1153
+ }
1154
+ return S;
1155
+ }, v.prototype.eatWhitespace = function(y) {
1156
+ for (var S = n.test(this._input.peek()), A = 0; n.test(this._input.peek()); )
1157
+ this._ch = this._input.next(), y && this._ch === `
1158
+ ` && (A === 0 || A < this._options.max_preserve_newlines) && (A++, this._output.add_new_line(!0));
1159
+ return S;
1160
+ }, v.prototype.foundNestedPseudoClass = function() {
1161
+ for (var y = 0, S = 1, A = this._input.peek(S); A; ) {
1162
+ if (A === "{")
1163
+ return !0;
1164
+ if (A === "(")
1165
+ y += 1;
1166
+ else if (A === ")") {
1167
+ if (y === 0)
1168
+ return !1;
1169
+ y -= 1;
1170
+ } else if (A === ";" || A === "}")
1171
+ return !1;
1172
+ S++, A = this._input.peek(S);
1173
+ }
1174
+ return !1;
1175
+ }, v.prototype.print_string = function(y) {
1176
+ this._output.set_indent(this._indentLevel), this._output.non_breaking_space = !0, this._output.add_token(y);
1177
+ }, v.prototype.preserveSingleSpace = function(y) {
1178
+ y && (this._output.space_before_token = !0);
1179
+ }, v.prototype.indent = function() {
1180
+ this._indentLevel++;
1181
+ }, v.prototype.outdent = function() {
1182
+ this._indentLevel > 0 && this._indentLevel--;
1183
+ }, v.prototype.beautify = function() {
1184
+ if (this._options.disabled)
1185
+ return this._source_text;
1186
+ var y = this._source_text, S = this._options.eol;
1187
+ S === "auto" && (S = `
1188
+ `, y && a.test(y || "") && (S = y.match(a)[0])), y = y.replace(f, `
1189
+ `);
1190
+ var A = y.match(/^[\t ]*/)[0];
1191
+ this._output = new p(this._options, A), this._input = new _(y), this._indentLevel = 0, this._nestedLevel = 0, this._ch = null;
1192
+ for (var N = 0, r = !1, i = !1, o = !1, E = !1, w = !1, k = this._ch, l = !1, g, h, x; g = this._input.read(u), h = g !== "", x = k, this._ch = this._input.next(), this._ch === "\\" && this._input.hasNext() && (this._ch += this._input.next()), k = this._ch, this._ch; )
1193
+ if (this._ch === "/" && this._input.peek() === "*") {
1194
+ this._output.add_new_line(), this._input.back();
1195
+ var t = this._input.read(O), c = s.get_directives(t);
1196
+ c && c.ignore === "start" && (t += s.readIgnored(this._input)), this.print_string(t), this.eatWhitespace(!0), this._output.add_new_line();
1197
+ } else if (this._ch === "/" && this._input.peek() === "/")
1198
+ this._output.space_before_token = !0, this._input.back(), this.print_string(this._input.read(b)), this.eatWhitespace(!0);
1199
+ else if (this._ch === "$") {
1200
+ this.preserveSingleSpace(h), this.print_string(this._ch);
1201
+ var d = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
1202
+ d.match(/[ :]$/) && (d = this.eatString(": ").replace(/\s+$/, ""), this.print_string(d), this._output.space_before_token = !0), N === 0 && d.indexOf(":") !== -1 && (i = !0, this.indent());
1203
+ } else if (this._ch === "@")
1204
+ if (this.preserveSingleSpace(h), this._input.peek() === "{")
1205
+ this.print_string(this._ch + this.eatString("}"));
1206
+ else {
1207
+ this.print_string(this._ch);
1208
+ var T = this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);
1209
+ T.match(/[ :]$/) && (T = this.eatString(": ").replace(/\s+$/, ""), this.print_string(T), this._output.space_before_token = !0), N === 0 && T.indexOf(":") !== -1 ? (i = !0, this.indent()) : T in this.NESTED_AT_RULE ? (this._nestedLevel += 1, T in this.CONDITIONAL_GROUP_RULE && (o = !0)) : N === 0 && !i && (E = !0);
1210
+ }
1211
+ else if (this._ch === "#" && this._input.peek() === "{")
1212
+ this.preserveSingleSpace(h), this.print_string(this._ch + this.eatString("}"));
1213
+ else if (this._ch === "{")
1214
+ i && (i = !1, this.outdent()), E = !1, o ? (o = !1, r = this._indentLevel >= this._nestedLevel) : r = this._indentLevel >= this._nestedLevel - 1, this._options.newline_between_rules && r && this._output.previous_line && this._output.previous_line.item(-1) !== "{" && this._output.ensure_empty_line_above("/", ","), this._output.space_before_token = !0, this._options.brace_style === "expand" ? (this._output.add_new_line(), this.print_string(this._ch), this.indent(), this._output.set_indent(this._indentLevel)) : (x === "(" ? this._output.space_before_token = !1 : x !== "," && this.indent(), this.print_string(this._ch)), this.eatWhitespace(!0), this._output.add_new_line();
1215
+ else if (this._ch === "}")
1216
+ this.outdent(), this._output.add_new_line(), x === "{" && this._output.trim(!0), i && (this.outdent(), i = !1), this.print_string(this._ch), r = !1, this._nestedLevel && this._nestedLevel--, this.eatWhitespace(!0), this._output.add_new_line(), this._options.newline_between_rules && !this._output.just_added_blankline() && this._input.peek() !== "}" && this._output.add_new_line(!0), this._input.peek() === ")" && (this._output.trim(!0), this._options.brace_style === "expand" && this._output.add_new_line(!0));
1217
+ else if (this._ch === ":") {
1218
+ for (var R = 0; R < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; R++)
1219
+ if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[R])) {
1220
+ l = !0;
1221
+ break;
1222
+ }
1223
+ (r || o) && !(this._input.lookBack("&") || this.foundNestedPseudoClass()) && !this._input.lookBack("(") && !E && N === 0 ? (this.print_string(":"), i || (i = !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(":"));
1224
+ } else if (this._ch === '"' || this._ch === "'") {
1225
+ var L = x === '"' || x === "'";
1226
+ this.preserveSingleSpace(L || h), this.print_string(this._ch + this.eatString(this._ch)), this.eatWhitespace(!0);
1227
+ } else if (this._ch === ";")
1228
+ l = !1, N === 0 ? (i && (this.outdent(), i = !1), E = !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);
1229
+ else if (this._ch === "(")
1230
+ if (this._input.lookBack("url"))
1231
+ 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()));
1232
+ else {
1233
+ var C = !1;
1234
+ this._input.lookBack("with") && (C = !0), this.preserveSingleSpace(h || C), this.print_string(this._ch), i && x === "$" && this._options.selector_separator_newline ? (this._output.add_new_line(), w = !0) : (this.eatWhitespace(), N++, this.indent());
1235
+ }
1236
+ else if (this._ch === ")")
1237
+ N && (N--, this.outdent()), w && this._input.peek() === ";" && this._options.selector_separator_newline && (w = !1, this.outdent(), this._output.add_new_line()), this.print_string(this._ch);
1238
+ else if (this._ch === ",")
1239
+ this.print_string(this._ch), this.eatWhitespace(!0), this._options.selector_separator_newline && (!i || w) && N === 0 && !E ? this._output.add_new_line() : this._output.space_before_token = !0;
1240
+ else if ((this._ch === ">" || this._ch === "+" || this._ch === "~") && !i && N === 0)
1241
+ 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 && n.test(this._ch) && (this._ch = ""));
1242
+ else if (this._ch === "]")
1243
+ this.print_string(this._ch);
1244
+ else if (this._ch === "[")
1245
+ this.preserveSingleSpace(h), this.print_string(this._ch);
1246
+ else if (this._ch === "=")
1247
+ this.eatWhitespace(), this.print_string("="), n.test(this._ch) && (this._ch = "");
1248
+ else if (this._ch === "!" && !this._input.lookBack("\\"))
1249
+ this._output.space_before_token = !0, this.print_string(this._ch);
1250
+ else {
1251
+ var P = x === '"' || x === "'";
1252
+ this.preserveSingleSpace(P || h), this.print_string(this._ch), !this._output.just_added_newline() && this._input.peek() === `
1253
+ ` && l && this._output.add_new_line();
1254
+ }
1255
+ var j = this._output.get_code(S);
1256
+ return j;
1257
+ }, _t.Beautifier = v, _t;
1258
+ }
1259
+ var Ct;
1260
+ function Jt() {
1261
+ if (Ct) return z.exports;
1262
+ Ct = 1;
1263
+ var m = Zt().Beautifier, p = Ft().Options;
1264
+ function _(e, s) {
1265
+ var a = new m(e, s);
1266
+ return a.beautify();
1267
+ }
1268
+ return z.exports = _, z.exports.defaultOptions = function() {
1269
+ return new p();
1270
+ }, z.exports;
1271
+ }
1272
+ var U = { exports: {} }, rt = {}, ut = {}, Pt;
1273
+ function Xt() {
1274
+ if (Pt) return ut;
1275
+ Pt = 1;
1276
+ var m = ht().Options;
1277
+ function p(_) {
1278
+ m.call(this, _, "html"), this.templating.length === 1 && this.templating[0] === "auto" && (this.templating = ["django", "erb", "handlebars", "php"]), this.indent_inner_html = this._get_boolean("indent_inner_html"), this.indent_body_inner_html = this._get_boolean("indent_body_inner_html", !0), this.indent_head_inner_html = this._get_boolean("indent_head_inner_html", !0), this.indent_handlebars = this._get_boolean("indent_handlebars", !0), this.wrap_attributes = this._get_selection(
1279
+ "wrap_attributes",
1280
+ ["auto", "force", "force-aligned", "force-expand-multiline", "aligned-multiple", "preserve", "preserve-aligned"]
1281
+ ), this.wrap_attributes_min_attrs = this._get_number("wrap_attributes_min_attrs", 2), this.wrap_attributes_indent_size = this._get_number("wrap_attributes_indent_size", this.indent_size), this.extra_liners = this._get_array("extra_liners", ["head", "body", "/html"]), this.inline = this._get_array("inline", [
1282
+ "a",
1283
+ "abbr",
1284
+ "area",
1285
+ "audio",
1286
+ "b",
1287
+ "bdi",
1288
+ "bdo",
1289
+ "br",
1290
+ "button",
1291
+ "canvas",
1292
+ "cite",
1293
+ "code",
1294
+ "data",
1295
+ "datalist",
1296
+ "del",
1297
+ "dfn",
1298
+ "em",
1299
+ "embed",
1300
+ "i",
1301
+ "iframe",
1302
+ "img",
1303
+ "input",
1304
+ "ins",
1305
+ "kbd",
1306
+ "keygen",
1307
+ "label",
1308
+ "map",
1309
+ "mark",
1310
+ "math",
1311
+ "meter",
1312
+ "noscript",
1313
+ "object",
1314
+ "output",
1315
+ "progress",
1316
+ "q",
1317
+ "ruby",
1318
+ "s",
1319
+ "samp",
1320
+ /* 'script', */
1321
+ "select",
1322
+ "small",
1323
+ "span",
1324
+ "strong",
1325
+ "sub",
1326
+ "sup",
1327
+ "svg",
1328
+ "template",
1329
+ "textarea",
1330
+ "time",
1331
+ "u",
1332
+ "var",
1333
+ "video",
1334
+ "wbr",
1335
+ "text",
1336
+ // obsolete inline tags
1337
+ "acronym",
1338
+ "big",
1339
+ "strike",
1340
+ "tt"
1341
+ ]), this.inline_custom_elements = this._get_boolean("inline_custom_elements", !0), this.void_elements = this._get_array("void_elements", [
1342
+ // HTLM void elements - aka self-closing tags - aka singletons
1343
+ // https://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements
1344
+ "area",
1345
+ "base",
1346
+ "br",
1347
+ "col",
1348
+ "embed",
1349
+ "hr",
1350
+ "img",
1351
+ "input",
1352
+ "keygen",
1353
+ "link",
1354
+ "menuitem",
1355
+ "meta",
1356
+ "param",
1357
+ "source",
1358
+ "track",
1359
+ "wbr",
1360
+ // NOTE: Optional tags are too complex for a simple list
1361
+ // they are hard coded in _do_optional_end_element
1362
+ // Doctype and xml elements
1363
+ "!doctype",
1364
+ "?xml",
1365
+ // obsolete tags
1366
+ // basefont: https://www.computerhope.com/jargon/h/html-basefont-tag.htm
1367
+ // isndex: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/isindex
1368
+ "basefont",
1369
+ "isindex"
1370
+ ]), this.unformatted = this._get_array("unformatted", []), this.content_unformatted = this._get_array("content_unformatted", [
1371
+ "pre",
1372
+ "textarea"
1373
+ ]), this.unformatted_content_delimiter = this._get_characters("unformatted_content_delimiter"), this.indent_scripts = this._get_selection("indent_scripts", ["normal", "keep", "separate"]);
1374
+ }
1375
+ return p.prototype = new m(), ut.Options = p, ut;
1376
+ }
1377
+ var q = {}, Dt;
1378
+ function Bt() {
1379
+ if (Dt) return q;
1380
+ Dt = 1;
1381
+ var m = F().Tokenizer, p = F().TOKEN, _ = pt().Directives, e = qt().TemplatablePattern, s = X().Pattern, a = {
1382
+ TAG_OPEN: "TK_TAG_OPEN",
1383
+ TAG_CLOSE: "TK_TAG_CLOSE",
1384
+ CONTROL_FLOW_OPEN: "TK_CONTROL_FLOW_OPEN",
1385
+ CONTROL_FLOW_CLOSE: "TK_CONTROL_FLOW_CLOSE",
1386
+ ATTRIBUTE: "TK_ATTRIBUTE",
1387
+ EQUALS: "TK_EQUALS",
1388
+ VALUE: "TK_VALUE",
1389
+ COMMENT: "TK_COMMENT",
1390
+ TEXT: "TK_TEXT",
1391
+ UNKNOWN: "TK_UNKNOWN",
1392
+ START: p.START,
1393
+ RAW: p.RAW,
1394
+ EOF: p.EOF
1395
+ }, f = new _(/<\!--/, /-->/), n = function(u, O) {
1396
+ m.call(this, u, O), this._current_tag_name = "";
1397
+ var b = new e(this._input).read_options(this._options), v = new s(this._input);
1398
+ if (this.__patterns = {
1399
+ word: b.until(/[\n\r\t <]/),
1400
+ word_control_flow_close_excluded: b.until(/[\n\r\t <}]/),
1401
+ single_quote: b.until_after(/'/),
1402
+ double_quote: b.until_after(/"/),
1403
+ attribute: b.until(/[\n\r\t =>]|\/>/),
1404
+ element_name: b.until(/[\n\r\t >\/]/),
1405
+ angular_control_flow_start: v.matching(/\@[a-zA-Z]+[^({]*[({]/),
1406
+ handlebars_comment: v.starting_with(/{{!--/).until_after(/--}}/),
1407
+ handlebars: v.starting_with(/{{/).until_after(/}}/),
1408
+ handlebars_open: v.until(/[\n\r\t }]/),
1409
+ handlebars_raw_close: v.until(/}}/),
1410
+ comment: v.starting_with(/<!--/).until_after(/-->/),
1411
+ cdata: v.starting_with(/<!\[CDATA\[/).until_after(/]]>/),
1412
+ // https://en.wikipedia.org/wiki/Conditional_comment
1413
+ conditional_comment: v.starting_with(/<!\[/).until_after(/]>/),
1414
+ processing: v.starting_with(/<\?/).until_after(/\?>/)
1415
+ }, this._options.indent_handlebars && (this.__patterns.word = this.__patterns.word.exclude("handlebars"), this.__patterns.word_control_flow_close_excluded = this.__patterns.word_control_flow_close_excluded.exclude("handlebars")), this._unformatted_content_delimiter = null, this._options.unformatted_content_delimiter) {
1416
+ var y = this._input.get_literal_regexp(this._options.unformatted_content_delimiter);
1417
+ this.__patterns.unformatted_content_delimiter = v.matching(y).until_after(y);
1418
+ }
1419
+ };
1420
+ return n.prototype = new m(), n.prototype._is_comment = function(u) {
1421
+ return !1;
1422
+ }, n.prototype._is_opening = function(u) {
1423
+ return u.type === a.TAG_OPEN || u.type === a.CONTROL_FLOW_OPEN;
1424
+ }, n.prototype._is_closing = function(u, O) {
1425
+ return u.type === a.TAG_CLOSE && O && ((u.text === ">" || u.text === "/>") && O.text[0] === "<" || u.text === "}}" && O.text[0] === "{" && O.text[1] === "{") || u.type === a.CONTROL_FLOW_CLOSE && u.text === "}" && O.text.endsWith("{");
1426
+ }, n.prototype._reset = function() {
1427
+ this._current_tag_name = "";
1428
+ }, n.prototype._get_next_token = function(u, O) {
1429
+ var b = null;
1430
+ this._readWhitespace();
1431
+ var v = this._input.peek();
1432
+ return v === null ? this._create_token(a.EOF, "") : (b = b || this._read_open_handlebars(v, O), b = b || this._read_attribute(v, u, O), b = b || this._read_close(v, O), b = b || this._read_script_and_style(v, u), b = b || this._read_control_flows(v, O), b = b || this._read_raw_content(v, u, O), b = b || this._read_content_word(v, O), b = b || this._read_comment_or_cdata(v), b = b || this._read_processing(v), b = b || this._read_open(v, O), b = b || this._create_token(a.UNKNOWN, this._input.next()), b);
1433
+ }, n.prototype._read_comment_or_cdata = function(u) {
1434
+ var O = null, b = null, v = null;
1435
+ if (u === "<") {
1436
+ var y = this._input.peek(1);
1437
+ y === "!" && (b = this.__patterns.comment.read(), b ? (v = f.get_directives(b), v && v.ignore === "start" && (b += f.readIgnored(this._input))) : b = this.__patterns.cdata.read()), b && (O = this._create_token(a.COMMENT, b), O.directives = v);
1438
+ }
1439
+ return O;
1440
+ }, n.prototype._read_processing = function(u) {
1441
+ var O = null, b = null, v = null;
1442
+ if (u === "<") {
1443
+ var y = this._input.peek(1);
1444
+ (y === "!" || y === "?") && (b = this.__patterns.conditional_comment.read(), b = b || this.__patterns.processing.read()), b && (O = this._create_token(a.COMMENT, b), O.directives = v);
1445
+ }
1446
+ return O;
1447
+ }, n.prototype._read_open = function(u, O) {
1448
+ var b = null, v = null;
1449
+ return (!O || O.type === a.CONTROL_FLOW_OPEN) && u === "<" && (b = this._input.next(), this._input.peek() === "/" && (b += this._input.next()), b += this.__patterns.element_name.read(), v = this._create_token(a.TAG_OPEN, b)), v;
1450
+ }, n.prototype._read_open_handlebars = function(u, O) {
1451
+ var b = null, v = null;
1452
+ return (!O || O.type === a.CONTROL_FLOW_OPEN) && (this._options.templating.includes("angular") || this._options.indent_handlebars) && u === "{" && this._input.peek(1) === "{" && (this._options.indent_handlebars && this._input.peek(2) === "!" ? (b = this.__patterns.handlebars_comment.read(), b = b || this.__patterns.handlebars.read(), v = this._create_token(a.COMMENT, b)) : (b = this.__patterns.handlebars_open.read(), v = this._create_token(a.TAG_OPEN, b))), v;
1453
+ }, n.prototype._read_control_flows = function(u, O) {
1454
+ var b = "", v = null;
1455
+ if (!this._options.templating.includes("angular"))
1456
+ return v;
1457
+ if (u === "@") {
1458
+ if (b = this.__patterns.angular_control_flow_start.read(), b === "")
1459
+ return v;
1460
+ for (var y = b.endsWith("(") ? 1 : 0, S = 0; !(b.endsWith("{") && y === S); ) {
1461
+ var A = this._input.next();
1462
+ if (A === null)
1463
+ break;
1464
+ A === "(" ? y++ : A === ")" && S++, b += A;
1465
+ }
1466
+ v = this._create_token(a.CONTROL_FLOW_OPEN, b);
1467
+ } else u === "}" && O && O.type === a.CONTROL_FLOW_OPEN && (b = this._input.next(), v = this._create_token(a.CONTROL_FLOW_CLOSE, b));
1468
+ return v;
1469
+ }, n.prototype._read_close = function(u, O) {
1470
+ var b = null, v = null;
1471
+ return O && O.type === a.TAG_OPEN && (O.text[0] === "<" && (u === ">" || u === "/" && this._input.peek(1) === ">") ? (b = this._input.next(), u === "/" && (b += this._input.next()), v = this._create_token(a.TAG_CLOSE, b)) : O.text[0] === "{" && u === "}" && this._input.peek(1) === "}" && (this._input.next(), this._input.next(), v = this._create_token(a.TAG_CLOSE, "}}"))), v;
1472
+ }, n.prototype._read_attribute = function(u, O, b) {
1473
+ var v = null, y = "";
1474
+ if (b && b.text[0] === "<")
1475
+ if (u === "=")
1476
+ v = this._create_token(a.EQUALS, this._input.next());
1477
+ else if (u === '"' || u === "'") {
1478
+ var S = this._input.next();
1479
+ u === '"' ? S += this.__patterns.double_quote.read() : S += this.__patterns.single_quote.read(), v = this._create_token(a.VALUE, S);
1480
+ } else
1481
+ y = this.__patterns.attribute.read(), y && (O.type === a.EQUALS ? v = this._create_token(a.VALUE, y) : v = this._create_token(a.ATTRIBUTE, y));
1482
+ return v;
1483
+ }, n.prototype._is_content_unformatted = function(u) {
1484
+ return this._options.void_elements.indexOf(u) === -1 && (this._options.content_unformatted.indexOf(u) !== -1 || this._options.unformatted.indexOf(u) !== -1);
1485
+ }, n.prototype._read_raw_content = function(u, O, b) {
1486
+ var v = "";
1487
+ if (b && b.text[0] === "{")
1488
+ v = this.__patterns.handlebars_raw_close.read();
1489
+ else if (O.type === a.TAG_CLOSE && O.opened.text[0] === "<" && O.text[0] !== "/") {
1490
+ var y = O.opened.text.substr(1).toLowerCase();
1491
+ this._is_content_unformatted(y) && (v = this._input.readUntil(new RegExp("</" + y + "[\\n\\r\\t ]*?>", "ig")));
1492
+ }
1493
+ return v ? this._create_token(a.TEXT, v) : null;
1494
+ }, n.prototype._read_script_and_style = function(u, O) {
1495
+ if (O.type === a.TAG_CLOSE && O.opened.text[0] === "<" && O.text[0] !== "/") {
1496
+ var b = O.opened.text.substr(1).toLowerCase();
1497
+ if (b === "script" || b === "style") {
1498
+ var v = this._read_comment_or_cdata(u);
1499
+ if (v)
1500
+ return v.type = a.TEXT, v;
1501
+ var y = this._input.readUntil(new RegExp("</" + b + "[\\n\\r\\t ]*?>", "ig"));
1502
+ if (y)
1503
+ return this._create_token(a.TEXT, y);
1504
+ }
1505
+ }
1506
+ return null;
1507
+ }, n.prototype._read_content_word = function(u, O) {
1508
+ var b = "";
1509
+ return this._options.unformatted_content_delimiter && u === this._options.unformatted_content_delimiter[0] && (b = this.__patterns.unformatted_content_delimiter.read()), b || (b = O && O.type === a.CONTROL_FLOW_OPEN ? this.__patterns.word_control_flow_close_excluded.read() : this.__patterns.word.read()), b ? this._create_token(a.TEXT, b) : null;
1510
+ }, q.Tokenizer = n, q.TOKEN = a, q;
1511
+ }
1512
+ var Wt;
1513
+ function Ht() {
1514
+ if (Wt) return rt;
1515
+ Wt = 1;
1516
+ var m = Xt().Options, p = ot().Output, _ = Bt().Tokenizer, e = Bt().TOKEN, s = /\r\n|[\r\n]/, a = /\r\n|[\r\n]/g, f = function(r, i) {
1517
+ this.indent_level = 0, this.alignment_size = 0, this.max_preserve_newlines = r.max_preserve_newlines, this.preserve_newlines = r.preserve_newlines, this._output = new p(r, i);
1518
+ };
1519
+ f.prototype.current_line_has_match = function(r) {
1520
+ return this._output.current_line.has_match(r);
1521
+ }, f.prototype.set_space_before_token = function(r, i) {
1522
+ this._output.space_before_token = r, this._output.non_breaking_space = i;
1523
+ }, f.prototype.set_wrap_point = function() {
1524
+ this._output.set_indent(this.indent_level, this.alignment_size), this._output.set_wrap_point();
1525
+ }, f.prototype.add_raw_token = function(r) {
1526
+ this._output.add_raw_token(r);
1527
+ }, f.prototype.print_preserved_newlines = function(r) {
1528
+ var i = 0;
1529
+ r.type !== e.TEXT && r.previous.type !== e.TEXT && (i = r.newlines ? 1 : 0), this.preserve_newlines && (i = r.newlines < this.max_preserve_newlines + 1 ? r.newlines : this.max_preserve_newlines + 1);
1530
+ for (var o = 0; o < i; o++)
1531
+ this.print_newline(o > 0);
1532
+ return i !== 0;
1533
+ }, f.prototype.traverse_whitespace = function(r) {
1534
+ return r.whitespace_before || r.newlines ? (this.print_preserved_newlines(r) || (this._output.space_before_token = !0), !0) : !1;
1535
+ }, f.prototype.previous_token_wrapped = function() {
1536
+ return this._output.previous_token_wrapped;
1537
+ }, f.prototype.print_newline = function(r) {
1538
+ this._output.add_new_line(r);
1539
+ }, f.prototype.print_token = function(r) {
1540
+ r.text && (this._output.set_indent(this.indent_level, this.alignment_size), this._output.add_token(r.text));
1541
+ }, f.prototype.indent = function() {
1542
+ this.indent_level++;
1543
+ }, f.prototype.deindent = function() {
1544
+ this.indent_level > 0 && (this.indent_level--, this._output.set_indent(this.indent_level, this.alignment_size));
1545
+ }, f.prototype.get_full_indent = function(r) {
1546
+ return r = this.indent_level + (r || 0), r < 1 ? "" : this._output.get_indent_string(r);
1547
+ };
1548
+ var n = function(r) {
1549
+ for (var i = null, o = r.next; o.type !== e.EOF && r.closed !== o; ) {
1550
+ if (o.type === e.ATTRIBUTE && o.text === "type") {
1551
+ o.next && o.next.type === e.EQUALS && o.next.next && o.next.next.type === e.VALUE && (i = o.next.next.text);
1552
+ break;
1553
+ }
1554
+ o = o.next;
1555
+ }
1556
+ return i;
1557
+ }, u = function(r, i) {
1558
+ var o = null, E = null;
1559
+ return i.closed ? (r === "script" ? o = "text/javascript" : r === "style" && (o = "text/css"), o = n(i) || o, o.search("text/css") > -1 ? E = "css" : o.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/) > -1 ? E = "javascript" : o.search(/(text|application|dojo)\/(x-)?(html)/) > -1 ? E = "html" : o.search(/test\/null/) > -1 && (E = "null"), E) : null;
1560
+ };
1561
+ function O(r, i) {
1562
+ return i.indexOf(r) !== -1;
1563
+ }
1564
+ function b(r, i, o) {
1565
+ this.parent = r || null, this.tag = i ? i.tag_name : "", this.indent_level = o || 0, this.parser_token = i || null;
1566
+ }
1567
+ function v(r) {
1568
+ this._printer = r, this._current_frame = null;
1569
+ }
1570
+ v.prototype.get_parser_token = function() {
1571
+ return this._current_frame ? this._current_frame.parser_token : null;
1572
+ }, v.prototype.record_tag = function(r) {
1573
+ var i = new b(this._current_frame, r, this._printer.indent_level);
1574
+ this._current_frame = i;
1575
+ }, v.prototype._try_pop_frame = function(r) {
1576
+ var i = null;
1577
+ return r && (i = r.parser_token, this._printer.indent_level = r.indent_level, this._current_frame = r.parent), i;
1578
+ }, v.prototype._get_frame = function(r, i) {
1579
+ for (var o = this._current_frame; o && r.indexOf(o.tag) === -1; ) {
1580
+ if (i && i.indexOf(o.tag) !== -1) {
1581
+ o = null;
1582
+ break;
1583
+ }
1584
+ o = o.parent;
1585
+ }
1586
+ return o;
1587
+ }, v.prototype.try_pop = function(r, i) {
1588
+ var o = this._get_frame([r], i);
1589
+ return this._try_pop_frame(o);
1590
+ }, v.prototype.indent_to_tag = function(r) {
1591
+ var i = this._get_frame(r);
1592
+ i && (this._printer.indent_level = i.indent_level);
1593
+ };
1594
+ function y(r, i, o, E) {
1595
+ this._source_text = r || "", i = i || {}, this._js_beautify = o, this._css_beautify = E, this._tag_stack = null;
1596
+ var w = new m(i, "html");
1597
+ this._options = w, 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";
1598
+ }
1599
+ y.prototype.beautify = function() {
1600
+ if (this._options.disabled)
1601
+ return this._source_text;
1602
+ var r = this._source_text, i = this._options.eol;
1603
+ this._options.eol === "auto" && (i = `
1604
+ `, r && s.test(r) && (i = r.match(s)[0])), r = r.replace(a, `
1605
+ `);
1606
+ var o = r.match(/^[\t ]*/)[0], E = {
1607
+ text: "",
1608
+ type: ""
1609
+ }, w = new S(this._options), k = new f(this._options, o), l = new _(r, this._options).tokenize();
1610
+ this._tag_stack = new v(k);
1611
+ for (var g = null, h = l.next(); h.type !== e.EOF; )
1612
+ h.type === e.TAG_OPEN || h.type === e.COMMENT ? (g = this._handle_tag_open(k, h, w, E, l), w = g) : h.type === e.ATTRIBUTE || h.type === e.EQUALS || h.type === e.VALUE || h.type === e.TEXT && !w.tag_complete ? g = this._handle_inside_tag(k, h, w, E) : h.type === e.TAG_CLOSE ? g = this._handle_tag_close(k, h, w) : h.type === e.TEXT ? g = this._handle_text(k, h, w) : h.type === e.CONTROL_FLOW_OPEN ? g = this._handle_control_flow_open(k, h) : h.type === e.CONTROL_FLOW_CLOSE ? g = this._handle_control_flow_close(k, h) : k.add_raw_token(h), E = g, h = l.next();
1613
+ var x = k._output.get_code(i);
1614
+ return x;
1615
+ }, y.prototype._handle_control_flow_open = function(r, i) {
1616
+ var o = {
1617
+ text: i.text,
1618
+ type: i.type
1619
+ };
1620
+ return r.set_space_before_token(i.newlines || i.whitespace_before !== "", !0), i.newlines ? r.print_preserved_newlines(i) : r.set_space_before_token(i.newlines || i.whitespace_before !== "", !0), r.print_token(i), r.indent(), o;
1621
+ }, y.prototype._handle_control_flow_close = function(r, i) {
1622
+ var o = {
1623
+ text: i.text,
1624
+ type: i.type
1625
+ };
1626
+ return r.deindent(), i.newlines ? r.print_preserved_newlines(i) : r.set_space_before_token(i.newlines || i.whitespace_before !== "", !0), r.print_token(i), o;
1627
+ }, y.prototype._handle_tag_close = function(r, i, o) {
1628
+ var E = {
1629
+ text: i.text,
1630
+ type: i.type
1631
+ };
1632
+ return r.alignment_size = 0, o.tag_complete = !0, r.set_space_before_token(i.newlines || i.whitespace_before !== "", !0), o.is_unformatted ? r.add_raw_token(i) : (o.tag_start_char === "<" && (r.set_space_before_token(i.text[0] === "/", !0), this._is_wrap_attributes_force_expand_multiline && o.has_wrapped_attrs && r.print_newline(!1)), r.print_token(i)), o.indent_content && !(o.is_unformatted || o.is_content_unformatted) && (r.indent(), o.indent_content = !1), !o.is_inline_element && !(o.is_unformatted || o.is_content_unformatted) && r.set_wrap_point(), E;
1633
+ }, y.prototype._handle_inside_tag = function(r, i, o, E) {
1634
+ var w = o.has_wrapped_attrs, k = {
1635
+ text: i.text,
1636
+ type: i.type
1637
+ };
1638
+ return r.set_space_before_token(i.newlines || i.whitespace_before !== "", !0), o.is_unformatted ? r.add_raw_token(i) : o.tag_start_char === "{" && i.type === e.TEXT ? r.print_preserved_newlines(i) ? (i.newlines = 0, r.add_raw_token(i)) : r.print_token(i) : (i.type === e.ATTRIBUTE ? r.set_space_before_token(!0) : (i.type === e.EQUALS || i.type === e.VALUE && i.previous.type === e.EQUALS) && r.set_space_before_token(!1), i.type === e.ATTRIBUTE && o.tag_start_char === "<" && ((this._is_wrap_attributes_preserve || this._is_wrap_attributes_preserve_aligned) && (r.traverse_whitespace(i), w = w || i.newlines !== 0), this._is_wrap_attributes_force && o.attr_count >= this._options.wrap_attributes_min_attrs && (E.type !== e.TAG_OPEN || // ie. second attribute and beyond
1639
+ this._is_wrap_attributes_force_expand_multiline) && (r.print_newline(!1), w = !0)), r.print_token(i), w = w || r.previous_token_wrapped(), o.has_wrapped_attrs = w), k;
1640
+ }, y.prototype._handle_text = function(r, i, o) {
1641
+ var E = {
1642
+ text: i.text,
1643
+ type: "TK_CONTENT"
1644
+ };
1645
+ return o.custom_beautifier_name ? this._print_custom_beatifier_text(r, i, o) : o.is_unformatted || o.is_content_unformatted ? r.add_raw_token(i) : (r.traverse_whitespace(i), r.print_token(i)), E;
1646
+ }, y.prototype._print_custom_beatifier_text = function(r, i, o) {
1647
+ var E = this;
1648
+ if (i.text !== "") {
1649
+ var w = i.text, k, l = 1, g = "", h = "";
1650
+ o.custom_beautifier_name === "javascript" && typeof this._js_beautify == "function" ? k = this._js_beautify : o.custom_beautifier_name === "css" && typeof this._css_beautify == "function" ? k = this._css_beautify : o.custom_beautifier_name === "html" && (k = function(R, L) {
1651
+ var C = new y(R, L, E._js_beautify, E._css_beautify);
1652
+ return C.beautify();
1653
+ }), this._options.indent_scripts === "keep" ? l = 0 : this._options.indent_scripts === "separate" && (l = -r.indent_level);
1654
+ var x = r.get_full_indent(l);
1655
+ if (w = w.replace(/\n[ \t]*$/, ""), o.custom_beautifier_name !== "html" && w[0] === "<" && w.match(/^(<!--|<!\[CDATA\[)/)) {
1656
+ var t = /^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(w);
1657
+ if (!t) {
1658
+ r.add_raw_token(i);
1659
+ return;
1660
+ }
1661
+ g = x + t[1] + `
1662
+ `, w = t[4], t[5] && (h = x + t[5]), w = w.replace(/\n[ \t]*$/, ""), (t[2] || t[3].indexOf(`
1663
+ `) !== -1) && (t = t[3].match(/[ \t]+$/), t && (i.whitespace_before = t[0]));
1664
+ }
1665
+ if (w)
1666
+ if (k) {
1667
+ var c = function() {
1668
+ this.eol = `
1669
+ `;
1670
+ };
1671
+ c.prototype = this._options.raw_options;
1672
+ var d = new c();
1673
+ w = k(x + w, d);
1674
+ } else {
1675
+ var T = i.whitespace_before;
1676
+ T && (w = w.replace(new RegExp(`
1677
+ (` + T + ")?", "g"), `
1678
+ `)), w = x + w.replace(/\n/g, `
1679
+ ` + x);
1680
+ }
1681
+ g && (w ? w = g + w + `
1682
+ ` + h : w = g + h), r.print_newline(!1), w && (i.text = w, i.whitespace_before = "", i.newlines = 0, r.add_raw_token(i), r.print_newline(!0));
1683
+ }
1684
+ }, y.prototype._handle_tag_open = function(r, i, o, E, w) {
1685
+ var k = this._get_tag_open_token(i);
1686
+ if ((o.is_unformatted || o.is_content_unformatted) && !o.is_empty_element && i.type === e.TAG_OPEN && !k.is_start_tag ? (r.add_raw_token(i), k.start_tag_token = this._tag_stack.try_pop(k.tag_name)) : (r.traverse_whitespace(i), this._set_tag_position(r, i, k, o, E), k.is_inline_element || r.set_wrap_point(), r.print_token(i)), k.is_start_tag && this._is_wrap_attributes_force) {
1687
+ var l = 0, g;
1688
+ do
1689
+ g = w.peek(l), g.type === e.ATTRIBUTE && (k.attr_count += 1), l += 1;
1690
+ while (g.type !== e.EOF && g.type !== e.TAG_CLOSE);
1691
+ }
1692
+ return (this._is_wrap_attributes_force_aligned || this._is_wrap_attributes_aligned_multiple || this._is_wrap_attributes_preserve_aligned) && (k.alignment_size = i.text.length + 1), !k.tag_complete && !k.is_unformatted && (r.alignment_size = k.alignment_size), k;
1693
+ };
1694
+ var S = function(r, i, o) {
1695
+ if (this.parent = i || 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 = "", !o)
1696
+ this.tag_complete = !0;
1697
+ else {
1698
+ var E;
1699
+ this.tag_start_char = o.text[0], this.text = o.text, this.tag_start_char === "<" ? (E = o.text.match(/^<([^\s>]*)/), this.tag_check = E ? E[1] : "") : (E = o.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/), this.tag_check = E ? E[1] : "", (o.text.startsWith("{{#>") || o.text.startsWith("{{~#>")) && this.tag_check[0] === ">" && (this.tag_check === ">" && o.next !== null ? this.tag_check = o.next.text.split(" ")[0] : this.tag_check = o.text.split(">")[1])), this.tag_check = this.tag_check.toLowerCase(), o.type === e.COMMENT && (this.tag_complete = !0), this.is_start_tag = this.tag_check.charAt(0) !== "/", this.tag_name = this.is_start_tag ? this.tag_check : this.tag_check.substr(1), this.is_end_tag = !this.is_start_tag || o.closed && o.closed.text === "/>";
1700
+ var w = 2;
1701
+ this.tag_start_char === "{" && this.text.length >= 3 && this.text.charAt(2) === "~" && (w = 3), this.is_end_tag = this.is_end_tag || this.tag_start_char === "{" && (!r.indent_handlebars || this.text.length < 3 || /[^#\^]/.test(this.text.charAt(w)));
1702
+ }
1703
+ };
1704
+ y.prototype._get_tag_open_token = function(r) {
1705
+ var i = new S(this._options, this._tag_stack.get_parser_token(), r);
1706
+ return i.alignment_size = this._options.wrap_attributes_indent_size, i.is_end_tag = i.is_end_tag || O(i.tag_check, this._options.void_elements), i.is_empty_element = i.tag_complete || i.is_start_tag && i.is_end_tag, i.is_unformatted = !i.tag_complete && O(i.tag_check, this._options.unformatted), i.is_content_unformatted = !i.is_empty_element && O(i.tag_check, this._options.content_unformatted), i.is_inline_element = O(i.tag_name, this._options.inline) || this._options.inline_custom_elements && i.tag_name.includes("-") || i.tag_start_char === "{", i;
1707
+ }, y.prototype._set_tag_position = function(r, i, o, E, w) {
1708
+ if (o.is_empty_element || (o.is_end_tag ? o.start_tag_token = this._tag_stack.try_pop(o.tag_name) : (this._do_optional_end_element(o) && (o.is_inline_element || r.print_newline(!1)), this._tag_stack.record_tag(o), (o.tag_name === "script" || o.tag_name === "style") && !(o.is_unformatted || o.is_content_unformatted) && (o.custom_beautifier_name = u(o.tag_check, i)))), O(o.tag_check, this._options.extra_liners) && (r.print_newline(!1), r._output.just_added_blankline() || r.print_newline(!0)), o.is_empty_element) {
1709
+ if (o.tag_start_char === "{" && o.tag_check === "else") {
1710
+ this._tag_stack.indent_to_tag(["if", "unless", "each"]), o.indent_content = !0;
1711
+ var k = r.current_line_has_match(/{{#if/);
1712
+ k || r.print_newline(!1);
1713
+ }
1714
+ o.tag_name === "!--" && w.type === e.TAG_CLOSE && E.is_end_tag && o.text.indexOf(`
1715
+ `) === -1 || (o.is_inline_element || o.is_unformatted || r.print_newline(!1), this._calcluate_parent_multiline(r, o));
1716
+ } else if (o.is_end_tag) {
1717
+ var l = !1;
1718
+ l = o.start_tag_token && o.start_tag_token.multiline_content, l = l || !o.is_inline_element && !(E.is_inline_element || E.is_unformatted) && !(w.type === e.TAG_CLOSE && o.start_tag_token === E) && w.type !== "TK_CONTENT", (o.is_content_unformatted || o.is_unformatted) && (l = !1), l && r.print_newline(!1);
1719
+ } else
1720
+ o.indent_content = !o.custom_beautifier_name, o.tag_start_char === "<" && (o.tag_name === "html" ? o.indent_content = this._options.indent_inner_html : o.tag_name === "head" ? o.indent_content = this._options.indent_head_inner_html : o.tag_name === "body" && (o.indent_content = this._options.indent_body_inner_html)), !(o.is_inline_element || o.is_unformatted) && (w.type !== "TK_CONTENT" || o.is_content_unformatted) && r.print_newline(!1), this._calcluate_parent_multiline(r, o);
1721
+ }, y.prototype._calcluate_parent_multiline = function(r, i) {
1722
+ i.parent && r._output.just_added_newline() && !((i.is_inline_element || i.is_unformatted) && i.parent.is_inline_element) && (i.parent.multiline_content = !0);
1723
+ };
1724
+ var A = ["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"];
1725
+ return y.prototype._do_optional_end_element = function(r) {
1726
+ var i = null;
1727
+ if (!(r.is_empty_element || !r.is_start_tag || !r.parent)) {
1728
+ if (r.tag_name === "body")
1729
+ i = i || this._tag_stack.try_pop("head");
1730
+ else if (r.tag_name === "li")
1731
+ i = i || this._tag_stack.try_pop("li", ["ol", "ul", "menu"]);
1732
+ else if (r.tag_name === "dd" || r.tag_name === "dt")
1733
+ i = i || this._tag_stack.try_pop("dt", ["dl"]), i = i || this._tag_stack.try_pop("dd", ["dl"]);
1734
+ else if (r.parent.tag_name === "p" && A.indexOf(r.tag_name) !== -1) {
1735
+ var o = r.parent.parent;
1736
+ (!o || N.indexOf(o.tag_name) === -1) && (i = i || this._tag_stack.try_pop("p"));
1737
+ } else r.tag_name === "rp" || r.tag_name === "rt" ? (i = i || this._tag_stack.try_pop("rt", ["ruby", "rtc"]), i = i || this._tag_stack.try_pop("rp", ["ruby", "rtc"])) : r.tag_name === "optgroup" ? i = i || this._tag_stack.try_pop("optgroup", ["select"]) : r.tag_name === "option" ? i = i || this._tag_stack.try_pop("option", ["select", "datalist", "optgroup"]) : r.tag_name === "colgroup" ? i = i || this._tag_stack.try_pop("caption", ["table"]) : r.tag_name === "thead" ? (i = i || this._tag_stack.try_pop("caption", ["table"]), i = i || this._tag_stack.try_pop("colgroup", ["table"])) : r.tag_name === "tbody" || r.tag_name === "tfoot" ? (i = i || this._tag_stack.try_pop("caption", ["table"]), i = i || this._tag_stack.try_pop("colgroup", ["table"]), i = i || this._tag_stack.try_pop("thead", ["table"]), i = i || this._tag_stack.try_pop("tbody", ["table"])) : r.tag_name === "tr" ? (i = i || this._tag_stack.try_pop("caption", ["table"]), i = i || this._tag_stack.try_pop("colgroup", ["table"]), i = i || this._tag_stack.try_pop("tr", ["table", "thead", "tbody", "tfoot"])) : (r.tag_name === "th" || r.tag_name === "td") && (i = i || this._tag_stack.try_pop("td", ["table", "thead", "tbody", "tfoot", "tr"]), i = i || this._tag_stack.try_pop("th", ["table", "thead", "tbody", "tfoot", "tr"]));
1738
+ return r.parent = this._tag_stack.get_parser_token(), i;
1739
+ }
1740
+ }, rt.Beautifier = y, rt;
1741
+ }
1742
+ var jt;
1743
+ function te() {
1744
+ if (jt) return U.exports;
1745
+ jt = 1;
1746
+ var m = Ht().Beautifier, p = Xt().Options;
1747
+ function _(e, s, a, f) {
1748
+ var n = new m(e, s, a, f);
1749
+ return n.beautify();
1750
+ }
1751
+ return U.exports = _, U.exports.defaultOptions = function() {
1752
+ return new p();
1753
+ }, U.exports;
1754
+ }
1755
+ var It;
1756
+ function ee() {
1757
+ if (It) return B;
1758
+ It = 1;
1759
+ var m = Yt(), p = Jt(), _ = te();
1760
+ function e(s, a, f, n) {
1761
+ return f = f || m, n = n || p, _(s, a, f, n);
1762
+ }
1763
+ return e.defaultOptions = _.defaultOptions, B.js = m, B.css = p, B.html = e, B;
1764
+ }
1765
+ var Kt;
1766
+ function ie() {
1767
+ return Kt || (Kt = 1, (function(m) {
1768
+ function p(_, e, s) {
1769
+ var a = function(f, n) {
1770
+ return _.js_beautify(f, n);
1771
+ };
1772
+ return a.js = _.js_beautify, a.css = e.css_beautify, a.html = s.html_beautify, a.js_beautify = _.js_beautify, a.css_beautify = e.css_beautify, a.html_beautify = s.html_beautify, a;
1773
+ }
1774
+ (function(_) {
1775
+ var e = ee();
1776
+ e.js_beautify = e.js, e.css_beautify = e.css, e.html_beautify = e.html, _.exports = p(e, e, e);
1777
+ })(m);
1778
+ })(V)), V.exports;
1779
+ }
1780
+ var se = ie();
1781
+ const _e = /* @__PURE__ */ $t(se);
1782
+ export {
1783
+ _e as b
1784
+ };