prettier-plugin-embed 0.4.6 → 0.4.8

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 (55) hide show
  1. package/README.md +71 -7
  2. package/dist/embedded/css/language.d.ts +1 -1
  3. package/dist/embedded/css/options.d.ts +14 -0
  4. package/dist/embedded/es/language.d.ts +1 -1
  5. package/dist/embedded/es/options.d.ts +1 -1
  6. package/dist/embedded/glsl/language.d.ts +1 -1
  7. package/dist/embedded/graphql/language.d.ts +1 -1
  8. package/dist/embedded/html/language.d.ts +1 -1
  9. package/dist/embedded/ini/language.d.ts +1 -1
  10. package/dist/embedded/java/embedder.d.ts +12 -0
  11. package/dist/embedded/java/index.d.ts +3 -0
  12. package/dist/embedded/java/language.d.ts +9 -0
  13. package/dist/embedded/java/options.d.ts +38 -0
  14. package/dist/embedded/json/language.d.ts +1 -1
  15. package/dist/embedded/jsonata/embedder.d.ts +12 -0
  16. package/dist/embedded/jsonata/index.d.ts +3 -0
  17. package/dist/embedded/jsonata/language.d.ts +9 -0
  18. package/dist/embedded/jsonata/options.d.ts +33 -0
  19. package/dist/embedded/latex/language.d.ts +1 -1
  20. package/dist/embedded/markdown/language.d.ts +1 -1
  21. package/dist/embedded/markdown/options.d.ts +14 -0
  22. package/dist/embedded/nginx/embedder.d.ts +12 -0
  23. package/dist/embedded/nginx/index.d.ts +3 -0
  24. package/dist/embedded/nginx/language.d.ts +9 -0
  25. package/dist/embedded/nginx/options.d.ts +34 -0
  26. package/dist/embedded/noop/language.d.ts +1 -1
  27. package/dist/embedded/pegjs/embedder.d.ts +12 -0
  28. package/dist/embedded/pegjs/index.d.ts +3 -0
  29. package/dist/embedded/pegjs/language.d.ts +9 -0
  30. package/dist/embedded/pegjs/options.d.ts +36 -0
  31. package/dist/embedded/php/language.d.ts +1 -1
  32. package/dist/embedded/prisma/embedder.d.ts +12 -0
  33. package/dist/embedded/prisma/index.d.ts +3 -0
  34. package/dist/embedded/prisma/language.d.ts +9 -0
  35. package/dist/embedded/prisma/options.d.ts +33 -0
  36. package/dist/embedded/properties/language.d.ts +1 -1
  37. package/dist/embedded/pug/embedder.d.ts +12 -0
  38. package/dist/embedded/pug/index.d.ts +3 -0
  39. package/dist/embedded/pug/language.d.ts +9 -0
  40. package/dist/embedded/pug/options.d.ts +60 -0
  41. package/dist/embedded/register.d.ts +20 -14
  42. package/dist/embedded/ruby/language.d.ts +1 -1
  43. package/dist/embedded/sh/language.d.ts +1 -1
  44. package/dist/embedded/sql/language.d.ts +1 -1
  45. package/dist/embedded/toml/language.d.ts +1 -1
  46. package/dist/embedded/ts/language.d.ts +1 -1
  47. package/dist/embedded/ts/options.d.ts +1 -1
  48. package/dist/embedded/utils.d.ts +2 -2
  49. package/dist/embedded/xml/language.d.ts +1 -1
  50. package/dist/embedded/yaml/language.d.ts +1 -1
  51. package/dist/index.js +1295 -1043
  52. package/dist/options.d.ts +93 -19
  53. package/dist/types.d.ts +1 -1
  54. package/dist/utils.d.ts +1 -1
  55. package/package.json +19 -9
package/dist/index.js CHANGED
@@ -1,174 +1,187 @@
1
- import { utils as X, builders as D } from "prettier/doc";
2
- import wt from "prettier/parser-babel";
3
- import Bt from "prettier/parser-espree";
4
- import Ut from "prettier/parser-flow";
5
- import qt from "prettier/parser-meriyah";
6
- import Ct from "prettier/parser-typescript";
7
- import { printers as Wt } from "prettier/plugins/estree.mjs";
8
- import { readFile as Gt } from "node:fs/promises";
9
- import { isAbsolute as zt, dirname as Kt, resolve as Ht, extname as Jt } from "node:path";
10
- import { Worker as Xt } from "node:worker_threads";
11
- import { resolveConfigFile as Yt } from "prettier";
12
- const { group: Qt, indent: Vt, softline: ce, lineSuffixBoundary: Zt } = D, { mapDoc: en } = X;
13
- function tn(t, n) {
14
- const { node: r } = t;
15
- let e = n();
16
- return r?.comments?.length && (e = Qt([Vt([ce, e]), ce])), ["${", e, Zt, "}"];
1
+ import { builders as $, utils as Bt } from "prettier/doc";
2
+ import hn from "prettier/parser-babel";
3
+ import fn from "prettier/parser-espree";
4
+ import bn from "prettier/parser-flow";
5
+ import En from "prettier/parser-meriyah";
6
+ import _n from "prettier/parser-typescript";
7
+ import { printers as yn } from "prettier/plugins/estree.mjs";
8
+ import { readFile as vn } from "node:fs/promises";
9
+ import { isAbsolute as $n, dirname as In, resolve as Dn, extname as Tn } from "node:path";
10
+ import { Worker as xn } from "node:worker_threads";
11
+ import { resolveConfigFile as Sn } from "prettier";
12
+ const { group: Ln, indent: kn, softline: he, hardline: On, lineSuffixBoundary: An } = $, { mapDoc: Mn } = Bt;
13
+ function Pn(e, t) {
14
+ const { node: n } = e;
15
+ let r = t();
16
+ return n?.comments?.length && (r = Ln([kn([he, r]), he])), ["${", r, An, "}"];
17
17
  }
18
- function x(t, n) {
19
- return t.map(
20
- (r) => tn(r, n),
18
+ function T(e, t) {
19
+ return e.map(
20
+ (n) => Pn(n, t),
21
21
  "expressions"
22
22
  );
23
23
  }
24
- function L(t, n, r) {
25
- return en(t, (o) => {
26
- if (typeof o != "string")
27
- return o;
28
- const s = [], l = o.split(n);
29
- for (let a = 0; a < l.length; a++) {
30
- let g = l[a];
31
- if (a % 2 == 0) {
32
- if (!g)
24
+ function D(e, t, n, r = !1) {
25
+ return Mn(e, (c) => {
26
+ if (typeof c != "string")
27
+ return c;
28
+ const o = [], d = c.split(t);
29
+ for (let p = 0; p < d.length; p++) {
30
+ let h = d[p];
31
+ if (p % 2 === 0) {
32
+ if (!h)
33
33
  continue;
34
- g = g.replaceAll(/([\\`]|\${)/g, "\\$1"), s.push(g);
34
+ if (h = h.replaceAll(/([\\`]|\${)/g, "\\$1"), r)
35
+ for (const a of h.split(/(\n)/))
36
+ a === `
37
+ ` ? o.push(On) : o.push(a);
38
+ else
39
+ o.push(h);
35
40
  } else {
36
- const c = Number(g);
37
- s.push(r[c]);
41
+ const a = Number(h);
42
+ o.push(n[a]);
38
43
  }
39
44
  }
40
- return s;
45
+ return o;
41
46
  });
42
47
  }
43
- function A(t, n, r) {
44
- if (!(n.plugins?.some(
45
- (e) => e.name?.match(
46
- new RegExp("(^|/)" + te(t) + "($|/)")
48
+ function k(e, t, n) {
49
+ if (!(t.plugins?.some(
50
+ (r) => r.name?.match(
51
+ new RegExp(`(^|/)${ie(e)}($|/)`)
47
52
  ) ?? !1
48
53
  ) ?? !1))
49
54
  throw new Error(
50
- `Cannot format embedded language identified by "${r}", because plugin "${t}" is not loaded.`
55
+ `Cannot format embedded language identified by "${n}", because plugin "${e}" is not loaded.`
51
56
  );
52
57
  }
53
- function nn(t, n, r) {
54
- if (n === r) {
55
- t.unshift(n);
58
+ function jn(e, t, n) {
59
+ if (t === n) {
60
+ e.unshift(t);
56
61
  return;
57
62
  }
58
- let e = 0, o = t.length;
59
- for (; e < o; ) {
60
- const s = e + o >>> 1;
61
- if (t[s] === r) {
62
- t.push(n);
63
+ let r = 0, s = e.length;
64
+ for (; r < s; ) {
65
+ const c = r + s >>> 1;
66
+ if (e[c] === n) {
67
+ e.push(t);
63
68
  return;
64
69
  }
65
- t[s] < n ? e = s + 1 : o = s;
70
+ e[c] < t ? r = c + 1 : s = c;
66
71
  }
67
- t.splice(e, 0, n);
72
+ e.splice(r, 0, t);
68
73
  }
69
- const Q = (() => {
70
- const t = [...Array(26).keys()].map((n) => String.fromCharCode(n + 97)).concat([...Array(10).keys()].map((n) => `${n}`));
74
+ const ne = (() => {
75
+ const e = [...Array(26).keys()].map((t) => String.fromCharCode(t + 97)).concat([...Array(10).keys()].map((t) => `${t}`));
71
76
  return () => {
72
- let r = "";
73
- for (let e = 0; e < 16; ++e)
74
- r += t[parseInt((Math.random() * t.length).toFixed(0), 10) % t.length];
75
- return r;
77
+ let n = "";
78
+ for (let r = 0; r < 16; ++r)
79
+ n += e[parseInt((Math.random() * e.length).toFixed(0), 10) % e.length];
80
+ return n;
76
81
  };
77
82
  })();
78
- function S(t = "p", n = "") {
79
- const r = Q(), e = Q(), o = te(t), s = te(n), l = (g) => `${t}${r}${g}${e}${n}`, a = new RegExp(
80
- `${o}${r}(\\d+)${e}${s}`,
83
+ function x(e = "p", t = "") {
84
+ const n = ne(), r = ne(), s = ie(e), c = ie(t), o = (p) => `${e}${n}${p}${r}${t}`, d = new RegExp(
85
+ `${s}${n}(\\d+)${r}${c}`,
81
86
  "ig"
82
87
  );
83
88
  return {
84
- createPlaceholder: l,
85
- placeholderRegex: a
89
+ createPlaceholder: o,
90
+ placeholderRegex: d
86
91
  };
87
92
  }
88
- function te(t) {
89
- return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
93
+ function ie(e) {
94
+ return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
90
95
  }
91
- function T(t) {
92
- return `${t}Identifiers`;
96
+ function I(e) {
97
+ return `${e}Identifiers`;
93
98
  }
94
- function rn(t) {
95
- return `${t}Plugin`;
99
+ function Nn(e) {
100
+ return `${e}Plugin`;
96
101
  }
97
- function Y(t) {
98
- return `${t}Parser`;
102
+ function A(e) {
103
+ return `${e}Parser`;
99
104
  }
100
- const { line: de, group: O, indent: le, softline: ue } = D, on = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
101
- e = {
102
- ...e,
103
- ...s
104
- };
105
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S("@p"), c = l.quasis.map(
106
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
107
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
108
- d.length,
105
+ const { line: fe, group: M, indent: be, softline: Ee } = $, Rn = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
106
+ const o = {
107
+ ...r,
108
+ ...c
109
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x("@p"), a = d.quasis.map(
110
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
111
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
112
+ l.length,
109
113
  -u.length || void 0
110
- ), E = x(r, n), b = await t(y, {
111
- ...e,
112
- parser: "scss"
113
- }), i = L(b, g, E);
114
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
115
- return O([
114
+ ), b = T(n, t), y = await e(E, {
115
+ ...o,
116
+ parser: o.embeddedCssParser ?? "scss"
117
+ }), i = D(y, h, b);
118
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
119
+ return M([
116
120
  "`",
117
- d,
118
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [O(i)] : le([O(i)]),
121
+ l,
122
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [M(i)] : be([M(i)]),
119
123
  u,
120
124
  "`"
121
125
  ]);
122
- const h = d.length ? de : ue, v = u.length ? de : ue;
123
- return O([
126
+ const f = l.length ? fe : Ee, v = u.length ? fe : Ee;
127
+ return M([
124
128
  "`",
125
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, O(i)] : le([h, O(i)]),
129
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, M(i)] : be([f, M(i)]),
126
130
  v,
127
131
  "`"
128
132
  ]);
129
- }, pt = "embeddedCss", sn = ["css"], an = T(pt), cn = {
130
- [an]: {
133
+ }, ae = "embeddedCss", Fn = ["css"], wn = ["css", "less", "scss"], Bn = I(ae), Un = A(ae), Wn = {
134
+ [Bn]: {
131
135
  category: "Embed",
132
136
  type: "string",
133
137
  array: !0,
134
- default: [{ value: [...sn] }],
138
+ default: [{ value: [...Fn] }],
135
139
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded CSS language."
140
+ },
141
+ [Un]: {
142
+ category: "Embed",
143
+ type: "choice",
144
+ default: "scss",
145
+ description: "The parser used to parse the embedded CSS language.",
146
+ choices: wn.map((e) => ({
147
+ value: e,
148
+ description: `Use the "${e}" parser.`
149
+ }))
136
150
  }
137
- }, dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
151
+ }, qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
138
152
  __proto__: null,
139
- embedder: on,
140
- language: pt,
141
- options: cn
142
- }, Symbol.toStringTag, { value: "Module" })), { line: ge, group: P, indent: me, softline: pe } = D, ln = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
143
- e = {
144
- ...e,
145
- ...s
146
- };
147
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
148
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
149
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
150
- d.length,
153
+ embedder: Rn,
154
+ language: ae,
155
+ options: Wn
156
+ }, Symbol.toStringTag, { value: "Module" })), { line: _e, group: P, indent: ye, softline: ve } = $, Gn = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
157
+ const o = {
158
+ ...r,
159
+ ...c
160
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
161
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
162
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
163
+ l.length,
151
164
  -u.length || void 0
152
- ), E = x(r, n), b = await t(y, {
153
- ...e,
154
- parser: e.embeddedEsParser ?? "babel"
155
- }), i = L(b, g, E);
156
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
165
+ ), b = T(n, t), y = await e(E, {
166
+ ...o,
167
+ parser: o.embeddedEsParser ?? "babel"
168
+ }), i = D(y, h, b);
169
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
157
170
  return P([
158
171
  "`",
159
- d,
160
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [P(i)] : me([P(i)]),
172
+ l,
173
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [P(i)] : ye([P(i)]),
161
174
  u,
162
175
  "`"
163
176
  ]);
164
- const h = d.length ? ge : pe, v = u.length ? ge : pe;
177
+ const f = l.length ? _e : ve, v = u.length ? _e : ve;
165
178
  return P([
166
179
  "`",
167
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, P(i)] : me([h, P(i)]),
180
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, P(i)] : ye([f, P(i)]),
168
181
  v,
169
182
  "`"
170
183
  ]);
171
- }, ne = "embeddedEs", un = [
184
+ }, ce = "embeddedEs", Cn = [
172
185
  "js",
173
186
  "jsx",
174
187
  "es",
@@ -177,324 +190,414 @@ const { line: de, group: O, indent: le, softline: ue } = D, on = async (t, n, r,
177
190
  "cjs",
178
191
  "pac",
179
192
  "javascript"
180
- ], gn = [
193
+ ], zn = [
181
194
  "babel",
182
195
  "babel-flow",
183
196
  "acorn",
184
197
  "espree",
185
198
  "flow",
186
199
  "meriyah"
187
- ], mn = T(ne), pn = Y(ne), hn = {
188
- [mn]: {
200
+ ], Kn = I(ce), Jn = A(ce), Hn = {
201
+ [Kn]: {
189
202
  category: "Embed",
190
203
  type: "string",
191
204
  array: !0,
192
- default: [{ value: [...un] }],
205
+ default: [{ value: [...Cn] }],
193
206
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language."
194
207
  },
195
- [pn]: {
208
+ [Jn]: {
196
209
  category: "Embed",
197
210
  type: "choice",
198
211
  default: "babel",
199
212
  description: "The parser used to parse the embedded ECMASCript/JavaScript language.",
200
- choices: gn.map((t) => ({
201
- value: t,
202
- description: `Use the "${t}" parser.`
213
+ choices: zn.map((e) => ({
214
+ value: e,
215
+ description: `Use the "${e}" parser.`
203
216
  }))
204
217
  }
205
- }, fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
218
+ }, Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
206
219
  __proto__: null,
207
- embedder: ln,
208
- language: ne,
209
- options: hn
210
- }, Symbol.toStringTag, { value: "Module" })), { line: he, group: M, indent: fe, softline: be } = D, bn = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
211
- A("prettier-plugin-glsl", e, o), e = {
212
- ...e,
213
- ...s
214
- };
215
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
216
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
217
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
218
- d.length,
220
+ embedder: Gn,
221
+ language: ce,
222
+ options: Hn
223
+ }, Symbol.toStringTag, { value: "Module" })), { line: $e, group: j, indent: Ie, softline: De } = $, Yn = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
224
+ k("prettier-plugin-glsl", r, s);
225
+ const o = {
226
+ ...r,
227
+ ...c
228
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
229
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
230
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
231
+ l.length,
219
232
  -u.length || void 0
220
- ), E = x(r, n), b = await t(y, {
221
- ...e,
233
+ ), b = T(n, t), y = await e(E, {
234
+ ...o,
222
235
  parser: "glsl-parser"
223
- }), i = L(b, g, E);
224
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
225
- return M([
236
+ }), i = D(y, h, b);
237
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
238
+ return j([
226
239
  "`",
227
- d,
228
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [M(i)] : fe([M(i)]),
240
+ l,
241
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [j(i)] : Ie([j(i)]),
229
242
  u,
230
243
  "`"
231
244
  ]);
232
- const h = d.length ? he : be, v = u.length ? he : be;
233
- return M([
245
+ const f = l.length ? $e : De, v = u.length ? $e : De;
246
+ return j([
234
247
  "`",
235
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, M(i)] : fe([h, M(i)]),
248
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, j(i)] : Ie([f, j(i)]),
236
249
  v,
237
250
  "`"
238
251
  ]);
239
- }, ht = "embeddedGlsl", En = ["glsl", "shader"], yn = T(ht), _n = {
240
- [yn]: {
252
+ }, Ut = "embeddedGlsl", Qn = ["glsl", "shader"], Vn = I(Ut), Zn = {
253
+ [Vn]: {
241
254
  category: "Embed",
242
255
  type: "string",
243
256
  array: !0,
244
- default: [{ value: [...En] }],
257
+ default: [{ value: [...Qn] }],
245
258
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin."
246
259
  }
247
- }, vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
260
+ }, eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
248
261
  __proto__: null,
249
- embedder: bn,
250
- language: ht,
251
- options: _n
252
- }, Symbol.toStringTag, { value: "Module" })), { line: Ee, group: N, indent: ye, softline: _e } = D, $n = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
253
- e = {
254
- ...e,
255
- ...s
256
- };
257
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
258
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
259
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
260
- d.length,
262
+ embedder: Yn,
263
+ language: Ut,
264
+ options: Zn
265
+ }, Symbol.toStringTag, { value: "Module" })), { line: Te, group: N, indent: xe, softline: Se } = $, to = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
266
+ const o = {
267
+ ...r,
268
+ ...c
269
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
270
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
271
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
272
+ l.length,
261
273
  -u.length || void 0
262
- ), E = x(r, n), b = await t(y, {
263
- ...e,
274
+ ), b = T(n, t), y = await e(E, {
275
+ ...o,
264
276
  parser: "graphql"
265
- }), i = L(b, g, E);
266
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
277
+ }), i = D(y, h, b);
278
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
267
279
  return N([
268
280
  "`",
269
- d,
270
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [N(i)] : ye([N(i)]),
281
+ l,
282
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [N(i)] : xe([N(i)]),
271
283
  u,
272
284
  "`"
273
285
  ]);
274
- const h = d.length ? Ee : _e, v = u.length ? Ee : _e;
286
+ const f = l.length ? Te : Se, v = u.length ? Te : Se;
275
287
  return N([
276
288
  "`",
277
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, N(i)] : ye([h, N(i)]),
289
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, N(i)] : xe([f, N(i)]),
278
290
  v,
279
291
  "`"
280
292
  ]);
281
- }, ft = "embeddedGraphql", In = ["graphql", "gql"], Dn = T(ft), Tn = {
282
- [Dn]: {
293
+ }, Wt = "embeddedGraphql", no = ["graphql", "gql"], oo = I(Wt), so = {
294
+ [oo]: {
283
295
  category: "Embed",
284
296
  type: "string",
285
297
  array: !0,
286
- default: [{ value: [...In] }],
298
+ default: [{ value: [...no] }],
287
299
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GraphQL language."
288
300
  }
289
- }, xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
301
+ }, ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
290
302
  __proto__: null,
291
- embedder: $n,
292
- language: ft,
293
- options: Tn
294
- }, Symbol.toStringTag, { value: "Module" })), { line: ve, group: R, indent: $e, softline: Ie } = D, { mapDoc: Sn } = X, Ln = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
295
- e = {
296
- ...e,
297
- ...s
298
- };
299
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
300
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
301
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
302
- d.length,
303
+ embedder: to,
304
+ language: Wt,
305
+ options: so
306
+ }, Symbol.toStringTag, { value: "Module" })), { line: Le, group: R, indent: ke, softline: Oe } = $, { mapDoc: io } = Bt, ao = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
307
+ const o = {
308
+ ...r,
309
+ ...c
310
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
311
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
312
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
313
+ l.length,
303
314
  -u.length || void 0
304
- ), E = x(r, n), b = await t(y, {
305
- ...e,
306
- parser: e.embeddedHtmlParser ?? "html"
307
- }), i = Sn(b, (p) => {
308
- if (typeof p != "string")
309
- return p;
310
- const m = [], f = p.split(g);
311
- for (let $ = 0; $ < f.length; $++) {
312
- let _ = f[$];
313
- if ($ % 2 == 0) {
314
- if (!_)
315
+ ), b = T(n, t), y = await e(E, {
316
+ ...o,
317
+ parser: o.embeddedHtmlParser ?? "html"
318
+ }), i = io(y, (m) => {
319
+ if (typeof m != "string")
320
+ return m;
321
+ const g = [], _ = m.split(h);
322
+ for (let S = 0; S < _.length; S++) {
323
+ let L = _[S];
324
+ if (S % 2 === 0) {
325
+ if (!L)
315
326
  continue;
316
- _ = _.replaceAll(/([\\`]|\${)/g, "\\$1"), e.__embeddedInHtml && (_ = _.replaceAll(/<\/(?=script\b)/gi, "<\\/")), m.push(_);
327
+ L = L.replaceAll(/([\\`]|\${)/g, "\\$1"), o.__embeddedInHtml && (L = L.replaceAll(/<\/(?=script\b)/gi, "<\\/")), g.push(L);
317
328
  } else {
318
- const I = Number(_);
319
- m.push(E[I]);
329
+ const O = Number(L);
330
+ g.push(b[O]);
320
331
  }
321
332
  }
322
- return m;
333
+ return g;
323
334
  });
324
- if (e.htmlWhitespaceSensitivity === "strict" || // TODO: is css mode should be included here?
325
- e.htmlWhitespaceSensitivity === "css" || e.preserveEmbeddedExteriorWhitespaces?.includes(o))
335
+ if (o.htmlWhitespaceSensitivity === "strict" || // TODO: is css mode should be included here?
336
+ o.htmlWhitespaceSensitivity === "css" || o.preserveEmbeddedExteriorWhitespaces?.includes(s))
326
337
  return R([
327
338
  "`",
328
- d,
329
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [R(i)] : $e([R(i)]),
339
+ l,
340
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [R(i)] : ke([R(i)]),
330
341
  u,
331
342
  "`"
332
343
  ]);
333
- const h = d.length ? ve : Ie, v = u.length ? ve : Ie;
344
+ const f = l.length ? Le : Oe, v = u.length ? Le : Oe;
334
345
  return R([
335
346
  "`",
336
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, R(i)] : $e([h, R(i)]),
347
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, R(i)] : ke([f, R(i)]),
337
348
  v,
338
349
  "`"
339
350
  ]);
340
- }, re = "embeddedHtml", kn = ["html", "xhtml"], An = ["html", "vue", "angular", "lwc"], On = T(re), Pn = Y(re), Mn = {
341
- [On]: {
351
+ }, de = "embeddedHtml", co = ["html", "xhtml"], lo = ["html", "vue", "angular", "lwc"], uo = I(de), po = A(de), go = {
352
+ [uo]: {
342
353
  category: "Embed",
343
354
  type: "string",
344
355
  array: !0,
345
- default: [{ value: [...kn] }],
356
+ default: [{ value: [...co] }],
346
357
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded HTML language."
347
358
  },
348
- [Pn]: {
359
+ [po]: {
349
360
  category: "Embed",
350
361
  type: "choice",
351
362
  default: "html",
352
363
  description: "The parser used to parse the embedded HTML language.",
353
- choices: An.map((t) => ({
354
- value: t,
355
- description: `Use the "${t}" parser.`
364
+ choices: lo.map((e) => ({
365
+ value: e,
366
+ description: `Use the "${e}" parser.`
356
367
  }))
357
368
  }
358
- }, Nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
369
+ }, mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
359
370
  __proto__: null,
360
- embedder: Ln,
361
- language: re,
362
- options: Mn
363
- }, Symbol.toStringTag, { value: "Module" })), { line: De, group: F, indent: Te, softline: xe } = D, Rn = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
364
- A("prettier-plugin-ini", e, o), e = {
365
- ...e,
366
- ...s
367
- };
368
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
369
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
370
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
371
- d.length,
371
+ embedder: ao,
372
+ language: de,
373
+ options: go
374
+ }, Symbol.toStringTag, { value: "Module" })), { line: Ae, group: F, indent: Me, softline: Pe } = $, ho = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
375
+ k("prettier-plugin-ini", r, s);
376
+ const o = {
377
+ ...r,
378
+ ...c
379
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
380
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
381
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
382
+ l.length,
372
383
  -u.length || void 0
373
- ), E = x(r, n), b = await t(y, {
374
- ...e,
384
+ ), b = T(n, t), y = await e(E, {
385
+ ...o,
375
386
  parser: "ini"
376
- }), i = L(b, g, E);
377
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
387
+ }), i = D(y, h, b);
388
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
378
389
  return F([
379
390
  "`",
380
- d,
381
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [F(i)] : Te([F(i)]),
391
+ l,
392
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [F(i)] : Me([F(i)]),
382
393
  u,
383
394
  "`"
384
395
  ]);
