!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e.prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.graphql=n())}(this,function(){"use strict";function e(n){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(n)}var n=function(e,n){var t=new SyntaxError(e+" ("+n.start.line+":"+n.start.column+")");return t.loc=n,t};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e,n){return e(n={exports:{}},n.exports),n.exports}var i=r(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.getLocation=function(e,n){var t=/\r\n|[\n\r]/g,r=1,i=n+1,o=void 0;for(;(o=t.exec(e.body))&&o.index=2&&o(f,l)+": "+v[t-2],o(f,s)+": "+v[t-1],r(2+f+u-1)+"^",t0&&r(n[0]);)n.shift();for(;n.length>0&&r(n[n.length-1]);)n.pop();return n.join("\n")}});t(v);var E=r(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.TokenKind=void 0,n.createLexer=function(e,n){var t=new l(a.SOF,0,0,0,0,null);return{source:e,options:n,lastToken:t,token:t,line:1,lineStart:0,advance:i,lookahead:o}},n.getTokenDesc=function(e){var n=e.value;return n?e.kind+' "'+n+'"':e.kind};var t,r=(t=v)&&t.__esModule?t:{default:t};function i(){return this.lastToken=this.token,this.token=this.lookahead()}function o(){var e=this.token;if(e.kind!==a.EOF)do{e=e.next||(e.next=d(this,e))}while(e.kind===a.COMMENT);return e}var a=n.TokenKind=Object.freeze({SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});var c=String.prototype.charCodeAt,u=String.prototype.slice;function l(e,n,t,r,i,o,a){this.kind=e,this.start=n,this.end=t,this.line=r,this.column=i,this.value=a,this.prev=o,this.next=null}function s(e){return isNaN(e)?a.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'+("00"+e.toString(16).toUpperCase()).slice(-4)+'"'}function d(e,n){var t=e.source,i=t.body,o=i.length,d=function(e,n,t){var r=e.length,i=n;for(;i=o)return new l(a.EOF,o,o,v,T,n);var N=c.call(i,d);if(N<32&&9!==N&&10!==N&&13!==N)throw(0,f.syntaxError)(t,d,"Cannot contain the invalid character "+s(N)+".");switch(N){case 33:return new l(a.BANG,d,d+1,v,T,n);case 35:return function(e,n,t,r,i){var o=e.body,s=void 0,d=n;do{s=c.call(o,++d)}while(null!==s&&(s>31||9===s));return new l(a.COMMENT,n,d,t,r,i,u.call(o,n+1,d))}(t,d,v,T,n);case 36:return new l(a.DOLLAR,d,d+1,v,T,n);case 38:return new l(a.AMP,d,d+1,v,T,n);case 40:return new l(a.PAREN_L,d,d+1,v,T,n);case 41:return new l(a.PAREN_R,d,d+1,v,T,n);case 46:if(46===c.call(i,d+1)&&46===c.call(i,d+2))return new l(a.SPREAD,d,d+3,v,T,n);break;case 58:return new l(a.COLON,d,d+1,v,T,n);case 61:return new l(a.EQUALS,d,d+1,v,T,n);case 64:return new l(a.AT,d,d+1,v,T,n);case 91:return new l(a.BRACKET_L,d,d+1,v,T,n);case 93:return new l(a.BRACKET_R,d,d+1,v,T,n);case 123:return new l(a.BRACE_L,d,d+1,v,T,n);case 124:return new l(a.PIPE,d,d+1,v,T,n);case 125:return new l(a.BRACE_R,d,d+1,v,T,n);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return function(e,n,t,r,i){var o=e.body,s=o.length,d=n+1,f=0;for(;d!==s&&null!==(f=c.call(o,d))&&(95===f||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122);)++d;return new l(a.NAME,n,d,t,r,i,u.call(o,n,d))}(t,d,v,T,n);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(e,n,t,r,i,o){var d=e.body,v=t,p=n,T=!1;45===v&&(v=c.call(d,++p));if(48===v){if((v=c.call(d,++p))>=48&&v<=57)throw(0,f.syntaxError)(e,p,"Invalid number, unexpected digit after 0: "+s(v)+".")}else p=E(e,p,v),v=c.call(d,p);46===v&&(T=!0,v=c.call(d,++p),p=E(e,p,v),v=c.call(d,p));69!==v&&101!==v||(T=!0,43!==(v=c.call(d,++p))&&45!==v||(v=c.call(d,++p)),p=E(e,p,v));return new l(T?a.FLOAT:a.INT,n,p,r,i,o,u.call(d,n,p))}(t,d,N,v,T,n);case 34:return 34===c.call(i,d+1)&&34===c.call(i,d+2)?function(e,n,t,i,o){var d=e.body,v=n+3,E=v,p=0,T="";for(;v=48&&o<=57){do{o=c.call(r,++i)}while(o>=48&&o<=57);return i}throw(0,f.syntaxError)(e,i,"Invalid number, expected digit but got: "+s(o)+".")}function p(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}l.prototype.toJSON=l.prototype.inspect=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}});t(E);var p=r(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.Source=void 0;var t,r=(t=s)&&t.__esModule?t:{default:t};n.Source=function e(n,t,i){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.body=n,this.name=t||"GraphQL request",this.locationOffset=i||{line:1,column:1},this.locationOffset.line>0||(0,r.default)(0,"line in locationOffset is 1-indexed and must be positive"),this.locationOffset.column>0||(0,r.default)(0,"column in locationOffset is 1-indexed and must be positive")}});t(p);var T=r(function(e,n){Object.defineProperty(n,"__esModule",{value:!0});n.DirectiveLocation=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"})});t(T);var N=r(function(e,n){function t(e){var n=X(e,E.TokenKind.NAME);return{kind:o.Kind.NAME,value:n.value,loc:Y(e,n)}}function r(e){if(Q(e,E.TokenKind.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":case"fragment":return i(e);case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"extend":case"directive":return S(e)}else{if(Q(e,E.TokenKind.BRACE_L))return i(e);if(D(e))return S(e)}throw z(e)}function i(e){if(Q(e,E.TokenKind.NAME))switch(e.token.value){case"query":case"mutation":case"subscription":return a(e);case"fragment":return function(e){var n=e.token;if(H(e,"fragment"),e.options.experimentalFragmentVariables)return{kind:o.Kind.FRAGMENT_DEFINITION,name:y(e),variableDefinitions:u(e),typeCondition:(H(e,"on"),L(e)),directives:g(e,!1),selectionSet:d(e),loc:Y(e,n)};return{kind:o.Kind.FRAGMENT_DEFINITION,name:y(e),typeCondition:(H(e,"on"),L(e)),directives:g(e,!1),selectionSet:d(e),loc:Y(e,n)}}(e)}else if(Q(e,E.TokenKind.BRACE_L))return a(e);throw z(e)}function a(e){var n=e.token;if(Q(e,E.TokenKind.BRACE_L))return{kind:o.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:d(e),loc:Y(e,n)};var r=c(e),i=void 0;return Q(e,E.TokenKind.NAME)&&(i=t(e)),{kind:o.Kind.OPERATION_DEFINITION,operation:r,name:i,variableDefinitions:u(e),directives:g(e,!1),selectionSet:d(e),loc:Y(e,n)}}function c(e){var n=X(e,E.TokenKind.NAME);switch(n.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw z(e,n)}function u(e){return Q(e,E.TokenKind.PAREN_L)?W(e,E.TokenKind.PAREN_L,l,E.TokenKind.PAREN_R):[]}function l(e){var n=e.token;return{kind:o.Kind.VARIABLE_DEFINITION,variable:s(e),type:(X(e,E.TokenKind.COLON),K(e)),defaultValue:q(e,E.TokenKind.EQUALS)?m(e,!0):void 0,loc:Y(e,n)}}function s(e){var n=e.token;return X(e,E.TokenKind.DOLLAR),{kind:o.Kind.VARIABLE,name:t(e),loc:Y(e,n)}}function d(e){var n=e.token;return{kind:o.Kind.SELECTION_SET,selections:W(e,E.TokenKind.BRACE_L,v,E.TokenKind.BRACE_R),loc:Y(e,n)}}function v(e){return Q(e,E.TokenKind.SPREAD)?function(e){var n=e.token;if(X(e,E.TokenKind.SPREAD),Q(e,E.TokenKind.NAME)&&"on"!==e.token.value)return{kind:o.Kind.FRAGMENT_SPREAD,name:y(e),directives:g(e,!1),loc:Y(e,n)};var t=void 0;"on"===e.token.value&&(e.advance(),t=L(e));return{kind:o.Kind.INLINE_FRAGMENT,typeCondition:t,directives:g(e,!1),selectionSet:d(e),loc:Y(e,n)}}(e):function(e){var n=e.token,r=t(e),i=void 0,a=void 0;q(e,E.TokenKind.COLON)?(i=r,a=t(e)):a=r;return{kind:o.Kind.FIELD,alias:i,name:a,arguments:N(e,!1),directives:g(e,!1),selectionSet:Q(e,E.TokenKind.BRACE_L)?d(e):void 0,loc:Y(e,n)}}(e)}function N(e,n){var t=n?k:I;return Q(e,E.TokenKind.PAREN_L)?W(e,E.TokenKind.PAREN_L,t,E.TokenKind.PAREN_R):[]}function I(e){var n=e.token;return{kind:o.Kind.ARGUMENT,name:t(e),value:(X(e,E.TokenKind.COLON),m(e,!1)),loc:Y(e,n)}}function k(e){var n=e.token;return{kind:o.Kind.ARGUMENT,name:t(e),value:(X(e,E.TokenKind.COLON),_(e)),loc:Y(e,n)}}function y(e){if("on"===e.token.value)throw z(e);return t(e)}function m(e,n){var t=e.token;switch(t.kind){case E.TokenKind.BRACKET_L:return function(e,n){var t=e.token,r=n?_:h;return{kind:o.Kind.LIST,values:function(e,n,t,r){X(e,n);var i=[];for(;!q(e,r);)i.push(t(e));return i}(e,E.TokenKind.BRACKET_L,r,E.TokenKind.BRACKET_R),loc:Y(e,t)}}(e,n);case E.TokenKind.BRACE_L:return function(e,n){var t=e.token;X(e,E.TokenKind.BRACE_L);var r=[];for(;!q(e,E.TokenKind.BRACE_R);)r.push(A(e,n));return{kind:o.Kind.OBJECT,fields:r,loc:Y(e,t)}}(e,n);case E.TokenKind.INT:return e.advance(),{kind:o.Kind.INT,value:t.value,loc:Y(e,t)};case E.TokenKind.FLOAT:return e.advance(),{kind:o.Kind.FLOAT,value:t.value,loc:Y(e,t)};case E.TokenKind.STRING:case E.TokenKind.BLOCK_STRING:return O(e);case E.TokenKind.NAME:return"true"===t.value||"false"===t.value?(e.advance(),{kind:o.Kind.BOOLEAN,value:"true"===t.value,loc:Y(e,t)}):"null"===t.value?(e.advance(),{kind:o.Kind.NULL,loc:Y(e,t)}):(e.advance(),{kind:o.Kind.ENUM,value:t.value,loc:Y(e,t)});case E.TokenKind.DOLLAR:if(!n)return s(e)}throw z(e)}function O(e){var n=e.token;return e.advance(),{kind:o.Kind.STRING,value:n.value,block:n.kind===E.TokenKind.BLOCK_STRING,loc:Y(e,n)}}function _(e){return m(e,!0)}function h(e){return m(e,!1)}function A(e,n){var r=e.token;return{kind:o.Kind.OBJECT_FIELD,name:t(e),value:(X(e,E.TokenKind.COLON),m(e,n)),loc:Y(e,r)}}function g(e,n){for(var t=[];Q(e,E.TokenKind.AT);)t.push(b(e,n));return t}function b(e,n){var r=e.token;return X(e,E.TokenKind.AT),{kind:o.Kind.DIRECTIVE,name:t(e),arguments:N(e,n),loc:Y(e,r)}}function K(e){var n=e.token,t=void 0;return q(e,E.TokenKind.BRACKET_L)?(t=K(e),X(e,E.TokenKind.BRACKET_R),t={kind:o.Kind.LIST_TYPE,type:t,loc:Y(e,n)}):t=L(e),q(e,E.TokenKind.BANG)?{kind:o.Kind.NON_NULL_TYPE,type:t,loc:Y(e,n)}:t}function L(e){var n=e.token;return{kind:o.Kind.NAMED_TYPE,name:t(e),loc:Y(e,n)}}function S(e){var n=D(e)?e.lookahead():e.token;if(n.kind===E.TokenKind.NAME)switch(n.value){case"schema":return function(e){var n=e.token;H(e,"schema");var t=g(e,!0),r=W(e,E.TokenKind.BRACE_L,P,E.TokenKind.BRACE_R);return{kind:o.Kind.SCHEMA_DEFINITION,directives:t,operationTypes:r,loc:Y(e,n)}}(e);case"scalar":return function(e){var n=e.token,r=R(e);H(e,"scalar");var i=t(e),a=g(e,!0);return{kind:o.Kind.SCALAR_TYPE_DEFINITION,description:r,name:i,directives:a,loc:Y(e,n)}}(e);case"type":return function(e){var n=e.token,r=R(e);H(e,"type");var i=t(e),a=F(e),c=g(e,!0),u=C(e);return{kind:o.Kind.OBJECT_TYPE_DEFINITION,description:r,name:i,interfaces:a,directives:c,fields:u,loc:Y(e,n)}}(e);case"interface":return function(e){var n=e.token,r=R(e);H(e,"interface");var i=t(e),a=g(e,!0),c=C(e);return{kind:o.Kind.INTERFACE_TYPE_DEFINITION,description:r,name:i,directives:a,fields:c,loc:Y(e,n)}}(e);case"union":return function(e){var n=e.token,r=R(e);H(e,"union");var i=t(e),a=g(e,!0),c=B(e);return{kind:o.Kind.UNION_TYPE_DEFINITION,description:r,name:i,directives:a,types:c,loc:Y(e,n)}}(e);case"enum":return function(e){var n=e.token,r=R(e);H(e,"enum");var i=t(e),a=g(e,!0),c=j(e);return{kind:o.Kind.ENUM_TYPE_DEFINITION,description:r,name:i,directives:a,values:c,loc:Y(e,n)}}(e);case"input":return function(e){var n=e.token,r=R(e);H(e,"input");var i=t(e),a=g(e,!0),c=V(e);return{kind:o.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:i,directives:a,fields:c,loc:Y(e,n)}}(e);case"extend":return function(e){var n=e.lookahead();if(n.kind===E.TokenKind.NAME)switch(n.value){case"scalar":return function(e){var n=e.token;H(e,"extend"),H(e,"scalar");var r=t(e),i=g(e,!0);if(0===i.length)throw z(e);return{kind:o.Kind.SCALAR_TYPE_EXTENSION,name:r,directives:i,loc:Y(e,n)}}(e);case"type":return function(e){var n=e.token;H(e,"extend"),H(e,"type");var r=t(e),i=F(e),a=g(e,!0),c=C(e);if(0===i.length&&0===a.length&&0===c.length)throw z(e);return{kind:o.Kind.OBJECT_TYPE_EXTENSION,name:r,interfaces:i,directives:a,fields:c,loc:Y(e,n)}}(e);case"interface":return function(e){var n=e.token;H(e,"extend"),H(e,"interface");var r=t(e),i=g(e,!0),a=C(e);if(0===i.length&&0===a.length)throw z(e);return{kind:o.Kind.INTERFACE_TYPE_EXTENSION,name:r,directives:i,fields:a,loc:Y(e,n)}}(e);case"union":return function(e){var n=e.token;H(e,"extend"),H(e,"union");var r=t(e),i=g(e,!0),a=B(e);if(0===i.length&&0===a.length)throw z(e);return{kind:o.Kind.UNION_TYPE_EXTENSION,name:r,directives:i,types:a,loc:Y(e,n)}}(e);case"enum":return function(e){var n=e.token;H(e,"extend"),H(e,"enum");var r=t(e),i=g(e,!0),a=j(e);if(0===i.length&&0===a.length)throw z(e);return{kind:o.Kind.ENUM_TYPE_EXTENSION,name:r,directives:i,values:a,loc:Y(e,n)}}(e);case"input":return function(e){var n=e.token;H(e,"extend"),H(e,"input");var r=t(e),i=g(e,!0),a=V(e);if(0===i.length&&0===a.length)throw z(e);return{kind:o.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:i,fields:a,loc:Y(e,n)}}(e)}throw z(e,n)}(e);case"directive":return function(e){var n=e.token,r=R(e);H(e,"directive"),X(e,E.TokenKind.AT);var i=t(e),a=M(e);H(e,"on");var c=function(e){q(e,E.TokenKind.PIPE);var n=[];do{n.push(G(e))}while(q(e,E.TokenKind.PIPE));return n}(e);return{kind:o.Kind.DIRECTIVE_DEFINITION,description:r,name:i,arguments:a,locations:c,loc:Y(e,n)}}(e)}throw z(e,n)}function D(e){return Q(e,E.TokenKind.STRING)||Q(e,E.TokenKind.BLOCK_STRING)}function R(e){if(D(e))return O(e)}function P(e){var n=e.token,t=c(e);X(e,E.TokenKind.COLON);var r=L(e);return{kind:o.Kind.OPERATION_TYPE_DEFINITION,operation:t,type:r,loc:Y(e,n)}}function F(e){var n=[];if("implements"===e.token.value){e.advance(),q(e,E.TokenKind.AMP);do{n.push(L(e))}while(q(e,E.TokenKind.AMP)||e.options.allowLegacySDLImplementsInterfaces&&Q(e,E.TokenKind.NAME))}return n}function C(e){return e.options.allowLegacySDLEmptyFields&&Q(e,E.TokenKind.BRACE_L)&&e.lookahead().kind===E.TokenKind.BRACE_R?(e.advance(),e.advance(),[]):Q(e,E.TokenKind.BRACE_L)?W(e,E.TokenKind.BRACE_L,w,E.TokenKind.BRACE_R):[]}function w(e){var n=e.token,r=R(e),i=t(e),a=M(e);X(e,E.TokenKind.COLON);var c=K(e),u=g(e,!0);return{kind:o.Kind.FIELD_DEFINITION,description:r,name:i,arguments:a,type:c,directives:u,loc:Y(e,n)}}function M(e){return Q(e,E.TokenKind.PAREN_L)?W(e,E.TokenKind.PAREN_L,x,E.TokenKind.PAREN_R):[]}function x(e){var n=e.token,r=R(e),i=t(e);X(e,E.TokenKind.COLON);var a=K(e),c=void 0;q(e,E.TokenKind.EQUALS)&&(c=_(e));var u=g(e,!0);return{kind:o.Kind.INPUT_VALUE_DEFINITION,description:r,name:i,type:a,defaultValue:c,directives:u,loc:Y(e,n)}}function B(e){var n=[];if(q(e,E.TokenKind.EQUALS)){q(e,E.TokenKind.PIPE);do{n.push(L(e))}while(q(e,E.TokenKind.PIPE))}return n}function j(e){return Q(e,E.TokenKind.BRACE_L)?W(e,E.TokenKind.BRACE_L,U,E.TokenKind.BRACE_R):[]}function U(e){var n=e.token,r=R(e),i=t(e),a=g(e,!0);return{kind:o.Kind.ENUM_VALUE_DEFINITION,description:r,name:i,directives:a,loc:Y(e,n)}}function V(e){return Q(e,E.TokenKind.BRACE_L)?W(e,E.TokenKind.BRACE_L,x,E.TokenKind.BRACE_R):[]}function G(e){var n=e.token,r=t(e);if(T.DirectiveLocation.hasOwnProperty(r.value))return r;throw z(e,n)}function Y(e,n){if(!e.options.noLocation)return new J(n,e.lastToken,e.source)}function J(e,n,t){this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=t}function Q(e,n){return e.token.kind===n}function q(e,n){var t=e.token.kind===n;return t&&e.advance(),t}function X(e,n){var t=e.token;if(t.kind===n)return e.advance(),t;throw(0,f.syntaxError)(e.source,t.start,"Expected "+n+", found "+(0,E.getTokenDesc)(t))}function H(e,n){var t=e.token;if(t.kind===E.TokenKind.NAME&&t.value===n)return e.advance(),t;throw(0,f.syntaxError)(e.source,t.start,'Expected "'+n+'", found '+(0,E.getTokenDesc)(t))}function z(e,n){var t=n||e.token;return(0,f.syntaxError)(e.source,t.start,"Unexpected "+(0,E.getTokenDesc)(t))}function W(e,n,t,r){X(e,n);for(var i=[t(e)];!q(e,r);)i.push(t(e));return i}Object.defineProperty(n,"__esModule",{value:!0}),n.parse=function(e,n){var t="string"==typeof e?new p.Source(e):e;if(!(t instanceof p.Source))throw new TypeError("Must provide Source. Received: "+String(t));return function(e){var n=e.token;X(e,E.TokenKind.SOF);var t=[];do{t.push(r(e))}while(!q(e,E.TokenKind.EOF));return{kind:o.Kind.DOCUMENT,definitions:t,loc:Y(e,n)}}((0,E.createLexer)(t,n||{}))},n.parseValue=function(e,n){var t="string"==typeof e?new p.Source(e):e,r=(0,E.createLexer)(t,n||{});X(r,E.TokenKind.SOF);var i=m(r,!1);return X(r,E.TokenKind.EOF),i},n.parseType=function(e,n){var t="string"==typeof e?new p.Source(e):e,r=(0,E.createLexer)(t,n||{});X(r,E.TokenKind.SOF);var i=K(r);return X(r,E.TokenKind.EOF),i},n.parseConstValue=_,n.parseTypeReference=K,n.parseNamedType=L,J.prototype.toJSON=J.prototype.inspect=function(){return{start:this.start,end:this.end}}});t(N);var I=r(function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.visit=function(e,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,c=void 0,u=Array.isArray(e),l=[e],s=-1,d=[],f=void 0,v=void 0,E=void 0,p=[],T=[],N=e;do{var I=++s===l.length,k=I&&0!==d.length;if(I){if(v=0===T.length?void 0:p[p.length-1],f=E,E=T.pop(),k){if(u)f=f.slice();else{var y={};for(var m in f)f.hasOwnProperty(m)&&(y[m]=f[m]);f=y}for(var O=0,_=0;_"!==t.kind;)"Comment"===t.kind&&(Object.assign(t,{column:t.column-1}),n.push(t)),t=t.next;return n}(i),function n(t){if(t&&"object"===e(t))for(var r in delete t.startToken,delete t.endToken,delete t.prev,delete t.next,t)n(t[r]);return t}(i),i}catch(e){throw e instanceof f.GraphQLError?n(e.message,{start:{line:e.locations[0].line,column:e.locations[0].column}}):e}},astFormat:"graphql",locStart:function(e){return"number"==typeof e.start?e.start:e.loc&&e.loc.start},locEnd:function(e){return"number"==typeof e.end?e.end:e.loc&&e.loc.end}}}}});