prettier 2.1.2 → 2.2.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/doc.js CHANGED
@@ -298,7 +298,7 @@
298
298
  var _default = isFullwidthCodePoint;
299
299
  isFullwidthCodePoint_1.default = _default;
300
300
 
301
- var emojiRegex = function emojiRegex() {
301
+ var emojiRegex = function () {
302
302
  // https://mths.be/emoji
303
303
  return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
304
304
  };
@@ -643,18 +643,14 @@
643
643
 
644
644
  function createCommonjsModule(fn, basedir, module) {
645
645
  return module = {
646
- path: basedir,
647
- exports: {},
648
- require: function (path, base) {
649
- return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
650
- }
646
+ path: basedir,
647
+ exports: {},
648
+ require: function (path, base) {
649
+ return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
650
+ }
651
651
  }, fn(module, module.exports), module.exports;
652
652
  }
653
653
 
654
- function getCjsExportFromNamespace (n) {
655
- return n && n['default'] || n;
656
- }
657
-
658
654
  function commonjsRequire () {
659
655
  throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
660
656
  }
@@ -1120,7 +1116,7 @@
1120
1116
  }, value));
1121
1117
 
1122
1118
  var name = "prettier";
1123
- var version$1 = "2.1.2";
1119
+ var version$1 = "2.2.0";
1124
1120
  var description = "Prettier is an opinionated code formatter";
1125
1121
  var bin = "./bin/prettier.js";
1126
1122
  var repository = "prettier/prettier";
@@ -1140,33 +1136,34 @@
1140
1136
  "bin"
1141
1137
  ];
1142
1138
  var dependencies = {
1143
- "@angular/compiler": "10.0.12",
1139
+ "@angular/compiler": "10.2.3",
1144
1140
  "@babel/code-frame": "7.10.4",
1145
- "@babel/parser": "7.11.2",
1146
- "@glimmer/syntax": "0.59.0",
1141
+ "@babel/parser": "7.12.5",
1142
+ "@glimmer/syntax": "0.66.0",
1147
1143
  "@iarna/toml": "2.2.5",
1148
- "@typescript-eslint/typescript-estree": "3.10.0",
1149
- "angular-estree-parser": "2.2.0",
1144
+ "@typescript-eslint/typescript-estree": "4.8.1",
1145
+ "angular-estree-parser": "2.2.1",
1150
1146
  "angular-html-parser": "1.7.1",
1151
- camelcase: "6.0.0",
1147
+ camelcase: "6.2.0",
1152
1148
  chalk: "4.1.0",
1153
1149
  "ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540",
1154
1150
  "cjk-regex": "2.0.0",
1155
1151
  cosmiconfig: "7.0.0",
1156
1152
  dashify: "2.0.0",
1157
- diff: "4.0.2",
1153
+ diff: "5.0.0",
1158
1154
  editorconfig: "0.15.3",
1159
- "editorconfig-to-prettier": "0.1.1",
1155
+ "editorconfig-to-prettier": "0.2.0",
1160
1156
  "escape-string-regexp": "4.0.0",
1157
+ espree: "7.3.0",
1161
1158
  esutils: "2.0.3",
1162
1159
  "fast-glob": "3.2.4",
1163
1160
  "fast-json-stable-stringify": "2.1.0",
1164
1161
  "find-parent-dir": "0.3.0",
1165
- "flow-parser": "0.132.0",
1166
- "get-stream": "6.0.0",
1162
+ "flow-parser": "0.138.0",
1163
+ "get-stdin": "8.0.0",
1167
1164
  globby: "11.0.1",
1168
- graphql: "15.3.0",
1169
- "html-element-attributes": "2.2.1",
1165
+ graphql: "15.4.0",
1166
+ "html-element-attributes": "2.3.0",
1170
1167
  "html-styles": "1.0.0",
1171
1168
  "html-tag-names": "1.1.5",
1172
1169
  "html-void-elements": "1.0.5",
@@ -1175,12 +1172,13 @@
1175
1172
  json5: "2.1.3",
1176
1173
  leven: "3.1.0",
1177
1174
  "lines-and-columns": "1.1.6",
1178
- "linguist-languages": "7.10.0",
1175
+ "linguist-languages": "7.12.1",
1179
1176
  lodash: "4.17.20",
1180
- mem: "6.1.0",
1177
+ mem: "8.0.0",
1178
+ meriyah: "3.1.6",
1181
1179
  minimatch: "3.0.4",
1182
1180
  minimist: "1.2.5",
1183
- "n-readlines": "1.0.0",
1181
+ "n-readlines": "1.0.1",
1184
1182
  outdent: "0.7.1",
1185
1183
  "parse-srcset": "ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee",
1186
1184
  "please-upgrade-node": "3.2.0",
@@ -1191,62 +1189,64 @@
1191
1189
  "postcss-values-parser": "2.0.1",
1192
1190
  "regexp-util": "1.2.2",
1193
1191
  "remark-footnotes": "2.0.0",
1194
- "remark-math": "1.0.6",
1192
+ "remark-math": "3.0.1",
1195
1193
  "remark-parse": "8.0.3",
1196
- resolve: "1.17.0",
1194
+ resolve: "1.19.0",
1197
1195
  semver: "7.3.2",
1198
1196
  "string-width": "4.2.0",
1199
- typescript: "4.0.2",
1197
+ typescript: "4.1.2",
1200
1198
  "unicode-regex": "3.0.0",
1201
1199
  unified: "9.2.0",
1202
1200
  vnopts: "1.0.2",
1203
1201
  "yaml-unist-parser": "1.3.1"
1204
1202
  };
1205
1203
  var devDependencies = {
1206
- "@babel/core": "7.11.4",
1207
- "@babel/preset-env": "7.11.0",
1208
- "@babel/types": "7.11.0",
1209
- "@glimmer/reference": "0.59.0",
1204
+ "@babel/core": "7.12.3",
1205
+ "@babel/preset-env": "7.12.1",
1206
+ "@babel/types": "7.12.6",
1207
+ "@glimmer/reference": "0.66.0",
1210
1208
  "@rollup/plugin-alias": "3.1.1",
1211
- "@rollup/plugin-babel": "5.2.0",
1212
- "@rollup/plugin-commonjs": "14.0.0",
1209
+ "@rollup/plugin-babel": "5.2.1",
1210
+ "@rollup/plugin-commonjs": "16.0.0",
1213
1211
  "@rollup/plugin-json": "4.1.0",
1214
- "@rollup/plugin-node-resolve": "9.0.0",
1215
- "@rollup/plugin-replace": "2.3.3",
1212
+ "@rollup/plugin-node-resolve": "10.0.0",
1213
+ "@rollup/plugin-replace": "2.3.4",
1216
1214
  "@types/estree": "0.0.45",
1217
- "@types/node": "14.6.0",
1218
- "@typescript-eslint/types": "3.10.0",
1219
- "babel-loader": "8.1.0",
1215
+ "@types/node": "14.14.0",
1216
+ "@typescript-eslint/types": "4.8.1",
1217
+ "babel-jest": "26.6.3",
1218
+ "babel-loader": "8.2.1",
1220
1219
  benchmark: "2.1.4",
1221
1220
  "builtin-modules": "3.1.0",
1222
1221
  "cross-env": "7.0.2",
1223
- cspell: "4.1.0",
1224
- eslint: "7.7.0",
1225
- "eslint-config-prettier": "6.11.0",
1222
+ cspell: "4.2.2",
1223
+ eslint: "7.13.0",
1224
+ "eslint-config-prettier": "6.15.0",
1226
1225
  "eslint-formatter-friendly": "7.0.0",
1227
- "eslint-plugin-import": "2.22.0",
1228
- "eslint-plugin-jest": "23.20.0",
1226
+ "eslint-plugin-import": "2.22.1",
1227
+ "eslint-plugin-jest": "24.1.3",
1229
1228
  "eslint-plugin-prettier-internal-rules": "file:scripts/tools/eslint-plugin-prettier-internal-rules",
1230
- "eslint-plugin-react": "7.20.6",
1231
- "eslint-plugin-unicorn": "21.0.0",
1232
- execa: "4.0.3",
1233
- jest: "26.4.2",
1229
+ "eslint-plugin-react": "7.21.5",
1230
+ "eslint-plugin-unicorn": "23.0.0",
1231
+ execa: "4.1.0",
1232
+ jest: "26.6.3",
1234
1233
  "jest-snapshot-serializer-ansi": "1.0.0",
1235
1234
  "jest-snapshot-serializer-raw": "1.1.0",
1236
- "jest-watch-typeahead": "0.6.0",
1235
+ "jest-watch-typeahead": "0.6.1",
1237
1236
  "npm-run-all": "4.1.5",
1238
- prettier: "2.1.1",
1237
+ "path-browserify": "1.0.1",
1238
+ prettier: "2.1.2",
1239
1239
  rimraf: "3.0.2",
1240
- rollup: "2.26.5",
1240
+ rollup: "2.33.3",
1241
1241
  "rollup-plugin-node-globals": "1.4.0",
1242
- "rollup-plugin-terser": "7.0.0",
1242
+ "rollup-plugin-terser": "7.0.2",
1243
1243
  shelljs: "0.8.4",
1244
1244
  "snapshot-diff": "0.8.1",
1245
1245
  "strip-ansi": "6.0.0",
1246
- "synchronous-promise": "2.0.13",
1247
- tempy: "0.6.0",
1248
- "terser-webpack-plugin": "4.1.0",
1249
- webpack: "4.44.1"
1246
+ "synchronous-promise": "2.0.15",
1247
+ tempy: "1.0.0",
1248
+ "terser-webpack-plugin": "5.0.3",
1249
+ webpack: "5.5.1"
1250
1250
  };