385
- const h = d.length ? De : xe, v = u.length ? De : xe;
396
+ const f = l.length ? Ae : Pe, v = u.length ? Ae : Pe;
386
397
  return F([
387
398
  "`",
388
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, F(i)] : Te([h, F(i)]),
399
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, F(i)] : Me([f, F(i)]),
389
400
  v,
390
401
  "`"
391
402
  ]);
392
- }, bt = "embeddedIni", Fn = ["ini", "cfg", "pro"], jn = T(bt), wn = {
393
- [jn]: {
403
+ }, qt = "embeddedIni", fo = ["ini", "cfg", "pro"], bo = I(qt), Eo = {
404
+ [bo]: {
394
405
  category: "Embed",
395
406
  type: "string",
396
407
  array: !0,
397
- default: [{ value: [...Fn] }],
408
+ default: [{ value: [...fo] }],
398
409
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin."
399
410
  }
400
- }, Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
411
+ }, _o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
401
412
  __proto__: null,
402
- embedder: Rn,
403
- language: bt,
404
- options: wn
405
- }, Symbol.toStringTag, { value: "Module" })), { line: Se, group: j, indent: Le, softline: ke } = D, Un = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
406
- e = {
407
- ...e,
408
- ...s
409
- };
410
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = qn(), c = l.quasis.map(
411
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
412
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
413
- d.length,
413
+ embedder: ho,
414
+ language: qt,
415
+ options: Eo
416
+ }, Symbol.toStringTag, { value: "Module" })), { group: w, line: je, softline: Ne, indent: Re } = $, yo = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
417
+ k("prettier-plugin-java", r, s);
418
+ const o = {
419
+ ...r,
420
+ ...c
421
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
422
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
423
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
424
+ l.length,
414
425
  -u.length || void 0
415
- ), E = x(r, n), b = await t(y, {
416
- ...e,
417
- parser: e.embeddedJsonParser ?? "json"
418
- }), i = L(b, g, E);
419
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
420
- return j([
426
+ ), b = T(n, t), y = await e(E, {
427
+ ...o,
428
+ parser: "java"
429
+ }), i = D(
430
+ y,
431
+ h,
432
+ b,
433
+ !0
434
+ );
435
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
436
+ return w([
421
437
  "`",
422
- d,
423
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [j(i)] : Le([j(i)]),
438
+ l,
439
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [w(i)] : Re([w(i)]),
424
440
  u,
425
441
  "`"
426
442
  ]);
427
- const h = d.length ? Se : ke, v = u.length ? Se : ke;
428
- return j([
443
+ const f = l.length ? je : Ne, v = u.length ? je : Ne;
444
+ return w([
445
+ "`",
446
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, w(i)] : Re([f, w(i)]),
447
+ v,
448
+ "`"
449
+ ]);
450
+ }, Gt = "embeddedJava", vo = ["java"], $o = I(Gt), Io = {
451
+ [$o]: {
452
+ category: "Embed",
453
+ type: "string",
454
+ array: !0,
455
+ default: [{ value: [...vo] }],
456
+ description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin."
457
+ }
458
+ }, Do = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
459
+ __proto__: null,
460
+ embedder: yo,
461
+ language: Gt,
462
+ options: Io
463
+ }, Symbol.toStringTag, { value: "Module" })), { line: Fe, group: B, indent: we, softline: Be } = $, To = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
464
+ const o = {
465
+ ...r,
466
+ ...c
467
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = xo(), a = d.quasis.map(
468
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
469
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
470
+ l.length,
471
+ -u.length || void 0
472
+ ), b = T(n, t), y = await e(E, {
473
+ ...o,
474
+ parser: o.embeddedJsonParser ?? "json"
475
+ }), i = D(y, h, b);
476
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
477
+ return B([
478
+ "`",
479
+ l,
480
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [B(i)] : we([B(i)]),
481
+ u,
482
+ "`"
483
+ ]);
484
+ const f = l.length ? Fe : Be, v = u.length ? Fe : Be;
485
+ return B([
429
486
  "`",
430
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, j(i)] : Le([h, j(i)]),
487
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, B(i)] : we([f, B(i)]),
431
488
  v,
432
489
  "`"
433
490
  ]);
434
491
  };
