-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathgql2hx_demo.js
1 lines (1 loc) · 97.2 KB
/
gql2hx_demo.js
1
(function(u,p){"use strict";u["graphql"]=u["graphql"]||{};var i=function(){return m.__string_rec(this,"")},v=v||{},e;function w(e,t){var r=Object.create(e);for(var n in t)r[n]=t[n];if(t.toString!==Object.prototype.toString)r.toString=t.toString;return r}var t=u["Demo"]=function(){};t.__name__=true;t.main=function(){};t.parse=function(e){var t=new N(e,{noLocation:true});return t.document};t.hxgen=function(e){return J.parse(e)};var o=function(e,t){this.r=new RegExp(e,t.split("u").join(""))};o.__name__=true;o.prototype={match:function(e){if(this.r.global){this.r.lastIndex=0}this.r.m=this.r.exec(e);this.r.s=e;return this.r.m!=null},matched:function(e){if(this.r.m!=null&&e>=0&&e<this.r.m.length){return this.r.m[e]}else{throw Q.thrown("EReg::matched")}},matchedRight:function(){if(this.r.m==null){throw Q.thrown("No string matched")}var e=this.r.m.index+this.r.m[0].length;return W.substr(this.r.s,e,this.r.s.length-e)},matchedPos:function(){if(this.r.m==null){throw Q.thrown("No string matched")}return{pos:this.r.m.index,len:this.r.m[0].length}},split:function(e){var t="#__delim__#";return e.replace(this.r,t).split(t)}};var W=function(){};W.__name__=true;W.cca=function(e,t){var r=e.charCodeAt(t);if(r!=r){return undefined}return r};W.substr=function(e,t,r){if(r==null){r=e.length}else if(r<0){if(t==0){r=e.length+r}else{return""}}return e.substr(t,r)};W.remove=function(e,t){var r=e.indexOf(t);if(r==-1){return false}e.splice(r,1);return true};W.now=function(){return Date.now()};var $=function(){};$.__name__=true;$.has=function(e,t){var r=M(e);while(r.hasNext()){var n=r.next();if(n==t){return true}}return false};$.exists=function(e,t){var r=M(e);while(r.hasNext()){var n=r.next();if(t(n)){return true}}return false};$.find=function(e,t){var r=M(e);while(r.hasNext()){var n=r.next();if(t(n)){return n}}return null};Math.__name__=true;var H=function(){};H.__name__=true;H.field=function(e,t){try{return e[t]}catch(e){return null}};H.getProperty=function(e,t){var r;if(e==null){return null}else{var n;if(e.__properties__){r=e.__properties__["get_"+t];n=r}else{n=false}if(n){return e[r]()}else{return e[t]}}};H.isObject=function(e){if(e==null){return false}var t=typeof e;if(!(t=="string"||t=="object"&&e.__enum__==null)){if(t=="function"){return(e.__name__||e.__ename__)!=null}else{return false}}else{return true}};var P=function(){};P.__name__=true;P.string=function(e){return m.__string_rec(e,"")};P.parseInt=function(e){var t=parseInt(e);if(isNaN(t)){return null}return t};var D=function(){this.b=""};D.__name__=true;var Y=function(){};Y.__name__=true;Y.endsWith=function(e,t){var r=t.length;var n=e.length;if(n>=r){return e.indexOf(t,n-r)==n-r}else{return false}};Y.replace=function(e,t,r){return e.split(t).join(r)};var O=function(e,t){if(t==null){t=false}if(e==null){e="\t"}this.tabs="";this.fieldDelimiter=t?",":";";this.shortTypedefs=t;this.tabString=e};O.__name__=true;O.prototype={printUnop:function(e){switch(e._hx_index){case 0:return"++";case 1:return"--";case 2:return"!";case 3:return"-";case 4:return"~";case 5:return"..."}},printBinop:function(e){switch(e._hx_index){case 0:return"+";case 1:return"*";case 2:return"/";case 3:return"-";case 4:return"=";case 5:return"==";case 6:return"!=";case 7:return">";case 8:return">=";case 9:return"<";case 10:return"<=";case 11:return"&";case 12:return"|";case 13:return"^";case 14:return"&&";case 15:return"||";case 16:return"<<";case 17:return">>";case 18:return">>>";case 19:return"%";case 20:var t=e.op;return this.printBinop(t)+"=";case 21:return"...";case 22:return"=>";case 23:return"in";case 24:return"?."}},escapeString:function(e,t){return t+Y.replace(Y.replace(Y.replace(Y.replace(e,"\n","\\n"),"\t","\\t"),"'","\\'"),'"','\\"')+t},printString:function(e){return this.escapeString(e,'"')},printConstant:function(e){switch(e._hx_index){case 0:var t=e.s;var r=e.v;return r;case 1:var t=e.s;var r=e.f;return r;case 2:var t=e.kind;var r=e.s;return this.printString(r);case 3:var r=e.s;return r;case 4:var r=e.r;var n=e.opt;return"~/"+r+"/"+n}},printTypeParam:function(e){switch(e._hx_index){case 0:var t=e.t;return this.printComplexType(t);case 1:var r=e.e;return this.printExpr(r)}},printTypePath:function(e){var t=(e.pack.length>0?e.pack.join(".")+".":"")+e.name+(e.sub!=null?"."+e.sub:"");var r;if(e.params==null){r=""}else if(e.params.length>0){var n=e.params;var a=re(this,this.printTypeParam);var i=new Array(n.length);var s=0;var o=n.length;while(s<o){var _=s++;i[_]=a(n[_])}r="<"+i.join(", ")+">"}else{r=""}return t+r},printComplexType:function(e){var r=this;switch(e._hx_index){case 0:var t=e.p;return this.printTypePath(t);case 1:var n=e.args;var a=e.ret;var i=function(e){if(e._hx_index==1){var t=e.args;var t=e.ret;return"("+r.printComplexType(e)+")"}else{return r.printComplexType(e)}};var s;if(n.length>0){var o=i;var _=new Array(n.length);var h=0;var l=n.length;while(h<l){var u=h++;_[u]=o(n[u])}s=_.join(" -> ")}else{s="Void"}return s+" -> "+this.printComplexType(a);case 2:var p=e.fields;var h=[];var l=0;while(l<p.length){var o=p[l];++l;h.push(this.printField(o)+this.fieldDelimiter+" ")}return"{ "+h.join("")+"}";case 3:var c=e.t;return"("+this.printComplexType(c)+")";case 4:var v=e.p;var p=e.fields;var o=re(this,this.printTypePath);var _=new Array(v.length);var h=0;var l=v.length;while(h<l){var u=h++;_[u]=o(v[u])}var s="{> "+_.join(" >, ")+", ";var o=re(this,this.printField);var _=new Array(p.length);var h=0;var l=p.length;while(h<l){var u=h++;_[u]=o(p[u])}return s+_.join(", ")+" }";case 5:var c=e.t;return"?"+this.printComplexType(c);case 6:var f=e.n;var c=e.t;return f+":"+this.printComplexType(c);case 7:var m=e.tl;var o=re(this,this.printComplexType);var _=new Array(m.length);var h=0;var l=m.length;while(h<l){var u=h++;_[u]=o(m[u])}return _.join(" & ")}},printMetadata:function(e){return"@"+e.name+(e.params!=null&&e.params.length>0?"("+this.printExprs(e.params,", ")+")":"")},printAccess:function(e){switch(e._hx_index){case 0:return"public";case 1:return"private";case 2:return"static";case 3:return"override";case 4:return"dynamic";case 5:return"inline";case 6:return"macro";case 7:return"final";case 8:return"extern";case 9:return"/* abstract? */";case 10:return"/* overload? */"}},printField:function(e){var t;if(this.shortTypedefs){var r=e.kind;if(r._hx_index==0){var n=r.t;var n=r.e;t=true}else{t=false}}else{t=false}var a=e.meta!=null&&e.meta.length>0&&$.exists(e.meta,function(e){return e.name==":optional"});var r=[];var n=0;var i=e.meta;while(n<i.length){var s=i[n];++n;if(t&&s.name!=":optional"){r.push(s)}}var o=r;var _=e.doc!=null&&e.doc!=""?"/**\n"+this.tabs+this.tabString+Y.replace(e.doc,"\n","\n"+this.tabs+this.tabString)+"\n"+this.tabs+"**/\n"+this.tabs:"";var h;if(o!=null&&o.length>0){var l=re(this,this.printMetadata);var u=new Array(o.length);var r=0;var n=o.length;while(r<n){var p=r++;u[p]=l(o[p])}h=u.join("\n"+this.tabs)+("\n"+this.tabs)}else{h=""}var c=_+h;var _;if(e.access!=null&&e.access.length>0){var v=e.access;var l=re(this,this.printAccess);var u=new Array(v.length);var r=0;var n=v.length;while(r<n){var p=r++;u[p]=l(v[p])}_=u.join(" ")+" "}else{_=""}var h=c+_;var r=e.kind;var f;switch(r._hx_index){case 0:var m=r.t;var d=r.e;f=this.shortTypedefs?""+(a?"?":"")+e.name+this.opt(m,re(this,this.printComplexType)," : ")+this.opt(d,re(this,this.printExpr)," = "):"var "+e.name+this.opt(m,re(this,this.printComplexType)," : ")+this.opt(d,re(this,this.printExpr)," = ");break;case 1:var x=r.f;f="function "+e.name+this.printFunction(x);break;case 2:var g=r.get;var y=r.set;var m=r.t;var d=r.e;f="var "+e.name+"("+g+", "+y+")"+this.opt(m,re(this,this.printComplexType)," : ")+this.opt(d,re(this,this.printExpr)," = ");break}return h+f},printTypeParamDecl:function(e){var t=e.name;var r;if(e.params!=null&&e.params.length>0){var n=e.params;var a=re(this,this.printTypeParamDecl);var i=new Array(n.length);var s=0;var o=n.length;while(s<o){var _=s++;i[_]=a(n[_])}r="<"+i.join(", ")+">"}else{r=""}var h=t+r;var r;if(e.constraints!=null&&e.constraints.length>0){var n=e.constraints;var a=re(this,this.printComplexType);var i=new Array(n.length);var s=0;var o=n.length;while(s<o){var _=s++;i[_]=a(n[_])}r=":("+i.join(", ")+")"}else{r=""}return h+r},printFunctionArg:function(e){return(e.opt?"?":"")+e.name+this.opt(e.type,re(this,this.printComplexType),":")+this.opt(e.value,re(this,this.printExpr)," = ")},printFunction:function(e){var t;if(e.params==null){t=""}else if(e.params.length>0){var r=e.params;var n=re(this,this.printTypeParamDecl);var a=new Array(r.length);var i=0;var s=r.length;while(i<s){var o=i++;a[o]=n(r[o])}t="<"+a.join(", ")+">"}else{t=""}var _=t+"(";var r=e.args;var n=re(this,this.printFunctionArg);var a=new Array(r.length);var i=0;var s=r.length;while(i<s){var o=i++;a[o]=n(r[o])}return _+a.join(", ")+")"+this.opt(e.ret,re(this,this.printComplexType),":")+this.opt(e.expr,re(this,this.printExpr)," ")},printVar:function(e){return e.name+this.opt(e.type,re(this,this.printComplexType),":")+this.opt(e.expr,re(this,this.printExpr)," = ")},printExpr:function(e){var t=this;if(e==null){return"#NULL"}else{var r=e.expr;switch(r._hx_index){case 0:var n=r.c;return this.printConstant(n);case 1:var a=r.e1;var i=r.e2;return""+this.printExpr(a)+"["+this.printExpr(i)+"]";case 2:var s=r.op;var a=r.e1;var i=r.e2;return""+this.printExpr(a)+" "+this.printBinop(s)+" "+this.printExpr(i);case 3:var o=r.kind;var a=r.e;var _=r.field;return""+this.printExpr(a)+"."+_;case 4:var a=r.e;return"("+this.printExpr(a)+")";case 5:var h=r.fields;var l=new Array(h.length);var o=0;var u=h.length;while(o<u){var p=o++;var c=h[p];l[p]=""+c.field+" : "+t.printExpr(c.expr)}return"{ "+l.join(", ")+" }";case 6:var v=r.values;return"["+this.printExprs(v,", ")+"]";case 7:var a=r.e;var v=r.params;return""+this.printExpr(a)+"("+this.printExprs(v,", ")+")";case 8:var f=r.t;var v=r.params;return"new "+this.printTypePath(f)+"("+this.printExprs(v,", ")+")";case 9:var o=r.op;var u=r.e;if(r.postFix){var s=o;var a=u;return this.printExpr(a)+this.printUnop(s)}else{var s=o;var a=u;return this.printUnop(s)+this.printExpr(a)}break;case 10:var m=r.vars;var d=re(this,this.printVar);var l=new Array(m.length);var o=0;var u=m.length;while(o<u){var p=o++;l[p]=d(m[p])}return"var "+l.join(", ");case 11:var o=r.f;var x=r.kind;var g=o;if(x!=null){return"function "+P.string(x)+this.printFunction(g)}else{var g=o;return"function"+this.printFunction(g)}break;case 12:var o=r.exprs;if(o.length==0){return"{ }"}else{var v=o;var y=this.tabs;this.tabs+=this.tabString;var w="{\n"+this.tabs+this.printExprs(v,";\n"+this.tabs);this.tabs=y;return w+(";\n"+this.tabs+"}")}break;case 13:var a=r.it;var i=r.expr;return"for ("+this.printExpr(a)+") "+this.printExpr(i);case 14:var o=r.econd;var u=r.eif;var k=r.eelse;if(k==null){var T=u;var b=o;return"if ("+this.printExpr(b)+") "+this.printExpr(T)}else{var E=k;var T=u;var b=o;return"if ("+this.printExpr(b)+") "+this.printExpr(T)+" else "+this.printExpr(E)}break;case 15:var o=r.econd;var u=r.e;if(r.normalWhile){var a=u;var b=o;return"while ("+this.printExpr(b)+") "+this.printExpr(a)}else{var a=u;var b=o;return"do "+this.printExpr(a)+" while ("+this.printExpr(b)+")"}break;case 16:var a=r.e;var S=r.cases;var D=r.edef;var y=this.tabs;this.tabs+=this.tabString;var w="switch "+this.printExpr(a)+" {\n"+this.tabs;var l=new Array(S.length);var o=0;var u=S.length;while(o<u){var p=o++;var n=S[p];l[p]="case "+t.printExprs(n.values,", ")+(n.guard!=null?" if ("+t.printExpr(n.guard)+"):":":")+(n.expr!=null?t.opt(n.expr,re(t,t.printExpr))+";":"")}var O=w+l.join("\n"+this.tabs);if(D!=null){O+="\n"+this.tabs+"default:"+(D.expr==null?"":this.printExpr(D)+";")}this.tabs=y;return O+("\n"+this.tabs+"}");case 17:var a=r.e;var S=r.catches;var A="try "+this.printExpr(a);var l=new Array(S.length);var o=0;var u=S.length;while(o<u){var p=o++;var n=S[p];l[p]=" catch("+n.name+":"+t.printComplexType(n.type)+") "+t.printExpr(n.expr)}return A+l.join("");case 18:var C=r.e;return"return"+this.opt(C,re(this,this.printExpr)," ");case 19:return"break";case 20:return"continue";case 21:var a=r.e;return"untyped "+this.printExpr(a);case 22:var a=r.e;return"throw "+this.printExpr(a);case 23:var o=r.e;var a=o;var F=r.t;if(F!=null){return"cast("+this.printExpr(a)+", "+this.printComplexType(F)+")"}else{var a=o;return"cast "+this.printExpr(a)}break;case 24:var o=r.displayKind;var a=r.e;return"#DISPLAY("+this.printExpr(a)+")";case 25:var b=r.econd;var T=r.eif;var E=r.eelse;return""+this.printExpr(b)+" ? "+this.printExpr(T)+" : "+this.printExpr(E);case 26:var a=r.e;var N=r.t;return"("+this.printExpr(a)+" : "+this.printComplexType(N)+")";case 27:var I=r.s;var a=r.e;return this.printMetadata(I)+" "+this.printExpr(a);case 28:var a=r.e;var N=r.t;return""+this.printExpr(a)+" is "+this.printComplexType(N)}}},printExprs:function(e,t){var r=re(this,this.printExpr);var n=new Array(e.length);var a=0;var i=e.length;while(a<i){var s=a++;n[s]=r(e[s])}return n.join(t)},printExtension:function(e,t){var r="{\n"+this.tabs+">";var n=re(this,this.printTypePath);var a=new Array(e.length);var i=0;var s=e.length;while(i<s){var o=i++;a[o]=n(e[o])}var _=r+a.join(",\n"+this.tabs+">")+",";var r;if(t.length>0){var h="\n"+this.tabs;var n=re(this,this.printField);var a=new Array(t.length);var i=0;var s=t.length;while(i<s){var o=i++;a[o]=n(t[o])}r=h+a.join(";\n"+this.tabs)+";\n}"}else{r="\n}"}return _+r},printStructure:function(e){if(e.length==0){return"{ }"}else{var t="{\n"+this.tabs;var r=re(this,this.printField);var n=new Array(e.length);var a=0;var i=e.length;while(a<i){var s=a++;n[s]=r(e[s])}return t+n.join(this.fieldDelimiter+("\n"+this.tabs))+";\n}"}},printTypeDefinition:function(e,t){if(t==null){t=true}var r=this.tabs;this.tabs=this.tabString;var n;if(e==null){n="#NULL"}else{var a=t&&e.pack.length>0&&e.pack[0]!=""?"package "+e.pack.join(".")+";\n":"";var i;if(e.meta!=null&&e.meta.length>0){var s=e.meta;var o=re(this,this.printMetadata);var _=new Array(s.length);var h=0;var l=s.length;while(h<l){var u=h++;_[u]=o(s[u])}i=_.join(" ")+" "}else{i=""}var U=a+i+(e.isExtern?"extern ":"");var h=e.kind;var a;switch(h._hx_index){case 0:var i="enum "+e.name;var p;if(e.params!=null&&e.params.length>0){var s=e.params;var o=re(this,this.printTypeParamDecl);var _=new Array(s.length);var l=0;var c=s.length;while(l<c){var u=l++;_[u]=o(s[u])}p="<"+_.join(", ")+">"}else{p=""}var v=i+p+" {\n";var l=[];var c=0;var f=e.fields;while(c<f.length){var m=f[c];++c;var i=this.tabs+(m.doc!=null&&m.doc!=""?"/**\n"+this.tabs+this.tabString+Y.replace(m.doc,"\n","\n"+this.tabs+this.tabString)+"\n"+this.tabs+"**/\n"+this.tabs:"");var p;if(m.meta!=null&&m.meta.length>0){var s=m.meta;var o=re(this,this.printMetadata);var _=new Array(s.length);var d=0;var B=s.length;while(d<B){var u=d++;_[u]=o(s[u])}p=_.join(" ")+" "}else{p=""}var x=i+p;var g=m.kind;var y;switch(g._hx_index){case 0:var K=g.e;var w=g.t;y=m.name+this.opt(w,re(this,this.printComplexType),":");break;case 1:var k=g.f;y=m.name+this.printFunction(k);break;case 2:var R=g.get;var V=g.set;var L=g.t;var M=g.e;throw Q.thrown("FProp is invalid for TDEnum.")}l.push(x+y+";")}a=v+l.join("\n")+"\n}";break;case 1:var i="typedef "+e.name;var p;if(e.params!=null&&e.params.length>0){var s=e.params;var o=re(this,this.printTypeParamDecl);var _=new Array(s.length);var l=0;var c=s.length;while(l<c){var u=l++;_[u]=o(s[u])}p="<"+_.join(", ")+">"}else{p=""}var v=i+p+" = {\n";var l=[];var c=0;var f=e.fields;while(c<f.length){var o=f[c];++c;l.push(this.tabs+this.printField(o)+this.fieldDelimiter)}a=v+l.join("\n")+"\n}";break;case 2:var l=h.isFinal;var l=h.isAbstract;var T=h.superClass;var b=h.interfaces;var E=h.isInterface;var i=(E?"interface ":"class ")+e.name;var p;if(e.params!=null&&e.params.length>0){var s=e.params;var o=re(this,this.printTypeParamDecl);var _=new Array(s.length);var l=0;var c=s.length;while(l<c){var u=l++;_[u]=o(s[u])}p="<"+_.join(", ")+">"}else{p=""}var v=i+p+(T!=null?" extends "+this.printTypePath(T):"");var i;if(b!=null){var p;if(E){var l=[];var c=0;while(c<b.length){var S=b[c];++c;l.push(" extends "+this.printTypePath(S))}p=l}else{var l=[];var c=0;while(c<b.length){var S=b[c];++c;l.push(" implements "+this.printTypePath(S))}p=l}i=p.join("")}else{i=""}var p=v+i+" {\n";var l=[];var c=0;var f=e.fields;while(c<f.length){var o=f[c];++c;l.push(this.tabs+this.printFieldWithDelimiter(o))}a=p+l.join("\n")+"\n}";break;case 3:var D=h.t;var i="typedef "+e.name;var p;if(e.params!=null&&e.params.length>0){var s=e.params;var o=re(this,this.printTypeParamDecl);var _=new Array(s.length);var l=0;var c=s.length;while(l<c){var u=l++;_[u]=o(s[u])}p="<"+_.join(", ")+">"}else{p=""}var v=i+p+" = ";var i;switch(D._hx_index){case 2:var O=D.fields;i=this.printStructure(O);break;case 4:var q=D.p;var O=D.fields;i=this.printExtension(q,O);break;default:i=this.printComplexType(D)}a=v+i+";";break;case 4:var A=h.tthis;var C=h.from;var F=h.to;var i="abstract "+e.name;var p;if(e.params!=null&&e.params.length>0){var s=e.params;var o=re(this,this.printTypeParamDecl);var _=new Array(s.length);var l=0;var c=s.length;while(l<c){var u=l++;_[u]=o(s[u])}p="<"+_.join(", ")+">"}else{p=""}var v=i+p+(A==null?"":"("+this.printComplexType(A)+")");var i;if(C==null){i=""}else{var l=[];var c=0;while(c<C.length){var o=C[c];++c;l.push(" from "+this.printComplexType(o))}i=l.join("")}var p=v+i;var i;if(F==null){i=""}else{var l=[];var c=0;while(c<F.length){var w=F[c];++c;l.push(" to "+this.printComplexType(w))}i=l.join("")}var v=p+i+" {\n";var l=[];var c=0;var f=e.fields;while(c<f.length){var o=f[c];++c;l.push(this.tabs+this.printFieldWithDelimiter(o))}a=v+l.join("\n")+"\n}";break;case 5:var N=h.kind;var I=h.access;this.tabs=r;var i;if(I!=null&&I.length>0){var o=re(this,this.printAccess);var _=new Array(I.length);var h=0;var l=I.length;while(h<l){var u=h++;_[u]=o(I[u])}i=_.join(" ")+" "}else{i=""}var p;switch(N._hx_index){case 0:var P=N.t;var j=N.e;p=(I!=null&&$.has(I,te.AFinal)?"":"var ")+(""+e.name)+this.opt(P,re(this,this.printComplexType)," : ")+this.opt(j,re(this,this.printExpr)," = ")+";";break;case 1:var k=N.f;var v="function "+e.name+this.printFunction(k);var h=k.expr;var x;if(h==null){x=";"}else{var l=h.expr;var c=h.pos;if(l._hx_index==12){var h=l.exprs;x=""}else{x=";"}}p=v+x;break;case 2:var G=N.get;var X=N.set;var P=N.t;var j=N.e;p="var "+e.name+"("+G+", "+X+")"+this.opt(P,re(this,this.printComplexType)," : ")+this.opt(j,re(this,this.printExpr)," = ")+";";break}a=i+p;break}n=U+a}this.tabs=r;return n},printFieldWithDelimiter:function(e){var t=this.printField(e);var r=e.kind;var n;switch(r._hx_index){case 0:var a=r.t;var a=r.e;n=this.fieldDelimiter;break;case 1:var a=r.f;var i=a.args;var i=a.expr;var s=a.params;var s=a.ret;if(i==null){n=this.fieldDelimiter}else{var a=i.expr;var s=i.pos;if(a._hx_index==12){var i=a.exprs;n=""}else{n=this.fieldDelimiter}}break;case 2:var a=r.get;var a=r.set;var a=r.t;var a=r.e;n=this.fieldDelimiter;break}return t+n},opt:function(e,t,r){if(r==null){r=""}if(e==null){return""}else{return r+t(e)}}};var J=u["graphql"]["HaxeGenerator"]=function(e){this._interfaces_implemented=ee._new();this._types_by_name=ee._new();this._referenced_types=[];this._map_of_union_types=ee._new();this._list_of_interfaces=[];this._defined_types=[];this._fragment_defs=[];this._stderr_writer=new k;this.init_options(e)};J.__name__=true;J.parse=function(e,t,r){if(r==null){r=true}var n={stdout:"",stderr:""};var a=new J(t);if(!a._stderr_writer.is_empty()){n.stderr=a._stderr_writer.toString()}else{try{n=a.parse_document(e)}catch(e){var i=Q.caught(e).unwrap();var s=a.get_stderr();if(s.length==0){s=""+P.string(i)}n={stdout:"",stderr:s+"\nHaxeGenerator failed!"}}}if(r&&n.stderr.length>0){throw Q.thrown(n.stderr)}return n};J.prototype={get_stderr:function(){return this._stderr_writer.toString()},init_options:function(e){this._options=e==null?{}:e;if(this._options.generate==null){this._options.generate="typedefs"}if(this._options.disable_null_wrappers==null){this._options.disable_null_wrappers=false}},handle_args:function(e,t){if(t==null||t.length==0){return}var r=0;while(r<t.length){var n=t[r];++r;var a=""+J.ARGS_PREFIX+e.join("__")+"__"+n.field;var i={kind:"ObjectTypeDefinition",name:{value:a,kind:"Name"},fields:n.arguments};this.ingest_tstruct_like_type(i)}},handle_variables:function(e){if(e==null||e.variables==null||e.variables.length==0){return}var t=[];var r=0;var n=e.variables;while(r<n.length){var a=n[r];++r;t.push({kind:"FieldDefinition",type:a.type,name:a.variable.name})}var i={kind:"ObjectTypeDefinition",name:{value:""+J.OP_PREFIX+e.op_name+J.OP_VARS_SUFFIX,kind:"Name"},fields:t};this.ingest_tstruct_like_type(i)},parse_document:function(e){this.init_base_types();var t=null;var r=0;var n=e.definitions;while(r<n.length){var a=n[r];++r;switch(a.kind){case"ObjectTypeExtension":this.apply_type_extension(a,e.definitions);break;case"SchemaDefinition":if(t!=null){this.error("Error: cannot specify two schema definitions")}t=this.ingest_schema_def(a);break;default:}}var r=0;var n=e.definitions;while(r<n.length){var a=n[r];++r;switch(a.kind){case"EnumTypeDefinition":this.ingest_enum_type_def(a);break;case"FragmentDefinition":this._fragment_defs.push(a);break;case"InputObjectTypeDefinition":var i=this.ingest_tstruct_like_type(a);this.handle_args([this.get_def_name(a)],i);break;case"InterfaceTypeDefinition":this._list_of_interfaces.push(a.name.value);var s=this.ingest_tstruct_like_type(a);this.handle_args([this.get_def_name(a)],s);break;case"ObjectTypeDefinition":var o=this.ingest_tstruct_like_type(a);this.handle_args([this.get_def_name(a)],o);break;case"ObjectTypeExtension":break;case"OperationDefinition":break;case"ScalarTypeDefinition":this.ingest_scalar_type_def(a);break;case"SchemaDefinition":break;case"UnionTypeDefinition":this.ingest_union_type_def(a);break;default:var _=a.name!=null?" - "+a.name.value:"";this.error("Error: unknown / unsupported definition kind: "+a.kind+_)}}var r=0;var n=this._referenced_types;while(r<n.length){var h=n[r];++r;if(this._defined_types.indexOf(h)<0){this.error("Error: unknown type: "+h)}}var r=0;var n=e.definitions;while(r<n.length){var a=n[r];++r;if(a.kind=="FragmentDefinition"){this.write_fragment_as_haxe_typedef(a)}}var r=0;var n=e.definitions;while(r<n.length){var a=n[r];++r;if(a.kind=="OperationDefinition"){var l=this.write_operation_def_result(t,e,a);this.handle_variables(l)}}this.ensure_interface_implementations();return{stderr:this._stderr_writer.toString(),stdout:this.print_to_stdout()}},get_node_named:function(e,t,r){if(t==null||t.length==0){return null}var n=0;while(n<t.length){var a=t[n];++n;if(a.name.value==e){if(r!=null&&!r(a)){return a}}}return null},apply_type_extension:function(e,t){var r=this.get_node_named(e.name.value,t,function(e){if(e!=null){return e.kind=="ObjectTypeExtension"}else{return false}});if(r==null){this.error("Type extension for "+e.name.value+" didn't find base type!");return}var n="fields";var a=H.field(e,n);if(a!=null&&a.length>0){var i=H.field(r,n);if(i==null){i=[];r[n]=i}var s=0;while(s<a.length){var o=a[s];++s;var _=this.get_node_named(o.name.value,i);if(_!=null){this.error("Type extension for "+e.name.value+" cannot redefine "+n+"."+o.name.value)}else{i.push(o)}}}var n="directives";var a=H.field(e,n);if(a!=null&&a.length>0){var i=H.field(r,n);if(i==null){i=[];r[n]=i}var s=0;while(s<a.length){var o=a[s];++s;var _=this.get_node_named(o.name.value,i);if(_!=null){this.error("Type extension for "+e.name.value+" cannot redefine "+n+"."+o.name.value)}else{i.push(o)}}}var n="interfaces";var a=H.field(e,n);if(a!=null&&a.length>0){var i=H.field(r,n);if(i==null){i=[];r[n]=i}var s=0;while(s<a.length){var o=a[s];++s;var _=this.get_node_named(o.name.value,i);if(_!=null){this.error("Type extension for "+e.name.value+" cannot redefine "+n+"."+o.name.value)}else{i.push(o)}}}},ensure_interface_implementations:function(){var e=this._types_by_name.h;var t=e;var r=Object.keys(e);var n=r.length;var a=0;while(a<n){var i=r[a++];if(this.is_object_type(i)&&Object.prototype.hasOwnProperty.call(this._interfaces_implemented.h,i)){var s=0;var o=this._interfaces_implemented.h[i];while(s<o.length){var _=o[s];++s;var h;var l=this._types_by_name.h[i];if(l==null){this.error("Object type "+i+" expected to have fields!",true);h=null}else if(l._hx_index==4){var u=l.name;var p=l.fields;h=p}else{this.error("Object type "+i+" expected to have fields!",true);h=null}var c;var v=this._types_by_name.h[_];if(v==null){this.error("Interface "+_+" expected to have fields!",true);c=null}else if(v._hx_index==4){var f=v.name;var m=v.fields;c=m}else{this.error("Interface "+_+" expected to have fields!",true);c=null}var e=c.h;var d=e;var x=Object.keys(e);var g=x.length;var y=0;while(y<g){var w=x[y++];var k=c.h[w];var T=h.h[w];if(T==null){this.error("Type "+i+" implements "+_+", but doesn't provide field "+w);continue}if(k.is_array!=T.is_array){this.error("Type "+i+" implements "+_+", but the type of field "+w+" doesn't match (List vs non-List)");continue}if(k.is_optional!=T.is_optional){this.error("Type "+i+" implements "+_+", but the type of field "+w+" doesn't match (nullable vs non-nullable)");continue}var b;var E=k.type;if(E._hx_index==0){var S=E.name;b=S}else{throw Q.thrown("Interfaces can only specify TPaths")}var D;var O=T.type;if(O._hx_index==0){var A=O.name;D=A}else{throw Q.thrown("Interface implementations can only specify TPaths")}if(b!=D){var C="Covariance failed on "+i+" field ["+w+":"+D+"] for interface "+_+" ["+w+":"+b+"]";if(!this.is_object_type(D)){this.error(C)}else if(!(this.is_interface(b)&&this.implements_interface(D,b))){if(!(this.is_union(b)&&this.is_member_of_union(D,b))){this.error(C)}}}}}}}},get_def_name:function(e){return e.name.value},error:function(e,t){if(t==null){t=false}this._stderr_writer.append(e);if(t){throw Q.thrown(e)}},type_referenced:function(e){if(this._referenced_types.indexOf(e)<0){this._referenced_types.push(e)}},define_type:function(e){var t;switch(e._hx_index){case 0:var r=e.name;t=r;break;case 1:var r=e.name;t=r;break;case 2:var n=e.values;var r=e.name;t=r;break;case 3:var n=e.type_paths;var r=e.name;t=r;break;case 4:var n=e.fields;var r=e.name;t=r;break}if(this._defined_types.indexOf(t)<0){this._defined_types.push(t);this._types_by_name.h[t]=e}else{this.error("Cannot define type "+t+" twice!")}},parse_field_type:function(e,t){var r=this;var n={type:null,is_array:false,is_optional:false};var a=null;a=function(e,t){if(t==null){return false}if(t.kind==e){return true}if(t.kind=="NamedType"){n.type=z.TPath(t.name.value);r.type_referenced(t.name.value)}return a(e,t.type)};n.is_array=a("ListType",e);n.is_optional=e.kind!="NonNullType";a(" find base ",e);if(n.type==null){this.error("Malformed GQL definition - did not find the named type while parsing definition: "+t+"!")}return n},write_fragment_as_haxe_typedef:function(e){var t=e.typeCondition.name.value;var r=""+J.FRAGMENT_PREFIX+e.name.value;this.generate_type_based_on_selection_set(r,{debug_name:r,is_operation:false},e.selectionSet,t)},ingest_tstruct_like_type:function(e){var t=[];if(e.kind=="ObjectTypeDefinition"){var r=[];this._interfaces_implemented.h[e.name.value]=r;if(e.interfaces!=null){var n=0;var a=e.interfaces;while(n<a.length){var i=a[n];++n;var s=i.name.value;this._interfaces_implemented.h[e.name.value].push(s)}}}var o=ee._new();this.define_type(Z.TStruct(e.name.value,o));var n=0;var a=e.fields;while(n<a.length){var _=a[n];++n;var h=this.parse_field_type(_.type,e.name.value);var l=_.name.value;if(o.h[l]!=null){this.error("Error, type "+e.name.value+" defines field "+l+" more than once!")}o.h[l]=h;if(_.arguments!=null&&_.arguments.length>0){t.push({field:l,arguments:_.arguments})}}return t},ingest_enum_type_def:function(e){var t=[];this.define_type(Z.TEnum(e.name.value,t));var r=0;var n=e.values;while(r<n.length){var a=n[r];++r;t.push(a.name.value)}},ingest_scalar_type_def:function(e){this.define_type(Z.TScalar(e.name.value))},ingest_union_type_def:function(e){var t=[];var r=0;var n=e.types;while(r<n.length){var a=n[r];++r;if(a.name==null){this.error("Expecting Named Types in Union "+e.name.value)}else{t.push(a.name.value)}}this.generate_union_of_types(t,e.name.value)},generate_union_of_types:function(e,t){if(t==null){e.sort(function(e,t){if(e>t){return 1}else{return-1}});t=J.GENERATED_UNION_PREFIX+e.join("__");if(this._defined_types.indexOf(t)>=0){this.error("Cannot redefine union "+t)}}this._map_of_union_types.h[t]=e;this.define_type(Z.TUnion(t,e));return t},ingest_schema_def:function(e){var t={query_type:null,mutation_type:null};var r=0;var n=e.operationTypes;while(r<n.length){var a=n[r];++r;var i=P.string(a.operation);switch(i){case"mutation":case"query":if(i=="query"){t.query_type=a.type.name.value}if(i=="mutation"){t.mutation_type=a.type.name.value}break;default:this.error("Unexpected schema operation: "+i)}}return t},resolve_type:function(e,t){if(t==null){t=""}switch(e._hx_index){case 0:var r=e.name;var n=this._types_by_name.h[r];if(n==null){this.error(""+t+"Error: type not found: "+r,true)}return n;case 1:var a=e.type;return a}},resolve_field:function(e,t){var r=null;var n=t!=null?"Error processing operation "+t.debug_name+": ":"";var a=e.join(".");while(e.length>0){var i=e.shift();if(r==null){r=this._types_by_name.h[i];if(r==null){this.error(""+n+"Didn't find root type "+i+" while resolving "+a,true)}if(e.length==0){return{is_array:false,is_optional:false,type:z.TPath(i)}}}else{switch(r._hx_index){case 0:var s=r.name;this.error(""+n+"Expecting type "+s+" to have field "+i+"!",true);break;case 1:var o=r.name;this.error(""+n+"Expecting type "+o+" to have field "+i+"!",true);break;case 2:var _=r.values;var h=r.name;this.error(""+n+"Expecting type "+h+" to have field "+i+"!",true);break;case 3:var l=r.type_paths;var u=r.name;this.error("TODO: deterimne if graphql lets you poke down into common fields of unions...",true);break;case 4:var p=r.name;var c=r.fields;var v;if(i=="__typename"){v={type:z.TPath("String"),is_array:false,is_optional:true}}else{v=c.h[i]}if(v==null){this.error(""+n+"Expecting type "+p+" to have field "+i+"!",true)}if(e.length==0){this.resolve_type(v.type,n);return v}r=this.resolve_type(v.type,n);if(r==null){this.error(""+n+"Did not find type "+P.string(v.type)+" referenced by "+p+"."+i+"!",true)}break}}}this.error(""+n+"couldn't resolve path: "+a,true);return null},get_fragment_info:function(t){var e=null;if(t.kind=="FragmentSpread"){var r=J.FRAGMENT_PREFIX+t.name.value;var n=null;var a=0;var i=this._fragment_defs;while(a<i.length){var s=i[a];++a;if(s.name.value==t.name.value){n=s.typeCondition.name.value}}if(n==null){this.error("Error, did not find fragment spread named: "+r,true)}e={concrete:n,selectionSet:$.find(this._fragment_defs,function(e){return e.name.value==t.name.value}).selectionSet};return e}if(t.kind=="InlineFragment"){e={concrete:t.typeCondition.name.value,selectionSet:t.selectionSet};return e}this.error("Error determining fragment info for fragment node: "+P.string(t),true);return null},is_union:function(e){return Object.prototype.hasOwnProperty.call(this._map_of_union_types.h,e)},is_interface:function(e){return this._list_of_interfaces.indexOf(e)>=0},is_object_type:function(e){var t=this._types_by_name.h[e];if(t==null){return false}else if(t._hx_index==4){var r=t.name;var r=t.fields;return!this.is_interface(e)}else{return false}},implements_interface:function(e,t){if(this.is_interface(t)&&Object.prototype.hasOwnProperty.call(this._interfaces_implemented.h,e)){return this._interfaces_implemented.h[e].indexOf(t)>=0}else{return false}},is_member_of_union:function(e,t){if(!this.is_union(t)){return false}var r=0;var n=this._map_of_union_types.h[t];while(r<n.length){var a=n[r];++r;if(a==e){return true}}return false},check_constraint:function(e,t){if(e==t){return true}if(!this.is_object_type(e)){this.error("Check_constraint is only valid on Object types, not "+e)}if(this.is_interface(t)){return this.implements_interface(e,t)}if(this.is_union(t)){return this._map_of_union_types.h[t].indexOf(e)>=0}return false},resolve_fragment_nodes:function(e,t,r){if(e==null||e.length==0){return}var n=0;while(n<e.length){var a=e[n];++n;if(a.kind=="Field"){var i=a;r.push({constraints:t,field_node:i,usage:0})}else if(a.kind=="FragmentSpread"||a.kind=="InlineFragment"){var s=this.get_fragment_info(a);var o=t.slice(0);o.push(s.concrete);this.resolve_fragment_nodes(s.selectionSet.selections,o,r)}}},get_possible_object_types_from:function(e){if(this.is_interface(e)){var t=[];var r=this._interfaces_implemented.h;var n=r;var a=Object.keys(r);var i=a.length;var s=0;while(s<i){var o=a[s++];var _=this._interfaces_implemented.h[o];if(_.indexOf(e)>=0){t.push(o)}}if(t.length==0){this.error("Query or fragment on interface "+e+", did not find any Object types that implement it!")}return t}if(this.is_union(e)){var t=[];var h=0;var l=this._map_of_union_types.h[e];while(h<l.length){var u=l[h];++h;if(!this.is_object_type(u)){this.error("Union "+e+" may not contain any type ("+u+") other than object types, per GraphQL spec")}else{t.push(u)}}return t}var h=this._types_by_name.h[e];if(h==null){this.error("Cannot create fragment or operation on non-Object type "+e,true);return null}else if(h._hx_index==4){var l=h.name;var l=h.fields;return[e]}else{this.error("Cannot create fragment or operation on non-Object type "+e,true);return null}},generate_type_based_on_selection_set:function(e,t,U,r,n){if(n==null){n=0}if(J._basic_types.indexOf(r)>=0){this.error("Cannot create a fragment or operation "+t.debug_name+" on a basic type, "+r,true)}var a=this.get_possible_object_types_from(r);var i=[];this.resolve_fragment_nodes(U.selections,[],i);var s=ee._new();var o=0;while(o<i.length){var _=i[o];++o;var h=0;while(h<a.length){var l=a[h];++h;var u=true;var p=0;var c=_.constraints;while(p<c.length){var B=c[p];++p;if(!this.check_constraint(l,B)){u=false;break}}if(u){_.usage++;if(!Object.prototype.hasOwnProperty.call(s.h,l)){var v=[];s.h[l]=v}s.h[l].push(_.field_node)}}}var o=0;while(o<a.length){var l=a[o];++o;if(!Object.prototype.hasOwnProperty.call(s.h,l)||s.h[l]==null){if(this.is_union(r)){var v=[];s.h[l]=v}else{this.error("Error: fragment or op "+t.debug_name+" selected no fields for possible object type "+l)}}}var o=0;while(o<i.length){var _=i[o];++o;if(_.usage==0){this.error("Error: fragment or op "+t.debug_name+" specified field "+_.field_node.name.value+" that didn't get used in possible types ["+a.join(", ")+"] via constraints ["+_.constraints.join(", ")+"]")}}var K=ee._new();var f=[];var o=0;while(o<a.length){var l=a[o];++o;var m=ee._new();K.h[l]=m;var d=[l];var x=a.length==1?e:e+"_ON_"+l;f.push(x);this.define_type(Z.TStruct(x,m));var g=[];if(s.h[l]==null&&this.is_union(r)){continue}var h=0;var p=s.h[l];while(h<p.length){var y=p[h];++h;switch(y.kind){case"Field":var w=y;var k=w.selectionSet!=null&&w.selectionSet.selections!=null&&w.selectionSet.selections.length>0;var T=w.name.value;var b=w.alias==null?T:w.alias.value;if(t.is_operation){this.validate_directives(w,t)}var E=""+T+" -> "+b;if(g.indexOf(E)>=0){continue}g.push(E);var S=d.slice(0);S.push(T);var D=this.resolve_field(S,t);var O=this.resolve_type(D.type);switch(O._hx_index){case 0:var R=O.name;if(k){this.error("Cannot specify sub-fields of "+R+" at "+d.join(".")+" of operation "+t.debug_name,true)}m.h[b]=D;break;case 1:var V=O.name;if(k){this.error("Cannot specify sub-fields of "+V+" at "+d.join(".")+" of operation "+t.debug_name,true)}m.h[b]=D;break;case 2:var c=O.values;var L=O.name;if(k){this.error("Cannot specify sub-fields of "+L+" at "+d.join(".")+" of operation "+t.debug_name,true)}m.h[b]=D;break;case 3:var M=O.type_paths;var A=O.name;if(!k){this.error("Must specify sub-fields of "+A+" at "+d.join(".")+" of operation "+t.debug_name,true)}if(this.is_union(A)){if($.find(w.selectionSet.selections,function(e){if(e.kind=="Field"){return H.field(e,"name").value!="__typename"}else{return false}})!=null){this.error("Can only specify fragment selections of union "+A+" at "+d.join(".")+" of operation "+t.debug_name,true)}}var C=n==0&&Y.endsWith(e,J.OP_OUTER_SUFFIX)?Y.replace(e,J.OP_OUTER_SUFFIX,J.OP_INNER_SUFFIX):e+"__"+T;var q=this.generate_type_based_on_selection_set(C,t,w.selectionSet,A,n+1);var F={type:null,is_array:D.is_array,is_optional:D.is_optional};m.h[b]=F;if(this.is_union(C)){F.type=z.TPath(C)}else if(n==0){F.type=z.TPath(C)}else{var N=this._types_by_name;if(Object.prototype.hasOwnProperty.call(N.h,C)){delete N.h[C]}W.remove(this._defined_types,C);F.type=z.TAnon(q)}break;case 4:var G=O.fields;var I=O.name;if(!k){this.error("Must specify sub-fields of "+I+" at "+d.join(".")+" of operation "+t.debug_name,true)}if(this.is_union(I)){if($.find(w.selectionSet.selections,function(e){if(e.kind=="Field"){return H.field(e,"name").value!="__typename"}else{return false}})!=null){this.error("Can only specify fragment selections of union "+I+" at "+d.join(".")+" of operation "+t.debug_name,true)}}var P=n==0&&Y.endsWith(e,J.OP_OUTER_SUFFIX)?Y.replace(e,J.OP_OUTER_SUFFIX,J.OP_INNER_SUFFIX):e+"__"+T;var X=this.generate_type_based_on_selection_set(P,t,w.selectionSet,I,n+1);var j={type:null,is_array:D.is_array,is_optional:D.is_optional};m.h[b]=j;if(this.is_union(P)){j.type=z.TPath(P)}else if(n==0){j.type=z.TPath(P)}else{var Q=this._types_by_name;if(Object.prototype.hasOwnProperty.call(Q.h,P)){delete Q.h[P]}W.remove(this._defined_types,P);j.type=z.TAnon(X)}break}break;case"FragmentSpread":case"InlineFragment":this.error("Should not get fragment nodes here...",true);break;default:this.error("Unhandled sel_node kind "+y.kind,true)}}}if(a.length>1){this.generate_union_of_types(f,e);return this._types_by_name.h[e]}else{return this._types_by_name.h[e]}},validate_directives:function(e,t){if(e.directives!=null){var r=0;var n=e.directives;while(r<n.length){var a=n[r];++r;if(a.arguments!=null){var i=0;var s=a.arguments;while(i<s.length){var o=s[i];++i;var _=o.value.name.value;var h=false;var l=0;var u=t.op_variables;while(l<u.length){var p=u[l];++l;if(p.variable.name.value==_){h=true}}if(!h){this.error("Error: operation "+t.debug_name+" is expecting parameter "+_+" which hasn't been defined in the operation variables!")}}}}}},write_operation_def_result:function(e,t,r){if(r.name==null||r.name.value==null){this.error("Unnamed / anonymous operations are not supported...",true)}var n=r.name.value;var a="";if(r.operation=="query"){a=e==null||e.query_type==null?"Query":e.query_type}else if(r.operation=="mutation"){a=e==null||e.mutation_type==null?"Mutation":e.mutation_type}else{this.error("Error processing "+n+": Only query and mutation are supported.",true)}this.generate_type_based_on_selection_set(""+J.OP_PREFIX+n+J.OP_OUTER_SUFFIX,{debug_name:n,is_operation:true,op_variables:r.variableDefinitions},r.selectionSet,a);return{op_name:n,variables:r.variableDefinitions}},print_to_stdout:function(){var e=new k;e.append("/* - - - - Haxe / GraphQL compatibility types - - - - */\nabstract ID(String) to String from String {\n // Relaxed safety -- allow implicit fromString\n // TODO: optional strict safety -- require explicit fromString:\n // public static inline function fromString(s:String) return cast s;\n // public static inline function ofString(s:String) return cast s;\n}");e.append("");if(Object.prototype.hasOwnProperty.call(this._types_by_name.h,"Bool")){T.bool_collision=true}var t=this._types_by_name.h;var r=t;var n=Object.keys(t);var a=n.length;var i=0;while(i<a){var s=n[i++];if(J._basic_types.indexOf(s)>=0){continue}var o=this._types_by_name.h[s];e.append(T.type_to_string(o,this._types_by_name));e.append("")}e.append("\n\n/* - - - - - - - - - - - - - - - - - - - - - - - - - */\n\n");return e.toString()},init_base_types:function(){var e=0;var t=J._basic_types;while(e<t.length){var r=t[e];++e;this.define_type(Z.TBasic(r))}}};var k=function(){this._output=[]};k.__name__=true;k.prototype={is_empty:function(){return this._output.length==0},append:function(e){this._output.push(e)},toString:function(){return this._output.join("\n")}};var z=v["graphql.GQLTypeRef"]={__ename__:true,__constructs__:null,TPath:(e=function(e){return{_hx_index:0,name:e,__enum__:"graphql.GQLTypeRef",toString:i}},e._hx_name="TPath",e.__params__=["name"],e),TAnon:(e=function(e){return{_hx_index:1,type:e,__enum__:"graphql.GQLTypeRef",toString:i}},e._hx_name="TAnon",e.__params__=["type"],e)};z.__constructs__=[z.TPath,z.TAnon];var Z=v["graphql.GQLTypeDefinition"]={__ename__:true,__constructs__:null,TBasic:(e=function(e){return{_hx_index:0,name:e,__enum__:"graphql.GQLTypeDefinition",toString:i}},e._hx_name="TBasic",e.__params__=["name"],e),TScalar:(e=function(e){return{_hx_index:1,name:e,__enum__:"graphql.GQLTypeDefinition",toString:i}},e._hx_name="TScalar",e.__params__=["name"],e),TEnum:(e=function(e,t){return{_hx_index:2,name:e,values:t,__enum__:"graphql.GQLTypeDefinition",toString:i}},e._hx_name="TEnum",e.__params__=["name","values"],e),TUnion:(e=function(e,t){return{_hx_index:3,name:e,type_paths:t,__enum__:"graphql.GQLTypeDefinition",toString:i}},e._hx_name="TUnion",e.__params__=["name","type_paths"],e),TStruct:(e=function(e,t){return{_hx_index:4,name:e,fields:t,__enum__:"graphql.GQLTypeDefinition",toString:i}},e._hx_name="TStruct",e.__params__=["name","fields"],e)};Z.__constructs__=[Z.TBasic,Z.TScalar,Z.TEnum,Z.TUnion,Z.TStruct];var T=function(){};T.__name__=true;T.gql_to_haxe_type_name_transforms=function(e){if(e=="Bool"&&T.bool_collision){return"Bool"+"__"}if(e=="Boolean"){return"Bool"}return e};T.to_haxe_field=function(e,t){var r=t.type;switch(r._hx_index){case 0:var n=r.name;var a=d.TPath({pack:[],name:T.gql_to_haxe_type_name_transforms(n)});if(t.is_array){a=d.TPath({pack:[],name:"Array",params:[L.TPType(a)]})}var i={name:e,kind:y.FVar(a,null),meta:[],pos:T.FAKE_POS};if(t.is_optional){i.meta.push({name:":optional",pos:T.FAKE_POS})}return i;case 1:var s=r.type;if(s._hx_index==4){var n=s.name;var o=s.fields;var _=[];var h=o.h;var l=h;var u=Object.keys(h);var p=u.length;var c=0;while(c<p){var v=u[c++];var f=o.h[v];_.push(T.to_haxe_field(v,f))}var a=d.TAnonymous(_);if(t.is_array){a=d.TPath({pack:[],name:"Array",params:[L.TPType(a)]})}var i={name:e,kind:y.FVar(a,null),meta:[],pos:T.FAKE_POS};if(t.is_optional){i.meta.push({name:":optional",pos:T.FAKE_POS})}return i}else{var m=s;throw Q.thrown("Non-struct types are not supported in TAnon: "+P.string(m))}break}};T.type_to_string=function(e,t){var r=new O(" ",true);switch(e._hx_index){case 0:var n=e.name;return"";case 1:var n=e.name;return"/* Scalar type "+n+" */\nabstract "+n+"(Dynamic) { }";case 2:var n=e.name;var a=e.values;var i="/* Enum type "+n+" */\n@:enum abstract "+n+"(String) {\n ";var s=new Array(a.length);var o=0;var _=a.length;while(o<_){var h=o++;var l=a[h];s[h]="var "+l+' = "'+l+'";'}return i+s.join("\n ")+"\n}";case 3:var n=e.name;var u=e.type_paths;var p=new k;if(T.union_has_typename(t,u)){T.generate_union_with_typename(n,u,t,p)}else{T.generate_union(n,u,t,p)}return p.toString();case 4:var c=e.name;var v=e.fields;var f={pack:[],name:T.gql_to_haxe_type_name_transforms(c),pos:T.FAKE_POS,kind:S.TDStructure,fields:[]};var m=v.h;var d=m;var x=Object.keys(m);var g=x.length;var y=0;while(y<g){var w=x[y++];f.fields.push(T.to_haxe_field(w,v.h[w]))}return r.printTypeDefinition(f)}};T.generate_union_with_typename=function(e,t,r,n){var a=new Array(t.length);var i=0;var s=t.length;while(i<s){var o=i++;var _=t[o];var h=""+_.split("InnerResult_")[1];a[o]={name:""+h+"(v:"+_+");"}}var l=a;var u="enum "+e+"Enum {\n::foreach enum_vals:: ::name::\n::end::}";var p=new g(u);var c=p.execute({enum_vals:l});n.append(c);var a=new Array(t.length);var i=0;var s=t.length;while(i<s){var o=i++;a[o]=t[o]}var v=a.join(" | ");n.append("/* union "+e+(" = "+v+" */"));n.append("abstract "+e+"(Dynamic) {");var f=[];var i=0;var s=t.length;while(i<s){var o=i++;f.push({index:o,path:t[o],enum_val_name:t[o].split("InnerResult_")[1]})}var m=' public function as_enum():::tname::Enum {\n ::foreach paths::if(StringTools.endsWith("::path::", "ON_"+this.__typename)) { return ::enum_val_name::(this);}\n ::end::throw "invalid type";\n }';var d=new g(m);var x=d.execute({paths:f,tname:e});n.append(x);n.append("}")};T.generate_union=function(e,t,r,n){var a=new Array(t.length);var i=0;var s=t.length;while(i<s){var o=i++;a[o]=t[o]}var _=a.join(" | ");n.append("/* union "+e+(" = "+_+" */"));n.append("abstract "+e+"(Dynamic) {");var i=0;while(i<t.length){var h=t[i];++i;n.append(" @:from static inline function from"+h+"(v:"+h+"):"+e+" return cast v;");var l=h;var u="_ON_";if(l.indexOf(u)>=0){l=W.substr(l,l.indexOf(u)+u.length,null)}n.append(" public inline function as"+"__"+l+"():"+h+" return cast this;")}n.append("}");return n.toString()};T.union_has_typename=function(e,t){var r=e.h[t[0]];if(r==null){return false}else if(r._hx_index==4){var n=r.name;var a=r.fields;return Object.prototype.hasOwnProperty.call(a.h,"__typename")}else{return false}};var ee={};ee._new=function(){return new B};var x=function(){};x.__name__=true;x.dedentBlockStringValue=function(e){var t=new o("\r\n|[\n\r]","g");var r=t.split(e);var n=x.getBlockStringIndentation(r);if(n!=0){var a=1;var i=r.length;while(a<i){var s=a++;r[s]=W.substr(r[s],n,null)}}while(r.length>0&&x.isBlank(r[0]))r.shift();while(r.length>0&&x.isBlank(r[r.length-1]))r.pop();return r.join("\n")};x.getBlockStringIndentation=function(e){var t=null;var r=1;var n=e.length;while(r<n){var a=r++;var i=e[a];var s=x.leadingWhitespace(i);if(s==i.length){continue}if(t==null||s<t){t=s;if(t==0){break}}}if(t==null){return 0}else{return t}};x.leadingWhitespace=function(e){var t=0;while(t<e.length&&(W.cca(e,t)==32||W.cca(e,t)==9))++t;return t};x.isBlank=function(e){return x.leadingWhitespace(e)==e.length};var _=function(e){this.lineStart=0;this.line=1;this.options=e;this.advance=re(this,this.advanceLexer)};_.__name__=true;_.createLexer=function(e,t){var r=b.asToken("<SOF>",0,0,0,0,null);var n=new _(t);n.source=e;n.lastToken=r;n.token=r;return n};_.prototype={advanceLexer:function(){this.lastToken=this.token;var e=this.token=this.lookahead();return e},lookahead:function(){var e=this.token;if(e.kind!="<EOF>"){do{e=e.next!=null?e.next:e.next=this.readToken(this,e)}while(e.kind=="Comment")}return e},printCharCode:function(e){if(e<127){return JSON.stringify(String.fromCodePoint(e))}else{return"ESCMAD"}},readToken:function(e,t){var r=e.source;var n=r;var a=n.length;var i=this.positionAfterWhitespace(n,t.end,e);var s=e.line;var o=1+i-e.lineStart;if(i>=a){return b.asToken("<EOF>",a,a,s,o,t)}var _=n.charCodeAt(i);switch(_){case 33:return b.asToken("!",i,i+1,s,o,t);case 34:if(n.charCodeAt(i+1)==34&&n.charCodeAt(i+2)==34){return this.readBlockString(r,i,s,o,t,e)}return this.readString(r,i,s,o,t);case 35:return this.readComment(r,i,s,o,t);case 36:return b.asToken("$",i,i+1,s,o,t);case 38:return b.asToken("&",i,i+1,s,o,t);case 40:return b.asToken("(",i,i+1,s,o,t);case 41:return b.asToken(")",i,i+1,s,o,t);case 46:if(n.charCodeAt(i+1)==46&&n.charCodeAt(i+2)==46){return b.asToken("...",i,i+3,s,o,t)}break;case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(r,i,_,s,o,t);case 58:return b.asToken(":",i,i+1,s,o,t);case 61:return b.asToken("=",i,i+1,s,o,t);case 64:return b.asToken("@",i,i+1,s,o,t);case 91:return b.asToken("[",i,i+1,s,o,t);case 93:return b.asToken("]",i,i+1,s,o,t);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 this.readName(r,i,s,o,t);case 123:return b.asToken("{",i,i+1,s,o,t);case 124:return b.asToken("|",i,i+1,s,o,t);case 125:return b.asToken("}",i,i+1,s,o,t)}throw Q.thrown(this.syntaxError(r,s,this.lineStart,i,this.unexpectedCharacterMessage(_)))},unexpectedCharacterMessage:function(e){if(e<32&&e!=9&&e!=10&&e!=13){return"Cannot contain the invalid character "+this.printCharCode(e)+"."}if(e==39){return"Unexpected single quote character ('), did you mean to use "+'a double quote (")?'}return"Cannot parse the unexpected character "+this.printCharCode(e)+"."},positionAfterWhitespace:function(e,t,r){var n=e.length;var a=t;while(a<n){var i=e.charCodeAt(a);if(i==9||i==32||i==44||i==65279){++a}else if(i==10){++a;++r.line;r.lineStart=a}else if(i==13){if(e.charCodeAt(a+1)==10){a+=2}else{++a}++r.line;r.lineStart=a}else{break}}return a},readComment:function(e,t,r,n,a){var i=e;var s;var o=t;do{s=i.charCodeAt(++o)}while(s>31||s==9);var _=t+1;var h=o;return b.asToken("Comment",t,o,r,n,a,E._new(i.string,E.wrap(i,_)+i.start,E.clamp(i,h)+i.start).toString())},readNumber:function(e,t,r,n,a,i){var s=e;var o=r;var _=t;var h=false;if(o==45){o=s.charCodeAt(++_)}if(o==48){o=s.charCodeAt(++_);if(o>=48&&o<=57){throw Q.thrown(this.syntaxError(e,n,this.lineStart,_,"Invalid number, unexpected digit after 0: "+this.printCharCode(o)+"."))}}else{_=this.readDigits(e,_,o);o=s.charCodeAt(_)}if(o==46){h=true;o=s.charCodeAt(++_);_=this.readDigits(e,_,o);o=s.charCodeAt(_)}if(o==69||o==101){h=true;o=s.charCodeAt(++_);if(o==43||o==45){o=s.charCodeAt(++_)}_=this.readDigits(e,_,o)}var l=t;var u=_;return b.asToken(h?"Float":"Int",t,_,n,a,i,E._new(s.string,E.wrap(s,l)+s.start,E.clamp(s,u)+s.start).toString())},readDigits:function(e,t,r){var n=e;var a=t;var i=r;if(i>=48&&i<=57){do{i=n.charCodeAt(++a)}while(i>=48&&i<=57);return a}throw Q.thrown(this.syntaxError(e,this.line,this.lineStart,a,"Invalid number, expected digit but got: "+this.printCharCode(i)+"."))},readString:function(e,t,r,n,a){var i=e;var s=t+1;var o=s;var _=0;var h="";while(true){var l;if(s<i.length){_=i.charCodeAt(s);l=!isNaN(_)}else{l=false}if(!(l&&_!=10&&_!=13)){break}if(_==34){var u=o;var p=s;var c=E._new(i.string,E.wrap(i,u)+i.start,E.clamp(i,p)+i.start);h+=c==null?"null":c.toString();return b.asToken("String",t,s+1,r,n,a,h)}if(_<32&&_!=9){throw Q.thrown(this.syntaxError(e,r,this.lineStart,s,"Invalid character within String: "+this.printCharCode(_)+"."))}++s;if(_==92){var v=o;var f=s-1;var m=E._new(i.string,E.wrap(i,v)+i.start,E.clamp(i,f)+i.start);h+=m==null?"null":m.toString();_=i.charCodeAt(s);switch(_){case 34:h+='"';break;case 47:h+="/";break;case 92:h+="\\";break;case 98:h+="\b";break;case 102:h+="\f";break;case 110:h+="\n";break;case 114:h+="\r";break;case 116:h+="\t";break;case 117:var d=this.uniCharCode(i.charCodeAt(s+1),i.charCodeAt(s+2),i.charCodeAt(s+3),i.charCodeAt(s+4));if(d<0){var x=this.lineStart;var g=s+1;var y=s+5;var w=E._new(i.string,E.wrap(i,g)+i.start,E.clamp(i,y)+i.start);throw Q.thrown(this.syntaxError(e,r,x,s,"Invalid character escape sequence: "+("\\u"+(w==null?"null":w.toString())+".")))}h+=String.fromCodePoint(d);s+=4;break;default:throw Q.thrown(this.syntaxError(e,r,this.lineStart,s,"Invalid character escape sequence: "+String.fromCodePoint(_)+"."))}++s;o=s}}throw Q.thrown(this.syntaxError(e,r,this.lineStart,s,"Unterminated string."))},readBlockString:function(e,t,r,n,a,i){var s=e;var o=t+3;var _=o;var h=0;var l="";while(true){var u;if(o<s.length){h=s.charCodeAt(o);u=!isNaN(h)}else{u=false}if(!u){break}if(h==34&&s.charCodeAt(o+1)==34&&s.charCodeAt(o+2)==34){var p=_;var c=o;var v=E._new(s.string,E.wrap(s,p)+s.start,E.clamp(s,c)+s.start);l+=v==null?"null":v.toString();return b.asToken("BlockString",t,o+3,r,n,a,x.dedentBlockStringValue(l))}if(h<32&&h!=9&&h!=10&&h!=13){throw Q.thrown(this.syntaxError(e,r,this.lineStart,o,"Invalid character within String: "+this.printCharCode(h)+"."))}if(h==10){++o;++i.line;i.lineStart=o}else if(h==13){if(s.charCodeAt(o+1)==10){o+=2}else{++o}++i.line;i.lineStart=o}else if(h==92&&s.charCodeAt(o+1)==34&&s.charCodeAt(o+2)==34&&s.charCodeAt(o+3)==34){var f=_;var m=o;var d=E._new(s.string,E.wrap(s,f)+s.start,E.clamp(s,m)+s.start);l+=(d==null?"null":d.toString())+'"""';o+=4;_=o}else{++o}}throw Q.thrown(this.syntaxError(e,r,this.lineStart,o,"Unterminated string."))},uniCharCode:function(e,t,r,n){return this.char2hex(e)<<12|this.char2hex(t)<<8|this.char2hex(r)<<4|this.char2hex(n)},char2hex:function(e){if(e>=48&&e<=57){return e-48}else if(e>=65&&e<=70){return e-55}else if(e>=97&&e<=102){return e-87}else{return-1}},readName:function(e,t,r,n,a){var i=e;var s=i.length;var o=t+1;var _=0;while(true){var h;if(o!=s){_=i.charCodeAt(o);h=!isNaN(_)}else{h=false}if(!(h&&(_==95||_>=48&&_<=57||_>=65&&_<=90||_>=97&&_<=122))){break}++o}var l=t;var u=o;return b.asToken("Name",t,o,r,n,a,E._new(i.string,E.wrap(i,l)+i.start,E.clamp(i,u)+i.start).toString())},syntaxError:function(e,t,r,n,a){return N.syntaxError(e,t,r,n,a)}};var b=function(){};b.__name__=true;b.asToken=function(e,t,r,n,a,i,s){return{kind:e,start:t,end:r,line:n,column:a,value:s,prev:i,next:null}};var A=function(){};A.__name__=true;A.prototype={parseName:function(e){var t=this.expectToken(e,"Name");return{kind:"Name",value:t.value,loc:this.loc(e,t)}},parseDocument:function(e){var t=e.token;return{kind:"Document",definitions:this.many(e,"<SOF>",re(this,this.parseDefinition),"<EOF>"),loc:this.loc(e,t)}},parseDefinition:function(e){if(this.peek(e,"Name")){switch(e.token.value){case"directive":case"enum":case"input":case"interface":case"scalar":case"schema":case"type":case"union":return this.parseTypeSystemDefinition(e);case"extend":return this.parseTypeSystemExtension(e);case"fragment":case"mutation":case"query":case"subscription":return this.parseExecutableDefinition(e)}}else if(this.peek(e,"{")){return this.parseExecutableDefinition(e)}else if(this.peekDescription(e)){return this.parseTypeSystemDefinition(e)}throw Q.thrown(this.unexpected(e))},parseExecutableDefinition:function(e){if(this.peek(e,"Name")){switch(e.token.value){case"fragment":return this.parseFragmentDefinition(e);case"mutation":case"query":case"subscription":return this.parseOperationDefinition(e)}}else if(this.peek(e,"{")){return this.parseOperationDefinition(e)}throw Q.thrown(this.unexpected(e))},parseOperationDefinition:function(e){var t=e.token;if(this.peek(e,"{")){return{kind:"OperationDefinition",operation:"query",name:null,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(e),loc:this.loc(e,t)}}var r=this.parseOperationType(e);var n=null;if(this.peek(e,"Name")){n=this.parseName(e)}return{kind:"OperationDefinition",operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(e),directives:this.parseDirectives(e,false),selectionSet:this.parseSelectionSet(e),loc:this.loc(e,t)}},parseOperationType:function(e){var t=this.expectToken(e,"Name");switch(t.value){case"mutation":return"mutation";case"query":return"query";case"subscription":return"subscription"}throw Q.thrown(this.unexpected(e,t))},parseVariableDefinitions:function(e){if(this.peek(e,"(")){return this.many(e,"(",re(this,this.parseVariableDefinition),")")}else{return[]}},parseVariableDefinition:function(e){var t=e.token;var r=this.parseVariable(e);this.expectToken(e,":");return{kind:"VariableDefinition",variable:r,type:this.parseTypeReference(e),defaultValue:this.expectOptionalToken(e,"=")?this.parseValueLiteral(e,true):null,directives:this.parseDirectives(e,true),loc:this.loc(e,t)}},parseVariable:function(e){var t=e.token;this.expectToken(e,"$");return{kind:"Variable",name:this.parseName(e),loc:this.loc(e,t)}},parseSelectionSet:function(e){var t=e.token;return{kind:"SelectionSet",selections:this.many(e,"{",re(this,this.parseSelection),"}"),loc:this.loc(e,t)}},parseSelection:function(e){if(this.peek(e,"...")){return this.parseFragment(e)}else{return this.parseField(e)}},parseField:function(e){var t=e.token;var r=this.parseName(e);var n=null;var a=null;if(this.expectOptionalToken(e,":")){n=r;a=this.parseName(e)}else{a=r}return{kind:"Field",alias:n,name:a,arguments:this.parseArguments(e,false),directives:this.parseDirectives(e,false),selectionSet:this.peek(e,"{")?this.parseSelectionSet(e):null,loc:this.loc(e,t)}},parseArguments:function(e,t){var r=t?re(this,this.parseConstArgument):re(this,this.parseArgument);if(this.peek(e,"(")){return this.many(e,"(",r,")")}else{return[]}},parseArgument:function(e){var t=e.token;var r=this.parseName(e);this.expectToken(e,":");return{kind:"Argument",name:r,value:this.parseValueLiteral(e,false),loc:this.loc(e,t)}},parseConstArgument:function(e){var t=e.token;var r=this.parseName(e);this.expectToken(e,":");return{kind:"Argument",name:r,value:this.parseConstValue(e),loc:this.loc(e,t)}},parseFragment:function(e){var t=e.token;this.expectToken(e,"...");var r=this.expectOptionalKeyword(e,"on");if(!r&&this.peek(e,"Name")){return{kind:"FragmentSpread",name:this.parseFragmentName(e),directives:this.parseDirectives(e,false),loc:this.loc(e,t)}}return{kind:"InlineFragment",typeCondition:r?this.parseNamedType(e):null,directives:this.parseDirectives(e,false),selectionSet:this.parseSelectionSet(e),loc:this.loc(e,t)}},parseFragmentDefinition:function(e){var t=e.token;this.expectKeyword(e,"fragment");if(e.options.experimentalFragmentVariables){var r=this.parseFragmentName(e);var n=this.parseVariableDefinitions(e);this.expectKeyword(e,"on");return{kind:"FragmentDefinition",name:r,variableDefinitions:n,typeCondition:this.parseNamedType(e),directives:this.parseDirectives(e,false),selectionSet:this.parseSelectionSet(e),loc:this.loc(e,t)}}var r=this.parseFragmentName(e);this.expectKeyword(e,"on");return{kind:"FragmentDefinition",name:r,typeCondition:this.parseNamedType(e),directives:this.parseDirectives(e,false),selectionSet:this.parseSelectionSet(e),loc:this.loc(e,t)}},parseFragmentName:function(e){if(e.token.value=="on"){throw Q.thrown(this.unexpected(e))}return this.parseName(e)},parseValueLiteral:function(e,t){var r=e.token;switch(r.kind){case"$":if(!t){return this.parseVariable(e)}break;case"BlockString":case"String":return this.parseStringLiteral(e);case"Float":e.advance();return{kind:"FloatValue",value:r.value,loc:this.loc(e,r)};case"Int":e.advance();return{kind:"IntValue",value:r.value,loc:this.loc(e,r)};case"Name":if(r.value=="true"||r.value=="false"){e.advance();return{kind:"BooleanValue",value:r.value=="true",loc:this.loc(e,r)}}else if(r.value=="null"){e.advance();return{kind:"NullValue",loc:this.loc(e,r)}}e.advance();return{kind:"EnumValue",value:r.value,loc:this.loc(e,r)};case"[":return this.parseList(e,t);case"{":return this.parseObject(e,t);default:}throw Q.thrown(this.unexpected(e))},parseStringLiteral:function(e){var t=e.token;e.advance();return{kind:"StringValue",value:t.value,block:t.kind=="BlockString",loc:this.loc(e,t)}},parseConstValue:function(e){return this.parseValueLiteral(e,true)},parseValueValue:function(e){return this.parseValueLiteral(e,false)},parseList:function(e,t){var r=e.token;var n=t?re(this,this.parseConstValue):re(this,this.parseValueValue);return{kind:"ListValue",values:this.any(e,"[",n,"]"),loc:this.loc(e,r)}},parseObject:function(t,r){var n=this;var e=t.token;var a=function(e){return n.parseObjectField(t,r)};return{kind:"ObjectValue",fields:this.any(t,"{",a,"}"),loc:this.loc(t,e)}},parseObjectField:function(e,t){var r=e.token;var n=this.parseName(e);this.expectToken(e,":");return{kind:"ObjectField",name:n,value:this.parseValueLiteral(e,t),loc:this.loc(e,r)}},parseDirectives:function(e,t){var r=[];while(this.peek(e,"@"))r.push(this.parseDirective(e,t));return r},parseDirective:function(e,t){var r=e.token;this.expectToken(e,"@");return{kind:"Directive",name:this.parseName(e),arguments:this.parseArguments(e,t),loc:this.loc(e,r)}},parseTypeReference:function(e){var t=e.token;var r=null;if(this.expectOptionalToken(e,"[")){r=this.parseTypeReference(e);this.expectToken(e,"]");r={kind:"ListType",type:r,loc:this.loc(e,t)}}else{r=this.parseNamedType(e)}if(this.expectOptionalToken(e,"!")){return{kind:"NonNullType",type:r,loc:this.loc(e,t)}}return r},parseNamedType:function(e){var t=e.token;return{kind:"NamedType",name:this.parseName(e),loc:this.loc(e,t)}},parseTypeSystemDefinition:function(e){var t=this.peekDescription(e)?e.lookahead():e.token;if(t.kind=="Name"){switch(t.value){case"directive":return this.parseDirectiveDefinition(e);case"enum":return this.parseEnumTypeDefinition(e);case"input":return this.parseInputObjectTypeDefinition(e);case"interface":return this.parseInterfaceTypeDefinition(e);case"scalar":return this.parseScalarTypeDefinition(e);case"schema":return this.parseSchemaDefinition(e);case"type":return this.parseObjectTypeDefinition(e);case"union":return this.parseUnionTypeDefinition(e)}}throw Q.thrown(this.unexpected(e,t))},peekDescription:function(e){if(!this.peek(e,"String")){return this.peek(e,"BlockString")}else{return true}},parseDescription:function(e){if(!this.peekDescription(e)){return null}return this.parseStringLiteral(e)},parseSchemaDefinition:function(e){var t=e.token;this.expectKeyword(e,"schema");var r=this.parseDirectives(e,true);var n=this.many(e,"{",re(this,this.parseOperationTypeDefinition),"}");return{kind:"SchemaDefinition",directives:r,operationTypes:n,loc:this.loc(e,t)}},parseOperationTypeDefinition:function(e){var t=e.token;var r=this.parseOperationType(e);this.expectToken(e,":");var n=this.parseNamedType(e);return{kind:"OperationTypeDefinition",operation:r,type:n,loc:this.loc(e,t)}},parseScalarTypeDefinition:function(e){var t=e.token;var r=this.parseDescription(e);this.expectKeyword(e,"scalar");var n=this.parseName(e);var a=this.parseDirectives(e,true);return{kind:"ScalarTypeDefinition",description:r,name:n,directives:a,loc:this.loc(e,t)}},parseObjectTypeDefinition:function(e){var t=e.token;var r=this.parseDescription(e);this.expectKeyword(e,"type");var n=this.parseName(e);var a=this.parseImplementsInterfaces(e);var i=this.parseDirectives(e,true);var s=this.parseFieldsDefinition(e);return{kind:"ObjectTypeDefinition",description:r,name:n,interfaces:a,directives:i,fields:s,loc:this.loc(e,t)}},parseImplementsInterfaces:function(e){var t=[];if(this.expectOptionalKeyword(e,"implements")){this.expectOptionalToken(e,"&");do{t.push(this.parseNamedType(e))}while(this.expectOptionalToken(e,"&")||e.options.allowLegacySDLImplementsInterfaces&&this.peek(e,"Name"))}return t},parseFieldsDefinition:function(e){if(e.options.allowLegacySDLEmptyFields&&this.peek(e,"{")&&e.lookahead().kind=="}"){e.advance();e.advance();return[]}if(this.peek(e,"{")){return this.many(e,"{",re(this,this.parseFieldDefinition),"}")}else{return[]}},parseFieldDefinition:function(e){var t=e.token;var r=this.parseDescription(e);var n=this.parseName(e);var a=this.parseArgumentDefs(e);this.expectToken(e,":");var i=this.parseTypeReference(e);var s=this.parseDirectives(e,true);return{kind:"FieldDefinition",description:r,name:n,arguments:a,type:i,directives:s,loc:this.loc(e,t)}},parseArgumentDefs:function(e){if(!this.peek(e,"(")){return[]}return this.many(e,"(",re(this,this.parseInputValueDef),")")},parseInputValueDef:function(e){var t=e.token;var r=this.parseDescription(e);var n=this.parseName(e);this.expectToken(e,":");var a=this.parseTypeReference(e);var i=null;if(this.expectOptionalToken(e,"=")){i=this.parseConstValue(e)}var s=this.parseDirectives(e,true);return{kind:"InputValueDefinition",description:r,name:n,type:a,defaultValue:i,directives:s,loc:this.loc(e,t)}},parseInterfaceTypeDefinition:function(e){var t=e.token;var r=this.parseDescription(e);this.expectKeyword(e,"interface");var n=this.parseName(e);var a=this.parseDirectives(e,true);var i=this.parseFieldsDefinition(e);return{kind:"InterfaceTypeDefinition",description:r,name:n,directives:a,fields:i,loc:this.loc(e,t)}},parseUnionTypeDefinition:function(e){var t=e.token;var r=this.parseDescription(e);this.expectKeyword(e,"union");var n=this.parseName(e);var a=this.parseDirectives(e,true);var i=this.parseUnionMemberTypes(e);return{kind:"UnionTypeDefinition",description:r,name:n,directives:a,types:i,loc:this.loc(e,t)}},parseUnionMemberTypes:function(e){var t=[];if(this.expectOptionalToken(e,"=")){this.expectOptionalToken(e,"|");do{t.push(this.parseNamedType(e))}while(this.expectOptionalToken(e,"|"))}return t},parseEnumTypeDefinition:function(e){var t=e.token;var r=this.parseDescription(e);this.expectKeyword(e,"enum");var n=this.parseName(e);var a=this.parseDirectives(e,true);var i=this.parseEnumValuesDefinition(e);return{kind:"EnumTypeDefinition",description:r,name:n,directives:a,values:i,loc:this.loc(e,t)}},parseEnumValuesDefinition:function(e){if(this.peek(e,"{")){return this.many(e,"{",re(this,this.parseEnumValueDefinition),"}")}else{return[]}},parseEnumValueDefinition:function(e){var t=e.token;var r=this.parseDescription(e);var n=this.parseName(e);var a=this.parseDirectives(e,true);return{kind:"EnumValueDefinition",description:r,name:n,directives:a,loc:this.loc(e,t)}},parseInputObjectTypeDefinition:function(e){var t=e.token;var r=this.parseDescription(e);this.expectKeyword(e,"input");var n=this.parseName(e);var a=this.parseDirectives(e,true);var i=this.parseInputFieldsDefinition(e);return{kind:"InputObjectTypeDefinition",description:r,name:n,directives:a,fields:i,loc:this.loc(e,t)}},parseInputFieldsDefinition:function(e){if(this.peek(e,"{")){return this.many(e,"{",re(this,this.parseInputValueDef),"}")}else{return[]}},parseTypeSystemExtension:function(e){var t=e.lookahead();if(t.kind=="Name"){switch(t.value){case"enum":return this.parseEnumTypeExtension(e);case"input":return this.parseInputObjectTypeExtension(e);case"interface":return this.parseInterfaceTypeExtension(e);case"scalar":return this.parseScalarTypeExtension(e);case"schema":return this.parseSchemaExtension(e);case"type":return this.parseObjectTypeExtension(e);case"union":return this.parseUnionTypeExtension(e)}}throw Q.thrown(this.unexpected(e,t))},parseSchemaExtension:function(e){var t=e.token;this.expectKeyword(e,"extend");this.expectKeyword(e,"schema");var r=this.parseDirectives(e,true);var n=this.peek(e,"{")?this.many(e,"{",re(this,this.parseOperationTypeDefinition),"}"):[];if(r.length==0&&n.length==0){throw Q.thrown(this.unexpected(e))}return{kind:"SchemaExtension",directives:r,operationTypes:n,loc:this.loc(e,t)}},parseScalarTypeExtension:function(e){var t=e.token;this.expectKeyword(e,"extend");this.expectKeyword(e,"scalar");var r=this.parseName(e);var n=this.parseDirectives(e,true);if(n.length==0){throw Q.thrown(this.unexpected(e))}return{kind:"ScalarTypeExtension",name:r,directives:n,loc:this.loc(e,t)}},parseObjectTypeExtension:function(e){var t=e.token;this.expectKeyword(e,"extend");this.expectKeyword(e,"type");var r=this.parseName(e);var n=this.parseImplementsInterfaces(e);var a=this.parseDirectives(e,true);var i=this.parseFieldsDefinition(e);if(n.length==0&&a.length==0&&i.length==0){throw Q.thrown(this.unexpected(e))}return{kind:"ObjectTypeExtension",name:r,interfaces:n,directives:a,fields:i,loc:this.loc(e,t)}},parseInterfaceTypeExtension:function(e){var t=e.token;this.expectKeyword(e,"extend");this.expectKeyword(e,"interface");var r=this.parseName(e);var n=this.parseDirectives(e,true);var a=this.parseFieldsDefinition(e);if(n.length==0&&a.length==0){throw Q.thrown(this.unexpected(e))}return{kind:"InterfaceTypeExtension",name:r,directives:n,fields:a,loc:this.loc(e,t)}},parseUnionTypeExtension:function(e){var t=e.token;this.expectKeyword(e,"extend");this.expectKeyword(e,"union");var r=this.parseName(e);var n=this.parseDirectives(e,true);var a=this.parseUnionMemberTypes(e);if(n.length==0&&a.length==0){throw Q.thrown(this.unexpected(e))}return{kind:"UnionTypeExtension",name:r,directives:n,types:a,loc:this.loc(e,t)}},parseEnumTypeExtension:function(e){var t=e.token;this.expectKeyword(e,"extend");this.expectKeyword(e,"enum");var r=this.parseName(e);var n=this.parseDirectives(e,true);var a=this.parseEnumValuesDefinition(e);if(n.length==0&&a.length==0){throw Q.thrown(this.unexpected(e))}return{kind:"EnumTypeExtension",name:r,directives:n,values:a,loc:this.loc(e,t)}},parseInputObjectTypeExtension:function(e){var t=e.token;this.expectKeyword(e,"extend");this.expectKeyword(e,"input");var r=this.parseName(e);var n=this.parseDirectives(e,true);var a=this.parseInputFieldsDefinition(e);if(n.length==0&&a.length==0){throw Q.thrown(this.unexpected(e))}return{kind:"InputObjectTypeExtension",name:r,directives:n,fields:a,loc:this.loc(e,t)}},parseDirectiveDefinition:function(e){var t=e.token;var r=this.parseDescription(e);this.expectKeyword(e,"directive");this.expectToken(e,"@");var n=this.parseName(e);var a=this.parseArgumentDefs(e);this.expectKeyword(e,"on");var i=this.parseDirectiveLocations(e);return{kind:"DirectiveDefinition",description:r,name:n,arguments:a,locations:i,loc:this.loc(e,t)}},parseDirectiveLocations:function(e){this.expectOptionalToken(e,"|");var t=[];do{t.push(this.parseDirectiveLocation(e))}while(this.expectOptionalToken(e,"|"));return t},parseDirectiveLocation:function(e){var t=e.token;var r=this.parseName(e);if(A.ValidDirectiveLocations.h[r.value]){return r}throw Q.thrown(this.unexpected(e,t))},peek:function(e,t){return e.token.kind==t},expectToken:function(e,t){var r=e.token;if(r.kind==t){e.advance();return r}throw Q.thrown(this.syntaxError(e.source,e.line,e.lineStart,r.start,"Expected "+t+", found "+this.getTokenDesc(r)))},expectOptionalToken:function(e,t){var r=e.token;if(r.kind==t){e.advance();return r!=null}return false},expectKeyword:function(e,t){var r=e.token;if(r.kind=="Name"&&r.value==t){e.advance();return r}throw Q.thrown(this.syntaxError(e.source,e.line,e.lineStart,r.start,'Expected "'+t+'", found '+this.getTokenDesc(r)))},expectOptionalKeyword:function(e,t){var r=e.token;if(r.kind=="Name"&&r.value==t){e.advance();return r!=null}return false},unexpected:function(e,t){var r=t!=null?t:e.token;return this.syntaxError(e.source,e.line,e.lineStart,r.start,"Unexpected "+this.getTokenDesc(r))},any:function(e,t,r,n){this.expectToken(e,t);var a=[];while(!this.expectOptionalToken(e,n))a.push(r(e));return a},many:function(e,t,r,n){this.expectToken(e,t);var a=[r(e)];while(!this.expectOptionalToken(e,n))a.push(r(e));return a},loc:function(e,t){if(e.options!=null&&e.options.noLocation){return null}return{start:t.start,end:e.lastToken.end,startToken:t,endToken:e.lastToken,source:e.source}},syntaxError:function(e,t,r,n,a){return N.syntaxError(e,t,r,n,a)},getTokenDesc:function(e){return e.kind}};var C=function(e,t,r,n,a){this.file=e;this.min=t;this.max=r;this.line=n;this.col=a};C.__name__=true;var F=function(e,t){this.message=e;this.pos=t};F.__name__=true;var N=function(e,t,r){if(r==null){r="Untitled"}var n=new A;if(t==null){t={}}var a=_.createLexer(E.ofString(e),t);try{this.document=n.parseDocument(a)}catch(e){var i=Q.caught(e).unwrap();if(i instanceof F){var s=i;var o=s.pos!=null?""+s.pos.line+": characters "+s.pos.col+"-"+(s.pos.col+(s.pos.max-s.pos.min+1)):"";throw Q.thrown(""+r+":"+o+" Error: "+s.message)}else{throw e}}};N.__name__=true;N.syntaxError=function(e,t,r,n,a){var i=n-r;return new F(a,new C(null,n,n,t,i))};var s=function(e,t,r){this.string=e;this.start=t;this.end=r;if((this.length=r-t)<0){this.length=0;this.end=this.start}};s.__name__=true;s.prototype={toString:function(){if(this.representation==null){this.representation=this.string.substring(this.start,this.end)}return this.representation},charCodeAt:function(e){if(this.representation==null){this.representation=this.string.substring(this.start,this.end)}return W.cca(this.representation,e)}};var E={};E._new=function(e,t,r){return new s(e,t==e.length?t:t<0?t%e.length+e.length:t%e.length,r==e.length?r:r<0?r%e.length+e.length:r%e.length)};E.clamp=function(e,t){if(t<0){if(-t>e.length){return 0}else{return t+e.length}}else if(t>e.length){return e.length}else{return t}};E.wrap=function(e,t){if(e.length==0){return 0}else if(t<0){return t%e.length+e.length}else{return t%e.length}};E.ofString=function(e){if(e==null||e==""){return E.EMPTY}else if(e.length==1){var t=e.charCodeAt(0);if(t<E.CHARS.length){return E.CHARS[t]}else{return new s(e,0,e.length)}}else{return new s(e,0,e.length)}};var Q=function(e,t,r){Error.call(this,e);this.message=e;this.__previousException=t;this.__nativeException=r!=null?r:this};Q.__name__=true;Q.caught=function(e){if(e instanceof Q){return e}else if(e instanceof Error){return new Q(e.message,null,e)}else{return new j(e,null,e)}};Q.thrown=function(e){if(e instanceof Q){return e.get_native()}else if(e instanceof Error){return e}else{var t=new j(e);return t}};Q.__super__=Error;Q.prototype=w(Error.prototype,{unwrap:function(){return this.__nativeException},get_native:function(){return this.__nativeException},__properties__:{get_native:"get_native"}});var c=v["haxe._Template.TemplateExpr"]={__ename__:true,__constructs__:null,OpVar:(e=function(e){return{_hx_index:0,v:e,__enum__:"haxe._Template.TemplateExpr",toString:i}},e._hx_name="OpVar",e.__params__=["v"],e),OpExpr:(e=function(e){return{_hx_index:1,expr:e,__enum__:"haxe._Template.TemplateExpr",toString:i}},e._hx_name="OpExpr",e.__params__=["expr"],e),OpIf:(e=function(e,t,r){return{_hx_index:2,expr:e,eif:t,eelse:r,__enum__:"haxe._Template.TemplateExpr",toString:i}},e._hx_name="OpIf",e.__params__=["expr","eif","eelse"],e),OpStr:(e=function(e){return{_hx_index:3,str:e,__enum__:"haxe._Template.TemplateExpr",toString:i}},e._hx_name="OpStr",e.__params__=["str"],e),OpBlock:(e=function(e){return{_hx_index:4,l:e,__enum__:"haxe._Template.TemplateExpr",toString:i}},e._hx_name="OpBlock",e.__params__=["l"],e),OpForeach:(e=function(e,t){return{_hx_index:5,expr:e,loop:t,__enum__:"haxe._Template.TemplateExpr",toString:i}},e._hx_name="OpForeach",e.__params__=["expr","loop"],e),OpMacro:(e=function(e,t){return{_hx_index:6,name:e,params:t,__enum__:"haxe._Template.TemplateExpr",toString:i}},e._hx_name="OpMacro",e.__params__=["name","params"],e)};c.__constructs__=[c.OpVar,c.OpExpr,c.OpIf,c.OpStr,c.OpBlock,c.OpForeach,c.OpMacro];var I=function(e){this.current=0;this.array=e};I.__name__=true;I.prototype={hasNext:function(){return this.current<this.array.length},next:function(){return this.array[this.current++]}};var g=function(e){var t=this.parseTokens(e);this.expr=this.parseBlock(t);if(!t.isEmpty()){throw Q.thrown("Unexpected '"+P.string(t.first().s)+"'")}};g.__name__=true;g.prototype={execute:function(e,t){this.macros=t==null?{}:t;this.context=e;this.stack=new f;this.buf=new D;this.run(this.expr);return this.buf.b},resolve:function(e){if(e=="__current__"){return this.context}if(H.isObject(this.context)){var t=H.getProperty(this.context,e);if(t!=null||Object.prototype.hasOwnProperty.call(this.context,e)){return t}}var r=this.stack.h;while(r!=null){var n=r.item;r=r.next;var a=n;var t=H.getProperty(a,e);if(t!=null||Object.prototype.hasOwnProperty.call(a,e)){return t}}return H.field(g.globals,e)},parseTokens:function(e){var t=new f;while(g.splitter.match(e)){var r=g.splitter.matchedPos();if(r.pos>0){t.add({p:W.substr(e,0,r.pos),s:true,l:null})}if(W.cca(e,r.pos)==58){t.add({p:W.substr(e,r.pos+2,r.len-4),s:false,l:null});e=g.splitter.matchedRight();continue}var n=r.pos+r.len;var a=1;var i=[];var s="";while(true){var o=W.cca(e,n);++n;if(o==40){++a}else if(o==41){--a;if(a<=0){break}}else if(o==null){throw Q.thrown("Unclosed macro parenthesis")}if(o==44&&a==1){i.push(s);s=""}else{s+=String.fromCodePoint(o)}}i.push(s);t.add({p:g.splitter.matched(2),s:false,l:i});e=W.substr(e,n,e.length-n)}if(e.length>0){t.add({p:e,s:true,l:null})}return t},parseBlock:function(e){var t=new f;while(true){var r=e.first();if(r==null){break}if(!r.s&&(r.p=="end"||r.p=="else"||W.substr(r.p,0,7)=="elseif ")){break}t.add(this.parse(e))}if(t.length==1){return t.first()}return c.OpBlock(t)},parse:function(e){var t=e.pop();var s=t.p;if(t.s){return c.OpStr(s)}if(t.l!=null){var r=new f;var n=0;var a=t.l;while(n<a.length){var i=a[n];++n;r.add(this.parseBlock(this.parseTokens(i)))}return c.OpMacro(s,r)}var o=function(e){var t=-1;var r=e.length;if(W.substr(s,0,r)==e){t=r;var n=0;var a=W.substr(s,r,null);while(n<a.length){var i=a.charCodeAt(n++);if(i==32){++t}else{break}}}return t};var _=o("if");if(_>0){s=W.substr(s,_,s.length-_);var h=this.parseExpr(s);var l=this.parseBlock(e);var t=e.first();var u;if(t==null){throw Q.thrown("Unclosed 'if'")}if(t.p=="end"){e.pop();u=null}else if(t.p=="else"){e.pop();u=this.parseBlock(e);t=e.pop();if(t==null||t.p!="end"){throw Q.thrown("Unclosed 'else'")}}else{t.p=W.substr(t.p,4,t.p.length-4);u=this.parse(e)}return c.OpIf(h,l,u)}var _=o("foreach");if(_>=0){s=W.substr(s,_,s.length-_);var h=this.parseExpr(s);var p=this.parseBlock(e);var t=e.pop();if(t==null||t.p!="end"){throw Q.thrown("Unclosed 'foreach'")}return c.OpForeach(h,p)}if(g.expr_splitter.match(s)){return c.OpExpr(this.parseExpr(s))}return c.OpVar(s)},parseExpr:function(e){var t=new f;var r=e;while(g.expr_splitter.match(e)){var n=g.expr_splitter.matchedPos();var a=n.pos+n.len;if(n.pos!=0){t.add({p:W.substr(e,0,n.pos),s:true})}var i=g.expr_splitter.matched(0);t.add({p:i,s:i.indexOf('"')>=0});e=g.expr_splitter.matchedRight()}if(e.length!=0){var s=0;var o=e;while(s<o.length){var _=s;var h=o.charCodeAt(s++);var l=_;var u=h;if(u!=32){t.add({p:W.substr(e,l,null),s:true});break}}}var p;try{p=this.makeExpr(t);if(!t.isEmpty()){throw Q.thrown(t.first().p)}}catch(e){var c=Q.caught(e).unwrap();if(typeof c=="string"){var v=c;throw Q.thrown("Unexpected '"+v+"' in "+r)}else{throw e}}return function(){try{return p()}catch(e){var t=Q.caught(e).unwrap();throw Q.thrown("Error : "+P.string(t)+" in "+r)}}},makeConst:function(e){g.expr_trim.match(e);e=g.expr_trim.matched(1);if(W.cca(e,0)==34){var t=W.substr(e,1,e.length-2);return function(){return t}}if(g.expr_int.match(e)){var r=P.parseInt(e);return function(){return r}}if(g.expr_float.match(e)){var n=parseFloat(e);return function(){return n}}var a=this;return function(){return a.resolve(e)}},makePath:function(e,t){var r=t.first();if(r==null||r.p!="."){return e}t.pop();var n=t.pop();if(n==null||!n.s){throw Q.thrown(n.p)}var a=n.p;g.expr_trim.match(a);a=g.expr_trim.matched(1);return this.makePath(function(){return H.field(e(),a)},t)},makeExpr:function(e){return this.makePath(this.makeExpr2(e),e)},skipSpaces:function(e){var t=e.first();while(t!=null){var r=0;var n=t.p;while(r<n.length){var a=n.charCodeAt(r++);if(a!=32){return}}e.pop();t=e.first()}},makeExpr2:function(e){this.skipSpaces(e);var t=e.pop();this.skipSpaces(e);if(t==null){throw Q.thrown("<eof>")}if(t.s){return this.makeConst(t.p)}switch(t.p){case"!":var r=this.makeExpr(e);return function(){var e=r();if(e!=null){return e==false}else{return true}};case"(":this.skipSpaces(e);var n=this.makeExpr(e);this.skipSpaces(e);var a=e.pop();if(a==null||a.s){throw Q.thrown(a)}if(a.p==")"){return n}this.skipSpaces(e);var i=this.makeExpr(e);this.skipSpaces(e);var s=e.pop();this.skipSpaces(e);if(s==null||s.p!=")"){throw Q.thrown(s)}switch(a.p){case"!=":return function(){return n()!=i()};case"&&":return function(){return n()&&i()};case"*":return function(){return n()*i()};case"+":return function(){return n()+i()};case"-":return function(){return n()-i()};case"/":return function(){return n()/i()};case"<":return function(){return n()<i()};case"<=":return function(){return n()<=i()};case"==":return function(){return n()==i()};case">":return function(){return n()>i()};case">=":return function(){return n()>=i()};case"||":return function(){return n()||i()};default:throw Q.thrown("Unknown operation "+a.p)}break;case"-":var o=this.makeExpr(e);return function(){return-o()}}throw Q.thrown(t.p)},run:function(t){switch(t._hx_index){case 0:var r=t.v;var e=this.buf;var n=P.string(this.resolve(r));e.b+=P.string(n);break;case 1:var a=t.expr;var e=this.buf;var n=P.string(a());e.b+=P.string(n);break;case 2:var a=t.expr;var i=t.eif;var s=t.eelse;var r=a();if(r==null||r==false){if(s!=null){this.run(s)}}else{this.run(i)}break;case 3:var o=t.str;this.buf.b+=o==null?"null":""+o;break;case 4:var _=t.l;var h=_.h;while(h!=null){var l=h.item;h=h.next;var a=l;this.run(a)}break;case 5:var a=t.expr;var u=t.loop;var r=a();try{var n=M(r);if(n.hasNext==null){throw Q.thrown(null)}r=n}catch(e){try{if(r.hasNext==null){throw Q.thrown(null)}}catch(e){throw Q.thrown("Cannot iter on "+P.string(r))}}this.stack.push(this.context);var p=r;var c=p;while(c.hasNext()){var v=c.next();this.context=v;this.run(u)}this.context=this.stack.pop();break;case 6:var f=t.name;var m=t.params;var r=H.field(this.macros,f);var d=[];var x=this.buf;d.push(re(this,this.resolve));var h=m.h;while(h!=null){var l=h.item;h=h.next;var g=l;if(g._hx_index==0){var p=g.v;d.push(this.resolve(p))}else{this.buf=new D;this.run(g);d.push(this.buf.b)}}this.buf=x;try{var e=this.buf;var n=P.string(r.apply(this.macros,d));e.b+=P.string(n)}catch(e){var t=Q.caught(e).unwrap();var y;try{y=d.join(",")}catch(e){y="???"}var w="Macro call "+f+"("+y+") failed ("+P.string(t)+")";throw Q.thrown(w)}break}}};var j=function(e,t,r){Q.call(this,String(e),t,r);this.value=e};j.__name__=true;j.__super__=Q;j.prototype=w(Q.prototype,{unwrap:function(){return this.value}});var f=function(){this.length=0};f.__name__=true;f.prototype={add:function(e){var t=new U(e,null);if(this.h==null){this.h=t}else{this.q.next=t}this.q=t;this.length++},push:function(e){var t=new U(e,this.h);this.h=t;if(this.q==null){this.q=t}this.length++},first:function(){if(this.h==null){return null}else{return this.h.item}},pop:function(){if(this.h==null){return null}var e=this.h.item;this.h=this.h.next;if(this.h==null){this.q=null}this.length--;return e},isEmpty:function(){return this.h==null},toString:function(){var e="";var t=true;var r=this.h;e+="{";while(r!=null){if(t){t=false}else{e+=", "}e+=P.string(P.string(r.item));r=r.next}e+="}";return e}};var U=function(e,t){this.item=e;this.next=t};U.__name__=true;var B=function(){this.h=Object.create(null)};B.__name__=true;var K=v["haxe.macro.StringLiteralKind"]={__ename__:true,__constructs__:null,DoubleQuotes:{_hx_name:"DoubleQuotes",_hx_index:0,__enum__:"haxe.macro.StringLiteralKind",toString:i},SingleQuotes:{_hx_name:"SingleQuotes",_hx_index:1,__enum__:"haxe.macro.StringLiteralKind",toString:i}};K.__constructs__=[K.DoubleQuotes,K.SingleQuotes];var r=v["haxe.macro.Constant"]={__ename__:true,__constructs__:null,CInt:(e=function(e,t){return{_hx_index:0,v:e,s:t,__enum__:"haxe.macro.Constant",toString:i}},e._hx_name="CInt",e.__params__=["v","s"],e),CFloat:(e=function(e,t){return{_hx_index:1,f:e,s:t,__enum__:"haxe.macro.Constant",toString:i}},e._hx_name="CFloat",e.__params__=["f","s"],e),CString:(e=function(e,t){return{_hx_index:2,s:e,kind:t,__enum__:"haxe.macro.Constant",toString:i}},e._hx_name="CString",e.__params__=["s","kind"],e),CIdent:(e=function(e){return{_hx_index:3,s:e,__enum__:"haxe.macro.Constant",toString:i}},e._hx_name="CIdent",e.__params__=["s"],e),CRegexp:(e=function(e,t){return{_hx_index:4,r:e,opt:t,__enum__:"haxe.macro.Constant",toString:i}},e._hx_name="CRegexp",e.__params__=["r","opt"],e)};r.__constructs__=[r.CInt,r.CFloat,r.CString,r.CIdent,r.CRegexp];var n=v["haxe.macro.Binop"]={__ename__:true,__constructs__:null,OpAdd:{_hx_name:"OpAdd",_hx_index:0,__enum__:"haxe.macro.Binop",toString:i},OpMult:{_hx_name:"OpMult",_hx_index:1,__enum__:"haxe.macro.Binop",toString:i},OpDiv:{_hx_name:"OpDiv",_hx_index:2,__enum__:"haxe.macro.Binop",toString:i},OpSub:{_hx_name:"OpSub",_hx_index:3,__enum__:"haxe.macro.Binop",toString:i},OpAssign:{_hx_name:"OpAssign",_hx_index:4,__enum__:"haxe.macro.Binop",toString:i},OpEq:{_hx_name:"OpEq",_hx_index:5,__enum__:"haxe.macro.Binop",toString:i},OpNotEq:{_hx_name:"OpNotEq",_hx_index:6,__enum__:"haxe.macro.Binop",toString:i},OpGt:{_hx_name:"OpGt",_hx_index:7,__enum__:"haxe.macro.Binop",toString:i},OpGte:{_hx_name:"OpGte",_hx_index:8,__enum__:"haxe.macro.Binop",toString:i},OpLt:{_hx_name:"OpLt",_hx_index:9,__enum__:"haxe.macro.Binop",toString:i},OpLte:{_hx_name:"OpLte",_hx_index:10,__enum__:"haxe.macro.Binop",toString:i},OpAnd:{_hx_name:"OpAnd",_hx_index:11,__enum__:"haxe.macro.Binop",toString:i},OpOr:{_hx_name:"OpOr",_hx_index:12,__enum__:"haxe.macro.Binop",toString:i},OpXor:{_hx_name:"OpXor",_hx_index:13,__enum__:"haxe.macro.Binop",toString:i},OpBoolAnd:{_hx_name:"OpBoolAnd",_hx_index:14,__enum__:"haxe.macro.Binop",toString:i},OpBoolOr:{_hx_name:"OpBoolOr",_hx_index:15,__enum__:"haxe.macro.Binop",toString:i},OpShl:{_hx_name:"OpShl",_hx_index:16,__enum__:"haxe.macro.Binop",toString:i},OpShr:{_hx_name:"OpShr",_hx_index:17,__enum__:"haxe.macro.Binop",toString:i},OpUShr:{_hx_name:"OpUShr",_hx_index:18,__enum__:"haxe.macro.Binop",toString:i},OpMod:{_hx_name:"OpMod",_hx_index:19,__enum__:"haxe.macro.Binop",toString:i},OpAssignOp:(e=function(e){return{_hx_index:20,op:e,__enum__:"haxe.macro.Binop",toString:i}},e._hx_name="OpAssignOp",e.__params__=["op"],e),OpInterval:{_hx_name:"OpInterval",_hx_index:21,__enum__:"haxe.macro.Binop",toString:i},OpArrow:{_hx_name:"OpArrow",_hx_index:22,__enum__:"haxe.macro.Binop",toString:i},OpIn:{_hx_name:"OpIn",_hx_index:23,__enum__:"haxe.macro.Binop",toString:i},OpNullCoal:{_hx_name:"OpNullCoal",_hx_index:24,__enum__:"haxe.macro.Binop",toString:i}};n.__constructs__=[n.OpAdd,n.OpMult,n.OpDiv,n.OpSub,n.OpAssign,n.OpEq,n.OpNotEq,n.OpGt,n.OpGte,n.OpLt,n.OpLte,n.OpAnd,n.OpOr,n.OpXor,n.OpBoolAnd,n.OpBoolOr,n.OpShl,n.OpShr,n.OpUShr,n.OpMod,n.OpAssignOp,n.OpInterval,n.OpArrow,n.OpIn,n.OpNullCoal];var a=v["haxe.macro.Unop"]={__ename__:true,__constructs__:null,OpIncrement:{_hx_name:"OpIncrement",_hx_index:0,__enum__:"haxe.macro.Unop",toString:i},OpDecrement:{_hx_name:"OpDecrement",_hx_index:1,__enum__:"haxe.macro.Unop",toString:i},OpNot:{_hx_name:"OpNot",_hx_index:2,__enum__:"haxe.macro.Unop",toString:i},OpNeg:{_hx_name:"OpNeg",_hx_index:3,__enum__:"haxe.macro.Unop",toString:i},OpNegBits:{_hx_name:"OpNegBits",_hx_index:4,__enum__:"haxe.macro.Unop",toString:i},OpSpread:{_hx_name:"OpSpread",_hx_index:5,__enum__:"haxe.macro.Unop",toString:i}};a.__constructs__=[a.OpIncrement,a.OpDecrement,a.OpNot,a.OpNeg,a.OpNegBits,a.OpSpread];var R=v["haxe.macro.EFieldKind"]={__ename__:true,__constructs__:null,Normal:{_hx_name:"Normal",_hx_index:0,__enum__:"haxe.macro.EFieldKind",toString:i},Safe:{_hx_name:"Safe",_hx_index:1,__enum__:"haxe.macro.EFieldKind",toString:i}};R.__constructs__=[R.Normal,R.Safe];var V=v["haxe.macro.FunctionKind"]={__ename__:true,__constructs__:null,FAnonymous:{_hx_name:"FAnonymous",_hx_index:0,__enum__:"haxe.macro.FunctionKind",toString:i},FNamed:(e=function(e,t){return{_hx_index:1,name:e,inlined:t,__enum__:"haxe.macro.FunctionKind",toString:i}},e._hx_name="FNamed",e.__params__=["name","inlined"],e),FArrow:{_hx_name:"FArrow",_hx_index:2,__enum__:"haxe.macro.FunctionKind",toString:i}};V.__constructs__=[V.FAnonymous,V.FNamed,V.FArrow];var h=v["haxe.macro.ExprDef"]={__ename__:true,__constructs__:null,EConst:(e=function(e){return{_hx_index:0,c:e,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EConst",e.__params__=["c"],e),EArray:(e=function(e,t){return{_hx_index:1,e1:e,e2:t,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EArray",e.__params__=["e1","e2"],e),EBinop:(e=function(e,t,r){return{_hx_index:2,op:e,e1:t,e2:r,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EBinop",e.__params__=["op","e1","e2"],e),EField:(e=function(e,t,r){return{_hx_index:3,e:e,field:t,kind:r,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EField",e.__params__=["e","field","kind"],e),EParenthesis:(e=function(e){return{_hx_index:4,e:e,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EParenthesis",e.__params__=["e"],e),EObjectDecl:(e=function(e){return{_hx_index:5,fields:e,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EObjectDecl",e.__params__=["fields"],e),EArrayDecl:(e=function(e){return{_hx_index:6,values:e,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EArrayDecl",e.__params__=["values"],e),ECall:(e=function(e,t){return{_hx_index:7,e:e,params:t,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="ECall",e.__params__=["e","params"],e),ENew:(e=function(e,t){return{_hx_index:8,t:e,params:t,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="ENew",e.__params__=["t","params"],e),EUnop:(e=function(e,t,r){return{_hx_index:9,op:e,postFix:t,e:r,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EUnop",e.__params__=["op","postFix","e"],e),EVars:(e=function(e){return{_hx_index:10,vars:e,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EVars",e.__params__=["vars"],e),EFunction:(e=function(e,t){return{_hx_index:11,kind:e,f:t,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EFunction",e.__params__=["kind","f"],e),EBlock:(e=function(e){return{_hx_index:12,exprs:e,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EBlock",e.__params__=["exprs"],e),EFor:(e=function(e,t){return{_hx_index:13,it:e,expr:t,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EFor",e.__params__=["it","expr"],e),EIf:(e=function(e,t,r){return{_hx_index:14,econd:e,eif:t,eelse:r,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EIf",e.__params__=["econd","eif","eelse"],e),EWhile:(e=function(e,t,r){return{_hx_index:15,econd:e,e:t,normalWhile:r,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EWhile",e.__params__=["econd","e","normalWhile"],e),ESwitch:(e=function(e,t,r){return{_hx_index:16,e:e,cases:t,edef:r,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="ESwitch",e.__params__=["e","cases","edef"],e),ETry:(e=function(e,t){return{_hx_index:17,e:e,catches:t,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="ETry",e.__params__=["e","catches"],e),EReturn:(e=function(e){return{_hx_index:18,e:e,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EReturn",e.__params__=["e"],e),EBreak:{_hx_name:"EBreak",_hx_index:19,__enum__:"haxe.macro.ExprDef",toString:i},EContinue:{_hx_name:"EContinue",_hx_index:20,__enum__:"haxe.macro.ExprDef",toString:i},EUntyped:(e=function(e){return{_hx_index:21,e:e,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EUntyped",e.__params__=["e"],e),EThrow:(e=function(e){return{_hx_index:22,e:e,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EThrow",e.__params__=["e"],e),ECast:(e=function(e,t){return{_hx_index:23,e:e,t:t,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="ECast",e.__params__=["e","t"],e),EDisplay:(e=function(e,t){return{_hx_index:24,e:e,displayKind:t,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EDisplay",e.__params__=["e","displayKind"],e),ETernary:(e=function(e,t,r){return{_hx_index:25,econd:e,eif:t,eelse:r,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="ETernary",e.__params__=["econd","eif","eelse"],e),ECheckType:(e=function(e,t){return{_hx_index:26,e:e,t:t,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="ECheckType",e.__params__=["e","t"],e),EMeta:(e=function(e,t){return{_hx_index:27,s:e,e:t,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EMeta",e.__params__=["s","e"],e),EIs:(e=function(e,t){return{_hx_index:28,e:e,t:t,__enum__:"haxe.macro.ExprDef",toString:i}},e._hx_name="EIs",e.__params__=["e","t"],e)};h.__constructs__=[h.EConst,h.EArray,h.EBinop,h.EField,h.EParenthesis,h.EObjectDecl,h.EArrayDecl,h.ECall,h.ENew,h.EUnop,h.EVars,h.EFunction,h.EBlock,h.EFor,h.EIf,h.EWhile,h.ESwitch,h.ETry,h.EReturn,h.EBreak,h.EContinue,h.EUntyped,h.EThrow,h.ECast,h.EDisplay,h.ETernary,h.ECheckType,h.EMeta,h.EIs];var l=v["haxe.macro.DisplayKind"]={__ename__:true,__constructs__:null,DKCall:{_hx_name:"DKCall",_hx_index:0,__enum__:"haxe.macro.DisplayKind",toString:i},DKDot:{_hx_name:"DKDot",_hx_index:1,__enum__:"haxe.macro.DisplayKind",toString:i},DKStructure:{_hx_name:"DKStructure",_hx_index:2,__enum__:"haxe.macro.DisplayKind",toString:i},DKMarked:{_hx_name:"DKMarked",_hx_index:3,__enum__:"haxe.macro.DisplayKind",toString:i},DKPattern:(e=function(e){return{_hx_index:4,outermost:e,__enum__:"haxe.macro.DisplayKind",toString:i}},e._hx_name="DKPattern",e.__params__=["outermost"],e)};l.__constructs__=[l.DKCall,l.DKDot,l.DKStructure,l.DKMarked,l.DKPattern];var d=v["haxe.macro.ComplexType"]={__ename__:true,__constructs__:null,TPath:(e=function(e){return{_hx_index:0,p:e,__enum__:"haxe.macro.ComplexType",toString:i}},e._hx_name="TPath",e.__params__=["p"],e),TFunction:(e=function(e,t){return{_hx_index:1,args:e,ret:t,__enum__:"haxe.macro.ComplexType",toString:i}},e._hx_name="TFunction",e.__params__=["args","ret"],e),TAnonymous:(e=function(e){return{_hx_index:2,fields:e,__enum__:"haxe.macro.ComplexType",toString:i}},e._hx_name="TAnonymous",e.__params__=["fields"],e),TParent:(e=function(e){return{_hx_index:3,t:e,__enum__:"haxe.macro.ComplexType",toString:i}},e._hx_name="TParent",e.__params__=["t"],e),TExtend:(e=function(e,t){return{_hx_index:4,p:e,fields:t,__enum__:"haxe.macro.ComplexType",toString:i}},e._hx_name="TExtend",e.__params__=["p","fields"],e),TOptional:(e=function(e){return{_hx_index:5,t:e,__enum__:"haxe.macro.ComplexType",toString:i}},e._hx_name="TOptional",e.__params__=["t"],e),TNamed:(e=function(e,t){return{_hx_index:6,n:e,t:t,__enum__:"haxe.macro.ComplexType",toString:i}},e._hx_name="TNamed",e.__params__=["n","t"],e),TIntersection:(e=function(e){return{_hx_index:7,tl:e,__enum__:"haxe.macro.ComplexType",toString:i}},e._hx_name="TIntersection",e.__params__=["tl"],e)};d.__constructs__=[d.TPath,d.TFunction,d.TAnonymous,d.TParent,d.TExtend,d.TOptional,d.TNamed,d.TIntersection];var L=v["haxe.macro.TypeParam"]={__ename__:true,__constructs__:null,TPType:(e=function(e){return{_hx_index:0,t:e,__enum__:"haxe.macro.TypeParam",toString:i}},e._hx_name="TPType",e.__params__=["t"],e),TPExpr:(e=function(e){return{_hx_index:1,e:e,__enum__:"haxe.macro.TypeParam",toString:i}},e._hx_name="TPExpr",e.__params__=["e"],e)};L.__constructs__=[L.TPType,L.TPExpr];var te=v["haxe.macro.Access"]={__ename__:true,__constructs__:null,APublic:{_hx_name:"APublic",_hx_index:0,__enum__:"haxe.macro.Access",toString:i},APrivate:{_hx_name:"APrivate",_hx_index:1,__enum__:"haxe.macro.Access",toString:i},AStatic:{_hx_name:"AStatic",_hx_index:2,__enum__:"haxe.macro.Access",toString:i},AOverride:{_hx_name:"AOverride",_hx_index:3,__enum__:"haxe.macro.Access",toString:i},ADynamic:{_hx_name:"ADynamic",_hx_index:4,__enum__:"haxe.macro.Access",toString:i},AInline:{_hx_name:"AInline",_hx_index:5,__enum__:"haxe.macro.Access",toString:i},AMacro:{_hx_name:"AMacro",_hx_index:6,__enum__:"haxe.macro.Access",toString:i},AFinal:{_hx_name:"AFinal",_hx_index:7,__enum__:"haxe.macro.Access",toString:i},AExtern:{_hx_name:"AExtern",_hx_index:8,__enum__:"haxe.macro.Access",toString:i},AAbstract:{_hx_name:"AAbstract",_hx_index:9,__enum__:"haxe.macro.Access",toString:i},AOverload:{_hx_name:"AOverload",_hx_index:10,__enum__:"haxe.macro.Access",toString:i}};te.__constructs__=[te.APublic,te.APrivate,te.AStatic,te.AOverride,te.ADynamic,te.AInline,te.AMacro,te.AFinal,te.AExtern,te.AAbstract,te.AOverload];var y=v["haxe.macro.FieldType"]={__ename__:true,__constructs__:null,FVar:(e=function(e,t){return{_hx_index:0,t:e,e:t,__enum__:"haxe.macro.FieldType",toString:i}},e._hx_name="FVar",e.__params__=["t","e"],e),FFun:(e=function(e){return{_hx_index:1,f:e,__enum__:"haxe.macro.FieldType",toString:i}},e._hx_name="FFun",e.__params__=["f"],e),FProp:(e=function(e,t,r,n){return{_hx_index:2,get:e,set:t,t:r,e:n,__enum__:"haxe.macro.FieldType",toString:i}},e._hx_name="FProp",e.__params__=["get","set","t","e"],e)};y.__constructs__=[y.FVar,y.FFun,y.FProp];var S=v["haxe.macro.TypeDefKind"]={__ename__:true,__constructs__:null,TDEnum:{_hx_name:"TDEnum",_hx_index:0,__enum__:"haxe.macro.TypeDefKind",toString:i},TDStructure:{_hx_name:"TDStructure",_hx_index:1,__enum__:"haxe.macro.TypeDefKind",toString:i},TDClass:(e=function(e,t,r,n,a){return{_hx_index:2,superClass:e,interfaces:t,isInterface:r,isFinal:n,isAbstract:a,__enum__:"haxe.macro.TypeDefKind",toString:i}},e._hx_name="TDClass",e.__params__=["superClass","interfaces","isInterface","isFinal","isAbstract"],e),TDAlias:(e=function(e){return{_hx_index:3,t:e,__enum__:"haxe.macro.TypeDefKind",toString:i}},e._hx_name="TDAlias",e.__params__=["t"],e),TDAbstract:(e=function(e,t,r){return{_hx_index:4,tthis:e,from:t,to:r,__enum__:"haxe.macro.TypeDefKind",toString:i}},e._hx_name="TDAbstract",e.__params__=["tthis","from","to"],e),TDField:(e=function(e,t){return{_hx_index:5,kind:e,access:t,__enum__:"haxe.macro.TypeDefKind",toString:i}},e._hx_name="TDField",e.__params__=["kind","access"],e)};S.__constructs__=[S.TDEnum,S.TDStructure,S.TDClass,S.TDAlias,S.TDAbstract,S.TDField];var m=function(){};m.__name__=true;m.__string_rec=function(s,o){if(s==null){return"null"}if(o.length>=5){return"<...>"}var e=typeof s;if(e=="function"&&(s.__name__||s.__ename__)){e="object"}switch(e){case"function":return"<function>";case"object":if(s.__enum__){var t=v[s.__enum__];var _=t.__constructs__[s._hx_index];var r=_._hx_name;if(_.__params__){o=o+"\t";return r+"("+function(e){var t;var r=[];{var n=0;var a=_.__params__;while(true){if(!(n<a.length)){break}var i=a[n];n=n+1;r.push(m.__string_rec(s[i],o))}}t=r;return t}(this).join(",")+")"}else{return r}}if(s instanceof Array){var n="[";o+="\t";var a=0;var i=s.length;while(a<i){var h=a++;n+=(h>0?",":"")+m.__string_rec(s[h],o)}n+="]";return n}var l;try{l=s.toString}catch(a){return"???"}if(l!=null&&l!=Object.toString&&typeof l=="function"){var u=s.toString();if(u!="[object Object]"){return u}}var n="{\n";o+="\t";var p=s.hasOwnProperty!=null;var c=null;for(c in s){if(p&&!s.hasOwnProperty(c)){continue}if(c=="prototype"||c=="__class__"||c=="__super__"||c=="__interfaces__"||c=="__properties__"){continue}if(n.length!=2){n+=", \n"}n+=o+c+" : "+m.__string_rec(s[c],o)}o=o.substring(1);n+="\n"+o+"}";return n;case"string":return s;default:return String(s)}};function M(e){if(e instanceof Array)return new I(e);else return e.iterator()}function re(e,t){if(t==null)return null;if(t.__id__==null)t.__id__=p.$haxeUID++;var r;if(e.hx__closures__==null)e.hx__closures__={};else r=e.hx__closures__[t.__id__];if(r==null){r=t.bind(e);e.hx__closures__[t.__id__]=r}return r}p.$haxeUID|=0;if(typeof performance!="undefined"?typeof performance.now=="function":false){W.now=performance.now.bind(performance)}if(String.fromCodePoint==null)String.fromCodePoint=function(e){return e<65536?String.fromCharCode(e):String.fromCharCode((e>>10)+55232)+String.fromCharCode((e&1023)+56320)};String.__name__=true;Array.__name__=true;m.__toStr={}.toString;J.OP_PREFIX="OP_";J.OP_OUTER_SUFFIX="_Result";J.OP_INNER_SUFFIX="_InnerResult";J.OP_VARS_SUFFIX="_Vars";J.FRAGMENT_PREFIX="Fragment_";J.UNION_SELECTION_SEPARATOR="_ON_";J.ARGS_PREFIX="Args_";J.GENERATED_UNION_PREFIX="U_";J.DEFAULT_SEPARATOR="__";J._basic_types=["ID","String","Float","Int","Boolean"];T.bool_collision=false;T.FAKE_POS={min:0,max:0,file:"Untitled"};A.ValidDirectiveLocations=function(e){var t;var r=new B;r.h["QUERY"]=true;r.h["MUTATION"]=true;r.h["SUBSCRIPTION"]=true;r.h["FIELD"]=true;r.h["FRAGMENT_DEFINITION"]=true;r.h["FRAGMENT_SPREAD"]=true;r.h["INLINE_FRAGMENT"]=true;r.h["SCHEMA"]=true;r.h["SCALAR"]=true;r.h["OBJECT"]=true;r.h["FIELD_DEFINITION"]=true;r.h["ARGUMENT_DEFINITION"]=true;r.h["INTERFACE"]=true;r.h["UNION"]=true;r.h["ENUM"]=true;r.h["ENUM_VALUE"]=true;r.h["INPUT_OBJECT"]=true;r.h["INPUT_FIELD_DEFINITION"]=true;t=r;return t}(this);E.CHARS=function(e){var t;var r=[];{var n=0;while(n<128){var a=n++;r.push(new s(String.fromCodePoint(a),0,1))}}t=r;return t}(this);E.EMPTY=new s("",0,0);g.splitter=new o('(::[A-Za-z0-9_ ()&|!+=/><*."-]+::|\\$\\$([A-Za-z0-9_-]+)\\()',"");g.expr_splitter=new o('(\\(|\\)|[ \r\n\t]*"[^"]*"[ \r\n\t]*|[!+=/><*.&|-]+)',"");g.expr_trim=new o("^[ ]*([^ ]+)[ ]*$","");g.expr_int=new o("^[0-9]+$","");g.expr_float=new o("^([+-]?)(?=\\d|,\\d)\\d*(,\\d*)?([Ee]([+-]?\\d+))?$","");g.globals={};g.hxKeepArrayIterator=new I([]);t.main()})(typeof exports!="undefined"?exports:typeof window!="undefined"?window:typeof self!="undefined"?self:this,typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this);