1251
1251
  var scripts = {
1252
1252
  prepublishOnly: "echo \"Error: must publish from dist/\" && exit 1",
@@ -1264,16 +1264,16 @@
1264
1264
  "lint:eslint": "cross-env EFF_NO_LINK_RULES=true eslint . --format friendly",
1265
1265
  "lint:changelog": "node ./scripts/lint-changelog.js",
1266
1266
  "lint:prettier": "prettier . \"!test*\" --check",
1267
- "lint:dist": "eslint --no-eslintrc --no-ignore --env=es6,browser --parser-options=ecmaVersion:2016 \"dist/!(bin-prettier|index|third-party).js\"",
1267
+ "lint:dist": "eslint --no-eslintrc --no-ignore --env=es6,browser --parser-options=ecmaVersion:2018 \"dist/!(bin-prettier|index|third-party).js\"",
1268
1268
  "lint:spellcheck": "cspell \"**/*\" \".github/**/*\"",
1269
1269
  "lint:deps": "node ./scripts/check-deps.js",
1270
1270
  fix: "run-s fix:eslint fix:prettier",
1271
1271
  "fix:eslint": "yarn lint:eslint --fix",
1272
1272
  "fix:prettier": "yarn lint:prettier --write",
1273
- build: "node ./scripts/build/build.js",
1273
+ build: "node --max-old-space-size=3072 ./scripts/build/build.js",
1274
1274
  "build-docs": "node ./scripts/build-docs.js"
1275
1275
  };