435
- function qn() {
436
- const t = Q(), n = Q(), r = (o) => `'0${t}${o}${n}'`, e = new RegExp(
437
- `["']?0${t}(\\d+)${n}['"]?`,
492
+ function xo() {
493
+ const e = ne(), t = ne(), n = (s) => `'0${e}${s}${t}'`, r = new RegExp(
494
+ `["']?0${e}(\\d+)${t}['"]?`,
438
495
  "ig"
439
496
  );
440
497
  return {
441
- createPlaceholder: r,
442
- placeholderRegex: e
498
+ createPlaceholder: n,
499
+ placeholderRegex: r
443
500
  };
444
501
  }
445
- const oe = "embeddedJson", Cn = ["json", "jsonl"], Wn = ["json", "json5", "jsonc", "json-stringify"], Gn = Y(oe), zn = T(oe), Kn = {
446
- [zn]: {
502
+ const le = "embeddedJson", So = ["json", "jsonl"], Lo = ["json", "json5", "jsonc", "json-stringify"], ko = A(le), Oo = I(le), Ao = {
503
+ [Oo]: {
447
504
  category: "Embed",
448
505
  type: "string",
449
506
  array: !0,
450
- default: [{ value: [...Cn] }],
507
+ default: [{ value: [...So] }],
451
508
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSON language."
452
509
  },
453
- [Gn]: {
510
+ [ko]: {
454
511
  category: "Embed",
455
512
  type: "choice",
456
513
  default: "json",
457
514
  description: "The parser used to parse the embedded JSON language.",
458
- choices: Wn.map((t) => ({
459
- value: t,
460
- description: `Use the "${t}" parser.`
515
+ choices: Lo.map((e) => ({
516
+ value: e,
517
+ description: `Use the "${e}" parser.`
461
518
  }))
462
519
  }
463
- }, Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
520
+ }, Mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
464
521
  __proto__: null,
465
- embedder: Un,
466
- language: oe,
467
- options: Kn
468
- }, Symbol.toStringTag, { value: "Module" })), { line: Ae, group: w, indent: Oe, softline: Pe } = D, Jn = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
469
- A("prettier-plugin-latex", e, o), e = {
470
- ...e,
471
- ...s
472
- };
473
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
474
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
475
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
476
- d.length,
522
+ embedder: To,
523
+ language: le,
524
+ options: Ao
525
+ }, Symbol.toStringTag, { value: "Module" })), { line: Ue, group: U, indent: We, softline: qe } = $, Po = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
526
+ k(
527
+ "@stedi/prettier-plugin-jsonata",
528
+ r,
529
+ s
530
+ );
531
+ const o = {
532
+ ...r,
533
+ ...c
534
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x("$p"), a = d.quasis.map(
535
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
536
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
537
+ l.length,
477
538
  -u.length || void 0
478
- ), E = x(r, n), b = await t(y, {
479
- ...e,
539
+ ), b = T(n, t), y = await e(E, {
540
+ ...o,
541
+ parser: "JSONata"
542
+ }), i = D(y, h, b);
543
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
544
+ return U([
545
+ "`",
546
+ l,
547
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [U(i)] : We([U(i)]),
548
+ u,
549
+ "`"
550
+ ]);
551
+ const f = l.length ? Ue : qe, v = u.length ? Ue : qe;
552
+ return U([
553
+ "`",
554
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, U(i)] : We([f, U(i)]),
555
+ v,
556
+ "`"
557
+ ]);
558
+ }, Ct = "embeddedJsonata", jo = ["jsonata"], No = I(Ct), Ro = {
559
+ [No]: {
560
+ category: "Embed",
561
+ type: "string",
562
+ array: !0,
563
+ default: [{ value: [...jo] }],
564
+ description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin."
565
+ }
566
+ }, Fo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
567
+ __proto__: null,
568
+ embedder: Po,
569
+ language: Ct,
570
+ options: Ro
571
+ }, Symbol.toStringTag, { value: "Module" })), { line: Ge, group: W, indent: Ce, softline: ze } = $, wo = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
572
+ k("prettier-plugin-latex", r, s);
573
+ const o = {
574
+ ...r,
575
+ ...c
576
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
577
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
578
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
579
+ l.length,
580
+ -u.length || void 0
581
+ ), b = T(n, t), y = await e(E, {
582
+ ...o,
480
583
  parser: "latex-parser"
481
- }), i = L(b, g, E);
482
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
483
- return w([
584
+ }), i = D(y, h, b);
585
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
586
+ return W([
484
587
  "`",
485
- d,
486
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [w(i)] : Oe([w(i)]),
588
+ l,
589
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [W(i)] : Ce([W(i)]),
487
590
  u,
488
591
  "`"
489
592
  ]);
490
- const h = d.length ? Ae : Pe, v = u.length ? Ae : Pe;
491
- return w([
593
+ const f = l.length ? Ge : ze, v = u.length ? Ge : ze;
594
+ return W([
492
595
  "`",
493
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, w(i)] : Oe([h, w(i)]),
596
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, W(i)] : Ce([f, W(i)]),
494
597
  v,
495
598
  "`"
496
599
  ]);
497
- }, Et = "embeddedLatex", Xn = [
600
+ }, zt = "embeddedLatex", Bo = [
498
601
  "latex",
499
602
  "tex",
500
603
  "aux",
@@ -503,604 +606,746 @@ const oe = "embeddedJson", Cn = ["json", "jsonl"], Wn = ["json", "json5", "jsonc
503
606
  "bib",
504
607
  "toc",
505
608
  "sty"
506
- ], Yn = T(Et), Qn = {
507
- [Yn]: {
609
+ ], Uo = I(zt), Wo = {
610
+ [Uo]: {
508
611
  category: "Embed",
509
612
  type: "string",
510
613
  array: !0,
511
- default: [{ value: [...Xn] }],
614
+ default: [{ value: [...Bo] }],
512
615
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin."
513
616
  }
514
- }, Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
617
+ }, qo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
515
618
  __proto__: null,
516
- embedder: Jn,
517
- language: Et,
518
- options: Qn
519
- }, Symbol.toStringTag, { value: "Module" })), { line: Me, group: B, indent: Ne, softline: Re } = D, Zn = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
520
- e = {
521
- ...e,
522
- ...s
523
- };
524
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
525
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
526
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
527
- d.length,
619
+ embedder: wo,
620
+ language: zt,
621
+ options: Wo
622
+ }, Symbol.toStringTag, { value: "Module" })), { line: Ke, group: q, indent: Je, softline: He } = $, Go = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
623
+ const o = {
624
+ ...r,
625
+ ...c
626
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
627
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
628
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
629
+ l.length,
528
630
  -u.length || void 0
529
- ), E = x(r, n), b = await t(y, {
530
- ...e,
531
- parser: "markdown",
631
+ ), b = T(n, t), y = await e(E, {
632
+ ...o,
633
+ parser: o.embeddedMarkdownParser ?? "markdown",
532
634
  __inJsTemplate: !0
533
- }), i = L(b, g, E);
534
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
535
- return B([
635
+ }), i = D(y, h, b);
636
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
637
+ return q([
536
638
  "`",
537
- d,
538
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [B(i)] : Ne([B(i)]),
639
+ l,
640
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [q(i)] : Je([q(i)]),
539
641
  u,
540
642
  "`"
541
643
  ]);
542
- const h = d.length ? Me : Re, v = u.length ? Me : Re;
543
- return B([
644
+ const f = l.length ? Ke : He, v = u.length ? Ke : He;
645
+ return q([
544
646
  "`",
545
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, B(i)] : Ne([h, B(i)]),
647
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, q(i)] : Je([f, q(i)]),
546
648
  v,
547
649
  "`"
548
650
  ]);
549
- }, yt = "embeddedMarkdown", er = ["md", "markdown"], tr = T(yt), nr = {
550
- [tr]: {
651
+ }, ue = "embeddedMarkdown", Co = ["md", "markdown"], zo = ["markdown", "mdx", "remark"], Ko = I(ue), Jo = A(ue), Ho = {
652
+ [Ko]: {
551
653
  category: "Embed",
552
654
  type: "string",
553
655
  array: !0,
554
- default: [{ value: [...er] }],
656
+ default: [{ value: [...Co] }],
555
657
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Markdown language."
658
+ },
659
+ [Jo]: {
660
+ category: "Embed",
661
+ type: "choice",
662
+ default: "markdown",
663
+ description: "The parser used to parse the embedded Markdown language.",
664
+ choices: zo.map((e) => ({
665
+ value: e,
666
+ description: `Use the "${e}" parser.`
667
+ }))
668
+ }
669
+ }, Xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
670
+ __proto__: null,
671
+ embedder: Go,
672
+ language: ue,
673
+ options: Ho
674
+ }, Symbol.toStringTag, { value: "Module" })), { line: Xe, group: G, indent: Ye, softline: Qe } = $, Yo = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
675
+ k("prettier-plugin-nginx", r, s);
676
+ const o = {
677
+ ...r,
678
+ ...c
679
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
680
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
681
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
682
+ l.length,
683
+ -u.length || void 0
684
+ ), b = T(n, t), y = await e(E, {
685
+ ...o,
686
+ parser: "nginx"
687
+ }), i = D(y, h, b);
688
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
689
+ return G([
690
+ "`",
691
+ l,
692
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [G(i)] : Ye([G(i)]),
693
+ u,
694
+ "`"
695
+ ]);
696
+ const f = l.length ? Xe : Qe, v = u.length ? Xe : Qe;
697
+ return G([
698
+ "`",
699
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, G(i)] : Ye([f, G(i)]),
700
+ v,
701
+ "`"
702
+ ]);
703
+ }, Kt = "embeddedNginx", Qo = ["nginx"], Vo = I(Kt), Zo = {
704
+ [Vo]: {
705
+ category: "Embed",
706
+ type: "string",
707
+ array: !0,
708
+ default: [{ value: [...Qo] }],
709
+ description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin."
556
710
  }
557
- }, rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
711
+ }, es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
558
712
  __proto__: null,
559
- embedder: Zn,
560
- language: yt,
561
- options: nr
562
- }, Symbol.toStringTag, { value: "Module" })), se = "embeddedNoop", or = T(se), sr = {
563
- [or]: {
713
+ embedder: Yo,
714
+ language: Kt,
715
+ options: Zo
716
+ }, Symbol.toStringTag, { value: "Module" })), pe = "embeddedNoop", ts = I(pe), ns = {
717
+ [ts]: {
564
718
  category: "Embed",
565
719
  type: "string",
566
720
  array: !0,
567
721
  default: [{ value: [] }],
568
722
  description: "Tag or comment identifiers that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted."
569
723
  }
570
- }, ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
724
+ }, os = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
571
725
  __proto__: null,
572
- language: se,
573
- options: sr
574
- }, Symbol.toStringTag, { value: "Module" })), { line: Fe, group: U, indent: je, softline: we } = D, ar = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
575
- A("@prettier/plugin-php", e, o), e = {
576
- ...e,
577
- ...s
578
- };
579
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S("$p"), c = l.quasis.map(
580
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
581
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
582
- d.length,
726
+ language: pe,
727
+ options: ns
728
+ }, Symbol.toStringTag, { value: "Module" })), { line: Ve, group: C, indent: Ze, softline: et } = $, ss = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
729
+ k("prettier-plugin-pegjs", r, s);
730
+ const o = {
731
+ ...r,
732
+ ...c
733
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
734
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
735
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
736
+ l.length,
737
+ -u.length || void 0
738
+ ), b = T(n, t), y = await e(E, {
739
+ ...o,
740
+ parser: "pegjs-parser"
741
+ }), i = D(y, h, b);
742
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
743
+ return C([
744
+ "`",
745
+ l,
746
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [C(i)] : Ze([C(i)]),
747
+ u,
748
+ "`"
749
+ ]);
750
+ const f = l.length ? Ve : et, v = u.length ? Ve : et;
751
+ return C([
752
+ "`",
753
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, C(i)] : Ze([f, C(i)]),
754
+ v,
755
+ "`"
756
+ ]);
757
+ }, Jt = "embeddedPegjs", rs = ["pegjs", "peggy", "peg"], is = I(Jt), as = {
758
+ [is]: {
759
+ category: "Embed",
760
+ type: "string",
761
+ array: !0,
762
+ default: [{ value: [...rs] }],
763
+ description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin."
764
+ }
765
+ }, cs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
766
+ __proto__: null,
767
+ embedder: ss,
768
+ language: Jt,
769
+ options: as
770
+ }, Symbol.toStringTag, { value: "Module" })), { line: tt, group: z, indent: nt, softline: ot } = $, ds = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
771
+ k("@prettier/plugin-php", r, s);
772
+ const o = {
773
+ ...r,
774
+ ...c
775
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x("$p"), a = d.quasis.map(
776
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
777
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
778
+ l.length,
583
779
  -u.length || void 0
584
- ), E = x(r, n), b = await t(y, {
585
- ...e,
780
+ ), b = T(n, t), y = await e(E, {
781
+ ...o,
586
782
  parser: "php"
587
- }), i = L(b, g, E);
588
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
589
- return U([
783
+ }), i = D(y, h, b);
784
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
785
+ return z([
590
786
  "`",
591
- d,
592
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [U(i)] : je([U(i)]),
787
+ l,
788
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [z(i)] : nt([z(i)]),
593
789
  u,
594
790
  "`"
595
791
  ]);
596
- const h = d.length ? Fe : we, v = u.length ? Fe : we;
597
- return U([
792
+ const f = l.length ? tt : ot, v = u.length ? tt : ot;
793
+ return z([
598
794
  "`",
599
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, U(i)] : je([h, U(i)]),
795
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, z(i)] : nt([f, z(i)]),
600
796
  v,
601
797
  "`"
602
798
  ]);
603
- }, _t = "embeddedPhp", cr = ["php", "php5"], dr = T(_t), lr = {
604
- [dr]: {
799
+ }, Ht = "embeddedPhp", ls = ["php", "php5"], us = I(Ht), ps = {
800
+ [us]: {
605
801
  category: "Embed",
606
802
  type: "string",
607
803
  array: !0,
608
- default: [{ value: [...cr] }],
804
+ default: [{ value: [...ls] }],
609
805
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin."
610
806
  }
611
- }, ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
807
+ }, gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
612
808
  __proto__: null,
613
- embedder: ar,
614
- language: _t,
615
- options: lr
616
- }, Symbol.toStringTag, { value: "Module" })), { line: Be, group: q, indent: Ue, softline: qe } = D, gr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
617
- A("prettier-plugin-properties", e, o), e = {
618
- ...e,
619
- ...s
620
- };
621
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
622
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
623
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
624
- d.length,
809
+ embedder: ds,
810
+ language: Ht,
811
+ options: ps
812
+ }, Symbol.toStringTag, { value: "Module" })), { line: st, group: K, indent: rt, softline: it } = $, ms = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
813
+ k("prettier-plugin-prisma", r, s);
814
+ const o = {
815
+ ...r,
816
+ ...c
817
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
818
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
819
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
820
+ l.length,
821
+ -u.length || void 0
822
+ ), b = T(n, t), y = await e(E, {
823
+ ...o,
824
+ parser: "prisma-parse"
825
+ }), i = D(y, h, b);
826
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
827
+ return K([
828
+ "`",
829
+ l,
830
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [K(i)] : rt([K(i)]),
831
+ u,
832
+ "`"
833
+ ]);
834
+ const f = l.length ? st : it, v = u.length ? st : it;
835
+ return K([
836
+ "`",
837
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, K(i)] : rt([f, K(i)]),
838
+ v,
839
+ "`"
840
+ ]);
841
+ }, Xt = "embeddedPrisma", hs = ["prisma"], fs = I(Xt), bs = {
842
+ [fs]: {
843
+ category: "Embed",
844
+ type: "string",
845
+ array: !0,
846
+ default: [{ value: [...hs] }],
847
+ description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin."
848
+ }
849
+ }, Es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
850
+ __proto__: null,
851
+ embedder: ms,
852
+ language: Xt,
853
+ options: bs
854
+ }, Symbol.toStringTag, { value: "Module" })), { line: at, group: J, indent: ct, softline: dt } = $, _s = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
855
+ k("prettier-plugin-properties", r, s);
856
+ const o = {
857
+ ...r,
858
+ ...c
859
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
860
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
861
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
862
+ l.length,
625
863
  -u.length || void 0
626
- ), E = x(r, n), b = await t(y, {
627
- ...e,
864
+ ), b = T(n, t), y = await e(E, {
865
+ ...o,
628
866
  parser: "dot-properties"
629
- }), i = L(b, g, E);
630
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
631
- return q([
867
+ }), i = D(y, h, b);
868
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
869
+ return J([
632
870
  "`",
633
- d,
634
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [q(i)] : Ue([q(i)]),
871
+ l,
872
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [J(i)] : ct([J(i)]),
635
873
  u,
636
874
  "`"
637
875
  ]);
638
- const h = d.length ? Be : qe, v = u.length ? Be : qe;
639
- return q([
876
+ const f = l.length ? at : dt, v = u.length ? at : dt;
877
+ return J([
640
878
  "`",
641
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, q(i)] : Ue([h, q(i)]),
879
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, J(i)] : ct([f, J(i)]),
642
880
  v,
643
881
  "`"
644
882
  ]);
645
- }, vt = "embeddedProperties", mr = ["properties"], pr = T(vt), hr = {
646
- [pr]: {
883
+ }, Yt = "embeddedProperties", ys = ["properties"], vs = I(Yt), $s = {
884
+ [vs]: {
647
885
  category: "Embed",
648
886
  type: "string",
649
887
  array: !0,
650
- default: [{ value: [...mr] }],
888
+ default: [{ value: [...ys] }],
651
889
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin."
652
890
  }
653
- }, fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
891
+ }, Is = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
654
892
  __proto__: null,
