prettier-plugin-embed 0.7.3 → 0.8.0

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