@well-played.gg/react-sdk 1.2.4 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ApolloClient } from '@apollo/client';
2
2
  import { ApolloError } from '@apollo/client';
3
3
  import { ApolloQueryResult } from '@apollo/client';
4
- import { ErrorResponse } from '@apollo/client/link/error';
4
+ import { ErrorHandler } from '@apollo/client/link/error';
5
5
  import { EventClosedListener } from 'graphql-ws';
6
6
  import { EventConnectedListener } from 'graphql-ws';
7
7
  import { EventErrorListener } from 'graphql-ws';
@@ -37,7 +37,7 @@ declare type ClientProps = {
37
37
  organizationId: string;
38
38
  invalidationPolicies?: InvalidationPolicies;
39
39
  handlers?: {
40
- onError?: (error: Omit<ErrorResponse, "operation" | "forward" | "response">) => void;
40
+ onError?: ErrorHandler;
41
41
  webSocket?: {
42
42
  onConnected?: EventConnectedListener;
43
43
  onClosed?: EventClosedListener;
@@ -136,7 +136,7 @@ export declare type introspection_types = {
136
136
  'EventReservationTicket': { kind: 'OBJECT'; name: 'EventReservationTicket'; fields: { 'createdAt': { name: 'createdAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'groupMemberId': { name: 'groupMemberId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'reservationId': { name: 'reservationId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'seatId': { name: 'seatId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; } }; 'ticketId': { name: 'ticketId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; }; };
137
137
  'EventReservationTicketWithQrCode': { kind: 'OBJECT'; name: 'EventReservationTicketWithQrCode'; fields: { 'createdAt': { name: 'createdAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'groupMemberId': { name: 'groupMemberId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'qrCode': { name: 'qrCode'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'reservationId': { name: 'reservationId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'seatId': { name: 'seatId'; type: { kind: 'SCALAR'; name: 'ID'; ofType: null; } }; 'ticketId': { name: 'ticketId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; }; };
138
138
  'EventReservationValidateAndPay': { kind: 'OBJECT'; name: 'EventReservationValidateAndPay'; fields: { 'clientSecret': { name: 'clientSecret'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; 'paymentUrl': { name: 'paymentUrl'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; } }; }; };
139
- 'EventReservationValidateAndPayInput': { kind: 'INPUT_OBJECT'; name: 'EventReservationValidateAndPayInput'; isOneOf: false; inputFields: [{ name: 'canceledUrl'; type: { kind: 'SCALAR'; name: 'URL'; ofType: null; }; defaultValue: null }, { name: 'returnUrl'; type: { kind: 'SCALAR'; name: 'URL'; ofType: null; }; defaultValue: null }, { name: 'successUrl'; type: { kind: 'SCALAR'; name: 'URL'; ofType: null; }; defaultValue: null }, { name: 'uiMode'; type: { kind: 'ENUM'; name: 'StripeUiMode'; ofType: null; }; defaultValue: null }]; };
139
+ 'EventReservationValidateAndPayInput': { kind: 'INPUT_OBJECT'; name: 'EventReservationValidateAndPayInput'; isOneOf: false; inputFields: [{ name: 'canceledUrl'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'returnUrl'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'successUrl'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'uiMode'; type: { kind: 'ENUM'; name: 'StripeUiMode'; ofType: null; }; defaultValue: null }]; };
140
140
  'EventReservationWithTicketsAndQrCode': { kind: 'OBJECT'; name: 'EventReservationWithTicketsAndQrCode'; fields: { 'createdAt': { name: 'createdAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'eventId': { name: 'eventId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'groupId': { name: 'groupId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ID'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'sessionValidUntil': { name: 'sessionValidUntil'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'status': { name: 'status'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'EventReservationStatus'; ofType: null; }; } }; 'tickets': { name: 'tickets'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'EventReservationTicketWithQrCode'; ofType: null; }; }; }; } }; 'updatedAt': { name: 'updatedAt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; }; };
141
141
  'EventReservations': { kind: 'OBJECT'; name: 'EventReservations'; fields: { 'edges': { name: 'edges'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'OmitObjectTypeEdge'; ofType: null; }; }; }; } }; 'nodes': { name: 'nodes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'OmitObjectType'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'ResponsePageInfo'; ofType: null; }; } }; 'totalCount': { name: 'totalCount'; type: { kind: 'SCALAR'; name: 'Float'; ofType: null; } }; }; };
142
142
  'EventReservationsQueryInput': { kind: 'INPUT_OBJECT'; name: 'EventReservationsQueryInput'; isOneOf: false; inputFields: [{ name: 'filterByPlayerIdentityProviderProperties'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'IdentityProviderPropertyInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'filterByPlayerProperties'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'PropertyValueInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'filterByPlayerUsernameQuery'; type: { kind: 'SCALAR'; name: 'String'; ofType: null; }; defaultValue: null }, { name: 'filterByPlayers'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'EventReservationsQueryPlayerIdWithGroupStatusInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'filterByRegistrationStatus'; type: { kind: 'ENUM'; name: 'EventReservationStatus'; ofType: null; }; defaultValue: null }, { name: 'filterByReservationProperties'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'PropertyValueInput'; ofType: null; }; }; }; defaultValue: null }, { name: 'retrieveOnlyGroupMembersWithStatus'; type: { kind: 'ENUM'; name: 'UserGroupMemberStatus'; ofType: null; }; defaultValue: null }]; };
@@ -249,7 +249,7 @@ __p += '`),Je&&(K+=`' +
249
249
  function print() { __p += __j.call(arguments, '') }
250
250
  `:`;
251
251
  `)+K+`return __p
252
- }`;var Ve=BE(function(){return it(S,de+"return "+K).apply(n,A)});if(Ve.source=K,$p(Ve))throw Ve;return Ve}function G$(c){return st(c).toLowerCase()}function H$(c){return st(c).toUpperCase()}function K$(c,f,m){if(c=st(c),c&&(m||f===n))return J0(c);if(!c||!(f=tr(f)))return c;var v=Br(c),E=Br(f),S=Y0(v,E),A=X0(v,E)+1;return is(v,S,A).join("")}function J$(c,f,m){if(c=st(c),c&&(m||f===n))return c.slice(0,e_(c)+1);if(!c||!(f=tr(f)))return c;var v=Br(c),E=X0(v,Br(f))+1;return is(v,0,E).join("")}function Y$(c,f,m){if(c=st(c),c&&(m||f===n))return c.replace($h,"");if(!c||!(f=tr(f)))return c;var v=Br(c),E=Y0(v,Br(f));return is(v,E).join("")}function X$(c,f){var m=U,v=be;if(wt(f)){var E="separator"in f?f.separator:E;m="length"in f?Fe(f.length):m,v="omission"in f?tr(f.omission):v}c=st(c);var S=c.length;if(Ho(c)){var A=Br(c);S=A.length}if(m>=S)return c;var D=m-Ko(v);if(D<1)return v;var $=A?is(A,0,D).join(""):c.slice(0,D);if(E===n)return $+v;if(A&&(D+=$.length-D),Lp(E)){if(c.slice(D).search(E)){var G,H=$;for(E.global||(E=ep(E.source,st(v0.exec(E))+"g")),E.lastIndex=0;G=E.exec(H);)var K=G.index;$=$.slice(0,K===n?D:K)}}else if(c.indexOf(tr(E),D)!=D){var ne=$.lastIndexOf(E);ne>-1&&($=$.slice(0,ne))}return $+v}function Z$(c){return c=st(c),c&&uC.test(c)?c.replace(m0,AD):c}var eL=na(function(c,f,m){return c+(m?" ":"")+f.toUpperCase()}),Bp=U_("toUpperCase");function jE(c,f,m){return c=st(c),f=m?n:f,f===n?TD(c)?CD(c):pD(c):c.match(f)||[]}var BE=Ue(function(c,f){try{return Zn(c,n,f)}catch(m){return $p(m)?m:new Ce(m)}}),tL=Oi(function(c,f){return gr(f,function(m){m=ri(m),Ti(c,m,Pp(c[m],c))}),c});function nL(c){var f=c==null?0:c.length,m=_e();return c=f?Et(c,function(v){if(typeof v[1]!="function")throw new yr(o);return[m(v[0]),v[1]]}):[],Ue(function(v){for(var E=-1;++E<f;){var S=c[E];if(Zn(S[0],this,v))return Zn(S[1],this,v)}})}function rL(c){return AR(br(c,h))}function Up(c){return function(){return c}}function iL(c,f){return c==null||c!==c?f:c}var sL=W_(),oL=W_(!0);function Bn(c){return c}function qp(c){return __(typeof c=="function"?c:br(c,h))}function aL(c){return w_(br(c,h))}function lL(c,f){return T_(c,br(f,h))}var cL=Ue(function(c,f){return function(m){return ml(m,c,f)}}),uL=Ue(function(c,f){return function(m){return ml(c,m,f)}});function Wp(c,f,m){var v=Gt(f),E=Su(f,v);m==null&&!(wt(f)&&(E.length||!v.length))&&(m=f,f=c,c=this,E=Su(f,Gt(f)));var S=!(wt(m)&&"chain"in m)||!!m.chain,A=Ni(c);return gr(E,function(D){var $=f[D];c[D]=$,A&&(c.prototype[D]=function(){var G=this.__chain__;if(S||G){var H=c(this.__wrapped__),K=H.__actions__=Ln(this.__actions__);return K.push({func:$,args:arguments,thisArg:c}),H.__chain__=G,H}return $.apply(c,Xi([this.value()],arguments))})}),c}function fL(){return en._===this&&(en._=$D),this}function zp(){}function dL(c){return c=Fe(c),Ue(function(f){return S_(f,c)})}var hL=wp(Et),pL=wp(z0),mL=wp(Gh);function UE(c){return Ip(c)?Hh(ri(c)):zR(c)}function gL(c){return function(f){return c==null?n:Xs(c,f)}}var yL=Q_(),vL=Q_(!0);function Qp(){return[]}function Gp(){return!1}function bL(){return{}}function _L(){return""}function EL(){return!0}function wL(c,f){if(c=Fe(c),c<1||c>Ee)return[];var m=ve,v=fn(c,ve);f=_e(f),c-=ve;for(var E=Yh(v,f);++m<c;)f(m);return E}function TL(c){return De(c)?Et(c,ri):nr(c)?[c]:Ln(lE(st(c)))}function SL(c){var f=++PD;return st(c)+f}var OL=xu(function(c,f){return c+f},0),kL=Tp("ceil"),NL=xu(function(c,f){return c/f},1),AL=Tp("floor");function IL(c){return c&&c.length?Tu(c,Bn,lp):n}function xL(c,f){return c&&c.length?Tu(c,_e(f,2),lp):n}function CL(c){return H0(c,Bn)}function DL(c,f){return H0(c,_e(f,2))}function RL(c){return c&&c.length?Tu(c,Bn,dp):n}function ML(c,f){return c&&c.length?Tu(c,_e(f,2),dp):n}var PL=xu(function(c,f){return c*f},1),FL=Tp("round"),$L=xu(function(c,f){return c-f},0);function LL(c){return c&&c.length?Jh(c,Bn):0}function VL(c,f){return c&&c.length?Jh(c,_e(f,2)):0}return T.after=aF,T.ary=bE,T.assign=HF,T.assignIn=RE,T.assignInWith=qu,T.assignWith=KF,T.at=JF,T.before=_E,T.bind=Pp,T.bindAll=tL,T.bindKey=EE,T.castArray=bF,T.chain=gE,T.chunk=AM,T.compact=IM,T.concat=xM,T.cond=nL,T.conforms=rL,T.constant=Up,T.countBy=LP,T.create=YF,T.curry=wE,T.curryRight=TE,T.debounce=SE,T.defaults=XF,T.defaultsDeep=ZF,T.defer=lF,T.delay=cF,T.difference=CM,T.differenceBy=DM,T.differenceWith=RM,T.drop=MM,T.dropRight=PM,T.dropRightWhile=FM,T.dropWhile=$M,T.fill=LM,T.filter=jP,T.flatMap=qP,T.flatMapDeep=WP,T.flatMapDepth=zP,T.flatten=dE,T.flattenDeep=VM,T.flattenDepth=jM,T.flip=uF,T.flow=sL,T.flowRight=oL,T.fromPairs=BM,T.functions=o$,T.functionsIn=a$,T.groupBy=QP,T.initial=qM,T.intersection=WM,T.intersectionBy=zM,T.intersectionWith=QM,T.invert=c$,T.invertBy=u$,T.invokeMap=HP,T.iteratee=qp,T.keyBy=KP,T.keys=Gt,T.keysIn=jn,T.map=$u,T.mapKeys=d$,T.mapValues=h$,T.matches=aL,T.matchesProperty=lL,T.memoize=Vu,T.merge=p$,T.mergeWith=ME,T.method=cL,T.methodOf=uL,T.mixin=Wp,T.negate=ju,T.nthArg=dL,T.omit=m$,T.omitBy=g$,T.once=fF,T.orderBy=JP,T.over=hL,T.overArgs=dF,T.overEvery=pL,T.overSome=mL,T.partial=Fp,T.partialRight=OE,T.partition=YP,T.pick=y$,T.pickBy=PE,T.property=UE,T.propertyOf=gL,T.pull=JM,T.pullAll=pE,T.pullAllBy=YM,T.pullAllWith=XM,T.pullAt=ZM,T.range=yL,T.rangeRight=vL,T.rearg=hF,T.reject=eF,T.remove=eP,T.rest=pF,T.reverse=Rp,T.sampleSize=nF,T.set=b$,T.setWith=_$,T.shuffle=rF,T.slice=tP,T.sortBy=oF,T.sortedUniq=lP,T.sortedUniqBy=cP,T.split=q$,T.spread=mF,T.tail=uP,T.take=fP,T.takeRight=dP,T.takeRightWhile=hP,T.takeWhile=pP,T.tap=IP,T.throttle=gF,T.thru=Fu,T.toArray=xE,T.toPairs=FE,T.toPairsIn=$E,T.toPath=TL,T.toPlainObject=DE,T.transform=E$,T.unary=yF,T.union=mP,T.unionBy=gP,T.unionWith=yP,T.uniq=vP,T.uniqBy=bP,T.uniqWith=_P,T.unset=w$,T.unzip=Mp,T.unzipWith=mE,T.update=T$,T.updateWith=S$,T.values=sa,T.valuesIn=O$,T.without=EP,T.words=jE,T.wrap=vF,T.xor=wP,T.xorBy=TP,T.xorWith=SP,T.zip=OP,T.zipObject=kP,T.zipObjectDeep=NP,T.zipWith=AP,T.entries=FE,T.entriesIn=$E,T.extend=RE,T.extendWith=qu,Wp(T,T),T.add=OL,T.attempt=BE,T.camelCase=I$,T.capitalize=LE,T.ceil=kL,T.clamp=k$,T.clone=_F,T.cloneDeep=wF,T.cloneDeepWith=TF,T.cloneWith=EF,T.conformsTo=SF,T.deburr=VE,T.defaultTo=iL,T.divide=NL,T.endsWith=x$,T.eq=qr,T.escape=C$,T.escapeRegExp=D$,T.every=VP,T.find=BP,T.findIndex=uE,T.findKey=e$,T.findLast=UP,T.findLastIndex=fE,T.findLastKey=t$,T.floor=AL,T.forEach=yE,T.forEachRight=vE,T.forIn=n$,T.forInRight=r$,T.forOwn=i$,T.forOwnRight=s$,T.get=Vp,T.gt=OF,T.gte=kF,T.has=l$,T.hasIn=jp,T.head=hE,T.identity=Bn,T.includes=GP,T.indexOf=UM,T.inRange=N$,T.invoke=f$,T.isArguments=to,T.isArray=De,T.isArrayBuffer=NF,T.isArrayLike=Vn,T.isArrayLikeObject=xt,T.isBoolean=AF,T.isBuffer=ss,T.isDate=IF,T.isElement=xF,T.isEmpty=CF,T.isEqual=DF,T.isEqualWith=RF,T.isError=$p,T.isFinite=MF,T.isFunction=Ni,T.isInteger=kE,T.isLength=Bu,T.isMap=NE,T.isMatch=PF,T.isMatchWith=FF,T.isNaN=$F,T.isNative=LF,T.isNil=jF,T.isNull=VF,T.isNumber=AE,T.isObject=wt,T.isObjectLike=kt,T.isPlainObject=El,T.isRegExp=Lp,T.isSafeInteger=BF,T.isSet=IE,T.isString=Uu,T.isSymbol=nr,T.isTypedArray=ia,T.isUndefined=UF,T.isWeakMap=qF,T.isWeakSet=WF,T.join=GM,T.kebabCase=R$,T.last=Er,T.lastIndexOf=HM,T.lowerCase=M$,T.lowerFirst=P$,T.lt=zF,T.lte=QF,T.max=IL,T.maxBy=xL,T.mean=CL,T.meanBy=DL,T.min=RL,T.minBy=ML,T.stubArray=Qp,T.stubFalse=Gp,T.stubObject=bL,T.stubString=_L,T.stubTrue=EL,T.multiply=PL,T.nth=KM,T.noConflict=fL,T.noop=zp,T.now=Lu,T.pad=F$,T.padEnd=$$,T.padStart=L$,T.parseInt=V$,T.random=A$,T.reduce=XP,T.reduceRight=ZP,T.repeat=j$,T.replace=B$,T.result=v$,T.round=FL,T.runInContext=F,T.sample=tF,T.size=iF,T.snakeCase=U$,T.some=sF,T.sortedIndex=nP,T.sortedIndexBy=rP,T.sortedIndexOf=iP,T.sortedLastIndex=sP,T.sortedLastIndexBy=oP,T.sortedLastIndexOf=aP,T.startCase=W$,T.startsWith=z$,T.subtract=$L,T.sum=LL,T.sumBy=VL,T.template=Q$,T.times=wL,T.toFinite=Ai,T.toInteger=Fe,T.toLength=CE,T.toLower=G$,T.toNumber=wr,T.toSafeInteger=GF,T.toString=st,T.toUpper=H$,T.trim=K$,T.trimEnd=J$,T.trimStart=Y$,T.truncate=X$,T.unescape=Z$,T.uniqueId=SL,T.upperCase=eL,T.upperFirst=Bp,T.each=yE,T.eachRight=vE,T.first=hE,Wp(T,function(){var c={};return ti(T,function(f,m){at.call(T.prototype,m)||(c[m]=f)}),c}(),{chain:!1}),T.VERSION=r,gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){T[c].placeholder=T}),gr(["drop","take"],function(c,f){He.prototype[c]=function(m){m=m===n?1:Bt(Fe(m),0);var v=this.__filtered__&&!f?new He(this):this.clone();return v.__filtered__?v.__takeCount__=fn(m,v.__takeCount__):v.__views__.push({size:fn(m,ve),type:c+(v.__dir__<0?"Right":"")}),v},He.prototype[c+"Right"]=function(m){return this.reverse()[c](m).reverse()}}),gr(["filter","map","takeWhile"],function(c,f){var m=f+1,v=m==Le||m==Ae;He.prototype[c]=function(E){var S=this.clone();return S.__iteratees__.push({iteratee:_e(E,3),type:m}),S.__filtered__=S.__filtered__||v,S}}),gr(["head","last"],function(c,f){var m="take"+(f?"Right":"");He.prototype[c]=function(){return this[m](1).value()[0]}}),gr(["initial","tail"],function(c,f){var m="drop"+(f?"":"Right");He.prototype[c]=function(){return this.__filtered__?new He(this):this[m](1)}}),He.prototype.compact=function(){return this.filter(Bn)},He.prototype.find=function(c){return this.filter(c).head()},He.prototype.findLast=function(c){return this.reverse().find(c)},He.prototype.invokeMap=Ue(function(c,f){return typeof c=="function"?new He(this):this.map(function(m){return ml(m,c,f)})}),He.prototype.reject=function(c){return this.filter(ju(_e(c)))},He.prototype.slice=function(c,f){c=Fe(c);var m=this;return m.__filtered__&&(c>0||f<0)?new He(m):(c<0?m=m.takeRight(-c):c&&(m=m.drop(c)),f!==n&&(f=Fe(f),m=f<0?m.dropRight(-f):m.take(f-c)),m)},He.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},He.prototype.toArray=function(){return this.take(ve)},ti(He.prototype,function(c,f){var m=/^(?:filter|find|map|reject)|While$/.test(f),v=/^(?:head|last)$/.test(f),E=T[v?"take"+(f=="last"?"Right":""):f],S=v||/^find/.test(f);E&&(T.prototype[f]=function(){var A=this.__wrapped__,D=v?[1]:arguments,$=A instanceof He,G=D[0],H=$||De(A),K=function(Qe){var Je=E.apply(T,Xi([Qe],D));return v&&ne?Je[0]:Je};H&&m&&typeof G=="function"&&G.length!=1&&($=H=!1);var ne=this.__chain__,de=!!this.__actions__.length,Te=S&&!ne,Ve=$&&!de;if(!S&&H){A=Ve?A:new He(this);var Se=c.apply(A,D);return Se.__actions__.push({func:Fu,args:[K],thisArg:n}),new vr(Se,ne)}return Te&&Ve?c.apply(this,D):(Se=this.thru(K),Te?v?Se.value()[0]:Se.value():Se)})}),gr(["pop","push","shift","sort","splice","unshift"],function(c){var f=lu[c],m=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",v=/^(?:pop|shift)$/.test(c);T.prototype[c]=function(){var E=arguments;if(v&&!this.__chain__){var S=this.value();return f.apply(De(S)?S:[],E)}return this[m](function(A){return f.apply(De(A)?A:[],E)})}}),ti(He.prototype,function(c,f){var m=T[f];if(m){var v=m.name+"";at.call(Zo,v)||(Zo[v]=[]),Zo[v].push({name:f,func:m})}}),Zo[Iu(n,w).name]=[{name:"wrapper",func:n}],He.prototype.clone=ZD,He.prototype.reverse=eR,He.prototype.value=tR,T.prototype.at=xP,T.prototype.chain=CP,T.prototype.commit=DP,T.prototype.next=RP,T.prototype.plant=PP,T.prototype.reverse=FP,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=$P,T.prototype.first=T.prototype.head,ll&&(T.prototype[ll]=MP),T},Jo=DD();Gs?((Gs.exports=Jo)._=Jo,qh._=Jo):en._=Jo}).call(Re)})(od,od.exports);var Jg=od.exports;function qn(t){return t===null?"null":Array.isArray(t)?"array":typeof t}function so(t){return qn(t)==="object"}function Oee(t){return Array.isArray(t)&&t.length>0&&t.every(e=>"message"in e)}function DS(t,e){return t.length<124?t:e}const kee="graphql-transport-ws";var sr;(function(t){t[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(sr||(sr={}));var Dt;(function(t){t.ConnectionInit="connection_init",t.ConnectionAck="connection_ack",t.Ping="ping",t.Pong="pong",t.Subscribe="subscribe",t.Next="next",t.Error="error",t.Complete="complete"})(Dt||(Dt={}));function dI(t){if(!so(t))throw new Error(`Message is expected to be an object, but got ${qn(t)}`);if(!t.type)throw new Error("Message is missing the 'type' property");if(typeof t.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${qn(t.type)}`);switch(t.type){case Dt.ConnectionInit:case Dt.ConnectionAck:case Dt.Ping:case Dt.Pong:{if(t.payload!=null&&!so(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${t.payload}"`);break}case Dt.Subscribe:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${qn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);if(!so(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object, but got ${qn(t.payload)}`);if(typeof t.payload.query!="string")throw new Error(`"${t.type}" message payload expects the 'query' property to be a string, but got ${qn(t.payload.query)}`);if(t.payload.variables!=null&&!so(t.payload.variables))throw new Error(`"${t.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${qn(t.payload.variables)}`);if(t.payload.operationName!=null&&qn(t.payload.operationName)!=="string")throw new Error(`"${t.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${qn(t.payload.operationName)}`);if(t.payload.extensions!=null&&!so(t.payload.extensions))throw new Error(`"${t.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${qn(t.payload.extensions)}`);break}case Dt.Next:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${qn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);if(!so(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object, but got ${qn(t.payload)}`);break}case Dt.Error:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${qn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);if(!Oee(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(t.payload)}`);break}case Dt.Complete:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${qn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${t.type}"`)}return t}function Nee(t,e){return dI(typeof t=="string"?JSON.parse(t,e):t)}function Ml(t,e){return dI(t),JSON.stringify(t,e)}var wa=function(t){return this instanceof wa?(this.v=t,this):new wa(t)},Aee=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(p){r[p]&&(i[p]=function(g){return new Promise(function(y,b){s.push([p,g,y,b])>1||a(p,g)})})}function a(p,g){try{l(r[p](g))}catch(y){h(s[0][3],y)}}function l(p){p.value instanceof wa?Promise.resolve(p.value.v).then(u,d):h(s[0][2],p)}function u(p){a("next",p)}function d(p){a("throw",p)}function h(p,g){p(g),s.shift(),s.length&&a(s[0][0],s[0][1])}};function Iee(t){const{url:e,connectionParams:n,lazy:r=!0,onNonLazyError:i=console.error,lazyCloseTimeout:s=0,keepAlive:o=0,disablePong:a,connectionAckWaitTimeout:l=0,retryAttempts:u=5,retryWait:d=async function(Ae){let fe=1e3;for(let Ee=0;Ee<Ae;Ee++)fe*=2;await new Promise(Ee=>setTimeout(Ee,fe+Math.floor(Math.random()*2700+300)))},shouldRetry:h=xm,isFatalConnectionProblem:p,on:g,webSocketImpl:y,generateID:b=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,Ae=>{const fe=Math.random()*16|0;return(Ae=="x"?fe:fe&3|8).toString(16)})},jsonMessageReplacer:_,jsonMessageReviver:w}=t;let O;if(y){if(!Cee(y))throw new Error("Invalid WebSocket implementation provided");O=y}else typeof WebSocket<"u"?O=WebSocket:typeof global<"u"?O=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(O=window.WebSocket||window.MozWebSocket);if(!O)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const N=O,I=(()=>{const te=(()=>{const fe={};return{on(Ee,ge){return fe[Ee]=ge,()=>{delete fe[Ee]}},emit(Ee){var ge;"id"in Ee&&((ge=fe[Ee.id])===null||ge===void 0||ge.call(fe,Ee))}}})(),Ae={connecting:g!=null&&g.connecting?[g.connecting]:[],opened:g!=null&&g.opened?[g.opened]:[],connected:g!=null&&g.connected?[g.connected]:[],ping:g!=null&&g.ping?[g.ping]:[],pong:g!=null&&g.pong?[g.pong]:[],message:g!=null&&g.message?[te.emit,g.message]:[te.emit],closed:g!=null&&g.closed?[g.closed]:[],error:g!=null&&g.error?[g.error]:[]};return{onMessage:te.on,on(fe,Ee){const ge=Ae[fe];return ge.push(Ee),()=>{ge.splice(ge.indexOf(Ee),1)}},emit(fe,...Ee){for(const ge of[...Ae[fe]])ge(...Ee)}}})();function P(te){const Ae=[I.on("error",fe=>{Ae.forEach(Ee=>Ee()),te(fe)}),I.on("closed",fe=>{Ae.forEach(Ee=>Ee()),te(fe)})]}let M,B=0,Q,x=!1,U=0,be=!1;async function Oe(){clearTimeout(Q);const[te,Ae]=await(M??(M=new Promise((ge,ct)=>(async()=>{if(x){if(await d(U),!B)return M=void 0,ct({code:1e3,reason:"All Subscriptions Gone"});U++}I.emit("connecting",x);const ve=new N(typeof e=="function"?await e():e,kee);let L,Z;function Y(){isFinite(o)&&o>0&&(clearTimeout(Z),Z=setTimeout(()=>{ve.readyState===N.OPEN&&(ve.send(Ml({type:Dt.Ping})),I.emit("ping",!1,void 0))},o))}P(we=>{M=void 0,clearTimeout(L),clearTimeout(Z),ct(we),we instanceof RS&&(ve.close(4499,"Terminated"),ve.onerror=null,ve.onclose=null)}),ve.onerror=we=>I.emit("error",we),ve.onclose=we=>I.emit("closed",we),ve.onopen=async()=>{try{I.emit("opened",ve);const we=typeof n=="function"?await n():n;if(ve.readyState!==N.OPEN)return;ve.send(Ml(we?{type:Dt.ConnectionInit,payload:we}:{type:Dt.ConnectionInit},_)),isFinite(l)&&l>0&&(L=setTimeout(()=>{ve.close(sr.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},l)),Y()}catch(we){I.emit("error",we),ve.close(sr.InternalClientError,DS(we instanceof Error?we.message:new Error(we).message,"Internal client error"))}};let ee=!1;ve.onmessage=({data:we})=>{try{const Me=Nee(we,w);if(I.emit("message",Me),Me.type==="ping"||Me.type==="pong"){I.emit(Me.type,!0,Me.payload),Me.type==="pong"?Y():a||(ve.send(Ml(Me.payload?{type:Dt.Pong,payload:Me.payload}:{type:Dt.Pong})),I.emit("pong",!1,Me.payload));return}if(ee)return;if(Me.type!==Dt.ConnectionAck)throw new Error(`First message cannot be of type ${Me.type}`);clearTimeout(L),ee=!0,I.emit("connected",ve,Me.payload,x),x=!1,U=0,ge([ve,new Promise((Ye,Zt)=>P(Zt))])}catch(Me){ve.onmessage=null,I.emit("error",Me),ve.close(sr.BadResponse,DS(Me instanceof Error?Me.message:new Error(Me).message,"Bad response"))}}})())));te.readyState===N.CLOSING&&await Ae;let fe=()=>{};const Ee=new Promise(ge=>fe=ge);return[te,fe,Promise.race([Ee.then(()=>{if(!B){const ge=()=>te.close(1e3,"Normal Closure");isFinite(s)&&s>0?Q=setTimeout(()=>{te.readyState===N.OPEN&&ge()},s):ge()}}),Ae])]}function ke(te){if(xm(te)&&(xee(te.code)||[sr.InternalServerError,sr.InternalClientError,sr.BadRequest,sr.BadResponse,sr.Unauthorized,sr.SubprotocolNotAcceptable,sr.SubscriberAlreadyExists,sr.TooManyInitialisationRequests].includes(te.code)))throw te;if(be)return!1;if(xm(te)&&te.code===1e3)return B>0;if(!u||U>=u||!h(te)||p!=null&&p(te))throw te;return x=!0}r||(async()=>{for(B++;;)try{const[,,te]=await Oe();await te}catch(te){try{if(!ke(te))return}catch(Ae){return i==null?void 0:i(Ae)}}})();function Le(te,Ae){const fe=b(te);let Ee=!1,ge=!1,ct=()=>{B--,Ee=!0};return(async()=>{for(B++;;)try{const[ve,L,Z]=await Oe();if(Ee)return L();const Y=I.onMessage(fe,ee=>{switch(ee.type){case Dt.Next:{Ae.next(ee.payload);return}case Dt.Error:{ge=!0,Ee=!0,Ae.error(ee.payload),ct();return}case Dt.Complete:{Ee=!0,ct();return}}});ve.send(Ml({id:fe,type:Dt.Subscribe,payload:te},_)),ct=()=>{!Ee&&ve.readyState===N.OPEN&&ve.send(Ml({id:fe,type:Dt.Complete},_)),B--,Ee=!0,L()},await Z.finally(Y);return}catch(ve){if(!ke(ve))return}})().then(()=>{ge||Ae.complete()}).catch(ve=>{Ae.error(ve)}),()=>{Ee||ct()}}return{on:I.on,subscribe:Le,iterate(te){const Ae=[],fe={done:!1,error:null,resolve:()=>{}},Ee=Le(te,{next(ct){Ae.push(ct),fe.resolve()},error(ct){fe.done=!0,fe.error=ct,fe.resolve()},complete(){fe.done=!0,fe.resolve()}}),ge=function(){return Aee(this,arguments,function*(){for(;;){for(Ae.length||(yield wa(new Promise(L=>fe.resolve=L)));Ae.length;)yield yield wa(Ae.shift());if(fe.error)throw fe.error;if(fe.done)return yield wa(void 0)}})}();return ge.throw=async ct=>(fe.done||(fe.done=!0,fe.error=ct,fe.resolve()),{done:!0,value:void 0}),ge.return=async()=>(Ee(),{done:!0,value:void 0}),ge},async dispose(){if(be=!0,M){const[te]=await M;te.close(1e3,"Normal Closure")}},terminate(){M&&I.emit("closed",new RS)}}}class RS extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function xm(t){return so(t)&&"code"in t&&"reason"in t}function xee(t){return[1e3,1001,1006,1005,1012,1013,1014].includes(t)?!1:t>=1e3&&t<=1999}function Cee(t){return typeof t=="function"&&"constructor"in t&&"CLOSED"in t&&"CLOSING"in t&&"CONNECTING"in t&&"OPEN"in t}const Dee=({apiUrl:t,listeners:e})=>{const n=Iee({url:`wss://${t}`,connectionParams:localStorage.getItem("token")?{authorization:`Bearer ${localStorage.getItem("token")}`}:void 0,keepAlive:1e4});return e&&(e.onConnected&&n.on("connected",e.onConnected),e.onClosed&&n.on("closed",e.onClosed),e.onError&&n.on("error",e.onError)),n},Ree=({token:t,organizationId:e,invalidationPolicies:n,handlers:r,apiBaseUrl:i})=>{const s=new Wg.InvalidationPolicyCache({invalidationPolicies:{...n,timeToLive:(n==null?void 0:n.timeToLive)??12e4,renewalPolicy:(n==null?void 0:n.renewalPolicy)??Wg.RenewalPolicy.None}});_ee({cache:s,storage:new See(window.localStorage)});const o=`api.warrior.${i??"well-played.gg"}/graphql`,a=Pv(({query:l})=>{const u=Vo(l);return u.kind==="OperationDefinition"&&u.operation==="subscription"},new pz(Dee({apiUrl:o,listeners:r==null?void 0:r.webSocket})),Mv([fz(async()=>({headers:Jg.omitBy({"organization-id":e,authorization:t?`Bearer ${t}`:void 0},Jg.isNil)})),_A(({graphQLErrors:l,networkError:u,operation:d,forward:h})=>{var p;return(p=r==null?void 0:r.onError)==null||p.call(r,{graphQLErrors:l,networkError:u}),h(d)}),new Kd({uri:`https://${o}`})]));return new Zd({cache:s,link:a,defaultOptions:{watchQuery:{fetchPolicy:"network-only",errorPolicy:"ignore"},query:{fetchPolicy:"network-only",errorPolicy:"all"},mutate:{errorPolicy:"all"}}})},hI=le.createContext({}),pI=()=>{const t=le.useContext(hI);if(!t)throw new Error("useWellPlayed must be used within a WellPlayedProvider");return t},Mee=({children:t,clientConfig:e,organizationId:n})=>{const r=uz(),i=Ree({token:(r==null?void 0:r.accessToken)??void 0,organizationId:n,...e});return he.jsx(GN,{client:i,children:he.jsx(hI.Provider,{value:{organizationId:n,apiClient:i},children:t})})},Pee=({children:t,oidcConfig:e,wpAppConfig:n,...r})=>he.jsx(oz,{...e,configuration:{...n,...e==null?void 0:e.configuration,authority:`https://oauth.warrior.${r.apiBaseUrl??"well-played.gg"}`},children:he.jsx(Mee,{...r,children:t})}),Fee=(t,e)=>{const{data:n,loading:r,refetch:i,fetchMore:s}=Uc(t,{...e,notifyOnNetworkStatusChange:!0,variables:{...e==null?void 0:e.variables,page:{first:(e==null?void 0:e.pageSize)??100}}}),o=t.definitions[0].selectionSet.selections[0].name.value;return{data:n,loading:r,loadNextPage:a=>{const l=n==null?void 0:n[o];if(l!=null&&l.pageInfo.hasNextPage)return i({...e==null?void 0:e.variables,...a,page:{first:(e==null?void 0:e.pageSize)??100,after:l.pageInfo.endCursor}})},loadNextPageWithoutAppendingOldData:a=>{const l=n==null?void 0:n[o];return s({variables:{...e==null?void 0:e.variables,...a,page:{first:(e==null?void 0:e.pageSize)??100,after:l==null?void 0:l.pageInfo.endCursor}}})}}},zb=(t,e)=>{const[n,r]=le.useState(!(e!=null&&e.skip)),[i,s]=le.useState([]),[o]=rb(t,e),a=async l=>{var g;const u=t.definitions[0].selectionSet.selections[0].name.value;r(!0);let d=!0,h=null;const p=[];for(;d;){const{data:y,error:b}=await o({variables:{...e==null?void 0:e.variables,...l,page:{first:100,after:h}}});if(b)throw b;const _=y==null?void 0:y[u];_&&(p.push(..._.nodes??[]),d=_.pageInfo.hasNextPage,h=_.pageInfo.endCursor)}return s(p),(g=e==null?void 0:e.onResults)==null||g.call(e,p),r(!1),p};return le.useEffect(()=>{e!=null&&e.skip||a()},[e==null?void 0:e.skip]),{loading:n,results:i,refetch:a}};var sf={DOCUMENT:"Document",FRAGMENT_DEFINITION:"FragmentDefinition"};class $ee extends Error{constructor(e,n,r,i,s,o,a){super(e),this.name="GraphQLError",this.message=e,s&&(this.path=s),n&&(this.nodes=Array.isArray(n)?n:[n]),r&&(this.source=r),i&&(this.positions=i),o&&(this.originalError=o);var l=a;if(!l&&o){var u=o.extensions;u&&typeof u=="object"&&(l=u)}this.extensions=l||{}}toJSON(){return{...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return"GraphQLError"}}var rt,me;function Rt(t){return new $ee(`Syntax Error: Unexpected token at ${me} in ${t}`)}function lr(t){if(t.lastIndex=me,t.test(rt))return rt.slice(me,me=t.lastIndex)}var of=/ +(?=[^\s])/y;function Lee(t){for(var e=t.split(`
252
+ }`;var Ve=BE(function(){return it(S,de+"return "+K).apply(n,A)});if(Ve.source=K,$p(Ve))throw Ve;return Ve}function G$(c){return st(c).toLowerCase()}function H$(c){return st(c).toUpperCase()}function K$(c,f,m){if(c=st(c),c&&(m||f===n))return J0(c);if(!c||!(f=tr(f)))return c;var v=Br(c),E=Br(f),S=Y0(v,E),A=X0(v,E)+1;return is(v,S,A).join("")}function J$(c,f,m){if(c=st(c),c&&(m||f===n))return c.slice(0,e_(c)+1);if(!c||!(f=tr(f)))return c;var v=Br(c),E=X0(v,Br(f))+1;return is(v,0,E).join("")}function Y$(c,f,m){if(c=st(c),c&&(m||f===n))return c.replace($h,"");if(!c||!(f=tr(f)))return c;var v=Br(c),E=Y0(v,Br(f));return is(v,E).join("")}function X$(c,f){var m=U,v=be;if(wt(f)){var E="separator"in f?f.separator:E;m="length"in f?Fe(f.length):m,v="omission"in f?tr(f.omission):v}c=st(c);var S=c.length;if(Ho(c)){var A=Br(c);S=A.length}if(m>=S)return c;var D=m-Ko(v);if(D<1)return v;var $=A?is(A,0,D).join(""):c.slice(0,D);if(E===n)return $+v;if(A&&(D+=$.length-D),Lp(E)){if(c.slice(D).search(E)){var G,H=$;for(E.global||(E=ep(E.source,st(v0.exec(E))+"g")),E.lastIndex=0;G=E.exec(H);)var K=G.index;$=$.slice(0,K===n?D:K)}}else if(c.indexOf(tr(E),D)!=D){var ne=$.lastIndexOf(E);ne>-1&&($=$.slice(0,ne))}return $+v}function Z$(c){return c=st(c),c&&uC.test(c)?c.replace(m0,AD):c}var eL=na(function(c,f,m){return c+(m?" ":"")+f.toUpperCase()}),Bp=U_("toUpperCase");function jE(c,f,m){return c=st(c),f=m?n:f,f===n?TD(c)?CD(c):pD(c):c.match(f)||[]}var BE=Ue(function(c,f){try{return Zn(c,n,f)}catch(m){return $p(m)?m:new Ce(m)}}),tL=Oi(function(c,f){return gr(f,function(m){m=ri(m),Ti(c,m,Pp(c[m],c))}),c});function nL(c){var f=c==null?0:c.length,m=_e();return c=f?Et(c,function(v){if(typeof v[1]!="function")throw new yr(o);return[m(v[0]),v[1]]}):[],Ue(function(v){for(var E=-1;++E<f;){var S=c[E];if(Zn(S[0],this,v))return Zn(S[1],this,v)}})}function rL(c){return AR(br(c,h))}function Up(c){return function(){return c}}function iL(c,f){return c==null||c!==c?f:c}var sL=W_(),oL=W_(!0);function Bn(c){return c}function qp(c){return __(typeof c=="function"?c:br(c,h))}function aL(c){return w_(br(c,h))}function lL(c,f){return T_(c,br(f,h))}var cL=Ue(function(c,f){return function(m){return ml(m,c,f)}}),uL=Ue(function(c,f){return function(m){return ml(c,m,f)}});function Wp(c,f,m){var v=Gt(f),E=Su(f,v);m==null&&!(wt(f)&&(E.length||!v.length))&&(m=f,f=c,c=this,E=Su(f,Gt(f)));var S=!(wt(m)&&"chain"in m)||!!m.chain,A=Ni(c);return gr(E,function(D){var $=f[D];c[D]=$,A&&(c.prototype[D]=function(){var G=this.__chain__;if(S||G){var H=c(this.__wrapped__),K=H.__actions__=Ln(this.__actions__);return K.push({func:$,args:arguments,thisArg:c}),H.__chain__=G,H}return $.apply(c,Xi([this.value()],arguments))})}),c}function fL(){return en._===this&&(en._=$D),this}function zp(){}function dL(c){return c=Fe(c),Ue(function(f){return S_(f,c)})}var hL=wp(Et),pL=wp(z0),mL=wp(Gh);function UE(c){return Ip(c)?Hh(ri(c)):zR(c)}function gL(c){return function(f){return c==null?n:Xs(c,f)}}var yL=Q_(),vL=Q_(!0);function Qp(){return[]}function Gp(){return!1}function bL(){return{}}function _L(){return""}function EL(){return!0}function wL(c,f){if(c=Fe(c),c<1||c>Ee)return[];var m=ve,v=fn(c,ve);f=_e(f),c-=ve;for(var E=Yh(v,f);++m<c;)f(m);return E}function TL(c){return De(c)?Et(c,ri):nr(c)?[c]:Ln(lE(st(c)))}function SL(c){var f=++PD;return st(c)+f}var OL=xu(function(c,f){return c+f},0),kL=Tp("ceil"),NL=xu(function(c,f){return c/f},1),AL=Tp("floor");function IL(c){return c&&c.length?Tu(c,Bn,lp):n}function xL(c,f){return c&&c.length?Tu(c,_e(f,2),lp):n}function CL(c){return H0(c,Bn)}function DL(c,f){return H0(c,_e(f,2))}function RL(c){return c&&c.length?Tu(c,Bn,dp):n}function ML(c,f){return c&&c.length?Tu(c,_e(f,2),dp):n}var PL=xu(function(c,f){return c*f},1),FL=Tp("round"),$L=xu(function(c,f){return c-f},0);function LL(c){return c&&c.length?Jh(c,Bn):0}function VL(c,f){return c&&c.length?Jh(c,_e(f,2)):0}return T.after=aF,T.ary=bE,T.assign=HF,T.assignIn=RE,T.assignInWith=qu,T.assignWith=KF,T.at=JF,T.before=_E,T.bind=Pp,T.bindAll=tL,T.bindKey=EE,T.castArray=bF,T.chain=gE,T.chunk=AM,T.compact=IM,T.concat=xM,T.cond=nL,T.conforms=rL,T.constant=Up,T.countBy=LP,T.create=YF,T.curry=wE,T.curryRight=TE,T.debounce=SE,T.defaults=XF,T.defaultsDeep=ZF,T.defer=lF,T.delay=cF,T.difference=CM,T.differenceBy=DM,T.differenceWith=RM,T.drop=MM,T.dropRight=PM,T.dropRightWhile=FM,T.dropWhile=$M,T.fill=LM,T.filter=jP,T.flatMap=qP,T.flatMapDeep=WP,T.flatMapDepth=zP,T.flatten=dE,T.flattenDeep=VM,T.flattenDepth=jM,T.flip=uF,T.flow=sL,T.flowRight=oL,T.fromPairs=BM,T.functions=o$,T.functionsIn=a$,T.groupBy=QP,T.initial=qM,T.intersection=WM,T.intersectionBy=zM,T.intersectionWith=QM,T.invert=c$,T.invertBy=u$,T.invokeMap=HP,T.iteratee=qp,T.keyBy=KP,T.keys=Gt,T.keysIn=jn,T.map=$u,T.mapKeys=d$,T.mapValues=h$,T.matches=aL,T.matchesProperty=lL,T.memoize=Vu,T.merge=p$,T.mergeWith=ME,T.method=cL,T.methodOf=uL,T.mixin=Wp,T.negate=ju,T.nthArg=dL,T.omit=m$,T.omitBy=g$,T.once=fF,T.orderBy=JP,T.over=hL,T.overArgs=dF,T.overEvery=pL,T.overSome=mL,T.partial=Fp,T.partialRight=OE,T.partition=YP,T.pick=y$,T.pickBy=PE,T.property=UE,T.propertyOf=gL,T.pull=JM,T.pullAll=pE,T.pullAllBy=YM,T.pullAllWith=XM,T.pullAt=ZM,T.range=yL,T.rangeRight=vL,T.rearg=hF,T.reject=eF,T.remove=eP,T.rest=pF,T.reverse=Rp,T.sampleSize=nF,T.set=b$,T.setWith=_$,T.shuffle=rF,T.slice=tP,T.sortBy=oF,T.sortedUniq=lP,T.sortedUniqBy=cP,T.split=q$,T.spread=mF,T.tail=uP,T.take=fP,T.takeRight=dP,T.takeRightWhile=hP,T.takeWhile=pP,T.tap=IP,T.throttle=gF,T.thru=Fu,T.toArray=xE,T.toPairs=FE,T.toPairsIn=$E,T.toPath=TL,T.toPlainObject=DE,T.transform=E$,T.unary=yF,T.union=mP,T.unionBy=gP,T.unionWith=yP,T.uniq=vP,T.uniqBy=bP,T.uniqWith=_P,T.unset=w$,T.unzip=Mp,T.unzipWith=mE,T.update=T$,T.updateWith=S$,T.values=sa,T.valuesIn=O$,T.without=EP,T.words=jE,T.wrap=vF,T.xor=wP,T.xorBy=TP,T.xorWith=SP,T.zip=OP,T.zipObject=kP,T.zipObjectDeep=NP,T.zipWith=AP,T.entries=FE,T.entriesIn=$E,T.extend=RE,T.extendWith=qu,Wp(T,T),T.add=OL,T.attempt=BE,T.camelCase=I$,T.capitalize=LE,T.ceil=kL,T.clamp=k$,T.clone=_F,T.cloneDeep=wF,T.cloneDeepWith=TF,T.cloneWith=EF,T.conformsTo=SF,T.deburr=VE,T.defaultTo=iL,T.divide=NL,T.endsWith=x$,T.eq=qr,T.escape=C$,T.escapeRegExp=D$,T.every=VP,T.find=BP,T.findIndex=uE,T.findKey=e$,T.findLast=UP,T.findLastIndex=fE,T.findLastKey=t$,T.floor=AL,T.forEach=yE,T.forEachRight=vE,T.forIn=n$,T.forInRight=r$,T.forOwn=i$,T.forOwnRight=s$,T.get=Vp,T.gt=OF,T.gte=kF,T.has=l$,T.hasIn=jp,T.head=hE,T.identity=Bn,T.includes=GP,T.indexOf=UM,T.inRange=N$,T.invoke=f$,T.isArguments=to,T.isArray=De,T.isArrayBuffer=NF,T.isArrayLike=Vn,T.isArrayLikeObject=xt,T.isBoolean=AF,T.isBuffer=ss,T.isDate=IF,T.isElement=xF,T.isEmpty=CF,T.isEqual=DF,T.isEqualWith=RF,T.isError=$p,T.isFinite=MF,T.isFunction=Ni,T.isInteger=kE,T.isLength=Bu,T.isMap=NE,T.isMatch=PF,T.isMatchWith=FF,T.isNaN=$F,T.isNative=LF,T.isNil=jF,T.isNull=VF,T.isNumber=AE,T.isObject=wt,T.isObjectLike=kt,T.isPlainObject=El,T.isRegExp=Lp,T.isSafeInteger=BF,T.isSet=IE,T.isString=Uu,T.isSymbol=nr,T.isTypedArray=ia,T.isUndefined=UF,T.isWeakMap=qF,T.isWeakSet=WF,T.join=GM,T.kebabCase=R$,T.last=Er,T.lastIndexOf=HM,T.lowerCase=M$,T.lowerFirst=P$,T.lt=zF,T.lte=QF,T.max=IL,T.maxBy=xL,T.mean=CL,T.meanBy=DL,T.min=RL,T.minBy=ML,T.stubArray=Qp,T.stubFalse=Gp,T.stubObject=bL,T.stubString=_L,T.stubTrue=EL,T.multiply=PL,T.nth=KM,T.noConflict=fL,T.noop=zp,T.now=Lu,T.pad=F$,T.padEnd=$$,T.padStart=L$,T.parseInt=V$,T.random=A$,T.reduce=XP,T.reduceRight=ZP,T.repeat=j$,T.replace=B$,T.result=v$,T.round=FL,T.runInContext=F,T.sample=tF,T.size=iF,T.snakeCase=U$,T.some=sF,T.sortedIndex=nP,T.sortedIndexBy=rP,T.sortedIndexOf=iP,T.sortedLastIndex=sP,T.sortedLastIndexBy=oP,T.sortedLastIndexOf=aP,T.startCase=W$,T.startsWith=z$,T.subtract=$L,T.sum=LL,T.sumBy=VL,T.template=Q$,T.times=wL,T.toFinite=Ai,T.toInteger=Fe,T.toLength=CE,T.toLower=G$,T.toNumber=wr,T.toSafeInteger=GF,T.toString=st,T.toUpper=H$,T.trim=K$,T.trimEnd=J$,T.trimStart=Y$,T.truncate=X$,T.unescape=Z$,T.uniqueId=SL,T.upperCase=eL,T.upperFirst=Bp,T.each=yE,T.eachRight=vE,T.first=hE,Wp(T,function(){var c={};return ti(T,function(f,m){at.call(T.prototype,m)||(c[m]=f)}),c}(),{chain:!1}),T.VERSION=r,gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){T[c].placeholder=T}),gr(["drop","take"],function(c,f){He.prototype[c]=function(m){m=m===n?1:Bt(Fe(m),0);var v=this.__filtered__&&!f?new He(this):this.clone();return v.__filtered__?v.__takeCount__=fn(m,v.__takeCount__):v.__views__.push({size:fn(m,ve),type:c+(v.__dir__<0?"Right":"")}),v},He.prototype[c+"Right"]=function(m){return this.reverse()[c](m).reverse()}}),gr(["filter","map","takeWhile"],function(c,f){var m=f+1,v=m==Le||m==Ae;He.prototype[c]=function(E){var S=this.clone();return S.__iteratees__.push({iteratee:_e(E,3),type:m}),S.__filtered__=S.__filtered__||v,S}}),gr(["head","last"],function(c,f){var m="take"+(f?"Right":"");He.prototype[c]=function(){return this[m](1).value()[0]}}),gr(["initial","tail"],function(c,f){var m="drop"+(f?"":"Right");He.prototype[c]=function(){return this.__filtered__?new He(this):this[m](1)}}),He.prototype.compact=function(){return this.filter(Bn)},He.prototype.find=function(c){return this.filter(c).head()},He.prototype.findLast=function(c){return this.reverse().find(c)},He.prototype.invokeMap=Ue(function(c,f){return typeof c=="function"?new He(this):this.map(function(m){return ml(m,c,f)})}),He.prototype.reject=function(c){return this.filter(ju(_e(c)))},He.prototype.slice=function(c,f){c=Fe(c);var m=this;return m.__filtered__&&(c>0||f<0)?new He(m):(c<0?m=m.takeRight(-c):c&&(m=m.drop(c)),f!==n&&(f=Fe(f),m=f<0?m.dropRight(-f):m.take(f-c)),m)},He.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},He.prototype.toArray=function(){return this.take(ve)},ti(He.prototype,function(c,f){var m=/^(?:filter|find|map|reject)|While$/.test(f),v=/^(?:head|last)$/.test(f),E=T[v?"take"+(f=="last"?"Right":""):f],S=v||/^find/.test(f);E&&(T.prototype[f]=function(){var A=this.__wrapped__,D=v?[1]:arguments,$=A instanceof He,G=D[0],H=$||De(A),K=function(Qe){var Je=E.apply(T,Xi([Qe],D));return v&&ne?Je[0]:Je};H&&m&&typeof G=="function"&&G.length!=1&&($=H=!1);var ne=this.__chain__,de=!!this.__actions__.length,Te=S&&!ne,Ve=$&&!de;if(!S&&H){A=Ve?A:new He(this);var Se=c.apply(A,D);return Se.__actions__.push({func:Fu,args:[K],thisArg:n}),new vr(Se,ne)}return Te&&Ve?c.apply(this,D):(Se=this.thru(K),Te?v?Se.value()[0]:Se.value():Se)})}),gr(["pop","push","shift","sort","splice","unshift"],function(c){var f=lu[c],m=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",v=/^(?:pop|shift)$/.test(c);T.prototype[c]=function(){var E=arguments;if(v&&!this.__chain__){var S=this.value();return f.apply(De(S)?S:[],E)}return this[m](function(A){return f.apply(De(A)?A:[],E)})}}),ti(He.prototype,function(c,f){var m=T[f];if(m){var v=m.name+"";at.call(Zo,v)||(Zo[v]=[]),Zo[v].push({name:f,func:m})}}),Zo[Iu(n,w).name]=[{name:"wrapper",func:n}],He.prototype.clone=ZD,He.prototype.reverse=eR,He.prototype.value=tR,T.prototype.at=xP,T.prototype.chain=CP,T.prototype.commit=DP,T.prototype.next=RP,T.prototype.plant=PP,T.prototype.reverse=FP,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=$P,T.prototype.first=T.prototype.head,ll&&(T.prototype[ll]=MP),T},Jo=DD();Gs?((Gs.exports=Jo)._=Jo,qh._=Jo):en._=Jo}).call(Re)})(od,od.exports);var Jg=od.exports;function qn(t){return t===null?"null":Array.isArray(t)?"array":typeof t}function so(t){return qn(t)==="object"}function Oee(t){return Array.isArray(t)&&t.length>0&&t.every(e=>"message"in e)}function DS(t,e){return t.length<124?t:e}const kee="graphql-transport-ws";var sr;(function(t){t[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(sr||(sr={}));var Dt;(function(t){t.ConnectionInit="connection_init",t.ConnectionAck="connection_ack",t.Ping="ping",t.Pong="pong",t.Subscribe="subscribe",t.Next="next",t.Error="error",t.Complete="complete"})(Dt||(Dt={}));function dI(t){if(!so(t))throw new Error(`Message is expected to be an object, but got ${qn(t)}`);if(!t.type)throw new Error("Message is missing the 'type' property");if(typeof t.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${qn(t.type)}`);switch(t.type){case Dt.ConnectionInit:case Dt.ConnectionAck:case Dt.Ping:case Dt.Pong:{if(t.payload!=null&&!so(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${t.payload}"`);break}case Dt.Subscribe:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${qn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);if(!so(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object, but got ${qn(t.payload)}`);if(typeof t.payload.query!="string")throw new Error(`"${t.type}" message payload expects the 'query' property to be a string, but got ${qn(t.payload.query)}`);if(t.payload.variables!=null&&!so(t.payload.variables))throw new Error(`"${t.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${qn(t.payload.variables)}`);if(t.payload.operationName!=null&&qn(t.payload.operationName)!=="string")throw new Error(`"${t.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${qn(t.payload.operationName)}`);if(t.payload.extensions!=null&&!so(t.payload.extensions))throw new Error(`"${t.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${qn(t.payload.extensions)}`);break}case Dt.Next:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${qn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);if(!so(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object, but got ${qn(t.payload)}`);break}case Dt.Error:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${qn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);if(!Oee(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(t.payload)}`);break}case Dt.Complete:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${qn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${t.type}"`)}return t}function Nee(t,e){return dI(typeof t=="string"?JSON.parse(t,e):t)}function Ml(t,e){return dI(t),JSON.stringify(t,e)}var wa=function(t){return this instanceof wa?(this.v=t,this):new wa(t)},Aee=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(p){r[p]&&(i[p]=function(g){return new Promise(function(y,b){s.push([p,g,y,b])>1||a(p,g)})})}function a(p,g){try{l(r[p](g))}catch(y){h(s[0][3],y)}}function l(p){p.value instanceof wa?Promise.resolve(p.value.v).then(u,d):h(s[0][2],p)}function u(p){a("next",p)}function d(p){a("throw",p)}function h(p,g){p(g),s.shift(),s.length&&a(s[0][0],s[0][1])}};function Iee(t){const{url:e,connectionParams:n,lazy:r=!0,onNonLazyError:i=console.error,lazyCloseTimeout:s=0,keepAlive:o=0,disablePong:a,connectionAckWaitTimeout:l=0,retryAttempts:u=5,retryWait:d=async function(Ae){let fe=1e3;for(let Ee=0;Ee<Ae;Ee++)fe*=2;await new Promise(Ee=>setTimeout(Ee,fe+Math.floor(Math.random()*2700+300)))},shouldRetry:h=xm,isFatalConnectionProblem:p,on:g,webSocketImpl:y,generateID:b=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,Ae=>{const fe=Math.random()*16|0;return(Ae=="x"?fe:fe&3|8).toString(16)})},jsonMessageReplacer:_,jsonMessageReviver:w}=t;let O;if(y){if(!Cee(y))throw new Error("Invalid WebSocket implementation provided");O=y}else typeof WebSocket<"u"?O=WebSocket:typeof global<"u"?O=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(O=window.WebSocket||window.MozWebSocket);if(!O)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const N=O,I=(()=>{const te=(()=>{const fe={};return{on(Ee,ge){return fe[Ee]=ge,()=>{delete fe[Ee]}},emit(Ee){var ge;"id"in Ee&&((ge=fe[Ee.id])===null||ge===void 0||ge.call(fe,Ee))}}})(),Ae={connecting:g!=null&&g.connecting?[g.connecting]:[],opened:g!=null&&g.opened?[g.opened]:[],connected:g!=null&&g.connected?[g.connected]:[],ping:g!=null&&g.ping?[g.ping]:[],pong:g!=null&&g.pong?[g.pong]:[],message:g!=null&&g.message?[te.emit,g.message]:[te.emit],closed:g!=null&&g.closed?[g.closed]:[],error:g!=null&&g.error?[g.error]:[]};return{onMessage:te.on,on(fe,Ee){const ge=Ae[fe];return ge.push(Ee),()=>{ge.splice(ge.indexOf(Ee),1)}},emit(fe,...Ee){for(const ge of[...Ae[fe]])ge(...Ee)}}})();function P(te){const Ae=[I.on("error",fe=>{Ae.forEach(Ee=>Ee()),te(fe)}),I.on("closed",fe=>{Ae.forEach(Ee=>Ee()),te(fe)})]}let M,B=0,Q,x=!1,U=0,be=!1;async function Oe(){clearTimeout(Q);const[te,Ae]=await(M??(M=new Promise((ge,ct)=>(async()=>{if(x){if(await d(U),!B)return M=void 0,ct({code:1e3,reason:"All Subscriptions Gone"});U++}I.emit("connecting",x);const ve=new N(typeof e=="function"?await e():e,kee);let L,Z;function Y(){isFinite(o)&&o>0&&(clearTimeout(Z),Z=setTimeout(()=>{ve.readyState===N.OPEN&&(ve.send(Ml({type:Dt.Ping})),I.emit("ping",!1,void 0))},o))}P(we=>{M=void 0,clearTimeout(L),clearTimeout(Z),ct(we),we instanceof RS&&(ve.close(4499,"Terminated"),ve.onerror=null,ve.onclose=null)}),ve.onerror=we=>I.emit("error",we),ve.onclose=we=>I.emit("closed",we),ve.onopen=async()=>{try{I.emit("opened",ve);const we=typeof n=="function"?await n():n;if(ve.readyState!==N.OPEN)return;ve.send(Ml(we?{type:Dt.ConnectionInit,payload:we}:{type:Dt.ConnectionInit},_)),isFinite(l)&&l>0&&(L=setTimeout(()=>{ve.close(sr.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},l)),Y()}catch(we){I.emit("error",we),ve.close(sr.InternalClientError,DS(we instanceof Error?we.message:new Error(we).message,"Internal client error"))}};let ee=!1;ve.onmessage=({data:we})=>{try{const Me=Nee(we,w);if(I.emit("message",Me),Me.type==="ping"||Me.type==="pong"){I.emit(Me.type,!0,Me.payload),Me.type==="pong"?Y():a||(ve.send(Ml(Me.payload?{type:Dt.Pong,payload:Me.payload}:{type:Dt.Pong})),I.emit("pong",!1,Me.payload));return}if(ee)return;if(Me.type!==Dt.ConnectionAck)throw new Error(`First message cannot be of type ${Me.type}`);clearTimeout(L),ee=!0,I.emit("connected",ve,Me.payload,x),x=!1,U=0,ge([ve,new Promise((Ye,Zt)=>P(Zt))])}catch(Me){ve.onmessage=null,I.emit("error",Me),ve.close(sr.BadResponse,DS(Me instanceof Error?Me.message:new Error(Me).message,"Bad response"))}}})())));te.readyState===N.CLOSING&&await Ae;let fe=()=>{};const Ee=new Promise(ge=>fe=ge);return[te,fe,Promise.race([Ee.then(()=>{if(!B){const ge=()=>te.close(1e3,"Normal Closure");isFinite(s)&&s>0?Q=setTimeout(()=>{te.readyState===N.OPEN&&ge()},s):ge()}}),Ae])]}function ke(te){if(xm(te)&&(xee(te.code)||[sr.InternalServerError,sr.InternalClientError,sr.BadRequest,sr.BadResponse,sr.Unauthorized,sr.SubprotocolNotAcceptable,sr.SubscriberAlreadyExists,sr.TooManyInitialisationRequests].includes(te.code)))throw te;if(be)return!1;if(xm(te)&&te.code===1e3)return B>0;if(!u||U>=u||!h(te)||p!=null&&p(te))throw te;return x=!0}r||(async()=>{for(B++;;)try{const[,,te]=await Oe();await te}catch(te){try{if(!ke(te))return}catch(Ae){return i==null?void 0:i(Ae)}}})();function Le(te,Ae){const fe=b(te);let Ee=!1,ge=!1,ct=()=>{B--,Ee=!0};return(async()=>{for(B++;;)try{const[ve,L,Z]=await Oe();if(Ee)return L();const Y=I.onMessage(fe,ee=>{switch(ee.type){case Dt.Next:{Ae.next(ee.payload);return}case Dt.Error:{ge=!0,Ee=!0,Ae.error(ee.payload),ct();return}case Dt.Complete:{Ee=!0,ct();return}}});ve.send(Ml({id:fe,type:Dt.Subscribe,payload:te},_)),ct=()=>{!Ee&&ve.readyState===N.OPEN&&ve.send(Ml({id:fe,type:Dt.Complete},_)),B--,Ee=!0,L()},await Z.finally(Y);return}catch(ve){if(!ke(ve))return}})().then(()=>{ge||Ae.complete()}).catch(ve=>{Ae.error(ve)}),()=>{Ee||ct()}}return{on:I.on,subscribe:Le,iterate(te){const Ae=[],fe={done:!1,error:null,resolve:()=>{}},Ee=Le(te,{next(ct){Ae.push(ct),fe.resolve()},error(ct){fe.done=!0,fe.error=ct,fe.resolve()},complete(){fe.done=!0,fe.resolve()}}),ge=function(){return Aee(this,arguments,function*(){for(;;){for(Ae.length||(yield wa(new Promise(L=>fe.resolve=L)));Ae.length;)yield yield wa(Ae.shift());if(fe.error)throw fe.error;if(fe.done)return yield wa(void 0)}})}();return ge.throw=async ct=>(fe.done||(fe.done=!0,fe.error=ct,fe.resolve()),{done:!0,value:void 0}),ge.return=async()=>(Ee(),{done:!0,value:void 0}),ge},async dispose(){if(be=!0,M){const[te]=await M;te.close(1e3,"Normal Closure")}},terminate(){M&&I.emit("closed",new RS)}}}class RS extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function xm(t){return so(t)&&"code"in t&&"reason"in t}function xee(t){return[1e3,1001,1006,1005,1012,1013,1014].includes(t)?!1:t>=1e3&&t<=1999}function Cee(t){return typeof t=="function"&&"constructor"in t&&"CLOSED"in t&&"CLOSING"in t&&"CONNECTING"in t&&"OPEN"in t}const Dee=({apiUrl:t,listeners:e})=>{const n=Iee({url:`wss://${t}`,connectionParams:localStorage.getItem("token")?{authorization:`Bearer ${localStorage.getItem("token")}`}:void 0,keepAlive:1e4});return e&&(e.onConnected&&n.on("connected",e.onConnected),e.onClosed&&n.on("closed",e.onClosed),e.onError&&n.on("error",e.onError)),n},Ree=({token:t,organizationId:e,invalidationPolicies:n,handlers:r,apiBaseUrl:i})=>{const s=new Wg.InvalidationPolicyCache({invalidationPolicies:{...n,timeToLive:(n==null?void 0:n.timeToLive)??12e4,renewalPolicy:(n==null?void 0:n.renewalPolicy)??Wg.RenewalPolicy.None}});_ee({cache:s,storage:new See(window.localStorage)});const o=`api.warrior.${i??"well-played.gg"}/graphql`,a=Pv(({query:l})=>{const u=Vo(l);return u.kind==="OperationDefinition"&&u.operation==="subscription"},new pz(Dee({apiUrl:o,listeners:r==null?void 0:r.webSocket})),Mv([fz(async()=>({headers:Jg.omitBy({"organization-id":e,authorization:t?`Bearer ${t}`:void 0},Jg.isNil)})),...r!=null&&r.onError?[_A(r==null?void 0:r.onError)]:[],new Kd({uri:`https://${o}`})]));return new Zd({cache:s,link:a,defaultOptions:{watchQuery:{fetchPolicy:"network-only",errorPolicy:"ignore"},query:{fetchPolicy:"network-only",errorPolicy:"all"},mutate:{errorPolicy:"all"}}})},hI=le.createContext({}),pI=()=>{const t=le.useContext(hI);if(!t)throw new Error("useWellPlayed must be used within a WellPlayedProvider");return t},Mee=({children:t,clientConfig:e,organizationId:n})=>{const r=uz(),i=Ree({token:(r==null?void 0:r.accessToken)??void 0,organizationId:n,...e});return he.jsx(GN,{client:i,children:he.jsx(hI.Provider,{value:{organizationId:n,apiClient:i},children:t})})},Pee=({children:t,oidcConfig:e,wpAppConfig:n,...r})=>he.jsx(oz,{...e,configuration:{...n,...e==null?void 0:e.configuration,authority:`https://oauth.warrior.${r.apiBaseUrl??"well-played.gg"}`},children:he.jsx(Mee,{...r,children:t})}),Fee=(t,e)=>{const{data:n,loading:r,refetch:i,fetchMore:s}=Uc(t,{...e,notifyOnNetworkStatusChange:!0,variables:{...e==null?void 0:e.variables,page:{first:(e==null?void 0:e.pageSize)??100}}}),o=t.definitions[0].selectionSet.selections[0].name.value;return{data:n,loading:r,loadNextPage:a=>{const l=n==null?void 0:n[o];if(l!=null&&l.pageInfo.hasNextPage)return i({...e==null?void 0:e.variables,...a,page:{first:(e==null?void 0:e.pageSize)??100,after:l.pageInfo.endCursor}})},loadNextPageWithoutAppendingOldData:a=>{const l=n==null?void 0:n[o];return s({variables:{...e==null?void 0:e.variables,...a,page:{first:(e==null?void 0:e.pageSize)??100,after:l==null?void 0:l.pageInfo.endCursor}}})}}},zb=(t,e)=>{const[n,r]=le.useState(!(e!=null&&e.skip)),[i,s]=le.useState([]),[o]=rb(t,e),a=async l=>{var g;const u=t.definitions[0].selectionSet.selections[0].name.value;r(!0);let d=!0,h=null;const p=[];for(;d;){const{data:y,error:b}=await o({variables:{...e==null?void 0:e.variables,...l,page:{first:100,after:h}}});if(b)throw b;const _=y==null?void 0:y[u];_&&(p.push(..._.nodes??[]),d=_.pageInfo.hasNextPage,h=_.pageInfo.endCursor)}return s(p),(g=e==null?void 0:e.onResults)==null||g.call(e,p),r(!1),p};return le.useEffect(()=>{e!=null&&e.skip||a()},[e==null?void 0:e.skip]),{loading:n,results:i,refetch:a}};var sf={DOCUMENT:"Document",FRAGMENT_DEFINITION:"FragmentDefinition"};class $ee extends Error{constructor(e,n,r,i,s,o,a){super(e),this.name="GraphQLError",this.message=e,s&&(this.path=s),n&&(this.nodes=Array.isArray(n)?n:[n]),r&&(this.source=r),i&&(this.positions=i),o&&(this.originalError=o);var l=a;if(!l&&o){var u=o.extensions;u&&typeof u=="object"&&(l=u)}this.extensions=l||{}}toJSON(){return{...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return"GraphQLError"}}var rt,me;function Rt(t){return new $ee(`Syntax Error: Unexpected token at ${me} in ${t}`)}function lr(t){if(t.lastIndex=me,t.test(rt))return rt.slice(me,me=t.lastIndex)}var of=/ +(?=[^\s])/y;function Lee(t){for(var e=t.split(`
253
253
  `),n="",r=0,i=0,s=e.length-1,o=0;o<e.length;o++)of.lastIndex=0,of.test(e[o])&&(o&&(!r||of.lastIndex<r)&&(r=of.lastIndex),i=i||o,s=o);for(var a=i;a<=s;a++)a!==i&&(n+=`
254
254
  `),n+=e[a].slice(r).replace(/\\"""/g,'"""');return n}function Pe(){for(var t=0|rt.charCodeAt(me++);t===9||t===10||t===13||t===32||t===35||t===44||t===65279;t=0|rt.charCodeAt(me++))if(t===35)for(;(t=rt.charCodeAt(me++))!==10&&t!==13;);me--}var Cn=/[_A-Za-z]\w*/y,Cm=new RegExp("(?:(null|true|false)|\\$("+Cn.source+')|(-?\\d+)((?:\\.\\d+)?[eE][+-]?\\d+|\\.\\d+)?|("""(?:"""|(?:[\\s\\S]*?[^\\\\])"""))|("(?:"|[^\\r\\n]*?[^\\\\]"))|('+Cn.source+"))","y"),fs=function(t){return t[t.Const=1]="Const",t[t.Var=2]="Var",t[t.Int=3]="Int",t[t.Float=4]="Float",t[t.BlockString=5]="BlockString",t[t.String=6]="String",t[t.Enum=7]="Enum",t}(fs||{}),Vee=/\\/;function ad(t){var e,n;if(Cm.lastIndex=me,rt.charCodeAt(me)===91){me++,Pe();for(var r=[];rt.charCodeAt(me)!==93;)r.push(ad(t));return me++,Pe(),{kind:"ListValue",values:r}}else if(rt.charCodeAt(me)===123){me++,Pe();for(var i=[];rt.charCodeAt(me)!==125;){if((e=lr(Cn))==null||(Pe(),rt.charCodeAt(me++)!==58))throw Rt("ObjectField");Pe(),i.push({kind:"ObjectField",name:{kind:"Name",value:e},value:ad(t)})}return me++,Pe(),{kind:"ObjectValue",fields:i}}else if((n=Cm.exec(rt))!=null){if(me=Cm.lastIndex,Pe(),(e=n[fs.Const])!=null)return e==="null"?{kind:"NullValue"}:{kind:"BooleanValue",value:e==="true"};if((e=n[fs.Var])!=null){if(t)throw Rt("Variable");return{kind:"Variable",name:{kind:"Name",value:e}}}else if((e=n[fs.Int])!=null){var s;return(s=n[fs.Float])!=null?{kind:"FloatValue",value:e+s}:{kind:"IntValue",value:e}}else{if((e=n[fs.BlockString])!=null)return{kind:"StringValue",value:Lee(e.slice(3,-3)),block:!0};if((e=n[fs.String])!=null)return{kind:"StringValue",value:Vee.test(e)?JSON.parse(e):e.slice(1,-1),block:!1};if((e=n[fs.Enum])!=null)return{kind:"EnumValue",value:e}}}throw Rt("Value")}function mI(t){if(rt.charCodeAt(me)===40){var e=[];me++,Pe();var n;do{if((n=lr(Cn))==null||(Pe(),rt.charCodeAt(me++)!==58))throw Rt("Argument");Pe(),e.push({kind:"Argument",name:{kind:"Name",value:n},value:ad(t)})}while(rt.charCodeAt(me)!==41);return me++,Pe(),e}}function Ta(t){if(rt.charCodeAt(me)===64){var e=[],n;do{if(me++,(n=lr(Cn))==null)throw Rt("Directive");Pe(),e.push({kind:"Directive",name:{kind:"Name",value:n},arguments:mI(t)})}while(rt.charCodeAt(me)===64);return e}}function jee(){for(var t,e=0;rt.charCodeAt(me)===91;)e++,me++,Pe();if((t=lr(Cn))==null)throw Rt("NamedType");Pe();var n={kind:"NamedType",name:{kind:"Name",value:t}};do if(rt.charCodeAt(me)===33&&(me++,Pe(),n={kind:"NonNullType",type:n}),e){if(rt.charCodeAt(me++)!==93)throw Rt("NamedType");Pe(),n={kind:"ListType",type:n}}while(e--);return n}var Dm=new RegExp("(?:(\\.{3})|("+Cn.source+"))","y"),Yg=function(t){return t[t.Spread=1]="Spread",t[t.Name=2]="Name",t}(Yg||{});function ld(){var t=[],e,n;do if(Dm.lastIndex=me,(n=Dm.exec(rt))!=null){if(me=Dm.lastIndex,n[Yg.Spread]!=null){Pe();var r=lr(Cn);if(r!=null&&r!=="on")Pe(),t.push({kind:"FragmentSpread",name:{kind:"Name",value:r},directives:Ta(!1)});else{if(Pe(),r==="on"){if((r=lr(Cn))==null)throw Rt("NamedType");Pe()}var i=Ta(!1);if(rt.charCodeAt(me++)!==123)throw Rt("InlineFragment");Pe(),t.push({kind:"InlineFragment",typeCondition:r?{kind:"NamedType",name:{kind:"Name",value:r}}:void 0,directives:i,selectionSet:ld()})}}else if((e=n[Yg.Name])!=null){var s=void 0;if(Pe(),rt.charCodeAt(me)===58){if(me++,Pe(),s=e,(e=lr(Cn))==null)throw Rt("Field");Pe()}var o=mI(!1);Pe();var a=Ta(!1),l=void 0;rt.charCodeAt(me)===123&&(me++,Pe(),l=ld()),t.push({kind:"Field",alias:s?{kind:"Name",value:s}:void 0,name:{kind:"Name",value:e},arguments:o,directives:a,selectionSet:l})}}else throw Rt("SelectionSet");while(rt.charCodeAt(me)!==125);return me++,Pe(),{kind:"SelectionSet",selections:t}}function Bee(){var t,e;if((t=lr(Cn))==null||(Pe(),lr(Cn)!=="on")||(Pe(),(e=lr(Cn))==null))throw Rt("FragmentDefinition");Pe();var n=Ta(!1);if(rt.charCodeAt(me++)!==123)throw Rt("FragmentDefinition");return Pe(),{kind:"FragmentDefinition",name:{kind:"Name",value:t},typeCondition:{kind:"NamedType",name:{kind:"Name",value:e}},directives:n,selectionSet:ld()}}var Uee=/(?:query|mutation|subscription|fragment)/y;function qee(t){var e,n,r;if(t&&(Pe(),e=lr(Cn),n=function(){if(Pe(),rt.charCodeAt(me)===40){var s=[];me++,Pe();var o;do{if(rt.charCodeAt(me++)!==36||(o=lr(Cn))==null)throw Rt("Variable");if(Pe(),rt.charCodeAt(me++)!==58)throw Rt("VariableDefinition");Pe();var a=jee(),l=void 0;rt.charCodeAt(me)===61&&(me++,Pe(),l=ad(!0)),Pe(),s.push({kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:o}},type:a,defaultValue:l,directives:Ta(!0)})}while(rt.charCodeAt(me)!==41);return me++,Pe(),s}}(),r=Ta(!1)),rt.charCodeAt(me)===123)return me++,Pe(),{kind:"OperationDefinition",operation:t||"query",name:e?{kind:"Name",value:e}:void 0,variableDefinitions:n,directives:r,selectionSet:ld()}}function Wee(t,e){return me=0,function(r,i){var s,o;Pe();var a=[];do if((s=lr(Uee))==="fragment")Pe(),a.push(Bee());else if((o=qee(s))!=null)a.push(o);else throw Rt("Document");while(me<r.length);{var l;return{kind:"Document",definitions:a,set loc(u){l=u},get loc(){return l||(l={start:0,end:r.length,startToken:void 0,endToken:void 0,source:{body:r,name:"graphql.web",locationOffset:{line:1,column:1}}}),l}}}}(rt=typeof t.body=="string"?t.body:t)}var MS=0,Rm=new Set;function gI(){function t(e,n){var r=Wee(e).definitions,i=new Set;for(var s of n||[])for(var o of s.definitions)o.kind===sf.FRAGMENT_DEFINITION&&!i.has(o)&&(r.push(o),i.add(o));var a;(a=r[0].kind===sf.FRAGMENT_DEFINITION)&&r[0].directives&&(r[0].directives=r[0].directives.filter(u=>u.name.value!=="_unmask"));var l;return{kind:sf.DOCUMENT,definitions:r,get loc(){if(!l&&a){var u=e+function(h){try{MS++;var p="";for(var g of h)if(!Rm.has(g)){Rm.add(g);var{loc:y}=g;y&&(p+=y.source.body)}return p}finally{--MS==0&&Rm.clear()}}(n||[]);return{start:0,end:u.length,source:{body:u,name:"GraphQLTada",locationOffset:{line:1,column:1}}}}return l},set loc(u){l=u}}}return t.scalar=function(n,r){return r},t.persisted=function(n,r){return{kind:sf.DOCUMENT,definitions:r?r.definitions:[],documentId:n}},t}function zee(...t){return t.length===2?t[1]:t[0]}gI();const Wo=gI(),Qee=Wo(`
255
255
  query organization($id: ID!) {
@@ -27730,10 +27730,7 @@ const Pee = ({
27730
27730
  Xg.isNil
27731
27731
  )
27732
27732
  })),
27733
- TA(({ graphQLErrors: l, networkError: u, operation: d, forward: h }) => {
27734
- var p;
27735
- return (p = r == null ? void 0 : r.onError) == null || p.call(r, { graphQLErrors: l, networkError: u }), h(d);
27736
- }),
27733
+ ...r != null && r.onError ? [TA(r == null ? void 0 : r.onError)] : [],
27737
27734
  new Yd({
27738
27735
  uri: `https://${o}`
27739
27736
  })
@@ -249,7 +249,7 @@ __p += '`),Je&&(K+=`' +
249
249
  function print() { __p += __j.call(arguments, '') }
250
250
  `:`;
251
251
  `)+K+`return __p
252
- }`;var Be=eC(function(){return it(S,de+"return "+K).apply(n,A)});if(Be.source=K,r0(Be))throw Be;return Be}function voe(c){return ot(c).toLowerCase()}function boe(c){return ot(c).toUpperCase()}function _oe(c,f,m){if(c=ot(c),c&&(m||f===n))return cI(c);if(!c||!(f=ur(f)))return c;var v=Yr(c),E=Yr(f),S=uI(v,E),A=fI(v,E)+1;return Qs(v,S,A).join("")}function Eoe(c,f,m){if(c=ot(c),c&&(m||f===n))return c.slice(0,hI(c)+1);if(!c||!(f=ur(f)))return c;var v=Yr(c),E=fI(v,Yr(f))+1;return Qs(v,0,E).join("")}function woe(c,f,m){if(c=ot(c),c&&(m||f===n))return c.replace(rb,"");if(!c||!(f=ur(f)))return c;var v=Yr(c),E=uI(v,Yr(f));return Qs(v,E).join("")}function Toe(c,f){var m=U,v=be;if(St(f)){var E="separator"in f?f.separator:E;m="length"in f?Le(f.length):m,v="omission"in f?ur(f.omission):v}c=ot(c);var S=c.length;if(Ha(c)){var A=Yr(c);S=A.length}if(m>=S)return c;var D=m-Ka(v);if(D<1)return v;var L=A?Qs(A,0,D).join(""):c.slice(0,D);if(E===n)return L+v;if(A&&(D+=L.length-D),i0(E)){if(c.slice(D).search(E)){var G,H=L;for(E.global||(E=_b(E.source,ot(CA.exec(E))+"g")),E.lastIndex=0;G=E.exec(H);)var K=G.index;L=L.slice(0,K===n?D:K)}}else if(c.indexOf(ur(E),D)!=D){var ne=L.lastIndexOf(E);ne>-1&&(L=L.slice(0,ne))}return L+v}function Soe(c){return c=ot(c),c&&PZ.test(c)?c.replace(AA,Zee):c}var Ooe=nl(function(c,f,m){return c+(m?" ":"")+f.toUpperCase()}),a0=tx("toUpperCase");function Zx(c,f,m){return c=ot(c),f=m?n:f,f===n?Hee(c)?nte(c):Vee(c):c.match(f)||[]}var eC=We(function(c,f){try{return lr(c,n,f)}catch(m){return r0(m)?m:new Ce(m)}}),koe=Wi(function(c,f){return Mr(f,function(m){m=bi(m),Ui(c,m,t0(c[m],c))}),c});function Noe(c){var f=c==null?0:c.length,m=_e();return c=f?Et(c,function(v){if(typeof v[1]!="function")throw new Rr(o);return[m(v[0]),v[1]]}):[],We(function(v){for(var E=-1;++E<f;){var S=c[E];if(lr(S[0],this,v))return lr(S[1],this,v)}})}function Aoe(c){return Zte(Fr(c,h))}function l0(c){return function(){return c}}function Ioe(c,f){return c==null||c!==c?f:c}var xoe=rx(),Coe=rx(!0);function Xn(c){return c}function c0(c){return MI(typeof c=="function"?c:Fr(c,h))}function Doe(c){return PI(Fr(c,h))}function Moe(c,f){return FI(c,Fr(f,h))}var Roe=We(function(c,f){return function(m){return Kc(m,c,f)}}),Poe=We(function(c,f){return function(m){return Kc(c,m,f)}});function u0(c,f,m){var v=Zt(f),E=ph(f,v);m==null&&!(St(f)&&(E.length||!v.length))&&(m=f,f=c,c=this,E=ph(f,Zt(f)));var S=!(St(m)&&"chain"in m)||!!m.chain,A=Qi(c);return Mr(E,function(D){var L=f[D];c[D]=L,A&&(c.prototype[D]=function(){var G=this.__chain__;if(S||G){var H=c(this.__wrapped__),K=H.__actions__=Kn(this.__actions__);return K.push({func:L,args:arguments,thisArg:c}),H.__chain__=G,H}return L.apply(c,js([this.value()],arguments))})}),c}function Foe(){return cn._===this&&(cn._=lte),this}function f0(){}function Loe(c){return c=Le(c),We(function(f){return LI(f,c)})}var $oe=Ub(Et),Voe=Ub(iI),joe=Ub(hb);function tC(c){return Kb(c)?pb(bi(c)):gne(c)}function Boe(c){return function(f){return c==null?n:qo(c,f)}}var Uoe=sx(),qoe=sx(!0);function d0(){return[]}function h0(){return!1}function Woe(){return{}}function zoe(){return""}function Qoe(){return!0}function Goe(c,f){if(c=Le(c),c<1||c>Ee)return[];var m=ve,v=En(c,ve);f=_e(f),c-=ve;for(var E=yb(v,f);++m<c;)f(m);return E}function Hoe(c){return Me(c)?Et(c,bi):fr(c)?[c]:Kn(Ex(ot(c)))}function Koe(c){var f=++ote;return ot(c)+f}var Joe=_h(function(c,f){return c+f},0),Yoe=qb("ceil"),Xoe=_h(function(c,f){return c/f},1),Zoe=qb("floor");function eae(c){return c&&c.length?hh(c,Xn,Ab):n}function tae(c,f){return c&&c.length?hh(c,_e(f,2),Ab):n}function nae(c){return aI(c,Xn)}function rae(c,f){return aI(c,_e(f,2))}function iae(c){return c&&c.length?hh(c,Xn,Db):n}function sae(c,f){return c&&c.length?hh(c,_e(f,2),Db):n}var oae=_h(function(c,f){return c*f},1),aae=qb("round"),lae=_h(function(c,f){return c-f},0);function cae(c){return c&&c.length?gb(c,Xn):0}function uae(c,f){return c&&c.length?gb(c,_e(f,2)):0}return T.after=Die,T.ary=Dx,T.assign=bse,T.assignIn=Qx,T.assignInWith=Mh,T.assignWith=_se,T.at=Ese,T.before=Mx,T.bind=t0,T.bindAll=koe,T.bindKey=Rx,T.castArray=Wie,T.chain=Ix,T.chunk=Zne,T.compact=ere,T.concat=tre,T.cond=Noe,T.conforms=Aoe,T.constant=l0,T.countBy=cie,T.create=wse,T.curry=Px,T.curryRight=Fx,T.debounce=Lx,T.defaults=Tse,T.defaultsDeep=Sse,T.defer=Mie,T.delay=Rie,T.difference=nre,T.differenceBy=rre,T.differenceWith=ire,T.drop=sre,T.dropRight=ore,T.dropRightWhile=are,T.dropWhile=lre,T.fill=cre,T.filter=fie,T.flatMap=pie,T.flatMapDeep=mie,T.flatMapDepth=gie,T.flatten=Ox,T.flattenDeep=ure,T.flattenDepth=fre,T.flip=Pie,T.flow=xoe,T.flowRight=Coe,T.fromPairs=dre,T.functions=Cse,T.functionsIn=Dse,T.groupBy=yie,T.initial=pre,T.intersection=mre,T.intersectionBy=gre,T.intersectionWith=yre,T.invert=Rse,T.invertBy=Pse,T.invokeMap=bie,T.iteratee=c0,T.keyBy=_ie,T.keys=Zt,T.keysIn=Yn,T.map=Nh,T.mapKeys=Lse,T.mapValues=$se,T.matches=Doe,T.matchesProperty=Moe,T.memoize=Ih,T.merge=Vse,T.mergeWith=Gx,T.method=Roe,T.methodOf=Poe,T.mixin=u0,T.negate=xh,T.nthArg=Loe,T.omit=jse,T.omitBy=Bse,T.once=Fie,T.orderBy=Eie,T.over=$oe,T.overArgs=Lie,T.overEvery=Voe,T.overSome=joe,T.partial=n0,T.partialRight=$x,T.partition=wie,T.pick=Use,T.pickBy=Hx,T.property=tC,T.propertyOf=Boe,T.pull=Ere,T.pullAll=Nx,T.pullAllBy=wre,T.pullAllWith=Tre,T.pullAt=Sre,T.range=Uoe,T.rangeRight=qoe,T.rearg=$ie,T.reject=Oie,T.remove=Ore,T.rest=Vie,T.reverse=Zb,T.sampleSize=Nie,T.set=Wse,T.setWith=zse,T.shuffle=Aie,T.slice=kre,T.sortBy=Cie,T.sortedUniq=Mre,T.sortedUniqBy=Rre,T.split=poe,T.spread=jie,T.tail=Pre,T.take=Fre,T.takeRight=Lre,T.takeRightWhile=$re,T.takeWhile=Vre,T.tap=eie,T.throttle=Bie,T.thru=kh,T.toArray=qx,T.toPairs=Kx,T.toPairsIn=Jx,T.toPath=Hoe,T.toPlainObject=zx,T.transform=Qse,T.unary=Uie,T.union=jre,T.unionBy=Bre,T.unionWith=Ure,T.uniq=qre,T.uniqBy=Wre,T.uniqWith=zre,T.unset=Gse,T.unzip=e0,T.unzipWith=Ax,T.update=Hse,T.updateWith=Kse,T.values=sl,T.valuesIn=Jse,T.without=Qre,T.words=Zx,T.wrap=qie,T.xor=Gre,T.xorBy=Hre,T.xorWith=Kre,T.zip=Jre,T.zipObject=Yre,T.zipObjectDeep=Xre,T.zipWith=Zre,T.entries=Kx,T.entriesIn=Jx,T.extend=Qx,T.extendWith=Mh,u0(T,T),T.add=Joe,T.attempt=eC,T.camelCase=eoe,T.capitalize=Yx,T.ceil=Yoe,T.clamp=Yse,T.clone=zie,T.cloneDeep=Gie,T.cloneDeepWith=Hie,T.cloneWith=Qie,T.conformsTo=Kie,T.deburr=Xx,T.defaultTo=Ioe,T.divide=Xoe,T.endsWith=toe,T.eq=Zr,T.escape=noe,T.escapeRegExp=roe,T.every=uie,T.find=die,T.findIndex=Tx,T.findKey=Ose,T.findLast=hie,T.findLastIndex=Sx,T.findLastKey=kse,T.floor=Zoe,T.forEach=xx,T.forEachRight=Cx,T.forIn=Nse,T.forInRight=Ase,T.forOwn=Ise,T.forOwnRight=xse,T.get=s0,T.gt=Jie,T.gte=Yie,T.has=Mse,T.hasIn=o0,T.head=kx,T.identity=Xn,T.includes=vie,T.indexOf=hre,T.inRange=Xse,T.invoke=Fse,T.isArguments=Qo,T.isArray=Me,T.isArrayBuffer=Xie,T.isArrayLike=Jn,T.isArrayLikeObject=Mt,T.isBoolean=Zie,T.isBuffer=Gs,T.isDate=ese,T.isElement=tse,T.isEmpty=nse,T.isEqual=rse,T.isEqualWith=ise,T.isError=r0,T.isFinite=sse,T.isFunction=Qi,T.isInteger=Vx,T.isLength=Ch,T.isMap=jx,T.isMatch=ose,T.isMatchWith=ase,T.isNaN=lse,T.isNative=cse,T.isNil=fse,T.isNull=use,T.isNumber=Bx,T.isObject=St,T.isObjectLike=It,T.isPlainObject=tu,T.isRegExp=i0,T.isSafeInteger=dse,T.isSet=Ux,T.isString=Dh,T.isSymbol=fr,T.isTypedArray=il,T.isUndefined=hse,T.isWeakMap=pse,T.isWeakSet=mse,T.join=vre,T.kebabCase=ioe,T.last=$r,T.lastIndexOf=bre,T.lowerCase=soe,T.lowerFirst=ooe,T.lt=gse,T.lte=yse,T.max=eae,T.maxBy=tae,T.mean=nae,T.meanBy=rae,T.min=iae,T.minBy=sae,T.stubArray=d0,T.stubFalse=h0,T.stubObject=Woe,T.stubString=zoe,T.stubTrue=Qoe,T.multiply=oae,T.nth=_re,T.noConflict=Foe,T.noop=f0,T.now=Ah,T.pad=aoe,T.padEnd=loe,T.padStart=coe,T.parseInt=uoe,T.random=Zse,T.reduce=Tie,T.reduceRight=Sie,T.repeat=foe,T.replace=doe,T.result=qse,T.round=aae,T.runInContext=F,T.sample=kie,T.size=Iie,T.snakeCase=hoe,T.some=xie,T.sortedIndex=Nre,T.sortedIndexBy=Are,T.sortedIndexOf=Ire,T.sortedLastIndex=xre,T.sortedLastIndexBy=Cre,T.sortedLastIndexOf=Dre,T.startCase=moe,T.startsWith=goe,T.subtract=lae,T.sum=cae,T.sumBy=uae,T.template=yoe,T.times=Goe,T.toFinite=Gi,T.toInteger=Le,T.toLength=Wx,T.toLower=voe,T.toNumber=Vr,T.toSafeInteger=vse,T.toString=ot,T.toUpper=boe,T.trim=_oe,T.trimEnd=Eoe,T.trimStart=woe,T.truncate=Toe,T.unescape=Soe,T.uniqueId=Koe,T.upperCase=Ooe,T.upperFirst=a0,T.each=xx,T.eachRight=Cx,T.first=kx,u0(T,function(){var c={};return yi(T,function(f,m){at.call(T.prototype,m)||(c[m]=f)}),c}(),{chain:!1}),T.VERSION=r,Mr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){T[c].placeholder=T}),Mr(["drop","take"],function(c,f){Ke.prototype[c]=function(m){m=m===n?1:Gt(Le(m),0);var v=this.__filtered__&&!f?new Ke(this):this.clone();return v.__filtered__?v.__takeCount__=En(m,v.__takeCount__):v.__views__.push({size:En(m,ve),type:c+(v.__dir__<0?"Right":"")}),v},Ke.prototype[c+"Right"]=function(m){return this.reverse()[c](m).reverse()}}),Mr(["filter","map","takeWhile"],function(c,f){var m=f+1,v=m==je||m==xe;Ke.prototype[c]=function(E){var S=this.clone();return S.__iteratees__.push({iteratee:_e(E,3),type:m}),S.__filtered__=S.__filtered__||v,S}}),Mr(["head","last"],function(c,f){var m="take"+(f?"Right":"");Ke.prototype[c]=function(){return this[m](1).value()[0]}}),Mr(["initial","tail"],function(c,f){var m="drop"+(f?"":"Right");Ke.prototype[c]=function(){return this.__filtered__?new Ke(this):this[m](1)}}),Ke.prototype.compact=function(){return this.filter(Xn)},Ke.prototype.find=function(c){return this.filter(c).head()},Ke.prototype.findLast=function(c){return this.reverse().find(c)},Ke.prototype.invokeMap=We(function(c,f){return typeof c=="function"?new Ke(this):this.map(function(m){return Kc(m,c,f)})}),Ke.prototype.reject=function(c){return this.filter(xh(_e(c)))},Ke.prototype.slice=function(c,f){c=Le(c);var m=this;return m.__filtered__&&(c>0||f<0)?new Ke(m):(c<0?m=m.takeRight(-c):c&&(m=m.drop(c)),f!==n&&(f=Le(f),m=f<0?m.dropRight(-f):m.take(f-c)),m)},Ke.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ke.prototype.toArray=function(){return this.take(ve)},yi(Ke.prototype,function(c,f){var m=/^(?:filter|find|map|reject)|While$/.test(f),v=/^(?:head|last)$/.test(f),E=T[v?"take"+(f=="last"?"Right":""):f],S=v||/^find/.test(f);E&&(T.prototype[f]=function(){var A=this.__wrapped__,D=v?[1]:arguments,L=A instanceof Ke,G=D[0],H=L||Me(A),K=function(Ge){var Je=E.apply(T,js([Ge],D));return v&&ne?Je[0]:Je};H&&m&&typeof G=="function"&&G.length!=1&&(L=H=!1);var ne=this.__chain__,de=!!this.__actions__.length,Te=S&&!ne,Be=L&&!de;if(!S&&H){A=Be?A:new Ke(this);var Se=c.apply(A,D);return Se.__actions__.push({func:kh,args:[K],thisArg:n}),new Pr(Se,ne)}return Te&&Be?c.apply(this,D):(Se=this.thru(K),Te?v?Se.value()[0]:Se.value():Se)})}),Mr(["pop","push","shift","sort","splice","unshift"],function(c){var f=Xd[c],m=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",v=/^(?:pop|shift)$/.test(c);T.prototype[c]=function(){var E=arguments;if(v&&!this.__chain__){var S=this.value();return f.apply(Me(S)?S:[],E)}return this[m](function(A){return f.apply(Me(A)?A:[],E)})}}),yi(Ke.prototype,function(c,f){var m=T[f];if(m){var v=m.name+"";at.call(Za,v)||(Za[v]=[]),Za[v].push({name:f,func:m})}}),Za[bh(n,w).name]=[{name:"wrapper",func:n}],Ke.prototype.clone=Ste,Ke.prototype.reverse=Ote,Ke.prototype.value=kte,T.prototype.at=tie,T.prototype.chain=nie,T.prototype.commit=rie,T.prototype.next=iie,T.prototype.plant=oie,T.prototype.reverse=aie,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=lie,T.prototype.first=T.prototype.head,Uc&&(T.prototype[Uc]=sie),T},Ja=rte();$o?(($o.exports=Ja)._=Ja,cb._=Ja):cn._=Ja}).call(De)}(Zf,Zf.exports);var Dy=Zf.exports;function zn(t){return t===null?"null":Array.isArray(t)?"array":typeof t}function bo(t){return zn(t)==="object"}function q5(t){return Array.isArray(t)&&t.length>0&&t.every(e=>"message"in e)}function mk(t,e){return t.length<124?t:e}const W5="graphql-transport-ws";var ir;(function(t){t[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(ir||(ir={}));var Ct;(function(t){t.ConnectionInit="connection_init",t.ConnectionAck="connection_ack",t.Ping="ping",t.Pong="pong",t.Subscribe="subscribe",t.Next="next",t.Error="error",t.Complete="complete"})(Ct||(Ct={}));function gk(t){if(!bo(t))throw new Error(`Message is expected to be an object, but got ${zn(t)}`);if(!t.type)throw new Error("Message is missing the 'type' property");if(typeof t.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${zn(t.type)}`);switch(t.type){case Ct.ConnectionInit:case Ct.ConnectionAck:case Ct.Ping:case Ct.Pong:{if(t.payload!=null&&!bo(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${t.payload}"`);break}case Ct.Subscribe:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${zn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);if(!bo(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object, but got ${zn(t.payload)}`);if(typeof t.payload.query!="string")throw new Error(`"${t.type}" message payload expects the 'query' property to be a string, but got ${zn(t.payload.query)}`);if(t.payload.variables!=null&&!bo(t.payload.variables))throw new Error(`"${t.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${zn(t.payload.variables)}`);if(t.payload.operationName!=null&&zn(t.payload.operationName)!=="string")throw new Error(`"${t.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${zn(t.payload.operationName)}`);if(t.payload.extensions!=null&&!bo(t.payload.extensions))throw new Error(`"${t.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${zn(t.payload.extensions)}`);break}case Ct.Next:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${zn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);if(!bo(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object, but got ${zn(t.payload)}`);break}case Ct.Error:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${zn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);if(!q5(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(t.payload)}`);break}case Ct.Complete:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${zn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${t.type}"`)}return t}function z5(t,e){return gk(typeof t=="string"?JSON.parse(t,e):t)}function bc(t,e){return gk(t),JSON.stringify(t,e)}var xa=function(t){return this instanceof xa?(this.v=t,this):new xa(t)},Q5=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(p){r[p]&&(i[p]=function(g){return new Promise(function(y,b){s.push([p,g,y,b])>1||a(p,g)})})}function a(p,g){try{l(r[p](g))}catch(y){h(s[0][3],y)}}function l(p){p.value instanceof xa?Promise.resolve(p.value.v).then(u,d):h(s[0][2],p)}function u(p){a("next",p)}function d(p){a("throw",p)}function h(p,g){p(g),s.shift(),s.length&&a(s[0][0],s[0][1])}};function G5(t){const{url:e,connectionParams:n,lazy:r=!0,onNonLazyError:i=console.error,lazyCloseTimeout:s=0,keepAlive:o=0,disablePong:a,connectionAckWaitTimeout:l=0,retryAttempts:u=5,retryWait:d=async function(xe){let fe=1e3;for(let Ee=0;Ee<xe;Ee++)fe*=2;await new Promise(Ee=>setTimeout(Ee,fe+Math.floor(Math.random()*2700+300)))},shouldRetry:h=My,isFatalConnectionProblem:p,on:g,webSocketImpl:y,generateID:b=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,xe=>{const fe=Math.random()*16|0;return(xe=="x"?fe:fe&3|8).toString(16)})},jsonMessageReplacer:_,jsonMessageReviver:w}=t;let O;if(y){if(!K5(y))throw new Error("Invalid WebSocket implementation provided");O=y}else typeof WebSocket<"u"?O=WebSocket:typeof global<"u"?O=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(O=window.WebSocket||window.MozWebSocket);if(!O)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const N=O,I=(()=>{const te=(()=>{const fe={};return{on(Ee,ye){return fe[Ee]=ye,()=>{delete fe[Ee]}},emit(Ee){var ye;"id"in Ee&&((ye=fe[Ee.id])===null||ye===void 0||ye.call(fe,Ee))}}})(),xe={connecting:g!=null&&g.connecting?[g.connecting]:[],opened:g!=null&&g.opened?[g.opened]:[],connected:g!=null&&g.connected?[g.connected]:[],ping:g!=null&&g.ping?[g.ping]:[],pong:g!=null&&g.pong?[g.pong]:[],message:g!=null&&g.message?[te.emit,g.message]:[te.emit],closed:g!=null&&g.closed?[g.closed]:[],error:g!=null&&g.error?[g.error]:[]};return{onMessage:te.on,on(fe,Ee){const ye=xe[fe];return ye.push(Ee),()=>{ye.splice(ye.indexOf(Ee),1)}},emit(fe,...Ee){for(const ye of[...xe[fe]])ye(...Ee)}}})();function P(te){const xe=[I.on("error",fe=>{xe.forEach(Ee=>Ee()),te(fe)}),I.on("closed",fe=>{xe.forEach(Ee=>Ee()),te(fe)})]}let R,B=0,Q,x=!1,U=0,be=!1;async function Oe(){clearTimeout(Q);const[te,xe]=await(R??(R=new Promise((ye,ut)=>(async()=>{if(x){if(await d(U),!B)return R=void 0,ut({code:1e3,reason:"All Subscriptions Gone"});U++}I.emit("connecting",x);const ve=new N(typeof e=="function"?await e():e,W5);let $,Z;function Y(){isFinite(o)&&o>0&&(clearTimeout(Z),Z=setTimeout(()=>{ve.readyState===N.OPEN&&(ve.send(bc({type:Ct.Ping})),I.emit("ping",!1,void 0))},o))}P(we=>{R=void 0,clearTimeout($),clearTimeout(Z),ut(we),we instanceof yk&&(ve.close(4499,"Terminated"),ve.onerror=null,ve.onclose=null)}),ve.onerror=we=>I.emit("error",we),ve.onclose=we=>I.emit("closed",we),ve.onopen=async()=>{try{I.emit("opened",ve);const we=typeof n=="function"?await n():n;if(ve.readyState!==N.OPEN)return;ve.send(bc(we?{type:Ct.ConnectionInit,payload:we}:{type:Ct.ConnectionInit},_)),isFinite(l)&&l>0&&($=setTimeout(()=>{ve.close(ir.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},l)),Y()}catch(we){I.emit("error",we),ve.close(ir.InternalClientError,mk(we instanceof Error?we.message:new Error(we).message,"Internal client error"))}};let ee=!1;ve.onmessage=({data:we})=>{try{const Pe=z5(we,w);if(I.emit("message",Pe),Pe.type==="ping"||Pe.type==="pong"){I.emit(Pe.type,!0,Pe.payload),Pe.type==="pong"?Y():a||(ve.send(bc(Pe.payload?{type:Ct.Pong,payload:Pe.payload}:{type:Ct.Pong})),I.emit("pong",!1,Pe.payload));return}if(ee)return;if(Pe.type!==Ct.ConnectionAck)throw new Error(`First message cannot be of type ${Pe.type}`);clearTimeout($),ee=!0,I.emit("connected",ve,Pe.payload,x),x=!1,U=0,ye([ve,new Promise((Ze,ln)=>P(ln))])}catch(Pe){ve.onmessage=null,I.emit("error",Pe),ve.close(ir.BadResponse,mk(Pe instanceof Error?Pe.message:new Error(Pe).message,"Bad response"))}}})())));te.readyState===N.CLOSING&&await xe;let fe=()=>{};const Ee=new Promise(ye=>fe=ye);return[te,fe,Promise.race([Ee.then(()=>{if(!B){const ye=()=>te.close(1e3,"Normal Closure");isFinite(s)&&s>0?Q=setTimeout(()=>{te.readyState===N.OPEN&&ye()},s):ye()}}),xe])]}function ke(te){if(My(te)&&(H5(te.code)||[ir.InternalServerError,ir.InternalClientError,ir.BadRequest,ir.BadResponse,ir.Unauthorized,ir.SubprotocolNotAcceptable,ir.SubscriberAlreadyExists,ir.TooManyInitialisationRequests].includes(te.code)))throw te;if(be)return!1;if(My(te)&&te.code===1e3)return B>0;if(!u||U>=u||!h(te)||p!=null&&p(te))throw te;return x=!0}r||(async()=>{for(B++;;)try{const[,,te]=await Oe();await te}catch(te){try{if(!ke(te))return}catch(xe){return i==null?void 0:i(xe)}}})();function je(te,xe){const fe=b(te);let Ee=!1,ye=!1,ut=()=>{B--,Ee=!0};return(async()=>{for(B++;;)try{const[ve,$,Z]=await Oe();if(Ee)return $();const Y=I.onMessage(fe,ee=>{switch(ee.type){case Ct.Next:{xe.next(ee.payload);return}case Ct.Error:{ye=!0,Ee=!0,xe.error(ee.payload),ut();return}case Ct.Complete:{Ee=!0,ut();return}}});ve.send(bc({id:fe,type:Ct.Subscribe,payload:te},_)),ut=()=>{!Ee&&ve.readyState===N.OPEN&&ve.send(bc({id:fe,type:Ct.Complete},_)),B--,Ee=!0,$()},await Z.finally(Y);return}catch(ve){if(!ke(ve))return}})().then(()=>{ye||xe.complete()}).catch(ve=>{xe.error(ve)}),()=>{Ee||ut()}}return{on:I.on,subscribe:je,iterate(te){const xe=[],fe={done:!1,error:null,resolve:()=>{}},Ee=je(te,{next(ut){xe.push(ut),fe.resolve()},error(ut){fe.done=!0,fe.error=ut,fe.resolve()},complete(){fe.done=!0,fe.resolve()}}),ye=function(){return Q5(this,arguments,function*(){for(;;){for(xe.length||(yield xa(new Promise($=>fe.resolve=$)));xe.length;)yield yield xa(xe.shift());if(fe.error)throw fe.error;if(fe.done)return yield xa(void 0)}})}();return ye.throw=async ut=>(fe.done||(fe.done=!0,fe.error=ut,fe.resolve()),{done:!0,value:void 0}),ye.return=async()=>(Ee(),{done:!0,value:void 0}),ye},async dispose(){if(be=!0,R){const[te]=await R;te.close(1e3,"Normal Closure")}},terminate(){R&&I.emit("closed",new yk)}}}class yk extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function My(t){return bo(t)&&"code"in t&&"reason"in t}function H5(t){return[1e3,1001,1006,1005,1012,1013,1014].includes(t)?!1:t>=1e3&&t<=1999}function K5(t){return typeof t=="function"&&"constructor"in t&&"CLOSED"in t&&"CLOSING"in t&&"CONNECTING"in t&&"OPEN"in t}const J5=({apiUrl:t,listeners:e})=>{const n=G5({url:`wss://${t}`,connectionParams:localStorage.getItem("token")?{authorization:`Bearer ${localStorage.getItem("token")}`}:void 0,keepAlive:1e4});return e&&(e.onConnected&&n.on("connected",e.onConnected),e.onClosed&&n.on("closed",e.onClosed),e.onError&&n.on("error",e.onError)),n},Y5=({token:t,organizationId:e,invalidationPolicies:n,handlers:r,apiBaseUrl:i})=>{const s=new Rg.InvalidationPolicyCache({invalidationPolicies:{...n,timeToLive:(n==null?void 0:n.timeToLive)??12e4,renewalPolicy:(n==null?void 0:n.renewalPolicy)??Rg.RenewalPolicy.None}});$5({cache:s,storage:new U5(window.localStorage)});const o=`api.warrior.${i??"well-played.gg"}/graphql`,a=Nm(({query:l})=>{const u=so(l);return u.kind==="OperationDefinition"&&u.operation==="subscription"},new M$(J5({apiUrl:o,listeners:r==null?void 0:r.webSocket})),km([x$(async()=>({headers:Dy.omitBy({"organization-id":e,authorization:t?`Bearer ${t}`:void 0},Dy.isNil)})),mS(({graphQLErrors:l,networkError:u,operation:d,forward:h})=>{var p;return(p=r==null?void 0:r.onError)==null||p.call(r,{graphQLErrors:l,networkError:u}),h(d)}),new rf({uri:`https://${o}`})]));return new df({cache:s,link:a,defaultOptions:{watchQuery:{fetchPolicy:"network-only",errorPolicy:"ignore"},query:{fetchPolicy:"network-only",errorPolicy:"all"},mutate:{errorPolicy:"all"}}})},vk=se.createContext({}),bk=()=>{const t=se.useContext(vk);if(!t)throw new Error("useWellPlayed must be used within a WellPlayedProvider");return t},X5=({children:t,clientConfig:e,organizationId:n})=>{const r=I$(),i=Y5({token:(r==null?void 0:r.accessToken)??void 0,organizationId:n,...e});return he.jsx(xT,{client:i,children:he.jsx(vk.Provider,{value:{organizationId:n,apiClient:i},children:t})})},Z5=({children:t,oidcConfig:e,wpAppConfig:n,...r})=>he.jsx(O$,{...e,configuration:{...n,...e==null?void 0:e.configuration,authority:`https://oauth.warrior.${r.apiBaseUrl??"well-played.gg"}`},children:he.jsx(X5,{...r,children:t})}),e8=(t,e)=>{const{data:n,loading:r,refetch:i,fetchMore:s}=Xl(t,{...e,notifyOnNetworkStatusChange:!0,variables:{...e==null?void 0:e.variables,page:{first:(e==null?void 0:e.pageSize)??100}}}),o=t.definitions[0].selectionSet.selections[0].name.value;return{data:n,loading:r,loadNextPage:a=>{const l=n==null?void 0:n[o];if(l!=null&&l.pageInfo.hasNextPage)return i({...e==null?void 0:e.variables,...a,page:{first:(e==null?void 0:e.pageSize)??100,after:l.pageInfo.endCursor}})},loadNextPageWithoutAppendingOldData:a=>{const l=n==null?void 0:n[o];return s({variables:{...e==null?void 0:e.variables,...a,page:{first:(e==null?void 0:e.pageSize)??100,after:l==null?void 0:l.pageInfo.endCursor}}})}}},Ry=(t,e)=>{const[n,r]=se.useState(!(e!=null&&e.skip)),[i,s]=se.useState([]),[o]=hg(t,e),a=async l=>{var g;const u=t.definitions[0].selectionSet.selections[0].name.value;r(!0);let d=!0,h=null;const p=[];for(;d;){const{data:y,error:b}=await o({variables:{...e==null?void 0:e.variables,...l,page:{first:100,after:h}}});if(b)throw b;const _=y==null?void 0:y[u];_&&(p.push(..._.nodes??[]),d=_.pageInfo.hasNextPage,h=_.pageInfo.endCursor)}return s(p),(g=e==null?void 0:e.onResults)==null||g.call(e,p),r(!1),p};return se.useEffect(()=>{e!=null&&e.skip||a()},[e==null?void 0:e.skip]),{loading:n,results:i,refetch:a}};var ed={DOCUMENT:"Document",FRAGMENT_DEFINITION:"FragmentDefinition"};class t8 extends Error{constructor(e,n,r,i,s,o,a){super(e),this.name="GraphQLError",this.message=e,s&&(this.path=s),n&&(this.nodes=Array.isArray(n)?n:[n]),r&&(this.source=r),i&&(this.positions=i),o&&(this.originalError=o);var l=a;if(!l&&o){var u=o.extensions;u&&typeof u=="object"&&(l=u)}this.extensions=l||{}}toJSON(){return{...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return"GraphQLError"}}var rt,me;function Dt(t){return new t8(`Syntax Error: Unexpected token at ${me} in ${t}`)}function sr(t){if(t.lastIndex=me,t.test(rt))return rt.slice(me,me=t.lastIndex)}var td=/ +(?=[^\s])/y;function n8(t){for(var e=t.split(`
252
+ }`;var Be=eC(function(){return it(S,de+"return "+K).apply(n,A)});if(Be.source=K,r0(Be))throw Be;return Be}function voe(c){return ot(c).toLowerCase()}function boe(c){return ot(c).toUpperCase()}function _oe(c,f,m){if(c=ot(c),c&&(m||f===n))return cI(c);if(!c||!(f=ur(f)))return c;var v=Yr(c),E=Yr(f),S=uI(v,E),A=fI(v,E)+1;return Qs(v,S,A).join("")}function Eoe(c,f,m){if(c=ot(c),c&&(m||f===n))return c.slice(0,hI(c)+1);if(!c||!(f=ur(f)))return c;var v=Yr(c),E=fI(v,Yr(f))+1;return Qs(v,0,E).join("")}function woe(c,f,m){if(c=ot(c),c&&(m||f===n))return c.replace(rb,"");if(!c||!(f=ur(f)))return c;var v=Yr(c),E=uI(v,Yr(f));return Qs(v,E).join("")}function Toe(c,f){var m=U,v=be;if(St(f)){var E="separator"in f?f.separator:E;m="length"in f?Le(f.length):m,v="omission"in f?ur(f.omission):v}c=ot(c);var S=c.length;if(Ha(c)){var A=Yr(c);S=A.length}if(m>=S)return c;var D=m-Ka(v);if(D<1)return v;var L=A?Qs(A,0,D).join(""):c.slice(0,D);if(E===n)return L+v;if(A&&(D+=L.length-D),i0(E)){if(c.slice(D).search(E)){var G,H=L;for(E.global||(E=_b(E.source,ot(CA.exec(E))+"g")),E.lastIndex=0;G=E.exec(H);)var K=G.index;L=L.slice(0,K===n?D:K)}}else if(c.indexOf(ur(E),D)!=D){var ne=L.lastIndexOf(E);ne>-1&&(L=L.slice(0,ne))}return L+v}function Soe(c){return c=ot(c),c&&PZ.test(c)?c.replace(AA,Zee):c}var Ooe=nl(function(c,f,m){return c+(m?" ":"")+f.toUpperCase()}),a0=tx("toUpperCase");function Zx(c,f,m){return c=ot(c),f=m?n:f,f===n?Hee(c)?nte(c):Vee(c):c.match(f)||[]}var eC=We(function(c,f){try{return lr(c,n,f)}catch(m){return r0(m)?m:new Ce(m)}}),koe=Wi(function(c,f){return Mr(f,function(m){m=bi(m),Ui(c,m,t0(c[m],c))}),c});function Noe(c){var f=c==null?0:c.length,m=_e();return c=f?Et(c,function(v){if(typeof v[1]!="function")throw new Rr(o);return[m(v[0]),v[1]]}):[],We(function(v){for(var E=-1;++E<f;){var S=c[E];if(lr(S[0],this,v))return lr(S[1],this,v)}})}function Aoe(c){return Zte(Fr(c,h))}function l0(c){return function(){return c}}function Ioe(c,f){return c==null||c!==c?f:c}var xoe=rx(),Coe=rx(!0);function Xn(c){return c}function c0(c){return MI(typeof c=="function"?c:Fr(c,h))}function Doe(c){return PI(Fr(c,h))}function Moe(c,f){return FI(c,Fr(f,h))}var Roe=We(function(c,f){return function(m){return Kc(m,c,f)}}),Poe=We(function(c,f){return function(m){return Kc(c,m,f)}});function u0(c,f,m){var v=Zt(f),E=ph(f,v);m==null&&!(St(f)&&(E.length||!v.length))&&(m=f,f=c,c=this,E=ph(f,Zt(f)));var S=!(St(m)&&"chain"in m)||!!m.chain,A=Qi(c);return Mr(E,function(D){var L=f[D];c[D]=L,A&&(c.prototype[D]=function(){var G=this.__chain__;if(S||G){var H=c(this.__wrapped__),K=H.__actions__=Kn(this.__actions__);return K.push({func:L,args:arguments,thisArg:c}),H.__chain__=G,H}return L.apply(c,js([this.value()],arguments))})}),c}function Foe(){return cn._===this&&(cn._=lte),this}function f0(){}function Loe(c){return c=Le(c),We(function(f){return LI(f,c)})}var $oe=Ub(Et),Voe=Ub(iI),joe=Ub(hb);function tC(c){return Kb(c)?pb(bi(c)):gne(c)}function Boe(c){return function(f){return c==null?n:qo(c,f)}}var Uoe=sx(),qoe=sx(!0);function d0(){return[]}function h0(){return!1}function Woe(){return{}}function zoe(){return""}function Qoe(){return!0}function Goe(c,f){if(c=Le(c),c<1||c>Ee)return[];var m=ve,v=En(c,ve);f=_e(f),c-=ve;for(var E=yb(v,f);++m<c;)f(m);return E}function Hoe(c){return Me(c)?Et(c,bi):fr(c)?[c]:Kn(Ex(ot(c)))}function Koe(c){var f=++ote;return ot(c)+f}var Joe=_h(function(c,f){return c+f},0),Yoe=qb("ceil"),Xoe=_h(function(c,f){return c/f},1),Zoe=qb("floor");function eae(c){return c&&c.length?hh(c,Xn,Ab):n}function tae(c,f){return c&&c.length?hh(c,_e(f,2),Ab):n}function nae(c){return aI(c,Xn)}function rae(c,f){return aI(c,_e(f,2))}function iae(c){return c&&c.length?hh(c,Xn,Db):n}function sae(c,f){return c&&c.length?hh(c,_e(f,2),Db):n}var oae=_h(function(c,f){return c*f},1),aae=qb("round"),lae=_h(function(c,f){return c-f},0);function cae(c){return c&&c.length?gb(c,Xn):0}function uae(c,f){return c&&c.length?gb(c,_e(f,2)):0}return T.after=Die,T.ary=Dx,T.assign=bse,T.assignIn=Qx,T.assignInWith=Mh,T.assignWith=_se,T.at=Ese,T.before=Mx,T.bind=t0,T.bindAll=koe,T.bindKey=Rx,T.castArray=Wie,T.chain=Ix,T.chunk=Zne,T.compact=ere,T.concat=tre,T.cond=Noe,T.conforms=Aoe,T.constant=l0,T.countBy=cie,T.create=wse,T.curry=Px,T.curryRight=Fx,T.debounce=Lx,T.defaults=Tse,T.defaultsDeep=Sse,T.defer=Mie,T.delay=Rie,T.difference=nre,T.differenceBy=rre,T.differenceWith=ire,T.drop=sre,T.dropRight=ore,T.dropRightWhile=are,T.dropWhile=lre,T.fill=cre,T.filter=fie,T.flatMap=pie,T.flatMapDeep=mie,T.flatMapDepth=gie,T.flatten=Ox,T.flattenDeep=ure,T.flattenDepth=fre,T.flip=Pie,T.flow=xoe,T.flowRight=Coe,T.fromPairs=dre,T.functions=Cse,T.functionsIn=Dse,T.groupBy=yie,T.initial=pre,T.intersection=mre,T.intersectionBy=gre,T.intersectionWith=yre,T.invert=Rse,T.invertBy=Pse,T.invokeMap=bie,T.iteratee=c0,T.keyBy=_ie,T.keys=Zt,T.keysIn=Yn,T.map=Nh,T.mapKeys=Lse,T.mapValues=$se,T.matches=Doe,T.matchesProperty=Moe,T.memoize=Ih,T.merge=Vse,T.mergeWith=Gx,T.method=Roe,T.methodOf=Poe,T.mixin=u0,T.negate=xh,T.nthArg=Loe,T.omit=jse,T.omitBy=Bse,T.once=Fie,T.orderBy=Eie,T.over=$oe,T.overArgs=Lie,T.overEvery=Voe,T.overSome=joe,T.partial=n0,T.partialRight=$x,T.partition=wie,T.pick=Use,T.pickBy=Hx,T.property=tC,T.propertyOf=Boe,T.pull=Ere,T.pullAll=Nx,T.pullAllBy=wre,T.pullAllWith=Tre,T.pullAt=Sre,T.range=Uoe,T.rangeRight=qoe,T.rearg=$ie,T.reject=Oie,T.remove=Ore,T.rest=Vie,T.reverse=Zb,T.sampleSize=Nie,T.set=Wse,T.setWith=zse,T.shuffle=Aie,T.slice=kre,T.sortBy=Cie,T.sortedUniq=Mre,T.sortedUniqBy=Rre,T.split=poe,T.spread=jie,T.tail=Pre,T.take=Fre,T.takeRight=Lre,T.takeRightWhile=$re,T.takeWhile=Vre,T.tap=eie,T.throttle=Bie,T.thru=kh,T.toArray=qx,T.toPairs=Kx,T.toPairsIn=Jx,T.toPath=Hoe,T.toPlainObject=zx,T.transform=Qse,T.unary=Uie,T.union=jre,T.unionBy=Bre,T.unionWith=Ure,T.uniq=qre,T.uniqBy=Wre,T.uniqWith=zre,T.unset=Gse,T.unzip=e0,T.unzipWith=Ax,T.update=Hse,T.updateWith=Kse,T.values=sl,T.valuesIn=Jse,T.without=Qre,T.words=Zx,T.wrap=qie,T.xor=Gre,T.xorBy=Hre,T.xorWith=Kre,T.zip=Jre,T.zipObject=Yre,T.zipObjectDeep=Xre,T.zipWith=Zre,T.entries=Kx,T.entriesIn=Jx,T.extend=Qx,T.extendWith=Mh,u0(T,T),T.add=Joe,T.attempt=eC,T.camelCase=eoe,T.capitalize=Yx,T.ceil=Yoe,T.clamp=Yse,T.clone=zie,T.cloneDeep=Gie,T.cloneDeepWith=Hie,T.cloneWith=Qie,T.conformsTo=Kie,T.deburr=Xx,T.defaultTo=Ioe,T.divide=Xoe,T.endsWith=toe,T.eq=Zr,T.escape=noe,T.escapeRegExp=roe,T.every=uie,T.find=die,T.findIndex=Tx,T.findKey=Ose,T.findLast=hie,T.findLastIndex=Sx,T.findLastKey=kse,T.floor=Zoe,T.forEach=xx,T.forEachRight=Cx,T.forIn=Nse,T.forInRight=Ase,T.forOwn=Ise,T.forOwnRight=xse,T.get=s0,T.gt=Jie,T.gte=Yie,T.has=Mse,T.hasIn=o0,T.head=kx,T.identity=Xn,T.includes=vie,T.indexOf=hre,T.inRange=Xse,T.invoke=Fse,T.isArguments=Qo,T.isArray=Me,T.isArrayBuffer=Xie,T.isArrayLike=Jn,T.isArrayLikeObject=Mt,T.isBoolean=Zie,T.isBuffer=Gs,T.isDate=ese,T.isElement=tse,T.isEmpty=nse,T.isEqual=rse,T.isEqualWith=ise,T.isError=r0,T.isFinite=sse,T.isFunction=Qi,T.isInteger=Vx,T.isLength=Ch,T.isMap=jx,T.isMatch=ose,T.isMatchWith=ase,T.isNaN=lse,T.isNative=cse,T.isNil=fse,T.isNull=use,T.isNumber=Bx,T.isObject=St,T.isObjectLike=It,T.isPlainObject=tu,T.isRegExp=i0,T.isSafeInteger=dse,T.isSet=Ux,T.isString=Dh,T.isSymbol=fr,T.isTypedArray=il,T.isUndefined=hse,T.isWeakMap=pse,T.isWeakSet=mse,T.join=vre,T.kebabCase=ioe,T.last=$r,T.lastIndexOf=bre,T.lowerCase=soe,T.lowerFirst=ooe,T.lt=gse,T.lte=yse,T.max=eae,T.maxBy=tae,T.mean=nae,T.meanBy=rae,T.min=iae,T.minBy=sae,T.stubArray=d0,T.stubFalse=h0,T.stubObject=Woe,T.stubString=zoe,T.stubTrue=Qoe,T.multiply=oae,T.nth=_re,T.noConflict=Foe,T.noop=f0,T.now=Ah,T.pad=aoe,T.padEnd=loe,T.padStart=coe,T.parseInt=uoe,T.random=Zse,T.reduce=Tie,T.reduceRight=Sie,T.repeat=foe,T.replace=doe,T.result=qse,T.round=aae,T.runInContext=F,T.sample=kie,T.size=Iie,T.snakeCase=hoe,T.some=xie,T.sortedIndex=Nre,T.sortedIndexBy=Are,T.sortedIndexOf=Ire,T.sortedLastIndex=xre,T.sortedLastIndexBy=Cre,T.sortedLastIndexOf=Dre,T.startCase=moe,T.startsWith=goe,T.subtract=lae,T.sum=cae,T.sumBy=uae,T.template=yoe,T.times=Goe,T.toFinite=Gi,T.toInteger=Le,T.toLength=Wx,T.toLower=voe,T.toNumber=Vr,T.toSafeInteger=vse,T.toString=ot,T.toUpper=boe,T.trim=_oe,T.trimEnd=Eoe,T.trimStart=woe,T.truncate=Toe,T.unescape=Soe,T.uniqueId=Koe,T.upperCase=Ooe,T.upperFirst=a0,T.each=xx,T.eachRight=Cx,T.first=kx,u0(T,function(){var c={};return yi(T,function(f,m){at.call(T.prototype,m)||(c[m]=f)}),c}(),{chain:!1}),T.VERSION=r,Mr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){T[c].placeholder=T}),Mr(["drop","take"],function(c,f){Ke.prototype[c]=function(m){m=m===n?1:Gt(Le(m),0);var v=this.__filtered__&&!f?new Ke(this):this.clone();return v.__filtered__?v.__takeCount__=En(m,v.__takeCount__):v.__views__.push({size:En(m,ve),type:c+(v.__dir__<0?"Right":"")}),v},Ke.prototype[c+"Right"]=function(m){return this.reverse()[c](m).reverse()}}),Mr(["filter","map","takeWhile"],function(c,f){var m=f+1,v=m==je||m==xe;Ke.prototype[c]=function(E){var S=this.clone();return S.__iteratees__.push({iteratee:_e(E,3),type:m}),S.__filtered__=S.__filtered__||v,S}}),Mr(["head","last"],function(c,f){var m="take"+(f?"Right":"");Ke.prototype[c]=function(){return this[m](1).value()[0]}}),Mr(["initial","tail"],function(c,f){var m="drop"+(f?"":"Right");Ke.prototype[c]=function(){return this.__filtered__?new Ke(this):this[m](1)}}),Ke.prototype.compact=function(){return this.filter(Xn)},Ke.prototype.find=function(c){return this.filter(c).head()},Ke.prototype.findLast=function(c){return this.reverse().find(c)},Ke.prototype.invokeMap=We(function(c,f){return typeof c=="function"?new Ke(this):this.map(function(m){return Kc(m,c,f)})}),Ke.prototype.reject=function(c){return this.filter(xh(_e(c)))},Ke.prototype.slice=function(c,f){c=Le(c);var m=this;return m.__filtered__&&(c>0||f<0)?new Ke(m):(c<0?m=m.takeRight(-c):c&&(m=m.drop(c)),f!==n&&(f=Le(f),m=f<0?m.dropRight(-f):m.take(f-c)),m)},Ke.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ke.prototype.toArray=function(){return this.take(ve)},yi(Ke.prototype,function(c,f){var m=/^(?:filter|find|map|reject)|While$/.test(f),v=/^(?:head|last)$/.test(f),E=T[v?"take"+(f=="last"?"Right":""):f],S=v||/^find/.test(f);E&&(T.prototype[f]=function(){var A=this.__wrapped__,D=v?[1]:arguments,L=A instanceof Ke,G=D[0],H=L||Me(A),K=function(Ge){var Je=E.apply(T,js([Ge],D));return v&&ne?Je[0]:Je};H&&m&&typeof G=="function"&&G.length!=1&&(L=H=!1);var ne=this.__chain__,de=!!this.__actions__.length,Te=S&&!ne,Be=L&&!de;if(!S&&H){A=Be?A:new Ke(this);var Se=c.apply(A,D);return Se.__actions__.push({func:kh,args:[K],thisArg:n}),new Pr(Se,ne)}return Te&&Be?c.apply(this,D):(Se=this.thru(K),Te?v?Se.value()[0]:Se.value():Se)})}),Mr(["pop","push","shift","sort","splice","unshift"],function(c){var f=Xd[c],m=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",v=/^(?:pop|shift)$/.test(c);T.prototype[c]=function(){var E=arguments;if(v&&!this.__chain__){var S=this.value();return f.apply(Me(S)?S:[],E)}return this[m](function(A){return f.apply(Me(A)?A:[],E)})}}),yi(Ke.prototype,function(c,f){var m=T[f];if(m){var v=m.name+"";at.call(Za,v)||(Za[v]=[]),Za[v].push({name:f,func:m})}}),Za[bh(n,w).name]=[{name:"wrapper",func:n}],Ke.prototype.clone=Ste,Ke.prototype.reverse=Ote,Ke.prototype.value=kte,T.prototype.at=tie,T.prototype.chain=nie,T.prototype.commit=rie,T.prototype.next=iie,T.prototype.plant=oie,T.prototype.reverse=aie,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=lie,T.prototype.first=T.prototype.head,Uc&&(T.prototype[Uc]=sie),T},Ja=rte();$o?(($o.exports=Ja)._=Ja,cb._=Ja):cn._=Ja}).call(De)}(Zf,Zf.exports);var Dy=Zf.exports;function zn(t){return t===null?"null":Array.isArray(t)?"array":typeof t}function bo(t){return zn(t)==="object"}function q5(t){return Array.isArray(t)&&t.length>0&&t.every(e=>"message"in e)}function mk(t,e){return t.length<124?t:e}const W5="graphql-transport-ws";var ir;(function(t){t[t.InternalServerError=4500]="InternalServerError",t[t.InternalClientError=4005]="InternalClientError",t[t.BadRequest=4400]="BadRequest",t[t.BadResponse=4004]="BadResponse",t[t.Unauthorized=4401]="Unauthorized",t[t.Forbidden=4403]="Forbidden",t[t.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",t[t.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",t[t.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",t[t.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",t[t.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(ir||(ir={}));var Ct;(function(t){t.ConnectionInit="connection_init",t.ConnectionAck="connection_ack",t.Ping="ping",t.Pong="pong",t.Subscribe="subscribe",t.Next="next",t.Error="error",t.Complete="complete"})(Ct||(Ct={}));function gk(t){if(!bo(t))throw new Error(`Message is expected to be an object, but got ${zn(t)}`);if(!t.type)throw new Error("Message is missing the 'type' property");if(typeof t.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${zn(t.type)}`);switch(t.type){case Ct.ConnectionInit:case Ct.ConnectionAck:case Ct.Ping:case Ct.Pong:{if(t.payload!=null&&!bo(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${t.payload}"`);break}case Ct.Subscribe:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${zn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);if(!bo(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object, but got ${zn(t.payload)}`);if(typeof t.payload.query!="string")throw new Error(`"${t.type}" message payload expects the 'query' property to be a string, but got ${zn(t.payload.query)}`);if(t.payload.variables!=null&&!bo(t.payload.variables))throw new Error(`"${t.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${zn(t.payload.variables)}`);if(t.payload.operationName!=null&&zn(t.payload.operationName)!=="string")throw new Error(`"${t.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${zn(t.payload.operationName)}`);if(t.payload.extensions!=null&&!bo(t.payload.extensions))throw new Error(`"${t.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${zn(t.payload.extensions)}`);break}case Ct.Next:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${zn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);if(!bo(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object, but got ${zn(t.payload)}`);break}case Ct.Error:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${zn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);if(!q5(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(t.payload)}`);break}case Ct.Complete:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${zn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${t.type}"`)}return t}function z5(t,e){return gk(typeof t=="string"?JSON.parse(t,e):t)}function bc(t,e){return gk(t),JSON.stringify(t,e)}var xa=function(t){return this instanceof xa?(this.v=t,this):new xa(t)},Q5=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(p){r[p]&&(i[p]=function(g){return new Promise(function(y,b){s.push([p,g,y,b])>1||a(p,g)})})}function a(p,g){try{l(r[p](g))}catch(y){h(s[0][3],y)}}function l(p){p.value instanceof xa?Promise.resolve(p.value.v).then(u,d):h(s[0][2],p)}function u(p){a("next",p)}function d(p){a("throw",p)}function h(p,g){p(g),s.shift(),s.length&&a(s[0][0],s[0][1])}};function G5(t){const{url:e,connectionParams:n,lazy:r=!0,onNonLazyError:i=console.error,lazyCloseTimeout:s=0,keepAlive:o=0,disablePong:a,connectionAckWaitTimeout:l=0,retryAttempts:u=5,retryWait:d=async function(xe){let fe=1e3;for(let Ee=0;Ee<xe;Ee++)fe*=2;await new Promise(Ee=>setTimeout(Ee,fe+Math.floor(Math.random()*2700+300)))},shouldRetry:h=My,isFatalConnectionProblem:p,on:g,webSocketImpl:y,generateID:b=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,xe=>{const fe=Math.random()*16|0;return(xe=="x"?fe:fe&3|8).toString(16)})},jsonMessageReplacer:_,jsonMessageReviver:w}=t;let O;if(y){if(!K5(y))throw new Error("Invalid WebSocket implementation provided");O=y}else typeof WebSocket<"u"?O=WebSocket:typeof global<"u"?O=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(O=window.WebSocket||window.MozWebSocket);if(!O)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const N=O,I=(()=>{const te=(()=>{const fe={};return{on(Ee,ye){return fe[Ee]=ye,()=>{delete fe[Ee]}},emit(Ee){var ye;"id"in Ee&&((ye=fe[Ee.id])===null||ye===void 0||ye.call(fe,Ee))}}})(),xe={connecting:g!=null&&g.connecting?[g.connecting]:[],opened:g!=null&&g.opened?[g.opened]:[],connected:g!=null&&g.connected?[g.connected]:[],ping:g!=null&&g.ping?[g.ping]:[],pong:g!=null&&g.pong?[g.pong]:[],message:g!=null&&g.message?[te.emit,g.message]:[te.emit],closed:g!=null&&g.closed?[g.closed]:[],error:g!=null&&g.error?[g.error]:[]};return{onMessage:te.on,on(fe,Ee){const ye=xe[fe];return ye.push(Ee),()=>{ye.splice(ye.indexOf(Ee),1)}},emit(fe,...Ee){for(const ye of[...xe[fe]])ye(...Ee)}}})();function P(te){const xe=[I.on("error",fe=>{xe.forEach(Ee=>Ee()),te(fe)}),I.on("closed",fe=>{xe.forEach(Ee=>Ee()),te(fe)})]}let R,B=0,Q,x=!1,U=0,be=!1;async function Oe(){clearTimeout(Q);const[te,xe]=await(R??(R=new Promise((ye,ut)=>(async()=>{if(x){if(await d(U),!B)return R=void 0,ut({code:1e3,reason:"All Subscriptions Gone"});U++}I.emit("connecting",x);const ve=new N(typeof e=="function"?await e():e,W5);let $,Z;function Y(){isFinite(o)&&o>0&&(clearTimeout(Z),Z=setTimeout(()=>{ve.readyState===N.OPEN&&(ve.send(bc({type:Ct.Ping})),I.emit("ping",!1,void 0))},o))}P(we=>{R=void 0,clearTimeout($),clearTimeout(Z),ut(we),we instanceof yk&&(ve.close(4499,"Terminated"),ve.onerror=null,ve.onclose=null)}),ve.onerror=we=>I.emit("error",we),ve.onclose=we=>I.emit("closed",we),ve.onopen=async()=>{try{I.emit("opened",ve);const we=typeof n=="function"?await n():n;if(ve.readyState!==N.OPEN)return;ve.send(bc(we?{type:Ct.ConnectionInit,payload:we}:{type:Ct.ConnectionInit},_)),isFinite(l)&&l>0&&($=setTimeout(()=>{ve.close(ir.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},l)),Y()}catch(we){I.emit("error",we),ve.close(ir.InternalClientError,mk(we instanceof Error?we.message:new Error(we).message,"Internal client error"))}};let ee=!1;ve.onmessage=({data:we})=>{try{const Pe=z5(we,w);if(I.emit("message",Pe),Pe.type==="ping"||Pe.type==="pong"){I.emit(Pe.type,!0,Pe.payload),Pe.type==="pong"?Y():a||(ve.send(bc(Pe.payload?{type:Ct.Pong,payload:Pe.payload}:{type:Ct.Pong})),I.emit("pong",!1,Pe.payload));return}if(ee)return;if(Pe.type!==Ct.ConnectionAck)throw new Error(`First message cannot be of type ${Pe.type}`);clearTimeout($),ee=!0,I.emit("connected",ve,Pe.payload,x),x=!1,U=0,ye([ve,new Promise((Ze,ln)=>P(ln))])}catch(Pe){ve.onmessage=null,I.emit("error",Pe),ve.close(ir.BadResponse,mk(Pe instanceof Error?Pe.message:new Error(Pe).message,"Bad response"))}}})())));te.readyState===N.CLOSING&&await xe;let fe=()=>{};const Ee=new Promise(ye=>fe=ye);return[te,fe,Promise.race([Ee.then(()=>{if(!B){const ye=()=>te.close(1e3,"Normal Closure");isFinite(s)&&s>0?Q=setTimeout(()=>{te.readyState===N.OPEN&&ye()},s):ye()}}),xe])]}function ke(te){if(My(te)&&(H5(te.code)||[ir.InternalServerError,ir.InternalClientError,ir.BadRequest,ir.BadResponse,ir.Unauthorized,ir.SubprotocolNotAcceptable,ir.SubscriberAlreadyExists,ir.TooManyInitialisationRequests].includes(te.code)))throw te;if(be)return!1;if(My(te)&&te.code===1e3)return B>0;if(!u||U>=u||!h(te)||p!=null&&p(te))throw te;return x=!0}r||(async()=>{for(B++;;)try{const[,,te]=await Oe();await te}catch(te){try{if(!ke(te))return}catch(xe){return i==null?void 0:i(xe)}}})();function je(te,xe){const fe=b(te);let Ee=!1,ye=!1,ut=()=>{B--,Ee=!0};return(async()=>{for(B++;;)try{const[ve,$,Z]=await Oe();if(Ee)return $();const Y=I.onMessage(fe,ee=>{switch(ee.type){case Ct.Next:{xe.next(ee.payload);return}case Ct.Error:{ye=!0,Ee=!0,xe.error(ee.payload),ut();return}case Ct.Complete:{Ee=!0,ut();return}}});ve.send(bc({id:fe,type:Ct.Subscribe,payload:te},_)),ut=()=>{!Ee&&ve.readyState===N.OPEN&&ve.send(bc({id:fe,type:Ct.Complete},_)),B--,Ee=!0,$()},await Z.finally(Y);return}catch(ve){if(!ke(ve))return}})().then(()=>{ye||xe.complete()}).catch(ve=>{xe.error(ve)}),()=>{Ee||ut()}}return{on:I.on,subscribe:je,iterate(te){const xe=[],fe={done:!1,error:null,resolve:()=>{}},Ee=je(te,{next(ut){xe.push(ut),fe.resolve()},error(ut){fe.done=!0,fe.error=ut,fe.resolve()},complete(){fe.done=!0,fe.resolve()}}),ye=function(){return Q5(this,arguments,function*(){for(;;){for(xe.length||(yield xa(new Promise($=>fe.resolve=$)));xe.length;)yield yield xa(xe.shift());if(fe.error)throw fe.error;if(fe.done)return yield xa(void 0)}})}();return ye.throw=async ut=>(fe.done||(fe.done=!0,fe.error=ut,fe.resolve()),{done:!0,value:void 0}),ye.return=async()=>(Ee(),{done:!0,value:void 0}),ye},async dispose(){if(be=!0,R){const[te]=await R;te.close(1e3,"Normal Closure")}},terminate(){R&&I.emit("closed",new yk)}}}class yk extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function My(t){return bo(t)&&"code"in t&&"reason"in t}function H5(t){return[1e3,1001,1006,1005,1012,1013,1014].includes(t)?!1:t>=1e3&&t<=1999}function K5(t){return typeof t=="function"&&"constructor"in t&&"CLOSED"in t&&"CLOSING"in t&&"CONNECTING"in t&&"OPEN"in t}const J5=({apiUrl:t,listeners:e})=>{const n=G5({url:`wss://${t}`,connectionParams:localStorage.getItem("token")?{authorization:`Bearer ${localStorage.getItem("token")}`}:void 0,keepAlive:1e4});return e&&(e.onConnected&&n.on("connected",e.onConnected),e.onClosed&&n.on("closed",e.onClosed),e.onError&&n.on("error",e.onError)),n},Y5=({token:t,organizationId:e,invalidationPolicies:n,handlers:r,apiBaseUrl:i})=>{const s=new Rg.InvalidationPolicyCache({invalidationPolicies:{...n,timeToLive:(n==null?void 0:n.timeToLive)??12e4,renewalPolicy:(n==null?void 0:n.renewalPolicy)??Rg.RenewalPolicy.None}});$5({cache:s,storage:new U5(window.localStorage)});const o=`api.warrior.${i??"well-played.gg"}/graphql`,a=Nm(({query:l})=>{const u=so(l);return u.kind==="OperationDefinition"&&u.operation==="subscription"},new M$(J5({apiUrl:o,listeners:r==null?void 0:r.webSocket})),km([x$(async()=>({headers:Dy.omitBy({"organization-id":e,authorization:t?`Bearer ${t}`:void 0},Dy.isNil)})),...r!=null&&r.onError?[mS(r==null?void 0:r.onError)]:[],new rf({uri:`https://${o}`})]));return new df({cache:s,link:a,defaultOptions:{watchQuery:{fetchPolicy:"network-only",errorPolicy:"ignore"},query:{fetchPolicy:"network-only",errorPolicy:"all"},mutate:{errorPolicy:"all"}}})},vk=se.createContext({}),bk=()=>{const t=se.useContext(vk);if(!t)throw new Error("useWellPlayed must be used within a WellPlayedProvider");return t},X5=({children:t,clientConfig:e,organizationId:n})=>{const r=I$(),i=Y5({token:(r==null?void 0:r.accessToken)??void 0,organizationId:n,...e});return he.jsx(xT,{client:i,children:he.jsx(vk.Provider,{value:{organizationId:n,apiClient:i},children:t})})},Z5=({children:t,oidcConfig:e,wpAppConfig:n,...r})=>he.jsx(O$,{...e,configuration:{...n,...e==null?void 0:e.configuration,authority:`https://oauth.warrior.${r.apiBaseUrl??"well-played.gg"}`},children:he.jsx(X5,{...r,children:t})}),e8=(t,e)=>{const{data:n,loading:r,refetch:i,fetchMore:s}=Xl(t,{...e,notifyOnNetworkStatusChange:!0,variables:{...e==null?void 0:e.variables,page:{first:(e==null?void 0:e.pageSize)??100}}}),o=t.definitions[0].selectionSet.selections[0].name.value;return{data:n,loading:r,loadNextPage:a=>{const l=n==null?void 0:n[o];if(l!=null&&l.pageInfo.hasNextPage)return i({...e==null?void 0:e.variables,...a,page:{first:(e==null?void 0:e.pageSize)??100,after:l.pageInfo.endCursor}})},loadNextPageWithoutAppendingOldData:a=>{const l=n==null?void 0:n[o];return s({variables:{...e==null?void 0:e.variables,...a,page:{first:(e==null?void 0:e.pageSize)??100,after:l==null?void 0:l.pageInfo.endCursor}}})}}},Ry=(t,e)=>{const[n,r]=se.useState(!(e!=null&&e.skip)),[i,s]=se.useState([]),[o]=hg(t,e),a=async l=>{var g;const u=t.definitions[0].selectionSet.selections[0].name.value;r(!0);let d=!0,h=null;const p=[];for(;d;){const{data:y,error:b}=await o({variables:{...e==null?void 0:e.variables,...l,page:{first:100,after:h}}});if(b)throw b;const _=y==null?void 0:y[u];_&&(p.push(..._.nodes??[]),d=_.pageInfo.hasNextPage,h=_.pageInfo.endCursor)}return s(p),(g=e==null?void 0:e.onResults)==null||g.call(e,p),r(!1),p};return se.useEffect(()=>{e!=null&&e.skip||a()},[e==null?void 0:e.skip]),{loading:n,results:i,refetch:a}};var ed={DOCUMENT:"Document",FRAGMENT_DEFINITION:"FragmentDefinition"};class t8 extends Error{constructor(e,n,r,i,s,o,a){super(e),this.name="GraphQLError",this.message=e,s&&(this.path=s),n&&(this.nodes=Array.isArray(n)?n:[n]),r&&(this.source=r),i&&(this.positions=i),o&&(this.originalError=o);var l=a;if(!l&&o){var u=o.extensions;u&&typeof u=="object"&&(l=u)}this.extensions=l||{}}toJSON(){return{...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return"GraphQLError"}}var rt,me;function Dt(t){return new t8(`Syntax Error: Unexpected token at ${me} in ${t}`)}function sr(t){if(t.lastIndex=me,t.test(rt))return rt.slice(me,me=t.lastIndex)}var td=/ +(?=[^\s])/y;function n8(t){for(var e=t.split(`
253
253
  `),n="",r=0,i=0,s=e.length-1,o=0;o<e.length;o++)td.lastIndex=0,td.test(e[o])&&(o&&(!r||td.lastIndex<r)&&(r=td.lastIndex),i=i||o,s=o);for(var a=i;a<=s;a++)a!==i&&(n+=`
254
254
  `),n+=e[a].slice(r).replace(/\\"""/g,'"""');return n}function Re(){for(var t=0|rt.charCodeAt(me++);t===9||t===10||t===13||t===32||t===35||t===44||t===65279;t=0|rt.charCodeAt(me++))if(t===35)for(;(t=rt.charCodeAt(me++))!==10&&t!==13;);me--}var Cn=/[_A-Za-z]\w*/y,Py=new RegExp("(?:(null|true|false)|\\$("+Cn.source+')|(-?\\d+)((?:\\.\\d+)?[eE][+-]?\\d+|\\.\\d+)?|("""(?:"""|(?:[\\s\\S]*?[^\\\\])"""))|("(?:"|[^\\r\\n]*?[^\\\\]"))|('+Cn.source+"))","y"),_s=function(t){return t[t.Const=1]="Const",t[t.Var=2]="Var",t[t.Int=3]="Int",t[t.Float=4]="Float",t[t.BlockString=5]="BlockString",t[t.String=6]="String",t[t.Enum=7]="Enum",t}(_s||{}),r8=/\\/;function nd(t){var e,n;if(Py.lastIndex=me,rt.charCodeAt(me)===91){me++,Re();for(var r=[];rt.charCodeAt(me)!==93;)r.push(nd(t));return me++,Re(),{kind:"ListValue",values:r}}else if(rt.charCodeAt(me)===123){me++,Re();for(var i=[];rt.charCodeAt(me)!==125;){if((e=sr(Cn))==null||(Re(),rt.charCodeAt(me++)!==58))throw Dt("ObjectField");Re(),i.push({kind:"ObjectField",name:{kind:"Name",value:e},value:nd(t)})}return me++,Re(),{kind:"ObjectValue",fields:i}}else if((n=Py.exec(rt))!=null){if(me=Py.lastIndex,Re(),(e=n[_s.Const])!=null)return e==="null"?{kind:"NullValue"}:{kind:"BooleanValue",value:e==="true"};if((e=n[_s.Var])!=null){if(t)throw Dt("Variable");return{kind:"Variable",name:{kind:"Name",value:e}}}else if((e=n[_s.Int])!=null){var s;return(s=n[_s.Float])!=null?{kind:"FloatValue",value:e+s}:{kind:"IntValue",value:e}}else{if((e=n[_s.BlockString])!=null)return{kind:"StringValue",value:n8(e.slice(3,-3)),block:!0};if((e=n[_s.String])!=null)return{kind:"StringValue",value:r8.test(e)?JSON.parse(e):e.slice(1,-1),block:!1};if((e=n[_s.Enum])!=null)return{kind:"EnumValue",value:e}}}throw Dt("Value")}function _k(t){if(rt.charCodeAt(me)===40){var e=[];me++,Re();var n;do{if((n=sr(Cn))==null||(Re(),rt.charCodeAt(me++)!==58))throw Dt("Argument");Re(),e.push({kind:"Argument",name:{kind:"Name",value:n},value:nd(t)})}while(rt.charCodeAt(me)!==41);return me++,Re(),e}}function Ca(t){if(rt.charCodeAt(me)===64){var e=[],n;do{if(me++,(n=sr(Cn))==null)throw Dt("Directive");Re(),e.push({kind:"Directive",name:{kind:"Name",value:n},arguments:_k(t)})}while(rt.charCodeAt(me)===64);return e}}function i8(){for(var t,e=0;rt.charCodeAt(me)===91;)e++,me++,Re();if((t=sr(Cn))==null)throw Dt("NamedType");Re();var n={kind:"NamedType",name:{kind:"Name",value:t}};do if(rt.charCodeAt(me)===33&&(me++,Re(),n={kind:"NonNullType",type:n}),e){if(rt.charCodeAt(me++)!==93)throw Dt("NamedType");Re(),n={kind:"ListType",type:n}}while(e--);return n}var Fy=new RegExp("(?:(\\.{3})|("+Cn.source+"))","y"),Ly=function(t){return t[t.Spread=1]="Spread",t[t.Name=2]="Name",t}(Ly||{});function rd(){var t=[],e,n;do if(Fy.lastIndex=me,(n=Fy.exec(rt))!=null){if(me=Fy.lastIndex,n[Ly.Spread]!=null){Re();var r=sr(Cn);if(r!=null&&r!=="on")Re(),t.push({kind:"FragmentSpread",name:{kind:"Name",value:r},directives:Ca(!1)});else{if(Re(),r==="on"){if((r=sr(Cn))==null)throw Dt("NamedType");Re()}var i=Ca(!1);if(rt.charCodeAt(me++)!==123)throw Dt("InlineFragment");Re(),t.push({kind:"InlineFragment",typeCondition:r?{kind:"NamedType",name:{kind:"Name",value:r}}:void 0,directives:i,selectionSet:rd()})}}else if((e=n[Ly.Name])!=null){var s=void 0;if(Re(),rt.charCodeAt(me)===58){if(me++,Re(),s=e,(e=sr(Cn))==null)throw Dt("Field");Re()}var o=_k(!1);Re();var a=Ca(!1),l=void 0;rt.charCodeAt(me)===123&&(me++,Re(),l=rd()),t.push({kind:"Field",alias:s?{kind:"Name",value:s}:void 0,name:{kind:"Name",value:e},arguments:o,directives:a,selectionSet:l})}}else throw Dt("SelectionSet");while(rt.charCodeAt(me)!==125);return me++,Re(),{kind:"SelectionSet",selections:t}}function s8(){var t,e;if((t=sr(Cn))==null||(Re(),sr(Cn)!=="on")||(Re(),(e=sr(Cn))==null))throw Dt("FragmentDefinition");Re();var n=Ca(!1);if(rt.charCodeAt(me++)!==123)throw Dt("FragmentDefinition");return Re(),{kind:"FragmentDefinition",name:{kind:"Name",value:t},typeCondition:{kind:"NamedType",name:{kind:"Name",value:e}},directives:n,selectionSet:rd()}}var o8=/(?:query|mutation|subscription|fragment)/y;function a8(t){var e,n,r;if(t&&(Re(),e=sr(Cn),n=function(){if(Re(),rt.charCodeAt(me)===40){var s=[];me++,Re();var o;do{if(rt.charCodeAt(me++)!==36||(o=sr(Cn))==null)throw Dt("Variable");if(Re(),rt.charCodeAt(me++)!==58)throw Dt("VariableDefinition");Re();var a=i8(),l=void 0;rt.charCodeAt(me)===61&&(me++,Re(),l=nd(!0)),Re(),s.push({kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:o}},type:a,defaultValue:l,directives:Ca(!0)})}while(rt.charCodeAt(me)!==41);return me++,Re(),s}}(),r=Ca(!1)),rt.charCodeAt(me)===123)return me++,Re(),{kind:"OperationDefinition",operation:t||"query",name:e?{kind:"Name",value:e}:void 0,variableDefinitions:n,directives:r,selectionSet:rd()}}function l8(t,e){return me=0,function(r,i){var s,o;Re();var a=[];do if((s=sr(o8))==="fragment")Re(),a.push(s8());else if((o=a8(s))!=null)a.push(o);else throw Dt("Document");while(me<r.length);{var l;return{kind:"Document",definitions:a,set loc(u){l=u},get loc(){return l||(l={start:0,end:r.length,startToken:void 0,endToken:void 0,source:{body:r,name:"graphql.web",locationOffset:{line:1,column:1}}}),l}}}}(rt=typeof t.body=="string"?t.body:t)}var Ek=0,$y=new Set;function wk(){function t(e,n){var r=l8(e).definitions,i=new Set;for(var s of n||[])for(var o of s.definitions)o.kind===ed.FRAGMENT_DEFINITION&&!i.has(o)&&(r.push(o),i.add(o));var a;(a=r[0].kind===ed.FRAGMENT_DEFINITION)&&r[0].directives&&(r[0].directives=r[0].directives.filter(u=>u.name.value!=="_unmask"));var l;return{kind:ed.DOCUMENT,definitions:r,get loc(){if(!l&&a){var u=e+function(h){try{Ek++;var p="";for(var g of h)if(!$y.has(g)){$y.add(g);var{loc:y}=g;y&&(p+=y.source.body)}return p}finally{--Ek==0&&$y.clear()}}(n||[]);return{start:0,end:u.length,source:{body:u,name:"GraphQLTada",locationOffset:{line:1,column:1}}}}return l},set loc(u){l=u}}}return t.scalar=function(n,r){return r},t.persisted=function(n,r){return{kind:ed.DOCUMENT,definitions:r?r.definitions:[],documentId:n}},t}function c8(...t){return t.length===2?t[1]:t[0]}wk();const _o=wk(),u8=_o(`
255
255
  query organization($id: ID!) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@well-played.gg/react-sdk",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "license": "MIT",
5
5
  "main": "dist/wp-react-sdk.cjs.js",
6
6
  "module": "dist/wp-react-sdk.es.js",