1276
- var _package = {
1276
+ var require$$3 = {
1277
1277
  name: name,
1278
1278
  version: version$1,
1279
1279
  description: description,
@@ -1292,27 +1292,6 @@
1292
1292
  scripts: scripts
1293
1293
  };
1294
1294
 
1295
- var _package$1 = /*#__PURE__*/Object.freeze({
1296
- __proto__: null,
1297
- name: name,
1298
- version: version$1,
1299
- description: description,
1300
- bin: bin,
1301
- repository: repository,
1302
- homepage: homepage,
1303
- author: author,
1304
- license: license,
1305
- main: main,
1306
- browser: browser$1,
1307
- unpkg: unpkg,
1308
- engines: engines,
1309
- files: files,
1310
- dependencies: dependencies,
1311
- devDependencies: devDependencies,
1312
- scripts: scripts,
1313
- 'default': _package
1314
- });
1315
-
1316
1295
  var lib = createCommonjsModule(function (module, exports) {
1317
1296
 
1318
1297
  Object.defineProperty(exports, "__esModule", {
@@ -1345,7 +1324,7 @@
1345
1324
  delete: noop,
1346
1325
  get: noop,
1347
1326
  set: noop,
1348
- has: function has(k) {
1327
+ has: function (k) {
1349
1328
  return false;
1350
1329
  }
1351
1330
  };
@@ -1354,7 +1333,7 @@
1354
1333
 
1355
1334
  var hop = Object.prototype.hasOwnProperty;
1356
1335
 
1357
- var has = function has(obj, prop) {
1336
+ var has = function (obj, prop) {
1358
1337
  return hop.call(obj, prop);
1359
1338
  }; // Copy all own enumerable properties from source to target
1360
1339
 
@@ -1496,7 +1475,7 @@
1496
1475
  }
1497
1476
 
1498
1477
  var fullOutdent = extend(outdent, {
1499
- string: function string(str) {
1478
+ string: function (str) {
1500
1479
  return _outdentArray([str], false, options)[0];
1501
1480
  }
1502
1481
  });
@@ -1529,7 +1508,7 @@
1529
1508
  function _templateObject6() {
1530
1509
  const data = _taggedTemplateLiteral(["\n Require either '@prettier' or '@format' to be present in the file's first docblock comment\n in order for it to be formatted.\n "]);
1531
1510
 
1532
- _templateObject6 = function _templateObject6() {
1511
+ _templateObject6 = function () {
1533
1512
  return data;
1534
1513
  };
1535
1514
 
@@ -1539,7 +1518,7 @@
1539
1518
  function _templateObject5() {
1540
1519
  const data = _taggedTemplateLiteral(["\n Format code starting at a given character offset.\n The range will extend backwards to the start of the first line containing the selected statement.\n This option cannot be used with --cursor-offset.\n "]);
1541
1520
 
1542
- _templateObject5 = function _templateObject5() {
1521
+ _templateObject5 = function () {
1543
1522
  return data;
1544
1523
  };
1545
1524
 
@@ -1549,7 +1528,7 @@
1549
1528
  function _templateObject4() {
1550
1529
  const data = _taggedTemplateLiteral(["\n Format code ending at a given character offset (exclusive).\n The range will extend forwards to the end of the selected statement.\n This option cannot be used with --cursor-offset.\n "]);
1551
1530
 
1552
- _templateObject4 = function _templateObject4() {
1531
+ _templateObject4 = function () {
1553
1532
  return data;
1554
1533
  };
1555
1534
 
@@ -1559,7 +1538,7 @@
1559
1538
  function _templateObject3() {
1560
1539
  const data = _taggedTemplateLiteral(["\n Custom directory that contains prettier plugins in node_modules subdirectory.\n Overrides default behavior when plugins are searched relatively to the location of Prettier.\n Multiple values are accepted.\n "]);
1561
1540
 
1562
- _templateObject3 = function _templateObject3() {
1541
+ _templateObject3 = function () {
1563
1542
  return data;
1564
1543
  };
1565
1544
 
@@ -1569,7 +1548,7 @@
1569
1548
  function _templateObject2() {
1570
1549
  const data = _taggedTemplateLiteral(["\n Maintain existing\n (mixed values within one file are normalised by looking at what's used after the first line)\n "]);
1571
1550
 
1572
- _templateObject2 = function _templateObject2() {
1551
+ _templateObject2 = function () {
1573
1552
  return data;
1574
1553
  };
1575
1554
 
@@ -1579,7 +1558,7 @@
1579
1558
  function _templateObject() {
1580
1559
  const data = _taggedTemplateLiteral(["\n Print (to stderr) where a cursor at the given position would move to after formatting.\n This option cannot be used with --range-start and --range-end.\n "]);
1581
1560
 
1582
- _templateObject = function _templateObject() {
1561
+ _templateObject = function () {
1583
1562
  return data;
1584
1563
  };
1585
1564
 
@@ -1724,6 +1703,14 @@
1724
1703
  value: "typescript",
1725
1704
  since: "1.4.0",
1726
1705
  description: "TypeScript"
1706
+ }, {
1707
+ value: "espree",
1708
+ since: "2.2.0",
1709
+ description: "JavaScript"
1710
+ }, {
1711
+ value: "meriyah",
1712
+ since: "2.2.0",
1713
+ description: "JavaScript"
1727
1714
  }, {
1728
1715
  value: "css",
1729
1716
  since: "1.7.1",
@@ -1905,8 +1892,6 @@
1905
1892
  options
1906
1893
  };
1907
1894
 
1908
- var require$$3 = getCjsExportFromNamespace(_package$1);
1909
-
1910
1895
  const semver$1 = {
1911
1896
  compare: compare_1,
1912
1897
  lt: lt_1,
@@ -2013,6 +1998,9 @@
2013
1998
  getSupportInfo
2014
1999
  };
2015
2000
 
2001
+ const {
2002
+ getSupportInfo: getSupportInfo$1
2003
+ } = support;
2016
2004
  const notAsciiRegex = /[^\x20-\x7F]/;
2017
2005
 
2018
2006
  const getPenultimate = arr => arr[arr.length - 2];
@@ -2560,15 +2548,6 @@
2560
2548
  return stringWidth_1(text);
2561
2549
  }
2562
2550
 
2563
- function hasIgnoreComment(path) {
2564
- const node = path.getValue();
2565
- return hasNodeIgnoreComment(node);
2566
- }
2567
-
2568
- function hasNodeIgnoreComment(node) {
2569
- return node && (node.comments && node.comments.length > 0 && node.comments.some(comment => isNodeIgnoreComment(comment) && !comment.unignore) || node.prettierIgnore);
2570
- }
2571
-
2572
2551
  function isNodeIgnoreComment(comment) {
2573
2552
  return comment.value.trim() === "prettier-ignore";
2574
2553
  }
@@ -2608,25 +2587,6 @@
2608
2587
  comment.leading = false;
2609
2588
  comment.trailing = true;
2610
2589
  addCommentHelper(node, comment);
2611
- } // Not using
2612
-
2613
- /* istanbul ignore next */
2614
-
2615
-
2616
- function isWithinParentArrayProperty(path, propertyName) {
2617
- const node = path.getValue();
2618
- const parent = path.getParentNode();
2619
-
2620
- if (parent == null) {
2621
- return false;
2622
- }
2623
-
2624
- if (!Array.isArray(parent[propertyName])) {
2625
- return false;
2626
- }
2627
-
2628
- const key = path.getName();
2629
- return parent[propertyName][key] === node;
2630
2590
  }
2631
2591
 
2632
2592
  function replaceEndOfLineWith(text, replacement) {
@@ -2643,17 +2603,20 @@
2643
2603
  return parts;
2644
2604
  }
2645
2605
 
2646
- function getParserName(lang, options) {
2647
- const supportInfo = support.getSupportInfo({
2606
+ function inferParserByLanguage(language, options) {
2607
+ const {
2608
+ languages
2609
+ } = getSupportInfo$1({
2648
2610
  plugins: options.plugins
2649
2611
  });
2650
- const language = supportInfo.languages.find(language => language.name.toLowerCase() === lang || language.aliases && language.aliases.includes(lang) || language.extensions && language.extensions.some(ext => ext === ".".concat(lang)));
2651
-
2652
- if (language) {
2653
- return language.parsers[0];
2654
- }
2655
-
2656
- return null;
2612
+ const matched = languages.find(({
2613
+ name
2614
+ }) => name.toLowerCase() === language) || languages.find(({
2615
+ aliases
2616
+ }) => Array.isArray(aliases) && aliases.includes(language)) || languages.find(({
2617
+ extensions
2618
+ }) => Array.isArray(extensions) && extensions.includes(".".concat(language)));
2619
+ return matched && matched.parsers[0];
2657
2620
  }
2658
2621
 
2659
2622
  function isFrontMatterNode(node) {
@@ -2675,11 +2638,11 @@
2675
2638
  }
2676
2639
 
2677
2640
  var util = {
2641
+ inferParserByLanguage,
2678
2642
  replaceEndOfLineWith,
2679
2643
  getStringWidth,
2680
2644
  getMaxContinuousCount,
2681
2645
  getMinNotPresentContinuousCount,
2682
- getParserName,
2683
2646
  getPenultimate,
2684
2647
  getLast,
2685
2648
  getNextNonSpaceNonCommentCharacterIndexWithStartIndex,
@@ -2704,14 +2667,11 @@
2704
2667
  getPreferredQuote,
2705
2668
  printString,
2706
2669
  printNumber,
2707
- hasIgnoreComment,
2708
- hasNodeIgnoreComment,
2709
2670
  isNodeIgnoreComment,
2710
2671
  makeString,
2711
2672
  addLeadingComment,
2712
2673
  addDanglingComment,
2713
2674
  addTrailingComment,
2714
- isWithinParentArrayProperty,
2715
2675
  isFrontMatterNode,
2716
2676
  getShebang
2717
2677
  };
@@ -3321,6 +3281,13 @@
3321
3281
 
3322
3282
  break;
3323
3283
  }
3284
+ } // Flush remaining line-suffix contents at the end of the document, in case
3285
+ // there is no new line after the line-suffix.
3286
+
3287
+
3288
+ if (cmds.length === 0 && lineSuffix.length) {
3289
+ cmds.push(...lineSuffix.reverse());
3290
+ lineSuffix = [];
3324
3291
  }
3325
3292
  }
3326
3293
 
@@ -0,0 +1,46 @@
1
+ function t(e,s){const{ignoreDecorators:n}=s||{};if(!n){const s=e.declaration&&e.declaration.decorators||e.decorators;if(s&&s.length>0)return t(s[0])}return e.range?e.range[0]:e.start}function e(t){const s=t.range?t.range[1]:t.end;return t.typeAnnotation?Math.max(s,e(t.typeAnnotation)):s}function s(e,s){return t(e)===t(s)}var n={locStart:t,locEnd:e,composeLoc:function(s,n=s){const r=t(s);return[r,"number"==typeof n?r+n:e(n)]},hasSameLocStart:s,hasSameLoc:function(t,n){return s(t,n)&&function(t,s){return e(t)===e(s)}(t,n)}};function r(t,e,s){return t(s={path:e,exports:{},require:function(t,e){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&s.path)}},s.exports),s.exports}var i,a=r((function(t,e){var s="\n",n=function(){function t(t){this.string=t;for(var e=[0],n=0;n<t.length;)switch(t[n]){case s:n+=s.length,e.push(n);break;case"\r":t[n+="\r".length]===s&&(n+=s.length),e.push(n);break;default:n++}this.offsets=e}return t.prototype.locationForIndex=function(t){if(t<0||t>this.string.length)return null;for(var e=0,s=this.offsets;s[e+1]<=t;)e++;return{line:e,column:t-s[e]}},t.prototype.indexForLocation=function(t){var e=t.line,s=t.column;return e<0||e>=this.offsets.length||s<0||s>this.lengthOfLine(e)?null:this.offsets[e]+s},t.prototype.lengthOfLine=function(t){var e=this.offsets[t];return(t===this.offsets.length-1?this.string.length:this.offsets[t+1])-e},t}();e.__esModule=!0,e.default=n})),o=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});e.Context=class{constructor(t){this.text=t,this.locator=new s(this.text)}};class s{constructor(t){this._lineAndColumn=new a.default(t)}locationForIndex(t){const{line:e,column:s}=this._lineAndColumn.locationForIndex(t);return{line:e+1,column:s}}}}));
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.io/license
8
+ */
9
+ class c{constructor(t,e,s,n){this.input=e,this.errLocation=s,this.ctxLocation=n,this.message="Parser Error: ".concat(t," ").concat(s," [").concat(e,"] in ").concat(n)}}class h{constructor(t,e){this.start=t,this.end=e}toAbsolute(t){return new M(t+this.start,t+this.end)}}class p{constructor(t,e){this.span=t,this.sourceSpan=e}visit(t,e=null){return null}toString(){return"AST"}}class u extends p{constructor(t,e,s){super(t,e),this.nameSpan=s}}class l extends p{constructor(t,e,s,n,r){super(t,e),this.prefix=s,this.uninterpretedExpression=n,this.location=r}visit(t,e=null){return t.visitQuote(this,e)}toString(){return"Quote"}}class d extends p{visit(t,e=null){}}class f extends p{visit(t,e=null){return t.visitImplicitReceiver(this,e)}}class v extends p{constructor(t,e,s){super(t,e),this.expressions=s}visit(t,e=null){return t.visitChain(this,e)}}class x extends p{constructor(t,e,s,n,r){super(t,e),this.condition=s,this.trueExp=n,this.falseExp=r}visit(t,e=null){return t.visitConditional(this,e)}}class g extends u{constructor(t,e,s,n,r){super(t,e,s),this.receiver=n,this.name=r}visit(t,e=null){return t.visitPropertyRead(this,e)}}class m extends u{constructor(t,e,s,n,r,i){super(t,e,s),this.receiver=n,this.name=r,this.value=i}visit(t,e=null){return t.visitPropertyWrite(this,e)}}class y extends u{constructor(t,e,s,n,r){super(t,e,s),this.receiver=n,this.name=r}visit(t,e=null){return t.visitSafePropertyRead(this,e)}}class S extends p{constructor(t,e,s,n){super(t,e),this.obj=s,this.key=n}visit(t,e=null){return t.visitKeyedRead(this,e)}}class w extends p{constructor(t,e,s,n,r){super(t,e),this.obj=s,this.key=n,this.value=r}visit(t,e=null){return t.visitKeyedWrite(this,e)}}class C extends u{constructor(t,e,s,n,r,i){super(t,e,i),this.exp=s,this.name=n,this.args=r}visit(t,e=null){return t.visitPipe(this,e)}}class P extends p{constructor(t,e,s){super(t,e),this.value=s}visit(t,e=null){return t.visitLiteralPrimitive(this,e)}}class E extends p{constructor(t,e,s){super(t,e),this.expressions=s}visit(t,e=null){return t.visitLiteralArray(this,e)}}class A extends p{constructor(t,e,s,n){super(t,e),this.keys=s,this.values=n}visit(t,e=null){return t.visitLiteralMap(this,e)}}class O extends p{constructor(t,e,s,n){super(t,e),this.strings=s,this.expressions=n}visit(t,e=null){return t.visitInterpolation(this,e)}}class b extends p{constructor(t,e,s,n,r){super(t,e),this.operation=s,this.left=n,this.right=r}visit(t,e=null){return t.visitBinary(this,e)}}class k extends b{constructor(t,e,s,n,r,i,a){super(t,e,r,i,a),this.operator=s,this.expr=n}static createMinus(t,e,s){return new k(t,e,"-",s,"-",new P(t,e,0),s)}static createPlus(t,e,s){return new k(t,e,"+",s,"-",s,new P(t,e,0))}visit(t,e=null){return void 0!==t.visitUnary?t.visitUnary(this,e):t.visitBinary(this,e)}}class N extends p{constructor(t,e,s){super(t,e),this.expression=s}visit(t,e=null){return t.visitPrefixNot(this,e)}}class I extends p{constructor(t,e,s){super(t,e),this.expression=s}visit(t,e=null){return t.visitNonNullAssert(this,e)}}class _ extends u{constructor(t,e,s,n,r,i){super(t,e,s),this.receiver=n,this.name=r,this.args=i}visit(t,e=null){return t.visitMethodCall(this,e)}}class L extends u{constructor(t,e,s,n,r,i){super(t,e,s),this.receiver=n,this.name=r,this.args=i}visit(t,e=null){return t.visitSafeMethodCall(this,e)}}class K extends p{constructor(t,e,s,n){super(t,e),this.target=s,this.args=n}visit(t,e=null){return t.visitFunctionCall(this,e)}}class M{constructor(t,e){this.start=t,this.end=e}}class T extends p{constructor(t,e,s,n,r){super(new h(0,null===e?0:e.length),new M(n,null===e?n:n+e.length)),this.ast=t,this.source=e,this.location=s,this.errors=r}visit(t,e=null){return t.visitASTWithSource?t.visitASTWithSource(this,e):this.ast.visit(t,e)}toString(){return"".concat(this.source," in ").concat(this.location)}}class B{constructor(t,e,s){this.sourceSpan=t,this.key=e,this.value=s}}class R{constructor(t,e,s){this.sourceSpan=t,this.key=e,this.value=s}}class j{visit(t,e){t.visit(this,e)}visitUnary(t,e){this.visit(t.expr,e)}visitBinary(t,e){this.visit(t.left,e),this.visit(t.right,e)}visitChain(t,e){this.visitAll(t.expressions,e)}visitConditional(t,e){this.visit(t.condition,e),this.visit(t.trueExp,e),this.visit(t.falseExp,e)}visitPipe(t,e){this.visit(t.exp,e),this.visitAll(t.args,e)}visitFunctionCall(t,e){t.target&&this.visit(t.target,e),this.visitAll(t.args,e)}visitImplicitReceiver(t,e){}visitInterpolation(t,e){this.visitAll(t.expressions,e)}visitKeyedRead(t,e){this.visit(t.obj,e),this.visit(t.key,e)}visitKeyedWrite(t,e){this.visit(t.obj,e),this.visit(t.key,e),this.visit(t.value,e)}visitLiteralArray(t,e){this.visitAll(t.expressions,e)}visitLiteralMap(t,e){this.visitAll(t.values,e)}visitLiteralPrimitive(t,e){}visitMethodCall(t,e){this.visit(t.receiver,e),this.visitAll(t.args,e)}visitPrefixNot(t,e){this.visit(t.expression,e)}visitNonNullAssert(t,e){this.visit(t.expression,e)}visitPropertyRead(t,e){this.visit(t.receiver,e)}visitPropertyWrite(t,e){this.visit(t.receiver,e),this.visit(t.value,e)}visitSafePropertyRead(t,e){this.visit(t.receiver,e)}visitSafeMethodCall(t,e){this.visit(t.receiver,e),this.visitAll(t.args,e)}visitQuote(t,e){}visitAll(t,e){for(const s of t)this.visit(s,e)}}!function(t){t[t.DEFAULT=0]="DEFAULT",t[t.LITERAL_ATTR=1]="LITERAL_ATTR",t[t.ANIMATION=2]="ANIMATION"}(i||(i={}));var F=Object.freeze({__proto__:null,ParserError:c,ParseSpan:h,AST:p,ASTWithName:u,Quote:l,EmptyExpr:d,ImplicitReceiver:f,Chain:v,Conditional:x,PropertyRead:g,PropertyWrite:m,SafePropertyRead:y,KeyedRead:S,KeyedWrite:w,BindingPipe:C,LiteralPrimitive:P,LiteralArray:E,LiteralMap:A,Interpolation:O,Binary:b,Unary:k,PrefixNot:N,NonNullAssert:I,MethodCall:_,SafeMethodCall:L,FunctionCall:K,AbsoluteSourceSpan:M,ASTWithSource:T,VariableBinding:B,ExpressionBinding:R,RecursiveAstVisitor:j,AstTransformer:class{visitImplicitReceiver(t,e){return t}visitInterpolation(t,e){return new O(t.span,t.sourceSpan,t.strings,this.visitAll(t.expressions))}visitLiteralPrimitive(t,e){return new P(t.span,t.sourceSpan,t.value)}visitPropertyRead(t,e){return new g(t.span,t.sourceSpan,t.nameSpan,t.receiver.visit(this),t.name)}visitPropertyWrite(t,e){return new m(t.span,t.sourceSpan,t.nameSpan,t.receiver.visit(this),t.name,t.value.visit(this))}visitSafePropertyRead(t,e){return new y(t.span,t.sourceSpan,t.nameSpan,t.receiver.visit(this),t.name)}visitMethodCall(t,e){return new _(t.span,t.sourceSpan,t.nameSpan,t.receiver.visit(this),t.name,this.visitAll(t.args))}visitSafeMethodCall(t,e){return new L(t.span,t.sourceSpan,t.nameSpan,t.receiver.visit(this),t.name,this.visitAll(t.args))}visitFunctionCall(t,e){return new K(t.span,t.sourceSpan,t.target.visit(this),this.visitAll(t.args))}visitLiteralArray(t,e){return new E(t.span,t.sourceSpan,this.visitAll(t.expressions))}visitLiteralMap(t,e){return new A(t.span,t.sourceSpan,t.keys,this.visitAll(t.values))}visitUnary(t,e){switch(t.operator){case"+":return k.createPlus(t.span,t.sourceSpan,t.expr.visit(this));case"-":return k.createMinus(t.span,t.sourceSpan,t.expr.visit(this));default:throw new Error("Unknown unary operator ".concat(t.operator))}}visitBinary(t,e){return new b(t.span,t.sourceSpan,t.operation,t.left.visit(this),t.right.visit(this))}visitPrefixNot(t,e){return new N(t.span,t.sourceSpan,t.expression.visit(this))}visitNonNullAssert(t,e){return new I(t.span,t.sourceSpan,t.expression.visit(this))}visitConditional(t,e){return new x(t.span,t.sourceSpan,t.condition.visit(this),t.trueExp.visit(this),t.falseExp.visit(this))}visitPipe(t,e){return new C(t.span,t.sourceSpan,t.exp.visit(this),t.name,this.visitAll(t.args),t.nameSpan)}visitKeyedRead(t,e){return new S(t.span,t.sourceSpan,t.obj.visit(this),t.key.visit(this))}visitKeyedWrite(t,e){return new w(t.span,t.sourceSpan,t.obj.visit(this),t.key.visit(this),t.value.visit(this))}visitAll(t){const e=[];for(let s=0;s<t.length;++s)e[s]=t[s].visit(this);return e}visitChain(t,e){return new v(t.span,t.sourceSpan,this.visitAll(t.expressions))}visitQuote(t,e){return new l(t.span,t.sourceSpan,t.prefix,t.uninterpretedExpression,t.location)}},AstMemoryEfficientTransformer:class{visitImplicitReceiver(t,e){return t}visitInterpolation(t,e){const s=this.visitAll(t.expressions);return s!==t.expressions?new O(t.span,t.sourceSpan,t.strings,s):t}visitLiteralPrimitive(t,e){return t}visitPropertyRead(t,e){const s=t.receiver.visit(this);return s!==t.receiver?new g(t.span,t.sourceSpan,t.nameSpan,s,t.name):t}visitPropertyWrite(t,e){const s=t.receiver.visit(this),n=t.value.visit(this);return s!==t.receiver||n!==t.value?new m(t.span,t.sourceSpan,t.nameSpan,s,t.name,n):t}visitSafePropertyRead(t,e){const s=t.receiver.visit(this);return s!==t.receiver?new y(t.span,t.sourceSpan,t.nameSpan,s,t.name):t}visitMethodCall(t,e){const s=t.receiver.visit(this),n=this.visitAll(t.args);return s!==t.receiver||n!==t.args?new _(t.span,t.sourceSpan,t.nameSpan,s,t.name,n):t}visitSafeMethodCall(t,e){const s=t.receiver.visit(this),n=this.visitAll(t.args);return s!==t.receiver||n!==t.args?new L(t.span,t.sourceSpan,t.nameSpan,s,t.name,n):t}visitFunctionCall(t,e){const s=t.target&&t.target.visit(this),n=this.visitAll(t.args);return s!==t.target||n!==t.args?new K(t.span,t.sourceSpan,s,n):t}visitLiteralArray(t,e){const s=this.visitAll(t.expressions);return s!==t.expressions?new E(t.span,t.sourceSpan,s):t}visitLiteralMap(t,e){const s=this.visitAll(t.values);return s!==t.values?new A(t.span,t.sourceSpan,t.keys,s):t}visitUnary(t,e){const s=t.expr.visit(this);if(s!==t.expr)switch(t.operator){case"+":return k.createPlus(t.span,t.sourceSpan,s);case"-":return k.createMinus(t.span,t.sourceSpan,s);default:throw new Error("Unknown unary operator ".concat(t.operator))}return t}visitBinary(t,e){const s=t.left.visit(this),n=t.right.visit(this);return s!==t.left||n!==t.right?new b(t.span,t.sourceSpan,t.operation,s,n):t}visitPrefixNot(t,e){const s=t.expression.visit(this);return s!==t.expression?new N(t.span,t.sourceSpan,s):t}visitNonNullAssert(t,e){const s=t.expression.visit(this);return s!==t.expression?new I(t.span,t.sourceSpan,s):t}visitConditional(t,e){const s=t.condition.visit(this),n=t.trueExp.visit(this),r=t.falseExp.visit(this);return s!==t.condition||n!==t.trueExp||r!==t.falseExp?new x(t.span,t.sourceSpan,s,n,r):t}visitPipe(t,e){const s=t.exp.visit(this),n=this.visitAll(t.args);return s!==t.exp||n!==t.args?new C(t.span,t.sourceSpan,s,t.name,n,t.nameSpan):t}visitKeyedRead(t,e){const s=t.obj.visit(this),n=t.key.visit(this);return s!==t.obj||n!==t.key?new S(t.span,t.sourceSpan,s,n):t}visitKeyedWrite(t,e){const s=t.obj.visit(this),n=t.key.visit(this),r=t.value.visit(this);return s!==t.obj||n!==t.key||r!==t.value?new w(t.span,t.sourceSpan,s,n,r):t}visitAll(t){const e=[];let s=!1;for(let n=0;n<t.length;++n){const r=t[n],i=r.visit(this);e[n]=i,s=s||i!==r}return s?e:t}visitChain(t,e){const s=this.visitAll(t.expressions);return s!==t.expressions?new v(t.span,t.sourceSpan,s):t}visitQuote(t,e){return t}},ParsedProperty:class{constructor(t,e,s,n,r){this.name=t,this.expression=e,this.type=s,this.sourceSpan=n,this.valueSpan=r,this.isLiteral=this.type===i.LITERAL_ATTR,this.isAnimation=this.type===i.ANIMATION}},get ParsedPropertyType(){return i},ParsedEvent:class{constructor(t,e,s,n,r,i){this.name=t,this.targetOrPhase=e,this.type=s,this.handler=n,this.sourceSpan=r,this.handlerSpan=i}},ParsedVariable:class{constructor(t,e,s,n,r){this.name=t,this.value=e,this.sourceSpan=s,this.keySpan=n,this.valueSpan=r}},BoundElementProperty:class{constructor(t,e,s,n,r,i,a){this.name=t,this.type=e,this.securityContext=s,this.value=n,this.unit=r,this.sourceSpan=i,this.valueSpan=a}}});
10
+ /**
11
+ * @license
12
+ * Copyright Google LLC All Rights Reserved.
13
+ *
14
+ * Use of this source code is governed by an MIT-style license that can be
15
+ * found in the LICENSE file at https://angular.io/license
16
+ */function G(t){return 48<=t&&t<=57}
17
+ /**
18
+ * @license
19
+ * Copyright Google LLC All Rights Reserved.
20
+ *
21
+ * Use of this source code is governed by an MIT-style license that can be
22
+ * found in the LICENSE file at https://angular.io/license
23
+ */
24
+ var U;!function(t){t[t.Character=0]="Character",t[t.Identifier=1]="Identifier",t[t.Keyword=2]="Keyword",t[t.String=3]="String",t[t.Operator=4]="Operator",t[t.Number=5]="Number",t[t.Error=6]="Error"}(U||(U={}));const W=["var","let","as","null","undefined","true","false","if","else","this"];class V{constructor(t,e,s,n,r){this.index=t,this.end=e,this.type=s,this.numValue=n,this.strValue=r}isCharacter(t){return this.type==U.Character&&this.numValue==t}isNumber(){return this.type==U.Number}isString(){return this.type==U.String}isOperator(t){return this.type==U.Operator&&this.strValue==t}isIdentifier(){return this.type==U.Identifier}isKeyword(){return this.type==U.Keyword}isKeywordLet(){return this.type==U.Keyword&&"let"==this.strValue}isKeywordAs(){return this.type==U.Keyword&&"as"==this.strValue}isKeywordNull(){return this.type==U.Keyword&&"null"==this.strValue}isKeywordUndefined(){return this.type==U.Keyword&&"undefined"==this.strValue}isKeywordTrue(){return this.type==U.Keyword&&"true"==this.strValue}isKeywordFalse(){return this.type==U.Keyword&&"false"==this.strValue}isKeywordThis(){return this.type==U.Keyword&&"this"==this.strValue}isError(){return this.type==U.Error}toNumber(){return this.type==U.Number?this.numValue:-1}toString(){switch(this.type){case U.Character:case U.Identifier:case U.Keyword:case U.Operator:case U.String:case U.Error:return this.strValue;case U.Number:return this.numValue.toString();default:return null}}}function Q(t,e,s){return new V(t,e,U.Character,s,String.fromCharCode(s))}function D(t,e,s){return new V(t,e,U.Operator,0,s)}const z=new V(-1,-1,U.Character,0,"");class q{constructor(t){this.input=t,this.peek=0,this.index=-1,this.length=t.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){const t=this.input,e=this.length;let s=this.peek,n=this.index;for(;s<=32;){if(++n>=e){s=0;break}s=t.charCodeAt(n)}if(this.peek=s,this.index=n,n>=e)return null;if($(s))return this.scanIdentifier();if(G(s))return this.scanNumber(n);const r=n;switch(s){case 46:return this.advance(),G(this.peek)?this.scanNumber(r):Q(r,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(r,s);case 39:case 34:return this.scanString();case 35:case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(r,String.fromCharCode(s));case 63:return this.scanComplexOperator(r,"?",46,".");case 60:case 62:return this.scanComplexOperator(r,String.fromCharCode(s),61,"=");case 33:case 61:return this.scanComplexOperator(r,String.fromCharCode(s),61,"=",61,"=");case 38:return this.scanComplexOperator(r,"&",38,"&");case 124:return this.scanComplexOperator(r,"|",124,"|");case 160:for(;(i=this.peek)>=9&&i<=32||160==i;)this.advance();return this.scanToken()}var i;return this.advance(),this.error("Unexpected character [".concat(String.fromCharCode(s),"]"),0)}scanCharacter(t,e){return this.advance(),Q(t,this.index,e)}scanOperator(t,e){return this.advance(),D(t,this.index,e)}scanComplexOperator(t,e,s,n,r,i){this.advance();let a=e;return this.peek==s&&(this.advance(),a+=n),null!=r&&this.peek==r&&(this.advance(),a+=i),D(t,this.index,a)}scanIdentifier(){const t=this.index;for(this.advance();J(this.peek);)this.advance();const e=this.input.substring(t,this.index);return W.indexOf(e)>-1?(s=t,n=this.index,r=e,new V(s,n,U.Keyword,0,r)):function(t,e,s){return new V(t,e,U.Identifier,0,s)}(t,this.index,e);var s,n,r}scanNumber(t){let e=this.index===t;for(this.advance();;){if(G(this.peek));else if(46==this.peek)e=!1;else{if(101!=(s=this.peek)&&69!=s)break;if(this.advance(),H(this.peek)&&this.advance(),!G(this.peek))return this.error("Invalid exponent",-1);e=!1}this.advance()}var s;const n=this.input.substring(t,this.index),r=e?function(t){const e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}(n):parseFloat(n);return i=t,a=this.index,o=r,new V(i,a,U.Number,o,"");var i,a,o}scanString(){const t=this.index,e=this.peek;this.advance();let s="",n=this.index;const r=this.input;for(;this.peek!=e;)if(92==this.peek){let t;if(s+=r.substring(n,this.index),this.advance(),this.peek=this.peek,117==this.peek){const e=r.substring(this.index+1,this.index+5);if(!/^[0-9a-f]+$/i.test(e))return this.error("Invalid unicode escape [\\u".concat(e,"]"),0);t=parseInt(e,16);for(let t=0;t<5;t++)this.advance()}else t=Z(this.peek),this.advance();s+=String.fromCharCode(t),n=this.index}else{if(0==this.peek)return this.error("Unterminated quote",0);this.advance()}const i=r.substring(n,this.index);return this.advance(),a=t,o=this.index,c=s+i,new V(a,o,U.String,0,c);var a,o,c}error(t,e){const s=this.index+e;return function(t,e,s){return new V(t,e,U.Error,0,s)}(s,this.index,"Lexer Error: ".concat(t," at column ").concat(s," in expression [").concat(this.input,"]"))}}function $(t){return 97<=t&&t<=122||65<=t&&t<=90||95==t||36==t}function X(t){if(0==t.length)return!1;const e=new q(t);if(!$(e.peek))return!1;for(e.advance();0!==e.peek;){if(!J(e.peek))return!1;e.advance()}return!0}function J(t){return function(t){return t>=97&&t<=122||t>=65&&t<=90}(t)||G(t)||95==t||36==t}function H(t){return 45==t||43==t}function Y(t){return 39===t||34===t||96===t}function Z(t){switch(t){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return t}}var tt=Object.freeze({__proto__:null,get TokenType(){return U},Lexer:class{tokenize(t){const e=new q(t),s=[];let n=e.scanToken();for(;null!=n;)s.push(n),n=e.scanToken();return s}},Token:V,EOF:z,isIdentifier:X,isQuote:Y});
25
+ /**
26
+ * @license
27
+ * Copyright Google LLC All Rights Reserved.
28
+ *
29
+ * Use of this source code is governed by an MIT-style license that can be
30
+ * found in the LICENSE file at https://angular.io/license
31
+ */const et=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];
32
+ /**
33
+ * @license
34
+ * Copyright Google LLC All Rights Reserved.
35
+ *
36
+ * Use of this source code is governed by an MIT-style license that can be
37
+ * found in the LICENSE file at https://angular.io/license
38
+ */
39
+ class st{constructor(t,e){this.start=t,this.end=e}static fromArray(t){return t?(function(t,e){if(!(null==e||Array.isArray(e)&&2==e.length))throw new Error("Expected '".concat(t,"' to be an array, [start, end]."));if(null!=e){const t=e[0],s=e[1];et.forEach((e=>{if(e.test(t)||e.test(s))throw new Error("['".concat(t,"', '").concat(s,"'] contains unusable interpolation symbol."))}))}}("interpolation",t),new st(t[0],t[1])):nt}}const nt=new st("{{","}}");function rt(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}"undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self;
40
+ /**
41
+ * @license
42
+ * Copyright Google LLC All Rights Reserved.
43
+ *
44
+ * Use of this source code is governed by an MIT-style license that can be
45
+ * found in the LICENSE file at https://angular.io/license
46
+ */class it{constructor(t,e,s,n,r){this.strings=t,this.stringSpans=e,this.expressions=s,this.expressionsSpans=n,this.offsets=r}}class at{constructor(t,e,s){this.templateBindings=t,this.warnings=e,this.errors=s}}const ot=ct(nt);function ct(t){const e=rt(t.start)+"([\\s\\S]*?)"+rt(t.end);return new RegExp(e,"g")}class ht{constructor(t){this._lexer=t,this.errors=[],this.simpleExpressionChecker=lt}parseAction(t,e,s,n=nt){this._checkNoInterpolation(t,e,n);const r=this._stripComments(t),i=this._lexer.tokenize(this._stripComments(t)),a=new ut(t,e,s,i,r.length,!0,this.errors,t.length-r.length).parseChain();return new T(a,t,e,s,this.errors)}parseBinding(t,e,s,n=nt){const r=this._parseBindingAst(t,e,s,n);return new T(r,t,e,s,this.errors)}checkSimpleExpression(t){const e=new this.simpleExpressionChecker;return t.visit(e),e.errors}parseSimpleBinding(t,e,s,n=nt){const r=this._parseBindingAst(t,e,s,n),i=this.checkSimpleExpression(r);return i.length>0&&this._reportError("Host binding expression cannot contain ".concat(i.join(" ")),t,e),new T(r,t,e,s,this.errors)}_reportError(t,e,s,n){this.errors.push(new c(t,e,s,n))}_parseBindingAst(t,e,s,n){const r=this._parseQuote(t,e,s);if(null!=r)return r;this._checkNoInterpolation(t,e,n);const i=this._stripComments(t),a=this._lexer.tokenize(i);return new ut(t,e,s,a,i.length,!1,this.errors,t.length-i.length).parseChain()}_parseQuote(t,e,s){if(null==t)return null;const n=t.indexOf(":");if(-1==n)return null;const r=t.substring(0,n).trim();if(!X(r))return null;const i=t.substring(n+1),a=new h(0,t.length);return new l(a,a.toAbsolute(s),r,i,e)}parseTemplateBindings(t,e,s,n,r){const i=this._lexer.tokenize(e);return new ut(e,s,r,i,e.length,!1,this.errors,0).parseTemplateBindings({source:t,span:new M(n,n+t.length)})}parseInterpolation(t,e,s,n=nt){const r=this.splitInterpolation(t,e,n);if(null==r)return null;const i=[];for(let n=0;n<r.expressions.length;++n){const a=r.expressions[n],o=this._stripComments(a),c=this._lexer.tokenize(o),h=new ut(t,e,s,c,o.length,!1,this.errors,r.offsets[n]+(a.length-o.length)).parseChain();i.push(h)}const a=new h(0,null==t?0:t.length);return new T(new O(a,a.toAbsolute(s),r.strings,i),t,e,s,this.errors)}splitInterpolation(t,e,s=nt){const n=[],r=[],i=[],a=[],o=[];let c=0,h=!1,p=!1,{start:u,end:l}=s;for(;c<t.length;)if(h){const s=c,n=s+u.length,a=t.indexOf(l,n);if(-1===a){h=!1,p=!0;break}const d=a+l.length,f=t.substring(n,a);f.trim().length>0?r.push(f):(this._reportError("Blank expressions are not allowed in interpolated strings",t,"at column ".concat(c," in"),e),r.push("$implicit")),i.push(n),o.push({start:s,end:d}),c=d,h=!1}else{const e=c;c=t.indexOf(u,c),-1===c&&(c=t.length);const s=t.substring(e,c);n.push(s),a.push({start:e,end:c}),h=!0}return h||(p?(n[n.length-1]+=t.substring(c),a[a.length-1].end=t.length):(n.push(t.substring(c)),a.push({start:c,end:t.length}))),0===r.length?null:new it(n,a,r,o,i)}wrapLiteralPrimitive(t,e,s){const n=new h(0,null==t?0:t.length);return new T(new P(n,n.toAbsolute(s),t),t,e,s,this.errors)}_stripComments(t){const e=this._commentStart(t);return null!=e?t.substring(0,e).trim():t}_commentStart(t){let e=null;for(let s=0;s<t.length-1;s++){const n=t.charCodeAt(s),r=t.charCodeAt(s+1);if(47===n&&47==r&&null==e)return s;e===n?e=null:null==e&&Y(n)&&(e=n)}return null}_checkNoInterpolation(t,e,s){const n=(r=s)===nt?ot:ct(r);var r;const i=t.split(n);i.length>1&&this._reportError("Got interpolation (".concat(s.start).concat(s.end,") where expression was expected"),t,"at column ".concat(this._findInterpolationErrorColumn(i,1,s)," in"),e)}_findInterpolationErrorColumn(t,e,s){let n="";for(let r=0;r<e;r++)n+=r%2==0?t[r]:"".concat(s.start).concat(t[r]).concat(s.end);return n.length}}var pt;!function(t){t[t.None=0]="None",t[t.Writable=1]="Writable"}(pt||(pt={}));class ut{constructor(t,e,s,n,r,i,a,o){this.input=t,this.location=e,this.absoluteOffset=s,this.tokens=n,this.inputLength=r,this.parseAction=i,this.errors=a,this.offset=o,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=pt.None,this.sourceSpanCache=new Map,this.index=0}peek(t){const e=this.index+t;return e<this.tokens.length?this.tokens[e]:z}get next(){return this.peek(0)}get atEOF(){return this.index>=this.tokens.length}get inputIndex(){return this.atEOF?this.currentEndIndex:this.next.index+this.offset}get currentEndIndex(){if(this.index>0){return this.peek(-1).end+this.offset}return 0===this.tokens.length?this.inputLength+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(t){return new h(t,this.currentEndIndex)}sourceSpan(t){const e="".concat(t,"@").concat(this.inputIndex);return this.sourceSpanCache.has(e)||this.sourceSpanCache.set(e,this.span(t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(e)}advance(){this.index++}withContext(t,e){this.context|=t;const s=e();return this.context^=t,s}consumeOptionalCharacter(t){return!!this.next.isCharacter(t)&&(this.advance(),!0)}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(t){this.consumeOptionalCharacter(t)||this.error("Missing expected ".concat(String.fromCharCode(t)))}consumeOptionalOperator(t){return!!this.next.isOperator(t)&&(this.advance(),!0)}expectOperator(t){this.consumeOptionalOperator(t)||this.error("Missing expected operator ".concat(t))}prettyPrintToken(t){return t===z?"end of input":"token ".concat(t)}expectIdentifierOrKeyword(){const t=this.next;return t.isIdentifier()||t.isKeyword()?(this.advance(),t.toString()):(this.error("Unexpected ".concat(this.prettyPrintToken(t),", expected identifier or keyword")),"")}expectIdentifierOrKeywordOrString(){const t=this.next;return t.isIdentifier()||t.isKeyword()||t.isString()?(this.advance(),t.toString()):(this.error("Unexpected ".concat(this.prettyPrintToken(t),", expected identifier, keyword, or string")),"")}parseChain(){const t=[],e=this.inputIndex;for(;this.index<this.tokens.length;){const e=this.parsePipe();if(t.push(e),this.consumeOptionalCharacter(59))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(59););else this.index<this.tokens.length&&this.error("Unexpected token '".concat(this.next,"'"))}return 0==t.length?new d(this.span(e),this.sourceSpan(e)):1==t.length?t[0]:new v(this.span(e),this.sourceSpan(e),t)}parsePipe(){let t=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{const e=this.inputIndex,s=this.expectIdentifierOrKeyword(),n=this.sourceSpan(e),r=[];for(;this.consumeOptionalCharacter(58);)r.push(this.parseExpression());const{start:i}=t.span;t=new C(this.span(i),this.sourceSpan(i),t,s,r,n)}while(this.consumeOptionalOperator("|"))}return t}parseExpression(){return this.parseConditional()}parseConditional(){const t=this.inputIndex,e=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){const s=this.parsePipe();let n;if(this.consumeOptionalCharacter(58))n=this.parsePipe();else{const e=this.inputIndex,s=this.input.substring(t,e);this.error("Conditional expression ".concat(s," requires all 3 expressions")),n=new d(this.span(t),this.sourceSpan(t))}return new x(this.span(t),this.sourceSpan(t),e,s,n)}return e}parseLogicalOr(){let t=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){const e=this.parseLogicalAnd(),{start:s}=t.span;t=new b(this.span(s),this.sourceSpan(s),"||",t,e)}return t}parseLogicalAnd(){let t=this.parseEquality();for(;this.consumeOptionalOperator("&&");){const e=this.parseEquality(),{start:s}=t.span;t=new b(this.span(s),this.sourceSpan(s),"&&",t,e)}return t}parseEquality(){let t=this.parseRelational();for(;this.next.type==U.Operator;){const e=this.next.strValue;switch(e){case"==":case"===":case"!=":case"!==":this.advance();const s=this.parseRelational(),{start:n}=t.span;t=new b(this.span(n),this.sourceSpan(n),e,t,s);continue}break}return t}parseRelational(){let t=this.parseAdditive();for(;this.next.type==U.Operator;){const e=this.next.strValue;switch(e){case"<":case">":case"<=":case">=":this.advance();const s=this.parseAdditive(),{start:n}=t.span;t=new b(this.span(n),this.sourceSpan(n),e,t,s);continue}break}return t}parseAdditive(){let t=this.parseMultiplicative();for(;this.next.type==U.Operator;){const e=this.next.strValue;switch(e){case"+":case"-":this.advance();let s=this.parseMultiplicative();const{start:n}=t.span;t=new b(this.span(n),this.sourceSpan(n),e,t,s);continue}break}return t}parseMultiplicative(){let t=this.parsePrefix();for(;this.next.type==U.Operator;){const e=this.next.strValue;switch(e){case"*":case"%":case"/":this.advance();let s=this.parsePrefix();const{start:n}=t.span;t=new b(this.span(n),this.sourceSpan(n),e,t,s);continue}break}return t}parsePrefix(){if(this.next.type==U.Operator){const t=this.inputIndex;let e;switch(this.next.strValue){case"+":return this.advance(),e=this.parsePrefix(),k.createPlus(this.span(t),this.sourceSpan(t),e);case"-":return this.advance(),e=this.parsePrefix(),k.createMinus(this.span(t),this.sourceSpan(t),e);case"!":return this.advance(),e=this.parsePrefix(),new N(this.span(t),this.sourceSpan(t),e)}}return this.parseCallChain()}parseCallChain(){let t=this.parsePrimary();const e=t.span.start;for(;;)if(this.consumeOptionalCharacter(46))t=this.parseAccessMemberOrMethodCall(t,!1);else if(this.consumeOptionalOperator("?."))t=this.parseAccessMemberOrMethodCall(t,!0);else if(this.consumeOptionalCharacter(91))this.withContext(pt.Writable,(()=>{this.rbracketsExpected++;const s=this.parsePipe();if(s instanceof d&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("=")){const n=this.parseConditional();t=new w(this.span(e),this.sourceSpan(e),t,s,n)}else t=new S(this.span(e),this.sourceSpan(e),t,s)}));else if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const s=this.parseCallArguments();this.rparensExpected--,this.expectCharacter(41),t=new K(this.span(e),this.sourceSpan(e),t,s)}else{if(!this.consumeOptionalOperator("!"))return t;t=new I(this.span(e),this.sourceSpan(e),t)}}parsePrimary(){const t=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),t}if(this.next.isKeywordNull())return this.advance(),new P(this.span(t),this.sourceSpan(t),null);if(this.next.isKeywordUndefined())return this.advance(),new P(this.span(t),this.sourceSpan(t),void 0);if(this.next.isKeywordTrue())return this.advance(),new P(this.span(t),this.sourceSpan(t),!0);if(this.next.isKeywordFalse())return this.advance(),new P(this.span(t),this.sourceSpan(t),!1);if(this.next.isKeywordThis())return this.advance(),new f(this.span(t),this.sourceSpan(t));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;const e=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new E(this.span(t),this.sourceSpan(t),e)}if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(new f(this.span(t),this.sourceSpan(t)),!1);if(this.next.isNumber()){const e=this.next.toNumber();return this.advance(),new P(this.span(t),this.sourceSpan(t),e)}if(this.next.isString()){const e=this.next.toString();return this.advance(),new P(this.span(t),this.sourceSpan(t),e)}return this.index>=this.tokens.length?(this.error("Unexpected end of expression: ".concat(this.input)),new d(this.span(t),this.sourceSpan(t))):(this.error("Unexpected token ".concat(this.next)),new d(this.span(t),this.sourceSpan(t)))}parseExpressionList(t){const e=[];if(!this.next.isCharacter(t))do{e.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return e}parseLiteralMap(){const t=[],e=[],s=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{const s=this.next.isString(),n=this.expectIdentifierOrKeywordOrString();t.push({key:n,quoted:s}),this.expectCharacter(58),e.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));this.rbracesExpected--,this.expectCharacter(125)}return new A(this.span(s),this.sourceSpan(s),t,e)}parseAccessMemberOrMethodCall(t,e=!1){const s=t.span.start,n=this.inputIndex,r=this.expectIdentifierOrKeyword(),i=this.sourceSpan(n);if(this.consumeOptionalCharacter(40)){this.rparensExpected++;const n=this.parseCallArguments();this.expectCharacter(41),this.rparensExpected--;const a=this.span(s),o=this.sourceSpan(s);return e?new L(a,o,i,t,r,n):new _(a,o,i,t,r,n)}if(e)return this.consumeOptionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),new d(this.span(s),this.sourceSpan(s))):new y(this.span(s),this.sourceSpan(s),i,t,r);if(this.consumeOptionalOperator("=")){if(!this.parseAction)return this.error("Bindings cannot contain assignments"),new d(this.span(s),this.sourceSpan(s));const e=this.parseConditional();return new m(this.span(s),this.sourceSpan(s),i,t,r,e)}return new g(this.span(s),this.sourceSpan(s),i,t,r)}parseCallArguments(){if(this.next.isCharacter(41))return[];const t=[];do{t.push(this.parsePipe())}while(this.consumeOptionalCharacter(44));return t}expectTemplateBindingKey(){let t="",e=!1;const s=this.currentAbsoluteOffset;do{t+=this.expectIdentifierOrKeywordOrString(),e=this.consumeOptionalOperator("-"),e&&(t+="-")}while(e);return{source:t,span:new M(s,s+t.length)}}parseTemplateBindings(t){const e=[];for(e.push(...this.parseDirectiveKeywordBindings(t));this.index<this.tokens.length;){const s=this.parseLetBinding();if(s)e.push(s);else{const s=this.expectTemplateBindingKey(),n=this.parseAsBinding(s);n?e.push(n):(s.source=t.source+s.source[0].toUpperCase()+s.source.substring(1),e.push(...this.parseDirectiveKeywordBindings(s)))}this.consumeStatementTerminator()}return new at(e,[],this.errors)}parseDirectiveKeywordBindings(t){const e=[];this.consumeOptionalCharacter(58);const s=this.getDirectiveBoundTarget();let n=this.currentAbsoluteOffset;const r=this.parseAsBinding(t);r||(this.consumeStatementTerminator(),n=this.currentAbsoluteOffset);const i=new M(t.span.start,n);return e.push(new R(i,t,s)),r&&e.push(r),e}getDirectiveBoundTarget(){if(this.next===z||this.peekKeywordAs()||this.peekKeywordLet())return null;const t=this.parsePipe(),{start:e,end:s}=t.span,n=this.input.substring(e,s);return new T(t,n,this.location,this.absoluteOffset+e,this.errors)}parseAsBinding(t){if(!this.peekKeywordAs())return null;this.advance();const e=this.expectTemplateBindingKey();this.consumeStatementTerminator();const s=new M(t.span.start,this.currentAbsoluteOffset);return new B(s,e,t)}parseLetBinding(){if(!this.peekKeywordLet())return null;const t=this.currentAbsoluteOffset;this.advance();const e=this.expectTemplateBindingKey();let s=null;this.consumeOptionalOperator("=")&&(s=this.expectTemplateBindingKey()),this.consumeStatementTerminator();const n=new M(t,this.currentAbsoluteOffset);return new B(n,e,s)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(t,e=null){this.errors.push(new c(t,this.input,this.locationText(e),this.location)),this.skip()}locationText(t=null){return null==t&&(t=this.index),t<this.tokens.length?"at column ".concat(this.tokens[t].index+1," in"):"at the end of the expression"}skip(){let t=this.next;for(;!(!(this.index<this.tokens.length)||t.isCharacter(59)||!(this.rparensExpected<=0)&&t.isCharacter(41)||!(this.rbracesExpected<=0)&&t.isCharacter(125)||!(this.rbracketsExpected<=0)&&t.isCharacter(93)||this.context&pt.Writable&&t.isOperator("="));)this.next.isError()&&this.errors.push(new c(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),t=this.next}}class lt{constructor(){this.errors=[]}visitImplicitReceiver(t,e){}visitInterpolation(t,e){}visitLiteralPrimitive(t,e){}visitPropertyRead(t,e){}visitPropertyWrite(t,e){}visitSafePropertyRead(t,e){}visitMethodCall(t,e){}visitSafeMethodCall(t,e){}visitFunctionCall(t,e){}visitLiteralArray(t,e){this.visitAll(t.expressions,e)}visitLiteralMap(t,e){this.visitAll(t.values,e)}visitUnary(t,e){}visitBinary(t,e){}visitPrefixNot(t,e){}visitNonNullAssert(t,e){}visitConditional(t,e){}visitPipe(t,e){this.errors.push("pipes")}visitKeyedRead(t,e){}visitKeyedWrite(t,e){}visitAll(t,e){return t.map((t=>t.visit(this,e)))}visitChain(t,e){}visitQuote(t,e){}}class dt extends j{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}var ft=Object.freeze({__proto__:null,SplitInterpolation:it,TemplateBindingParseResult:at,Parser:ht,IvyParser:class extends ht{constructor(){super(...arguments),this.simpleExpressionChecker=dt}},_ParseAST:ut}),vt=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});const s="angular-estree-parser";e.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX="NgEstreeParser";const n=[s,0];function r(){return new ft.Parser(new tt.Lexer)}function i(t,e){const s=r(),{astInput:n,comments:i}=c(t,s),{ast:a,errors:h}=e(n,s);return o(h),{ast:a,comments:i}}function a(t,e){if(t&&"object"==typeof t){if(Array.isArray(t))return t.forEach((t=>a(t,e)));for(const s of Object.keys(t)){const n=t[s];"span"===s?e(n):a(n,e)}}}function o(t){if(0!==t.length){const[{message:e}]=t;throw new SyntaxError(e.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function c(t,e){const s=e._commentStart(t);return null===s?{astInput:t,comments:[]}:{astInput:t.slice(0,s),comments:[{type:"Comment",value:t.slice(s+"//".length),span:{start:s,end:t.length}}]}}function h({start:t,end:e},s){let n=t,r=e;for(;r!==n&&/\s/.test(s[r-1]);)r--;for(;n!==r&&/\s/.test(s[n]);)n++;return{start:n,end:r}}function p({start:t,end:e},s){let n=t,r=e;for(;r!==s.length&&/\s/.test(s[r]);)r++;for(;0!==n&&/\s/.test(s[n-1]);)n--;return{start:n,end:r}}function u(t,e){return"("===e[t.start-1]&&")"===e[t.end]?{start:t.start-1,end:t.end+1}:t}e.parseNgBinding=function(t){return i(t,((t,e)=>e.parseBinding(t,...n)))},e.parseNgSimpleBinding=function(t){return i(t,((t,e)=>e.parseSimpleBinding(t,...n)))},e.parseNgAction=function(t){return i(t,((t,e)=>e.parseAction(t,...n)))},e.parseNgTemplateBindings=function(t){const n=r(),{templateBindings:i,errors:a}=n.parseTemplateBindings(e.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX,t,s,0,0);return o(a),i},e.parseNgInterpolation=function(t){const e=r(),{astInput:s,comments:i}=c(t,e),h="{{",{ast:p,errors:u}=e.parseInterpolation(h+s+"}}",...n);o(u);const l=p.expressions[0],d=new Set;return a(l,(t=>{d.has(t)||(t.start-=h.length,t.end-=h.length,d.add(t))})),{ast:l,comments:i}},e.getNgType=function(t){return F.Unary&&t instanceof F.Unary?"Unary":t instanceof F.Binary?"Binary":t instanceof F.BindingPipe?"BindingPipe":t instanceof F.Chain?"Chain":t instanceof F.Conditional?"Conditional":t instanceof F.EmptyExpr?"EmptyExpr":t instanceof F.FunctionCall?"FunctionCall":t instanceof F.ImplicitReceiver?"ImplicitReceiver":t instanceof F.KeyedRead?"KeyedRead":t instanceof F.KeyedWrite?"KeyedWrite":t instanceof F.LiteralArray?"LiteralArray":t instanceof F.LiteralMap?"LiteralMap":t instanceof F.LiteralPrimitive?"LiteralPrimitive":t instanceof F.MethodCall?"MethodCall":t instanceof F.NonNullAssert?"NonNullAssert":t instanceof F.PrefixNot?"PrefixNot":t instanceof F.PropertyRead?"PropertyRead":t instanceof F.PropertyWrite?"PropertyWrite":t instanceof F.Quote?"Quote":t instanceof F.SafeMethodCall?"SafeMethodCall":t instanceof F.SafePropertyRead?"SafePropertyRead":t.type},e.fitSpans=function(t,e,s){let n=0;const r={start:t.start,end:t.end};for(;;){const t=p(r,e),s=u(t,e);if(t.start===s.start&&t.end===s.end)break;r.start=s.start,r.end=s.end,n++}return{hasParens:0!==(s?n-1:n),outerSpan:h(s?{start:r.start+1,end:r.end-1}:r,e),innerSpan:h(t,e)}},e.findFrontChar=function(t,e,s){let n=e;for(;!t.test(s[n]);)if(--n<0)throw new Error("Cannot find front char ".concat(t," from index ").concat(e," in ").concat(JSON.stringify(s)));return n},e.findBackChar=function(t,e,s){let n=e;for(;!t.test(s[n]);)if(++n>=s.length)throw new Error("Cannot find back char ".concat(t," from index ").concat(e," in ").concat(JSON.stringify(s)));return n},e.toLowerCamelCase=function(t){return t.slice(0,1).toLowerCase()+t.slice(1)},e.getLast=function(t){return 0===t.length?void 0:t[t.length-1]}})),xt=r((function(t,e){function s(t,e,s=!1,n=!1){if(!s){const{start:s,end:n}=t;return{start:s,end:n,loc:{start:e.locator.locationForIndex(s),end:e.locator.locationForIndex(n)}}}const{outerSpan:r,innerSpan:i,hasParens:a}=vt.fitSpans(t,e.text,n);return Object.assign({start:i.start,end:i.end,loc:{start:e.locator.locationForIndex(i.start),end:e.locator.locationForIndex(i.end)}},a&&{extra:{parenthesized:!0,parenStart:r.start,parenEnd:r.end}})}Object.defineProperty(e,"__esModule",{value:!0}),e.transform=(t,n,r=!1)=>{const i=vt.getNgType(t);switch(i){case"Unary":{const{operator:e,expr:s}=t;return c("UnaryExpression",{prefix:!0,argument:a(s),operator:e},t.span,{hasParentParens:r})}case"Binary":{const{left:e,operation:s,right:n}=t,i=n.span.start===n.span.end,o=e.span.start===e.span.end;if(i||o){const s=e.span.start===e.span.end?a(n):a(e);return c("UnaryExpression",{prefix:!0,argument:s,operator:i?"+":"-"},{start:t.span.start,end:x(s)},{hasParentParens:r})}const h=a(e),p=a(n);return c("&&"===s||"||"===s?"LogicalExpression":"BinaryExpression",{left:h,right:p,operator:s},{start:v(h),end:x(p)},{hasParentParens:r})}case"BindingPipe":{const{exp:e,name:s,args:n}=t,i=a(e),o=u(/\S/,u(/\|/,x(i))+1),h=c("Identifier",{name:s},{start:o,end:o+s.length}),p=n.map(a);return c("NGPipeExpression",{left:i,right:h,arguments:p},{start:v(i),end:x(0===p.length?h:vt.getLast(p))},{hasParentParens:r})}case"Chain":{const{expressions:e}=t;return c("NGChainedExpression",{expressions:e.map(a)},t.span,{hasParentParens:r})}case"Comment":{const{value:e}=t;return c("CommentLine",{value:e},t.span,{processSpan:!1})}case"Conditional":{const{condition:e,trueExp:s,falseExp:n}=t,i=a(e),o=a(s),h=a(n);return c("ConditionalExpression",{test:i,consequent:o,alternate:h},{start:v(i),end:x(h)},{hasParentParens:r})}case"EmptyExpr":return c("NGEmptyExpression",{},t.span,{hasParentParens:r});case"FunctionCall":{const{target:e,args:s}=t,n=1===s.length?[o(s[0])]:s.map(a),i=a(e);return c("CallExpression",{callee:i,arguments:n},{start:v(i),end:t.span.end},{hasParentParens:r})}case"ImplicitReceiver":return c("ThisExpression",{},t.span,{hasParentParens:r});case"KeyedRead":{const{obj:e,key:s}=t;return h(e,a(s),{computed:!0,optional:!1},{end:t.span.end,hasParentParens:r})}case"LiteralArray":{const{expressions:e}=t;return c("ArrayExpression",{elements:e.map(a)},t.span,{hasParentParens:r})}case"LiteralMap":{const{keys:e,values:s}=t,n=s.map((t=>a(t))),i=e.map((({key:e,quoted:s},r)=>{const i=n[r],a={start:u(/\S/,0===r?t.span.start+1:u(/,/,x(n[r-1]))+1),end:p(/\S/,p(/:/,v(i)-1)-1)+1},o=s?c("StringLiteral",{value:e},a):c("Identifier",{name:e},a);return c("ObjectProperty",{key:o,value:i,method:!1,shorthand:!1,computed:!1},{start:v(o),end:x(i)})}));return c("ObjectExpression",{properties:i},t.span,{hasParentParens:r})}case"LiteralPrimitive":{const{value:e}=t;switch(typeof e){case"boolean":return c("BooleanLiteral",{value:e},t.span,{hasParentParens:r});case"number":return c("NumericLiteral",{value:e},t.span,{hasParentParens:r});case"object":return c("NullLiteral",{},t.span,{hasParentParens:r});case"string":return c("StringLiteral",{value:e},t.span,{hasParentParens:r});case"undefined":return c("Identifier",{name:"undefined"},t.span,{hasParentParens:r});default:throw new Error("Unexpected LiteralPrimitive value type ".concat(typeof e))}}case"MethodCall":case"SafeMethodCall":{const e="SafeMethodCall"===i,{receiver:s,name:n,args:u}=t,l=1===u.length?[o(u[0])]:u.map(a),f=p(/\S/,p(/\(/,(0===l.length?p(/\)/,t.span.end-1):v(l[0]))-1)-1)+1,x=h(s,c("Identifier",{name:n},{start:f-n.length,end:f}),{computed:!1,optional:e}),g=d(x);return c(e||g?"OptionalCallExpression":"CallExpression",{callee:x,arguments:l},{start:v(x),end:t.span.end},{hasParentParens:r})}case"NonNullAssert":{const{expression:e}=t,s=a(e);return c("TSNonNullExpression",{expression:s},{start:v(s),end:t.span.end},{hasParentParens:r})}case"PrefixNot":{const{expression:e}=t,s=a(e);return c("UnaryExpression",{prefix:!0,operator:"!",argument:s},{start:t.span.start,end:x(s)},{hasParentParens:r})}case"PropertyRead":case"SafePropertyRead":{const e="SafePropertyRead"===i,{receiver:s,name:n}=t,a=p(/\S/,t.span.end-1)+1;return h(s,c("Identifier",{name:n},{start:a-n.length,end:a},l(s)?{hasParentParens:r}:{}),{computed:!1,optional:e},{hasParentParens:r})}case"KeyedWrite":{const{obj:e,key:s,value:n}=t,i=a(s),o=a(n),p=h(e,i,{computed:!0,optional:!1},{end:u(/\]/,x(i))+1});return c("AssignmentExpression",{left:p,operator:"=",right:o},{start:v(p),end:x(o)},{hasParentParens:r})}case"PropertyWrite":{const{receiver:e,name:s,value:n}=t,i=a(n),o=p(/\S/,p(/=/,v(i)-1)-1)+1,u=h(e,c("Identifier",{name:s},{start:o-s.length,end:o}),{computed:!1,optional:!1});return c("AssignmentExpression",{left:u,operator:"=",right:i},{start:v(u),end:x(i)},{hasParentParens:r})}case"Quote":{const{prefix:e,uninterpretedExpression:s}=t;return c("NGQuotedExpression",{prefix:e,value:s},t.span,{hasParentParens:r})}default:throw new Error("Unexpected node ".concat(i))}function a(t){return e.transform(t,n)}function o(t){return e.transform(t,n,!0)}function c(t,e,r,{processSpan:i=!0,hasParentParens:a=!1}={}){const o=Object.assign(Object.assign({type:t},s(r,n,i,a)),e);switch(t){case"Identifier":{const t=o;t.loc.identifierName=t.name;break}case"NumericLiteral":{const t=o;t.extra=Object.assign(Object.assign({},t.extra),{raw:n.text.slice(t.start,t.end),rawValue:t.value});break}case"StringLiteral":{const t=o;t.extra=Object.assign(Object.assign({},t.extra),{raw:n.text.slice(t.start,t.end),rawValue:t.value});break}}return o}function h(t,e,s,{end:n=x(e),hasParentParens:r=!1}={}){if(l(t))return e;const i=a(t),o=d(i);return c(s.optional||o?"OptionalMemberExpression":"MemberExpression",Object.assign({object:i,property:e,computed:s.computed},s.optional?{optional:!0}:o?{optional:!1}:null),{start:v(i),end:n},{hasParentParens:r})}function p(t,e){return vt.findFrontChar(t,e,n.text)}function u(t,e){return vt.findBackChar(t,e,n.text)}function l(t){return t.span.start>=t.span.end}function d(t){return("OptionalCallExpression"===t.type||"OptionalMemberExpression"===t.type)&&!f(t)}function f(t){return t.extra&&t.extra.parenthesized}function v(t){return f(t)?t.extra.parenStart:t.start}function x(t){return f(t)?t.extra.parenEnd:t.end}},e.transformSpan=s})),gt=r((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.transformTemplateBindings=function(t,e){t.forEach((function(t){d(t.key.span),l(t)&&t.value&&d(t.value.span)}));const[s]=t,{key:n}=s,r=0===e.text.slice(s.sourceSpan.start,s.sourceSpan.end).trim().length?t.slice(1):t,i=[];let a=null;for(let t=0;t<r.length;t++){const s=r[t];if(a&&u(a)&&l(s)&&s.value&&s.value.source===a.key.source){const t=h("NGMicrosyntaxKey",{name:s.key.source},s.key.span),n=(t,s)=>Object.assign(Object.assign({},t),xt.transformSpan({start:t.start,end:s},e)),r=e=>Object.assign(Object.assign({},n(e,t.end)),{alias:t}),a=i.pop();if("NGMicrosyntaxExpression"===a.type)i.push(r(a));else{if("NGMicrosyntaxKeyedExpression"!==a.type)throw new Error("Unexpected type ".concat(a.type));{const t=r(a.expression);i.push(n(Object.assign(Object.assign({},a),{expression:t}),t.end))}}}else i.push(o(s,t));a=s}return h("NGMicrosyntax",{body:i},0===i.length?t[0].sourceSpan:{start:i[0].start,end:i[i.length-1].end});function o(t,s){if(u(t)){const{key:e,value:n}=t;return n?0===s?h("NGMicrosyntaxExpression",{expression:c(n.ast),alias:null},n.sourceSpan):h("NGMicrosyntaxKeyedExpression",{key:h("NGMicrosyntaxKey",{name:p(e.source)},e.span),expression:h("NGMicrosyntaxExpression",{expression:c(n.ast),alias:null},n.sourceSpan)},{start:e.span.start,end:n.sourceSpan.end}):h("NGMicrosyntaxKey",{name:p(e.source)},e.span)}{const{key:s,sourceSpan:n}=t;if(/^let\s$/.test(e.text.slice(n.start,n.start+4))){const{value:e}=t;return h("NGMicrosyntaxLet",{key:h("NGMicrosyntaxKey",{name:s.source},s.span),value:e?h("NGMicrosyntaxKey",{name:e.source},e.span):null},{start:n.start,end:e?e.span.end:s.span.end})}{const n=function(t){if(!t.value||t.value.source!==vt.NG_PARSE_TEMPLATE_BINDINGS_FAKE_PREFIX)return t.value;const s=vt.findBackChar(/\S/,t.sourceSpan.start,e.text);return{source:"$implicit",span:{start:s,end:s}}}(t);return h("NGMicrosyntaxAs",{key:h("NGMicrosyntaxKey",{name:n.source},n.span),alias:h("NGMicrosyntaxKey",{name:s.source},s.span)},{start:n.span.start,end:s.span.end})}}}function c(t){return xt.transform(t,e)}function h(t,s,n,r=!0){return Object.assign(Object.assign({type:t},xt.transformSpan(n,e,r)),s)}function p(t){return vt.toLowerCamelCase(t.slice(n.source.length))}function u(t){return t instanceof F.ExpressionBinding}function l(t){return t instanceof F.VariableBinding}function d(t){if('"'!==e.text[t.start]&&"'"!==e.text[t.start])return;const s=e.text[t.start];let n=!1;for(let r=t.start+1;r<e.text.length;r++)switch(e.text[r]){case s:if(!n)return void(t.end=r+1);default:n=!1;break;case"\\":n=!n}}}})),mt=r((function(t,e){function s(t,e){const{ast:s,comments:n}=e(t),r=new o.Context(t),i=t=>xt.transform(t,r),a=i(s);return a.comments=n.map(i),a}Object.defineProperty(e,"__esModule",{value:!0}),e.parseBinding=function(t){return s(t,vt.parseNgBinding)},e.parseSimpleBinding=function(t){return s(t,vt.parseNgSimpleBinding)},e.parseInterpolation=function(t){return s(t,vt.parseNgInterpolation)},e.parseAction=function(t){return s(t,vt.parseNgAction)},e.parseTemplateBindings=function(t){return gt.transformTemplateBindings(vt.parseNgTemplateBindings(t),new o.Context(t))}}));const{locStart:yt,locEnd:St}=n;function wt(t){return{astFormat:"estree",parse:(e,s,n)=>{const r=t(e,mt);return{type:"NGRoot",node:"__ng_action"===n.parser&&"NGChainedExpression"!==r.type?Object.assign({},r,{type:"NGChainedExpression",expressions:[r]}):r}},locStart:yt,locEnd:St}}var Ct={parsers:{__ng_action:wt(((t,e)=>e.parseAction(t))),__ng_binding:wt(((t,e)=>e.parseBinding(t))),__ng_interpolation:wt(((t,e)=>e.parseInterpolation(t))),__ng_directive:wt(((t,e)=>e.parseTemplateBindings(t)))}};export default Ct;