655
- embedder: gr,
656
- language: vt,
657
- options: hr
658
- }, Symbol.toStringTag, { value: "Module" })), { line: Ce, group: C, indent: We, softline: Ge } = D, br = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
659
- A("@prettier/plugin-ruby", e, o), e = {
660
- ...e,
661
- ...s
662
- };
663
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
664
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
665
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
666
- d.length,
893
+ embedder: _s,
894
+ language: Yt,
895
+ options: $s
896
+ }, Symbol.toStringTag, { value: "Module" })), { group: H, line: lt, softline: ut, indent: pt } = $, Ds = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
897
+ k("@prettier/plugin-pug", r, s);
898
+ const o = {
899
+ ...r,
900
+ ...c
901
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
902
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
903
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
904
+ l.length,
667
905
  -u.length || void 0
668
- ), E = x(r, n), b = await t(y, {
669
- ...e,
670
- parser: e.embeddedRubyParser ?? "ruby"
671
- }), i = L(b, g, E);
672
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
673
- return C([
906
+ ), b = T(n, t), y = await e(E, {
907
+ ...o,
908
+ parser: "pug"
909
+ }), i = D(
910
+ y,
911
+ h,
912
+ b,
913
+ !0
914
+ );
915
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
916
+ return H([
674
917
  "`",
675
- d,
676
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [C(i)] : We([C(i)]),
918
+ l,
919
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [H(i)] : pt([H(i)]),
677
920
  u,
678
921
  "`"
679
922
  ]);
680
- const h = d.length ? Ce : Ge, v = u.length ? Ce : Ge;
681
- return C([
923
+ const f = l.length ? lt : ut, v = u.length ? lt : ut;
924
+ return H([
925
+ "`",
926
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, H(i)] : pt([f, H(i)]),
927
+ v,
928
+ "`"
929
+ ]);
930
+ }, Qt = "embeddedPug", Ts = ["pug", "jade"], xs = I(Qt), Ss = {
931
+ [xs]: {
932
+ category: "Embed",
933
+ type: "string",
934
+ array: !0,
935
+ default: [{ value: [...Ts] }],
936
+ description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin."
937
+ }
938
+ }, Ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
939
+ __proto__: null,
940
+ embedder: Ds,
941
+ language: Qt,
942
+ options: Ss
943
+ }, Symbol.toStringTag, { value: "Module" })), { line: gt, group: X, indent: mt, softline: ht } = $, ks = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
944
+ k("@prettier/plugin-ruby", r, s);
945
+ const o = {
946
+ ...r,
947
+ ...c
948
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
949
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
950
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
951
+ l.length,
952
+ -u.length || void 0
953
+ ), b = T(n, t), y = await e(E, {
954
+ ...o,
955
+ parser: o.embeddedRubyParser ?? "ruby"
956
+ }), i = D(y, h, b);
957
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
958
+ return X([
959
+ "`",
960
+ l,
961
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [X(i)] : mt([X(i)]),
962
+ u,
963
+ "`"
964
+ ]);
965
+ const f = l.length ? gt : ht, v = u.length ? gt : ht;
966
+ return X([
682
967
  "`",
683
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, C(i)] : We([h, C(i)]),
968
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, X(i)] : mt([f, X(i)]),
684
969
  v,
685
970
  "`"
686
971
  ]);
