prettier
Advanced tools
Comparing version 3.0.0-alpha.10 to 3.0.0-alpha.11
@@ -452,5 +452,3 @@ // Copied from `@types/prettier` | ||
languages?: SupportLanguage[] | undefined; | ||
parsers?: | ||
| { [parserName: string]: Parser<T> | (() => Promise<Parser<T>>) } | ||
| undefined; | ||
parsers?: { [parserName: string]: Parser<T> } | undefined; | ||
printers?: { [astFormat: string]: Printer<T> } | undefined; | ||
@@ -457,0 +455,0 @@ options?: SupportOptions | undefined; |
{ | ||
"name": "prettier", | ||
"version": "3.0.0-alpha.10", | ||
"version": "3.0.0-alpha.11", | ||
"description": "Prettier is an opinionated code formatter", | ||
@@ -5,0 +5,0 @@ "bin": "./bin/prettier.cjs", |
@@ -6,4 +6,4 @@ import { Parser } from "../index.js"; | ||
__ng_binding: Parser; | ||
__ng_directive: Parser; | ||
__ng_interpolation: Parser; | ||
__ng_directive: Parser; | ||
}; |
@@ -1,2 +0,2 @@ | ||
(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.angular=e()}})(function(){"use strict";var _e=Object.defineProperty;var er=Object.getOwnPropertyDescriptor;var tr=Object.getOwnPropertyNames;var rr=Object.prototype.hasOwnProperty;var E=(s,e)=>()=>(s&&(e=s(s=0)),e);var st=(s,e)=>{for(var t in e)_e(s,t,{get:e[t],enumerable:!0})},sr=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of tr(e))!rr.call(s,n)&&n!==t&&_e(s,n,{get:()=>e[n],enumerable:!(r=er(e,n))||r.enumerable});return s};var nr=s=>sr(_e({},"__esModule",{value:!0}),s);var we,it,at,ot=E(()=>{we=` | ||
`,it="\r",at=function(){function s(e){this.length=e.length;for(var t=[0],r=0;r<e.length;)switch(e[r]){case we:r+=we.length,t.push(r);break;case it:r+=it.length,e[r]===we&&(r+=we.length),t.push(r);break;default:r++;break}this.offsets=t}return s.prototype.locationForIndex=function(e){if(e<0||e>this.length)return null;for(var t=0,r=this.offsets;r[t+1]<=e;)t++;var n=e-r[t];return{line:t,column:n}},s.prototype.indexForLocation=function(e){var t=e.line,r=e.column;return t<0||t>=this.offsets.length||r<0||r>this.lengthOfLine(t)?null:this.offsets[t]+r},s.prototype.lengthOfLine=function(e){var t=this.offsets[e],r=e===this.offsets.length-1?this.length:this.offsets[e+1];return r-t},s}()});var xe,Be,ct=E(()=>{ot();xe=class{text;locator;constructor(e){this.text=e,this.locator=new Be(this.text)}},Be=class{_linesAndColumns;constructor(e){this._linesAndColumns=new at(e)}locationForIndex(e){let{line:t,column:r}=this._linesAndColumns.locationForIndex(e);return{line:t+1,column:r,index:e}}}});var D,b,S,V,A,_,ye,W,Q,K,j,H,z,q,X,Z,$,J,Y,Ee,C,P,ee,te,re,se,R,L,T,ne,Ae,ht,Ke=E(()=>{D=class{constructor(e,t,r,n){this.input=t,this.errLocation=r,this.ctxLocation=n,this.message=`Parser Error: ${e} ${r} [${t}] in ${n}`}},b=class{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new R(e+this.start,e+this.end)}},S=class{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},V=class extends S{constructor(e,t,r){super(e,t),this.nameSpan=r}},A=class extends S{visit(e,t=null){}},_=class extends S{visit(e,t=null){return e.visitImplicitReceiver(this,t)}},ye=class extends _{visit(e,t=null){var r;return(r=e.visitThisReceiver)==null?void 0:r.call(e,this,t)}},W=class extends S{constructor(e,t,r){super(e,t),this.expressions=r}visit(e,t=null){return e.visitChain(this,t)}},Q=class extends S{constructor(e,t,r,n,i){super(e,t),this.condition=r,this.trueExp=n,this.falseExp=i}visit(e,t=null){return e.visitConditional(this,t)}},K=class extends V{constructor(e,t,r,n,i){super(e,t,r),this.receiver=n,this.name=i}visit(e,t=null){return e.visitPropertyRead(this,t)}},j=class extends V{constructor(e,t,r,n,i,a){super(e,t,r),this.receiver=n,this.name=i,this.value=a}visit(e,t=null){return e.visitPropertyWrite(this,t)}},H=class extends V{constructor(e,t,r,n,i){super(e,t,r),this.receiver=n,this.name=i}visit(e,t=null){return e.visitSafePropertyRead(this,t)}},z=class extends S{constructor(e,t,r,n){super(e,t),this.receiver=r,this.key=n}visit(e,t=null){return e.visitKeyedRead(this,t)}},q=class extends S{constructor(e,t,r,n){super(e,t),this.receiver=r,this.key=n}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}},X=class extends S{constructor(e,t,r,n,i){super(e,t),this.receiver=r,this.key=n,this.value=i}visit(e,t=null){return e.visitKeyedWrite(this,t)}},Z=class extends V{constructor(e,t,r,n,i,a){super(e,t,a),this.exp=r,this.name=n,this.args=i}visit(e,t=null){return e.visitPipe(this,t)}},$=class extends S{constructor(e,t,r){super(e,t),this.value=r}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}},J=class extends S{constructor(e,t,r){super(e,t),this.expressions=r}visit(e,t=null){return e.visitLiteralArray(this,t)}},Y=class extends S{constructor(e,t,r,n){super(e,t),this.keys=r,this.values=n}visit(e,t=null){return e.visitLiteralMap(this,t)}},Ee=class extends S{constructor(e,t,r,n){super(e,t),this.strings=r,this.expressions=n}visit(e,t=null){return e.visitInterpolation(this,t)}},C=class extends S{constructor(e,t,r,n,i){super(e,t),this.operation=r,this.left=n,this.right=i}visit(e,t=null){return e.visitBinary(this,t)}},P=class extends C{static createMinus(e,t,r){return new P(e,t,"-",r,"-",new $(e,t,0),r)}static createPlus(e,t,r){return new P(e,t,"+",r,"-",r,new $(e,t,0))}constructor(e,t,r,n,i,a,h){super(e,t,i,a,h),this.operator=r,this.expr=n,this.left=null,this.right=null,this.operation=null}visit(e,t=null){return e.visitUnary!==void 0?e.visitUnary(this,t):e.visitBinary(this,t)}},ee=class extends S{constructor(e,t,r){super(e,t),this.expression=r}visit(e,t=null){return e.visitPrefixNot(this,t)}},te=class extends S{constructor(e,t,r){super(e,t),this.expression=r}visit(e,t=null){return e.visitNonNullAssert(this,t)}},re=class extends S{constructor(e,t,r,n,i){super(e,t),this.receiver=r,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitCall(this,t)}},se=class extends S{constructor(e,t,r,n,i){super(e,t),this.receiver=r,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitSafeCall(this,t)}},R=class{constructor(e,t){this.start=e,this.end=t}},L=class extends S{constructor(e,t,r,n,i){super(new b(0,t===null?0:t.length),new R(n,t===null?n:n+t.length)),this.ast=e,this.source=t,this.location=r,this.errors=i}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}},T=class{constructor(e,t,r){this.sourceSpan=e,this.key=t,this.value=r}},ne=class{constructor(e,t,r){this.sourceSpan=e,this.key=t,this.value=r}},Ae=class{visit(e,t){e.visit(this,t)}visitUnary(e,t){this.visit(e.expr,t)}visitBinary(e,t){this.visit(e.left,t),this.visit(e.right,t)}visitChain(e,t){this.visitAll(e.expressions,t)}visitConditional(e,t){this.visit(e.condition,t),this.visit(e.trueExp,t),this.visit(e.falseExp,t)}visitPipe(e,t){this.visit(e.exp,t),this.visitAll(e.args,t)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.receiver,t),this.visit(e.key,t),this.visit(e.value,t)}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitLiteralPrimitive(e,t){}visitPrefixNot(e,t){this.visit(e.expression,t)}visitNonNullAssert(e,t){this.visit(e.expression,t)}visitPropertyRead(e,t){this.visit(e.receiver,t)}visitPropertyWrite(e,t){this.visit(e.receiver,t),this.visit(e.value,t)}visitSafePropertyRead(e,t){this.visit(e.receiver,t)}visitSafeKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitSafeCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitAll(e,t){for(let r of e)this.visit(r,t)}};(function(s){s[s.DEFAULT=0]="DEFAULT",s[s.LITERAL_ATTR=1]="LITERAL_ATTR",s[s.ANIMATION=2]="ANIMATION"})(ht||(ht={}))});function pt(s){return s>=9&&s<=32||s==160}function B(s){return 48<=s&&s<=57}function ut(s){return s>=97&&s<=122||s>=65&&s<=90}function Te(s){return s===39||s===34||s===96}var Me=E(()=>{});function vt(s,e,t){return new k(s,e,d.Character,t,String.fromCharCode(t))}function Kr(s,e,t){return new k(s,e,d.Identifier,0,t)}function Tr(s,e,t){return new k(s,e,d.PrivateIdentifier,0,t)}function Mr(s,e,t){return new k(s,e,d.Keyword,0,t)}function Ue(s,e,t){return new k(s,e,d.Operator,0,t)}function Fr(s,e,t){return new k(s,e,d.String,0,t)}function Ur(s,e,t){return new k(s,e,d.Number,t,"")}function Gr(s,e,t){return new k(s,e,d.Error,0,t)}function gt(s){return 97<=s&&s<=122||65<=s&&s<=90||s==95||s==36}function mt(s){return ut(s)||B(s)||s==95||s==36}function Dr(s){return s==101||s==69}function Vr(s){return s==45||s==43}function Wr(s){switch(s){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return s}}function Qr(s){let e=parseInt(s);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+s);return e}var d,Br,fe,k,Ne,Ge,Ve=E(()=>{Me();(function(s){s[s.Character=0]="Character",s[s.Identifier=1]="Identifier",s[s.PrivateIdentifier=2]="PrivateIdentifier",s[s.Keyword=3]="Keyword",s[s.String=4]="String",s[s.Operator=5]="Operator",s[s.Number=6]="Number",s[s.Error=7]="Error"})(d||(d={}));Br=["var","let","as","null","undefined","true","false","if","else","this"],fe=class{tokenize(e){let t=new Ge(e),r=[],n=t.scanToken();for(;n!=null;)r.push(n),n=t.scanToken();return r}},k=class{constructor(e,t,r,n,i){this.index=e,this.end=t,this.type=r,this.numValue=n,this.strValue=i}isCharacter(e){return this.type==d.Character&&this.numValue==e}isNumber(){return this.type==d.Number}isString(){return this.type==d.String}isOperator(e){return this.type==d.Operator&&this.strValue==e}isIdentifier(){return this.type==d.Identifier}isPrivateIdentifier(){return this.type==d.PrivateIdentifier}isKeyword(){return this.type==d.Keyword}isKeywordLet(){return this.type==d.Keyword&&this.strValue=="let"}isKeywordAs(){return this.type==d.Keyword&&this.strValue=="as"}isKeywordNull(){return this.type==d.Keyword&&this.strValue=="null"}isKeywordUndefined(){return this.type==d.Keyword&&this.strValue=="undefined"}isKeywordTrue(){return this.type==d.Keyword&&this.strValue=="true"}isKeywordFalse(){return this.type==d.Keyword&&this.strValue=="false"}isKeywordThis(){return this.type==d.Keyword&&this.strValue=="this"}isError(){return this.type==d.Error}toNumber(){return this.type==d.Number?this.numValue:-1}toString(){switch(this.type){case d.Character:case d.Identifier:case d.Keyword:case d.Operator:case d.PrivateIdentifier:case d.String:case d.Error:return this.strValue;case d.Number:return this.numValue.toString();default:return null}}};Ne=new k(-1,-1,d.Character,0,""),Ge=class{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,t=this.length,r=this.peek,n=this.index;for(;r<=32;)if(++n>=t){r=0;break}else r=e.charCodeAt(n);if(this.peek=r,this.index=n,n>=t)return null;if(gt(r))return this.scanIdentifier();if(B(r))return this.scanNumber(n);let i=n;switch(r){case 46:return this.advance(),B(this.peek)?this.scanNumber(i):vt(i,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(i,r);case 39:case 34:return this.scanString();case 35:return this.scanPrivateIdentifier();case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(i,String.fromCharCode(r));case 63:return this.scanQuestion(i);case 60:case 62:return this.scanComplexOperator(i,String.fromCharCode(r),61,"=");case 33:case 61:return this.scanComplexOperator(i,String.fromCharCode(r),61,"=",61,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case 160:for(;pt(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(r)}]`,0)}scanCharacter(e,t){return this.advance(),vt(e,this.index,t)}scanOperator(e,t){return this.advance(),Ue(e,this.index,t)}scanComplexOperator(e,t,r,n,i,a){this.advance();let h=t;return this.peek==r&&(this.advance(),h+=n),i!=null&&this.peek==i&&(this.advance(),h+=a),Ue(e,this.index,h)}scanIdentifier(){let e=this.index;for(this.advance();mt(this.peek);)this.advance();let t=this.input.substring(e,this.index);return Br.indexOf(t)>-1?Mr(e,this.index,t):Kr(e,this.index,t)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!gt(this.peek))return this.error("Invalid character [#]",-1);for(;mt(this.peek);)this.advance();let t=this.input.substring(e,this.index);return Tr(e,this.index,t)}scanNumber(e){let t=this.index===e,r=!1;for(this.advance();;){if(!B(this.peek))if(this.peek===95){if(!B(this.input.charCodeAt(this.index-1))||!B(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);r=!0}else if(this.peek===46)t=!1;else if(Dr(this.peek)){if(this.advance(),Vr(this.peek)&&this.advance(),!B(this.peek))return this.error("Invalid exponent",-1);t=!1}else break;this.advance()}let n=this.input.substring(e,this.index);r&&(n=n.replace(/_/g,""));let i=t?Qr(n):parseFloat(n);return Ur(e,this.index,i)}scanString(){let e=this.index,t=this.peek;this.advance();let r="",n=this.index,i=this.input;for(;this.peek!=t;)if(this.peek==92){r+=i.substring(n,this.index);let h;if(this.advance(),this.peek==117){let v=i.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(v))h=parseInt(v,16);else return this.error(`Invalid unicode escape [\\u${v}]`,0);for(let f=0;f<5;f++)this.advance()}else h=Wr(this.peek),this.advance();r+=String.fromCharCode(h),n=this.index}else{if(this.peek==0)return this.error("Unterminated quote",0);this.advance()}let a=i.substring(n,this.index);return this.advance(),Fr(e,this.index,r+a)}scanQuestion(e){this.advance();let t="?";return(this.peek===63||this.peek===46)&&(t+=this.peek===46?".":"?",this.advance()),Ue(e,this.index,t)}error(e,t){let r=this.index+t;return Gr(r,this.index,`Lexer Error: ${e} at column ${r} in expression [${this.input}]`)}}});function Et(s,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${s}' to be an array, [start, end].`);if(e!=null){let t=e[0],r=e[1];jr.forEach(n=>{if(n.test(t)||n.test(r))throw new Error(`['${t}', '${r}'] contains unusable interpolation symbol.`)})}}var jr,At=E(()=>{jr=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//]});var ge,U,$t=E(()=>{At();ge=class{static fromArray(e){return e?(Et("interpolation",e),new ge(e[0],e[1])):U}constructor(e,t){this.start=e,this.end=t}},U=new ge("{{","}}")});function Hr(s){let e=new Map,t=0,r=0,n=0;for(;n<s.length;){let i=s[n];if(i.type===9){let[a,h]=i.parts;t+=h.length,r+=a.length}else{let a=i.parts.reduce((h,v)=>h+v.length,0);r+=a,t+=a}e.set(r,t),n++}return e}var We,Qe,me,pe,G,je,Ct=E(()=>{Me();$t();Ke();Ve();We=class{constructor(e,t,r){this.strings=e,this.expressions=t,this.offsets=r}},Qe=class{constructor(e,t,r){this.templateBindings=e,this.warnings=t,this.errors=r}},me=class{constructor(e){this._lexer=e,this.errors=[]}parseAction(e,t,r,n,i=U){this._checkNoInterpolation(e,r,i);let a=this._stripComments(e),h=this._lexer.tokenize(a),v=1;t&&(v|=2);let f=new G(e,r,n,h,v,this.errors,0).parseChain();return new L(f,e,r,n,this.errors)}parseBinding(e,t,r,n=U){let i=this._parseBindingAst(e,t,r,n);return new L(i,e,t,r,this.errors)}checkSimpleExpression(e){let t=new je;return e.visit(t),t.errors}parseSimpleBinding(e,t,r,n=U){let i=this._parseBindingAst(e,t,r,n),a=this.checkSimpleExpression(i);return a.length>0&&this._reportError(`Host binding expression cannot contain ${a.join(" ")}`,e,t),new L(i,e,t,r,this.errors)}_reportError(e,t,r,n){this.errors.push(new D(e,t,r,n))}_parseBindingAst(e,t,r,n){this._checkNoInterpolation(e,t,n);let i=this._stripComments(e),a=this._lexer.tokenize(i);return new G(e,t,r,a,0,this.errors,0).parseChain()}parseTemplateBindings(e,t,r,n,i){let a=this._lexer.tokenize(t);return new G(t,r,i,a,0,this.errors,0).parseTemplateBindings({source:e,span:new R(n,n+e.length)})}parseInterpolation(e,t,r,n,i=U){let{strings:a,expressions:h,offsets:v}=this.splitInterpolation(e,t,n,i);if(h.length===0)return null;let f=[];for(let w=0;w<h.length;++w){let I=h[w].text,O=this._stripComments(I),y=this._lexer.tokenize(O),m=new G(e,t,r,y,0,this.errors,v[w]).parseChain();f.push(m)}return this.createInterpolationAst(a.map(w=>w.text),f,e,t,r)}parseInterpolationExpression(e,t,r){let n=this._stripComments(e),i=this._lexer.tokenize(n),a=new G(e,t,r,i,0,this.errors,0).parseChain(),h=["",""];return this.createInterpolationAst(h,[a],e,t,r)}createInterpolationAst(e,t,r,n,i){let a=new b(0,r.length),h=new Ee(a,a.toAbsolute(i),e,t);return new L(h,r,n,i,this.errors)}splitInterpolation(e,t,r,n=U){let i=[],a=[],h=[],v=r?Hr(r):null,f=0,w=!1,I=!1,{start:O,end:y}=n;for(;f<e.length;)if(w){let m=f,c=m+O.length,o=this._getInterpolationEndIndex(e,y,c);if(o===-1){w=!1,I=!0;break}let x=o+y.length,p=e.substring(c,o);p.trim().length===0&&this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${f} in`,t),a.push({text:p,start:m,end:x});let g=((v==null?void 0:v.get(m))??m)+O.length;h.push(g),f=x,w=!1}else{let m=f;f=e.indexOf(O,f),f===-1&&(f=e.length);let c=e.substring(m,f);i.push({text:c,start:m,end:f}),w=!0}if(!w)if(I){let m=i[i.length-1];m.text+=e.substring(f),m.end=e.length}else i.push({text:e.substring(f),start:f,end:e.length});return new We(i,a,h)}wrapLiteralPrimitive(e,t,r){let n=new b(0,e==null?0:e.length);return new L(new $(n,n.toAbsolute(r),e),e,t,r,this.errors)}_stripComments(e){let t=this._commentStart(e);return t!=null?e.substring(0,t):e}_commentStart(e){let t=null;for(let r=0;r<e.length-1;r++){let n=e.charCodeAt(r),i=e.charCodeAt(r+1);if(n===47&&i==47&&t==null)return r;t===n?t=null:t==null&&Te(n)&&(t=n)}return null}_checkNoInterpolation(e,t,{start:r,end:n}){let i=-1,a=-1;for(let h of this._forEachUnquotedChar(e,0))if(i===-1)e.startsWith(r)&&(i=h);else if(a=this._getInterpolationEndIndex(e,n,h),a>-1)break;i>-1&&a>-1&&this._reportError(`Got interpolation (${r}${n}) where expression was expected`,e,`at column ${i} in`,t)}_getInterpolationEndIndex(e,t,r){for(let n of this._forEachUnquotedChar(e,r)){if(e.startsWith(t,n))return n;if(e.startsWith("//",n))return e.indexOf(t,n)}return-1}*_forEachUnquotedChar(e,t){let r=null,n=0;for(let i=t;i<e.length;i++){let a=e[i];Te(e.charCodeAt(i))&&(r===null||r===a)&&n%2===0?r=r===null?a:null:r===null&&(yield i),n=a==="\\"?n+1:0}}};(function(s){s[s.None=0]="None",s[s.Writable=1]="Writable"})(pe||(pe={}));G=class{constructor(e,t,r,n,i,a,h){this.input=e,this.location=t,this.absoluteOffset=r,this.tokens=n,this.parseFlags=i,this.errors=a,this.offset=h,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=pe.None,this.sourceSpanCache=new Map,this.index=0}peek(e){let t=this.index+e;return t<this.tokens.length?this.tokens[t]:Ne}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(){return this.index>0?this.peek(-1).end+this.offset:this.tokens.length===0?this.input.length+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e,t){let r=this.currentEndIndex;if(t!==void 0&&t>this.currentEndIndex&&(r=t),e>r){let n=r;r=e,e=n}return new b(e,r)}sourceSpan(e,t){let r=`${e}@${this.inputIndex}:${t}`;return this.sourceSpanCache.has(r)||this.sourceSpanCache.set(r,this.span(e,t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(r)}advance(){this.index++}withContext(e,t){this.context|=e;let r=t();return this.context^=e,r}consumeOptionalCharacter(e){return this.next.isCharacter(e)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(e){this.consumeOptionalCharacter(e)||this.error(`Missing expected ${String.fromCharCode(e)}`)}consumeOptionalOperator(e){return this.next.isOperator(e)?(this.advance(),!0):!1}expectOperator(e){this.consumeOptionalOperator(e)||this.error(`Missing expected operator ${e}`)}prettyPrintToken(e){return e===Ne?"end of input":`token ${e}`}expectIdentifierOrKeyword(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),null):(this.advance(),e.toString())}expectIdentifierOrKeywordOrString(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()&&!e.isString()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),""):(this.advance(),e.toString())}parseChain(){let e=[],t=this.inputIndex;for(;this.index<this.tokens.length;){let r=this.parsePipe();if(e.push(r),this.consumeOptionalCharacter(59))for(this.parseFlags&1||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(59););else if(this.index<this.tokens.length){let n=this.index;if(this.error(`Unexpected token '${this.next}'`),this.index===n)break}}if(e.length===0){let r=this.offset,n=this.offset+this.input.length;return new A(this.span(r,n),this.sourceSpan(r,n))}return e.length==1?e[0]:new W(this.span(t),this.sourceSpan(t),e)}parsePipe(){let e=this.inputIndex,t=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseFlags&1&&this.error("Cannot have a pipe in an action expression");do{let r=this.inputIndex,n=this.expectIdentifierOrKeyword(),i,a;n!==null?i=this.sourceSpan(r):(n="",a=this.next.index!==-1?this.next.index:this.input.length+this.offset,i=new b(a,a).toAbsolute(this.absoluteOffset));let h=[];for(;this.consumeOptionalCharacter(58);)h.push(this.parseExpression());t=new Z(this.span(e),this.sourceSpan(e,a),t,n,h,i)}while(this.consumeOptionalOperator("|"))}return t}parseExpression(){return this.parseConditional()}parseConditional(){let e=this.inputIndex,t=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let r=this.parsePipe(),n;if(this.consumeOptionalCharacter(58))n=this.parsePipe();else{let i=this.inputIndex,a=this.input.substring(e,i);this.error(`Conditional expression ${a} requires all 3 expressions`),n=new A(this.span(e),this.sourceSpan(e))}return new Q(this.span(e),this.sourceSpan(e),t,r,n)}else return t}parseLogicalOr(){let e=this.inputIndex,t=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let r=this.parseLogicalAnd();t=new C(this.span(e),this.sourceSpan(e),"||",t,r)}return t}parseLogicalAnd(){let e=this.inputIndex,t=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let r=this.parseNullishCoalescing();t=new C(this.span(e),this.sourceSpan(e),"&&",t,r)}return t}parseNullishCoalescing(){let e=this.inputIndex,t=this.parseEquality();for(;this.consumeOptionalOperator("??");){let r=this.parseEquality();t=new C(this.span(e),this.sourceSpan(e),"??",t,r)}return t}parseEquality(){let e=this.inputIndex,t=this.parseRelational();for(;this.next.type==d.Operator;){let r=this.next.strValue;switch(r){case"==":case"===":case"!=":case"!==":this.advance();let n=this.parseRelational();t=new C(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseRelational(){let e=this.inputIndex,t=this.parseAdditive();for(;this.next.type==d.Operator;){let r=this.next.strValue;switch(r){case"<":case">":case"<=":case">=":this.advance();let n=this.parseAdditive();t=new C(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseAdditive(){let e=this.inputIndex,t=this.parseMultiplicative();for(;this.next.type==d.Operator;){let r=this.next.strValue;switch(r){case"+":case"-":this.advance();let n=this.parseMultiplicative();t=new C(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseMultiplicative(){let e=this.inputIndex,t=this.parsePrefix();for(;this.next.type==d.Operator;){let r=this.next.strValue;switch(r){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();t=new C(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parsePrefix(){if(this.next.type==d.Operator){let e=this.inputIndex,t=this.next.strValue,r;switch(t){case"+":return this.advance(),r=this.parsePrefix(),P.createPlus(this.span(e),this.sourceSpan(e),r);case"-":return this.advance(),r=this.parsePrefix(),P.createMinus(this.span(e),this.sourceSpan(e),r);case"!":return this.advance(),r=this.parsePrefix(),new ee(this.span(e),this.sourceSpan(e),r)}}return this.parseCallChain()}parseCallChain(){let e=this.inputIndex,t=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(46))t=this.parseAccessMember(t,e,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(40)?t=this.parseCall(t,e,!0):t=this.consumeOptionalCharacter(91)?this.parseKeyedReadOrWrite(t,e,!0):this.parseAccessMember(t,e,!0);else if(this.consumeOptionalCharacter(91))t=this.parseKeyedReadOrWrite(t,e,!1);else if(this.consumeOptionalCharacter(40))t=this.parseCall(t,e,!1);else if(this.consumeOptionalOperator("!"))t=new te(this.span(e),this.sourceSpan(e),t);else return t}parsePrimary(){let e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),t}else{if(this.next.isKeywordNull())return this.advance(),new $(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new $(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new $(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new $(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new ye(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;let t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new J(this.span(e),this.sourceSpan(e),t)}else{if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new _(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){let t=this.next.toNumber();return this.advance(),new $(this.span(e),this.sourceSpan(e),t)}else if(this.next.isString()){let t=this.next.toString();return this.advance(),new $(this.span(e),this.sourceSpan(e),t)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new A(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new A(this.span(e),this.sourceSpan(e))):(this.error(`Unexpected token ${this.next}`),new A(this.span(e),this.sourceSpan(e)))}}}parseExpressionList(e){let t=[];do if(!this.next.isCharacter(e))t.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){let e=[],t=[],r=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{let n=this.inputIndex,i=this.next.isString(),a=this.expectIdentifierOrKeywordOrString();if(e.push({key:a,quoted:i}),i)this.expectCharacter(58),t.push(this.parsePipe());else if(this.consumeOptionalCharacter(58))t.push(this.parsePipe());else{let h=this.span(n),v=this.sourceSpan(n);t.push(new K(h,v,v,new _(h,v),a))}}while(this.consumeOptionalCharacter(44)&&!this.next.isCharacter(125));this.rbracesExpected--,this.expectCharacter(125)}return new Y(this.span(r),this.sourceSpan(r),e,t)}parseAccessMember(e,t,r){let n=this.inputIndex,i=this.withContext(pe.Writable,()=>{let v=this.expectIdentifierOrKeyword()??"";return v.length===0&&this.error("Expected identifier for property access",e.span.end),v}),a=this.sourceSpan(n),h;if(r)this.consumeOptionalAssignment()?(this.error("The '?.' operator cannot be used in the assignment"),h=new A(this.span(t),this.sourceSpan(t))):h=new H(this.span(t),this.sourceSpan(t),a,e,i);else if(this.consumeOptionalAssignment()){if(!(this.parseFlags&1))return this.error("Bindings cannot contain assignments"),new A(this.span(t),this.sourceSpan(t));let v=this.parseConditional();h=new j(this.span(t),this.sourceSpan(t),a,e,i,v)}else h=new K(this.span(t),this.sourceSpan(t),a,e,i);return h}parseCall(e,t,r){let n=this.inputIndex;this.rparensExpected++;let i=this.parseCallArguments(),a=this.span(n,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(41),this.rparensExpected--;let h=this.span(t),v=this.sourceSpan(t);return r?new se(h,v,e,i,a):new re(h,v,e,i,a)}consumeOptionalAssignment(){return this.parseFlags&2&&this.next.isOperator("!")&&this.peek(1).isOperator("=")?(this.advance(),this.advance(),!0):this.consumeOptionalOperator("=")}parseCallArguments(){if(this.next.isCharacter(41))return[];let e=[];do e.push(this.parsePipe());while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1,r=this.currentAbsoluteOffset;do e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-");while(t);return{source:e,span:new R(r,r+e.length)}}parseTemplateBindings(e){let t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index<this.tokens.length;){let r=this.parseLetBinding();if(r)t.push(r);else{let n=this.expectTemplateBindingKey(),i=this.parseAsBinding(n);i?t.push(i):(n.source=e.source+n.source.charAt(0).toUpperCase()+n.source.substring(1),t.push(...this.parseDirectiveKeywordBindings(n)))}this.consumeStatementTerminator()}return new Qe(t,[],this.errors)}parseKeyedReadOrWrite(e,t,r){return this.withContext(pe.Writable,()=>{this.rbracketsExpected++;let n=this.parsePipe();if(n instanceof A&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("="))if(r)this.error("The '?.' operator cannot be used in the assignment");else{let i=this.parseConditional();return new X(this.span(t),this.sourceSpan(t),e,n,i)}else return r?new q(this.span(t),this.sourceSpan(t),e,n):new z(this.span(t),this.sourceSpan(t),e,n);return new A(this.span(t),this.sourceSpan(t))})}parseDirectiveKeywordBindings(e){let t=[];this.consumeOptionalCharacter(58);let r=this.getDirectiveBoundTarget(),n=this.currentAbsoluteOffset,i=this.parseAsBinding(e);i||(this.consumeStatementTerminator(),n=this.currentAbsoluteOffset);let a=new R(e.span.start,n);return t.push(new ne(a,e,r)),i&&t.push(i),t}getDirectiveBoundTarget(){if(this.next===Ne||this.peekKeywordAs()||this.peekKeywordLet())return null;let e=this.parsePipe(),{start:t,end:r}=e.span,n=this.input.substring(t,r);return new L(e,n,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();let t=this.expectTemplateBindingKey();this.consumeStatementTerminator();let r=new R(e.span.start,this.currentAbsoluteOffset);return new T(r,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;let e=this.currentAbsoluteOffset;this.advance();let t=this.expectTemplateBindingKey(),r=null;this.consumeOptionalOperator("=")&&(r=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let n=new R(e,this.currentAbsoluteOffset);return new T(n,t,r)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new D(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return e==null&&(e=this.index),e<this.tokens.length?`at column ${this.tokens[e].index+1} in`:"at the end of the expression"}_reportErrorForPrivateIdentifier(e,t){let r=`Private identifiers are not supported. Unexpected private identifier: ${e}`;t!==null&&(r+=`, ${t}`),this.error(r)}skip(){let e=this.next;for(;this.index<this.tokens.length&&!e.isCharacter(59)&&!e.isOperator("|")&&(this.rparensExpected<=0||!e.isCharacter(41))&&(this.rbracesExpected<=0||!e.isCharacter(125))&&(this.rbracketsExpected<=0||!e.isCharacter(93))&&(!(this.context&pe.Writable)||!e.isOperator("="));)this.next.isError()&&this.errors.push(new D(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}},je=class extends Ae{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}}});var ke=E(()=>{Ke();Ve();Ct()});function kt(){return new me(new fe)}function Xe(s,e){let t=kt(),{astInput:r,comments:n}=qr(s,t),{ast:i,errors:a}=e(r,t);return bt(a),{ast:i,comments:n}}function It(s){return Xe(s,(e,t)=>t.parseBinding(e,...qe))}function Pt(s){return Xe(s,(e,t)=>t.parseAction(e,!1,...qe))}function Rt(s){return Xe(s,(e,t)=>{let r=t.parseInterpolationExpression(e,...qe);return r.ast=r.ast.expressions[0],r})}function Lt(s){let e=kt(),{templateBindings:t,errors:r}=e.parseTemplateBindings(ze,s,Nt,He,He);return bt(r),t}function bt(s){if(s.length!==0){let[{message:e}]=s;throw new SyntaxError(e.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function qr(s,e){let t=e._commentStart(s);return t===null?{astInput:s,comments:[]}:{astInput:s.slice(0,t),comments:[{type:"Comment",value:s.slice(t+2),sourceSpan:{start:t,end:s.length}}]}}function _t(s){return s instanceof P?"Unary":s instanceof C?"Binary":s instanceof Z?"BindingPipe":s instanceof re?"Call":s instanceof W?"Chain":s instanceof Q?"Conditional":s instanceof A?"EmptyExpr":s instanceof _?"ImplicitReceiver":s instanceof z?"KeyedRead":s instanceof q?"SafeKeyedRead":s instanceof X?"KeyedWrite":s instanceof J?"LiteralArray":s instanceof Y?"LiteralMap":s instanceof $?"LiteralPrimitive":s instanceof te?"NonNullAssert":s instanceof ee?"PrefixNot":s instanceof K?"PropertyRead":s instanceof j?"PropertyWrite":s instanceof se?"SafeCall":s instanceof H?"SafePropertyRead":s.type}function Ot({start:s,end:e},t){let r=s,n=e;for(;n!==r&&/\s/.test(t[n-1]);)n--;for(;r!==n&&/\s/.test(t[r]);)r++;return{start:r,end:n}}function Xr({start:s,end:e},t){let r=s,n=e;for(;n!==t.length&&/\s/.test(t[n]);)n++;for(;r!==0&&/\s/.test(t[r-1]);)r--;return{start:r,end:n}}function Zr(s,e){return e[s.start-1]==="("&&e[s.end]===")"?{start:s.start-1,end:s.end+1}:s}function Bt(s,e,t){let r=0,n={start:s.start,end:s.end};for(;;){let i=Xr(n,e),a=Zr(i,e);if(i.start===a.start&&i.end===a.end)break;n.start=a.start,n.end=a.end,r++}return{hasParens:(t?r-1:r)!==0,outerSpan:Ot(t?{start:n.start+1,end:n.end-1}:n,e),innerSpan:Ot(s,e)}}function Kt(s,e,t){let r=e;for(;!s.test(t[r]);)if(--r<0)throw new Error(`Cannot find front char ${s} from index ${e} in ${JSON.stringify(t)}`);return r}function Ie(s,e,t){let r=e;for(;!s.test(t[r]);)if(++r>=t.length)throw new Error(`Cannot find back char ${s} from index ${e} in ${JSON.stringify(t)}`);return r}function Tt(s){return s.slice(0,1).toLowerCase()+s.slice(1)}function Mt(s){return s.length===0?void 0:s[s.length-1]}var Nt,ze,He,qe,Pe=E(()=>{ke();ke();Nt="angular-estree-parser",ze="NgEstreeParser",He=0,qe=[Nt,He]});function Re(s,e,t=!1,r=!1){if(!t){let{start:h,end:v}=s;return{start:h,end:v,loc:{start:e.locator.locationForIndex(h),end:e.locator.locationForIndex(v)}}}let{outerSpan:n,innerSpan:i,hasParens:a}=Bt(s,e.text,r);return{start:i.start,end:i.end,loc:{start:e.locator.locationForIndex(i.start),end:e.locator.locationForIndex(i.end)},...a&&{extra:{parenthesized:!0,parenStart:n.start,parenEnd:n.end}}}}var ue,Ze=E(()=>{Pe();ue=(s,e,t=!1)=>{let r=_t(s);switch(r){case"Unary":{let{operator:c,expr:o}=s,x=n(o);return a("UnaryExpression",{prefix:!0,argument:x,operator:c},s.sourceSpan,{hasParentParens:t})}case"Binary":{let{left:c,operation:o,right:x}=s,p=n(c),u=n(x);return a(o==="&&"||o==="||"||o==="??"?"LogicalExpression":"BinaryExpression",{left:p,right:u,operator:o},{start:y(p),end:m(u)},{hasParentParens:t})}case"BindingPipe":{let{exp:c,name:o,args:x}=s,p=n(c),u=f(/\S/,f(/\|/,m(p))+1),g=a("Identifier",{name:o},{start:u,end:u+o.length}),l=x.map(n);return a("NGPipeExpression",{left:p,right:g,arguments:l},{start:y(p),end:m(l.length===0?g:Mt(l))},{hasParentParens:t})}case"Chain":{let{expressions:c}=s;return a("NGChainedExpression",{expressions:c.map(n)},s.sourceSpan,{hasParentParens:t})}case"Comment":{let{value:c}=s;return a("CommentLine",{value:c},s.sourceSpan,{processSpan:!1})}case"Conditional":{let{condition:c,trueExp:o,falseExp:x}=s,p=n(c),u=n(o),g=n(x);return a("ConditionalExpression",{test:p,consequent:u,alternate:g},{start:y(p),end:m(g)},{hasParentParens:t})}case"EmptyExpr":return a("NGEmptyExpression",{},s.sourceSpan,{hasParentParens:t});case"ImplicitReceiver":return a("ThisExpression",{},s.sourceSpan,{hasParentParens:t});case"KeyedRead":case"SafeKeyedRead":{let c=r==="SafeKeyedRead",{key:o}=s,x=Object.prototype.hasOwnProperty.call(s,"receiver")?s.receiver:s.obj,p=n(o);return h(x,p,{computed:!0,optional:c},{end:s.sourceSpan.end,hasParentParens:t})}case"LiteralArray":{let{expressions:c}=s;return a("ArrayExpression",{elements:c.map(n)},s.sourceSpan,{hasParentParens:t})}case"LiteralMap":{let{keys:c,values:o}=s,x=o.map(u=>n(u)),p=c.map(({key:u,quoted:g},l)=>{let N=x[l],le=y(N),tt=m(N),be=f(/\S/,l===0?s.sourceSpan.start+1:f(/,/,m(x[l-1]))+1),Jt=le===be?tt:v(/\S/,v(/:/,le-1)-1)+1,rt={start:be,end:Jt},Se=g?a("StringLiteral",{value:u},rt):a("Identifier",{name:u},rt),Yt=Se.end<Se.start||be===le;return a("ObjectProperty",{key:Se,value:N,shorthand:Yt,computed:!1},{start:y(Se),end:tt})});return a("ObjectExpression",{properties:p},s.sourceSpan,{hasParentParens:t})}case"LiteralPrimitive":{let{value:c}=s;switch(typeof c){case"boolean":return a("BooleanLiteral",{value:c},s.sourceSpan,{hasParentParens:t});case"number":return a("NumericLiteral",{value:c},s.sourceSpan,{hasParentParens:t});case"object":return a("NullLiteral",{},s.sourceSpan,{hasParentParens:t});case"string":return a("StringLiteral",{value:c},s.sourceSpan,{hasParentParens:t});case"undefined":return a("Identifier",{name:"undefined"},s.sourceSpan,{hasParentParens:t});default:throw new Error(`Unexpected LiteralPrimitive value type ${typeof c}`)}}case"Call":case"SafeCall":{let c=r==="SafeCall",{receiver:o,args:x}=s,p=x.length===1?[i(x[0])]:x.map(n),u=n(o),g=I(u),l=c||g?"OptionalCallExpression":"CallExpression";return a(l,{callee:u,arguments:p,optional:l==="OptionalCallExpression"?c:void 0},{start:y(u),end:s.sourceSpan.end},{hasParentParens:t})}case"NonNullAssert":{let{expression:c}=s,o=n(c);return a("TSNonNullExpression",{expression:o},{start:y(o),end:s.sourceSpan.end},{hasParentParens:t})}case"PrefixNot":{let{expression:c}=s,o=n(c);return a("UnaryExpression",{prefix:!0,operator:"!",argument:o},{start:s.sourceSpan.start,end:m(o)},{hasParentParens:t})}case"PropertyRead":case"SafePropertyRead":{let c=r==="SafePropertyRead",{receiver:o,name:x}=s,p=v(/\S/,s.sourceSpan.end-1)+1,u=a("Identifier",{name:x},{start:p-x.length,end:p},w(o)?{hasParentParens:t}:{});return h(o,u,{computed:!1,optional:c},{hasParentParens:t})}case"KeyedWrite":{let{key:c,value:o}=s,x=Object.prototype.hasOwnProperty.call(s,"receiver")?s.receiver:s.obj,p=n(c),u=n(o),g=h(x,p,{computed:!0,optional:!1},{end:f(/\]/,m(p))+1});return a("AssignmentExpression",{left:g,operator:"=",right:u},{start:y(g),end:m(u)},{hasParentParens:t})}case"PropertyWrite":{let{receiver:c,name:o,value:x}=s,p=n(x),u=v(/\S/,v(/=/,y(p)-1)-1)+1,g=a("Identifier",{name:o},{start:u-o.length,end:u}),l=h(c,g,{computed:!1,optional:!1});return a("AssignmentExpression",{left:l,operator:"=",right:p},{start:y(l),end:m(p)},{hasParentParens:t})}default:throw new Error(`Unexpected node ${r}`)}function n(c){return ue(c,e)}function i(c){return ue(c,e,!0)}function a(c,o,x,{processSpan:p=!0,hasParentParens:u=!1}={}){let g={type:c,...Re(x,e,p,u),...o};switch(c){case"NumericLiteral":{let l=g;l.extra={...l.extra,raw:e.text.slice(l.start,l.end),rawValue:l.value};break}case"StringLiteral":{let l=g;l.extra={...l.extra,raw:e.text.slice(l.start,l.end),rawValue:l.value};break}case"ObjectProperty":{let l=g;l.shorthand&&(l.extra={...l.extra,shorthand:l.shorthand});break}}return g}function h(c,o,x,{end:p=m(o),hasParentParens:u=!1}={}){if(w(c)||c.sourceSpan.start===o.start)return o;let g=n(c),l=I(g);return a(x.optional||l?"OptionalMemberExpression":"MemberExpression",{object:g,property:o,computed:x.computed,...x.optional?{optional:!0}:l?{optional:!1}:null},{start:y(g),end:p},{hasParentParens:u})}function v(c,o){return Kt(c,o,e.text)}function f(c,o){return Ie(c,o,e.text)}function w(c){return c.sourceSpan.start>=c.sourceSpan.end||/^\s+$/.test(e.text.slice(c.sourceSpan.start,c.sourceSpan.end))}function I(c){return(c.type==="OptionalCallExpression"||c.type==="OptionalMemberExpression")&&!O(c)}function O(c){return c.extra&&c.extra.parenthesized}function y(c){return O(c)?c.extra.parenStart:c.start}function m(c){return O(c)?c.extra.parenEnd:c.end}}});function Ft(s,e){s.forEach(y);let[t]=s,{key:r}=t,n=e.text.slice(t.sourceSpan.start,t.sourceSpan.end).trim().length===0?s.slice(1):s,i=[],a=null;for(let o=0;o<n.length;o++){let x=n[o];if(a&&I(a)&&O(x)&&x.value&&x.value.source===a.key.source){let p=f("NGMicrosyntaxKey",{name:x.key.source},x.key.span),u=(N,le)=>({...N,...Re({start:N.start,end:le},e)}),g=N=>({...u(N,p.end),alias:p}),l=i.pop();if(l.type==="NGMicrosyntaxExpression")i.push(g(l));else if(l.type==="NGMicrosyntaxKeyedExpression"){let N=g(l.expression);i.push(u({...l,expression:N},N.end))}else throw new Error(`Unexpected type ${l.type}`)}else i.push(h(x,o));a=x}return f("NGMicrosyntax",{body:i},i.length===0?s[0].sourceSpan:{start:i[0].start,end:i[i.length-1].end});function h(o,x){if(I(o)){let{key:p,value:u}=o;return u?x===0?f("NGMicrosyntaxExpression",{expression:v(u.ast),alias:null},u.sourceSpan):f("NGMicrosyntaxKeyedExpression",{key:f("NGMicrosyntaxKey",{name:w(p.source)},p.span),expression:f("NGMicrosyntaxExpression",{expression:v(u.ast),alias:null},u.sourceSpan)},{start:p.span.start,end:u.sourceSpan.end}):f("NGMicrosyntaxKey",{name:w(p.source)},p.span)}else{let{key:p,sourceSpan:u}=o;if(/^let\s$/.test(e.text.slice(u.start,u.start+4))){let{value:l}=o;return f("NGMicrosyntaxLet",{key:f("NGMicrosyntaxKey",{name:p.source},p.span),value:l?f("NGMicrosyntaxKey",{name:l.source},l.span):null},{start:u.start,end:l?l.span.end:p.span.end})}else{let l=c(o);return f("NGMicrosyntaxAs",{key:f("NGMicrosyntaxKey",{name:l.source},l.span),alias:f("NGMicrosyntaxKey",{name:p.source},p.span)},{start:l.span.start,end:p.span.end})}}}function v(o){return ue(o,e)}function f(o,x,p,u=!0){return{type:o,...Re(p,e,u),...x}}function w(o){return Tt(o.slice(r.source.length))}function I(o){return o instanceof ne}function O(o){return o instanceof T}function y(o){m(o.key.span),O(o)&&o.value&&m(o.value.span)}function m(o){if(e.text[o.start]!=='"'&&e.text[o.start]!=="'")return;let x=e.text[o.start],p=!1;for(let u=o.start+1;u<e.text.length;u++)switch(e.text[u]){case x:if(!p){o.end=u+1;return}default:p=!1;break;case"\\":p=!p;break}}function c(o){if(!o.value||o.value.source!==ze)return o.value;let x=Ie(/\S/,o.sourceSpan.start,e.text);return{source:"$implicit",span:{start:x,end:x}}}}var Ut=E(()=>{ke();Ze();Pe()});function Je(s,e){let{ast:t,comments:r}=e(s),n=new xe(s),i=h=>ue(h,n),a=i(t);return a.comments=r.map(h=>i(h)),a}function Gt(s){return Je(s,It)}function Dt(s){return Je(s,Rt)}function Ye(s){return Je(s,Pt)}function Vt(s){return Ft(Lt(s),new xe(s))}var Wt=E(()=>{ct();Ze();Ut();Pe()});function Jr(s){return Array.isArray(s)&&s.length>0}var Qt,jt=E(()=>{Qt=Jr});function et(s){var r;let e=s.range?s.range[0]:s.start,t=((r=s.declaration)==null?void 0:r.decorators)??s.decorators;return Qt(t)?Math.min(et(t[0]),e):e}function Ht(s){return s.range?s.range[1]:s.end}var zt=E(()=>{jt()});var qt={};st(qt,{__ng_action:()=>Yr,__ng_binding:()=>es,__ng_directive:()=>rs,__ng_interpolation:()=>ts});function Le(s){return{astFormat:"estree",parse(e){let t=s(e);return{type:"NGRoot",node:s===Ye&&t.type!=="NGChainedExpression"?{...t,type:"NGChainedExpression",expressions:[t]}:t}},locStart:et,locEnd:Ht}}var Yr,es,ts,rs,Xt=E(()=>{Wt();zt();Yr=Le(Ye),es=Le(Gt),ts=Le(Dt),rs=Le(Vt)});var ns={};st(ns,{default:()=>ss,parsers:()=>Zt});function ir(s){let e=Object.create(null);for(let{importParsers:t,parserNames:r}of s)for(let n of r)e[n]=async()=>Object.assign(e,await t())[n];return e}var nt=ir;var Zt=nt([{importParsers:()=>Promise.resolve().then(()=>(Xt(),qt)),parserNames:["__ng_action","__ng_binding","__ng_interpolation","__ng_directive"]}]),ss={parsers:Zt};return nr(ns);}); | ||
(function(n){function e(){var i=n();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.angular=e()}})(function(){"use strict";var Le=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var Tt=Object.getOwnPropertyNames;var _t=Object.prototype.hasOwnProperty;var Ze=(s,e)=>{for(var t in e)Le(s,t,{get:e[t],enumerable:!0})},Mt=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Tt(e))!_t.call(s,n)&&n!==t&&Le(s,n,{get:()=>e[n],enumerable:!(r=Kt(e,n))||r.enumerable});return s};var Ft=s=>Mt(Le({},"__esModule",{value:!0}),s);var Mr={};Ze(Mr,{default:()=>_r,parsers:()=>Re});var Re={};Ze(Re,{__ng_action:()=>br,__ng_binding:()=>Br,__ng_directive:()=>Tr,__ng_interpolation:()=>Kr});var Se=` | ||
`,Je="\r",Ye=function(){function s(e){this.length=e.length;for(var t=[0],r=0;r<e.length;)switch(e[r]){case Se:r+=Se.length,t.push(r);break;case Je:r+=Je.length,e[r]===Se&&(r+=Se.length),t.push(r);break;default:r++;break}this.offsets=t}return s.prototype.locationForIndex=function(e){if(e<0||e>this.length)return null;for(var t=0,r=this.offsets;r[t+1]<=e;)t++;var n=e-r[t];return{line:t,column:n}},s.prototype.indexForLocation=function(e){var t=e.line,r=e.column;return t<0||t>=this.offsets.length||r<0||r>this.lengthOfLine(t)?null:this.offsets[t]+r},s.prototype.lengthOfLine=function(e){var t=this.offsets[e],r=e===this.offsets.length-1?this.length:this.offsets[e+1];return r-t},s}();var le=class{text;locator;constructor(e){this.text=e,this.locator=new be(this.text)}},be=class{_linesAndColumns;constructor(e){this._linesAndColumns=new Ye(e)}locationForIndex(e){let{line:t,column:r}=this._linesAndColumns.locationForIndex(e);return{line:t+1,column:r,index:e}}};var G=class{constructor(e,t,r,n){this.input=t,this.errLocation=r,this.ctxLocation=n,this.message=`Parser Error: ${e} ${r} [${t}] in ${n}`}},L=class{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new R(e+this.start,e+this.end)}},S=class{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}},D=class extends S{constructor(e,t,r){super(e,t),this.nameSpan=r}},E=class extends S{visit(e,t=null){}},b=class extends S{visit(e,t=null){return e.visitImplicitReceiver(this,t)}},we=class extends b{visit(e,t=null){var r;return(r=e.visitThisReceiver)==null?void 0:r.call(e,this,t)}},V=class extends S{constructor(e,t,r){super(e,t),this.expressions=r}visit(e,t=null){return e.visitChain(this,t)}},W=class extends S{constructor(e,t,r,n,i){super(e,t),this.condition=r,this.trueExp=n,this.falseExp=i}visit(e,t=null){return e.visitConditional(this,t)}},K=class extends D{constructor(e,t,r,n,i){super(e,t,r),this.receiver=n,this.name=i}visit(e,t=null){return e.visitPropertyRead(this,t)}},Q=class extends D{constructor(e,t,r,n,i,a){super(e,t,r),this.receiver=n,this.name=i,this.value=a}visit(e,t=null){return e.visitPropertyWrite(this,t)}},H=class extends D{constructor(e,t,r,n,i){super(e,t,r),this.receiver=n,this.name=i}visit(e,t=null){return e.visitSafePropertyRead(this,t)}},j=class extends S{constructor(e,t,r,n){super(e,t),this.receiver=r,this.key=n}visit(e,t=null){return e.visitKeyedRead(this,t)}},z=class extends S{constructor(e,t,r,n){super(e,t),this.receiver=r,this.key=n}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}},q=class extends S{constructor(e,t,r,n,i){super(e,t),this.receiver=r,this.key=n,this.value=i}visit(e,t=null){return e.visitKeyedWrite(this,t)}},X=class extends D{constructor(e,t,r,n,i,a){super(e,t,a),this.exp=r,this.name=n,this.args=i}visit(e,t=null){return e.visitPipe(this,t)}},A=class extends S{constructor(e,t,r){super(e,t),this.value=r}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}},Z=class extends S{constructor(e,t,r){super(e,t),this.expressions=r}visit(e,t=null){return e.visitLiteralArray(this,t)}},J=class extends S{constructor(e,t,r,n){super(e,t),this.keys=r,this.values=n}visit(e,t=null){return e.visitLiteralMap(this,t)}},ye=class extends S{constructor(e,t,r,n){super(e,t),this.strings=r,this.expressions=n}visit(e,t=null){return e.visitInterpolation(this,t)}},$=class extends S{constructor(e,t,r,n,i){super(e,t),this.operation=r,this.left=n,this.right=i}visit(e,t=null){return e.visitBinary(this,t)}},I=class extends ${static createMinus(e,t,r){return new I(e,t,"-",r,"-",new A(e,t,0),r)}static createPlus(e,t,r){return new I(e,t,"+",r,"-",r,new A(e,t,0))}constructor(e,t,r,n,i,a,h){super(e,t,i,a,h),this.operator=r,this.expr=n,this.left=null,this.right=null,this.operation=null}visit(e,t=null){return e.visitUnary!==void 0?e.visitUnary(this,t):e.visitBinary(this,t)}},Y=class extends S{constructor(e,t,r){super(e,t),this.expression=r}visit(e,t=null){return e.visitPrefixNot(this,t)}},ee=class extends S{constructor(e,t,r){super(e,t),this.expression=r}visit(e,t=null){return e.visitNonNullAssert(this,t)}},te=class extends S{constructor(e,t,r,n,i){super(e,t),this.receiver=r,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitCall(this,t)}},re=class extends S{constructor(e,t,r,n,i){super(e,t),this.receiver=r,this.args=n,this.argumentSpan=i}visit(e,t=null){return e.visitSafeCall(this,t)}},R=class{constructor(e,t){this.start=e,this.end=t}},P=class extends S{constructor(e,t,r,n,i){super(new L(0,t===null?0:t.length),new R(n,t===null?n:n+t.length)),this.ast=e,this.source=t,this.location=r,this.errors=i}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}},T=class{constructor(e,t,r){this.sourceSpan=e,this.key=t,this.value=r}},se=class{constructor(e,t,r){this.sourceSpan=e,this.key=t,this.value=r}},Ee=class{visit(e,t){e.visit(this,t)}visitUnary(e,t){this.visit(e.expr,t)}visitBinary(e,t){this.visit(e.left,t),this.visit(e.right,t)}visitChain(e,t){this.visitAll(e.expressions,t)}visitConditional(e,t){this.visit(e.condition,t),this.visit(e.trueExp,t),this.visit(e.falseExp,t)}visitPipe(e,t){this.visit(e.exp,t),this.visitAll(e.args,t)}visitImplicitReceiver(e,t){}visitThisReceiver(e,t){}visitInterpolation(e,t){this.visitAll(e.expressions,t)}visitKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitKeyedWrite(e,t){this.visit(e.receiver,t),this.visit(e.key,t),this.visit(e.value,t)}visitLiteralArray(e,t){this.visitAll(e.expressions,t)}visitLiteralMap(e,t){this.visitAll(e.values,t)}visitLiteralPrimitive(e,t){}visitPrefixNot(e,t){this.visit(e.expression,t)}visitNonNullAssert(e,t){this.visit(e.expression,t)}visitPropertyRead(e,t){this.visit(e.receiver,t)}visitPropertyWrite(e,t){this.visit(e.receiver,t),this.visit(e.value,t)}visitSafePropertyRead(e,t){this.visit(e.receiver,t)}visitSafeKeyedRead(e,t){this.visit(e.receiver,t),this.visit(e.key,t)}visitCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitSafeCall(e,t){this.visit(e.receiver,t),this.visitAll(e.args,t)}visitAll(e,t){for(let r of e)this.visit(r,t)}};var et;(function(s){s[s.DEFAULT=0]="DEFAULT",s[s.LITERAL_ATTR=1]="LITERAL_ATTR",s[s.ANIMATION=2]="ANIMATION"})(et||(et={}));function tt(s){return s>=9&&s<=32||s==160}function B(s){return 48<=s&&s<=57}function rt(s){return s>=97&&s<=122||s>=65&&s<=90}function Be(s){return s===39||s===34||s===96}var d;(function(s){s[s.Character=0]="Character",s[s.Identifier=1]="Identifier",s[s.PrivateIdentifier=2]="PrivateIdentifier",s[s.Keyword=3]="Keyword",s[s.String=4]="String",s[s.Operator=5]="Operator",s[s.Number=6]="Number",s[s.Error=7]="Error"})(d||(d={}));var dr=["var","let","as","null","undefined","true","false","if","else","this"],xe=class{tokenize(e){let t=new _e(e),r=[],n=t.scanToken();for(;n!=null;)r.push(n),n=t.scanToken();return r}},N=class{constructor(e,t,r,n,i){this.index=e,this.end=t,this.type=r,this.numValue=n,this.strValue=i}isCharacter(e){return this.type==d.Character&&this.numValue==e}isNumber(){return this.type==d.Number}isString(){return this.type==d.String}isOperator(e){return this.type==d.Operator&&this.strValue==e}isIdentifier(){return this.type==d.Identifier}isPrivateIdentifier(){return this.type==d.PrivateIdentifier}isKeyword(){return this.type==d.Keyword}isKeywordLet(){return this.type==d.Keyword&&this.strValue=="let"}isKeywordAs(){return this.type==d.Keyword&&this.strValue=="as"}isKeywordNull(){return this.type==d.Keyword&&this.strValue=="null"}isKeywordUndefined(){return this.type==d.Keyword&&this.strValue=="undefined"}isKeywordTrue(){return this.type==d.Keyword&&this.strValue=="true"}isKeywordFalse(){return this.type==d.Keyword&&this.strValue=="false"}isKeywordThis(){return this.type==d.Keyword&&this.strValue=="this"}isError(){return this.type==d.Error}toNumber(){return this.type==d.Number?this.numValue:-1}toString(){switch(this.type){case d.Character:case d.Identifier:case d.Keyword:case d.Operator:case d.PrivateIdentifier:case d.String:case d.Error:return this.strValue;case d.Number:return this.numValue.toString();default:return null}}};function ot(s,e,t){return new N(s,e,d.Character,t,String.fromCharCode(t))}function vr(s,e,t){return new N(s,e,d.Identifier,0,t)}function gr(s,e,t){return new N(s,e,d.PrivateIdentifier,0,t)}function mr(s,e,t){return new N(s,e,d.Keyword,0,t)}function Te(s,e,t){return new N(s,e,d.Operator,0,t)}function Sr(s,e,t){return new N(s,e,d.String,0,t)}function wr(s,e,t){return new N(s,e,d.Number,t,"")}function yr(s,e,t){return new N(s,e,d.Error,0,t)}var Oe=new N(-1,-1,d.Character,0,""),_e=class{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){let e=this.input,t=this.length,r=this.peek,n=this.index;for(;r<=32;)if(++n>=t){r=0;break}else r=e.charCodeAt(n);if(this.peek=r,this.index=n,n>=t)return null;if(ct(r))return this.scanIdentifier();if(B(r))return this.scanNumber(n);let i=n;switch(r){case 46:return this.advance(),B(this.peek)?this.scanNumber(i):ot(i,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(i,r);case 39:case 34:return this.scanString();case 35:return this.scanPrivateIdentifier();case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(i,String.fromCharCode(r));case 63:return this.scanQuestion(i);case 60:case 62:return this.scanComplexOperator(i,String.fromCharCode(r),61,"=");case 33:case 61:return this.scanComplexOperator(i,String.fromCharCode(r),61,"=",61,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case 160:for(;tt(this.peek);)this.advance();return this.scanToken()}return this.advance(),this.error(`Unexpected character [${String.fromCharCode(r)}]`,0)}scanCharacter(e,t){return this.advance(),ot(e,this.index,t)}scanOperator(e,t){return this.advance(),Te(e,this.index,t)}scanComplexOperator(e,t,r,n,i,a){this.advance();let h=t;return this.peek==r&&(this.advance(),h+=n),i!=null&&this.peek==i&&(this.advance(),h+=a),Te(e,this.index,h)}scanIdentifier(){let e=this.index;for(this.advance();ht(this.peek);)this.advance();let t=this.input.substring(e,this.index);return dr.indexOf(t)>-1?mr(e,this.index,t):vr(e,this.index,t)}scanPrivateIdentifier(){let e=this.index;if(this.advance(),!ct(this.peek))return this.error("Invalid character [#]",-1);for(;ht(this.peek);)this.advance();let t=this.input.substring(e,this.index);return gr(e,this.index,t)}scanNumber(e){let t=this.index===e,r=!1;for(this.advance();;){if(!B(this.peek))if(this.peek===95){if(!B(this.input.charCodeAt(this.index-1))||!B(this.input.charCodeAt(this.index+1)))return this.error("Invalid numeric separator",0);r=!0}else if(this.peek===46)t=!1;else if(Er(this.peek)){if(this.advance(),Ar(this.peek)&&this.advance(),!B(this.peek))return this.error("Invalid exponent",-1);t=!1}else break;this.advance()}let n=this.input.substring(e,this.index);r&&(n=n.replace(/_/g,""));let i=t?Cr(n):parseFloat(n);return wr(e,this.index,i)}scanString(){let e=this.index,t=this.peek;this.advance();let r="",n=this.index,i=this.input;for(;this.peek!=t;)if(this.peek==92){r+=i.substring(n,this.index);let h;if(this.advance(),this.peek==117){let v=i.substring(this.index+1,this.index+5);if(/^[0-9a-f]+$/i.test(v))h=parseInt(v,16);else return this.error(`Invalid unicode escape [\\u${v}]`,0);for(let f=0;f<5;f++)this.advance()}else h=$r(this.peek),this.advance();r+=String.fromCharCode(h),n=this.index}else{if(this.peek==0)return this.error("Unterminated quote",0);this.advance()}let a=i.substring(n,this.index);return this.advance(),Sr(e,this.index,r+a)}scanQuestion(e){this.advance();let t="?";return(this.peek===63||this.peek===46)&&(t+=this.peek===46?".":"?",this.advance()),Te(e,this.index,t)}error(e,t){let r=this.index+t;return yr(r,this.index,`Lexer Error: ${e} at column ${r} in expression [${this.input}]`)}};function ct(s){return 97<=s&&s<=122||65<=s&&s<=90||s==95||s==36}function ht(s){return rt(s)||B(s)||s==95||s==36}function Er(s){return s==101||s==69}function Ar(s){return s==45||s==43}function $r(s){switch(s){case 110:return 10;case 102:return 12;case 114:return 13;case 116:return 9;case 118:return 11;default:return s}}function Cr(s){let e=parseInt(s);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+s);return e}var Or=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];function xt(s,e){if(e!=null&&!(Array.isArray(e)&&e.length==2))throw new Error(`Expected '${s}' to be an array, [start, end].`);if(e!=null){let t=e[0],r=e[1];Or.forEach(n=>{if(n.test(t)||n.test(r))throw new Error(`['${t}', '${r}'] contains unusable interpolation symbol.`)})}}var ve=class{static fromArray(e){return e?(xt("interpolation",e),new ve(e[0],e[1])):F}constructor(e,t){this.start=e,this.end=t}},F=new ve("{{","}}");var Fe=class{constructor(e,t,r){this.strings=e,this.expressions=t,this.offsets=r}},Ue=class{constructor(e,t,r){this.templateBindings=e,this.warnings=t,this.errors=r}},ge=class{constructor(e){this._lexer=e,this.errors=[]}parseAction(e,t,r,n,i=F){this._checkNoInterpolation(e,r,i);let a=this._stripComments(e),h=this._lexer.tokenize(a),v=1;t&&(v|=2);let f=new U(e,r,n,h,v,this.errors,0).parseChain();return new P(f,e,r,n,this.errors)}parseBinding(e,t,r,n=F){let i=this._parseBindingAst(e,t,r,n);return new P(i,e,t,r,this.errors)}checkSimpleExpression(e){let t=new Ge;return e.visit(t),t.errors}parseSimpleBinding(e,t,r,n=F){let i=this._parseBindingAst(e,t,r,n),a=this.checkSimpleExpression(i);return a.length>0&&this._reportError(`Host binding expression cannot contain ${a.join(" ")}`,e,t),new P(i,e,t,r,this.errors)}_reportError(e,t,r,n){this.errors.push(new G(e,t,r,n))}_parseBindingAst(e,t,r,n){this._checkNoInterpolation(e,t,n);let i=this._stripComments(e),a=this._lexer.tokenize(i);return new U(e,t,r,a,0,this.errors,0).parseChain()}parseTemplateBindings(e,t,r,n,i){let a=this._lexer.tokenize(t);return new U(t,r,i,a,0,this.errors,0).parseTemplateBindings({source:e,span:new R(n,n+e.length)})}parseInterpolation(e,t,r,n,i=F){let{strings:a,expressions:h,offsets:v}=this.splitInterpolation(e,t,n,i);if(h.length===0)return null;let f=[];for(let w=0;w<h.length;++w){let k=h[w].text,C=this._stripComments(k),y=this._lexer.tokenize(C),m=new U(e,t,r,y,0,this.errors,v[w]).parseChain();f.push(m)}return this.createInterpolationAst(a.map(w=>w.text),f,e,t,r)}parseInterpolationExpression(e,t,r){let n=this._stripComments(e),i=this._lexer.tokenize(n),a=new U(e,t,r,i,0,this.errors,0).parseChain(),h=["",""];return this.createInterpolationAst(h,[a],e,t,r)}createInterpolationAst(e,t,r,n,i){let a=new L(0,r.length),h=new ye(a,a.toAbsolute(i),e,t);return new P(h,r,n,i,this.errors)}splitInterpolation(e,t,r,n=F){let i=[],a=[],h=[],v=r?Nr(r):null,f=0,w=!1,k=!1,{start:C,end:y}=n;for(;f<e.length;)if(w){let m=f,c=m+C.length,o=this._getInterpolationEndIndex(e,y,c);if(o===-1){w=!1,k=!0;break}let x=o+y.length,p=e.substring(c,o);p.trim().length===0&&this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${f} in`,t),a.push({text:p,start:m,end:x});let g=((v==null?void 0:v.get(m))??m)+C.length;h.push(g),f=x,w=!1}else{let m=f;f=e.indexOf(C,f),f===-1&&(f=e.length);let c=e.substring(m,f);i.push({text:c,start:m,end:f}),w=!0}if(!w)if(k){let m=i[i.length-1];m.text+=e.substring(f),m.end=e.length}else i.push({text:e.substring(f),start:f,end:e.length});return new Fe(i,a,h)}wrapLiteralPrimitive(e,t,r){let n=new L(0,e==null?0:e.length);return new P(new A(n,n.toAbsolute(r),e),e,t,r,this.errors)}_stripComments(e){let t=this._commentStart(e);return t!=null?e.substring(0,t):e}_commentStart(e){let t=null;for(let r=0;r<e.length-1;r++){let n=e.charCodeAt(r),i=e.charCodeAt(r+1);if(n===47&&i==47&&t==null)return r;t===n?t=null:t==null&&Be(n)&&(t=n)}return null}_checkNoInterpolation(e,t,{start:r,end:n}){let i=-1,a=-1;for(let h of this._forEachUnquotedChar(e,0))if(i===-1)e.startsWith(r)&&(i=h);else if(a=this._getInterpolationEndIndex(e,n,h),a>-1)break;i>-1&&a>-1&&this._reportError(`Got interpolation (${r}${n}) where expression was expected`,e,`at column ${i} in`,t)}_getInterpolationEndIndex(e,t,r){for(let n of this._forEachUnquotedChar(e,r)){if(e.startsWith(t,n))return n;if(e.startsWith("//",n))return e.indexOf(t,n)}return-1}*_forEachUnquotedChar(e,t){let r=null,n=0;for(let i=t;i<e.length;i++){let a=e[i];Be(e.charCodeAt(i))&&(r===null||r===a)&&n%2===0?r=r===null?a:null:r===null&&(yield i),n=a==="\\"?n+1:0}}},he;(function(s){s[s.None=0]="None",s[s.Writable=1]="Writable"})(he||(he={}));var U=class{constructor(e,t,r,n,i,a,h){this.input=e,this.location=t,this.absoluteOffset=r,this.tokens=n,this.parseFlags=i,this.errors=a,this.offset=h,this.rparensExpected=0,this.rbracketsExpected=0,this.rbracesExpected=0,this.context=he.None,this.sourceSpanCache=new Map,this.index=0}peek(e){let t=this.index+e;return t<this.tokens.length?this.tokens[t]:Oe}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(){return this.index>0?this.peek(-1).end+this.offset:this.tokens.length===0?this.input.length+this.offset:this.next.index+this.offset}get currentAbsoluteOffset(){return this.absoluteOffset+this.inputIndex}span(e,t){let r=this.currentEndIndex;if(t!==void 0&&t>this.currentEndIndex&&(r=t),e>r){let n=r;r=e,e=n}return new L(e,r)}sourceSpan(e,t){let r=`${e}@${this.inputIndex}:${t}`;return this.sourceSpanCache.has(r)||this.sourceSpanCache.set(r,this.span(e,t).toAbsolute(this.absoluteOffset)),this.sourceSpanCache.get(r)}advance(){this.index++}withContext(e,t){this.context|=e;let r=t();return this.context^=e,r}consumeOptionalCharacter(e){return this.next.isCharacter(e)?(this.advance(),!0):!1}peekKeywordLet(){return this.next.isKeywordLet()}peekKeywordAs(){return this.next.isKeywordAs()}expectCharacter(e){this.consumeOptionalCharacter(e)||this.error(`Missing expected ${String.fromCharCode(e)}`)}consumeOptionalOperator(e){return this.next.isOperator(e)?(this.advance(),!0):!1}expectOperator(e){this.consumeOptionalOperator(e)||this.error(`Missing expected operator ${e}`)}prettyPrintToken(e){return e===Oe?"end of input":`token ${e}`}expectIdentifierOrKeyword(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier or keyword"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier or keyword`),null):(this.advance(),e.toString())}expectIdentifierOrKeywordOrString(){let e=this.next;return!e.isIdentifier()&&!e.isKeyword()&&!e.isString()?(e.isPrivateIdentifier()?this._reportErrorForPrivateIdentifier(e,"expected identifier, keyword or string"):this.error(`Unexpected ${this.prettyPrintToken(e)}, expected identifier, keyword, or string`),""):(this.advance(),e.toString())}parseChain(){let e=[],t=this.inputIndex;for(;this.index<this.tokens.length;){let r=this.parsePipe();if(e.push(r),this.consumeOptionalCharacter(59))for(this.parseFlags&1||this.error("Binding expression cannot contain chained expression");this.consumeOptionalCharacter(59););else if(this.index<this.tokens.length){let n=this.index;if(this.error(`Unexpected token '${this.next}'`),this.index===n)break}}if(e.length===0){let r=this.offset,n=this.offset+this.input.length;return new E(this.span(r,n),this.sourceSpan(r,n))}return e.length==1?e[0]:new V(this.span(t),this.sourceSpan(t),e)}parsePipe(){let e=this.inputIndex,t=this.parseExpression();if(this.consumeOptionalOperator("|")){this.parseFlags&1&&this.error("Cannot have a pipe in an action expression");do{let r=this.inputIndex,n=this.expectIdentifierOrKeyword(),i,a;n!==null?i=this.sourceSpan(r):(n="",a=this.next.index!==-1?this.next.index:this.input.length+this.offset,i=new L(a,a).toAbsolute(this.absoluteOffset));let h=[];for(;this.consumeOptionalCharacter(58);)h.push(this.parseExpression());t=new X(this.span(e),this.sourceSpan(e,a),t,n,h,i)}while(this.consumeOptionalOperator("|"))}return t}parseExpression(){return this.parseConditional()}parseConditional(){let e=this.inputIndex,t=this.parseLogicalOr();if(this.consumeOptionalOperator("?")){let r=this.parsePipe(),n;if(this.consumeOptionalCharacter(58))n=this.parsePipe();else{let i=this.inputIndex,a=this.input.substring(e,i);this.error(`Conditional expression ${a} requires all 3 expressions`),n=new E(this.span(e),this.sourceSpan(e))}return new W(this.span(e),this.sourceSpan(e),t,r,n)}else return t}parseLogicalOr(){let e=this.inputIndex,t=this.parseLogicalAnd();for(;this.consumeOptionalOperator("||");){let r=this.parseLogicalAnd();t=new $(this.span(e),this.sourceSpan(e),"||",t,r)}return t}parseLogicalAnd(){let e=this.inputIndex,t=this.parseNullishCoalescing();for(;this.consumeOptionalOperator("&&");){let r=this.parseNullishCoalescing();t=new $(this.span(e),this.sourceSpan(e),"&&",t,r)}return t}parseNullishCoalescing(){let e=this.inputIndex,t=this.parseEquality();for(;this.consumeOptionalOperator("??");){let r=this.parseEquality();t=new $(this.span(e),this.sourceSpan(e),"??",t,r)}return t}parseEquality(){let e=this.inputIndex,t=this.parseRelational();for(;this.next.type==d.Operator;){let r=this.next.strValue;switch(r){case"==":case"===":case"!=":case"!==":this.advance();let n=this.parseRelational();t=new $(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseRelational(){let e=this.inputIndex,t=this.parseAdditive();for(;this.next.type==d.Operator;){let r=this.next.strValue;switch(r){case"<":case">":case"<=":case">=":this.advance();let n=this.parseAdditive();t=new $(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseAdditive(){let e=this.inputIndex,t=this.parseMultiplicative();for(;this.next.type==d.Operator;){let r=this.next.strValue;switch(r){case"+":case"-":this.advance();let n=this.parseMultiplicative();t=new $(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parseMultiplicative(){let e=this.inputIndex,t=this.parsePrefix();for(;this.next.type==d.Operator;){let r=this.next.strValue;switch(r){case"*":case"%":case"/":this.advance();let n=this.parsePrefix();t=new $(this.span(e),this.sourceSpan(e),r,t,n);continue}break}return t}parsePrefix(){if(this.next.type==d.Operator){let e=this.inputIndex,t=this.next.strValue,r;switch(t){case"+":return this.advance(),r=this.parsePrefix(),I.createPlus(this.span(e),this.sourceSpan(e),r);case"-":return this.advance(),r=this.parsePrefix(),I.createMinus(this.span(e),this.sourceSpan(e),r);case"!":return this.advance(),r=this.parsePrefix(),new Y(this.span(e),this.sourceSpan(e),r)}}return this.parseCallChain()}parseCallChain(){let e=this.inputIndex,t=this.parsePrimary();for(;;)if(this.consumeOptionalCharacter(46))t=this.parseAccessMember(t,e,!1);else if(this.consumeOptionalOperator("?."))this.consumeOptionalCharacter(40)?t=this.parseCall(t,e,!0):t=this.consumeOptionalCharacter(91)?this.parseKeyedReadOrWrite(t,e,!0):this.parseAccessMember(t,e,!0);else if(this.consumeOptionalCharacter(91))t=this.parseKeyedReadOrWrite(t,e,!1);else if(this.consumeOptionalCharacter(40))t=this.parseCall(t,e,!1);else if(this.consumeOptionalOperator("!"))t=new ee(this.span(e),this.sourceSpan(e),t);else return t}parsePrimary(){let e=this.inputIndex;if(this.consumeOptionalCharacter(40)){this.rparensExpected++;let t=this.parsePipe();return this.rparensExpected--,this.expectCharacter(41),t}else{if(this.next.isKeywordNull())return this.advance(),new A(this.span(e),this.sourceSpan(e),null);if(this.next.isKeywordUndefined())return this.advance(),new A(this.span(e),this.sourceSpan(e),void 0);if(this.next.isKeywordTrue())return this.advance(),new A(this.span(e),this.sourceSpan(e),!0);if(this.next.isKeywordFalse())return this.advance(),new A(this.span(e),this.sourceSpan(e),!1);if(this.next.isKeywordThis())return this.advance(),new we(this.span(e),this.sourceSpan(e));if(this.consumeOptionalCharacter(91)){this.rbracketsExpected++;let t=this.parseExpressionList(93);return this.rbracketsExpected--,this.expectCharacter(93),new Z(this.span(e),this.sourceSpan(e),t)}else{if(this.next.isCharacter(123))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMember(new b(this.span(e),this.sourceSpan(e)),e,!1);if(this.next.isNumber()){let t=this.next.toNumber();return this.advance(),new A(this.span(e),this.sourceSpan(e),t)}else if(this.next.isString()){let t=this.next.toString();return this.advance(),new A(this.span(e),this.sourceSpan(e),t)}else return this.next.isPrivateIdentifier()?(this._reportErrorForPrivateIdentifier(this.next,null),new E(this.span(e),this.sourceSpan(e))):this.index>=this.tokens.length?(this.error(`Unexpected end of expression: ${this.input}`),new E(this.span(e),this.sourceSpan(e))):(this.error(`Unexpected token ${this.next}`),new E(this.span(e),this.sourceSpan(e)))}}}parseExpressionList(e){let t=[];do if(!this.next.isCharacter(e))t.push(this.parsePipe());else break;while(this.consumeOptionalCharacter(44));return t}parseLiteralMap(){let e=[],t=[],r=this.inputIndex;if(this.expectCharacter(123),!this.consumeOptionalCharacter(125)){this.rbracesExpected++;do{let n=this.inputIndex,i=this.next.isString(),a=this.expectIdentifierOrKeywordOrString();if(e.push({key:a,quoted:i}),i)this.expectCharacter(58),t.push(this.parsePipe());else if(this.consumeOptionalCharacter(58))t.push(this.parsePipe());else{let h=this.span(n),v=this.sourceSpan(n);t.push(new K(h,v,v,new b(h,v),a))}}while(this.consumeOptionalCharacter(44)&&!this.next.isCharacter(125));this.rbracesExpected--,this.expectCharacter(125)}return new J(this.span(r),this.sourceSpan(r),e,t)}parseAccessMember(e,t,r){let n=this.inputIndex,i=this.withContext(he.Writable,()=>{let v=this.expectIdentifierOrKeyword()??"";return v.length===0&&this.error("Expected identifier for property access",e.span.end),v}),a=this.sourceSpan(n),h;if(r)this.consumeOptionalAssignment()?(this.error("The '?.' operator cannot be used in the assignment"),h=new E(this.span(t),this.sourceSpan(t))):h=new H(this.span(t),this.sourceSpan(t),a,e,i);else if(this.consumeOptionalAssignment()){if(!(this.parseFlags&1))return this.error("Bindings cannot contain assignments"),new E(this.span(t),this.sourceSpan(t));let v=this.parseConditional();h=new Q(this.span(t),this.sourceSpan(t),a,e,i,v)}else h=new K(this.span(t),this.sourceSpan(t),a,e,i);return h}parseCall(e,t,r){let n=this.inputIndex;this.rparensExpected++;let i=this.parseCallArguments(),a=this.span(n,this.inputIndex).toAbsolute(this.absoluteOffset);this.expectCharacter(41),this.rparensExpected--;let h=this.span(t),v=this.sourceSpan(t);return r?new re(h,v,e,i,a):new te(h,v,e,i,a)}consumeOptionalAssignment(){return this.parseFlags&2&&this.next.isOperator("!")&&this.peek(1).isOperator("=")?(this.advance(),this.advance(),!0):this.consumeOptionalOperator("=")}parseCallArguments(){if(this.next.isCharacter(41))return[];let e=[];do e.push(this.parsePipe());while(this.consumeOptionalCharacter(44));return e}expectTemplateBindingKey(){let e="",t=!1,r=this.currentAbsoluteOffset;do e+=this.expectIdentifierOrKeywordOrString(),t=this.consumeOptionalOperator("-"),t&&(e+="-");while(t);return{source:e,span:new R(r,r+e.length)}}parseTemplateBindings(e){let t=[];for(t.push(...this.parseDirectiveKeywordBindings(e));this.index<this.tokens.length;){let r=this.parseLetBinding();if(r)t.push(r);else{let n=this.expectTemplateBindingKey(),i=this.parseAsBinding(n);i?t.push(i):(n.source=e.source+n.source.charAt(0).toUpperCase()+n.source.substring(1),t.push(...this.parseDirectiveKeywordBindings(n)))}this.consumeStatementTerminator()}return new Ue(t,[],this.errors)}parseKeyedReadOrWrite(e,t,r){return this.withContext(he.Writable,()=>{this.rbracketsExpected++;let n=this.parsePipe();if(n instanceof E&&this.error("Key access cannot be empty"),this.rbracketsExpected--,this.expectCharacter(93),this.consumeOptionalOperator("="))if(r)this.error("The '?.' operator cannot be used in the assignment");else{let i=this.parseConditional();return new q(this.span(t),this.sourceSpan(t),e,n,i)}else return r?new z(this.span(t),this.sourceSpan(t),e,n):new j(this.span(t),this.sourceSpan(t),e,n);return new E(this.span(t),this.sourceSpan(t))})}parseDirectiveKeywordBindings(e){let t=[];this.consumeOptionalCharacter(58);let r=this.getDirectiveBoundTarget(),n=this.currentAbsoluteOffset,i=this.parseAsBinding(e);i||(this.consumeStatementTerminator(),n=this.currentAbsoluteOffset);let a=new R(e.span.start,n);return t.push(new se(a,e,r)),i&&t.push(i),t}getDirectiveBoundTarget(){if(this.next===Oe||this.peekKeywordAs()||this.peekKeywordLet())return null;let e=this.parsePipe(),{start:t,end:r}=e.span,n=this.input.substring(t,r);return new P(e,n,this.location,this.absoluteOffset+t,this.errors)}parseAsBinding(e){if(!this.peekKeywordAs())return null;this.advance();let t=this.expectTemplateBindingKey();this.consumeStatementTerminator();let r=new R(e.span.start,this.currentAbsoluteOffset);return new T(r,t,e)}parseLetBinding(){if(!this.peekKeywordLet())return null;let e=this.currentAbsoluteOffset;this.advance();let t=this.expectTemplateBindingKey(),r=null;this.consumeOptionalOperator("=")&&(r=this.expectTemplateBindingKey()),this.consumeStatementTerminator();let n=new R(e,this.currentAbsoluteOffset);return new T(n,t,r)}consumeStatementTerminator(){this.consumeOptionalCharacter(59)||this.consumeOptionalCharacter(44)}error(e,t=null){this.errors.push(new G(e,this.input,this.locationText(t),this.location)),this.skip()}locationText(e=null){return e==null&&(e=this.index),e<this.tokens.length?`at column ${this.tokens[e].index+1} in`:"at the end of the expression"}_reportErrorForPrivateIdentifier(e,t){let r=`Private identifiers are not supported. Unexpected private identifier: ${e}`;t!==null&&(r+=`, ${t}`),this.error(r)}skip(){let e=this.next;for(;this.index<this.tokens.length&&!e.isCharacter(59)&&!e.isOperator("|")&&(this.rparensExpected<=0||!e.isCharacter(41))&&(this.rbracesExpected<=0||!e.isCharacter(125))&&(this.rbracketsExpected<=0||!e.isCharacter(93))&&(!(this.context&he.Writable)||!e.isOperator("="));)this.next.isError()&&this.errors.push(new G(this.next.toString(),this.input,this.locationText(),this.location)),this.advance(),e=this.next}},Ge=class extends Ee{constructor(){super(...arguments),this.errors=[]}visitPipe(){this.errors.push("pipes")}};function Nr(s){let e=new Map,t=0,r=0,n=0;for(;n<s.length;){let i=s[n];if(i.type===9){let[a,h]=i.parts;t+=h.length,r+=a.length}else{let a=i.parts.reduce((h,v)=>h+v.length,0);r+=a,t+=a}e.set(r,t),n++}return e}var dt="angular-estree-parser",Ve="NgEstreeParser",De=0,We=[dt,De];function vt(){return new ge(new xe)}function Qe(s,e){let t=vt(),{astInput:r,comments:n}=Ir(s,t),{ast:i,errors:a}=e(r,t);return yt(a),{ast:i,comments:n}}function gt(s){return Qe(s,(e,t)=>t.parseBinding(e,...We))}function mt(s){return Qe(s,(e,t)=>t.parseAction(e,!1,...We))}function St(s){return Qe(s,(e,t)=>{let r=t.parseInterpolationExpression(e,...We);return r.ast=r.ast.expressions[0],r})}function wt(s){let e=vt(),{templateBindings:t,errors:r}=e.parseTemplateBindings(Ve,s,dt,De,De);return yt(r),t}function yt(s){if(s.length!==0){let[{message:e}]=s;throw new SyntaxError(e.replace(/^Parser Error: | at column \d+ in [^]*$/g,""))}}function Ir(s,e){let t=e._commentStart(s);return t===null?{astInput:s,comments:[]}:{astInput:s.slice(0,t),comments:[{type:"Comment",value:s.slice(t+2),sourceSpan:{start:t,end:s.length}}]}}function Et(s){return s instanceof I?"Unary":s instanceof $?"Binary":s instanceof X?"BindingPipe":s instanceof te?"Call":s instanceof V?"Chain":s instanceof W?"Conditional":s instanceof E?"EmptyExpr":s instanceof b?"ImplicitReceiver":s instanceof j?"KeyedRead":s instanceof z?"SafeKeyedRead":s instanceof q?"KeyedWrite":s instanceof Z?"LiteralArray":s instanceof J?"LiteralMap":s instanceof A?"LiteralPrimitive":s instanceof ee?"NonNullAssert":s instanceof Y?"PrefixNot":s instanceof K?"PropertyRead":s instanceof Q?"PropertyWrite":s instanceof re?"SafeCall":s instanceof H?"SafePropertyRead":s.type}function ft({start:s,end:e},t){let r=s,n=e;for(;n!==r&&/\s/.test(t[n-1]);)n--;for(;r!==n&&/\s/.test(t[r]);)r++;return{start:r,end:n}}function Rr({start:s,end:e},t){let r=s,n=e;for(;n!==t.length&&/\s/.test(t[n]);)n++;for(;r!==0&&/\s/.test(t[r-1]);)r--;return{start:r,end:n}}function Pr(s,e){return e[s.start-1]==="("&&e[s.end]===")"?{start:s.start-1,end:s.end+1}:s}function At(s,e,t){let r=0,n={start:s.start,end:s.end};for(;;){let i=Rr(n,e),a=Pr(i,e);if(i.start===a.start&&i.end===a.end)break;n.start=a.start,n.end=a.end,r++}return{hasParens:(t?r-1:r)!==0,outerSpan:ft(t?{start:n.start+1,end:n.end-1}:n,e),innerSpan:ft(s,e)}}function $t(s,e,t){let r=e;for(;!s.test(t[r]);)if(--r<0)throw new Error(`Cannot find front char ${s} from index ${e} in ${JSON.stringify(t)}`);return r}function Ne(s,e,t){let r=e;for(;!s.test(t[r]);)if(++r>=t.length)throw new Error(`Cannot find back char ${s} from index ${e} in ${JSON.stringify(t)}`);return r}function Ct(s){return s.slice(0,1).toLowerCase()+s.slice(1)}function Ot(s){return s.length===0?void 0:s[s.length-1]}var pe=(s,e,t=!1)=>{let r=Et(s);switch(r){case"Unary":{let{operator:c,expr:o}=s,x=n(o);return a("UnaryExpression",{prefix:!0,argument:x,operator:c},s.sourceSpan,{hasParentParens:t})}case"Binary":{let{left:c,operation:o,right:x}=s,p=n(c),u=n(x);return a(o==="&&"||o==="||"||o==="??"?"LogicalExpression":"BinaryExpression",{left:p,right:u,operator:o},{start:y(p),end:m(u)},{hasParentParens:t})}case"BindingPipe":{let{exp:c,name:o,args:x}=s,p=n(c),u=f(/\S/,f(/\|/,m(p))+1),g=a("Identifier",{name:o},{start:u,end:u+o.length}),l=x.map(n);return a("NGPipeExpression",{left:p,right:g,arguments:l},{start:y(p),end:m(l.length===0?g:Ot(l))},{hasParentParens:t})}case"Chain":{let{expressions:c}=s;return a("NGChainedExpression",{expressions:c.map(n)},s.sourceSpan,{hasParentParens:t})}case"Comment":{let{value:c}=s;return a("CommentLine",{value:c},s.sourceSpan,{processSpan:!1})}case"Conditional":{let{condition:c,trueExp:o,falseExp:x}=s,p=n(c),u=n(o),g=n(x);return a("ConditionalExpression",{test:p,consequent:u,alternate:g},{start:y(p),end:m(g)},{hasParentParens:t})}case"EmptyExpr":return a("NGEmptyExpression",{},s.sourceSpan,{hasParentParens:t});case"ImplicitReceiver":return a("ThisExpression",{},s.sourceSpan,{hasParentParens:t});case"KeyedRead":case"SafeKeyedRead":{let c=r==="SafeKeyedRead",{key:o}=s,x=Object.prototype.hasOwnProperty.call(s,"receiver")?s.receiver:s.obj,p=n(o);return h(x,p,{computed:!0,optional:c},{end:s.sourceSpan.end,hasParentParens:t})}case"LiteralArray":{let{expressions:c}=s;return a("ArrayExpression",{elements:c.map(n)},s.sourceSpan,{hasParentParens:t})}case"LiteralMap":{let{keys:c,values:o}=s,x=o.map(u=>n(u)),p=c.map(({key:u,quoted:g},l)=>{let O=x[l],ue=y(O),qe=m(O),Pe=f(/\S/,l===0?s.sourceSpan.start+1:f(/,/,m(x[l-1]))+1),bt=ue===Pe?qe:v(/\S/,v(/:/,ue-1)-1)+1,Xe={start:Pe,end:bt},me=g?a("StringLiteral",{value:u},Xe):a("Identifier",{name:u},Xe),Bt=me.end<me.start||Pe===ue;return a("ObjectProperty",{key:me,value:O,shorthand:Bt,computed:!1},{start:y(me),end:qe})});return a("ObjectExpression",{properties:p},s.sourceSpan,{hasParentParens:t})}case"LiteralPrimitive":{let{value:c}=s;switch(typeof c){case"boolean":return a("BooleanLiteral",{value:c},s.sourceSpan,{hasParentParens:t});case"number":return a("NumericLiteral",{value:c},s.sourceSpan,{hasParentParens:t});case"object":return a("NullLiteral",{},s.sourceSpan,{hasParentParens:t});case"string":return a("StringLiteral",{value:c},s.sourceSpan,{hasParentParens:t});case"undefined":return a("Identifier",{name:"undefined"},s.sourceSpan,{hasParentParens:t});default:throw new Error(`Unexpected LiteralPrimitive value type ${typeof c}`)}}case"Call":case"SafeCall":{let c=r==="SafeCall",{receiver:o,args:x}=s,p=x.length===1?[i(x[0])]:x.map(n),u=n(o),g=k(u),l=c||g?"OptionalCallExpression":"CallExpression";return a(l,{callee:u,arguments:p,optional:l==="OptionalCallExpression"?c:void 0},{start:y(u),end:s.sourceSpan.end},{hasParentParens:t})}case"NonNullAssert":{let{expression:c}=s,o=n(c);return a("TSNonNullExpression",{expression:o},{start:y(o),end:s.sourceSpan.end},{hasParentParens:t})}case"PrefixNot":{let{expression:c}=s,o=n(c);return a("UnaryExpression",{prefix:!0,operator:"!",argument:o},{start:s.sourceSpan.start,end:m(o)},{hasParentParens:t})}case"PropertyRead":case"SafePropertyRead":{let c=r==="SafePropertyRead",{receiver:o,name:x}=s,p=v(/\S/,s.sourceSpan.end-1)+1,u=a("Identifier",{name:x},{start:p-x.length,end:p},w(o)?{hasParentParens:t}:{});return h(o,u,{computed:!1,optional:c},{hasParentParens:t})}case"KeyedWrite":{let{key:c,value:o}=s,x=Object.prototype.hasOwnProperty.call(s,"receiver")?s.receiver:s.obj,p=n(c),u=n(o),g=h(x,p,{computed:!0,optional:!1},{end:f(/\]/,m(p))+1});return a("AssignmentExpression",{left:g,operator:"=",right:u},{start:y(g),end:m(u)},{hasParentParens:t})}case"PropertyWrite":{let{receiver:c,name:o,value:x}=s,p=n(x),u=v(/\S/,v(/=/,y(p)-1)-1)+1,g=a("Identifier",{name:o},{start:u-o.length,end:u}),l=h(c,g,{computed:!1,optional:!1});return a("AssignmentExpression",{left:l,operator:"=",right:p},{start:y(l),end:m(p)},{hasParentParens:t})}default:throw new Error(`Unexpected node ${r}`)}function n(c){return pe(c,e)}function i(c){return pe(c,e,!0)}function a(c,o,x,{processSpan:p=!0,hasParentParens:u=!1}={}){let g={type:c,...ke(x,e,p,u),...o};switch(c){case"NumericLiteral":{let l=g;l.extra={...l.extra,raw:e.text.slice(l.start,l.end),rawValue:l.value};break}case"StringLiteral":{let l=g;l.extra={...l.extra,raw:e.text.slice(l.start,l.end),rawValue:l.value};break}case"ObjectProperty":{let l=g;l.shorthand&&(l.extra={...l.extra,shorthand:l.shorthand});break}}return g}function h(c,o,x,{end:p=m(o),hasParentParens:u=!1}={}){if(w(c)||c.sourceSpan.start===o.start)return o;let g=n(c),l=k(g);return a(x.optional||l?"OptionalMemberExpression":"MemberExpression",{object:g,property:o,computed:x.computed,...x.optional?{optional:!0}:l?{optional:!1}:null},{start:y(g),end:p},{hasParentParens:u})}function v(c,o){return $t(c,o,e.text)}function f(c,o){return Ne(c,o,e.text)}function w(c){return c.sourceSpan.start>=c.sourceSpan.end||/^\s+$/.test(e.text.slice(c.sourceSpan.start,c.sourceSpan.end))}function k(c){return(c.type==="OptionalCallExpression"||c.type==="OptionalMemberExpression")&&!C(c)}function C(c){return c.extra&&c.extra.parenthesized}function y(c){return C(c)?c.extra.parenStart:c.start}function m(c){return C(c)?c.extra.parenEnd:c.end}};function ke(s,e,t=!1,r=!1){if(!t){let{start:h,end:v}=s;return{start:h,end:v,loc:{start:e.locator.locationForIndex(h),end:e.locator.locationForIndex(v)}}}let{outerSpan:n,innerSpan:i,hasParens:a}=At(s,e.text,r);return{start:i.start,end:i.end,loc:{start:e.locator.locationForIndex(i.start),end:e.locator.locationForIndex(i.end)},...a&&{extra:{parenthesized:!0,parenStart:n.start,parenEnd:n.end}}}}function Nt(s,e){s.forEach(y);let[t]=s,{key:r}=t,n=e.text.slice(t.sourceSpan.start,t.sourceSpan.end).trim().length===0?s.slice(1):s,i=[],a=null;for(let o=0;o<n.length;o++){let x=n[o];if(a&&k(a)&&C(x)&&x.value&&x.value.source===a.key.source){let p=f("NGMicrosyntaxKey",{name:x.key.source},x.key.span),u=(O,ue)=>({...O,...ke({start:O.start,end:ue},e)}),g=O=>({...u(O,p.end),alias:p}),l=i.pop();if(l.type==="NGMicrosyntaxExpression")i.push(g(l));else if(l.type==="NGMicrosyntaxKeyedExpression"){let O=g(l.expression);i.push(u({...l,expression:O},O.end))}else throw new Error(`Unexpected type ${l.type}`)}else i.push(h(x,o));a=x}return f("NGMicrosyntax",{body:i},i.length===0?s[0].sourceSpan:{start:i[0].start,end:i[i.length-1].end});function h(o,x){if(k(o)){let{key:p,value:u}=o;return u?x===0?f("NGMicrosyntaxExpression",{expression:v(u.ast),alias:null},u.sourceSpan):f("NGMicrosyntaxKeyedExpression",{key:f("NGMicrosyntaxKey",{name:w(p.source)},p.span),expression:f("NGMicrosyntaxExpression",{expression:v(u.ast),alias:null},u.sourceSpan)},{start:p.span.start,end:u.sourceSpan.end}):f("NGMicrosyntaxKey",{name:w(p.source)},p.span)}else{let{key:p,sourceSpan:u}=o;if(/^let\s$/.test(e.text.slice(u.start,u.start+4))){let{value:l}=o;return f("NGMicrosyntaxLet",{key:f("NGMicrosyntaxKey",{name:p.source},p.span),value:l?f("NGMicrosyntaxKey",{name:l.source},l.span):null},{start:u.start,end:l?l.span.end:p.span.end})}else{let l=c(o);return f("NGMicrosyntaxAs",{key:f("NGMicrosyntaxKey",{name:l.source},l.span),alias:f("NGMicrosyntaxKey",{name:p.source},p.span)},{start:l.span.start,end:p.span.end})}}}function v(o){return pe(o,e)}function f(o,x,p,u=!0){return{type:o,...ke(p,e,u),...x}}function w(o){return Ct(o.slice(r.source.length))}function k(o){return o instanceof se}function C(o){return o instanceof T}function y(o){m(o.key.span),C(o)&&o.value&&m(o.value.span)}function m(o){if(e.text[o.start]!=='"'&&e.text[o.start]!=="'")return;let x=e.text[o.start],p=!1;for(let u=o.start+1;u<e.text.length;u++)switch(e.text[u]){case x:if(!p){o.end=u+1;return}default:p=!1;break;case"\\":p=!p;break}}function c(o){if(!o.value||o.value.source!==Ve)return o.value;let x=Ne(/\S/,o.sourceSpan.start,e.text);return{source:"$implicit",span:{start:x,end:x}}}}function He(s,e){let{ast:t,comments:r}=e(s),n=new le(s),i=h=>pe(h,n),a=i(t);return a.comments=r.map(h=>i(h)),a}function kt(s){return He(s,gt)}function It(s){return He(s,St)}function je(s){return He(s,mt)}function Rt(s){return Nt(wt(s),new le(s))}function Lr(s){return Array.isArray(s)&&s.length>0}var Pt=Lr;function ze(s){var r;let e=s.range?s.range[0]:s.start,t=((r=s.declaration)==null?void 0:r.decorators)??s.decorators;return Pt(t)?Math.min(ze(t[0]),e):e}function Lt(s){return s.range?s.range[1]:s.end}function Ie(s){return{astFormat:"estree",parse(e){let t=s(e);return{type:"NGRoot",node:s===je&&t.type!=="NGChainedExpression"?{...t,type:"NGChainedExpression",expressions:[t]}:t}},locStart:ze,locEnd:Lt}}var br=Ie(je),Br=Ie(kt),Kr=Ie(It),Tr=Ie(Rt);var _r={parsers:Re};return Ft(Mr);}); |
@@ -1,18 +0,18 @@ | ||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.graphql=e()}})(function(){"use strict";var oe=Object.defineProperty;var Ct=Object.getOwnPropertyDescriptor;var St=Object.getOwnPropertyNames;var vt=Object.prototype.hasOwnProperty;var f=(e,t)=>()=>(e&&(t=e(e=0)),t);var ae=(e,t)=>{for(var n in t)oe(e,n,{get:t[n],enumerable:!0})},bt=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of St(t))!vt.call(e,r)&&r!==n&&oe(e,r,{get:()=>t[r],enumerable:!(i=Ct(t,r))||i.enumerable});return e};var Lt=e=>bt(oe({},"__esModule",{value:!0}),e);function Ve(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(e)}function Be(e){return`# @format | ||
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.graphql=e()}})(function(){"use strict";var se=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var rt=Object.getOwnPropertyNames;var st=Object.prototype.hasOwnProperty;var oe=(e,t)=>{for(var n in t)se(e,n,{get:t[n],enumerable:!0})},ot=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of rt(t))!st.call(e,i)&&i!==n&&se(e,i,{get:()=>t[i],enumerable:!(r=it(t,i))||r.enumerable});return e};var at=e=>ot(se({},"__esModule",{value:!0}),e);var ln={};oe(ln,{default:()=>ie,languages:()=>xe,options:()=>_e,parsers:()=>j,printers:()=>nt});var ie={};oe(ie,{languages:()=>xe,options:()=>_e,parsers:()=>j,printers:()=>nt});var ct=(e,t,n,r)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,r):n.global?t.replace(n,r):t.split(n).join(r)},$=ct;var ae="indent";var ce="group";var ue="if-break";var F="line";var le="break-parent";var ye=()=>{},b=ye,pe=ye;function x(e){return b(e),{type:ae,contents:e}}function y(e,t={}){return b(e),pe(t.expandedStates,!0),{type:ce,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function O(e,t="",n={}){return b(e),t!==""&&b(t),{type:ue,breakContents:e,flatContents:t,groupId:n.groupId}}var yt={type:le};var It={type:F,hard:!0};var k={type:F},p={type:F,soft:!0},f=[It,yt];function E(e,t){b(e),pe(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function Ot(e,t,n){let r=!!(n!=null&&n.backwards);if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)==="\r"&&i===` | ||
`)return t-2;if(i===` | ||
`||i==="\r"||i==="\u2028"||i==="\u2029")return t-1}else{if(i==="\r"&&e.charAt(t+1)===` | ||
`)return t+2;if(i===` | ||
`||i==="\r"||i==="\u2028"||i==="\u2029")return t+1}return t}var G=Ot;function J(e){return(t,n,r)=>{let i=!!(r!=null&&r.backwards);if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a<s;){let u=t.charAt(a);if(e instanceof RegExp){if(!e.test(u))return a}else if(!e.includes(u))return a;i?a--:a++}return a===-1||a===s?a:!1}}var bn=J(/\s/),X=J(" "),Ie=J(",; "),Oe=J(/[^\n\r]/);function Dt(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var De=Dt;function At(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?Oe(e,t):t}var Ae=At;function gt(e,t,n={}){let r=X(e,n.backwards?t-1:t,n),i=G(e,r,n);return r!==i}var ge=gt;function kt(e,t){let n=null,r=t;for(;r!==n;)n=r,r=Ie(e,r),r=De(e,r),r=X(e,r);return r=Ae(e,r),r=G(e,r),r!==!1&&ge(e,r)}var ke=kt;function Ct(e){return Array.isArray(e)&&e.length>0}var fe=Ct;var he=class extends Error{name="UnexpectedNodeError";constructor(t,n,r="type"){super(`Unexpected ${n} node ${r}: ${JSON.stringify(t[r])}.`),this.node=t}},Ce=he;function Se(e){return/^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/.test(e)}function ve(e){return`# @format | ||
`+e}var me=f(()=>{});function q(e){return e.kind==="Comment"?e.start:e.loc.start}function Q(e){return e.kind==="Comment"?e.end:e.loc.end}var Ee=f(()=>{});var W,U,H,gr,S,z=f(()=>{W=class{constructor(t,n,i){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},U=class{constructor(t,n,i,r,s,a){this.kind=t,this.start=n,this.end=i,this.line=r,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},H={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},gr=new Set(Object.keys(H));(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(S||(S={}))});function Je(e){return typeof e=="object"&&e!==null}var Xe=f(()=>{});function qe(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var Qe=f(()=>{});function M(e,t){let n=0,i=1;for(let r of e.body.matchAll(hn)){if(typeof r.index=="number"||qe(!1),r.index>=t)break;n=r.index+r[0].length,i+=1}return{line:i,column:t+1-n}}var hn,_e=f(()=>{Qe();hn=/\r\n|[\n\r]/g});function He(e){return ye(e.source,M(e.source,e.start))}function ye(e,t){let n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,s=e.locationOffset.line-1,a=t.line+s,u=t.line===1?n:0,l=t.column+u,N=`${e.name}:${a}:${l} | ||
`,d=i.split(/\r\n|[\n\r]/g),g=d[r];if(g.length>120){let O=Math.floor(l/80),se=l%80,x=[];for(let b=0;b<g.length;b+=80)x.push(g.slice(b,b+80));return N+We([[`${a} |`,x[0]],...x.slice(1,O+1).map(b=>["|",b]),["|","^".padStart(se)],["|",x[O+1]]])}return N+We([[`${a-1} |`,d[r-1]],[`${a} |`,g],["|","^".padStart(l)],[`${a+1} |`,d[r+1]]])}function We(e){let t=e.filter(([i,r])=>r!==void 0),n=Math.max(...t.map(([i])=>i.length));return t.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(` | ||
`)}var ze=f(()=>{_e()});function dn(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}function Ke(e){return e===void 0||e.length===0?void 0:e}var R,Ze=f(()=>{Xe();_e();ze();R=class extends Error{constructor(t,...n){var i,r,s;let{nodes:a,source:u,positions:l,path:N,originalError:d,extensions:g}=dn(n);super(t),this.name="GraphQLError",this.path=N??void 0,this.originalError=d??void 0,this.nodes=Ke(Array.isArray(a)?a:a?[a]:void 0);let O=Ke((i=this.nodes)===null||i===void 0?void 0:i.map(x=>x.loc).filter(x=>x!=null));this.source=u??(O==null||(r=O[0])===null||r===void 0?void 0:r.source),this.positions=l??(O==null?void 0:O.map(x=>x.start)),this.locations=l&&u?l.map(x=>M(u,x)):O==null?void 0:O.map(x=>M(x.source,x.start));let se=Je(d==null?void 0:d.extensions)?d==null?void 0:d.extensions:void 0;this.extensions=(s=g??se)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),d!=null&&d.stack?Object.defineProperty(this,"stack",{value:d.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,R):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` | ||
`+e}function q(e){return e.kind==="Comment"?e.start:e.loc.start}function Q(e){return e.kind==="Comment"?e.end:e.loc.end}var w=null;function V(e){if(w!==null&&typeof w.property){let t=w;return w=V.prototype=null,t}return w=V.prototype=e??Object.create(null),new V}var St=10;for(let e=0;e<=St;e++)V();function de(e){return V(e)}function vt(e,t="type"){de(e);function n(r){let i=r[t],s=e[i];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:r});return s}return n}var be=vt;var W=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},B=class{constructor(t,n,r,i,s,a){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=s,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}},H={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Kn=new Set(Object.keys(H));var C;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(C||(C={}));var bt=be(H,"kind"),Le=bt;function Lt(e,t,n){let{node:r}=e;if(!r.description)return"";let i=[n("description")];return r.kind==="InputValueDefinition"&&!r.description.block?i.push(k):i.push(f),i}var A=Lt;function Rt(e,t,n){let{node:r}=e;switch(r.kind){case"Document":return[...E(f,g(e,t,n,"definitions")),f];case"OperationDefinition":{let i=t.originalText[q(r)]!=="{",s=!!r.name;return[i?r.operation:"",i&&s?[" ",n("name")]:"",i&&!s&&fe(r.variableDefinitions)?" ":"",Re(e,n),_(e,n,r),!i&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return["fragment ",n("name"),Re(e,n)," on ",n("typeCondition"),_(e,n,r)," ",n("selectionSet")];case"SelectionSet":return["{",x([f,E(f,g(e,t,n,"selections"))]),f,"}"];case"Field":return y([r.alias?[n("alias"),": "]:"",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],g(e,t,n,"arguments"))]),p,")"]):"",_(e,n,r),r.selectionSet?" ":"",n("selectionSet")]);case"Name":return r.value;case"StringValue":if(r.block){let i=$(!1,r.value,'"""','\\"""').split(` | ||
`);return i.length===1&&(i[0]=i[0].trim()),i.every(s=>s==="")&&(i.length=0),E(f,['"""',...i,'"""'])}return['"',$(!1,$(!1,r.value,/["\\]/g,"\\$&"),` | ||
`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return r.value;case"BooleanValue":return r.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return y(["[",x([p,E([O("",", "),p],e.map(n,"values"))]),p,"]"]);case"ObjectValue":{let i=t.bracketSpacing&&r.fields.length>0?" ":"";return y(["{",i,x([p,E([O("",", "),p],e.map(n,"fields"))]),p,O("",i),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],g(e,t,n,"arguments"))]),p,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[n("variable"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,r)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:i}=r,s=[];return i.endsWith("TypeDefinition")?s.push(A(e,t,n)):s.push("extend "),i.startsWith("ObjectType")?s.push("type"):i.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!i.startsWith("InputObjectType")&&r.interfaces.length>0&&s.push(" implements ",...wt(e,t,n)),s.push(_(e,n,r)),r.fields.length>0&&s.push([" {",x([f,E(f,g(e,t,n,"fields"))]),f,"}"]),s}case"FieldDefinition":return[A(e,t,n),n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],g(e,t,n,"arguments"))]),p,")"]):"",": ",n("type"),_(e,n,r)];case"DirectiveDefinition":return[A(e,t,n),"directive ","@",n("name"),r.arguments.length>0?y(["(",x([p,E([O("",", "),p],g(e,t,n,"arguments"))]),p,")"]):"",r.repeatable?" repeatable":""," on ",...E(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[A(e,t,n),r.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),_(e,n,r),r.values.length>0?[" {",x([f,E(f,g(e,t,n,"values"))]),f,"}"]:""];case"EnumValueDefinition":return[A(e,t,n),n("name"),_(e,n,r)];case"InputValueDefinition":return[A(e,t,n),n("name"),": ",n("type"),r.defaultValue?[" = ",n("defaultValue")]:"",_(e,n,r)];case"SchemaExtension":return["extend schema",_(e,n,r),...r.operationTypes.length>0?[" {",x([f,E(f,g(e,t,n,"operationTypes"))]),f,"}"]:[]];case"SchemaDefinition":return[A(e,t,n),"schema",_(e,n,r)," {",r.operationTypes.length>0?x([f,E(f,g(e,t,n,"operationTypes"))]):"",f,"}"];case"OperationTypeDefinition":return[r.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),_(e,n,r)];case"InlineFragment":return["...",r.typeCondition?[" on ",n("typeCondition")]:"",_(e,n,r)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return y([A(e,t,n),y([r.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),_(e,n,r),r.types.length>0?[" =",O(""," "),x([O([k," "]),E([k,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[A(e,t,n),r.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),_(e,n,r)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new Ce(r,"Graphql","kind")}}function _(e,t,n){if(n.directives.length===0)return"";let r=E(k,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?y([k,r]):[" ",y(x([p,r]))]}function g(e,t,n,r){return e.map(({isLast:i,node:s})=>{let a=n();return!i&&ke(t.originalText,Q(s))?[a,f]:a},r)}function Pt(e){return e.kind!=="Comment"}function Ft(e){let t=e.node;if(t.kind==="Comment")return"#"+t.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(t))}function wt(e,t,n){let{node:r}=e,i=[],{interfaces:s}=r,a=e.map(n,"interfaces");for(let u=0;u<s.length;u++){let l=s[u];i.push(a[u]);let T=s[u+1];if(T){let D=t.originalText.slice(l.loc.end,T.loc.start).includes("#");i.push(" &",D?k:" ")}}return i}function Re(e,t){let{node:n}=e;return fe(n.variableDefinitions)?y(["(",x([p,E([O("",", "),p],e.map(t,"variableDefinitions"))]),p,")"]):""}function Pe(e,t){e.kind==="StringValue"&&e.block&&!e.value.includes(` | ||
`)&&(t.value=t.value.trim())}Pe.ignoredProperties=new Set(["loc","comments"]);function Vt(e){var n;let{node:t}=e;return(n=t==null?void 0:t.comments)==null?void 0:n.some(r=>r.value.trim()==="prettier-ignore")}var Bt={print:Rt,massageAstNode:Pe,hasPrettierIgnore:Vt,insertPragma:ve,printComment:Ft,canAttachComment:Pt,getVisitorKeys:Le},Fe=Bt;var j={};oe(j,{graphql:()=>cn});function we(e){return typeof e=="object"&&e!==null}function Ve(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}var Ut=/\r\n|[\n\r]/g;function U(e,t){let n=0,r=1;for(let i of e.body.matchAll(Ut)){if(typeof i.index=="number"||Ve(!1),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Ue(e){return me(e.source,U(e.source,e.start))}function me(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,a=t.line+s,u=t.line===1?n:0,l=t.column+u,T=`${e.name}:${a}:${l} | ||
`,h=r.split(/\r\n|[\n\r]/g),D=h[i];if(D.length>120){let I=Math.floor(l/80),re=l%80,N=[];for(let v=0;v<D.length;v+=80)N.push(D.slice(v,v+80));return T+Be([[`${a} |`,N[0]],...N.slice(1,I+1).map(v=>["|",v]),["|","^".padStart(re)],["|",N[I+1]]])}return T+Be([[`${a-1} |`,h[i-1]],[`${a} |`,D],["|","^".padStart(l)],[`${a+1} |`,h[i+1]]])}function Be(e){let t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(` | ||
`)}function Mt(e){let t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}var L=class extends Error{constructor(t,...n){var r,i,s;let{nodes:a,source:u,positions:l,path:T,originalError:h,extensions:D}=Mt(n);super(t),this.name="GraphQLError",this.path=T??void 0,this.originalError=h??void 0,this.nodes=Me(Array.isArray(a)?a:a?[a]:void 0);let I=Me((r=this.nodes)===null||r===void 0?void 0:r.map(N=>N.loc).filter(N=>N!=null));this.source=u??(I==null||(i=I[0])===null||i===void 0?void 0:i.source),this.positions=l??(I==null?void 0:I.map(N=>N.start)),this.locations=l&&u?l.map(N=>U(u,N)):I==null?void 0:I.map(N=>U(N.source,N.start));let re=we(h==null?void 0:h.extensions)?h==null?void 0:h.extensions:void 0;this.extensions=(s=D??re)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),h!=null&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,L):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(let n of this.nodes)n.loc&&(t+=` | ||
`+He(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` | ||
`+Ue(n.loc));else if(this.source&&this.locations)for(let n of this.locations)t+=` | ||
`+ye(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}});function m(e,t,n){return new R(`Syntax Error: ${n}`,{source:e,positions:[t]})}var Ie=f(()=>{Ze()});var K,et=f(()=>{(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(K||(K={}))});var c,tt=f(()=>{(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(c||(c={}))});function nt(e){return e===9||e===32}function P(e){return e>=48&&e<=57}function rt(e){return e>=97&&e<=122||e>=65&&e<=90}function Oe(e){return rt(e)||e===95}function it(e){return rt(e)||P(e)||e===95}var De=f(()=>{});function st(e){var t;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let a=0;a<e.length;++a){var s;let u=e[a],l=mn(u);l!==u.length&&(i=(s=i)!==null&&s!==void 0?s:a,r=a,a!==0&&l<n&&(n=l))}return e.map((a,u)=>u===0?a:a.slice(n)).slice((t=i)!==null&&t!==void 0?t:0,r+1)}function mn(e){let t=0;for(;t<e.length&&nt(e.charCodeAt(t));)++t;return t}var ot=f(()=>{De()});var o,ge=f(()=>{(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(o||(o={}))});function ct(e){return e===o.BANG||e===o.DOLLAR||e===o.AMP||e===o.PAREN_L||e===o.PAREN_R||e===o.SPREAD||e===o.COLON||e===o.EQUALS||e===o.AT||e===o.BRACKET_L||e===o.BRACKET_R||e===o.BRACE_L||e===o.PIPE||e===o.BRACE_R}function F(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function ee(e,t){return ut(e.charCodeAt(t))&<(e.charCodeAt(t+1))}function ut(e){return e>=55296&&e<=56319}function lt(e){return e>=56320&&e<=57343}function v(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function E(e,t,n,i,r){let s=e.line,a=1+n-e.lineStart;return new U(t,n,i,s,a,r)}function En(e,t){let n=e.source.body,i=n.length,r=t;for(;r<i;){let s=n.charCodeAt(r);switch(s){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++e.line,e.lineStart=r;continue;case 13:n.charCodeAt(r+1)===10?r+=2:++r,++e.line,e.lineStart=r;continue;case 35:return Tn(e,r);case 33:return E(e,o.BANG,r,r+1);case 36:return E(e,o.DOLLAR,r,r+1);case 38:return E(e,o.AMP,r,r+1);case 40:return E(e,o.PAREN_L,r,r+1);case 41:return E(e,o.PAREN_R,r,r+1);case 46:if(n.charCodeAt(r+1)===46&&n.charCodeAt(r+2)===46)return E(e,o.SPREAD,r,r+3);break;case 58:return E(e,o.COLON,r,r+1);case 61:return E(e,o.EQUALS,r,r+1);case 64:return E(e,o.AT,r,r+1);case 91:return E(e,o.BRACKET_L,r,r+1);case 93:return E(e,o.BRACKET_R,r,r+1);case 123:return E(e,o.BRACE_L,r,r+1);case 124:return E(e,o.PIPE,r,r+1);case 125:return E(e,o.BRACE_R,r,r+1);case 34:return n.charCodeAt(r+1)===34&&n.charCodeAt(r+2)===34?On(e,r):xn(e,r)}if(P(s)||s===45)return Nn(e,r,s);if(Oe(s))return Dn(e,r);throw m(e.source,r,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:F(s)||ee(n,r)?`Unexpected character: ${v(e,r)}.`:`Invalid character: ${v(e,r)}.`)}return E(e,o.EOF,i,i)}function Tn(e,t){let n=e.source.body,i=n.length,r=t+1;for(;r<i;){let s=n.charCodeAt(r);if(s===10||s===13)break;if(F(s))++r;else if(ee(n,r))r+=2;else break}return E(e,o.COMMENT,t,r,n.slice(t+1,r))}function Nn(e,t,n){let i=e.source.body,r=t,s=n,a=!1;if(s===45&&(s=i.charCodeAt(++r)),s===48){if(s=i.charCodeAt(++r),P(s))throw m(e.source,r,`Invalid number, unexpected digit after 0: ${v(e,r)}.`)}else r=Ae(e,r,s),s=i.charCodeAt(r);if(s===46&&(a=!0,s=i.charCodeAt(++r),r=Ae(e,r,s),s=i.charCodeAt(r)),(s===69||s===101)&&(a=!0,s=i.charCodeAt(++r),(s===43||s===45)&&(s=i.charCodeAt(++r)),r=Ae(e,r,s),s=i.charCodeAt(r)),s===46||Oe(s))throw m(e.source,r,`Invalid number, expected digit but got: ${v(e,r)}.`);return E(e,a?o.FLOAT:o.INT,t,r,i.slice(t,r))}function Ae(e,t,n){if(!P(n))throw m(e.source,t,`Invalid number, expected digit but got: ${v(e,t)}.`);let i=e.source.body,r=t+1;for(;P(i.charCodeAt(r));)++r;return r}function xn(e,t){let n=e.source.body,i=n.length,r=t+1,s=r,a="";for(;r<i;){let u=n.charCodeAt(r);if(u===34)return a+=n.slice(s,r),E(e,o.STRING,t,r+1,a);if(u===92){a+=n.slice(s,r);let l=n.charCodeAt(r+1)===117?n.charCodeAt(r+2)===123?_n(e,r):yn(e,r):In(e,r);a+=l.value,r+=l.size,s=r;continue}if(u===10||u===13)break;if(F(u))++r;else if(ee(n,r))r+=2;else throw m(e.source,r,`Invalid character within String: ${v(e,r)}.`)}throw m(e.source,r,"Unterminated string.")}function _n(e,t){let n=e.source.body,i=0,r=3;for(;r<12;){let s=n.charCodeAt(t+r++);if(s===125){if(r<5||!F(i))break;return{value:String.fromCodePoint(i),size:r}}if(i=i<<4|Y(s),i<0)break}throw m(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+r)}".`)}function yn(e,t){let n=e.source.body,i=at(n,t+2);if(F(i))return{value:String.fromCodePoint(i),size:6};if(ut(i)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){let r=at(n,t+8);if(lt(r))return{value:String.fromCodePoint(i,r),size:12}}throw m(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function at(e,t){return Y(e.charCodeAt(t))<<12|Y(e.charCodeAt(t+1))<<8|Y(e.charCodeAt(t+2))<<4|Y(e.charCodeAt(t+3))}function Y(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function In(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` | ||
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw m(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function On(e,t){let n=e.source.body,i=n.length,r=e.lineStart,s=t+3,a=s,u="",l=[];for(;s<i;){let N=n.charCodeAt(s);if(N===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){u+=n.slice(a,s),l.push(u);let d=E(e,o.BLOCK_STRING,t,s+3,st(l).join(` | ||
`));return e.line+=l.length-1,e.lineStart=r,d}if(N===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){u+=n.slice(a,s),a=s+1,s+=4;continue}if(N===10||N===13){u+=n.slice(a,s),l.push(u),N===13&&n.charCodeAt(s+1)===10?s+=2:++s,u="",a=s,r=s;continue}if(F(N))++s;else if(ee(n,s))s+=2;else throw m(e.source,s,`Invalid character within String: ${v(e,s)}.`)}throw m(e.source,s,"Unterminated string.")}function Dn(e,t){let n=e.source.body,i=n.length,r=t+1;for(;r<i;){let s=n.charCodeAt(r);if(it(s))++r;else break}return E(e,o.NAME,t,r,n.slice(t,r))}var Z,pt=f(()=>{Ie();z();ot();De();ge();Z=class{constructor(t){let n=new U(o.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==o.EOF)do if(t.next)t=t.next;else{let n=En(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===o.COMMENT);return t}}});function te(e,t){if(!!!e)throw new Error(t)}var ft=f(()=>{});function ht(e){return ne(e,[])}function ne(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return gn(e,t);default:return String(e)}}function gn(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(An(e)){let i=e.toJSON();if(i!==e)return typeof i=="string"?i:ne(i,n)}else if(Array.isArray(e))return Cn(e,n);return kn(e,n)}function An(e){return typeof e.toJSON=="function"}function kn(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+Sn(e)+"]":"{ "+n.map(([r,s])=>r+": "+ne(s,t)).join(", ")+" }"}function Cn(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),i=e.length-n,r=[];for(let s=0;s<n;++s)r.push(ne(e[s],t));return i===1?r.push("... 1 more item"):i>1&&r.push(`... ${i} more items`),"["+r.join(", ")+"]"}function Sn(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var dt=f(()=>{});var mt,Et=f(()=>{mt=function(t,n){return t instanceof n}});function Tt(e){return mt(e,j)}var j,Nt=f(()=>{ft();dt();Et();j=class{constructor(t,n="GraphQL request",i={line:1,column:1}){typeof t=="string"||te(!1,`Body must be a string. Received: ${ht(t)}.`),this.body=t,this.name=n,this.locationOffset=i,this.locationOffset.line>0||te(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||te(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}});function xt(e,t){return new ke(e,t).parseDocument()}function re(e){let t=e.value;return _t(e.kind)+(t!=null?` "${t}"`:"")}function _t(e){return ct(e)?`"${e}"`:e}var ke,yt=f(()=>{Ie();z();et();tt();pt();Nt();ge();ke=class{constructor(t,n={}){let i=Tt(t)?t:new j(t);this._lexer=new Z(i),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===o.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw m(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:S.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),i;return this.peek(o.NAME)&&(i=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return S.QUERY;case"mutation":return S.MUTATION;case"subscription":return S.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),i,r;return this.expectOptionalToken(o.COLON)?(i=n,r=this.parseName()):r=n,this.node(t,{kind:c.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,i=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:i,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(o.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case o.BRACKET_L:return this.parseList(t);case o.BRACE_L:return this.parseObject(t);case o.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case o.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case o.STRING:case o.BLOCK_STRING:return this.parseStringLiteral();case o.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case o.DOLLAR:if(t)if(this.expectToken(o.DOLLAR),this._lexer.token.kind===o.NAME){let i=this._lexer.token.value;throw m(this._lexer.source,n.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===o.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(o.BRACKET_L,n,o.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(o.BRACE_L,n,o.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,i=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:i,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(o.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(o.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(o.BRACKET_L)){let i=this.parseTypeReference();this.expectToken(o.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:i})}else n=this.parseNamedType();return this.expectOptionalToken(o.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(o.STRING)||this.peek(o.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let i=this.parseConstDirectives(),r=this.many(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:i,operationTypes:r})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(o.COLON);let i=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:i})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let i=this.parseName(),r=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:r})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(o.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseFieldDefinition,o.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),i=this.parseName(),r=this.parseArgumentDefs();this.expectToken(o.COLON);let s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:i,arguments:r,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(o.PAREN_L,this.parseInputValueDef,o.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),i=this.parseName();this.expectToken(o.COLON);let r=this.parseTypeReference(),s;this.expectOptionalToken(o.EQUALS)&&(s=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:i,type:r,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let i=this.parseName(),r=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:i,directives:r,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(o.EQUALS)?this.delimitedMany(o.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let i=this.parseName(),r=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:i,directives:r,values:s})}parseEnumValuesDefinition(){return this.optionalMany(o.BRACE_L,this.parseEnumValueDefinition,o.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),i=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:i,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw m(this._lexer.source,this._lexer.token.start,`${re(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let i=this.parseName(),r=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:r,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseInputValueDef,o.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===o.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),i=this.optionalMany(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:i})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:i})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:i,types:r})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:i,values:r})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:r})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.AT);let i=this.parseName(),r=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:i,arguments:r,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(o.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(K,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new W(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw m(this._lexer.source,n.start,`Expected ${_t(t)}, found ${re(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===o.NAME&&n.value===t)this.advanceLexer();else throw m(this._lexer.source,n.start,`Expected "${t}", found ${re(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===o.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return m(this._lexer.source,n.start,`Unexpected ${re(n)}.`)}any(t,n,i){this.expectToken(t);let r=[];for(;!this.expectOptionalToken(i);)r.push(n.call(this));return r}optionalMany(t,n,i){if(this.expectOptionalToken(t)){let r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}return[]}many(t,n,i){this.expectToken(t);let r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}delimitedMany(t,n){this.expectOptionalToken(t);let i=[];do i.push(n.call(this));while(this.expectOptionalToken(t));return i}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==o.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw m(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}});function vn(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var It,Ot=f(()=>{It=vn});var Dt={};ae(Dt,{graphql:()=>Fn});function bn(e){let t=[],{startToken:n,endToken:i}=e.loc;for(let r=n;r!==i;r=r.next)r.kind==="Comment"&&t.push(r);return t}function Rn(e){if((e==null?void 0:e.name)==="GraphQLError"){let{message:t,locations:[n]}=e;return It(t,{loc:{start:n},cause:e})}return e}function Pn(e){let t;try{t=xt(e,Ln)}catch(n){throw Rn(n)}return t.comments=bn(t),t}var Ln,Fn,gt=f(()=>{yt();Ot();me();Ee();Ln={allowLegacyFragmentVariables:!0};Fn={parse:Pn,astFormat:"graphql",hasPragma:Ve,locStart:q,locEnd:Q}});var wn={};ae(wn,{default:()=>ie,languages:()=>Ne,options:()=>xe,parsers:()=>kt,printers:()=>At});var ie={};ae(ie,{languages:()=>Ne,options:()=>xe,parsers:()=>kt,printers:()=>At});function Rt(e){let t=Object.create(null);for(let{importParsers:n,parserNames:i}of e)for(let r of i)t[r]=async()=>Object.assign(t,await n())[r];return t}var Ce=Rt;var Pt=(e,t,n,i)=>{if(!(e&&t==null))return t.replaceAll?t.replaceAll(n,i):n.global?t.replace(n,i):t.split(n).join(i)},$=Pt;var ce="indent";var ue="group";var le="if-break";var w="line";var pe="break-parent";var Se=()=>{},L=Se,fe=Se;function _(e){return L(e),{type:ce,contents:e}}function I(e,t={}){return L(e),fe(t.expandedStates,!0),{type:ue,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function D(e,t="",n={}){return L(e),t!==""&&L(t),{type:le,breakContents:e,flatContents:t,groupId:n.groupId}}var qt={type:pe};var Qt={type:w,hard:!0};var C={type:w},p={type:w,soft:!0},h=[Qt,qt];function T(e,t){L(e),fe(t);let n=[];for(let i=0;i<t.length;i++)i!==0&&n.push(e),n.push(t[i]);return n}function Wt(e,t,n){let i=!!(n!=null&&n.backwards);if(t===!1)return!1;let r=e.charAt(t);if(i){if(e.charAt(t-1)==="\r"&&r===` | ||
`)return t-2;if(r===` | ||
`||r==="\r"||r==="\u2028"||r==="\u2029")return t-1}else{if(r==="\r"&&e.charAt(t+1)===` | ||
`)return t+2;if(r===` | ||
`||r==="\r"||r==="\u2028"||r==="\u2029")return t+1}return t}var G=Wt;function J(e){return(t,n,i)=>{let r=!!(i!=null&&i.backwards);if(n===!1)return!1;let{length:s}=t,a=n;for(;a>=0&&a<s;){let u=t.charAt(a);if(e instanceof RegExp){if(!e.test(u))return a}else if(!e.includes(u))return a;r?a--:a++}return a===-1||a===s?a:!1}}var ir=J(/\s/),X=J(" "),ve=J(",; "),be=J(/[^\n\r]/);function Ht(e,t){if(t===!1)return!1;if(e.charAt(t)==="/"&&e.charAt(t+1)==="*"){for(let n=t+2;n<e.length;++n)if(e.charAt(n)==="*"&&e.charAt(n+1)==="/")return n+2}return t}var Le=Ht;function zt(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?be(e,t):t}var Re=zt;function Kt(e,t,n={}){let i=X(e,n.backwards?t-1:t,n),r=G(e,i,n);return i!==r}var Pe=Kt;function Zt(e,t){let n=null,i=t;for(;i!==n;)n=i,i=ve(e,i),i=Le(e,i),i=X(e,i);return i=Re(e,i),i=G(e,i),i!==!1&&Pe(e,i)}var Fe=Zt;function en(e){return Array.isArray(e)&&e.length>0}var he=en;var de=class extends Error{name="UnexpectedNodeError";constructor(t,n,i="type"){super(`Unexpected ${n} node ${i}: ${JSON.stringify(t[i])}.`),this.node=t}},we=de;me();Ee();var V=null;function B(e){if(V!==null&&typeof V.property){let t=V;return V=B.prototype=null,t}return V=B.prototype=e??Object.create(null),new B}var tn=10;for(let e=0;e<=tn;e++)B();function Te(e){return B(e)}function nn(e,t="type"){Te(e);function n(i){let r=i[t],s=e[r];if(!Array.isArray(s))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:i});return s}return n}var Ue=nn;z();var rn=Ue(H,"kind"),Me=rn;function sn(e,t,n){let{node:i}=e;if(!i.description)return"";let r=[n("description")];return i.kind==="InputValueDefinition"&&!i.description.block?r.push(C):r.push(h),r}var A=sn;function on(e,t,n){let{node:i}=e;switch(i.kind){case"Document":return[...T(h,k(e,t,n,"definitions")),h];case"OperationDefinition":{let r=t.originalText[q(i)]!=="{",s=!!i.name;return[r?i.operation:"",r&&s?[" ",n("name")]:"",r&&!s&&he(i.variableDefinitions)?" ":"",Ye(e,n),y(e,n,i),!r&&!s?"":" ",n("selectionSet")]}case"FragmentDefinition":return["fragment ",n("name"),Ye(e,n)," on ",n("typeCondition"),y(e,n,i)," ",n("selectionSet")];case"SelectionSet":return["{",_([h,T(h,k(e,t,n,"selections"))]),h,"}"];case"Field":return I([i.alias?[n("alias"),": "]:"",n("name"),i.arguments.length>0?I(["(",_([p,T([D("",", "),p],k(e,t,n,"arguments"))]),p,")"]):"",y(e,n,i),i.selectionSet?" ":"",n("selectionSet")]);case"Name":return i.value;case"StringValue":if(i.block){let r=$(!1,i.value,'"""','\\"""').split(` | ||
`);return r.length===1&&(r[0]=r[0].trim()),r.every(s=>s==="")&&(r.length=0),T(h,['"""',...r,'"""'])}return['"',$(!1,$(!1,i.value,/["\\]/g,"\\$&"),` | ||
`,"\\n"),'"'];case"IntValue":case"FloatValue":case"EnumValue":return i.value;case"BooleanValue":return i.value?"true":"false";case"NullValue":return"null";case"Variable":return["$",n("name")];case"ListValue":return I(["[",_([p,T([D("",", "),p],e.map(n,"values"))]),p,"]"]);case"ObjectValue":{let r=t.bracketSpacing&&i.fields.length>0?" ":"";return I(["{",r,_([p,T([D("",", "),p],e.map(n,"fields"))]),p,D("",r),"}"])}case"ObjectField":case"Argument":return[n("name"),": ",n("value")];case"Directive":return["@",n("name"),i.arguments.length>0?I(["(",_([p,T([D("",", "),p],k(e,t,n,"arguments"))]),p,")"]):""];case"NamedType":return n("name");case"VariableDefinition":return[n("variable"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",y(e,n,i)];case"ObjectTypeExtension":case"ObjectTypeDefinition":case"InputObjectTypeExtension":case"InputObjectTypeDefinition":case"InterfaceTypeExtension":case"InterfaceTypeDefinition":{let{kind:r}=i,s=[];return r.endsWith("TypeDefinition")?s.push(A(e,t,n)):s.push("extend "),r.startsWith("ObjectType")?s.push("type"):r.startsWith("InputObjectType")?s.push("input"):s.push("interface"),s.push(" ",n("name")),!r.startsWith("InputObjectType")&&i.interfaces.length>0&&s.push(" implements ",...un(e,t,n)),s.push(y(e,n,i)),i.fields.length>0&&s.push([" {",_([h,T(h,k(e,t,n,"fields"))]),h,"}"]),s}case"FieldDefinition":return[A(e,t,n),n("name"),i.arguments.length>0?I(["(",_([p,T([D("",", "),p],k(e,t,n,"arguments"))]),p,")"]):"",": ",n("type"),y(e,n,i)];case"DirectiveDefinition":return[A(e,t,n),"directive ","@",n("name"),i.arguments.length>0?I(["(",_([p,T([D("",", "),p],k(e,t,n,"arguments"))]),p,")"]):"",i.repeatable?" repeatable":""," on ",...T(" | ",e.map(n,"locations"))];case"EnumTypeExtension":case"EnumTypeDefinition":return[A(e,t,n),i.kind==="EnumTypeExtension"?"extend ":"","enum ",n("name"),y(e,n,i),i.values.length>0?[" {",_([h,T(h,k(e,t,n,"values"))]),h,"}"]:""];case"EnumValueDefinition":return[A(e,t,n),n("name"),y(e,n,i)];case"InputValueDefinition":return[A(e,t,n),n("name"),": ",n("type"),i.defaultValue?[" = ",n("defaultValue")]:"",y(e,n,i)];case"SchemaExtension":return["extend schema",y(e,n,i),...i.operationTypes.length>0?[" {",_([h,T(h,k(e,t,n,"operationTypes"))]),h,"}"]:[]];case"SchemaDefinition":return[A(e,t,n),"schema",y(e,n,i)," {",i.operationTypes.length>0?_([h,T(h,k(e,t,n,"operationTypes"))]):"",h,"}"];case"OperationTypeDefinition":return[i.operation,": ",n("type")];case"FragmentSpread":return["...",n("name"),y(e,n,i)];case"InlineFragment":return["...",i.typeCondition?[" on ",n("typeCondition")]:"",y(e,n,i)," ",n("selectionSet")];case"UnionTypeExtension":case"UnionTypeDefinition":return I([A(e,t,n),I([i.kind==="UnionTypeExtension"?"extend ":"","union ",n("name"),y(e,n,i),i.types.length>0?[" =",D(""," "),_([D([C," "]),T([C,"| "],e.map(n,"types"))])]:""])]);case"ScalarTypeExtension":case"ScalarTypeDefinition":return[A(e,t,n),i.kind==="ScalarTypeExtension"?"extend ":"","scalar ",n("name"),y(e,n,i)];case"NonNullType":return[n("type"),"!"];case"ListType":return["[",n("type"),"]"];default:throw new we(i,"Graphql","kind")}}function y(e,t,n){if(n.directives.length===0)return"";let i=T(C,e.map(t,"directives"));return n.kind==="FragmentDefinition"||n.kind==="OperationDefinition"?I([C,i]):[" ",I(_([p,i]))]}function k(e,t,n,i){return e.map(({isLast:r,node:s})=>{let a=n();return!r&&Fe(t.originalText,Q(s))?[a,h]:a},i)}function an(e){return e.kind!=="Comment"}function cn(e){let t=e.node;if(t.kind==="Comment")return"#"+t.value.trimEnd();throw new Error("Not a comment: "+JSON.stringify(t))}function un(e,t,n){let{node:i}=e,r=[],{interfaces:s}=i,a=e.map(n,"interfaces");for(let u=0;u<s.length;u++){let l=s[u];r.push(a[u]);let N=s[u+1];if(N){let g=t.originalText.slice(l.loc.end,N.loc.start).includes("#");r.push(" &",g?C:" ")}}return r}function Ye(e,t){let{node:n}=e;return he(n.variableDefinitions)?I(["(",_([p,T([D("",", "),p],e.map(t,"variableDefinitions"))]),p,")"]):""}function je(e,t){e.kind==="StringValue"&&e.block&&!e.value.includes(` | ||
`)&&(t.value=t.value.trim())}je.ignoredProperties=new Set(["loc","comments"]);function ln(e){var n;let{node:t}=e;return(n=t==null?void 0:t.comments)==null?void 0:n.some(i=>i.value.trim()==="prettier-ignore")}var pn={print:on,massageAstNode:je,hasPrettierIgnore:ln,insertPragma:Be,printComment:cn,canAttachComment:an,getVisitorKeys:Me},$e=pn;var Ne=[{linguistLanguageId:139,name:"GraphQL",type:"data",color:"#e10098",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"]}];var Ge={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var fn={bracketSpacing:Ge.bracketSpacing},xe=fn;var At={graphql:$e},kt=Ce([{importParsers:()=>Promise.resolve().then(()=>(gt(),Dt)),parserNames:["graphql"]}]);return Lt(wn);}); | ||
`+me(this.source,n);return t}toJSON(){let t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function Me(e){return e===void 0||e.length===0?void 0:e}function d(e,t,n){return new L(`Syntax Error: ${n}`,{source:e,positions:[t]})}var z;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(z||(z={}));var c;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(c||(c={}));function Ye(e){return e===9||e===32}function R(e){return e>=48&&e<=57}function je(e){return e>=97&&e<=122||e>=65&&e<=90}function Ee(e){return je(e)||e===95}function $e(e){return je(e)||R(e)||e===95}function Ge(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let a=0;a<e.length;++a){var s;let u=e[a],l=Yt(u);l!==u.length&&(r=(s=r)!==null&&s!==void 0?s:a,i=a,a!==0&&l<n&&(n=l))}return e.map((a,u)=>u===0?a:a.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function Yt(e){let t=0;for(;t<e.length&&Ye(e.charCodeAt(t));)++t;return t}var o;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(o||(o={}));var K=class{constructor(t){let n=new B(o.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==o.EOF)do if(t.next)t=t.next;else{let n=jt(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===o.COMMENT);return t}};function Xe(e){return e===o.BANG||e===o.DOLLAR||e===o.AMP||e===o.PAREN_L||e===o.PAREN_R||e===o.SPREAD||e===o.COLON||e===o.EQUALS||e===o.AT||e===o.BRACKET_L||e===o.BRACKET_R||e===o.BRACE_L||e===o.PIPE||e===o.BRACE_R}function P(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Z(e,t){return qe(e.charCodeAt(t))&&Qe(e.charCodeAt(t+1))}function qe(e){return e>=55296&&e<=56319}function Qe(e){return e>=56320&&e<=57343}function S(e,t){let n=e.source.body.codePointAt(t);if(n===void 0)return o.EOF;if(n>=32&&n<=126){let r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function m(e,t,n,r,i){let s=e.line,a=1+n-e.lineStart;return new B(t,n,r,s,a,i)}function jt(e,t){let n=e.source.body,r=n.length,i=t;for(;i<r;){let s=n.charCodeAt(i);switch(s){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return $t(e,i);case 33:return m(e,o.BANG,i,i+1);case 36:return m(e,o.DOLLAR,i,i+1);case 38:return m(e,o.AMP,i,i+1);case 40:return m(e,o.PAREN_L,i,i+1);case 41:return m(e,o.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return m(e,o.SPREAD,i,i+3);break;case 58:return m(e,o.COLON,i,i+1);case 61:return m(e,o.EQUALS,i,i+1);case 64:return m(e,o.AT,i,i+1);case 91:return m(e,o.BRACKET_L,i,i+1);case 93:return m(e,o.BRACKET_R,i,i+1);case 123:return m(e,o.BRACE_L,i,i+1);case 124:return m(e,o.PIPE,i,i+1);case 125:return m(e,o.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?Wt(e,i):Jt(e,i)}if(R(s)||s===45)return Gt(e,i,s);if(Ee(s))return Ht(e,i);throw d(e.source,i,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:P(s)||Z(n,i)?`Unexpected character: ${S(e,i)}.`:`Invalid character: ${S(e,i)}.`)}return m(e,o.EOF,r,r)}function $t(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if(s===10||s===13)break;if(P(s))++i;else if(Z(n,i))i+=2;else break}return m(e,o.COMMENT,t,i,n.slice(t+1,i))}function Gt(e,t,n){let r=e.source.body,i=t,s=n,a=!1;if(s===45&&(s=r.charCodeAt(++i)),s===48){if(s=r.charCodeAt(++i),R(s))throw d(e.source,i,`Invalid number, unexpected digit after 0: ${S(e,i)}.`)}else i=Te(e,i,s),s=r.charCodeAt(i);if(s===46&&(a=!0,s=r.charCodeAt(++i),i=Te(e,i,s),s=r.charCodeAt(i)),(s===69||s===101)&&(a=!0,s=r.charCodeAt(++i),(s===43||s===45)&&(s=r.charCodeAt(++i)),i=Te(e,i,s),s=r.charCodeAt(i)),s===46||Ee(s))throw d(e.source,i,`Invalid number, expected digit but got: ${S(e,i)}.`);return m(e,a?o.FLOAT:o.INT,t,i,r.slice(t,i))}function Te(e,t,n){if(!R(n))throw d(e.source,t,`Invalid number, expected digit but got: ${S(e,t)}.`);let r=e.source.body,i=t+1;for(;R(r.charCodeAt(i));)++i;return i}function Jt(e,t){let n=e.source.body,r=n.length,i=t+1,s=i,a="";for(;i<r;){let u=n.charCodeAt(i);if(u===34)return a+=n.slice(s,i),m(e,o.STRING,t,i+1,a);if(u===92){a+=n.slice(s,i);let l=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?Xt(e,i):qt(e,i):Qt(e,i);a+=l.value,i+=l.size,s=i;continue}if(u===10||u===13)break;if(P(u))++i;else if(Z(n,i))i+=2;else throw d(e.source,i,`Invalid character within String: ${S(e,i)}.`)}throw d(e.source,i,"Unterminated string.")}function Xt(e,t){let n=e.source.body,r=0,i=3;for(;i<12;){let s=n.charCodeAt(t+i++);if(s===125){if(i<5||!P(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|M(s),r<0)break}throw d(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function qt(e,t){let n=e.source.body,r=Je(n,t+2);if(P(r))return{value:String.fromCodePoint(r),size:6};if(qe(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){let i=Je(n,t+8);if(Qe(i))return{value:String.fromCodePoint(r,i),size:12}}throw d(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function Je(e,t){return M(e.charCodeAt(t))<<12|M(e.charCodeAt(t+1))<<8|M(e.charCodeAt(t+2))<<4|M(e.charCodeAt(t+3))}function M(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Qt(e,t){let n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` | ||
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw d(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Wt(e,t){let n=e.source.body,r=n.length,i=e.lineStart,s=t+3,a=s,u="",l=[];for(;s<r;){let T=n.charCodeAt(s);if(T===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){u+=n.slice(a,s),l.push(u);let h=m(e,o.BLOCK_STRING,t,s+3,Ge(l).join(` | ||
`));return e.line+=l.length-1,e.lineStart=i,h}if(T===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){u+=n.slice(a,s),a=s+1,s+=4;continue}if(T===10||T===13){u+=n.slice(a,s),l.push(u),T===13&&n.charCodeAt(s+1)===10?s+=2:++s,u="",a=s,i=s;continue}if(P(T))++s;else if(Z(n,s))s+=2;else throw d(e.source,s,`Invalid character within String: ${S(e,s)}.`)}throw d(e.source,s,"Unterminated string.")}function Ht(e,t){let n=e.source.body,r=n.length,i=t+1;for(;i<r;){let s=n.charCodeAt(i);if($e(s))++i;else break}return m(e,o.NAME,t,i,n.slice(t,i))}function ee(e,t){if(!!!e)throw new Error(t)}function We(e){return te(e,[])}function te(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return zt(e,t);default:return String(e)}}function zt(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";let n=[...t,e];if(Kt(e)){let r=e.toJSON();if(r!==e)return typeof r=="string"?r:te(r,n)}else if(Array.isArray(e))return en(e,n);return Zt(e,n)}function Kt(e){return typeof e.toJSON=="function"}function Zt(e,t){let n=Object.entries(e);return n.length===0?"{}":t.length>2?"["+tn(e)+"]":"{ "+n.map(([i,s])=>i+": "+te(s,t)).join(", ")+" }"}function en(e,t){if(e.length===0)return"[]";if(t.length>2)return"[Array]";let n=Math.min(10,e.length),r=e.length-n,i=[];for(let s=0;s<n;++s)i.push(te(e[s],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function tn(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){let n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}var He=function(t,n){return t instanceof n};var Y=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||ee(!1,`Body must be a string. Received: ${We(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||ee(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ee(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function ze(e){return He(e,Y)}function Ke(e,t){return new Ne(e,t).parseDocument()}var Ne=class{constructor(t,n={}){let r=ze(t)?t:new Y(t);this._lexer=new K(r),this._options=n,this._tokenCounter=0}parseName(){let t=this.expectToken(o.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(o.SOF,this.parseDefinition,o.EOF)})}parseDefinition(){if(this.peek(o.BRACE_L))return this.parseOperationDefinition();let t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===o.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw d(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){let t=this._lexer.token;if(this.peek(o.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:C.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});let n=this.parseOperationType(),r;return this.peek(o.NAME)&&(r=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){let t=this.expectToken(o.NAME);switch(t.value){case"query":return C.QUERY;case"mutation":return C.MUTATION;case"subscription":return C.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(o.PAREN_L,this.parseVariableDefinition,o.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){let t=this._lexer.token;return this.expectToken(o.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(o.BRACE_L,this.parseSelection,o.BRACE_R)})}parseSelection(){return this.peek(o.SPREAD)?this.parseFragment():this.parseField()}parseField(){let t=this._lexer.token,n=this.parseName(),r,i;return this.expectOptionalToken(o.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:c.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){let n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.PAREN_L,n,o.PAREN_R)}parseArgument(t=!1){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){let t=this._lexer.token;this.expectToken(o.SPREAD);let n=this.expectOptionalKeyword("on");return!n&&this.peek(o.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){let t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){let n=this._lexer.token;switch(n.kind){case o.BRACKET_L:return this.parseList(t);case o.BRACE_L:return this.parseObject(t);case o.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case o.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case o.STRING:case o.BLOCK_STRING:return this.parseStringLiteral();case o.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case o.DOLLAR:if(t)if(this.expectToken(o.DOLLAR),this._lexer.token.kind===o.NAME){let r=this._lexer.token.value;throw d(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){let t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===o.BLOCK_STRING})}parseList(t){let n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(o.BRACKET_L,n,o.BRACKET_R)})}parseObject(t){let n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(o.BRACE_L,n,o.BRACE_R)})}parseObjectField(t){let n=this._lexer.token,r=this.parseName();return this.expectToken(o.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){let n=[];for(;this.peek(o.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){let n=this._lexer.token;return this.expectToken(o.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){let t=this._lexer.token,n;if(this.expectOptionalToken(o.BRACKET_L)){let r=this.parseTypeReference();this.expectToken(o.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(o.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(o.STRING)||this.peek(o.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");let r=this.parseConstDirectives(),i=this.many(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){let t=this._lexer.token,n=this.parseOperationType();this.expectToken(o.COLON);let r=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");let r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(o.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseFieldDefinition,o.BRACE_R)}parseFieldDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(o.COLON);let s=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:r,arguments:i,type:s,directives:a})}parseArgumentDefs(){return this.optionalMany(o.PAREN_L,this.parseInputValueDef,o.PAREN_R)}parseInputValueDef(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(o.COLON);let i=this.parseTypeReference(),s;this.expectOptionalToken(o.EQUALS)&&(s=this.parseConstValueLiteral());let a=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:s,directives:a})}parseInterfaceTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");let r=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:s,fields:a})}parseUnionTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(o.EQUALS)?this.delimitedMany(o.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:s})}parseEnumValuesDefinition(){return this.optionalMany(o.BRACE_L,this.parseEnumValueDefinition,o.BRACE_R)}parseEnumValueDefinition(){let t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw d(this._lexer.source,this._lexer.token.start,`${ne(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");let r=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(o.BRACE_L,this.parseInputValueDef,o.BRACE_R)}parseTypeSystemExtension(){let t=this._lexer.lookahead();if(t.kind===o.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");let n=this.parseConstDirectives(),r=this.optionalMany(o.BRACE_L,this.parseOperationTypeDefinition,o.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");let n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseInterfaceTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");let n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:s})}parseUnionTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){let t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");let n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){let t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.AT);let r=this.parseName(),i=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");let a=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:s,locations:a})}parseDirectiveLocations(){return this.delimitedMany(o.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){let t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(z,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new W(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){let n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw d(this._lexer.source,n.start,`Expected ${Ze(t)}, found ${ne(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){let n=this._lexer.token;if(n.kind===o.NAME&&n.value===t)this.advanceLexer();else throw d(this._lexer.source,n.start,`Expected "${t}", found ${ne(n)}.`)}expectOptionalKeyword(t){let n=this._lexer.token;return n.kind===o.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){let n=t??this._lexer.token;return d(this._lexer.source,n.start,`Unexpected ${ne(n)}.`)}any(t,n,r){this.expectToken(t);let i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);let i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);let r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){let{maxTokens:t}=this._options,n=this._lexer.advance();if(t!==void 0&&n.kind!==o.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw d(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function ne(e){let t=e.value;return Ze(e.kind)+(t!=null?` "${t}"`:"")}function Ze(e){return Xe(e)?`"${e}"`:e}function nn(e,t){let n=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(n,t)}var et=nn;function rn(e){let t=[],{startToken:n,endToken:r}=e.loc;for(let i=n;i!==r;i=i.next)i.kind==="Comment"&&t.push(i);return t}var sn={allowLegacyFragmentVariables:!0};function on(e){if((e==null?void 0:e.name)==="GraphQLError"){let{message:t,locations:[n]}=e;return et(t,{loc:{start:n},cause:e})}return e}function an(e){let t;try{t=Ke(e,sn)}catch(n){throw on(n)}return t.comments=rn(t),t}var cn={parse:an,astFormat:"graphql",hasPragma:Se,locStart:q,locEnd:Q};var xe=[{linguistLanguageId:139,name:"GraphQL",type:"data",color:"#e10098",extensions:[".graphql",".gql",".graphqls"],tmScope:"source.graphql",aceMode:"text",parsers:["graphql"],vscodeLanguageIds:["graphql"]}];var tt={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var un={bracketSpacing:tt.bracketSpacing},_e=un;var nt={graphql:Fe};return at(ln);}); |
import { Parser } from "../index.js"; | ||
export declare const parsers: { | ||
angular: Parser; | ||
html: Parser; | ||
lwc: Parser; | ||
vue: Parser; | ||
angular: Parser; | ||
lwc: Parser; | ||
}; |
import { Parser } from "../index.js"; | ||
export declare const parsers: { | ||
remark: Parser; | ||
markdown: Parser; | ||
mdx: Parser; | ||
remark: Parser; | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65700
8591388