-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1-es2015.b568663655ceb1dc5f8d.js
241 lines (241 loc) · 47.8 KB
/
1-es2015.b568663655ceb1dc5f8d.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{EMzn:function(e,t,n){"use strict";n.r(t),n.d(t,"parse",(function(){return C})),n.d(t,"parseValue",(function(){return S})),n.d(t,"parseType",(function(){return P}));var r=n("rWdj");function i(e,t){if(!Boolean(e))throw new Error(t)}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}"function"==typeof Symbol&&Symbol,"function"==typeof Symbol&&Symbol;var a="function"==typeof Symbol?Symbol.toStringTag:"@@toStringTag";function s(e,t){for(var n,r=/\r\n|[\n\r]/g,i=1,o=t+1;(n=r.exec(e.body))&&n.index<t;)i+=1,o=t+1-(n.index+n[0].length);return{line:i,column:o}}function c(e,t){var n=e.locationOffset.column-1,r=p(n)+e.body,i=t.line-1,o=t.line+(e.locationOffset.line-1),a=t.column+(1===t.line?n:0),s="".concat(e.name,":").concat(o,":").concat(a,"\n"),c=r.split(/\r\n|[\n\r]/g),l=c[i];if(l.length>120){for(var d=Math.floor(a/80),h=a%80,m=[],v=0;v<l.length;v+=80)m.push(l.slice(v,v+80));return s+u([["".concat(o),m[0]]].concat(m.slice(1,d+1).map((function(e){return["",e]})),[[" ",p(h-1)+"^"],["",m[d+1]]]))}return s+u([["".concat(o-1),c[i-1]],["".concat(o),l],["",p(a-1)+"^"],["".concat(o+1),c[i+1]]])}function u(e){var t=e.filter((function(e){return void 0!==e[1]})),n=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,r=e[1];return p(n-(t=e[0]).length)+t+(r?" | "+r:" |")})).join("\n")}function p(e){return Array(e+1).join(" ")}function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){var t="function"==typeof Map?new Map:void 0;return(m=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return v(e,arguments,D(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,e)})(e)}function v(e,t,n){return(v=_()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&f(i,n.prototype),i}).apply(null,arguments)}function _(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function D(e){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(u,e);var t,n,r,i=(t=u,n=_(),function(){var e,r=D(t);if(n){var i=D(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return d(this,e)});function u(e,t,n,r,a,c,p){var l,m,v,_,f;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),f=i.call(this,e);var D,k=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,I=n;!I&&k&&(I=null===(D=k[0].loc)||void 0===D?void 0:D.source);var g,E=r;!E&&k&&(E=k.reduce((function(e,t){return t.loc&&e.push(t.loc.start),e}),[])),E&&0===E.length&&(E=void 0),r&&n?g=r.map((function(e){return s(n,e)})):k&&(g=k.reduce((function(e,t){return t.loc&&e.push(s(t.loc.source,t.loc.start)),e}),[]));var y,T=p;if(null==T&&null!=c){var N=c.extensions;"object"==o(y=N)&&null!==y&&(T=N)}return Object.defineProperties(h(f),{name:{value:"GraphQLError"},message:{value:e,enumerable:!0,writable:!0},locations:{value:null!==(l=g)&&void 0!==l?l:void 0,enumerable:null!=g},path:{value:null!=a?a:void 0,enumerable:null!=a},nodes:{value:null!=k?k:void 0},source:{value:null!==(m=I)&&void 0!==m?m:void 0},positions:{value:null!==(v=E)&&void 0!==v?v:void 0},originalError:{value:c},extensions:{value:null!==(_=T)&&void 0!==_?_:void 0,enumerable:null!=T}}),(null==c?void 0:c.stack)?(Object.defineProperty(h(f),"stack",{value:c.stack,writable:!0,configurable:!0}),d(f)):(Error.captureStackTrace?Error.captureStackTrace(h(f),u):Object.defineProperty(h(f),"stack",{value:Error().stack,writable:!0,configurable:!0}),f)}return(r=[{key:"toString",value:function(){return function(e){var t,n=e.message;if(e.nodes)for(var r=0,i=e.nodes;r<i.length;r++){var o=i[r];o.loc&&(n+="\n\n"+c((t=o.loc).source,s(t.source,t.start)))}else if(e.source&&e.locations)for(var a=0,u=e.locations;a<u.length;a++)n+="\n\n"+c(e.source,u[a]);return n}(this)}},{key:a,get:function(){return"Object"}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,r),u}(m(Error));function I(e,t,n){return new k("Syntax Error: ".concat(n),void 0,e,[t])}var g=n("/jXB"),E=n("klf5");var y=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||i(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||i(0,"column in locationOffset is 1-indexed and must be positive.")}var t;return(t=[{key:a,get:function(){return"Source"}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}(),T=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"}),N=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"}),b=n("BLR7"),U=function(){function e(e){var t=new E.b(T.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==T.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=O(this,e)}while(e.kind===T.COMMENT);return e},e}();function A(e){return isNaN(e)?T.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function O(e,t){var n=e.source,r=n.body,i=r.length,o=function(e,t,n){for(var r=e.length,i=t;i<r;){var o=e.charCodeAt(i);if(9===o||32===o||44===o||65279===o)++i;else if(10===o)++i,++n.line,n.lineStart=i;else{if(13!==o)break;10===e.charCodeAt(i+1)?i+=2:++i,++n.line,n.lineStart=i}}return i}(r,t.end,e),a=e.line,s=1+o-e.lineStart;if(o>=i)return new E.b(T.EOF,i,i,a,s,t);var c=r.charCodeAt(o);switch(c){case 33:return new E.b(T.BANG,o,o+1,a,s,t);case 35:return function(e,t,n,r,i){var o,a=e.body,s=t;do{o=a.charCodeAt(++s)}while(!isNaN(o)&&(o>31||9===o));return new E.b(T.COMMENT,t,s,n,r,i,a.slice(t+1,s))}(n,o,a,s,t);case 36:return new E.b(T.DOLLAR,o,o+1,a,s,t);case 38:return new E.b(T.AMP,o,o+1,a,s,t);case 40:return new E.b(T.PAREN_L,o,o+1,a,s,t);case 41:return new E.b(T.PAREN_R,o,o+1,a,s,t);case 46:if(46===r.charCodeAt(o+1)&&46===r.charCodeAt(o+2))return new E.b(T.SPREAD,o,o+3,a,s,t);break;case 58:return new E.b(T.COLON,o,o+1,a,s,t);case 61:return new E.b(T.EQUALS,o,o+1,a,s,t);case 64:return new E.b(T.AT,o,o+1,a,s,t);case 91:return new E.b(T.BRACKET_L,o,o+1,a,s,t);case 93:return new E.b(T.BRACKET_R,o,o+1,a,s,t);case 123:return new E.b(T.BRACE_L,o,o+1,a,s,t);case 124:return new E.b(T.PIPE,o,o+1,a,s,t);case 125:return new E.b(T.BRACE_R,o,o+1,a,s,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 function(e,t,n,r,i){for(var o=e.body,a=o.length,s=t+1,c=0;s!==a&&!isNaN(c=o.charCodeAt(s))&&(95===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++s;return new E.b(T.NAME,t,s,n,r,i,o.slice(t,s))}(n,o,a,s,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return function(e,t,n,r,i,o){var a=e.body,s=n,c=t,u=!1;if(45===s&&(s=a.charCodeAt(++c)),48===s){if((s=a.charCodeAt(++c))>=48&&s<=57)throw I(e,c,"Invalid number, unexpected digit after 0: ".concat(A(s),"."))}else c=x(e,c,s),s=a.charCodeAt(c);if(46===s&&(u=!0,s=a.charCodeAt(++c),c=x(e,c,s),s=a.charCodeAt(c)),69!==s&&101!==s||(u=!0,43!==(s=a.charCodeAt(++c))&&45!==s||(s=a.charCodeAt(++c)),c=x(e,c,s),s=a.charCodeAt(c)),46===s||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(s))throw I(e,c,"Invalid number, expected digit but got: ".concat(A(s),"."));return new E.b(u?T.FLOAT:T.INT,t,c,r,i,o,a.slice(t,c))}(n,o,c,a,s,t);case 34:return 34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)?function(e,t,n,r,i,o){for(var a=e.body,s=t+3,c=s,u=0,p="";s<a.length&&!isNaN(u=a.charCodeAt(s));){if(34===u&&34===a.charCodeAt(s+1)&&34===a.charCodeAt(s+2))return p+=a.slice(c,s),new E.b(T.BLOCK_STRING,t,s+3,n,r,i,Object(b.a)(p));if(u<32&&9!==u&&10!==u&&13!==u)throw I(e,s,"Invalid character within String: ".concat(A(u),"."));10===u?(++s,++o.line,o.lineStart=s):13===u?(10===a.charCodeAt(s+1)?s+=2:++s,++o.line,o.lineStart=s):92===u&&34===a.charCodeAt(s+1)&&34===a.charCodeAt(s+2)&&34===a.charCodeAt(s+3)?(p+=a.slice(c,s)+'"""',c=s+=4):++s}throw I(e,s,"Unterminated string.")}(n,o,a,s,t,e):function(e,t,n,r,i){for(var o,a,s,c,u=e.body,p=t+1,l=p,d=0,h="";p<u.length&&!isNaN(d=u.charCodeAt(p))&&10!==d&&13!==d;){if(34===d)return h+=u.slice(l,p),new E.b(T.STRING,t,p+1,n,r,i,h);if(d<32&&9!==d)throw I(e,p,"Invalid character within String: ".concat(A(d),"."));if(++p,92===d){switch(h+=u.slice(l,p-1),d=u.charCodeAt(p)){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 m=(o=u.charCodeAt(p+1),a=u.charCodeAt(p+2),s=u.charCodeAt(p+3),c=u.charCodeAt(p+4),R(o)<<12|R(a)<<8|R(s)<<4|R(c));if(m<0){var v=u.slice(p+1,p+5);throw I(e,p,"Invalid character escape sequence: \\u".concat(v,"."))}h+=String.fromCharCode(m),p+=4;break;default:throw I(e,p,"Invalid character escape sequence: \\".concat(String.fromCharCode(d),"."))}l=++p}}throw I(e,p,"Unterminated string.")}(n,o,a,s,t)}throw I(n,o,function(e){return e<32&&9!==e&&10!==e&&13!==e?"Cannot contain the invalid character ".concat(A(e),"."):39===e?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(A(e),".")}(c))}function x(e,t,n){var r=e.body,i=t,o=n;if(o>=48&&o<=57){do{o=r.charCodeAt(++i)}while(o>=48&&o<=57);return i}throw I(e,i,"Invalid number, expected digit but got: ".concat(A(o),"."))}function R(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function C(e,t){return new w(e,t).parseDocument()}function S(e,t){var n=new w(e,t);n.expectToken(T.SOF);var r=n.parseValueLiteral(!1);return n.expectToken(T.EOF),r}function P(e,t){var n=new w(e,t);n.expectToken(T.SOF);var r=n.parseTypeReference();return n.expectToken(T.EOF),r}var w=function(){function e(e,t){var n="string"==typeof e?new y(e):e;n instanceof y||i(0,"Must provide Source. Received: ".concat(Object(r.a)(n),".")),this._lexer=new U(n),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(T.NAME);return{kind:g.a.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:g.a.DOCUMENT,definitions:this.many(T.SOF,this.parseDefinition,T.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(T.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(T.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(T.BRACE_L))return{kind:g.a.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,n=this.parseOperationType();return this.peek(T.NAME)&&(t=this.parseName()),{kind:g.a.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(T.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(T.PAREN_L,this.parseVariableDefinition,T.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:g.a.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(T.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(T.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(T.DOLLAR),{kind:g.a.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:g.a.SELECTION_SET,selections:this.many(T.BRACE_L,this.parseSelection,T.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(T.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(T.COLON)?(e=r,t=this.parseName()):t=r,{kind:g.a.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(T.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){return this.optionalMany(T.PAREN_L,e?this.parseConstArgument:this.parseArgument,T.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(T.COLON),{kind:g.a.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:g.a.ARGUMENT,name:this.parseName(),value:(this.expectToken(T.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(T.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(T.NAME)?{kind:g.a.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:g.a.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:g.a.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:g.a.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case T.BRACKET_L:return this.parseList(e);case T.BRACE_L:return this.parseObject(e);case T.INT:return this._lexer.advance(),{kind:g.a.INT,value:t.value,loc:this.loc(t)};case T.FLOAT:return this._lexer.advance(),{kind:g.a.FLOAT,value:t.value,loc:this.loc(t)};case T.STRING:case T.BLOCK_STRING:return this.parseStringLiteral();case T.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:g.a.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:g.a.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:g.a.NULL,loc:this.loc(t)};default:return{kind:g.a.ENUM,value:t.value,loc:this.loc(t)}}case T.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:g.a.STRING,value:e.value,block:e.kind===T.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:g.a.LIST,values:this.any(T.BRACKET_L,(function(){return t.parseValueLiteral(e)}),T.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:g.a.OBJECT,fields:this.any(T.BRACE_L,(function(){return t.parseObjectField(e)}),T.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(T.COLON),{kind:g.a.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(T.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(T.AT),{kind:g.a.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(T.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(T.BRACKET_R),e={kind:g.a.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(T.BANG)?{kind:g.a.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:g.a.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===T.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(T.STRING)||this.peek(T.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseDirectives(!0),r=this.many(T.BRACE_L,this.parseOperationTypeDefinition,T.BRACE_R);return{kind:g.a.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(T.COLON);var n=this.parseNamedType();return{kind:g.a.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:g.a.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:g.a.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e=[];if(this.expectOptionalKeyword("implements")){this.expectOptionalToken(T.AMP);do{var t;e.push(this.parseNamedType())}while(this.expectOptionalToken(T.AMP)||!0===(null===(t=this._options)||void 0===t?void 0:t.allowLegacySDLImplementsInterfaces)&&this.peek(T.NAME))}return e},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(T.BRACE_L)&&this._lexer.lookahead().kind===T.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(T.BRACE_L,this.parseFieldDefinition,T.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(T.COLON);var i=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:g.a.FIELD_DEFINITION,description:t,name:n,arguments:r,type:i,directives:o,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(T.PAREN_L,this.parseInputValueDef,T.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(T.COLON);var r,i=this.parseTypeReference();this.expectOptionalToken(T.EQUALS)&&(r=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:g.a.INPUT_VALUE_DEFINITION,description:t,name:n,type:i,defaultValue:r,directives:o,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:g.a.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:i,fields:o,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseUnionMemberTypes();return{kind:g.a.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:i,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){var e=[];if(this.expectOptionalToken(T.EQUALS)){this.expectOptionalToken(T.PIPE);do{e.push(this.parseNamedType())}while(this.expectOptionalToken(T.PIPE))}return e},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();return{kind:g.a.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:i,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(T.BRACE_L,this.parseEnumValueDefinition,T.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:g.a.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();return{kind:g.a.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(T.BRACE_L,this.parseInputValueDef,T.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===T.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.optionalMany(T.BRACE_L,this.parseOperationTypeDefinition,T.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:g.a.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:g.a.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:g.a.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),i=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===i.length)throw this.unexpected();return{kind:g.a.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:i,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:g.a.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:g.a.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:g.a.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(T.AT);var n=this.parseName(),r=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:g.a.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:i,locations:o,loc:this.loc(e)}},t.parseDirectiveLocations=function(){this.expectOptionalToken(T.PIPE);var e=[];do{e.push(this.parseDirectiveLocation())}while(this.expectOptionalToken(T.PIPE));return e},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==N[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new E.a(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw I(this._lexer.source,t.start,"Expected ".concat(L(e),", found ").concat(B(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==T.NAME||t.value!==e)throw I(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(B(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===T.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return I(this._lexer.source,t.start,"Unexpected ".concat(B(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r},e}();function B(e){var t=e.value;return L(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function L(e){return function(e){return e===T.BANG||e===T.DOLLAR||e===T.AMP||e===T.PAREN_L||e===T.PAREN_R||e===T.SPREAD||e===T.COLON||e===T.EQUALS||e===T.AT||e===T.BRACKET_L||e===T.BRACKET_R||e===T.BRACE_L||e===T.PIPE||e===T.BRACE_R}(e)?'"'.concat(e,'"'):e}},IxO4:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"d",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"c",(function(){return c}));const r="EEEE d MMMM HH:mm 'UTC'ZZZ";function i(e,t,n,r,i=10,a=6048e5){return Array.from({length:i},(i,s)=>{const c=s,u=e.getTime(),p=t.getTime(),l=n.getTime(),d=r.getTime(),h=a*c,m=l+h,v=d+h;return{eventStartEndDateTime:o(u+h,p+h),bookingStartEndDateTime:o(m,v)}})}function o(e,t){const n=new Date(e),r=new Date(t);return{startDateTime:n,endDateTime:r,startEndDateTimeRangeTstzRangeText:c(n,r)}}function a(e=2){return 864e5*e}function s(e,t=0,n=0,r=0,i=0){const o=new Date;o.setDate(o.getDate()+(e+(7-o.getDay()))%7);const a=o.setHours(t,n,r,i);return new Date(a)}function c(e,t){return`[\\"${e.toISOString()}\\", \\"${t.toISOString()}\\"]`}},Ok9p:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return p})),n.d(t,"i",(function(){return l})),n.d(t,"j",(function(){return d})),n.d(t,"k",(function(){return h})),n.d(t,"l",(function(){return m})),n.d(t,"m",(function(){return v})),n.d(t,"n",(function(){return _})),n.d(t,"o",(function(){return f})),n.d(t,"p",(function(){return D}));var r=function(e){return e.Booking_bookingID_eventID_key="Booking_bookingID_eventID_key",e.Booking_bookingID_eventID_userID_created_at_updated_at_key="Booking_bookingID_eventID_userID_created_at_updated_at_key",e.Booking_bookingID_eventID_userID_key="Booking_bookingID_eventID_userID_key",e.Booking_pkey="Booking_pkey",e.Booking_randomUUID_key="Booking_randomUUID_key",e}({}),i=function(e){return e.bookingID="bookingID",e.created_at="created_at",e.eventID="eventID",e.magicCode="magicCode",e.randomUUID="randomUUID",e.updated_at="updated_at",e.userID="userID",e}({}),o=function(e){return e.EventRoom_eventID_roomID_key="EventRoom_eventID_roomID_key",e.EventRoom_eventID_roomID_venueID_key="EventRoom_eventID_roomID_venueID_key",e.EventRoom_eventRoomID_eventID_roomID_venueID_roomName_event_key="EventRoom_eventRoomID_eventID_roomID_venueID_roomName_event_key",e.EventRoom_eventRoomUUID_key="EventRoom_eventRoomUUID_key",e.EventRoom_pkey="EventRoom_pkey",e}({}),a=function(e){return e.created_at="created_at",e.eventID="eventID",e.eventRoomDetails="eventRoomDetails",e.eventRoomID="eventRoomID",e.eventRoomUUID="eventRoomUUID",e.roomID="roomID",e.roomName="roomName",e.updated_at="updated_at",e.venueID="venueID",e}({}),s=function(e){return e.Event_eventID_organiserID_eventName_eventStartDateTime_even_key="Event_eventID_organiserID_eventName_eventStartDateTime_even_key",e.Event_pkey="Event_pkey",e.Event_randomUUID_key="Event_randomUUID_key",e}({}),c=function(e){return e.bookingAvailabilityDateTimeRange="bookingAvailabilityDateTimeRange",e.bookingAvailableEndDateTime="bookingAvailableEndDateTime",e.bookingAvailableStartDateTime="bookingAvailableStartDateTime",e.created_at="created_at",e.eventCapacity="eventCapacity",e.eventCategory="eventCategory",e.eventDateTimeRange="eventDateTimeRange",e.eventDescription="eventDescription",e.eventEndDateTime="eventEndDateTime",e.eventID="eventID",e.eventMedium="eventMedium",e.eventName="eventName",e.eventStartDateTime="eventStartDateTime",e.eventTopic="eventTopic",e.organiserID="organiserID",e.randomUUID="randomUUID",e.updated_at="updated_at",e}({}),u=function(e){return e.Organiser_organiserID_organiserDetails_userID_created_at_up_key="Organiser_organiserID_organiserDetails_userID_created_at_up_key",e.Organiser_pkey="Organiser_pkey",e.Organiser_randomUUID_key="Organiser_randomUUID_key",e}({}),p=function(e){return e.created_at="created_at",e.organiserDetails="organiserDetails",e.organiserID="organiserID",e.randomUUID="randomUUID",e.updated_at="updated_at",e.userID="userID",e}({}),l=function(e){return e.PersonBooking_bookingID_personID_key="PersonBooking_bookingID_personID_key",e.PersonBooking_personBookingID_personID_bookingID_checkInDat_key="PersonBooking_personBookingID_personID_bookingID_checkInDat_key",e.PersonBooking_pkey="PersonBooking_pkey",e.PersonBooking_randomUUID_key="PersonBooking_randomUUID_key",e}({}),d=function(e){return e.bookingID="bookingID",e.checkInDateTime="checkInDateTime",e.checkOutDateTime="checkOutDateTime",e.created_at="created_at",e.magicCode="magicCode",e.personBookingID="personBookingID",e.personID="personID",e.randomUUID="randomUUID",e.updated_at="updated_at",e}({}),h=function(e){return e.Room_pkey="Room_pkey",e.Room_randomUUID_key="Room_randomUUID_key",e.Room_roomID_venueID_roomName_key="Room_roomID_venueID_roomName_key",e.Room_roomID_venueID_roomName_roomType_roomCapacity_roomAvai_key="Room_roomID_venueID_roomName_roomType_roomCapacity_roomAvai_key",e.Room_venueID_roomName_key="Room_venueID_roomName_key",e}({}),m=function(e){return e.created_at="created_at",e.randomUUID="randomUUID",e.roomAvailableOperationalFloorArea="roomAvailableOperationalFloorArea",e.roomCapacity="roomCapacity",e.roomID="roomID",e.roomName="roomName",e.roomType="roomType",e.roomVenueFloorLevel="roomVenueFloorLevel",e.updated_at="updated_at",e.venueID="venueID",e}({}),v=function(e){return e.User_emailAddress_key="User_emailAddress_key",e.User_pkey="User_pkey",e.User_randomUUID_key="User_randomUUID_key",e.User_userID_username_emailAddress_created_at_updated_at_key="User_userID_username_emailAddress_created_at_updated_at_key",e.User_username_key="User_username_key",e}({}),_=function(e){return e.created_at="created_at",e.emailAddress="emailAddress",e.randomUUID="randomUUID",e.updated_at="updated_at",e.userID="userID",e.username="username",e}({}),f=function(e){return e.Venue_pkey="Venue_pkey",e.Venue_randomUUID_key="Venue_randomUUID_key",e.Venue_venueID_venueName_venueDescription_venueContact_locat_key="Venue_venueID_venueName_venueDescription_venueContact_locat_key",e}({}),D=function(e){return e.created_at="created_at",e.locationID="locationID",e.randomUUID="randomUUID",e.updated_at="updated_at",e.venueContact="venueContact",e.venueDescription="venueDescription",e.venueID="venueID",e.venueName="venueName",e}({})},lTCR:function(e,t,n){var r=n("EMzn").parse;function i(e){return e.replace(/[\s,]+/g," ").trim()}var o={},a={},s=!0,c=!1;function u(e){var t=i(e);if(o[t])return o[t];var n=r(e,{experimentalFragmentVariables:c});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");return n=function e(t,n){var r=Object.prototype.toString.call(t);if("[object Array]"===r)return t.map((function(t){return e(t,n)}));if("[object Object]"!==r)throw new Error("Unexpected input.");n&&t.loc&&delete t.loc,t.loc&&(delete t.loc.startToken,delete t.loc.endToken);var i,o,a,s=Object.keys(t);for(i in s)s.hasOwnProperty(i)&&(o=t[s[i]],"[object Object]"!==(a=Object.prototype.toString.call(o))&&"[object Array]"!==a||(t[s[i]]=e(o,!0)));return t}(n=function(e){for(var t,n={},r=[],o=0;o<e.definitions.length;o++){var c=e.definitions[o];if("FragmentDefinition"===c.kind){var u=c.name.value,p=i((t=c.loc).source.body.substring(t.start,t.end));a.hasOwnProperty(u)&&!a[u][p]?(s&&console.warn("Warning: fragment with name "+u+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"),a[u][p]=!0):a.hasOwnProperty(u)||(a[u]={},a[u][p]=!0),n[p]||(n[p]=!0,r.push(c))}else r.push(c)}return e.definitions=r,e}(n),!1),o[t]=n,n}function p(){for(var e=Array.prototype.slice.call(arguments),t=e[0],n="string"==typeof t?t:t[0],r=1;r<e.length;r++)n+=e[r]&&e[r].kind&&"Document"===e[r].kind?e[r].loc.source.body:e[r],n+=t[r];return u(n)}p.default=p,p.resetCaches=function(){o={},a={}},p.disableFragmentWarnings=function(){s=!1},p.enableExperimentalFragmentVariables=function(){c=!0},p.disableExperimentalFragmentVariables=function(){c=!1},e.exports=p},t0hA:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return D}));var r=n("lTCR"),i=n.n(r),o=n("pLZG"),a=n("lJxs"),s=n("IxO4"),c=n("Ok9p"),u=n("8Y7J"),p=n("nbgS");const l="nobody@singletouchdigital.com.au",d=i.a`
# Number of people (primary + secondary). Rather than primary user bookings.
subscription GetCountPersonBookingsForEvent($eventUUIDEquals: uuid! = "") {
PersonBooking_aggregate(where: { Booking: { Event: { randomUUID: { _eq: $eventUUIDEquals } } } }) {
aggregate {
count
}
}
}
`,h=i.a`
subscription GetPersonsForEvent($eventUUIDEquals: uuid! = "2b2fe8d6-1460-4db3-ae4b-be7b9510c4a9") {
PersonBooking(where: { Booking: { Event: { randomUUID: { _eq: $eventUUIDEquals } } } }) {
checkInDateTime
checkOutDateTime
randomUUID
Person {
personFirstName
randomUUID
}
Booking {
Event {
eventName
eventStartDateTime
eventEndDateTime
bookingAvailableStartDateTime
bookingAvailableEndDateTime
EventRooms {
roomName
eventRoomUUID
eventRoomDetails
}
Bookings_aggregate {
aggregate {
count(columns: magicCode)
}
}
}
}
}
}
`,m=(i.a`
subscription GetPersonsRootEventUUID($eventUUIDEquals: uuid! = "2b2fe8d6-1460-4db3-ae4b-be7b9510c4a9") {
Event(where: { randomUUID: { _eq: $eventUUIDEquals } }) {
Bookings {
PersonBookings {
checkInDateTime
checkOutDateTime
Person {
personFirstName
randomUUID
}
}
magicCode
randomUUID
PersonBookings_aggregate {
aggregate {
count(columns: updated_at)
}
}
}
Bookings_aggregate {
aggregate {
count(columns: randomUUID)
}
}
eventName
eventCapacity
eventCategory
eventStartDateTime
eventEndDateTime
bookingAvailableStartDateTime
bookingAvailableEndDateTime
eventTopic
randomUUID
created_at
eventDescription
eventDateTimeRange
}
}
`,i.a`
mutation BookPersonByEventUUID(
$eventUUIDEquals: uuid! = "d3287e4d-8712-4420-af63-7678a526cefa"
$personEmailAddress: String! = "test@test.com"
$personFirstName: String! = "test"
$personLastName: String! = "test"
$personPhoneNumber: String! = "123456789"
) {
insert_Person_one(
object: {
personFirstName: $personFirstName
personLastName: $personLastName
personPhoneNumber: $personPhoneNumber
personEmailAddress: $personEmailAddress
PersonBookings: {
data: {
Booking: {
data: {
Event: {
data: {
bookingAvailableEndDateTime: "2001-06-28T15:05:34.336079+00:00"
bookingAvailableStartDateTime: "2001-05-28T15:05:34.336079+00:00"
eventEndDateTime: "2002-07-28T15:05:34.336079+00:00"
eventStartDateTime: "2001-07-28T15:05:34.336079+00:00"
eventDateTimeRange: "[2001-05-28T15:05:34.336079+00:00, 2001-06-28T15:05:34.336079+00:00]"
bookingAvailabilityDateTimeRange: "[2001-05-28T15:05:34.336079+00:00, 2001-06-28T15:05:34.336079+00:00]"
eventName: "churchEventTest"
eventMedium: "In-person"
eventCapacity: 40
eventDescription: "churchEventTest"
eventCategory: "churchEventTest"
eventTopic: "churchEventTest"
randomUUID: $eventUUIDEquals
}
on_conflict: { constraint: Event_randomUUID_key, update_columns: updated_at }
}
}
on_conflict: { constraint: Booking_randomUUID_key, update_columns: updated_at }
}
}
on_conflict: { constraint: PersonBooking_bookingID_personID_key, update_columns: updated_at }
}
}
on_conflict: {
constraint: Person_personFirstName_personLastName_personPhoneNumber_personE
update_columns: updated_at
}
) {
personFirstName
randomUUID
PersonBookings {
randomUUID
Booking {
randomUUID
magicCode
Event {
randomUUID
eventName
eventStartDateTime
eventEndDateTime
bookingAvailableStartDateTime
bookingAvailableEndDateTime
eventCapacity
eventDescription
}
}
}
PersonBookings_aggregate {
aggregate {
count(columns: randomUUID)
}
}
}
}
`),v=i.a`
subscription GetPeopleBookedEvents {
Person {
personFirstName
randomUUID
PersonBookings {
randomUUID
checkInDateTime
checkOutDateTime
magicCode
Booking {
randomUUID
Event {
randomUUID
eventName
eventStartDateTime
eventEndDateTime
eventCapacity
eventCategory
eventDateTimeRange
}
}
}
}
}
`,_=(i.a`
subscription GetEventsBookedPeople {
Event {
randomUUID
eventName
eventStartDateTime
eventEndDateTime
eventDescription
eventCapacity
Bookings {
PersonBookings {
Person {
randomUUID
personFirstName
}
Booking {
randomUUID
}
}
}
}
}
`,i.a`
subscription GetPersonBookings {
PersonBooking {
Person {
randomUUID
personFirstName
}
randomUUID
checkInDateTime
checkOutDateTime
Booking {
randomUUID
Event {
eventName
eventStartDateTime
eventEndDateTime
}
}
}
}
`,i.a`
mutation AddUpsertPersonToSimpleBooking($personBookingUpsertObject: [Person_insert_input!]!) {
insert_Person(objects: $personBookingUpsertObject) {
affected_rows
returning {
randomUUID
personFirstName
PersonBookings {
randomUUID
Booking {
randomUUID
Event {
randomUUID
eventName
}
}
}
}
}
}
`);let f=(()=>{class e{constructor(e){this.apollo=e}getLatestPersonCountForEventUUID(e="667c1a54-3c59-4eff-a507-b55a80094249",t=this.apollo){return this.getNumberOfPersonBookingsForEvent(e).pipe(Object(o.a)(({data:e})=>{var t,n;return void 0!==(null===(n=null===(t=null==e?void 0:e.PersonBooking_aggregate)||void 0===t?void 0:t.aggregate)||void 0===n?void 0:n.count)}),Object(a.a)(({data:{PersonBooking_aggregate:{aggregate:{count:e}}}})=>e))}getNumberOfPersonBookingsForEvent(e="667c1a54-3c59-4eff-a507-b55a80094249",t=this.apollo){return t.subscribe({query:d,fetchPolicy:"cache-first",variables:{eventUUIDEquals:e}})}getPersonsBookedByEventUUID(e,t=this.apollo){return t.subscribe({query:h,fetchPolicy:"cache-first",variables:{eventUUIDEquals:e}})}getPersonsByRootEventUUID(e,t=this.apollo){return t.subscribe({query:d,fetchPolicy:"cache-first",variables:{eventUUIDEquals:e}})}getPeopleBookedEvents(e=this.apollo){return e.subscribe({query:v,fetchPolicy:"cache-first"})}getPersonsFromBookingUUID(e,t=this.apollo){}addPersonToBookingByUUID(e,{personFirstName:t,personLastName:n,personPhoneNumber:r,personEmailAddress:i,randomUUID:o},a=this.apollo){return a.mutate({mutation:_,variables:{personBookingUpsertObject:[{personFirstName:t,personLastName:n,personPhoneNumber:r,personEmailAddress:i,randomUUID:o,PersonBookings:{data:[{Booking:{data:{randomUUID:e},on_conflict:{constraint:c.a.Booking_randomUUID_key,update_columns:[c.b.updated_at]}}}],on_conflict:{constraint:c.i.PersonBooking_randomUUID_key,update_columns:[c.j.updated_at]}}}]}})}bookPersonByEventUUID(e,{personFirstName:t,personLastName:n,personPhoneNumber:r,personEmailAddress:i},o=this.apollo){return o.mutate({mutation:m,variables:{eventUUIDEquals:e,personFirstName:t,personLastName:n,personPhoneNumber:r,personEmailAddress:i}})}addPersonToSimpleBookingEvent({personFirstName:e,personLastName:t,personPhoneNumber:n,personEmailAddress:r,randomUUID:i},o=this.apollo){return this.getPersonBookingsDefaultedPlacehoilder(),o.mutate({mutation:_,variables:{personBookingUpsertObject:[{personFirstName:e,personLastName:t,personPhoneNumber:n,personEmailAddress:r,randomUUID:i,PersonBookings:{data:[{Booking:{data:{User:{data:{username:"bookee",emailAddress:"info@singletouchdigital.com.au"},on_conflict:{constraint:c.m.User_username_key,update_columns:[c.n.updated_at]}}},on_conflict:{constraint:c.a.Booking_randomUUID_key,update_columns:[c.b.updated_at]}}}],on_conflict:{constraint:c.i.PersonBooking_randomUUID_key,update_columns:[c.j.updated_at]}}}]}})}getPersonBookingsDefaultedPlacehoilder(e=this.getEventPlaceholder()){return{data:[{magicCode:"nobody",Booking:{data:{Event:e,User:this.getUserPlaceholder(),magicCode:"nobody"},on_conflict:{constraint:c.a.Booking_randomUUID_key,update_columns:[c.b.updated_at]}}}],on_conflict:{constraint:c.i.PersonBooking_randomUUID_key,update_columns:[c.j.updated_at]}}}getEventPlaceholder(e="667c1a54-3c59-4eff-a507-b55a80094249",t="nobody",n=l,r=this.getOrganiserPlaceholder(t,n)){const i=new Date,o=new Date(i.getTime()-Object(s.b)(2)),a=new Date(i.getTime()+Object(s.b)(7)),u=new Date(i.getTime()+Object(s.b)(9)),p=new Date(i.getTime()+Object(s.b)(10));return new Date(i.getTime()+Object(s.b)(10)),{data:{randomUUID:e,bookingAvailableStartDateTime:o,bookingAvailableEndDateTime:a,eventStartDateTime:u,eventEndDateTime:p,bookingAvailabilityDateTimeRange:"('2020-07-22T09:27:53.667Z', '2020-08-14T09:27:53.667Z']",eventDateTimeRange:"('2020-07-22T09:27:53.667Z', '2020-08-14T09:27:53.667Z']",eventName:"Sunday service",eventTopic:"Topic ",eventMedium:"In-person",eventCategory:"ChurchCategory",eventCapacity:49,eventDescription:"Description of community event",Organiser:r},on_conflict:{constraint:c.e.Event_randomUUID_key,update_columns:[c.f.updated_at]}}}getOrganiserPlaceholder(e="nobody",t=l){return{data:{organiserDetails:e,User:this.getUserPlaceholder()},on_conflict:{constraint:c.g.Organiser_randomUUID_key,update_columns:[c.h.updated_at]}}}getUserPlaceholder(e="nobody",t=l){return{data:{username:e,emailAddress:t},on_conflict:{constraint:c.m.User_username_key,update_columns:[c.n.updated_at]}}}}return e.\u0275fac=function(t){return new(t||e)(u.Tb(p.b))},e.\u0275prov=u.Fb({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function D(e){return e.pipe(Object(o.a)(({errors:e})=>void 0===e||0===e.length),Object(a.a)(({data:{PersonBooking_aggregate:{aggregate:e}}})=>e.count))}}}]);