687
- }, $t = "embeddedRuby", Er = ["ruby"], yr = ["ruby", "rbs", "haml"], _r = "embeddedRubyParser", vr = T($t), $r = {
688
- [vr]: {
972
+ }, Vt = "embeddedRuby", Os = ["ruby"], As = ["ruby", "rbs", "haml"], Ms = "embeddedRubyParser", Ps = I(Vt), js = {
973
+ [Ps]: {
689
974
  category: "Embed",
690
975
  type: "string",
691
976
  array: !0,
692
- default: [{ value: [...Er] }],
977
+ default: [{ value: [...Os] }],
693
978
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin."
694
979
  },
695
- [_r]: {
980
+ [Ms]: {
696
981
  category: "Embed",
697
982
  type: "choice",
698
983
  default: "ruby",
699
984
  description: "The parser used to parse the embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.",
700
- choices: yr.map((t) => ({
701
- value: t,
702
- description: `Use the "${t}" parser.`
985
+ choices: As.map((e) => ({
986
+ value: e,
987
+ description: `Use the "${e}" parser.`
703
988
  }))
704
989
  }
705
- }, Ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
990
+ }, Ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
706
991
  __proto__: null,
707
- embedder: br,
708
- language: $t,
709
- options: $r
710
- }, Symbol.toStringTag, { value: "Module" })), { hardline: Dr, group: W, line: ze, softline: Ke, indent: He } = D, { mapDoc: Tr } = X, xr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
711
- e = {
712
- ...e,
713
- ...s
714
- };
715
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
716
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
717
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
718
- d.length,
992
+ embedder: ks,
993
+ language: Vt,
994
+ options: js
995
+ }, Symbol.toStringTag, { value: "Module" })), { group: Y, line: ft, softline: bt, indent: Et } = $, Rs = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
996
+ k("prettier-plugin-sh", r, s);
997
+ const o = {
998
+ ...r,
999
+ ...c
1000
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
1001
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
1002
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
1003
+ l.length,
719
1004
  -u.length || void 0
720
- ), E = x(r, n), b = await t(y, {
721
- ...e,
1005
+ ), b = T(n, t), y = await e(E, {
1006
+ ...o,
722
1007
  parser: "sh"
723
- }), i = Tr(b, (p) => {
724
- if (typeof p != "string")
725
- return p;
726
- const m = [], f = p.split(g);
727
- for (let $ = 0; $ < f.length; $++) {
728
- let _ = f[$];
729
- if ($ % 2 == 0) {
730
- if (!_)
731
- continue;
732
- _ = _.replaceAll(/([\\`]|\${)/g, "\\$1"), _.split(/(\n)/).forEach((I) => I === `
733
- ` ? m.push(Dr) : m.push(I));
734
- } else {
735
- const I = Number(_);
736
- m.push(E[I]);
737
- }
738
- }
739
- return m;
740
- });
741
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
742
- return W([
1008
+ }), i = D(
1009
+ y,
1010
+ h,
1011
+ b,
1012
+ !0
1013
+ );
1014
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
1015
+ return Y([
743
1016
  "`",
744
- d,
745
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [W(i)] : He([W(i)]),
1017
+ l,
1018
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [Y(i)] : Et([Y(i)]),
746
1019
  u,
747
1020
  "`"
748
1021
  ]);
749
- const h = d.length ? ze : Ke, v = u.length ? ze : Ke;
750
- return W([
1022
+ const f = l.length ? ft : bt, v = u.length ? ft : bt;
1023
+ return Y([
751
1024
  "`",
752
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, W(i)] : He([h, W(i)]),
1025
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, Y(i)] : Et([f, Y(i)]),
753
1026
  v,
754
1027
  "`"
755
1028
  ]);
756
- }, It = "embeddedSh", Sr = ["sh"], Lr = T(It), kr = {
757
- [Lr]: {
1029
+ }, Zt = "embeddedSh", Fs = ["sh"], ws = I(Zt), Bs = {
1030
+ [ws]: {
758
1031
  category: "Embed",
759
1032
  type: "string",
760
1033
  array: !0,
761
- default: [{ value: [...Sr] }],
1034
+ default: [{ value: [...Fs] }],
762
1035
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin."
763
1036
  }
764
- }, Ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1037
+ }, Us = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
765
1038
  __proto__: null,
766
- embedder: xr,
767
- language: It,
768
- options: kr
1039
+ embedder: Rs,
1040
+ language: Zt,
1041
+ options: Bs
769
1042
  }, Symbol.toStringTag, { value: "Module" }));
770
- function Je(t, n) {
771
- var r = Object.keys(t);
1043
+ function _t(e, t) {
1044
+ var n = Object.keys(e);
772
1045
  if (Object.getOwnPropertySymbols) {
773
- var e = Object.getOwnPropertySymbols(t);
774
- n && (e = e.filter(function(o) {
775
- return Object.getOwnPropertyDescriptor(t, o).enumerable;
776
- })), r.push.apply(r, e);
1046
+ var r = Object.getOwnPropertySymbols(e);
1047
+ t && (r = r.filter(function(s) {
1048
+ return Object.getOwnPropertyDescriptor(e, s).enumerable;
1049
+ })), n.push.apply(n, r);
777
1050
  }
778
- return r;
1051
+ return n;
779
1052
  }
780
- function Xe(t) {
781
- for (var n = 1; n < arguments.length; n++) {
782
- var r = arguments[n] != null ? arguments[n] : {};
783
- n % 2 ? Je(Object(r), !0).forEach(function(e) {
784
- Or(t, e, r[e]);
785
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : Je(Object(r)).forEach(function(e) {
786
- Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(r, e));
1053
+ function yt(e) {
1054
+ for (var t = 1; t < arguments.length; t++) {
1055
+ var n = arguments[t] != null ? arguments[t] : {};
1056
+ t % 2 ? _t(Object(n), !0).forEach(function(r) {
1057
+ Ws(e, r, n[r]);
1058
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : _t(Object(n)).forEach(function(r) {
1059
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
787
1060
  });
788
1061
  }
789
- return t;
1062
+ return e;
790
1063
  }
791
- function Or(t, n, r) {
792
- return n = Pr(n), n in t ? Object.defineProperty(t, n, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[n] = r, t;
1064
+ function Ws(e, t, n) {
1065
+ return t = qs(t), t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
793
1066
  }
794
- function Pr(t) {
795
- var n = Mr(t, "string");
796
- return typeof n == "symbol" ? n : String(n);
1067
+ function qs(e) {
1068
+ var t = Gs(e, "string");
1069
+ return typeof t == "symbol" ? t : String(t);
797
1070
  }
798
- function Mr(t, n) {
799
- if (typeof t != "object" || t === null)
800
- return t;
801
- var r = t[Symbol.toPrimitive];
802
- if (r !== void 0) {
803
- var e = r.call(t, n || "default");
804
- if (typeof e != "object")
805
- return e;
1071
+ function Gs(e, t) {
1072
+ if (typeof e != "object" || e === null)
1073
+ return e;
1074
+ var n = e[Symbol.toPrimitive];
1075
+ if (n !== void 0) {
1076
+ var r = n.call(e, t || "default");
1077
+ if (typeof r != "object")
1078
+ return r;
806
1079
  throw new TypeError("@@toPrimitive must return a primitive value.");
807
1080
  }
808
- return (n === "string" ? String : Number)(t);
1081
+ return (t === "string" ? String : Number)(e);
809
1082
  }
810
- const Nr = Dt({});
811
- function Dt(t) {
812
- return n.withOptions = (r) => Dt(Xe(Xe({}, t), r)), n;
813
- function n(r, ...e) {
814
- const o = typeof r == "string" ? [r] : r.raw, {
815
- escapeSpecialCharacters: s = Array.isArray(r)
816
- } = t;
817
- let l = "";
818
- for (let c = 0; c < o.length; c++) {
819
- let d = o[c];
820
- s && (d = d.replace(/\\\n[ \t]*/g, "").replace(/\\`/g, "`").replace(/\\\$/g, "$").replace(/\\{/g, "{")), l += d, c < e.length && (l += e[c]);
1083
+ const Cs = en({});
1084
+ function en(e) {
1085
+ return t.withOptions = (n) => en(yt(yt({}, e), n)), t;
1086
+ function t(n, ...r) {
1087
+ const s = typeof n == "string" ? [n] : n.raw, {
1088
+ escapeSpecialCharacters: c = Array.isArray(n)
1089
+ } = e;
1090
+ let o = "";
1091
+ for (let h = 0; h < s.length; h++) {
1092
+ let a = s[h];
1093
+ c && (a = a.replace(/\\\n[ \t]*/g, "").replace(/\\`/g, "`").replace(/\\\$/g, "$").replace(/\\{/g, "{")), o += a, h < r.length && (o += r[h]);
821
1094
  }
822
- const a = l.split(`
1095
+ const d = o.split(`
823
1096
  `);
824
- let g = null;
825
- for (const c of a) {
826
- const d = c.match(/^(\s+)\S+/);
827
- if (d) {
828
- const u = d[1].length;
829
- g ? g = Math.min(g, u) : g = u;
1097
+ let p = null;
1098
+ for (const h of d) {
1099
+ const a = h.match(/^(\s+)\S+/);
1100
+ if (a) {
1101
+ const l = a[1].length;
1102
+ p ? p = Math.min(p, l) : p = l;
830
1103
  }
831
1104
  }
832
- if (g !== null) {
833
- const c = g;
834
- l = a.map((d) => d[0] === " " || d[0] === " " ? d.slice(c) : d).join(`
1105
+ if (p !== null) {
1106
+ const h = p;
1107
+ o = d.map((a) => a[0] === " " || a[0] === " " ? a.slice(h) : a).join(`
835
1108
  `);
836
1109
  }
837
- return l.trim().replace(/\\n/g, `
1110
+ return o.trim().replace(/\\n/g, `
838
1111
  `);
839
1112
  }
840
1113
  }
841
- const { hardline: Rr, group: G, line: Ye, softline: Qe, indent: Ve } = D, { mapDoc: Fr } = X, jr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
842
- e = {
843
- ...e,
844
- ...s
845
- };
846
- const l = e.embeddedSqlPlugin ?? "prettier-plugin-sql";
847
- A(l, e, o);
848
- const { node: a } = r, { createPlaceholder: g, placeholderRegex: c } = S(), d = a.quasis.map(
849
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + g(m)
850
- ).join(""), u = d.match(/^\s+/)?.[0] ?? "", y = d.match(/\s+$/)?.[0] ?? "", E = d.slice(
1114
+ const { group: Q, line: vt, softline: $t, indent: It } = $, zs = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
1115
+ const o = {
1116
+ ...r,
1117
+ ...c
1118
+ }, d = o.embeddedSqlPlugin ?? "prettier-plugin-sql";
1119
+ k(d, o, s);
1120
+ const { node: p } = n, { createPlaceholder: h, placeholderRegex: a } = x(), l = p.quasis.map(
1121
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + h(g)
1122
+ ).join(""), u = l.match(/^\s+/)?.[0] ?? "", E = l.match(/\s+$/)?.[0] ?? "", b = l.slice(
851
1123
  u.length,
852
- -y.length || void 0
853
- ), b = x(r, n);
1124
+ -E.length || void 0
1125
+ ), y = T(n, t);
854
1126
  let i;
855
- if (l === "prettier-plugin-sql-cst") {
856
- const p = await t(E, {
857
- ...e,
858
- parser: e.embeddedSqlParser ?? "sqlite"
1127
+ if (d === "prettier-plugin-sql-cst") {
1128
+ const m = await e(b, {
1129
+ ...o,
1130
+ parser: o.embeddedSqlParser ?? "sqlite"
859
1131
  });
860
- i = L(p, c, b);
1132
+ i = D(m, a, y);
861
1133
  } else {
862
- const p = await t(Nr(E), {
863
- ...e,
1134
+ const m = await e(Cs(b), {
1135
+ ...o,
864
1136
  parser: "sql"
865
1137
  });
866
- i = Fr(p, (m) => {
867
- if (typeof m != "string")
868
- return m;
869
- const f = [], $ = m.split(c);
870
- for (let _ = 0; _ < $.length; _++) {
871
- let I = $[_];
872
- if (_ % 2 == 0) {
873
- if (!I)
874
- continue;
875
- I = I.replaceAll(/([\\`]|\${)/g, "\\$1"), I.split(/(\n)/).forEach(
876
- (k) => k === `
877
- ` ? f.push(Rr) : f.push(k)
878
- );
879
- } else {
880
- const k = Number(I);
881
- f.push(b[k]);
882
- }
883
- }
884
- return f;
885
- });
1138
+ i = D(
1139
+ m,
1140
+ a,
1141
+ y,
1142
+ !0
1143
+ );
886
1144
  }
887
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
888
- return G([
1145
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
1146
+ return Q([
889
1147
  "`",
890
1148
  u,
891
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [G(i)] : Ve([G(i)]),
892
- y,
1149
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [Q(i)] : It([Q(i)]),
1150
+ E,
893
1151
  "`"
894
1152
  ]);
895
- const h = u.length ? Ye : Qe, v = y.length ? Ye : Qe;
896
- return G([
1153
+ const f = u.length ? vt : $t, v = E.length ? vt : $t;
1154
+ return Q([
897
1155
  "`",
898
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, G(i)] : Ve([h, G(i)]),
1156
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, Q(i)] : It([f, Q(i)]),
899
1157
  v,
900
1158
  "`"
901
1159
  ]);
902
- }, Z = "embeddedSql", wr = ["sql"], Br = ["prettier-plugin-sql", "prettier-plugin-sql-cst"], Ur = [
1160
+ }, se = "embeddedSql", Ks = ["sql"], Js = ["prettier-plugin-sql", "prettier-plugin-sql-cst"], Hs = [
903
1161
  "sqlite",
904
1162
  "bigquery",
905
1163
  "mysql",
906
1164
  "mariadb",
907
1165
  "postgresql"
908
- ], qr = T(Z), Cr = rn(Z), Wr = Y(Z), Gr = {
909
- [qr]: {
1166
+ ], Xs = I(se), Ys = Nn(se), Qs = A(se), Vs = {
1167
+ [Xs]: {
910
1168
  category: "Embed",
911
1169
  type: "string",
912
1170
  array: !0,
913
- default: [{ value: [...wr] }],
1171
+ default: [{ value: [...Ks] }],
914
1172
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin."
915
1173
  },
916
- [Cr]: {
1174
+ [Ys]: {
917
1175
  category: "Embed",
918
1176
  type: "choice",
919
1177
  default: "prettier-plugin-sql",
920
1178
  description: "The plugin used to format the embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.",
921
- choices: Br.map((t) => ({
922
- value: t,
923
- description: `Use the "${t}" plugin.`
1179
+ choices: Js.map((e) => ({
1180
+ value: e,
1181
+ description: `Use the "${e}" plugin.`
924
1182
  }))
925
1183
  },
926
- [Wr]: {
1184
+ [Qs]: {
927
1185
  category: "Embed",
928
1186
  type: "choice",
929
1187
  default: "sqlite",
930
1188
  description: "Specify the embedded SQL language parser. This option is only needed with the `prettier-plugin-sql-cst` plugin.",
931
- choices: Ur.map((t) => ({
932
- value: t,
933
- description: `Use the "${t}" parser.`
1189
+ choices: Hs.map((e) => ({
1190
+ value: e,
1191
+ description: `Use the "${e}" parser.`
934
1192
  }))
935
1193
  }
936
- }, zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1194
+ }, Zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
937
1195
  __proto__: null,
938
- embedder: jr,
939
- language: Z,
940
- options: Gr
941
- }, Symbol.toStringTag, { value: "Module" })), { line: Ze, group: z, indent: et, softline: tt, hardline: Kr } = D, { mapDoc: Hr } = X, Jr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
942
- A("prettier-plugin-toml", e, o), e = {
943
- ...e,
944
- ...s
945
- };
946
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
947
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
948
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
949
- d.length,
1196
+ embedder: zs,
1197
+ language: se,
1198
+ options: Vs
1199
+ }, Symbol.toStringTag, { value: "Module" })), { line: Dt, group: V, indent: Tt, softline: xt } = $, er = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
1200
+ k("prettier-plugin-toml", r, s);
1201
+ const o = {
1202
+ ...r,
1203
+ ...c
1204
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
1205
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
1206
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
1207
+ l.length,
950
1208
  -u.length || void 0
951
- ), E = x(r, n), b = await t(y, {
952
- ...e,
1209
+ ), b = T(n, t), y = await e(E, {
1210
+ ...o,
953
1211
  parser: "toml"
954
- }), i = Hr(b, (p) => {
955
- if (typeof p != "string")
956
- return p;
957
- const m = [], f = p.split(g);
958
- for (let $ = 0; $ < f.length; $++) {
959
- let _ = f[$];
960
- if ($ % 2 == 0) {
961
- if (!_)
962
- continue;
963
- _ = _.replaceAll(/([\\`]|\${)/g, "\\$1"), _.split(/(\n)/).forEach((I) => I === `
964
- ` ? m.push(Kr) : m.push(I));
965
- } else {
966
- const I = Number(_);
967
- m.push(E[I]);
968
- }
969
- }
970
- return m;
971
- });
972
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
973
- return z([
1212
+ }), i = D(
1213
+ y,
1214
+ h,
1215
+ b,
1216
+ !0
1217
+ );
1218
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
1219
+ return V([
974
1220
  "`",
975
- d,
976
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [z(i)] : et([z(i)]),
1221
+ l,
1222
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [V(i)] : Tt([V(i)]),
977
1223
  u,
978
1224
  "`"
979
1225
  ]);
980
- const h = d.length ? Ze : tt, v = u.length ? Ze : tt;
981
- return z([
1226
+ const f = l.length ? Dt : xt, v = u.length ? Dt : xt;
1227
+ return V([
982
1228
  "`",
983
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, z(i)] : et([h, z(i)]),
1229
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, V(i)] : Tt([f, V(i)]),
984
1230
  v,
985
1231
  "`"
986
1232
  ]);
987
- }, Tt = "embeddedToml", Xr = ["toml"], Yr = T(Tt), Qr = {
988
- [Yr]: {
1233
+ }, tn = "embeddedToml", tr = ["toml"], nr = I(tn), or = {
1234
+ [nr]: {
989
1235
  category: "Embed",
990
1236
  type: "string",
991
1237
  array: !0,
992
- default: [{ value: [...Xr] }],
1238
+ default: [{ value: [...tr] }],
993
1239
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin."
994
1240
  }
995
- }, Vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1241
+ }, sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
996
1242
  __proto__: null,
997
- embedder: Jr,
998
- language: Tt,
999
- options: Qr
1000
- }, Symbol.toStringTag, { value: "Module" })), { line: nt, group: K, indent: rt, softline: ot } = D, Zr = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
1001
- e = {
1002
- ...e,
1003
- ...s
1004
- };
1005
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
1006
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
1007
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
1008
- d.length,
1243
+ embedder: er,
1244
+ language: tn,
1245
+ options: or
1246
+ }, Symbol.toStringTag, { value: "Module" })), { line: St, group: Z, indent: Lt, softline: kt } = $, rr = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
1247
+ const o = {
1248
+ ...r,
1249
+ ...c
1250
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
1251
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
1252
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
1253
+ l.length,
1009
1254
  -u.length || void 0
1010
- ), E = x(r, n), b = await t(y, {
1011
- ...e,
1012
- parser: e.embeddedTsParser ?? "typescript",
1255
+ ), b = T(n, t), y = await e(E, {
1256
+ ...o,
1257
+ parser: o.embeddedTsParser ?? "typescript",
1013
1258
  // set filepath to undefined to enable jsx auto detection:
1014
1259
  // https://github.com/prettier/prettier/blob/427a84d24203e2d54160cde153a1e6a6390fe65a/src/language-js/parse/typescript.js#L49-L53
1015
1260
  filepath: void 0
1016
- }), i = L(b, g, E);
1017
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
1018
- return K([
1261
+ }), i = D(y, h, b);
1262
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
1263
+ return Z([
1019
1264
  "`",
1020
- d,
1021
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [K(i)] : rt([K(i)]),
1265
+ l,
1266
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [Z(i)] : Lt([Z(i)]),
1022
1267
  u,
1023
1268
  "`"
1024
1269
  ]);
1025
- const h = d.length ? nt : ot, v = u.length ? nt : ot;
1026
- return K([
1270
+ const f = l.length ? St : kt, v = u.length ? St : kt;
1271
+ return Z([
1027
1272
  "`",
1028
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, K(i)] : rt([h, K(i)]),
1273
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, Z(i)] : Lt([f, Z(i)]),
1029
1274
  v,
1030
1275
  "`"
1031
1276
  ]);
1032
- }, ie = "embeddedTs", eo = ["ts", "tsx", "cts", "mts", "typescript"], to = ["typescript", "babel-ts"], no = Y(ie), ro = T(ie), oo = {
1033
- [ro]: {
1277
+ }, ge = "embeddedTs", ir = ["ts", "tsx", "cts", "mts", "typescript"], ar = ["typescript", "babel-ts"], cr = A(ge), dr = I(ge), lr = {
1278
+ [dr]: {
1034
1279
  category: "Embed",
1035
1280
  type: "string",
1036
1281
  array: !0,
1037
- default: [{ value: [...eo] }],
1282
+ default: [{ value: [...ir] }],
1038
1283
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TypeScript language."
1039
1284
  },
1040
- [no]: {
1285
+ [cr]: {
1041
1286
  category: "Embed",
1042
1287
  type: "choice",
1043
1288
  default: "typescript",
1044
1289
  description: "The parser used to parse the embedded TypeScript language.",
1045
- choices: to.map((t) => ({
1046
- value: t,
1047
- description: `Use the "${t}" parser.`
1290
+ choices: ar.map((e) => ({
1291
+ value: e,
1292
+ description: `Use the "${e}" parser.`
1048
1293
  }))
1049
1294
  }
1050
- }, so = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1295
+ }, ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1051
1296
  __proto__: null,
1052
- embedder: Zr,
1053
- language: ie,
1054
- options: oo
1055
- }, Symbol.toStringTag, { value: "Module" })), ae = "embeddedXml", { line: st, group: H, indent: it, softline: ee } = D, io = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
1056
- A("@prettier/plugin-xml", e, o), e = {
1057
- ...e,
1058
- ...s
1059
- };
1060
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
1061
- (m, f, { length: $ }) => f === $ - 1 ? m.value.cooked : m.value.cooked + a(f)
1062
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
1063
- d.length,
1297
+ embedder: rr,
1298
+ language: ge,
1299
+ options: lr
1300
+ }, Symbol.toStringTag, { value: "Module" })), me = "embeddedXml", { line: Ot, group: ee, indent: At, softline: re } = $, pr = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
1301
+ k("@prettier/plugin-xml", r, s);
1302
+ const o = {
1303
+ ...r,
1304
+ ...c
1305
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
1306
+ (g, _, { length: S }) => _ === S - 1 ? g.value.cooked : g.value.cooked + p(_)
1307
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
1308
+ l.length,
1064
1309
  -u.length || void 0
1065
- ), E = x(r, n), b = [];
1310
+ ), b = T(n, t), y = [];
1066
1311
  let i = 0;
1067
1312
  for (; i !== void 0; ) {
1068
- const m = y.slice(i);
1069
- if (m.length === 0)
1313
+ const g = E.slice(i);
1314
+ if (g.length === 0)
1070
1315
  break;
1071
- i > 0 && e.xmlWhitespaceSensitivity !== "strict" && b.push(ee), e.__embeddedXmlFragmentRecoverIndex?.splice(
1316
+ i > 0 && o.xmlWhitespaceSensitivity !== "strict" && y.push(re), o.__embeddedXmlFragmentRecoverIndex?.splice(
1072
1317
  0,
1073
- e.__embeddedXmlFragmentRecoverIndex.length
1318
+ o.__embeddedXmlFragmentRecoverIndex.length
1074
1319
  );
1075
- let f = await t(m, {
1076
- ...e,
1077
- parser: ae
1320
+ let _ = await e(g, {
1321
+ ...o,
1322
+ parser: me
1078
1323
  });
1079
- const [$, _] = e.__embeddedXmlFragmentRecoverIndex ?? [];
1080
- $ === void 0 ? i = void 0 : _ === void 0 ? i += $ : (f = m.slice($, _ + 1), i += _ + 1), b.push(f);
1324
+ const [S, L] = o.__embeddedXmlFragmentRecoverIndex ?? [];
1325
+ S === void 0 ? i = void 0 : L === void 0 ? i += S : (_ = g.slice(S, L + 1), i += L + 1), y.push(_);
1081
1326
  }
1082
- const h = L(b, g, E);
1083
- if (e.xmlWhitespaceSensitivity === "strict" || e.preserveEmbeddedExteriorWhitespaces?.includes(o))
1084
- return H([
1327
+ const f = D(y, h, b);
1328
+ if (o.xmlWhitespaceSensitivity === "strict" || o.preserveEmbeddedExteriorWhitespaces?.includes(s))
1329
+ return ee([
1085
1330
  "`",
1086
- d,
1087
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [H(h)] : it([H(h)]),
1331
+ l,
1332
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [ee(f)] : At([ee(f)]),
1088
1333
  u,
1089
1334
  "`"
1090
1335
  ]);
1091
- const v = d.length ? st : ee, p = u.length ? st : ee;
1092
- return H([
1336
+ const v = l.length ? Ot : re, m = u.length ? Ot : re;
1337
+ return ee([
1093
1338
  "`",
1094
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [v, H(h)] : it([v, H(h)]),
1095
- p,
1339
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [v, ee(f)] : At([v, ee(f)]),
1340
+ m,
1096
1341
  "`"
1097
1342
  ]);
1098
- }, ao = ["xml", "opml", "rss", "svg"], co = T(ae), lo = {
1099
- [co]: {
1343
+ }, gr = ["xml", "opml", "rss", "svg"], mr = I(me), hr = {
1344
+ [mr]: {
1100
1345
  category: "Embed",
1101
1346
  type: "string",
1102
1347
  array: !0,
1103
- default: [{ value: [...ao] }],
1348
+ default: [{ value: [...gr] }],
1104
1349
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin."
1105
1350
  },
1106
1351
  /**
@@ -1114,240 +1359,244 @@ const { hardline: Rr, group: G, line: Ye, softline: Qe, indent: Ve } = D, { mapD
1114
1359
  description: "This option is read only and is used internally as a workaround to support xml fragments"
1115
1360
  }
1116
1361
  };
1117
- function uo(t) {
1118
- const n = {
1362
+ function fr(e) {
1363
+ const t = {
1119
1364
  loc: {
1120
1365
  start: {
1121
- line: t.line,
1122
- column: t.column
1366
+ line: e.line,
1367
+ column: e.column
1123
1368
  },
1124
1369
  end: {
1125
- line: t.line,
1126
- column: t.column + t.length
1370
+ line: e.line,
1371
+ column: e.column + e.length
1127
1372
  }
1128
1373
  }
1129
- }, r = new SyntaxError(
1130
- `${t.message} (${n.loc.start.line}:${n.loc.start.column})`,
1374
+ }, n = new SyntaxError(
1375
+ `${e.message} (${t.loc.start.line}:${t.loc.start.column})`,
1131
1376
  {
1132
- cause: t
1377
+ cause: e
1133
1378
  }
1134
1379
  );
1135
- return Object.assign(r, n), r;
1380
+ return Object.assign(n, t), n;
1136
1381
  }
1137
- function at(t) {
1138
- const n = {
1382
+ function Mt(e) {
1383
+ const t = {
1139
1384
  loc: {
1140
1385
  start: {
1141
- line: t.token.startLine ?? NaN,
1142
- column: t.token.startColumn ?? NaN
1386
+ line: e.token.startLine ?? NaN,
1387
+ column: e.token.startColumn ?? NaN
1143
1388
  },
1144
1389
  end: {
1145
- line: t.token.endLine ?? NaN,
1146
- column: t.token.endColumn ?? NaN
1390
+ line: e.token.endLine ?? NaN,
1391
+ column: e.token.endColumn ?? NaN
1147
1392
  }
1148
1393
  }
1149
- }, r = new SyntaxError(
1150
- `${t.message} (${n.loc.start.line}:${n.loc.start.column})`,
1394
+ }, n = new SyntaxError(
1395
+ `${e.message} (${t.loc.start.line}:${t.loc.start.column})`,
1151
1396
  {
1152
- cause: t
1397
+ cause: e
1153
1398
  }
1154
1399
  );
1155
- return Object.assign(r, n), r;
1400
+ return Object.assign(n, t), n;
1156
1401
  }
1157
- const go = {
1158
- async parse(t, n) {
1159
- const { parse: r } = await import("@xml-tools/parser"), { lexErrors: e, parseErrors: o, cst: s } = r(t);
1160
- if (e.length > 0) {
1161
- const l = e[0];
1162
- throw uo(l);
1402
+ const br = {
1403
+ async parse(e, t) {
1404
+ const { parse: n } = await import("@xml-tools/parser"), { lexErrors: r, parseErrors: s, cst: c } = n(e);
1405
+ if (r.length > 0) {
1406
+ const o = r[0];
1407
+ throw fr(o);
1163
1408
  }
1164
- if (o.length > 0) {
1165
- let l = !1;
1166
- for (const a of o) {
1409
+ if (s.length > 0) {
1410
+ let o = !1;
1411
+ for (const d of s) {
1167
1412
  if (!["MismatchedTokenException", "NotAllInputParsedException"].includes(
1168
- a.name
1413
+ d.name
1169
1414
  ))
1170
- throw at(a);
1171
- if (a.message === "Expecting token of type --> OPEN <-- but found --> '' <--") {
1172
- l = !0;
1415
+ throw Mt(d);
1416
+ if (d.message === "Expecting token of type --> OPEN <-- but found --> '' <--") {
1417
+ o = !0;
1173
1418
  continue;
1174
1419
  }
1175
1420
  if (/Expecting token of type --> EOF <-- but found --> '[\s\S]+' <--/.test(
1176
- a.message
1177
- ) || /Redundant input, expecting EOF but found: /.test(a.message)) {
1178
- n.__embeddedXmlFragmentRecoverIndex?.splice(
1421
+ d.message
1422
+ ) || /Redundant input, expecting EOF but found: /.test(d.message)) {
1423
+ t.__embeddedXmlFragmentRecoverIndex?.splice(
1179
1424
  0,
1180
- n.__embeddedXmlFragmentRecoverIndex.length,
1181
- a.token.startOffset
1425
+ t.__embeddedXmlFragmentRecoverIndex.length,
1426
+ d.token.startOffset
1182
1427
  );
1183
1428
  break;
1184
1429
  }
1185
1430
  if (/Expecting token of type --> OPEN <-- but found --> '[\s\S]+' <--/.test(
1186
- a.message
1431
+ d.message
1187
1432
  )) {
1188
- if (a.token.endOffset === void 0 || Number.isNaN(a.token.endOffset))
1433
+ if (d.token.endOffset === void 0 || Number.isNaN(d.token.endOffset))
1189
1434
  break;
1190
- n.__embeddedXmlFragmentRecoverIndex?.splice(
1435
+ t.__embeddedXmlFragmentRecoverIndex?.splice(
1191
1436
  0,
1192
- n.__embeddedXmlFragmentRecoverIndex.length,
1193
- a.token.startOffset,
1194
- a.token.endOffset
1195
- ), l = !0;
1437
+ t.__embeddedXmlFragmentRecoverIndex.length,
1438
+ d.token.startOffset,
1439
+ d.token.endOffset
1440
+ ), o = !0;
1196
1441
  break;
1197
1442
  }
1198
- throw at(a);
1443
+ throw Mt(d);
1199
1444
  }
1200
- l && xt(s);
1445
+ o && nn(c);
1201
1446
  }
1202
- return s;
1447
+ return c;
1203
1448
  },
1204
1449
  astFormat: "xml",
1205
- locStart(t) {
1206
- return t.location.startOffset;
1450
+ locStart(e) {
1451
+ return e.location.startOffset;
1207
1452
  },
1208
- locEnd(t) {
1209
- return t.location.endOffset ?? NaN;
1453
+ locEnd(e) {
1454
+ return e.location.endOffset ?? NaN;
1210
1455
  }
1211
1456
  };
1212
- function xt(t) {
1213
- const n = t.children;
1214
- for (const r in n) {
1215
- const e = n[r] ?? [];
1216
- for (let o = e.length - 1; o >= 0; --o) {
1217
- const s = e[o];
1218
- if (mo(s)) {
1219
- if (Object.keys(s.children).length === 0) {
1220
- e.splice(o, 1), e.length === 0 && delete n[r];
1457
+ function nn(e) {
1458
+ const t = e.children;
1459
+ for (const n in t) {
1460
+ const r = t[n] ?? [];
1461
+ for (let s = r.length - 1; s >= 0; --s) {
1462
+ const c = r[s];
1463
+ if (Er(c)) {
1464
+ if (Object.keys(c.children).length === 0) {
1465
+ r.splice(s, 1), r.length === 0 && delete t[n];
1221
1466
  continue;
1222
1467
  }
1223
- xt(s);
1468
+ nn(c);
1224
1469
  }
1225
1470
  }
1226
1471
  }
1227
1472
  }
1228
- function mo(t) {
1229
- return "name" in t && "children" in t && "location" in t;
1473
+ function Er(e) {
1474
+ return "name" in e && "children" in e && "location" in e;
1230
1475
  }
1231
- const po = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1476
+ const _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1232
1477
  __proto__: null,
1233
- embedder: io,
1234
- language: ae,
1235
- options: lo,
1236
- parser: go
1237
- }, Symbol.toStringTag, { value: "Module" })), { line: ct, group: J, indent: dt, softline: lt } = D, ho = async (t, n, r, e, { identifier: o, embeddedOverrideOptions: s }) => {
1238
- e = {
1239
- ...e,
1240
- ...s
1241
- };
1242
- const { node: l } = r, { createPlaceholder: a, placeholderRegex: g } = S(), c = l.quasis.map(
1243
- (p, m, { length: f }) => m === f - 1 ? p.value.cooked : p.value.cooked + a(m)
1244
- ).join(""), d = c.match(/^\s+/)?.[0] ?? "", u = c.match(/\s+$/)?.[0] ?? "", y = c.slice(
1245
- d.length,
1478
+ embedder: pr,
1479
+ language: me,
1480
+ options: hr,
1481
+ parser: br
1482
+ }, Symbol.toStringTag, { value: "Module" })), { line: Pt, group: te, indent: jt, softline: Nt } = $, yr = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => {
1483
+ const o = {
1484
+ ...r,
1485
+ ...c
1486
+ }, { node: d } = n, { createPlaceholder: p, placeholderRegex: h } = x(), a = d.quasis.map(
1487
+ (m, g, { length: _ }) => g === _ - 1 ? m.value.cooked : m.value.cooked + p(g)
1488
+ ).join(""), l = a.match(/^\s+/)?.[0] ?? "", u = a.match(/\s+$/)?.[0] ?? "", E = a.slice(
1489
+ l.length,
1246
1490
  -u.length || void 0
1247
- ), E = x(r, n), b = await t(y, {
1248
- ...e,
1491
+ ), b = T(n, t), y = await e(E, {
1492
+ ...o,
1249
1493
  parser: "yaml"
1250
- }), i = L(b, g, E);
1251
- if (e.preserveEmbeddedExteriorWhitespaces?.includes(o))
1252
- return J([
1494
+ }), i = D(y, h, b);
1495
+ if (o.preserveEmbeddedExteriorWhitespaces?.includes(s))
1496
+ return te([
1253
1497
  "`",
1254
- d,
1255
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [J(i)] : dt([J(i)]),
1498
+ l,
1499
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [te(i)] : jt([te(i)]),
1256
1500
  u,
1257
1501
  "`"
1258
1502
  ]);
1259
- const h = d.length ? ct : lt, v = u.length ? ct : lt;
1260
- return J([
1503
+ const f = l.length ? Pt : Nt, v = u.length ? Pt : Nt;
1504
+ return te([
1261
1505
  "`",
1262
- e.noEmbeddedMultiLineIndentation?.includes(o) ? [h, J(i)] : dt([h, J(i)]),
1506
+ o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, te(i)] : jt([f, te(i)]),
1263
1507
  v,
1264
1508
  "`"
1265
1509
  ]);
1266
- }, St = "embeddedYaml", fo = ["yaml", "yml"], bo = T(St), Eo = {
1267
- [bo]: {
1510
+ }, on = "embeddedYaml", vr = ["yaml", "yml"], $r = I(on), Ir = {
1511
+ [$r]: {
1268
1512
  category: "Embed",
1269
1513
  type: "string",
1270
1514
  array: !0,
1271
- default: [{ value: [...fo] }],
1515
+ default: [{ value: [...vr] }],
1272
1516
  description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded YAML language."
1273
1517
  }
1274
- }, yo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1518
+ }, Dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1275
1519
  __proto__: null,
1276
- embedder: ho,
1277
- language: St,
1278
- options: Eo
1279
- }, Symbol.toStringTag, { value: "Module" })), Lt = [], kt = {}, At = {}, Ot = {}, _o = /* @__PURE__ */ Object.assign({
1280
- "./css/index.ts": dn,
1281
- "./es/index.ts": fn,
1282
- "./glsl/index.ts": vn,
1283
- "./graphql/index.ts": xn,
1284
- "./html/index.ts": Nn,
1285
- "./ini/index.ts": Bn,
1286
- "./json/index.ts": Hn,
1287
- "./latex/index.ts": Vn,
1288
- "./markdown/index.ts": rr,
1289
- "./noop/index.ts": ir,
1290
- "./php/index.ts": ur,
1291
- "./properties/index.ts": fr,
1292
- "./ruby/index.ts": Ir,
1293
- "./sh/index.ts": Ar,
1294
- "./sql/index.ts": zr,
1295
- "./toml/index.ts": Vr,
1296
- "./ts/index.ts": so,
1297
- "./xml/index.ts": po,
1298
- "./yaml/index.ts": yo
1520
+ embedder: yr,
1521
+ language: on,
1522
+ options: Ir
1523
+ }, Symbol.toStringTag, { value: "Module" })), sn = [], rn = {}, an = {}, cn = {}, Tr = /* @__PURE__ */ Object.assign({
1524
+ "./css/index.ts": qn,
1525
+ "./es/index.ts": Xn,
1526
+ "./glsl/index.ts": eo,
1527
+ "./graphql/index.ts": ro,
1528
+ "./html/index.ts": mo,
1529
+ "./ini/index.ts": _o,
1530
+ "./java/index.ts": Do,
1531
+ "./json/index.ts": Mo,
1532
+ "./jsonata/index.ts": Fo,
1533
+ "./latex/index.ts": qo,
1534
+ "./markdown/index.ts": Xo,
1535
+ "./nginx/index.ts": es,
1536
+ "./noop/index.ts": os,
1537
+ "./pegjs/index.ts": cs,
1538
+ "./php/index.ts": gs,
1539
+ "./prisma/index.ts": Es,
1540
+ "./properties/index.ts": Is,
1541
+ "./pug/index.ts": Ls,
1542
+ "./ruby/index.ts": Ns,
1543
+ "./sh/index.ts": Us,
1544
+ "./sql/index.ts": Zs,
1545
+ "./toml/index.ts": sr,
1546
+ "./ts/index.ts": ur,
1547
+ "./xml/index.ts": _r,
1548
+ "./yaml/index.ts": Dr
1299
1549
  });
1300
- Object.values(_o).forEach(({ language: t, parser: n, embedder: r, options: e }) => {
1301
- nn(Lt, t, se), n && (kt[t] = n), r && (At[t] = r), Object.assign(Ot, e);
1302
- });
1303
- const vo = "noEmbeddedIdentificationByComment", $o = "noEmbeddedIdentificationByTag", Io = "preserveEmbeddedExteriorWhitespaces", Do = "noEmbeddedMultiLineIndentation", To = "embeddedOverrides", es = {
1304
- ...Ot,
1305
- [vo]: {
1550
+ for (const { language: e, parser: t, embedder: n, options: r } of Object.values(Tr))
1551
+ jn(sn, e, pe), t && (rn[e] = t), n && (an[e] = n), Object.assign(cn, r);
1552
+ const xr = "noEmbeddedIdentificationByComment", Sr = "noEmbeddedIdentificationByTag", Lr = "preserveEmbeddedExteriorWhitespaces", kr = "noEmbeddedMultiLineIndentation", Or = "embeddedOverrides", ri = {
1553
+ ...cn,
1554
+ [xr]: {
1306
1555
  category: "Embed",
1307
1556
  type: "string",
1308
1557
  array: !0,
1309
1558
  default: [{ value: [] }],
1310
1559
  description: "Turns off `` /* identifier */ `...` `` comment-based embedded language identification for the specified identifiers."
1311
1560
  },
1312
- [$o]: {
1561
+ [Sr]: {
1313
1562
  category: "Embed",
1314
1563
  type: "string",
1315
1564
  array: !0,
1316
1565
  default: [{ value: [] }],
1317
1566
  description: "Turns off `` identifier`...` `` tag-based embedded language identification for the specified identifiers."
1318
1567
  },
1319
- [Io]: {
1568
+ [Lr]: {
1320
1569
  category: "Embed",
1321
1570
  type: "string",
1322
1571
  array: !0,
1323
1572
  default: [{ value: [] }],
1324
1573
  description: "Preserves leading and trailing whitespaces in the formatting results for the specified identifiers."
1325
1574
  },
1326
- [Do]: {
1575
+ [kr]: {
1327
1576
  category: "Embed",
1328
1577
  type: "string",
1329
1578
  array: !0,
1330
1579
  default: [{ value: [] }],
1331
1580
  description: "Turns off auto indentation in the formatting results for the specified identifiers when they are formatted to span multi lines."
1332
1581
  },
1333
- [To]: {
1582
+ [Or]: {
1334
1583
  category: "Embed",
1335
1584
  type: "string",
1336
1585
  array: !1,
1337
1586
  default: void 0,
1338
1587
  description: "Option overrides for the specified identifiers. It should either be a stringified JSON or an absolute filepath to the option overrides file."
1339
1588
  }
1340
- }, ut = {
1589
+ }, Rt = {
1341
1590
  // parsers from internal
1342
- ...wt.parsers,
1343
- ...Bt.parsers,
1344
- ...Ut.parsers,
1345
- ...Ct.parsers,
1346
- ...qt.parsers,
1591
+ ...hn.parsers,
1592
+ ...fn.parsers,
1593
+ ...bn.parsers,
1594
+ ..._n.parsers,
1595
+ ...En.parsers,
1347
1596
  // parsers from this plugin
1348
- ...kt
1597
+ ...rn
1349
1598
  };
1350
- var xo = {
1599
+ var Ar = {
1351
1600
  isEqual: !0,
1352
1601
  isMatchingKey: !0,
1353
1602
  isPromise: !0,
@@ -1356,40 +1605,40 @@ var xo = {
1356
1605
  onCacheChange: !0,
1357
1606
  onCacheHit: !0,
1358
1607
  transformKey: !0
1359
- }, So = Array.prototype.slice;
1360
- function V(t) {
1361
- var n = t.length;
1362
- return n ? n === 1 ? [t[0]] : n === 2 ? [t[0], t[1]] : n === 3 ? [t[0], t[1], t[2]] : So.call(t, 0) : [];
1608
+ }, Mr = Array.prototype.slice;
1609
+ function oe(e) {
1610
+ var t = e.length;
1611
+ return t ? t === 1 ? [e[0]] : t === 2 ? [e[0], e[1]] : t === 3 ? [e[0], e[1], e[2]] : Mr.call(e, 0) : [];
1363
1612
  }
1364
- function Lo(t) {
1365
- var n = {};
1366
- for (var r in t)
1367
- xo[r] || (n[r] = t[r]);
1368
- return n;
1613
+ function Pr(e) {
1614
+ var t = {};
1615
+ for (var n in e)
1616
+ Ar[n] || (t[n] = e[n]);
1617
+ return t;
1369
1618
  }
1370
- function ko(t) {
1371
- return typeof t == "function" && t.isMemoized;
1619
+ function jr(e) {
1620
+ return typeof e == "function" && e.isMemoized;
1372
1621
  }
1373
- function Ao(t, n) {
1374
- return t === n || t !== t && n !== n;
1622
+ function Nr(e, t) {
1623
+ return e === t || e !== e && t !== t;
1375
1624
  }
1376
- function gt(t, n) {
1377
- var r = {};
1378
- for (var e in t)
1379
- r[e] = t[e];
1380
- for (var e in n)
1381
- r[e] = n[e];
1382
- return r;
1625
+ function Ft(e, t) {
1626
+ var n = {};
1627
+ for (var r in e)
1628
+ n[r] = e[r];
1629
+ for (var r in t)
1630
+ n[r] = t[r];
1631
+ return n;
1383
1632
  }
1384
- var Oo = (
1633
+ var Rr = (
1385
1634
  /** @class */
1386
1635
  function() {
1387
- function t(n) {
1388
- this.keys = [], this.values = [], this.options = n;
1389
- var r = typeof n.isMatchingKey == "function";
1390
- r ? this.getKeyIndex = this._getKeyIndexFromMatchingKey : n.maxSize > 1 ? this.getKeyIndex = this._getKeyIndexForMany : this.getKeyIndex = this._getKeyIndexForSingle, this.canTransformKey = typeof n.transformKey == "function", this.shouldCloneArguments = this.canTransformKey || r, this.shouldUpdateOnAdd = typeof n.onCacheAdd == "function", this.shouldUpdateOnChange = typeof n.onCacheChange == "function", this.shouldUpdateOnHit = typeof n.onCacheHit == "function";
1636
+ function e(t) {
1637
+ this.keys = [], this.values = [], this.options = t;
1638
+ var n = typeof t.isMatchingKey == "function";
1639
+ n ? this.getKeyIndex = this._getKeyIndexFromMatchingKey : t.maxSize > 1 ? this.getKeyIndex = this._getKeyIndexForMany : this.getKeyIndex = this._getKeyIndexForSingle, this.canTransformKey = typeof t.transformKey == "function", this.shouldCloneArguments = this.canTransformKey || n, this.shouldUpdateOnAdd = typeof t.onCacheAdd == "function", this.shouldUpdateOnChange = typeof t.onCacheChange == "function", this.shouldUpdateOnHit = typeof t.onCacheHit == "function";
1391
1640
  }
1392
- return Object.defineProperty(t.prototype, "size", {
1641
+ return Object.defineProperty(e.prototype, "size", {
1393
1642
  /**
1394
1643
  * The number of cached [key,value] results.
1395
1644
  */
@@ -1398,7 +1647,7 @@ var Oo = (
1398
1647
  },
1399
1648
  enumerable: !1,
1400
1649
  configurable: !0
1401
- }), Object.defineProperty(t.prototype, "snapshot", {
1650
+ }), Object.defineProperty(e.prototype, "snapshot", {
1402
1651
  /**
1403
1652
  * A copy of the cache at a moment in time. This is useful
1404
1653
  * to compare changes over time, since the cache mutates
@@ -1406,198 +1655,201 @@ var Oo = (
1406
1655
  */
1407
1656
  get: function() {
1408
1657
  return {
1409
- keys: V(this.keys),
1658
+ keys: oe(this.keys),
1410
1659
  size: this.size,
1411
- values: V(this.values)
1660
+ values: oe(this.values)
1412
1661
  };
1413
1662
  },
1414
1663
  enumerable: !1,
1415
1664
  configurable: !0
1416
- }), t.prototype._getKeyIndexFromMatchingKey = function(n) {
1417
- var r = this.options, e = r.isMatchingKey, o = r.maxSize, s = this.keys, l = s.length;
1418
- if (!l)
1665
+ }), e.prototype._getKeyIndexFromMatchingKey = function(t) {
1666
+ var n = this.options, r = n.isMatchingKey, s = n.maxSize, c = this.keys, o = c.length;
1667
+ if (!o)
1419
1668
  return -1;
1420
- if (e(s[0], n))
1669
+ if (r(c[0], t))
1421
1670
  return 0;
1422
- if (o > 1) {
1423
- for (var a = 1; a < l; a++)
1424
- if (e(s[a], n))
1425
- return a;
1671
+ if (s > 1) {
1672
+ for (var d = 1; d < o; d++)
1673
+ if (r(c[d], t))
1674
+ return d;
1426
1675
  }
1427
1676
  return -1;
1428
- }, t.prototype._getKeyIndexForMany = function(n) {
1429
- var r = this.options.isEqual, e = this.keys, o = e.length;
1430
- if (!o)
1677
+ }, e.prototype._getKeyIndexForMany = function(t) {
1678
+ var n = this.options.isEqual, r = this.keys, s = r.length;
1679
+ if (!s)
1431
1680
  return -1;
1432
- if (o === 1)
1433
- return this._getKeyIndexForSingle(n);
1434
- var s = n.length, l, a;
1435
- if (s > 1) {
1436
- for (var g = 0; g < o; g++)
1437
- if (l = e[g], l.length === s) {
1438
- for (a = 0; a < s && r(l[a], n[a]); a++)
1681
+ if (s === 1)
1682
+ return this._getKeyIndexForSingle(t);
1683
+ var c = t.length, o, d;
1684
+ if (c > 1) {
1685
+ for (var p = 0; p < s; p++)
1686
+ if (o = r[p], o.length === c) {
1687
+ for (d = 0; d < c && n(o[d], t[d]); d++)
1439
1688
  ;
1440
- if (a === s)
1441
- return g;
1689
+ if (d === c)
1690
+ return p;
1442
1691
  }
1443
1692
  } else
1444
- for (var g = 0; g < o; g++)
1445
- if (l = e[g], l.length === s && r(l[0], n[0]))
1446
- return g;
1693
+ for (var p = 0; p < s; p++)
1694
+ if (o = r[p], o.length === c && n(o[0], t[0]))
1695
+ return p;
1447
1696
  return -1;
1448
- }, t.prototype._getKeyIndexForSingle = function(n) {
1449
- var r = this.keys;
1450
- if (!r.length)
1697
+ }, e.prototype._getKeyIndexForSingle = function(t) {
1698
+ var n = this.keys;
1699
+ if (!n.length)
1451
1700
  return -1;
1452
- var e = r[0], o = e.length;
1453
- if (n.length !== o)
1701
+ var r = n[0], s = r.length;
1702
+ if (t.length !== s)
1454
1703
  return -1;
1455
- var s = this.options.isEqual;
1456
- if (o > 1) {
1457
- for (var l = 0; l < o; l++)
1458
- if (!s(e[l], n[l]))
1704
+ var c = this.options.isEqual;
1705
+ if (s > 1) {
1706
+ for (var o = 0; o < s; o++)
1707
+ if (!c(r[o], t[o]))
1459
1708
  return -1;
1460
1709
  return 0;
1461
1710
  }
1462
- return s(e[0], n[0]) ? 0 : -1;
1463
- }, t.prototype.orderByLru = function(n, r, e) {
1464
- for (var o = this.keys, s = this.values, l = o.length, a = e; a--; )
1465
- o[a + 1] = o[a], s[a + 1] = s[a];
1466
- o[0] = n, s[0] = r;
1467
- var g = this.options.maxSize;
1468
- l === g && e === l ? (o.pop(), s.pop()) : e >= g && (o.length = s.length = g);
1469
- }, t.prototype.updateAsyncCache = function(n) {
1470
- var r = this, e = this.options, o = e.onCacheChange, s = e.onCacheHit, l = this.keys[0], a = this.values[0];
1471
- this.values[0] = a.then(function(g) {
1472
- return r.shouldUpdateOnHit && s(r, r.options, n), r.shouldUpdateOnChange && o(r, r.options, n), g;
1473
- }, function(g) {
1474
- var c = r.getKeyIndex(l);
1475
- throw c !== -1 && (r.keys.splice(c, 1), r.values.splice(c, 1)), g;
1711
+ return c(r[0], t[0]) ? 0 : -1;
1712
+ }, e.prototype.orderByLru = function(t, n, r) {
1713
+ for (var s = this.keys, c = this.values, o = s.length, d = r; d--; )
1714
+ s[d + 1] = s[d], c[d + 1] = c[d];
1715
+ s[0] = t, c[0] = n;
1716
+ var p = this.options.maxSize;
1717
+ o === p && r === o ? (s.pop(), c.pop()) : r >= p && (s.length = c.length = p);
1718
+ }, e.prototype.updateAsyncCache = function(t) {
1719
+ var n = this, r = this.options, s = r.onCacheChange, c = r.onCacheHit, o = this.keys[0], d = this.values[0];
1720
+ this.values[0] = d.then(function(p) {
1721
+ return n.shouldUpdateOnHit && c(n, n.options, t), n.shouldUpdateOnChange && s(n, n.options, t), p;
1722
+ }, function(p) {
1723
+ var h = n.getKeyIndex(o);
1724
+ throw h !== -1 && (n.keys.splice(h, 1), n.values.splice(h, 1)), p;
1476
1725
  });
1477
- }, t;
1726
+ }, e;
1478
1727
  }()
1479
1728
  );
1480
- function Pt(t, n) {
1481
- if (n === void 0 && (n = {}), ko(t))
1482
- return Pt(t.fn, gt(t.options, n));
1483
- if (typeof t != "function")
1729
+ function dn(e, t) {
1730
+ if (t === void 0 && (t = {}), jr(e))
1731
+ return dn(e.fn, Ft(e.options, t));
1732
+ if (typeof e != "function")
1484
1733
  throw new TypeError("You must pass a function to `memoize`.");
1485
- var r = n.isEqual, e = r === void 0 ? Ao : r, o = n.isMatchingKey, s = n.isPromise, l = s === void 0 ? !1 : s, a = n.maxSize, g = a === void 0 ? 1 : a, c = n.onCacheAdd, d = n.onCacheChange, u = n.onCacheHit, y = n.transformKey, E = gt({
1486
- isEqual: e,
1487
- isMatchingKey: o,
1488
- isPromise: l,
1489
- maxSize: g,
1490
- onCacheAdd: c,
1491
- onCacheChange: d,
1492
- onCacheHit: u,
1493
- transformKey: y
1494
- }, Lo(n)), b = new Oo(E), i = b.keys, h = b.values, v = b.canTransformKey, p = b.shouldCloneArguments, m = b.shouldUpdateOnAdd, f = b.shouldUpdateOnChange, $ = b.shouldUpdateOnHit, _ = function() {
1495
- var I = p ? V(arguments) : arguments;
1496
- v && (I = y(I));
1497
- var k = i.length ? b.getKeyIndex(I) : -1;
1498
- if (k !== -1)
1499
- $ && u(b, E, _), k && (b.orderByLru(i[k], h[k], k), f && d(b, E, _));
1734
+ var n = t.isEqual, r = n === void 0 ? Nr : n, s = t.isMatchingKey, c = t.isPromise, o = c === void 0 ? !1 : c, d = t.maxSize, p = d === void 0 ? 1 : d, h = t.onCacheAdd, a = t.onCacheChange, l = t.onCacheHit, u = t.transformKey, E = Ft({
1735
+ isEqual: r,
1736
+ isMatchingKey: s,
1737
+ isPromise: o,
1738
+ maxSize: p,
1739
+ onCacheAdd: h,
1740
+ onCacheChange: a,
1741
+ onCacheHit: l,
1742
+ transformKey: u
1743
+ }, Pr(t)), b = new Rr(E), y = b.keys, i = b.values, f = b.canTransformKey, v = b.shouldCloneArguments, m = b.shouldUpdateOnAdd, g = b.shouldUpdateOnChange, _ = b.shouldUpdateOnHit, S = function() {
1744
+ var L = v ? oe(arguments) : arguments;
1745
+ f && (L = u(L));
1746
+ var O = y.length ? b.getKeyIndex(L) : -1;
1747
+ if (O !== -1)
1748
+ _ && l(b, E, S), O && (b.orderByLru(y[O], i[O], O), g && a(b, E, S));
1500
1749
  else {
1501
- var Ft = t.apply(this, arguments), jt = p ? I : V(arguments);
1502
- b.orderByLru(jt, Ft, i.length), l && b.updateAsyncCache(_), m && c(b, E, _), f && d(b, E, _);
1750
+ var gn = e.apply(this, arguments), mn = v ? L : oe(arguments);
1751
+ b.orderByLru(mn, gn, y.length), o && b.updateAsyncCache(S), m && h(b, E, S), g && a(b, E, S);
1503
1752
  }
1504
- return h[0];
1753
+ return i[0];
1505
1754
  };
1506
- return _.cache = b, _.fn = t, _.isMemoized = !0, _.options = E, _;
1755
+ return S.cache = b, S.fn = e, S.isMemoized = !0, S.options = E, S;
1507
1756
  }
1508
- async function mt(t) {
1757
+ async function wt(e) {
1509
1758
  try {
1510
- const n = await Gt(t, { encoding: "utf-8" });
1511
- return JSON.parse(n);
1759
+ const t = await vn(e, { encoding: "utf-8" });
1760
+ return JSON.parse(t);
1512
1761
  } catch {
1513
1762
  }
1514
1763
  }
1515
- const Po = /* @__PURE__ */ new URL(
1516
- "data:text/javascript," + encodeURIComponent('import{pathToFileURL as r}from"node:url";import{parentPort as t,workerData as a}from"node:worker_threads";const s=async({absolutePath:o})=>{try{const e=await import(r(o).href);t?.postMessage(e.embeddedOverrides??e.default??void 0)}catch{t?.postMessage(void 0)}};s(a);')
1764
+ const Fr = /* @__PURE__ */ new URL(
1765
+ `data:text/javascript,${encodeURIComponent('import{pathToFileURL as r}from"node:url";import{parentPort as t,workerData as a}from"node:worker_threads";const s=async({absolutePath:o})=>{try{const e=await import(r(o).href);t?.postMessage(e.embeddedOverrides??e.default??void 0)}catch{t?.postMessage(void 0)}};s(a);')}`
1517
1766
  );
1518
- async function Mo(t) {
1519
- return new Promise((n) => {
1520
- const r = new Xt(Po, {
1767
+ async function wr(e) {
1768
+ return new Promise((t) => {
1769
+ const n = new xn(Fr, {
1521
1770
  workerData: {
1522
- absolutePath: t
1771
+ absolutePath: e
1523
1772
  }
1524
1773
  });
1525
- r.once("message", (e) => {
1526
- n(e);
1527
- }), r.once("error", (e) => {
1528
- console.error(e), n(void 0);
1774
+ n.once("message", (r) => {
1775
+ t(r);
1776
+ }), n.once("error", (r) => {
1777
+ console.error(r), t(void 0);
1529
1778
  });
1530
1779
  });
1531
1780
  }
1532
- async function No(t) {
1781
+ async function Br(e) {
1533
1782
  console.error(
1534
1783
  "Ts module type embeddedOverrides has not been implemented yet."
1535
1784
  );
1536
1785
  }
1537
- const Ro = Pt(
1538
- async (t, n) => {
1539
- if (zt(t))
1540
- return t;
1541
- const r = await Yt(n);
1542
- let e;
1543
- return typeof r != "string" ? e = process.env.PWD ?? process.cwd() : e = Kt(r), Ht(e, t);
1786
+ const Ur = dn(
1787
+ async (e, t) => {
1788
+ if ($n(e))
1789
+ return e;
1790
+ const n = await Sn(t);
1791
+ let r;
1792
+ return typeof n != "string" ? r = process.env.PWD ?? process.cwd() : r = In(n), Dn(r, e);
1544
1793
  }
1545
- ), Fo = async (t, n) => {
1546
- const r = Ro(
1547
- t,
1548
- n
1549
- ), e = Jt(t);
1550
- if (e === ".json") {
1551
- const o = await r, s = await mt(o);
1552
- if (s !== void 0)
1553
- return s;
1554
- console.error(`Failed to parse the json file: ${o}`);
1794
+ ), Wr = async (e, t) => {
1795
+ const n = Ur(
1796
+ e,
1797
+ t
1798
+ ), r = Tn(e);
1799
+ if (r === ".json") {
1800
+ const s = await n, c = await wt(s);
1801
+ if (c !== void 0)
1802
+ return c;
1803
+ console.error(`Failed to parse the json file: ${s}`);
1555
1804
  return;
1556
- } else if (e === ".mjs" || e === ".cjs" || e === ".js") {
1557
- const o = await r, s = await Mo(o);
1558
- if (s !== void 0)
1559
- return s;
1560
- console.error(`Failed to parse the js module file: ${o}`);
1805
+ }
1806
+ if (r === ".mjs" || r === ".cjs" || r === ".js") {
1807
+ const s = await n, c = await wr(s);
1808
+ if (c !== void 0)
1809
+ return c;
1810
+ console.error(`Failed to parse the js module file: ${s}`);
1561
1811
  return;
1562
- } else if (e === ".mts" || e === ".cts" || e === ".ts") {
1563
- const o = await r, s = await No();
1564
- if (s !== void 0)
1565
- return s;
1566
- console.error(`Failed to parse the ts module file: ${o}`);
1812
+ }
1813
+ if (r === ".mts" || r === ".cts" || r === ".ts") {
1814
+ const s = await n, c = await Br();
1815
+ if (c !== void 0)
1816
+ return c;
1817
+ console.error(`Failed to parse the ts module file: ${s}`);
1567
1818
  return;
1568
- } else if (e === "") {
1569
- const o = await r, s = await mt(o);
1570
- if (s !== void 0)
1571
- return s;
1819
+ }
1820
+ if (r === "") {
1821
+ const s = await n, c = await wt(s);
1822
+ if (c !== void 0)
1823
+ return c;
1572
1824
  }
1573
1825
  try {
1574
- return JSON.parse(t);
1826
+ return JSON.parse(e);
1575
1827
  } catch {
1576
1828
  console.error("Failed to parse embeddedOverrides as a json object");
1577
1829
  }
1578
- }, jo = async (t, n, r) => {
1579
- if (t === void 0)
1830
+ }, qr = async (e, t, n) => {
1831
+ if (e === void 0)
1580
1832
  return;
1581
- const e = await Fo(
1582
- t,
1583
- r
1833
+ const r = await Wr(
1834
+ e,
1835
+ n
1584
1836
  );
1585
- if (e !== void 0)
1837
+ if (r !== void 0)
1586
1838
  try {
1587
- for (const { identifiers: o, options: s } of e)
1588
- if (o.includes(n))
1589
- return s;
1839
+ for (const { identifiers: s, options: c } of r)
1840
+ if (s.includes(t))
1841
+ return c;
1590
1842
  } catch {
1591
1843
  console.error("Error parsing embedded override options.");
1592
1844
  }
1593
1845
  };
1594
- function wo({ node: t, parent: n }, r, e) {
1595
- if (r.length === 0 || t.type !== "TemplateLiteral")
1846
+ function Gr({ node: e, parent: t }, n, r) {
1847
+ if (n.length === 0 || e.type !== "TemplateLiteral")
1596
1848
  return;
1597
- const o = t.comments ?? n?.comments;
1598
- if (!o)
1849
+ const s = e.comments ?? t?.comments;
1850
+ if (!s)
1599
1851
  return;
1600
- const s = o[o.length - 1];
1852
+ const c = s[s.length - 1];
1601
1853
  if (![
1602
1854
  "MultiLine",
1603
1855
  // meriyah
@@ -1605,18 +1857,18 @@ function wo({ node: t, parent: n }, r, e) {
1605
1857
  // typescript, acorn, espree, flow
1606
1858
  "CommentBlock"
1607
1859
  // babel, babel-flow, babel-ts
1608
- ].includes(s.type) || !s.leading)
1860
+ ].includes(c.type) || !c.leading)
1609
1861
  return;
1610
- const l = e.noEmbeddedIdentificationByComment ?? [];
1611
- for (const a of r)
1612
- if (!l.includes(a) && ` ${a} ` === s.value)
1613
- return a;
1862
+ const o = r.noEmbeddedIdentificationByComment ?? [];
1863
+ for (const d of n)
1864
+ if (!o.includes(d) && ` ${d} ` === c.value)
1865
+ return d;
1614
1866
  }
1615
- function Bo({ node: t, parent: n }, r, e) {
1616
- if (r.length === 0 || t.type !== "TemplateLiteral" || n?.type !== "TaggedTemplateExpression")
1867
+ function Cr({ node: e, parent: t }, n, r) {
1868
+ if (n.length === 0 || e.type !== "TemplateLiteral" || t?.type !== "TaggedTemplateExpression")
1617
1869
  return;
1618
- e.parser;
1619
- const o = e.parser in ut, s = e.noEmbeddedIdentificationByTag ?? [], l = /* @__PURE__ */ new Set([
1870
+ r.parser;
1871
+ const s = r.parser in Rt, c = r.noEmbeddedIdentificationByTag ?? [], o = /* @__PURE__ */ new Set([
1620
1872
  "start",
1621
1873
  "end",
1622
1874
  "loc",
@@ -1625,90 +1877,90 @@ function Bo({ node: t, parent: n }, r, e) {
1625
1877
  "typeAnnotation",
1626
1878
  "decorators"
1627
1879
  ]);
1628
- for (const a of r)
1629
- if (!s.includes(a))
1630
- if (Uo(a)) {
1631
- if (n.tag.type === "Identifier" && n.tag.name === a)
1632
- return a;
1880
+ for (const d of n)
1881
+ if (!c.includes(d))
1882
+ if (zr(d)) {
1883
+ if (t.tag.type === "Identifier" && t.tag.name === d)
1884
+ return d;
1633
1885
  } else {
1634
- if (!o)
1886
+ if (!s)
1635
1887
  return;
1636
- let g;
1888
+ let p;
1637
1889
  try {
1638
- const d = ut[e.parser].parse(
1639
- `${a}\`\``,
1640
- e
1890
+ const a = Rt[r.parser].parse(
1891
+ `${d}\`\``,
1892
+ r
1641
1893
  );
1642
- if (d instanceof Promise)
1894
+ if (a instanceof Promise)
1643
1895
  throw new TypeError(
1644
1896
  "Async parse function hasn't been supported yet."
1645
1897
  );
1646
- g = d;
1898
+ p = a;
1647
1899
  } catch {
1648
1900
  continue;
1649
1901
  }
1650
- if (g.type === "File" && (g = g.program), !(g.type === "Program" && g.body[0]?.type === "ExpressionStatement"))
1902
+ if (p.type === "File" && (p = p.program), !(p.type === "Program" && p.body[0]?.type === "ExpressionStatement"))
1651
1903
  continue;
1652
- const c = g.body[0]?.expression;
1653
- if (c?.type !== "TaggedTemplateExpression")
1904
+ const h = p.body[0]?.expression;
1905
+ if (h?.type !== "TaggedTemplateExpression")
1654
1906
  continue;
1655
- if (n.tag, c.tag, Nt(n.tag, c.tag, l))
1656
- return a;
1907
+ if (t.tag, h.tag, un(t.tag, h.tag, o))
1908
+ return d;
1657
1909
  }
1658
1910
  }
1659
- function Uo(t) {
1660
- return /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/.test(t);
1911
+ function zr(e) {
1912
+ return /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/.test(e);
1661
1913
  }
1662
- function Mt(t, n, r = /* @__PURE__ */ new Set()) {
1663
- return Object.is(t, n) ? !0 : Array.isArray(t) ? qo(t, n, r) : typeof t == "object" ? Nt(
1914
+ function ln(e, t, n = /* @__PURE__ */ new Set()) {
1915
+ return Object.is(e, t) ? !0 : Array.isArray(e) ? Kr(e, t, n) : typeof e == "object" ? un(
1916
+ e,
1664
1917
  t,
1665
- n,
1666
- r
1918
+ n
1667
1919
  ) : !1;
1668
1920
  }
1669
- function qo(t, n, r = /* @__PURE__ */ new Set()) {
1670
- const e = t.length;
1671
- if (e != n.length)
1921
+ function Kr(e, t, n = /* @__PURE__ */ new Set()) {
1922
+ const r = e.length;
1923
+ if (r !== t.length)
1672
1924
  return !1;
1673
- for (let o = 0; o < e; o++)
1674
- if (!Mt(t[o], n[o], r))
1925
+ for (let s = 0; s < r; s++)
1926
+ if (!ln(e[s], t[s], n))
1675
1927
  return !1;
1676
1928
  return !0;
1677
1929
  }
1678
- function Nt(t, n, r = /* @__PURE__ */ new Set()) {
1679
- for (const e of Object.keys(t))
1680
- if (!r.has(e) && !(Object.prototype.hasOwnProperty.call(n, e) && Mt(t[e], n[e], r)))
1930
+ function un(e, t, n = /* @__PURE__ */ new Set()) {
1931
+ for (const r of Object.keys(e))
1932
+ if (!n.has(r) && !(Object.prototype.hasOwnProperty.call(t, r) && ln(e[r], t[r], n)))
1681
1933
  return !1;
1682
1934
  return !0;
1683
1935
  }
1684
- const { estree: Rt } = Wt, Co = function(t, n) {
1685
- const { node: r } = t;
1686
- if (r.type !== "TemplateLiteral" || r.quasis.some(({ value: { cooked: e } }) => e === null))
1936
+ const { estree: pn } = yn, Jr = (e, t) => {
1937
+ const { node: n } = e;
1938
+ if (n.type !== "TemplateLiteral" || n.quasis.some(({ value: { cooked: r } }) => r === null))
1687
1939
  return null;
1688
- for (const e of Lt) {
1689
- const o = n[T(e)];
1690
- if (!o)
1940
+ for (const r of sn) {
1941
+ const s = t[I(r)];
1942
+ if (!s)
1691
1943
  continue;
1692
- const s = wo(t, o, n) ?? Bo(t, o, n);
1693
- if (s === void 0)
1944
+ const c = Gr(e, s, t) ?? Cr(e, s, t);
1945
+ if (c === void 0)
1694
1946
  continue;
1695
- const l = At[e];
1696
- if (!l)
1947
+ const o = an[r];
1948
+ if (!o)
1697
1949
  return null;
1698
- const a = t.node;
1699
- return a.quasis.length === 1 && a.quasis[0]?.value.raw.trim() === "" ? "``" : async (g, c, d, u) => {
1700
- const y = await jo(
1701
- u.embeddedOverrides,
1702
- s,
1703
- u.filepath
1950
+ const d = e.node;
1951
+ return d.quasis.length === 1 && d.quasis[0]?.value.raw.trim() === "" ? "``" : async (p, h, a, l) => {
1952
+ const u = await qr(
1953
+ l.embeddedOverrides,
1954
+ c,
1955
+ l.filepath
1704
1956
  );
1705
1957
  try {
1706
- const E = await l(g, c, d, u, {
1707
- identifier: s,
1708
- identifiers: o,
1709
- embeddedOverrideOptions: y
1958
+ const E = await o(p, h, a, l, {
1959
+ identifier: c,
1960
+ identifiers: s,
1961
+ embeddedOverrideOptions: u
1710
1962
  });
1711
- return D.label(
1963
+ return $.label(
1712
1964
  { embed: !0, ...E.label },
1713
1965
  E
1714
1966
  );
@@ -1717,20 +1969,20 @@ const { estree: Rt } = Wt, Co = function(t, n) {
1717
1969
  }
1718
1970
  };
1719
1971
  }
1720
- return Rt.embed?.(t, n) ?? null;
1721
- }, ts = {
1972
+ return pn.embed?.(e, t) ?? null;
1973
+ }, ii = {
1722
1974
  estree: {
1723
- ...Rt,
1724
- embed: Co
1975
+ ...pn,
1976
+ embed: Jr
1725
1977
  }
1726
1978
  };
1727
1979
  export {
1728
- At as embeddedEmbedders,
1729
- Lt as embeddedLanguages,
1730
- Ot as embeddedOptions,
1731
- kt as embeddedParsers,
1732
- T as makeIdentifiersOptionName,
1733
- es as options,
1734
- ut as parsers,
1735
- ts as printers
1980
+ an as embeddedEmbedders,
1981
+ sn as embeddedLanguages,
1982
+ cn as embeddedOptions,
1983
+ rn as embeddedParsers,
1984
+ I as makeIdentifiersOptionName,
1985
+ ri as options,
1986
+ Rt as parsers,
1987
+ ii as printers
1736
1988
  };