@well-played.gg/react-sdk 1.1.0 → 1.1.1

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,3 +1,4 @@
1
+ import { ApolloClient } from '@apollo/client';
1
2
  import { ApolloError } from '@apollo/client';
2
3
  import { ApolloQueryResult } from '@apollo/client';
3
4
  import { ErrorResponse } from '@apollo/client/link/error';
@@ -10,6 +11,7 @@ import { InvalidationPolicies } from '@nerdwallet/apollo-cache-policies/dist/pol
10
11
  import { JSX as JSX_2 } from 'react/jsx-runtime';
11
12
  import { LazyQueryHookOptions } from '@apollo/client/react/types/types';
12
13
  import { NoInfer as NoInfer_2 } from '@apollo/client/react/types/types';
14
+ import { NormalizedCacheObject } from '@apollo/client';
13
15
  import { OidcConfiguration } from '@axa-fr/oidc-client';
14
16
  import { OidcProviderProps } from '@axa-fr/react-oidc';
15
17
  import { PropsWithChildren } from 'react';
@@ -554,6 +556,7 @@ export declare const useTournamentTeams: ({ tournamentId, skip, status, }: {
554
556
 
555
557
  export declare const useWellPlayed: () => {
556
558
  organizationId: string;
559
+ apiClient: ApolloClient<NormalizedCacheObject>;
557
560
  };
558
561
 
559
562
  export { VariablesOf }
@@ -248,7 +248,7 @@ __p += '`),Ze&&(K+=`' +
248
248
  function print() { __p += __j.call(arguments, '') }
249
249
  `:`;
250
250
  `)+K+`return __p
251
- }`;var Ve=gw(function(){return ot(S,de+"return "+K).apply(n,A)});if(Ve.source=K,ym(Ve))throw Ve;return Ve}function H$(c){return at(c).toLowerCase()}function K$(c){return at(c).toUpperCase()}function J$(c,f,m){if(c=at(c),c&&(m||f===n))return O_(c);if(!c||!(f=sr(f)))return c;var v=Wr(c),E=Wr(f),S=k_(v,E),A=N_(v,E)+1;return us(v,S,A).join("")}function Y$(c,f,m){if(c=at(c),c&&(m||f===n))return c.slice(0,I_(c)+1);if(!c||!(f=sr(f)))return c;var v=Wr(c),E=N_(v,Wr(f))+1;return us(v,0,E).join("")}function X$(c,f,m){if(c=at(c),c&&(m||f===n))return c.replace(sa,"");if(!c||!(f=sr(f)))return c;var v=Wr(c),E=k_(v,Wr(f));return us(v,E).join("")}function Z$(c,f){var m=U,v=Te;if(Ot(f)){var E="separator"in f?f.separator:E;m="length"in f?$e(f.length):m,v="omission"in f?sr(f.omission):v}c=at(c);var S=c.length;if(la(c)){var A=Wr(c);S=A.length}if(m>=S)return c;var R=m-ca(v);if(R<1)return v;var $=A?us(A,0,R).join(""):c.slice(0,R);if(E===n)return $+v;if(A&&(R+=$.length-R),vm(E)){if(c.slice(R).search(E)){var G,H=$;for(E.global||(E=Mp(E.source,at(nt.exec(E))+"g")),E.lastIndex=0;G=E.exec(H);)var K=G.index;$=$.slice(0,K===n?R:K)}}else if(c.indexOf(sr(E),R)!=R){var re=$.lastIndexOf(E);re>-1&&($=$.slice(0,re))}return $+v}function eL(c){return c=at(c),c&&Nl.test(c)?c.replace(Oi,ID):c}var tL=ga(function(c,f,m){return c+(m?" ":"")+f.toUpperCase()}),Em=yE("toUpperCase");function mw(c,f,m){return c=at(c),f=m?n:f,f===n?SD(c)?DD(c):mD(c):c.match(f)||[]}var gw=Ue(function(c,f){try{return rr(c,n,f)}catch(m){return ym(m)?m:new De(m)}}),nL=xi(function(c,f){return _r(f,function(m){m=li(m),Ai(c,m,mm(c[m],c))}),c});function rL(c){var f=c==null?0:c.length,m=_e();return c=f?Tt(c,function(v){if(typeof v[1]!="function")throw new Er(o);return[m(v[0]),v[1]]}):[],Ue(function(v){for(var E=-1;++E<f;){var S=c[E];if(rr(S[0],this,v))return rr(S[1],this,v)}})}function iL(c){return IR(Tr(c,h))}function wm(c){return function(){return c}}function sL(c,f){return c==null||c!==c?f:c}var oL=bE(),aL=bE(!0);function Wn(c){return c}function Tm(c){return K_(typeof c=="function"?c:Tr(c,h))}function lL(c){return Y_(Tr(c,h))}function cL(c,f){return X_(c,Tr(f,h))}var uL=Ue(function(c,f){return function(m){return Ll(m,c,f)}}),fL=Ue(function(c,f){return function(m){return Ll(c,m,f)}});function Sm(c,f,m){var v=Jt(f),E=ef(f,v);m==null&&!(Ot(f)&&(E.length||!v.length))&&(m=f,f=c,c=this,E=ef(f,Jt(f)));var S=!(Ot(m)&&"chain"in m)||!!m.chain,A=Di(c);return _r(E,function(R){var $=f[R];c[R]=$,A&&(c.prototype[R]=function(){var G=this.__chain__;if(S||G){var H=c(this.__wrapped__),K=H.__actions__=Bn(this.__actions__);return K.push({func:$,args:arguments,thisArg:c}),H.__chain__=G,H}return $.apply(c,rs([this.value()],arguments))})}),c}function dL(){return sn._===this&&(sn._=LD),this}function Om(){}function hL(c){return c=$e(c),Ue(function(f){return Z_(f,c)})}var pL=nm(Tt),mL=nm(__),gL=nm(Np);function yw(c){return cm(c)?Ap(li(c)):QR(c)}function yL(c){return function(f){return c==null?n:oo(c,f)}}var vL=EE(),bL=EE(!0);function km(){return[]}function Nm(){return!1}function _L(){return{}}function EL(){return""}function wL(){return!0}function TL(c,f){if(c=$e(c),c<1||c>ve)return[];var m=Ne,v=mn(c,Ne);f=_e(f),c-=Ne;for(var E=Cp(v,f);++m<c;)f(m);return E}function SL(c){return Me(c)?Tt(c,li):or(c)?[c]:Bn($E(at(c)))}function OL(c){var f=++FD;return at(c)+f}var kL=af(function(c,f){return c+f},0),NL=rm("ceil"),AL=af(function(c,f){return c/f},1),IL=rm("floor");function xL(c){return c&&c.length?Zu(c,Wn,Up):n}function CL(c,f){return c&&c.length?Zu(c,_e(f,2),Up):n}function DL(c){return T_(c,Wn)}function RL(c,f){return T_(c,_e(f,2))}function ML(c){return c&&c.length?Zu(c,Wn,Qp):n}function PL(c,f){return c&&c.length?Zu(c,_e(f,2),Qp):n}var FL=af(function(c,f){return c*f},1),$L=rm("round"),LL=af(function(c,f){return c-f},0);function VL(c){return c&&c.length?xp(c,Wn):0}function jL(c,f){return c&&c.length?xp(c,_e(f,2)):0}return T.after=lF,T.ary=HE,T.assign=KF,T.assignIn=lw,T.assignInWith=_f,T.assignWith=JF,T.at=YF,T.before=KE,T.bind=mm,T.bindAll=nL,T.bindKey=JE,T.castArray=_F,T.chain=zE,T.chunk=IM,T.compact=xM,T.concat=CM,T.cond=rL,T.conforms=iL,T.constant=wm,T.countBy=VP,T.create=XF,T.curry=YE,T.curryRight=XE,T.debounce=ZE,T.defaults=ZF,T.defaultsDeep=e$,T.defer=cF,T.delay=uF,T.difference=DM,T.differenceBy=RM,T.differenceWith=MM,T.drop=PM,T.dropRight=FM,T.dropRightWhile=$M,T.dropWhile=LM,T.fill=VM,T.filter=BP,T.flatMap=WP,T.flatMapDeep=zP,T.flatMapDepth=QP,T.flatten=BE,T.flattenDeep=jM,T.flattenDepth=BM,T.flip=fF,T.flow=oL,T.flowRight=aL,T.fromPairs=UM,T.functions=a$,T.functionsIn=l$,T.groupBy=GP,T.initial=WM,T.intersection=zM,T.intersectionBy=QM,T.intersectionWith=GM,T.invert=u$,T.invertBy=f$,T.invokeMap=KP,T.iteratee=Tm,T.keyBy=JP,T.keys=Jt,T.keysIn=qn,T.map=pf,T.mapKeys=h$,T.mapValues=p$,T.matches=lL,T.matchesProperty=cL,T.memoize=gf,T.merge=m$,T.mergeWith=cw,T.method=uL,T.methodOf=fL,T.mixin=Sm,T.negate=yf,T.nthArg=hL,T.omit=g$,T.omitBy=y$,T.once=dF,T.orderBy=YP,T.over=pL,T.overArgs=hF,T.overEvery=mL,T.overSome=gL,T.partial=gm,T.partialRight=ew,T.partition=XP,T.pick=v$,T.pickBy=uw,T.property=yw,T.propertyOf=yL,T.pull=YM,T.pullAll=qE,T.pullAllBy=XM,T.pullAllWith=ZM,T.pullAt=eP,T.range=vL,T.rangeRight=bL,T.rearg=pF,T.reject=tF,T.remove=tP,T.rest=mF,T.reverse=hm,T.sampleSize=rF,T.set=_$,T.setWith=E$,T.shuffle=iF,T.slice=nP,T.sortBy=aF,T.sortedUniq=cP,T.sortedUniqBy=uP,T.split=W$,T.spread=gF,T.tail=fP,T.take=dP,T.takeRight=hP,T.takeRightWhile=pP,T.takeWhile=mP,T.tap=xP,T.throttle=yF,T.thru=hf,T.toArray=sw,T.toPairs=fw,T.toPairsIn=dw,T.toPath=SL,T.toPlainObject=aw,T.transform=w$,T.unary=vF,T.union=gP,T.unionBy=yP,T.unionWith=vP,T.uniq=bP,T.uniqBy=_P,T.uniqWith=EP,T.unset=T$,T.unzip=pm,T.unzipWith=WE,T.update=S$,T.updateWith=O$,T.values=ba,T.valuesIn=k$,T.without=wP,T.words=mw,T.wrap=bF,T.xor=TP,T.xorBy=SP,T.xorWith=OP,T.zip=kP,T.zipObject=NP,T.zipObjectDeep=AP,T.zipWith=IP,T.entries=fw,T.entriesIn=dw,T.extend=lw,T.extendWith=_f,Sm(T,T),T.add=kL,T.attempt=gw,T.camelCase=x$,T.capitalize=hw,T.ceil=NL,T.clamp=N$,T.clone=EF,T.cloneDeep=TF,T.cloneDeepWith=SF,T.cloneWith=wF,T.conformsTo=OF,T.deburr=pw,T.defaultTo=sL,T.divide=AL,T.endsWith=C$,T.eq=Qr,T.escape=D$,T.escapeRegExp=R$,T.every=jP,T.find=UP,T.findIndex=VE,T.findKey=t$,T.findLast=qP,T.findLastIndex=jE,T.findLastKey=n$,T.floor=IL,T.forEach=QE,T.forEachRight=GE,T.forIn=r$,T.forInRight=i$,T.forOwn=s$,T.forOwnRight=o$,T.get=bm,T.gt=kF,T.gte=NF,T.has=c$,T.hasIn=_m,T.head=UE,T.identity=Wn,T.includes=HP,T.indexOf=qM,T.inRange=A$,T.invoke=d$,T.isArguments=co,T.isArray=Me,T.isArrayBuffer=AF,T.isArrayLike=Un,T.isArrayLikeObject=Rt,T.isBoolean=IF,T.isBuffer=fs,T.isDate=xF,T.isElement=CF,T.isEmpty=DF,T.isEqual=RF,T.isEqualWith=MF,T.isError=ym,T.isFinite=PF,T.isFunction=Di,T.isInteger=tw,T.isLength=vf,T.isMap=nw,T.isMatch=FF,T.isMatchWith=$F,T.isNaN=LF,T.isNative=VF,T.isNil=BF,T.isNull=jF,T.isNumber=rw,T.isObject=Ot,T.isObjectLike=It,T.isPlainObject=Wl,T.isRegExp=vm,T.isSafeInteger=UF,T.isSet=iw,T.isString=bf,T.isSymbol=or,T.isTypedArray=va,T.isUndefined=qF,T.isWeakMap=WF,T.isWeakSet=zF,T.join=HM,T.kebabCase=M$,T.last=Or,T.lastIndexOf=KM,T.lowerCase=P$,T.lowerFirst=F$,T.lt=QF,T.lte=GF,T.max=xL,T.maxBy=CL,T.mean=DL,T.meanBy=RL,T.min=ML,T.minBy=PL,T.stubArray=km,T.stubFalse=Nm,T.stubObject=_L,T.stubString=EL,T.stubTrue=wL,T.multiply=FL,T.nth=JM,T.noConflict=dL,T.noop=Om,T.now=mf,T.pad=$$,T.padEnd=L$,T.padStart=V$,T.parseInt=j$,T.random=I$,T.reduce=ZP,T.reduceRight=eF,T.repeat=B$,T.replace=U$,T.result=b$,T.round=$L,T.runInContext=F,T.sample=nF,T.size=sF,T.snakeCase=q$,T.some=oF,T.sortedIndex=rP,T.sortedIndexBy=iP,T.sortedIndexOf=sP,T.sortedLastIndex=oP,T.sortedLastIndexBy=aP,T.sortedLastIndexOf=lP,T.startCase=z$,T.startsWith=Q$,T.subtract=LL,T.sum=VL,T.sumBy=jL,T.template=G$,T.times=TL,T.toFinite=Ri,T.toInteger=$e,T.toLength=ow,T.toLower=H$,T.toNumber=kr,T.toSafeInteger=HF,T.toString=at,T.toUpper=K$,T.trim=J$,T.trimEnd=Y$,T.trimStart=X$,T.truncate=Z$,T.unescape=eL,T.uniqueId=OL,T.upperCase=tL,T.upperFirst=Em,T.each=QE,T.eachRight=GE,T.first=UE,Sm(T,function(){var c={};return oi(T,function(f,m){ut.call(T.prototype,m)||(c[m]=f)}),c}(),{chain:!1}),T.VERSION=r,_r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){T[c].placeholder=T}),_r(["drop","take"],function(c,f){Ye.prototype[c]=function(m){m=m===n?1:qt($e(m),0);var v=this.__filtered__&&!f?new Ye(this):this.clone();return v.__filtered__?v.__takeCount__=mn(m,v.__takeCount__):v.__views__.push({size:mn(m,Ne),type:c+(v.__dir__<0?"Right":"")}),v},Ye.prototype[c+"Right"]=function(m){return this.reverse()[c](m).reverse()}}),_r(["filter","map","takeWhile"],function(c,f){var m=f+1,v=m==Ce||m==Ae;Ye.prototype[c]=function(E){var S=this.clone();return S.__iteratees__.push({iteratee:_e(E,3),type:m}),S.__filtered__=S.__filtered__||v,S}}),_r(["head","last"],function(c,f){var m="take"+(f?"Right":"");Ye.prototype[c]=function(){return this[m](1).value()[0]}}),_r(["initial","tail"],function(c,f){var m="drop"+(f?"":"Right");Ye.prototype[c]=function(){return this.__filtered__?new Ye(this):this[m](1)}}),Ye.prototype.compact=function(){return this.filter(Wn)},Ye.prototype.find=function(c){return this.filter(c).head()},Ye.prototype.findLast=function(c){return this.reverse().find(c)},Ye.prototype.invokeMap=Ue(function(c,f){return typeof c=="function"?new Ye(this):this.map(function(m){return Ll(m,c,f)})}),Ye.prototype.reject=function(c){return this.filter(yf(_e(c)))},Ye.prototype.slice=function(c,f){c=$e(c);var m=this;return m.__filtered__&&(c>0||f<0)?new Ye(m):(c<0?m=m.takeRight(-c):c&&(m=m.drop(c)),f!==n&&(f=$e(f),m=f<0?m.dropRight(-f):m.take(f-c)),m)},Ye.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ye.prototype.toArray=function(){return this.take(Ne)},oi(Ye.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__,R=v?[1]:arguments,$=A instanceof Ye,G=R[0],H=$||Me(A),K=function(Ge){var Ze=E.apply(T,rs([Ge],R));return v&&re?Ze[0]:Ze};H&&m&&typeof G=="function"&&G.length!=1&&($=H=!1);var re=this.__chain__,de=!!this.__actions__.length,Ee=S&&!re,Ve=$&&!de;if(!S&&H){A=Ve?A:new Ye(this);var we=c.apply(A,R);return we.__actions__.push({func:hf,args:[K],thisArg:n}),new wr(we,re)}return Ee&&Ve?c.apply(this,R):(we=this.thru(K),Ee?v?we.value()[0]:we.value():we)})}),_r(["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(Me(S)?S:[],E)}return this[m](function(A){return f.apply(Me(A)?A:[],E)})}}),oi(Ye.prototype,function(c,f){var m=T[f];if(m){var v=m.name+"";ut.call(ha,v)||(ha[v]=[]),ha[v].push({name:f,func:m})}}),ha[of(n,w).name]=[{name:"wrapper",func:n}],Ye.prototype.clone=eR,Ye.prototype.reverse=tR,Ye.prototype.value=nR,T.prototype.at=CP,T.prototype.chain=DP,T.prototype.commit=RP,T.prototype.next=MP,T.prototype.plant=FP,T.prototype.reverse=$P,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=LP,T.prototype.first=T.prototype.head,Cl&&(T.prototype[Cl]=PP),T},ua=RD();to?((to.exports=ua)._=ua,Tp._=ua):sn._=ua}).call(Pe)})(Fd,Fd.exports);var xy=Fd.exports;function Qn(t){return t===null?"null":Array.isArray(t)?"array":typeof t}function po(t){return Qn(t)==="object"}function kee(t){return Array.isArray(t)&&t.length>0&&t.every(e=>"message"in e)}function aO(t,e){return t.length<124?t:e}const Nee="graphql-transport-ws";var cr;(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"})(cr||(cr={}));var Pt;(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"})(Pt||(Pt={}));function UI(t){if(!po(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 Pt.ConnectionInit:case Pt.ConnectionAck:case Pt.Ping:case Pt.Pong:{if(t.payload!=null&&!po(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 Pt.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(!po(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&&!po(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&&!po(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 Pt.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(!po(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object, but got ${Qn(t.payload)}`);break}case Pt.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(!kee(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 Pt.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 Aee(t,e){return UI(typeof t=="string"?JSON.parse(t,e):t)}function rc(t,e){return UI(t),JSON.stringify(t,e)}var Fa=function(t){return this instanceof Fa?(this.v=t,this):new Fa(t)},Iee=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 Fa?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 xee(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 ve=0;ve<Ae;ve++)fe*=2;await new Promise(ve=>setTimeout(ve,fe+Math.floor(Math.random()*2700+300)))},shouldRetry:h=ug,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(!Dee(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 ee=(()=>{const fe={};return{on(ve,Se){return fe[ve]=Se,()=>{delete fe[ve]}},emit(ve){var Se;"id"in ve&&((Se=fe[ve.id])===null||Se===void 0||Se.call(fe,ve))}}})(),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?[ee.emit,g.message]:[ee.emit],closed:g!=null&&g.closed?[g.closed]:[],error:g!=null&&g.error?[g.error]:[]};return{onMessage:ee.on,on(fe,ve){const Se=Ae[fe];return Se.push(ve),()=>{Se.splice(Se.indexOf(ve),1)}},emit(fe,...ve){for(const Se of[...Ae[fe]])Se(...ve)}}})();function P(ee){const Ae=[I.on("error",fe=>{Ae.forEach(ve=>ve()),ee(fe)}),I.on("closed",fe=>{Ae.forEach(ve=>ve()),ee(fe)})]}let M,B=0,Q,x=!1,U=0,Te=!1;async function ke(){clearTimeout(Q);const[ee,Ae]=await(M??(M=new Promise((Se,dt)=>(async()=>{if(x){if(await d(U),!B)return M=void 0,dt({code:1e3,reason:"All Subscriptions Gone"});U++}I.emit("connecting",x);const Ne=new N(typeof e=="function"?await e():e,Nee);let L,te;function X(){isFinite(o)&&o>0&&(clearTimeout(te),te=setTimeout(()=>{Ne.readyState===N.OPEN&&(Ne.send(rc({type:Pt.Ping})),I.emit("ping",!1,void 0))},o))}P(be=>{M=void 0,clearTimeout(L),clearTimeout(te),dt(be),be instanceof lO&&(Ne.close(4499,"Terminated"),Ne.onerror=null,Ne.onclose=null)}),Ne.onerror=be=>I.emit("error",be),Ne.onclose=be=>I.emit("closed",be),Ne.onopen=async()=>{try{I.emit("opened",Ne);const be=typeof n=="function"?await n():n;if(Ne.readyState!==N.OPEN)return;Ne.send(rc(be?{type:Pt.ConnectionInit,payload:be}:{type:Pt.ConnectionInit},_)),isFinite(l)&&l>0&&(L=setTimeout(()=>{Ne.close(cr.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},l)),X()}catch(be){I.emit("error",be),Ne.close(cr.InternalClientError,aO(be instanceof Error?be.message:new Error(be).message,"Internal client error"))}};let ne=!1;Ne.onmessage=({data:be})=>{try{const Re=Aee(be,w);if(I.emit("message",Re),Re.type==="ping"||Re.type==="pong"){I.emit(Re.type,!0,Re.payload),Re.type==="pong"?X():a||(Ne.send(rc(Re.payload?{type:Pt.Pong,payload:Re.payload}:{type:Pt.Pong})),I.emit("pong",!1,Re.payload));return}if(ne)return;if(Re.type!==Pt.ConnectionAck)throw new Error(`First message cannot be of type ${Re.type}`);clearTimeout(L),ne=!0,I.emit("connected",Ne,Re.payload,x),x=!1,U=0,Se([Ne,new Promise((Ke,Kt)=>P(Kt))])}catch(Re){Ne.onmessage=null,I.emit("error",Re),Ne.close(cr.BadResponse,aO(Re instanceof Error?Re.message:new Error(Re).message,"Bad response"))}}})())));ee.readyState===N.CLOSING&&await Ae;let fe=()=>{};const ve=new Promise(Se=>fe=Se);return[ee,fe,Promise.race([ve.then(()=>{if(!B){const Se=()=>ee.close(1e3,"Normal Closure");isFinite(s)&&s>0?Q=setTimeout(()=>{ee.readyState===N.OPEN&&Se()},s):Se()}}),Ae])]}function he(ee){if(ug(ee)&&(Cee(ee.code)||[cr.InternalServerError,cr.InternalClientError,cr.BadRequest,cr.BadResponse,cr.Unauthorized,cr.SubprotocolNotAcceptable,cr.SubscriberAlreadyExists,cr.TooManyInitialisationRequests].includes(ee.code)))throw ee;if(Te)return!1;if(ug(ee)&&ee.code===1e3)return B>0;if(!u||U>=u||!h(ee)||p!=null&&p(ee))throw ee;return x=!0}r||(async()=>{for(B++;;)try{const[,,ee]=await ke();await ee}catch(ee){try{if(!he(ee))return}catch(Ae){return i==null?void 0:i(Ae)}}})();function Ce(ee,Ae){const fe=b(ee);let ve=!1,Se=!1,dt=()=>{B--,ve=!0};return(async()=>{for(B++;;)try{const[Ne,L,te]=await ke();if(ve)return L();const X=I.onMessage(fe,ne=>{switch(ne.type){case Pt.Next:{Ae.next(ne.payload);return}case Pt.Error:{Se=!0,ve=!0,Ae.error(ne.payload),dt();return}case Pt.Complete:{ve=!0,dt();return}}});Ne.send(rc({id:fe,type:Pt.Subscribe,payload:ee},_)),dt=()=>{!ve&&Ne.readyState===N.OPEN&&Ne.send(rc({id:fe,type:Pt.Complete},_)),B--,ve=!0,L()},await te.finally(X);return}catch(Ne){if(!he(Ne))return}})().then(()=>{Se||Ae.complete()}).catch(Ne=>{Ae.error(Ne)}),()=>{ve||dt()}}return{on:I.on,subscribe:Ce,iterate(ee){const Ae=[],fe={done:!1,error:null,resolve:()=>{}},ve=Ce(ee,{next(dt){Ae.push(dt),fe.resolve()},error(dt){fe.done=!0,fe.error=dt,fe.resolve()},complete(){fe.done=!0,fe.resolve()}}),Se=function(){return Iee(this,arguments,function*(){for(;;){for(Ae.length||(yield Fa(new Promise(L=>fe.resolve=L)));Ae.length;)yield yield Fa(Ae.shift());if(fe.error)throw fe.error;if(fe.done)return yield Fa(void 0)}})}();return Se.throw=async dt=>(fe.done||(fe.done=!0,fe.error=dt,fe.resolve()),{done:!0,value:void 0}),Se.return=async()=>(ve(),{done:!0,value:void 0}),Se},async dispose(){if(Te=!0,M){const[ee]=await M;ee.close(1e3,"Normal Closure")}},terminate(){M&&I.emit("closed",new lO)}}}class lO extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function ug(t){return po(t)&&"code"in t&&"reason"in t}function Cee(t){return[1e3,1001,1006,1005,1012,1013,1014].includes(t)?!1:t>=1e3&&t<=1999}function Dee(t){return typeof t=="function"&&"constructor"in t&&"CLOSED"in t&&"CLOSING"in t&&"CONNECTING"in t&&"OPEN"in t}const Ree=({apiUrl:t,listeners:e})=>{const n=xee({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},cO="api.warrior.well-played.gg/graphql",Mee=({token:t,organizationId:e,invalidationPolicies:n,handlers:r})=>{const i=new Sy.InvalidationPolicyCache({invalidationPolicies:{...n,timeToLive:(n==null?void 0:n.timeToLive)??12e4,renewalPolicy:(n==null?void 0:n.renewalPolicy)??Sy.RenewalPolicy.None}});Eee({cache:i,storage:new Oee(window.localStorage)});const s=mb(({query:o})=>{const a=Go(o);return a.kind==="OperationDefinition"&&a.operation==="subscription"},new mz(Ree({apiUrl:cO,listeners:r==null?void 0:r.webSocket})),pb([dz(async()=>({headers:xy.omitBy({"organization-id":e,authorization:t?`Bearer ${t}`:void 0},xy.isNil)})),JA(({graphQLErrors:o,networkError:a,operation:l,forward:u})=>{var d;return(d=r==null?void 0:r.onError)==null||d.call(r,{graphQLErrors:o,networkError:a}),u(l)}),new Oh({uri:`https://${cO}`})]));return new Ih({cache:i,link:s,defaultOptions:{watchQuery:{fetchPolicy:"network-only",errorPolicy:"ignore"},query:{fetchPolicy:"network-only",errorPolicy:"all"},mutate:{errorPolicy:"all"}}})},qI=le.createContext({}),WI=()=>{const t=le.useContext(qI);if(!t)throw new Error("useWellPlayed must be used within a WellPlayedProvider");return t},Pee=({children:t,clientConfig:e,organizationId:n})=>{const r=fz();return pe.jsx(TA,{client:Mee({token:(r==null?void 0:r.accessToken)??void 0,organizationId:n,...e}),children:pe.jsx(qI.Provider,{value:{organizationId:n},children:t})})},Fee=({children:t,oidcConfig:e,wpAppConfig:n,...r})=>pe.jsx(az,{...e,configuration:{...n,...e==null?void 0:e.configuration,authority:"https://oauth.warrior.well-played.gg"},children:pe.jsx(Pee,{...r,children:t})}),$ee=(t,e)=>{const{data:n,loading:r,refetch:i,fetchMore:s}=fu(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}}})}}},O0=(t,e)=>{const[n,r]=le.useState(!(e!=null&&e.skip)),[i,s]=le.useState([]),[o]=$b(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 Pf={DOCUMENT:"Document",FRAGMENT_DEFINITION:"FragmentDefinition"};class Lee 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 st,ge;function Ft(t){return new Lee(`Syntax Error: Unexpected token at ${ge} in ${t}`)}function dr(t){if(t.lastIndex=ge,t.test(st))return st.slice(ge,ge=t.lastIndex)}var Ff=/ +(?=[^\s])/y;function Vee(t){for(var e=t.split(`
251
+ }`;var Ve=gw(function(){return ot(S,de+"return "+K).apply(n,A)});if(Ve.source=K,ym(Ve))throw Ve;return Ve}function H$(c){return at(c).toLowerCase()}function K$(c){return at(c).toUpperCase()}function J$(c,f,m){if(c=at(c),c&&(m||f===n))return O_(c);if(!c||!(f=sr(f)))return c;var v=Wr(c),E=Wr(f),S=k_(v,E),A=N_(v,E)+1;return us(v,S,A).join("")}function Y$(c,f,m){if(c=at(c),c&&(m||f===n))return c.slice(0,I_(c)+1);if(!c||!(f=sr(f)))return c;var v=Wr(c),E=N_(v,Wr(f))+1;return us(v,0,E).join("")}function X$(c,f,m){if(c=at(c),c&&(m||f===n))return c.replace(sa,"");if(!c||!(f=sr(f)))return c;var v=Wr(c),E=k_(v,Wr(f));return us(v,E).join("")}function Z$(c,f){var m=U,v=Te;if(Ot(f)){var E="separator"in f?f.separator:E;m="length"in f?$e(f.length):m,v="omission"in f?sr(f.omission):v}c=at(c);var S=c.length;if(la(c)){var A=Wr(c);S=A.length}if(m>=S)return c;var R=m-ca(v);if(R<1)return v;var $=A?us(A,0,R).join(""):c.slice(0,R);if(E===n)return $+v;if(A&&(R+=$.length-R),vm(E)){if(c.slice(R).search(E)){var G,H=$;for(E.global||(E=Mp(E.source,at(nt.exec(E))+"g")),E.lastIndex=0;G=E.exec(H);)var K=G.index;$=$.slice(0,K===n?R:K)}}else if(c.indexOf(sr(E),R)!=R){var re=$.lastIndexOf(E);re>-1&&($=$.slice(0,re))}return $+v}function eL(c){return c=at(c),c&&Nl.test(c)?c.replace(Oi,ID):c}var tL=ga(function(c,f,m){return c+(m?" ":"")+f.toUpperCase()}),Em=yE("toUpperCase");function mw(c,f,m){return c=at(c),f=m?n:f,f===n?SD(c)?DD(c):mD(c):c.match(f)||[]}var gw=Ue(function(c,f){try{return rr(c,n,f)}catch(m){return ym(m)?m:new De(m)}}),nL=xi(function(c,f){return _r(f,function(m){m=li(m),Ai(c,m,mm(c[m],c))}),c});function rL(c){var f=c==null?0:c.length,m=_e();return c=f?Tt(c,function(v){if(typeof v[1]!="function")throw new Er(o);return[m(v[0]),v[1]]}):[],Ue(function(v){for(var E=-1;++E<f;){var S=c[E];if(rr(S[0],this,v))return rr(S[1],this,v)}})}function iL(c){return IR(Tr(c,h))}function wm(c){return function(){return c}}function sL(c,f){return c==null||c!==c?f:c}var oL=bE(),aL=bE(!0);function Wn(c){return c}function Tm(c){return K_(typeof c=="function"?c:Tr(c,h))}function lL(c){return Y_(Tr(c,h))}function cL(c,f){return X_(c,Tr(f,h))}var uL=Ue(function(c,f){return function(m){return Ll(m,c,f)}}),fL=Ue(function(c,f){return function(m){return Ll(c,m,f)}});function Sm(c,f,m){var v=Jt(f),E=ef(f,v);m==null&&!(Ot(f)&&(E.length||!v.length))&&(m=f,f=c,c=this,E=ef(f,Jt(f)));var S=!(Ot(m)&&"chain"in m)||!!m.chain,A=Di(c);return _r(E,function(R){var $=f[R];c[R]=$,A&&(c.prototype[R]=function(){var G=this.__chain__;if(S||G){var H=c(this.__wrapped__),K=H.__actions__=Bn(this.__actions__);return K.push({func:$,args:arguments,thisArg:c}),H.__chain__=G,H}return $.apply(c,rs([this.value()],arguments))})}),c}function dL(){return sn._===this&&(sn._=LD),this}function Om(){}function hL(c){return c=$e(c),Ue(function(f){return Z_(f,c)})}var pL=nm(Tt),mL=nm(__),gL=nm(Np);function yw(c){return cm(c)?Ap(li(c)):QR(c)}function yL(c){return function(f){return c==null?n:oo(c,f)}}var vL=EE(),bL=EE(!0);function km(){return[]}function Nm(){return!1}function _L(){return{}}function EL(){return""}function wL(){return!0}function TL(c,f){if(c=$e(c),c<1||c>ve)return[];var m=Ne,v=mn(c,Ne);f=_e(f),c-=Ne;for(var E=Cp(v,f);++m<c;)f(m);return E}function SL(c){return Me(c)?Tt(c,li):or(c)?[c]:Bn($E(at(c)))}function OL(c){var f=++FD;return at(c)+f}var kL=af(function(c,f){return c+f},0),NL=rm("ceil"),AL=af(function(c,f){return c/f},1),IL=rm("floor");function xL(c){return c&&c.length?Zu(c,Wn,Up):n}function CL(c,f){return c&&c.length?Zu(c,_e(f,2),Up):n}function DL(c){return T_(c,Wn)}function RL(c,f){return T_(c,_e(f,2))}function ML(c){return c&&c.length?Zu(c,Wn,Qp):n}function PL(c,f){return c&&c.length?Zu(c,_e(f,2),Qp):n}var FL=af(function(c,f){return c*f},1),$L=rm("round"),LL=af(function(c,f){return c-f},0);function VL(c){return c&&c.length?xp(c,Wn):0}function jL(c,f){return c&&c.length?xp(c,_e(f,2)):0}return T.after=lF,T.ary=HE,T.assign=KF,T.assignIn=lw,T.assignInWith=_f,T.assignWith=JF,T.at=YF,T.before=KE,T.bind=mm,T.bindAll=nL,T.bindKey=JE,T.castArray=_F,T.chain=zE,T.chunk=IM,T.compact=xM,T.concat=CM,T.cond=rL,T.conforms=iL,T.constant=wm,T.countBy=VP,T.create=XF,T.curry=YE,T.curryRight=XE,T.debounce=ZE,T.defaults=ZF,T.defaultsDeep=e$,T.defer=cF,T.delay=uF,T.difference=DM,T.differenceBy=RM,T.differenceWith=MM,T.drop=PM,T.dropRight=FM,T.dropRightWhile=$M,T.dropWhile=LM,T.fill=VM,T.filter=BP,T.flatMap=WP,T.flatMapDeep=zP,T.flatMapDepth=QP,T.flatten=BE,T.flattenDeep=jM,T.flattenDepth=BM,T.flip=fF,T.flow=oL,T.flowRight=aL,T.fromPairs=UM,T.functions=a$,T.functionsIn=l$,T.groupBy=GP,T.initial=WM,T.intersection=zM,T.intersectionBy=QM,T.intersectionWith=GM,T.invert=u$,T.invertBy=f$,T.invokeMap=KP,T.iteratee=Tm,T.keyBy=JP,T.keys=Jt,T.keysIn=qn,T.map=pf,T.mapKeys=h$,T.mapValues=p$,T.matches=lL,T.matchesProperty=cL,T.memoize=gf,T.merge=m$,T.mergeWith=cw,T.method=uL,T.methodOf=fL,T.mixin=Sm,T.negate=yf,T.nthArg=hL,T.omit=g$,T.omitBy=y$,T.once=dF,T.orderBy=YP,T.over=pL,T.overArgs=hF,T.overEvery=mL,T.overSome=gL,T.partial=gm,T.partialRight=ew,T.partition=XP,T.pick=v$,T.pickBy=uw,T.property=yw,T.propertyOf=yL,T.pull=YM,T.pullAll=qE,T.pullAllBy=XM,T.pullAllWith=ZM,T.pullAt=eP,T.range=vL,T.rangeRight=bL,T.rearg=pF,T.reject=tF,T.remove=tP,T.rest=mF,T.reverse=hm,T.sampleSize=rF,T.set=_$,T.setWith=E$,T.shuffle=iF,T.slice=nP,T.sortBy=aF,T.sortedUniq=cP,T.sortedUniqBy=uP,T.split=W$,T.spread=gF,T.tail=fP,T.take=dP,T.takeRight=hP,T.takeRightWhile=pP,T.takeWhile=mP,T.tap=xP,T.throttle=yF,T.thru=hf,T.toArray=sw,T.toPairs=fw,T.toPairsIn=dw,T.toPath=SL,T.toPlainObject=aw,T.transform=w$,T.unary=vF,T.union=gP,T.unionBy=yP,T.unionWith=vP,T.uniq=bP,T.uniqBy=_P,T.uniqWith=EP,T.unset=T$,T.unzip=pm,T.unzipWith=WE,T.update=S$,T.updateWith=O$,T.values=ba,T.valuesIn=k$,T.without=wP,T.words=mw,T.wrap=bF,T.xor=TP,T.xorBy=SP,T.xorWith=OP,T.zip=kP,T.zipObject=NP,T.zipObjectDeep=AP,T.zipWith=IP,T.entries=fw,T.entriesIn=dw,T.extend=lw,T.extendWith=_f,Sm(T,T),T.add=kL,T.attempt=gw,T.camelCase=x$,T.capitalize=hw,T.ceil=NL,T.clamp=N$,T.clone=EF,T.cloneDeep=TF,T.cloneDeepWith=SF,T.cloneWith=wF,T.conformsTo=OF,T.deburr=pw,T.defaultTo=sL,T.divide=AL,T.endsWith=C$,T.eq=Qr,T.escape=D$,T.escapeRegExp=R$,T.every=jP,T.find=UP,T.findIndex=VE,T.findKey=t$,T.findLast=qP,T.findLastIndex=jE,T.findLastKey=n$,T.floor=IL,T.forEach=QE,T.forEachRight=GE,T.forIn=r$,T.forInRight=i$,T.forOwn=s$,T.forOwnRight=o$,T.get=bm,T.gt=kF,T.gte=NF,T.has=c$,T.hasIn=_m,T.head=UE,T.identity=Wn,T.includes=HP,T.indexOf=qM,T.inRange=A$,T.invoke=d$,T.isArguments=co,T.isArray=Me,T.isArrayBuffer=AF,T.isArrayLike=Un,T.isArrayLikeObject=Rt,T.isBoolean=IF,T.isBuffer=fs,T.isDate=xF,T.isElement=CF,T.isEmpty=DF,T.isEqual=RF,T.isEqualWith=MF,T.isError=ym,T.isFinite=PF,T.isFunction=Di,T.isInteger=tw,T.isLength=vf,T.isMap=nw,T.isMatch=FF,T.isMatchWith=$F,T.isNaN=LF,T.isNative=VF,T.isNil=BF,T.isNull=jF,T.isNumber=rw,T.isObject=Ot,T.isObjectLike=It,T.isPlainObject=Wl,T.isRegExp=vm,T.isSafeInteger=UF,T.isSet=iw,T.isString=bf,T.isSymbol=or,T.isTypedArray=va,T.isUndefined=qF,T.isWeakMap=WF,T.isWeakSet=zF,T.join=HM,T.kebabCase=M$,T.last=Or,T.lastIndexOf=KM,T.lowerCase=P$,T.lowerFirst=F$,T.lt=QF,T.lte=GF,T.max=xL,T.maxBy=CL,T.mean=DL,T.meanBy=RL,T.min=ML,T.minBy=PL,T.stubArray=km,T.stubFalse=Nm,T.stubObject=_L,T.stubString=EL,T.stubTrue=wL,T.multiply=FL,T.nth=JM,T.noConflict=dL,T.noop=Om,T.now=mf,T.pad=$$,T.padEnd=L$,T.padStart=V$,T.parseInt=j$,T.random=I$,T.reduce=ZP,T.reduceRight=eF,T.repeat=B$,T.replace=U$,T.result=b$,T.round=$L,T.runInContext=F,T.sample=nF,T.size=sF,T.snakeCase=q$,T.some=oF,T.sortedIndex=rP,T.sortedIndexBy=iP,T.sortedIndexOf=sP,T.sortedLastIndex=oP,T.sortedLastIndexBy=aP,T.sortedLastIndexOf=lP,T.startCase=z$,T.startsWith=Q$,T.subtract=LL,T.sum=VL,T.sumBy=jL,T.template=G$,T.times=TL,T.toFinite=Ri,T.toInteger=$e,T.toLength=ow,T.toLower=H$,T.toNumber=kr,T.toSafeInteger=HF,T.toString=at,T.toUpper=K$,T.trim=J$,T.trimEnd=Y$,T.trimStart=X$,T.truncate=Z$,T.unescape=eL,T.uniqueId=OL,T.upperCase=tL,T.upperFirst=Em,T.each=QE,T.eachRight=GE,T.first=UE,Sm(T,function(){var c={};return oi(T,function(f,m){ut.call(T.prototype,m)||(c[m]=f)}),c}(),{chain:!1}),T.VERSION=r,_r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){T[c].placeholder=T}),_r(["drop","take"],function(c,f){Ye.prototype[c]=function(m){m=m===n?1:qt($e(m),0);var v=this.__filtered__&&!f?new Ye(this):this.clone();return v.__filtered__?v.__takeCount__=mn(m,v.__takeCount__):v.__views__.push({size:mn(m,Ne),type:c+(v.__dir__<0?"Right":"")}),v},Ye.prototype[c+"Right"]=function(m){return this.reverse()[c](m).reverse()}}),_r(["filter","map","takeWhile"],function(c,f){var m=f+1,v=m==Ce||m==Ae;Ye.prototype[c]=function(E){var S=this.clone();return S.__iteratees__.push({iteratee:_e(E,3),type:m}),S.__filtered__=S.__filtered__||v,S}}),_r(["head","last"],function(c,f){var m="take"+(f?"Right":"");Ye.prototype[c]=function(){return this[m](1).value()[0]}}),_r(["initial","tail"],function(c,f){var m="drop"+(f?"":"Right");Ye.prototype[c]=function(){return this.__filtered__?new Ye(this):this[m](1)}}),Ye.prototype.compact=function(){return this.filter(Wn)},Ye.prototype.find=function(c){return this.filter(c).head()},Ye.prototype.findLast=function(c){return this.reverse().find(c)},Ye.prototype.invokeMap=Ue(function(c,f){return typeof c=="function"?new Ye(this):this.map(function(m){return Ll(m,c,f)})}),Ye.prototype.reject=function(c){return this.filter(yf(_e(c)))},Ye.prototype.slice=function(c,f){c=$e(c);var m=this;return m.__filtered__&&(c>0||f<0)?new Ye(m):(c<0?m=m.takeRight(-c):c&&(m=m.drop(c)),f!==n&&(f=$e(f),m=f<0?m.dropRight(-f):m.take(f-c)),m)},Ye.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Ye.prototype.toArray=function(){return this.take(Ne)},oi(Ye.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__,R=v?[1]:arguments,$=A instanceof Ye,G=R[0],H=$||Me(A),K=function(Ge){var Ze=E.apply(T,rs([Ge],R));return v&&re?Ze[0]:Ze};H&&m&&typeof G=="function"&&G.length!=1&&($=H=!1);var re=this.__chain__,de=!!this.__actions__.length,Ee=S&&!re,Ve=$&&!de;if(!S&&H){A=Ve?A:new Ye(this);var we=c.apply(A,R);return we.__actions__.push({func:hf,args:[K],thisArg:n}),new wr(we,re)}return Ee&&Ve?c.apply(this,R):(we=this.thru(K),Ee?v?we.value()[0]:we.value():we)})}),_r(["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(Me(S)?S:[],E)}return this[m](function(A){return f.apply(Me(A)?A:[],E)})}}),oi(Ye.prototype,function(c,f){var m=T[f];if(m){var v=m.name+"";ut.call(ha,v)||(ha[v]=[]),ha[v].push({name:f,func:m})}}),ha[of(n,w).name]=[{name:"wrapper",func:n}],Ye.prototype.clone=eR,Ye.prototype.reverse=tR,Ye.prototype.value=nR,T.prototype.at=CP,T.prototype.chain=DP,T.prototype.commit=RP,T.prototype.next=MP,T.prototype.plant=FP,T.prototype.reverse=$P,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=LP,T.prototype.first=T.prototype.head,Cl&&(T.prototype[Cl]=PP),T},ua=RD();to?((to.exports=ua)._=ua,Tp._=ua):sn._=ua}).call(Pe)})(Fd,Fd.exports);var xy=Fd.exports;function Qn(t){return t===null?"null":Array.isArray(t)?"array":typeof t}function po(t){return Qn(t)==="object"}function kee(t){return Array.isArray(t)&&t.length>0&&t.every(e=>"message"in e)}function aO(t,e){return t.length<124?t:e}const Nee="graphql-transport-ws";var cr;(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"})(cr||(cr={}));var Pt;(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"})(Pt||(Pt={}));function UI(t){if(!po(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 Pt.ConnectionInit:case Pt.ConnectionAck:case Pt.Ping:case Pt.Pong:{if(t.payload!=null&&!po(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 Pt.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(!po(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&&!po(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&&!po(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 Pt.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(!po(t.payload))throw new Error(`"${t.type}" message expects the 'payload' property to be an object, but got ${Qn(t.payload)}`);break}case Pt.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(!kee(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 Pt.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 Aee(t,e){return UI(typeof t=="string"?JSON.parse(t,e):t)}function rc(t,e){return UI(t),JSON.stringify(t,e)}var Fa=function(t){return this instanceof Fa?(this.v=t,this):new Fa(t)},Iee=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 Fa?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 xee(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 ve=0;ve<Ae;ve++)fe*=2;await new Promise(ve=>setTimeout(ve,fe+Math.floor(Math.random()*2700+300)))},shouldRetry:h=ug,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(!Dee(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 ee=(()=>{const fe={};return{on(ve,Se){return fe[ve]=Se,()=>{delete fe[ve]}},emit(ve){var Se;"id"in ve&&((Se=fe[ve.id])===null||Se===void 0||Se.call(fe,ve))}}})(),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?[ee.emit,g.message]:[ee.emit],closed:g!=null&&g.closed?[g.closed]:[],error:g!=null&&g.error?[g.error]:[]};return{onMessage:ee.on,on(fe,ve){const Se=Ae[fe];return Se.push(ve),()=>{Se.splice(Se.indexOf(ve),1)}},emit(fe,...ve){for(const Se of[...Ae[fe]])Se(...ve)}}})();function P(ee){const Ae=[I.on("error",fe=>{Ae.forEach(ve=>ve()),ee(fe)}),I.on("closed",fe=>{Ae.forEach(ve=>ve()),ee(fe)})]}let M,B=0,Q,x=!1,U=0,Te=!1;async function ke(){clearTimeout(Q);const[ee,Ae]=await(M??(M=new Promise((Se,dt)=>(async()=>{if(x){if(await d(U),!B)return M=void 0,dt({code:1e3,reason:"All Subscriptions Gone"});U++}I.emit("connecting",x);const Ne=new N(typeof e=="function"?await e():e,Nee);let L,te;function X(){isFinite(o)&&o>0&&(clearTimeout(te),te=setTimeout(()=>{Ne.readyState===N.OPEN&&(Ne.send(rc({type:Pt.Ping})),I.emit("ping",!1,void 0))},o))}P(be=>{M=void 0,clearTimeout(L),clearTimeout(te),dt(be),be instanceof lO&&(Ne.close(4499,"Terminated"),Ne.onerror=null,Ne.onclose=null)}),Ne.onerror=be=>I.emit("error",be),Ne.onclose=be=>I.emit("closed",be),Ne.onopen=async()=>{try{I.emit("opened",Ne);const be=typeof n=="function"?await n():n;if(Ne.readyState!==N.OPEN)return;Ne.send(rc(be?{type:Pt.ConnectionInit,payload:be}:{type:Pt.ConnectionInit},_)),isFinite(l)&&l>0&&(L=setTimeout(()=>{Ne.close(cr.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},l)),X()}catch(be){I.emit("error",be),Ne.close(cr.InternalClientError,aO(be instanceof Error?be.message:new Error(be).message,"Internal client error"))}};let ne=!1;Ne.onmessage=({data:be})=>{try{const Re=Aee(be,w);if(I.emit("message",Re),Re.type==="ping"||Re.type==="pong"){I.emit(Re.type,!0,Re.payload),Re.type==="pong"?X():a||(Ne.send(rc(Re.payload?{type:Pt.Pong,payload:Re.payload}:{type:Pt.Pong})),I.emit("pong",!1,Re.payload));return}if(ne)return;if(Re.type!==Pt.ConnectionAck)throw new Error(`First message cannot be of type ${Re.type}`);clearTimeout(L),ne=!0,I.emit("connected",Ne,Re.payload,x),x=!1,U=0,Se([Ne,new Promise((Ke,Kt)=>P(Kt))])}catch(Re){Ne.onmessage=null,I.emit("error",Re),Ne.close(cr.BadResponse,aO(Re instanceof Error?Re.message:new Error(Re).message,"Bad response"))}}})())));ee.readyState===N.CLOSING&&await Ae;let fe=()=>{};const ve=new Promise(Se=>fe=Se);return[ee,fe,Promise.race([ve.then(()=>{if(!B){const Se=()=>ee.close(1e3,"Normal Closure");isFinite(s)&&s>0?Q=setTimeout(()=>{ee.readyState===N.OPEN&&Se()},s):Se()}}),Ae])]}function he(ee){if(ug(ee)&&(Cee(ee.code)||[cr.InternalServerError,cr.InternalClientError,cr.BadRequest,cr.BadResponse,cr.Unauthorized,cr.SubprotocolNotAcceptable,cr.SubscriberAlreadyExists,cr.TooManyInitialisationRequests].includes(ee.code)))throw ee;if(Te)return!1;if(ug(ee)&&ee.code===1e3)return B>0;if(!u||U>=u||!h(ee)||p!=null&&p(ee))throw ee;return x=!0}r||(async()=>{for(B++;;)try{const[,,ee]=await ke();await ee}catch(ee){try{if(!he(ee))return}catch(Ae){return i==null?void 0:i(Ae)}}})();function Ce(ee,Ae){const fe=b(ee);let ve=!1,Se=!1,dt=()=>{B--,ve=!0};return(async()=>{for(B++;;)try{const[Ne,L,te]=await ke();if(ve)return L();const X=I.onMessage(fe,ne=>{switch(ne.type){case Pt.Next:{Ae.next(ne.payload);return}case Pt.Error:{Se=!0,ve=!0,Ae.error(ne.payload),dt();return}case Pt.Complete:{ve=!0,dt();return}}});Ne.send(rc({id:fe,type:Pt.Subscribe,payload:ee},_)),dt=()=>{!ve&&Ne.readyState===N.OPEN&&Ne.send(rc({id:fe,type:Pt.Complete},_)),B--,ve=!0,L()},await te.finally(X);return}catch(Ne){if(!he(Ne))return}})().then(()=>{Se||Ae.complete()}).catch(Ne=>{Ae.error(Ne)}),()=>{ve||dt()}}return{on:I.on,subscribe:Ce,iterate(ee){const Ae=[],fe={done:!1,error:null,resolve:()=>{}},ve=Ce(ee,{next(dt){Ae.push(dt),fe.resolve()},error(dt){fe.done=!0,fe.error=dt,fe.resolve()},complete(){fe.done=!0,fe.resolve()}}),Se=function(){return Iee(this,arguments,function*(){for(;;){for(Ae.length||(yield Fa(new Promise(L=>fe.resolve=L)));Ae.length;)yield yield Fa(Ae.shift());if(fe.error)throw fe.error;if(fe.done)return yield Fa(void 0)}})}();return Se.throw=async dt=>(fe.done||(fe.done=!0,fe.error=dt,fe.resolve()),{done:!0,value:void 0}),Se.return=async()=>(ve(),{done:!0,value:void 0}),Se},async dispose(){if(Te=!0,M){const[ee]=await M;ee.close(1e3,"Normal Closure")}},terminate(){M&&I.emit("closed",new lO)}}}class lO extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function ug(t){return po(t)&&"code"in t&&"reason"in t}function Cee(t){return[1e3,1001,1006,1005,1012,1013,1014].includes(t)?!1:t>=1e3&&t<=1999}function Dee(t){return typeof t=="function"&&"constructor"in t&&"CLOSED"in t&&"CLOSING"in t&&"CONNECTING"in t&&"OPEN"in t}const Ree=({apiUrl:t,listeners:e})=>{const n=xee({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},cO="api.warrior.well-played.gg/graphql",Mee=({token:t,organizationId:e,invalidationPolicies:n,handlers:r})=>{const i=new Sy.InvalidationPolicyCache({invalidationPolicies:{...n,timeToLive:(n==null?void 0:n.timeToLive)??12e4,renewalPolicy:(n==null?void 0:n.renewalPolicy)??Sy.RenewalPolicy.None}});Eee({cache:i,storage:new Oee(window.localStorage)});const s=mb(({query:o})=>{const a=Go(o);return a.kind==="OperationDefinition"&&a.operation==="subscription"},new mz(Ree({apiUrl:cO,listeners:r==null?void 0:r.webSocket})),pb([dz(async()=>({headers:xy.omitBy({"organization-id":e,authorization:t?`Bearer ${t}`:void 0},xy.isNil)})),JA(({graphQLErrors:o,networkError:a,operation:l,forward:u})=>{var d;return(d=r==null?void 0:r.onError)==null||d.call(r,{graphQLErrors:o,networkError:a}),u(l)}),new Oh({uri:`https://${cO}`})]));return new Ih({cache:i,link:s,defaultOptions:{watchQuery:{fetchPolicy:"network-only",errorPolicy:"ignore"},query:{fetchPolicy:"network-only",errorPolicy:"all"},mutate:{errorPolicy:"all"}}})},qI=le.createContext({}),WI=()=>{const t=le.useContext(qI);if(!t)throw new Error("useWellPlayed must be used within a WellPlayedProvider");return t},Pee=({children:t,clientConfig:e,organizationId:n})=>{const r=fz(),i=Mee({token:(r==null?void 0:r.accessToken)??void 0,organizationId:n,...e});return pe.jsx(TA,{client:i,children:pe.jsx(qI.Provider,{value:{organizationId:n,apiClient:i},children:t})})},Fee=({children:t,oidcConfig:e,wpAppConfig:n,...r})=>pe.jsx(az,{...e,configuration:{...n,...e==null?void 0:e.configuration,authority:"https://oauth.warrior.well-played.gg"},children:pe.jsx(Pee,{...r,children:t})}),$ee=(t,e)=>{const{data:n,loading:r,refetch:i,fetchMore:s}=fu(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}}})}}},O0=(t,e)=>{const[n,r]=le.useState(!(e!=null&&e.skip)),[i,s]=le.useState([]),[o]=$b(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 Pf={DOCUMENT:"Document",FRAGMENT_DEFINITION:"FragmentDefinition"};class Lee 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 st,ge;function Ft(t){return new Lee(`Syntax Error: Unexpected token at ${ge} in ${t}`)}function dr(t){if(t.lastIndex=ge,t.test(st))return st.slice(ge,ge=t.lastIndex)}var Ff=/ +(?=[^\s])/y;function Vee(t){for(var e=t.split(`
252
252
  `),n="",r=0,i=0,s=e.length-1,o=0;o<e.length;o++)Ff.lastIndex=0,Ff.test(e[o])&&(o&&(!r||Ff.lastIndex<r)&&(r=Ff.lastIndex),i=i||o,s=o);for(var a=i;a<=s;a++)a!==i&&(n+=`
253
253
  `),n+=e[a].slice(r).replace(/\\"""/g,'"""');return n}function Fe(){for(var t=0|st.charCodeAt(ge++);t===9||t===10||t===13||t===32||t===35||t===44||t===65279;t=0|st.charCodeAt(ge++))if(t===35)for(;(t=st.charCodeAt(ge++))!==10&&t!==13;);ge--}var Mn=/[_A-Za-z]\w*/y,fg=new RegExp("(?:(null|true|false)|\\$("+Mn.source+')|(-?\\d+)((?:\\.\\d+)?[eE][+-]?\\d+|\\.\\d+)?|("""(?:"""|(?:[\\s\\S]*?[^\\\\])"""))|("(?:"|[^\\r\\n]*?[^\\\\]"))|('+Mn.source+"))","y"),gs=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}(gs||{}),jee=/\\/;function $d(t){var e,n;if(fg.lastIndex=ge,st.charCodeAt(ge)===91){ge++,Fe();for(var r=[];st.charCodeAt(ge)!==93;)r.push($d(t));return ge++,Fe(),{kind:"ListValue",values:r}}else if(st.charCodeAt(ge)===123){ge++,Fe();for(var i=[];st.charCodeAt(ge)!==125;){if((e=dr(Mn))==null||(Fe(),st.charCodeAt(ge++)!==58))throw Ft("ObjectField");Fe(),i.push({kind:"ObjectField",name:{kind:"Name",value:e},value:$d(t)})}return ge++,Fe(),{kind:"ObjectValue",fields:i}}else if((n=fg.exec(st))!=null){if(ge=fg.lastIndex,Fe(),(e=n[gs.Const])!=null)return e==="null"?{kind:"NullValue"}:{kind:"BooleanValue",value:e==="true"};if((e=n[gs.Var])!=null){if(t)throw Ft("Variable");return{kind:"Variable",name:{kind:"Name",value:e}}}else if((e=n[gs.Int])!=null){var s;return(s=n[gs.Float])!=null?{kind:"FloatValue",value:e+s}:{kind:"IntValue",value:e}}else{if((e=n[gs.BlockString])!=null)return{kind:"StringValue",value:Vee(e.slice(3,-3)),block:!0};if((e=n[gs.String])!=null)return{kind:"StringValue",value:jee.test(e)?JSON.parse(e):e.slice(1,-1),block:!1};if((e=n[gs.Enum])!=null)return{kind:"EnumValue",value:e}}}throw Ft("Value")}function zI(t){if(st.charCodeAt(ge)===40){var e=[];ge++,Fe();var n;do{if((n=dr(Mn))==null||(Fe(),st.charCodeAt(ge++)!==58))throw Ft("Argument");Fe(),e.push({kind:"Argument",name:{kind:"Name",value:n},value:$d(t)})}while(st.charCodeAt(ge)!==41);return ge++,Fe(),e}}function $a(t){if(st.charCodeAt(ge)===64){var e=[],n;do{if(ge++,(n=dr(Mn))==null)throw Ft("Directive");Fe(),e.push({kind:"Directive",name:{kind:"Name",value:n},arguments:zI(t)})}while(st.charCodeAt(ge)===64);return e}}function Bee(){for(var t,e=0;st.charCodeAt(ge)===91;)e++,ge++,Fe();if((t=dr(Mn))==null)throw Ft("NamedType");Fe();var n={kind:"NamedType",name:{kind:"Name",value:t}};do if(st.charCodeAt(ge)===33&&(ge++,Fe(),n={kind:"NonNullType",type:n}),e){if(st.charCodeAt(ge++)!==93)throw Ft("NamedType");Fe(),n={kind:"ListType",type:n}}while(e--);return n}var dg=new RegExp("(?:(\\.{3})|("+Mn.source+"))","y"),Cy=function(t){return t[t.Spread=1]="Spread",t[t.Name=2]="Name",t}(Cy||{});function Ld(){var t=[],e,n;do if(dg.lastIndex=ge,(n=dg.exec(st))!=null){if(ge=dg.lastIndex,n[Cy.Spread]!=null){Fe();var r=dr(Mn);if(r!=null&&r!=="on")Fe(),t.push({kind:"FragmentSpread",name:{kind:"Name",value:r},directives:$a(!1)});else{if(Fe(),r==="on"){if((r=dr(Mn))==null)throw Ft("NamedType");Fe()}var i=$a(!1);if(st.charCodeAt(ge++)!==123)throw Ft("InlineFragment");Fe(),t.push({kind:"InlineFragment",typeCondition:r?{kind:"NamedType",name:{kind:"Name",value:r}}:void 0,directives:i,selectionSet:Ld()})}}else if((e=n[Cy.Name])!=null){var s=void 0;if(Fe(),st.charCodeAt(ge)===58){if(ge++,Fe(),s=e,(e=dr(Mn))==null)throw Ft("Field");Fe()}var o=zI(!1);Fe();var a=$a(!1),l=void 0;st.charCodeAt(ge)===123&&(ge++,Fe(),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 Ft("SelectionSet");while(st.charCodeAt(ge)!==125);return ge++,Fe(),{kind:"SelectionSet",selections:t}}function Uee(){var t,e;if((t=dr(Mn))==null||(Fe(),dr(Mn)!=="on")||(Fe(),(e=dr(Mn))==null))throw Ft("FragmentDefinition");Fe();var n=$a(!1);if(st.charCodeAt(ge++)!==123)throw Ft("FragmentDefinition");return Fe(),{kind:"FragmentDefinition",name:{kind:"Name",value:t},typeCondition:{kind:"NamedType",name:{kind:"Name",value:e}},directives:n,selectionSet:Ld()}}var qee=/(?:query|mutation|subscription|fragment)/y;function Wee(t){var e,n,r;if(t&&(Fe(),e=dr(Mn),n=function(){if(Fe(),st.charCodeAt(ge)===40){var s=[];ge++,Fe();var o;do{if(st.charCodeAt(ge++)!==36||(o=dr(Mn))==null)throw Ft("Variable");if(Fe(),st.charCodeAt(ge++)!==58)throw Ft("VariableDefinition");Fe();var a=Bee(),l=void 0;st.charCodeAt(ge)===61&&(ge++,Fe(),l=$d(!0)),Fe(),s.push({kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:o}},type:a,defaultValue:l,directives:$a(!0)})}while(st.charCodeAt(ge)!==41);return ge++,Fe(),s}}(),r=$a(!1)),st.charCodeAt(ge)===123)return ge++,Fe(),{kind:"OperationDefinition",operation:t||"query",name:e?{kind:"Name",value:e}:void 0,variableDefinitions:n,directives:r,selectionSet:Ld()}}function zee(t,e){return ge=0,function(r,i){var s,o;Fe();var a=[];do if((s=dr(qee))==="fragment")Fe(),a.push(Uee());else if((o=Wee(s))!=null)a.push(o);else throw Ft("Document");while(ge<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}}}}(st=typeof t.body=="string"?t.body:t)}var uO=0,hg=new Set;function QI(){function t(e,n){var r=zee(e).definitions,i=new Set;for(var s of n||[])for(var o of s.definitions)o.kind===Pf.FRAGMENT_DEFINITION&&!i.has(o)&&(r.push(o),i.add(o));var a;(a=r[0].kind===Pf.FRAGMENT_DEFINITION)&&r[0].directives&&(r[0].directives=r[0].directives.filter(u=>u.name.value!=="_unmask"));var l;return{kind:Pf.DOCUMENT,definitions:r,get loc(){if(!l&&a){var u=e+function(h){try{uO++;var p="";for(var g of h)if(!hg.has(g)){hg.add(g);var{loc:y}=g;y&&(p+=y.source.body)}return p}finally{--uO==0&&hg.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:Pf.DOCUMENT,definitions:r?r.definitions:[],documentId:n}},t}function Qee(...t){return t.length===2?t[1]:t[0]}QI();const Xo=QI(),Gee=Xo(`
254
254
  query organization($id: ID!) {
@@ -27959,26 +27959,21 @@ const Fee = ({
27959
27959
  clientConfig: e,
27960
27960
  organizationId: n
27961
27961
  }) => {
27962
- const r = pz();
27963
- return /* @__PURE__ */ he.jsx(
27964
- kA,
27962
+ const r = pz(), i = $ee({
27963
+ token: (r == null ? void 0 : r.accessToken) ?? void 0,
27964
+ organizationId: n,
27965
+ ...e
27966
+ });
27967
+ return /* @__PURE__ */ he.jsx(kA, { client: i, children: /* @__PURE__ */ he.jsx(
27968
+ QI.Provider,
27965
27969
  {
27966
- client: $ee({
27967
- token: (r == null ? void 0 : r.accessToken) ?? void 0,
27970
+ value: {
27968
27971
  organizationId: n,
27969
- ...e
27970
- }),
27971
- children: /* @__PURE__ */ he.jsx(
27972
- QI.Provider,
27973
- {
27974
- value: {
27975
- organizationId: n
27976
- },
27977
- children: t
27978
- }
27979
- )
27972
+ apiClient: i
27973
+ },
27974
+ children: t
27980
27975
  }
27981
- );
27976
+ ) });
27982
27977
  }, Rae = ({
27983
27978
  children: t,
27984
27979
  oidcConfig: e,
@@ -248,7 +248,7 @@ __p += '`),Ze&&(K+=`' +
248
248
  function print() { __p += __j.call(arguments, '') }
249
249
  `:`;
250
250
  `)+K+`return __p
251
- }`;var Be=xC(function(){return ot(S,de+"return "+K).apply(n,A)});if(Be.source=K,L0(Be))throw Be;return Be}function boe(c){return lt(c).toLowerCase()}function _oe(c){return lt(c).toUpperCase()}function Eoe(c,f,m){if(c=lt(c),c&&(m||f===n))return VI(c);if(!c||!(f=pr(f)))return c;var v=ei(c),E=ei(f),S=jI(v,E),A=BI(v,E)+1;return Ys(v,S,A).join("")}function woe(c,f,m){if(c=lt(c),c&&(m||f===n))return c.slice(0,WI(c)+1);if(!c||!(f=pr(f)))return c;var v=ei(c),E=BI(v,ei(f))+1;return Ys(v,0,E).join("")}function Toe(c,f,m){if(c=lt(c),c&&(m||f===n))return c.replace(sl,"");if(!c||!(f=pr(f)))return c;var v=ei(c),E=jI(v,ei(f));return Ys(v,E).join("")}function Soe(c,f){var m=U,v=Te;if(Nt(f)){var E="separator"in f?f.separator:E;m="length"in f?$e(f.length):m,v="omission"in f?pr(f.omission):v}c=lt(c);var S=c.length;if(ll(c)){var A=ei(c);S=A.length}if(m>=S)return c;var R=m-cl(v);if(R<1)return v;var L=A?Ys(A,0,R).join(""):c.slice(0,R);if(E===n)return L+v;if(A&&(R+=L.length-R),$0(E)){if(c.slice(R).search(E)){var G,H=L;for(E.global||(E=e0(E.source,lt(it.exec(E))+"g")),E.lastIndex=0;G=E.exec(H);)var K=G.index;L=L.slice(0,K===n?R:K)}}else if(c.indexOf(pr(E),R)!=R){var re=L.lastIndexOf(E);re>-1&&(L=L.slice(0,re))}return L+v}function Ooe(c){return c=lt(c),c&&au.test(c)?c.replace(qi,ete):c}var koe=gl(function(c,f,m){return c+(m?" ":"")+f.toUpperCase()}),B0=Cx("toUpperCase");function IC(c,f,m){return c=lt(c),f=m?n:f,f===n?Kee(c)?rte(c):jee(c):c.match(f)||[]}var xC=qe(function(c,f){try{return dr(c,n,f)}catch(m){return L0(m)?m:new De(m)}}),Noe=Ki(function(c,f){return Lr(f,function(m){m=Si(m),Gi(c,m,P0(c[m],c))}),c});function Aoe(c){var f=c==null?0:c.length,m=_e();return c=f?Tt(c,function(v){if(typeof v[1]!="function")throw new $r(o);return[m(v[0]),v[1]]}):[],qe(function(v){for(var E=-1;++E<f;){var S=c[E];if(dr(S[0],this,v))return dr(S[1],this,v)}})}function Ioe(c){return ene(jr(c,h))}function U0(c){return function(){return c}}function xoe(c,f){return c==null||c!==c?f:c}var Coe=Rx(),Doe=Rx(!0);function tr(c){return c}function W0(c){return cx(typeof c=="function"?c:jr(c,h))}function Roe(c){return fx(jr(c,h))}function Moe(c,f){return dx(c,jr(f,h))}var Poe=qe(function(c,f){return function(m){return vu(m,c,f)}}),Foe=qe(function(c,f){return function(m){return vu(c,m,f)}});function q0(c,f,m){var v=nn(f),E=qh(f,v);m==null&&!(Nt(f)&&(E.length||!v.length))&&(m=f,f=c,c=this,E=qh(f,nn(f)));var S=!(Nt(m)&&"chain"in m)||!!m.chain,A=Yi(c);return Lr(E,function(R){var L=f[R];c[R]=L,A&&(c.prototype[R]=function(){var G=this.__chain__;if(S||G){var H=c(this.__wrapped__),K=H.__actions__=Xn(this.__actions__);return K.push({func:L,args:arguments,thisArg:c}),H.__chain__=G,H}return L.apply(c,zs([this.value()],arguments))})}),c}function Loe(){return hn._===this&&(hn._=cte),this}function z0(){}function $oe(c){return c=$e(c),qe(function(f){return hx(f,c)})}var Voe=w0(Tt),joe=w0(MI),Boe=w0(Gb);function CC(c){return I0(c)?Hb(Si(c)):yne(c)}function Uoe(c){return function(f){return c==null?n:Yo(c,f)}}var Woe=Px(),qoe=Px(!0);function Q0(){return[]}function G0(){return!1}function zoe(){return{}}function Qoe(){return""}function Goe(){return!0}function Hoe(c,f){if(c=$e(c),c<1||c>ve)return[];var m=Ne,v=On(c,Ne);f=_e(f),c-=Ne;for(var E=Yb(v,f);++m<c;)f(m);return E}function Koe(c){return Pe(c)?Tt(c,Si):mr(c)?[c]:Xn(Yx(lt(c)))}function Joe(c){var f=++ate;return lt(c)+f}var Yoe=Jh(function(c,f){return c+f},0),Xoe=T0("ceil"),Zoe=Jh(function(c,f){return c/f},1),eae=T0("floor");function tae(c){return c&&c.length?Wh(c,tr,l0):n}function nae(c,f){return c&&c.length?Wh(c,_e(f,2),l0):n}function rae(c){return LI(c,tr)}function iae(c,f){return LI(c,_e(f,2))}function sae(c){return c&&c.length?Wh(c,tr,d0):n}function oae(c,f){return c&&c.length?Wh(c,_e(f,2),d0):n}var aae=Jh(function(c,f){return c*f},1),lae=T0("round"),cae=Jh(function(c,f){return c-f},0);function uae(c){return c&&c.length?Jb(c,tr):0}function fae(c,f){return c&&c.length?Jb(c,_e(f,2)):0}return T.after=Rie,T.ary=lC,T.assign=_se,T.assignIn=wC,T.assignInWith=cp,T.assignWith=Ese,T.at=wse,T.before=cC,T.bind=P0,T.bindAll=Noe,T.bindKey=uC,T.castArray=zie,T.chain=sC,T.chunk=ere,T.compact=tre,T.concat=nre,T.cond=Aoe,T.conforms=Ioe,T.constant=U0,T.countBy=uie,T.create=Tse,T.curry=fC,T.curryRight=dC,T.debounce=hC,T.defaults=Sse,T.defaultsDeep=Ose,T.defer=Mie,T.delay=Pie,T.difference=rre,T.differenceBy=ire,T.differenceWith=sre,T.drop=ore,T.dropRight=are,T.dropRightWhile=lre,T.dropWhile=cre,T.fill=ure,T.filter=die,T.flatMap=mie,T.flatMapDeep=gie,T.flatMapDepth=yie,T.flatten=tC,T.flattenDeep=fre,T.flattenDepth=dre,T.flip=Fie,T.flow=Coe,T.flowRight=Doe,T.fromPairs=hre,T.functions=Dse,T.functionsIn=Rse,T.groupBy=vie,T.initial=mre,T.intersection=gre,T.intersectionBy=yre,T.intersectionWith=vre,T.invert=Pse,T.invertBy=Fse,T.invokeMap=_ie,T.iteratee=W0,T.keyBy=Eie,T.keys=nn,T.keysIn=er,T.map=rp,T.mapKeys=$se,T.mapValues=Vse,T.matches=Roe,T.matchesProperty=Moe,T.memoize=sp,T.merge=jse,T.mergeWith=TC,T.method=Poe,T.methodOf=Foe,T.mixin=q0,T.negate=op,T.nthArg=$oe,T.omit=Bse,T.omitBy=Use,T.once=Lie,T.orderBy=wie,T.over=Voe,T.overArgs=$ie,T.overEvery=joe,T.overSome=Boe,T.partial=F0,T.partialRight=pC,T.partition=Tie,T.pick=Wse,T.pickBy=SC,T.property=CC,T.propertyOf=Uoe,T.pull=wre,T.pullAll=rC,T.pullAllBy=Tre,T.pullAllWith=Sre,T.pullAt=Ore,T.range=Woe,T.rangeRight=qoe,T.rearg=Vie,T.reject=kie,T.remove=kre,T.rest=jie,T.reverse=R0,T.sampleSize=Aie,T.set=zse,T.setWith=Qse,T.shuffle=Iie,T.slice=Nre,T.sortBy=Die,T.sortedUniq=Mre,T.sortedUniqBy=Pre,T.split=moe,T.spread=Bie,T.tail=Fre,T.take=Lre,T.takeRight=$re,T.takeRightWhile=Vre,T.takeWhile=jre,T.tap=tie,T.throttle=Uie,T.thru=np,T.toArray=bC,T.toPairs=OC,T.toPairsIn=kC,T.toPath=Koe,T.toPlainObject=EC,T.transform=Gse,T.unary=Wie,T.union=Bre,T.unionBy=Ure,T.unionWith=Wre,T.uniq=qre,T.uniqBy=zre,T.uniqWith=Qre,T.unset=Hse,T.unzip=M0,T.unzipWith=iC,T.update=Kse,T.updateWith=Jse,T.values=bl,T.valuesIn=Yse,T.without=Gre,T.words=IC,T.wrap=qie,T.xor=Hre,T.xorBy=Kre,T.xorWith=Jre,T.zip=Yre,T.zipObject=Xre,T.zipObjectDeep=Zre,T.zipWith=eie,T.entries=OC,T.entriesIn=kC,T.extend=wC,T.extendWith=cp,q0(T,T),T.add=Yoe,T.attempt=xC,T.camelCase=toe,T.capitalize=NC,T.ceil=Xoe,T.clamp=Xse,T.clone=Qie,T.cloneDeep=Hie,T.cloneDeepWith=Kie,T.cloneWith=Gie,T.conformsTo=Jie,T.deburr=AC,T.defaultTo=xoe,T.divide=Zoe,T.endsWith=noe,T.eq=ni,T.escape=roe,T.escapeRegExp=ioe,T.every=fie,T.find=hie,T.findIndex=Zx,T.findKey=kse,T.findLast=pie,T.findLastIndex=eC,T.findLastKey=Nse,T.floor=eae,T.forEach=oC,T.forEachRight=aC,T.forIn=Ase,T.forInRight=Ise,T.forOwn=xse,T.forOwnRight=Cse,T.get=V0,T.gt=Yie,T.gte=Xie,T.has=Mse,T.hasIn=j0,T.head=nC,T.identity=tr,T.includes=bie,T.indexOf=pre,T.inRange=Zse,T.invoke=Lse,T.isArguments=ea,T.isArray=Pe,T.isArrayBuffer=Zie,T.isArrayLike=Zn,T.isArrayLikeObject=Ft,T.isBoolean=ese,T.isBuffer=Xs,T.isDate=tse,T.isElement=nse,T.isEmpty=rse,T.isEqual=ise,T.isEqualWith=sse,T.isError=L0,T.isFinite=ose,T.isFunction=Yi,T.isInteger=mC,T.isLength=ap,T.isMap=gC,T.isMatch=ase,T.isMatchWith=lse,T.isNaN=cse,T.isNative=use,T.isNil=dse,T.isNull=fse,T.isNumber=yC,T.isObject=Nt,T.isObjectLike=Dt,T.isPlainObject=Su,T.isRegExp=$0,T.isSafeInteger=hse,T.isSet=vC,T.isString=lp,T.isSymbol=mr,T.isTypedArray=vl,T.isUndefined=pse,T.isWeakMap=mse,T.isWeakSet=gse,T.join=bre,T.kebabCase=soe,T.last=Ur,T.lastIndexOf=_re,T.lowerCase=ooe,T.lowerFirst=aoe,T.lt=yse,T.lte=vse,T.max=tae,T.maxBy=nae,T.mean=rae,T.meanBy=iae,T.min=sae,T.minBy=oae,T.stubArray=Q0,T.stubFalse=G0,T.stubObject=zoe,T.stubString=Qoe,T.stubTrue=Goe,T.multiply=aae,T.nth=Ere,T.noConflict=Loe,T.noop=z0,T.now=ip,T.pad=loe,T.padEnd=coe,T.padStart=uoe,T.parseInt=foe,T.random=eoe,T.reduce=Sie,T.reduceRight=Oie,T.repeat=doe,T.replace=hoe,T.result=qse,T.round=lae,T.runInContext=F,T.sample=Nie,T.size=xie,T.snakeCase=poe,T.some=Cie,T.sortedIndex=Are,T.sortedIndexBy=Ire,T.sortedIndexOf=xre,T.sortedLastIndex=Cre,T.sortedLastIndexBy=Dre,T.sortedLastIndexOf=Rre,T.startCase=goe,T.startsWith=yoe,T.subtract=cae,T.sum=uae,T.sumBy=fae,T.template=voe,T.times=Hoe,T.toFinite=Xi,T.toInteger=$e,T.toLength=_C,T.toLower=boe,T.toNumber=Wr,T.toSafeInteger=bse,T.toString=lt,T.toUpper=_oe,T.trim=Eoe,T.trimEnd=woe,T.trimStart=Toe,T.truncate=Soe,T.unescape=Ooe,T.uniqueId=Joe,T.upperCase=koe,T.upperFirst=B0,T.each=oC,T.eachRight=aC,T.first=nC,q0(T,function(){var c={};return wi(T,function(f,m){ut.call(T.prototype,m)||(c[m]=f)}),c}(),{chain:!1}),T.VERSION=r,Lr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){T[c].placeholder=T}),Lr(["drop","take"],function(c,f){Xe.prototype[c]=function(m){m=m===n?1:Kt($e(m),0);var v=this.__filtered__&&!f?new Xe(this):this.clone();return v.__filtered__?v.__takeCount__=On(m,v.__takeCount__):v.__views__.push({size:On(m,Ne),type:c+(v.__dir__<0?"Right":"")}),v},Xe.prototype[c+"Right"]=function(m){return this.reverse()[c](m).reverse()}}),Lr(["filter","map","takeWhile"],function(c,f){var m=f+1,v=m==Ce||m==Ae;Xe.prototype[c]=function(E){var S=this.clone();return S.__iteratees__.push({iteratee:_e(E,3),type:m}),S.__filtered__=S.__filtered__||v,S}}),Lr(["head","last"],function(c,f){var m="take"+(f?"Right":"");Xe.prototype[c]=function(){return this[m](1).value()[0]}}),Lr(["initial","tail"],function(c,f){var m="drop"+(f?"":"Right");Xe.prototype[c]=function(){return this.__filtered__?new Xe(this):this[m](1)}}),Xe.prototype.compact=function(){return this.filter(tr)},Xe.prototype.find=function(c){return this.filter(c).head()},Xe.prototype.findLast=function(c){return this.reverse().find(c)},Xe.prototype.invokeMap=qe(function(c,f){return typeof c=="function"?new Xe(this):this.map(function(m){return vu(m,c,f)})}),Xe.prototype.reject=function(c){return this.filter(op(_e(c)))},Xe.prototype.slice=function(c,f){c=$e(c);var m=this;return m.__filtered__&&(c>0||f<0)?new Xe(m):(c<0?m=m.takeRight(-c):c&&(m=m.drop(c)),f!==n&&(f=$e(f),m=f<0?m.dropRight(-f):m.take(f-c)),m)},Xe.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Xe.prototype.toArray=function(){return this.take(Ne)},wi(Xe.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__,R=v?[1]:arguments,L=A instanceof Xe,G=R[0],H=L||Pe(A),K=function(He){var Ze=E.apply(T,zs([He],R));return v&&re?Ze[0]:Ze};H&&m&&typeof G=="function"&&G.length!=1&&(L=H=!1);var re=this.__chain__,de=!!this.__actions__.length,Ee=S&&!re,Be=L&&!de;if(!S&&H){A=Be?A:new Xe(this);var we=c.apply(A,R);return we.__actions__.push({func:np,args:[K],thisArg:n}),new Vr(we,re)}return Ee&&Be?c.apply(this,R):(we=this.thru(K),Ee?v?we.value()[0]:we.value():we)})}),Lr(["pop","push","shift","sort","splice","unshift"],function(c){var f=Ah[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(Pe(S)?S:[],E)}return this[m](function(A){return f.apply(Pe(A)?A:[],E)})}}),wi(Xe.prototype,function(c,f){var m=T[f];if(m){var v=m.name+"";ut.call(hl,v)||(hl[v]=[]),hl[v].push({name:f,func:m})}}),hl[Kh(n,w).name]=[{name:"wrapper",func:n}],Xe.prototype.clone=Ote,Xe.prototype.reverse=kte,Xe.prototype.value=Nte,T.prototype.at=nie,T.prototype.chain=rie,T.prototype.commit=iie,T.prototype.next=sie,T.prototype.plant=aie,T.prototype.reverse=lie,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=cie,T.prototype.first=T.prototype.head,fu&&(T.prototype[fu]=oie),T},ul=ite();Qo?((Qo.exports=ul)._=ul,Wb._=ul):hn._=ul}).call(Re)}(wd,wd.exports);var lv=wd.exports;function Hn(t){return t===null?"null":Array.isArray(t)?"array":typeof t}function So(t){return Hn(t)==="object"}function b8(t){return Array.isArray(t)&&t.length>0&&t.every(e=>"message"in e)}function Kk(t,e){return t.length<124?t:e}const _8="graphql-transport-ws";var ar;(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"})(ar||(ar={}));var Mt;(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"})(Mt||(Mt={}));function Jk(t){if(!So(t))throw new Error(`Message is expected to be an object, but got ${Hn(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 ${Hn(t.type)}`);switch(t.type){case Mt.ConnectionInit:case Mt.ConnectionAck:case Mt.Ping:case Mt.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 Mt.Subscribe:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${Hn(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 ${Hn(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 ${Hn(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 ${Hn(t.payload.variables)}`);if(t.payload.operationName!=null&&Hn(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 ${Hn(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 ${Hn(t.payload.extensions)}`);break}case Mt.Next:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${Hn(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 ${Hn(t.payload)}`);break}case Mt.Error:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${Hn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);if(!b8(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 Mt.Complete:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${Hn(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 E8(t,e){return Jk(typeof t=="string"?JSON.parse(t,e):t)}function Rc(t,e){return Jk(t),JSON.stringify(t,e)}var $a=function(t){return this instanceof $a?(this.v=t,this):new $a(t)},w8=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 $a?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 T8(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 ve=0;ve<Ae;ve++)fe*=2;await new Promise(ve=>setTimeout(ve,fe+Math.floor(Math.random()*2700+300)))},shouldRetry:h=cv,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(!O8(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 ee=(()=>{const fe={};return{on(ve,Se){return fe[ve]=Se,()=>{delete fe[ve]}},emit(ve){var Se;"id"in ve&&((Se=fe[ve.id])===null||Se===void 0||Se.call(fe,ve))}}})(),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?[ee.emit,g.message]:[ee.emit],closed:g!=null&&g.closed?[g.closed]:[],error:g!=null&&g.error?[g.error]:[]};return{onMessage:ee.on,on(fe,ve){const Se=Ae[fe];return Se.push(ve),()=>{Se.splice(Se.indexOf(ve),1)}},emit(fe,...ve){for(const Se of[...Ae[fe]])Se(...ve)}}})();function P(ee){const Ae=[I.on("error",fe=>{Ae.forEach(ve=>ve()),ee(fe)}),I.on("closed",fe=>{Ae.forEach(ve=>ve()),ee(fe)})]}let M,B=0,Q,x=!1,U=0,Te=!1;async function ke(){clearTimeout(Q);const[ee,Ae]=await(M??(M=new Promise((Se,ht)=>(async()=>{if(x){if(await d(U),!B)return M=void 0,ht({code:1e3,reason:"All Subscriptions Gone"});U++}I.emit("connecting",x);const Ne=new N(typeof e=="function"?await e():e,_8);let $,te;function Z(){isFinite(o)&&o>0&&(clearTimeout(te),te=setTimeout(()=>{Ne.readyState===N.OPEN&&(Ne.send(Rc({type:Mt.Ping})),I.emit("ping",!1,void 0))},o))}P(be=>{M=void 0,clearTimeout($),clearTimeout(te),ht(be),be instanceof Yk&&(Ne.close(4499,"Terminated"),Ne.onerror=null,Ne.onclose=null)}),Ne.onerror=be=>I.emit("error",be),Ne.onclose=be=>I.emit("closed",be),Ne.onopen=async()=>{try{I.emit("opened",Ne);const be=typeof n=="function"?await n():n;if(Ne.readyState!==N.OPEN)return;Ne.send(Rc(be?{type:Mt.ConnectionInit,payload:be}:{type:Mt.ConnectionInit},_)),isFinite(l)&&l>0&&($=setTimeout(()=>{Ne.close(ar.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},l)),Z()}catch(be){I.emit("error",be),Ne.close(ar.InternalClientError,Kk(be instanceof Error?be.message:new Error(be).message,"Internal client error"))}};let ne=!1;Ne.onmessage=({data:be})=>{try{const Me=E8(be,w);if(I.emit("message",Me),Me.type==="ping"||Me.type==="pong"){I.emit(Me.type,!0,Me.payload),Me.type==="pong"?Z():a||(Ne.send(Rc(Me.payload?{type:Mt.Pong,payload:Me.payload}:{type:Mt.Pong})),I.emit("pong",!1,Me.payload));return}if(ne)return;if(Me.type!==Mt.ConnectionAck)throw new Error(`First message cannot be of type ${Me.type}`);clearTimeout($),ne=!0,I.emit("connected",Ne,Me.payload,x),x=!1,U=0,Se([Ne,new Promise((Je,tn)=>P(tn))])}catch(Me){Ne.onmessage=null,I.emit("error",Me),Ne.close(ar.BadResponse,Kk(Me instanceof Error?Me.message:new Error(Me).message,"Bad response"))}}})())));ee.readyState===N.CLOSING&&await Ae;let fe=()=>{};const ve=new Promise(Se=>fe=Se);return[ee,fe,Promise.race([ve.then(()=>{if(!B){const Se=()=>ee.close(1e3,"Normal Closure");isFinite(s)&&s>0?Q=setTimeout(()=>{ee.readyState===N.OPEN&&Se()},s):Se()}}),Ae])]}function pe(ee){if(cv(ee)&&(S8(ee.code)||[ar.InternalServerError,ar.InternalClientError,ar.BadRequest,ar.BadResponse,ar.Unauthorized,ar.SubprotocolNotAcceptable,ar.SubscriberAlreadyExists,ar.TooManyInitialisationRequests].includes(ee.code)))throw ee;if(Te)return!1;if(cv(ee)&&ee.code===1e3)return B>0;if(!u||U>=u||!h(ee)||p!=null&&p(ee))throw ee;return x=!0}r||(async()=>{for(B++;;)try{const[,,ee]=await ke();await ee}catch(ee){try{if(!pe(ee))return}catch(Ae){return i==null?void 0:i(Ae)}}})();function Ce(ee,Ae){const fe=b(ee);let ve=!1,Se=!1,ht=()=>{B--,ve=!0};return(async()=>{for(B++;;)try{const[Ne,$,te]=await ke();if(ve)return $();const Z=I.onMessage(fe,ne=>{switch(ne.type){case Mt.Next:{Ae.next(ne.payload);return}case Mt.Error:{Se=!0,ve=!0,Ae.error(ne.payload),ht();return}case Mt.Complete:{ve=!0,ht();return}}});Ne.send(Rc({id:fe,type:Mt.Subscribe,payload:ee},_)),ht=()=>{!ve&&Ne.readyState===N.OPEN&&Ne.send(Rc({id:fe,type:Mt.Complete},_)),B--,ve=!0,$()},await te.finally(Z);return}catch(Ne){if(!pe(Ne))return}})().then(()=>{Se||Ae.complete()}).catch(Ne=>{Ae.error(Ne)}),()=>{ve||ht()}}return{on:I.on,subscribe:Ce,iterate(ee){const Ae=[],fe={done:!1,error:null,resolve:()=>{}},ve=Ce(ee,{next(ht){Ae.push(ht),fe.resolve()},error(ht){fe.done=!0,fe.error=ht,fe.resolve()},complete(){fe.done=!0,fe.resolve()}}),Se=function(){return w8(this,arguments,function*(){for(;;){for(Ae.length||(yield $a(new Promise($=>fe.resolve=$)));Ae.length;)yield yield $a(Ae.shift());if(fe.error)throw fe.error;if(fe.done)return yield $a(void 0)}})}();return Se.throw=async ht=>(fe.done||(fe.done=!0,fe.error=ht,fe.resolve()),{done:!0,value:void 0}),Se.return=async()=>(ve(),{done:!0,value:void 0}),Se},async dispose(){if(Te=!0,M){const[ee]=await M;ee.close(1e3,"Normal Closure")}},terminate(){M&&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 cv(t){return So(t)&&"code"in t&&"reason"in t}function S8(t){return[1e3,1001,1006,1005,1012,1013,1014].includes(t)?!1:t>=1e3&&t<=1999}function O8(t){return typeof t=="function"&&"constructor"in t&&"CLOSED"in t&&"CLOSING"in t&&"CONNECTING"in t&&"OPEN"in t}const k8=({apiUrl:t,listeners:e})=>{const n=T8({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},Xk="api.warrior.well-played.gg/graphql",N8=({token:t,organizationId:e,invalidationPolicies:n,handlers:r})=>{const i=new uy.InvalidationPolicyCache({invalidationPolicies:{...n,timeToLive:(n==null?void 0:n.timeToLive)??12e4,renewalPolicy:(n==null?void 0:n.renewalPolicy)??uy.RenewalPolicy.None}});p8({cache:i,storage:new v8(window.localStorage)});const s=rg(({query:o})=>{const a=uo(o);return a.kind==="OperationDefinition"&&a.operation==="subscription"},new cV(k8({apiUrl:Xk,listeners:r==null?void 0:r.webSocket})),ng([oV(async()=>({headers:lv.omitBy({"organization-id":e,authorization:t?`Bearer ${t}`:void 0},lv.isNil)})),KS(({graphQLErrors:o,networkError:a,operation:l,forward:u})=>{var d;return(d=r==null?void 0:r.onError)==null||d.call(r,{graphQLErrors:o,networkError:a}),u(l)}),new Nf({uri:`https://${Xk}`})]));return new Pf({cache:i,link:s,defaultOptions:{watchQuery:{fetchPolicy:"network-only",errorPolicy:"ignore"},query:{fetchPolicy:"network-only",errorPolicy:"all"},mutate:{errorPolicy:"all"}}})},Zk=oe.createContext({}),e1=()=>{const t=oe.useContext(Zk);if(!t)throw new Error("useWellPlayed must be used within a WellPlayedProvider");return t},A8=({children:t,clientConfig:e,organizationId:n})=>{const r=sV();return he.jsx(uS,{client:N8({token:(r==null?void 0:r.accessToken)??void 0,organizationId:n,...e}),children:he.jsx(Zk.Provider,{value:{organizationId:n},children:t})})},I8=({children:t,oidcConfig:e,wpAppConfig:n,...r})=>he.jsx(tV,{...e,configuration:{...n,...e==null?void 0:e.configuration,authority:"https://oauth.warrior.well-played.gg"},children:he.jsx(A8,{...r,children:t})}),x8=(t,e)=>{const{data:n,loading:r,refetch:i,fetchMore:s}=dc(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}}})}}},uv=(t,e)=>{const[n,r]=oe.useState(!(e!=null&&e.skip)),[i,s]=oe.useState([]),[o]=Wg(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 oe.useEffect(()=>{e!=null&&e.skip||a()},[e==null?void 0:e.skip]),{loading:n,results:i,refetch:a}};var Td={DOCUMENT:"Document",FRAGMENT_DEFINITION:"FragmentDefinition"};class C8 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 st,ge;function Pt(t){return new C8(`Syntax Error: Unexpected token at ${ge} in ${t}`)}function lr(t){if(t.lastIndex=ge,t.test(st))return st.slice(ge,ge=t.lastIndex)}var Sd=/ +(?=[^\s])/y;function D8(t){for(var e=t.split(`
251
+ }`;var Be=xC(function(){return ot(S,de+"return "+K).apply(n,A)});if(Be.source=K,L0(Be))throw Be;return Be}function boe(c){return lt(c).toLowerCase()}function _oe(c){return lt(c).toUpperCase()}function Eoe(c,f,m){if(c=lt(c),c&&(m||f===n))return VI(c);if(!c||!(f=pr(f)))return c;var v=ei(c),E=ei(f),S=jI(v,E),A=BI(v,E)+1;return Ys(v,S,A).join("")}function woe(c,f,m){if(c=lt(c),c&&(m||f===n))return c.slice(0,WI(c)+1);if(!c||!(f=pr(f)))return c;var v=ei(c),E=BI(v,ei(f))+1;return Ys(v,0,E).join("")}function Toe(c,f,m){if(c=lt(c),c&&(m||f===n))return c.replace(sl,"");if(!c||!(f=pr(f)))return c;var v=ei(c),E=jI(v,ei(f));return Ys(v,E).join("")}function Soe(c,f){var m=U,v=Te;if(Nt(f)){var E="separator"in f?f.separator:E;m="length"in f?$e(f.length):m,v="omission"in f?pr(f.omission):v}c=lt(c);var S=c.length;if(ll(c)){var A=ei(c);S=A.length}if(m>=S)return c;var R=m-cl(v);if(R<1)return v;var L=A?Ys(A,0,R).join(""):c.slice(0,R);if(E===n)return L+v;if(A&&(R+=L.length-R),$0(E)){if(c.slice(R).search(E)){var G,H=L;for(E.global||(E=e0(E.source,lt(it.exec(E))+"g")),E.lastIndex=0;G=E.exec(H);)var K=G.index;L=L.slice(0,K===n?R:K)}}else if(c.indexOf(pr(E),R)!=R){var re=L.lastIndexOf(E);re>-1&&(L=L.slice(0,re))}return L+v}function Ooe(c){return c=lt(c),c&&au.test(c)?c.replace(qi,ete):c}var koe=gl(function(c,f,m){return c+(m?" ":"")+f.toUpperCase()}),B0=Cx("toUpperCase");function IC(c,f,m){return c=lt(c),f=m?n:f,f===n?Kee(c)?rte(c):jee(c):c.match(f)||[]}var xC=qe(function(c,f){try{return dr(c,n,f)}catch(m){return L0(m)?m:new De(m)}}),Noe=Ki(function(c,f){return Lr(f,function(m){m=Si(m),Gi(c,m,P0(c[m],c))}),c});function Aoe(c){var f=c==null?0:c.length,m=_e();return c=f?Tt(c,function(v){if(typeof v[1]!="function")throw new $r(o);return[m(v[0]),v[1]]}):[],qe(function(v){for(var E=-1;++E<f;){var S=c[E];if(dr(S[0],this,v))return dr(S[1],this,v)}})}function Ioe(c){return ene(jr(c,h))}function U0(c){return function(){return c}}function xoe(c,f){return c==null||c!==c?f:c}var Coe=Rx(),Doe=Rx(!0);function tr(c){return c}function W0(c){return cx(typeof c=="function"?c:jr(c,h))}function Roe(c){return fx(jr(c,h))}function Moe(c,f){return dx(c,jr(f,h))}var Poe=qe(function(c,f){return function(m){return vu(m,c,f)}}),Foe=qe(function(c,f){return function(m){return vu(c,m,f)}});function q0(c,f,m){var v=nn(f),E=qh(f,v);m==null&&!(Nt(f)&&(E.length||!v.length))&&(m=f,f=c,c=this,E=qh(f,nn(f)));var S=!(Nt(m)&&"chain"in m)||!!m.chain,A=Yi(c);return Lr(E,function(R){var L=f[R];c[R]=L,A&&(c.prototype[R]=function(){var G=this.__chain__;if(S||G){var H=c(this.__wrapped__),K=H.__actions__=Xn(this.__actions__);return K.push({func:L,args:arguments,thisArg:c}),H.__chain__=G,H}return L.apply(c,zs([this.value()],arguments))})}),c}function Loe(){return hn._===this&&(hn._=cte),this}function z0(){}function $oe(c){return c=$e(c),qe(function(f){return hx(f,c)})}var Voe=w0(Tt),joe=w0(MI),Boe=w0(Gb);function CC(c){return I0(c)?Hb(Si(c)):yne(c)}function Uoe(c){return function(f){return c==null?n:Yo(c,f)}}var Woe=Px(),qoe=Px(!0);function Q0(){return[]}function G0(){return!1}function zoe(){return{}}function Qoe(){return""}function Goe(){return!0}function Hoe(c,f){if(c=$e(c),c<1||c>ve)return[];var m=Ne,v=On(c,Ne);f=_e(f),c-=Ne;for(var E=Yb(v,f);++m<c;)f(m);return E}function Koe(c){return Pe(c)?Tt(c,Si):mr(c)?[c]:Xn(Yx(lt(c)))}function Joe(c){var f=++ate;return lt(c)+f}var Yoe=Jh(function(c,f){return c+f},0),Xoe=T0("ceil"),Zoe=Jh(function(c,f){return c/f},1),eae=T0("floor");function tae(c){return c&&c.length?Wh(c,tr,l0):n}function nae(c,f){return c&&c.length?Wh(c,_e(f,2),l0):n}function rae(c){return LI(c,tr)}function iae(c,f){return LI(c,_e(f,2))}function sae(c){return c&&c.length?Wh(c,tr,d0):n}function oae(c,f){return c&&c.length?Wh(c,_e(f,2),d0):n}var aae=Jh(function(c,f){return c*f},1),lae=T0("round"),cae=Jh(function(c,f){return c-f},0);function uae(c){return c&&c.length?Jb(c,tr):0}function fae(c,f){return c&&c.length?Jb(c,_e(f,2)):0}return T.after=Rie,T.ary=lC,T.assign=_se,T.assignIn=wC,T.assignInWith=cp,T.assignWith=Ese,T.at=wse,T.before=cC,T.bind=P0,T.bindAll=Noe,T.bindKey=uC,T.castArray=zie,T.chain=sC,T.chunk=ere,T.compact=tre,T.concat=nre,T.cond=Aoe,T.conforms=Ioe,T.constant=U0,T.countBy=uie,T.create=Tse,T.curry=fC,T.curryRight=dC,T.debounce=hC,T.defaults=Sse,T.defaultsDeep=Ose,T.defer=Mie,T.delay=Pie,T.difference=rre,T.differenceBy=ire,T.differenceWith=sre,T.drop=ore,T.dropRight=are,T.dropRightWhile=lre,T.dropWhile=cre,T.fill=ure,T.filter=die,T.flatMap=mie,T.flatMapDeep=gie,T.flatMapDepth=yie,T.flatten=tC,T.flattenDeep=fre,T.flattenDepth=dre,T.flip=Fie,T.flow=Coe,T.flowRight=Doe,T.fromPairs=hre,T.functions=Dse,T.functionsIn=Rse,T.groupBy=vie,T.initial=mre,T.intersection=gre,T.intersectionBy=yre,T.intersectionWith=vre,T.invert=Pse,T.invertBy=Fse,T.invokeMap=_ie,T.iteratee=W0,T.keyBy=Eie,T.keys=nn,T.keysIn=er,T.map=rp,T.mapKeys=$se,T.mapValues=Vse,T.matches=Roe,T.matchesProperty=Moe,T.memoize=sp,T.merge=jse,T.mergeWith=TC,T.method=Poe,T.methodOf=Foe,T.mixin=q0,T.negate=op,T.nthArg=$oe,T.omit=Bse,T.omitBy=Use,T.once=Lie,T.orderBy=wie,T.over=Voe,T.overArgs=$ie,T.overEvery=joe,T.overSome=Boe,T.partial=F0,T.partialRight=pC,T.partition=Tie,T.pick=Wse,T.pickBy=SC,T.property=CC,T.propertyOf=Uoe,T.pull=wre,T.pullAll=rC,T.pullAllBy=Tre,T.pullAllWith=Sre,T.pullAt=Ore,T.range=Woe,T.rangeRight=qoe,T.rearg=Vie,T.reject=kie,T.remove=kre,T.rest=jie,T.reverse=R0,T.sampleSize=Aie,T.set=zse,T.setWith=Qse,T.shuffle=Iie,T.slice=Nre,T.sortBy=Die,T.sortedUniq=Mre,T.sortedUniqBy=Pre,T.split=moe,T.spread=Bie,T.tail=Fre,T.take=Lre,T.takeRight=$re,T.takeRightWhile=Vre,T.takeWhile=jre,T.tap=tie,T.throttle=Uie,T.thru=np,T.toArray=bC,T.toPairs=OC,T.toPairsIn=kC,T.toPath=Koe,T.toPlainObject=EC,T.transform=Gse,T.unary=Wie,T.union=Bre,T.unionBy=Ure,T.unionWith=Wre,T.uniq=qre,T.uniqBy=zre,T.uniqWith=Qre,T.unset=Hse,T.unzip=M0,T.unzipWith=iC,T.update=Kse,T.updateWith=Jse,T.values=bl,T.valuesIn=Yse,T.without=Gre,T.words=IC,T.wrap=qie,T.xor=Hre,T.xorBy=Kre,T.xorWith=Jre,T.zip=Yre,T.zipObject=Xre,T.zipObjectDeep=Zre,T.zipWith=eie,T.entries=OC,T.entriesIn=kC,T.extend=wC,T.extendWith=cp,q0(T,T),T.add=Yoe,T.attempt=xC,T.camelCase=toe,T.capitalize=NC,T.ceil=Xoe,T.clamp=Xse,T.clone=Qie,T.cloneDeep=Hie,T.cloneDeepWith=Kie,T.cloneWith=Gie,T.conformsTo=Jie,T.deburr=AC,T.defaultTo=xoe,T.divide=Zoe,T.endsWith=noe,T.eq=ni,T.escape=roe,T.escapeRegExp=ioe,T.every=fie,T.find=hie,T.findIndex=Zx,T.findKey=kse,T.findLast=pie,T.findLastIndex=eC,T.findLastKey=Nse,T.floor=eae,T.forEach=oC,T.forEachRight=aC,T.forIn=Ase,T.forInRight=Ise,T.forOwn=xse,T.forOwnRight=Cse,T.get=V0,T.gt=Yie,T.gte=Xie,T.has=Mse,T.hasIn=j0,T.head=nC,T.identity=tr,T.includes=bie,T.indexOf=pre,T.inRange=Zse,T.invoke=Lse,T.isArguments=ea,T.isArray=Pe,T.isArrayBuffer=Zie,T.isArrayLike=Zn,T.isArrayLikeObject=Ft,T.isBoolean=ese,T.isBuffer=Xs,T.isDate=tse,T.isElement=nse,T.isEmpty=rse,T.isEqual=ise,T.isEqualWith=sse,T.isError=L0,T.isFinite=ose,T.isFunction=Yi,T.isInteger=mC,T.isLength=ap,T.isMap=gC,T.isMatch=ase,T.isMatchWith=lse,T.isNaN=cse,T.isNative=use,T.isNil=dse,T.isNull=fse,T.isNumber=yC,T.isObject=Nt,T.isObjectLike=Dt,T.isPlainObject=Su,T.isRegExp=$0,T.isSafeInteger=hse,T.isSet=vC,T.isString=lp,T.isSymbol=mr,T.isTypedArray=vl,T.isUndefined=pse,T.isWeakMap=mse,T.isWeakSet=gse,T.join=bre,T.kebabCase=soe,T.last=Ur,T.lastIndexOf=_re,T.lowerCase=ooe,T.lowerFirst=aoe,T.lt=yse,T.lte=vse,T.max=tae,T.maxBy=nae,T.mean=rae,T.meanBy=iae,T.min=sae,T.minBy=oae,T.stubArray=Q0,T.stubFalse=G0,T.stubObject=zoe,T.stubString=Qoe,T.stubTrue=Goe,T.multiply=aae,T.nth=Ere,T.noConflict=Loe,T.noop=z0,T.now=ip,T.pad=loe,T.padEnd=coe,T.padStart=uoe,T.parseInt=foe,T.random=eoe,T.reduce=Sie,T.reduceRight=Oie,T.repeat=doe,T.replace=hoe,T.result=qse,T.round=lae,T.runInContext=F,T.sample=Nie,T.size=xie,T.snakeCase=poe,T.some=Cie,T.sortedIndex=Are,T.sortedIndexBy=Ire,T.sortedIndexOf=xre,T.sortedLastIndex=Cre,T.sortedLastIndexBy=Dre,T.sortedLastIndexOf=Rre,T.startCase=goe,T.startsWith=yoe,T.subtract=cae,T.sum=uae,T.sumBy=fae,T.template=voe,T.times=Hoe,T.toFinite=Xi,T.toInteger=$e,T.toLength=_C,T.toLower=boe,T.toNumber=Wr,T.toSafeInteger=bse,T.toString=lt,T.toUpper=_oe,T.trim=Eoe,T.trimEnd=woe,T.trimStart=Toe,T.truncate=Soe,T.unescape=Ooe,T.uniqueId=Joe,T.upperCase=koe,T.upperFirst=B0,T.each=oC,T.eachRight=aC,T.first=nC,q0(T,function(){var c={};return wi(T,function(f,m){ut.call(T.prototype,m)||(c[m]=f)}),c}(),{chain:!1}),T.VERSION=r,Lr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(c){T[c].placeholder=T}),Lr(["drop","take"],function(c,f){Xe.prototype[c]=function(m){m=m===n?1:Kt($e(m),0);var v=this.__filtered__&&!f?new Xe(this):this.clone();return v.__filtered__?v.__takeCount__=On(m,v.__takeCount__):v.__views__.push({size:On(m,Ne),type:c+(v.__dir__<0?"Right":"")}),v},Xe.prototype[c+"Right"]=function(m){return this.reverse()[c](m).reverse()}}),Lr(["filter","map","takeWhile"],function(c,f){var m=f+1,v=m==Ce||m==Ae;Xe.prototype[c]=function(E){var S=this.clone();return S.__iteratees__.push({iteratee:_e(E,3),type:m}),S.__filtered__=S.__filtered__||v,S}}),Lr(["head","last"],function(c,f){var m="take"+(f?"Right":"");Xe.prototype[c]=function(){return this[m](1).value()[0]}}),Lr(["initial","tail"],function(c,f){var m="drop"+(f?"":"Right");Xe.prototype[c]=function(){return this.__filtered__?new Xe(this):this[m](1)}}),Xe.prototype.compact=function(){return this.filter(tr)},Xe.prototype.find=function(c){return this.filter(c).head()},Xe.prototype.findLast=function(c){return this.reverse().find(c)},Xe.prototype.invokeMap=qe(function(c,f){return typeof c=="function"?new Xe(this):this.map(function(m){return vu(m,c,f)})}),Xe.prototype.reject=function(c){return this.filter(op(_e(c)))},Xe.prototype.slice=function(c,f){c=$e(c);var m=this;return m.__filtered__&&(c>0||f<0)?new Xe(m):(c<0?m=m.takeRight(-c):c&&(m=m.drop(c)),f!==n&&(f=$e(f),m=f<0?m.dropRight(-f):m.take(f-c)),m)},Xe.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},Xe.prototype.toArray=function(){return this.take(Ne)},wi(Xe.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__,R=v?[1]:arguments,L=A instanceof Xe,G=R[0],H=L||Pe(A),K=function(He){var Ze=E.apply(T,zs([He],R));return v&&re?Ze[0]:Ze};H&&m&&typeof G=="function"&&G.length!=1&&(L=H=!1);var re=this.__chain__,de=!!this.__actions__.length,Ee=S&&!re,Be=L&&!de;if(!S&&H){A=Be?A:new Xe(this);var we=c.apply(A,R);return we.__actions__.push({func:np,args:[K],thisArg:n}),new Vr(we,re)}return Ee&&Be?c.apply(this,R):(we=this.thru(K),Ee?v?we.value()[0]:we.value():we)})}),Lr(["pop","push","shift","sort","splice","unshift"],function(c){var f=Ah[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(Pe(S)?S:[],E)}return this[m](function(A){return f.apply(Pe(A)?A:[],E)})}}),wi(Xe.prototype,function(c,f){var m=T[f];if(m){var v=m.name+"";ut.call(hl,v)||(hl[v]=[]),hl[v].push({name:f,func:m})}}),hl[Kh(n,w).name]=[{name:"wrapper",func:n}],Xe.prototype.clone=Ote,Xe.prototype.reverse=kte,Xe.prototype.value=Nte,T.prototype.at=nie,T.prototype.chain=rie,T.prototype.commit=iie,T.prototype.next=sie,T.prototype.plant=aie,T.prototype.reverse=lie,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=cie,T.prototype.first=T.prototype.head,fu&&(T.prototype[fu]=oie),T},ul=ite();Qo?((Qo.exports=ul)._=ul,Wb._=ul):hn._=ul}).call(Re)}(wd,wd.exports);var lv=wd.exports;function Hn(t){return t===null?"null":Array.isArray(t)?"array":typeof t}function So(t){return Hn(t)==="object"}function b8(t){return Array.isArray(t)&&t.length>0&&t.every(e=>"message"in e)}function Kk(t,e){return t.length<124?t:e}const _8="graphql-transport-ws";var ar;(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"})(ar||(ar={}));var Mt;(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"})(Mt||(Mt={}));function Jk(t){if(!So(t))throw new Error(`Message is expected to be an object, but got ${Hn(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 ${Hn(t.type)}`);switch(t.type){case Mt.ConnectionInit:case Mt.ConnectionAck:case Mt.Ping:case Mt.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 Mt.Subscribe:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${Hn(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 ${Hn(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 ${Hn(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 ${Hn(t.payload.variables)}`);if(t.payload.operationName!=null&&Hn(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 ${Hn(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 ${Hn(t.payload.extensions)}`);break}case Mt.Next:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${Hn(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 ${Hn(t.payload)}`);break}case Mt.Error:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${Hn(t.id)}`);if(!t.id)throw new Error(`"${t.type}" message requires a non-empty 'id' property`);if(!b8(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 Mt.Complete:{if(typeof t.id!="string")throw new Error(`"${t.type}" message expects the 'id' property to be a string, but got ${Hn(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 E8(t,e){return Jk(typeof t=="string"?JSON.parse(t,e):t)}function Rc(t,e){return Jk(t),JSON.stringify(t,e)}var $a=function(t){return this instanceof $a?(this.v=t,this):new $a(t)},w8=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 $a?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 T8(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 ve=0;ve<Ae;ve++)fe*=2;await new Promise(ve=>setTimeout(ve,fe+Math.floor(Math.random()*2700+300)))},shouldRetry:h=cv,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(!O8(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 ee=(()=>{const fe={};return{on(ve,Se){return fe[ve]=Se,()=>{delete fe[ve]}},emit(ve){var Se;"id"in ve&&((Se=fe[ve.id])===null||Se===void 0||Se.call(fe,ve))}}})(),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?[ee.emit,g.message]:[ee.emit],closed:g!=null&&g.closed?[g.closed]:[],error:g!=null&&g.error?[g.error]:[]};return{onMessage:ee.on,on(fe,ve){const Se=Ae[fe];return Se.push(ve),()=>{Se.splice(Se.indexOf(ve),1)}},emit(fe,...ve){for(const Se of[...Ae[fe]])Se(...ve)}}})();function P(ee){const Ae=[I.on("error",fe=>{Ae.forEach(ve=>ve()),ee(fe)}),I.on("closed",fe=>{Ae.forEach(ve=>ve()),ee(fe)})]}let M,B=0,Q,x=!1,U=0,Te=!1;async function ke(){clearTimeout(Q);const[ee,Ae]=await(M??(M=new Promise((Se,ht)=>(async()=>{if(x){if(await d(U),!B)return M=void 0,ht({code:1e3,reason:"All Subscriptions Gone"});U++}I.emit("connecting",x);const Ne=new N(typeof e=="function"?await e():e,_8);let $,te;function Z(){isFinite(o)&&o>0&&(clearTimeout(te),te=setTimeout(()=>{Ne.readyState===N.OPEN&&(Ne.send(Rc({type:Mt.Ping})),I.emit("ping",!1,void 0))},o))}P(be=>{M=void 0,clearTimeout($),clearTimeout(te),ht(be),be instanceof Yk&&(Ne.close(4499,"Terminated"),Ne.onerror=null,Ne.onclose=null)}),Ne.onerror=be=>I.emit("error",be),Ne.onclose=be=>I.emit("closed",be),Ne.onopen=async()=>{try{I.emit("opened",Ne);const be=typeof n=="function"?await n():n;if(Ne.readyState!==N.OPEN)return;Ne.send(Rc(be?{type:Mt.ConnectionInit,payload:be}:{type:Mt.ConnectionInit},_)),isFinite(l)&&l>0&&($=setTimeout(()=>{Ne.close(ar.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},l)),Z()}catch(be){I.emit("error",be),Ne.close(ar.InternalClientError,Kk(be instanceof Error?be.message:new Error(be).message,"Internal client error"))}};let ne=!1;Ne.onmessage=({data:be})=>{try{const Me=E8(be,w);if(I.emit("message",Me),Me.type==="ping"||Me.type==="pong"){I.emit(Me.type,!0,Me.payload),Me.type==="pong"?Z():a||(Ne.send(Rc(Me.payload?{type:Mt.Pong,payload:Me.payload}:{type:Mt.Pong})),I.emit("pong",!1,Me.payload));return}if(ne)return;if(Me.type!==Mt.ConnectionAck)throw new Error(`First message cannot be of type ${Me.type}`);clearTimeout($),ne=!0,I.emit("connected",Ne,Me.payload,x),x=!1,U=0,Se([Ne,new Promise((Je,tn)=>P(tn))])}catch(Me){Ne.onmessage=null,I.emit("error",Me),Ne.close(ar.BadResponse,Kk(Me instanceof Error?Me.message:new Error(Me).message,"Bad response"))}}})())));ee.readyState===N.CLOSING&&await Ae;let fe=()=>{};const ve=new Promise(Se=>fe=Se);return[ee,fe,Promise.race([ve.then(()=>{if(!B){const Se=()=>ee.close(1e3,"Normal Closure");isFinite(s)&&s>0?Q=setTimeout(()=>{ee.readyState===N.OPEN&&Se()},s):Se()}}),Ae])]}function pe(ee){if(cv(ee)&&(S8(ee.code)||[ar.InternalServerError,ar.InternalClientError,ar.BadRequest,ar.BadResponse,ar.Unauthorized,ar.SubprotocolNotAcceptable,ar.SubscriberAlreadyExists,ar.TooManyInitialisationRequests].includes(ee.code)))throw ee;if(Te)return!1;if(cv(ee)&&ee.code===1e3)return B>0;if(!u||U>=u||!h(ee)||p!=null&&p(ee))throw ee;return x=!0}r||(async()=>{for(B++;;)try{const[,,ee]=await ke();await ee}catch(ee){try{if(!pe(ee))return}catch(Ae){return i==null?void 0:i(Ae)}}})();function Ce(ee,Ae){const fe=b(ee);let ve=!1,Se=!1,ht=()=>{B--,ve=!0};return(async()=>{for(B++;;)try{const[Ne,$,te]=await ke();if(ve)return $();const Z=I.onMessage(fe,ne=>{switch(ne.type){case Mt.Next:{Ae.next(ne.payload);return}case Mt.Error:{Se=!0,ve=!0,Ae.error(ne.payload),ht();return}case Mt.Complete:{ve=!0,ht();return}}});Ne.send(Rc({id:fe,type:Mt.Subscribe,payload:ee},_)),ht=()=>{!ve&&Ne.readyState===N.OPEN&&Ne.send(Rc({id:fe,type:Mt.Complete},_)),B--,ve=!0,$()},await te.finally(Z);return}catch(Ne){if(!pe(Ne))return}})().then(()=>{Se||Ae.complete()}).catch(Ne=>{Ae.error(Ne)}),()=>{ve||ht()}}return{on:I.on,subscribe:Ce,iterate(ee){const Ae=[],fe={done:!1,error:null,resolve:()=>{}},ve=Ce(ee,{next(ht){Ae.push(ht),fe.resolve()},error(ht){fe.done=!0,fe.error=ht,fe.resolve()},complete(){fe.done=!0,fe.resolve()}}),Se=function(){return w8(this,arguments,function*(){for(;;){for(Ae.length||(yield $a(new Promise($=>fe.resolve=$)));Ae.length;)yield yield $a(Ae.shift());if(fe.error)throw fe.error;if(fe.done)return yield $a(void 0)}})}();return Se.throw=async ht=>(fe.done||(fe.done=!0,fe.error=ht,fe.resolve()),{done:!0,value:void 0}),Se.return=async()=>(ve(),{done:!0,value:void 0}),Se},async dispose(){if(Te=!0,M){const[ee]=await M;ee.close(1e3,"Normal Closure")}},terminate(){M&&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 cv(t){return So(t)&&"code"in t&&"reason"in t}function S8(t){return[1e3,1001,1006,1005,1012,1013,1014].includes(t)?!1:t>=1e3&&t<=1999}function O8(t){return typeof t=="function"&&"constructor"in t&&"CLOSED"in t&&"CLOSING"in t&&"CONNECTING"in t&&"OPEN"in t}const k8=({apiUrl:t,listeners:e})=>{const n=T8({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},Xk="api.warrior.well-played.gg/graphql",N8=({token:t,organizationId:e,invalidationPolicies:n,handlers:r})=>{const i=new uy.InvalidationPolicyCache({invalidationPolicies:{...n,timeToLive:(n==null?void 0:n.timeToLive)??12e4,renewalPolicy:(n==null?void 0:n.renewalPolicy)??uy.RenewalPolicy.None}});p8({cache:i,storage:new v8(window.localStorage)});const s=rg(({query:o})=>{const a=uo(o);return a.kind==="OperationDefinition"&&a.operation==="subscription"},new cV(k8({apiUrl:Xk,listeners:r==null?void 0:r.webSocket})),ng([oV(async()=>({headers:lv.omitBy({"organization-id":e,authorization:t?`Bearer ${t}`:void 0},lv.isNil)})),KS(({graphQLErrors:o,networkError:a,operation:l,forward:u})=>{var d;return(d=r==null?void 0:r.onError)==null||d.call(r,{graphQLErrors:o,networkError:a}),u(l)}),new Nf({uri:`https://${Xk}`})]));return new Pf({cache:i,link:s,defaultOptions:{watchQuery:{fetchPolicy:"network-only",errorPolicy:"ignore"},query:{fetchPolicy:"network-only",errorPolicy:"all"},mutate:{errorPolicy:"all"}}})},Zk=oe.createContext({}),e1=()=>{const t=oe.useContext(Zk);if(!t)throw new Error("useWellPlayed must be used within a WellPlayedProvider");return t},A8=({children:t,clientConfig:e,organizationId:n})=>{const r=sV(),i=N8({token:(r==null?void 0:r.accessToken)??void 0,organizationId:n,...e});return he.jsx(uS,{client:i,children:he.jsx(Zk.Provider,{value:{organizationId:n,apiClient:i},children:t})})},I8=({children:t,oidcConfig:e,wpAppConfig:n,...r})=>he.jsx(tV,{...e,configuration:{...n,...e==null?void 0:e.configuration,authority:"https://oauth.warrior.well-played.gg"},children:he.jsx(A8,{...r,children:t})}),x8=(t,e)=>{const{data:n,loading:r,refetch:i,fetchMore:s}=dc(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}}})}}},uv=(t,e)=>{const[n,r]=oe.useState(!(e!=null&&e.skip)),[i,s]=oe.useState([]),[o]=Wg(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 oe.useEffect(()=>{e!=null&&e.skip||a()},[e==null?void 0:e.skip]),{loading:n,results:i,refetch:a}};var Td={DOCUMENT:"Document",FRAGMENT_DEFINITION:"FragmentDefinition"};class C8 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 st,ge;function Pt(t){return new C8(`Syntax Error: Unexpected token at ${ge} in ${t}`)}function lr(t){if(t.lastIndex=ge,t.test(st))return st.slice(ge,ge=t.lastIndex)}var Sd=/ +(?=[^\s])/y;function D8(t){for(var e=t.split(`
252
252
  `),n="",r=0,i=0,s=e.length-1,o=0;o<e.length;o++)Sd.lastIndex=0,Sd.test(e[o])&&(o&&(!r||Sd.lastIndex<r)&&(r=Sd.lastIndex),i=i||o,s=o);for(var a=i;a<=s;a++)a!==i&&(n+=`
253
253
  `),n+=e[a].slice(r).replace(/\\"""/g,'"""');return n}function Fe(){for(var t=0|st.charCodeAt(ge++);t===9||t===10||t===13||t===32||t===35||t===44||t===65279;t=0|st.charCodeAt(ge++))if(t===35)for(;(t=st.charCodeAt(ge++))!==10&&t!==13;);ge--}var Pn=/[_A-Za-z]\w*/y,fv=new RegExp("(?:(null|true|false)|\\$("+Pn.source+')|(-?\\d+)((?:\\.\\d+)?[eE][+-]?\\d+|\\.\\d+)?|("""(?:"""|(?:[\\s\\S]*?[^\\\\])"""))|("(?:"|[^\\r\\n]*?[^\\\\]"))|('+Pn.source+"))","y"),Os=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}(Os||{}),R8=/\\/;function Od(t){var e,n;if(fv.lastIndex=ge,st.charCodeAt(ge)===91){ge++,Fe();for(var r=[];st.charCodeAt(ge)!==93;)r.push(Od(t));return ge++,Fe(),{kind:"ListValue",values:r}}else if(st.charCodeAt(ge)===123){ge++,Fe();for(var i=[];st.charCodeAt(ge)!==125;){if((e=lr(Pn))==null||(Fe(),st.charCodeAt(ge++)!==58))throw Pt("ObjectField");Fe(),i.push({kind:"ObjectField",name:{kind:"Name",value:e},value:Od(t)})}return ge++,Fe(),{kind:"ObjectValue",fields:i}}else if((n=fv.exec(st))!=null){if(ge=fv.lastIndex,Fe(),(e=n[Os.Const])!=null)return e==="null"?{kind:"NullValue"}:{kind:"BooleanValue",value:e==="true"};if((e=n[Os.Var])!=null){if(t)throw Pt("Variable");return{kind:"Variable",name:{kind:"Name",value:e}}}else if((e=n[Os.Int])!=null){var s;return(s=n[Os.Float])!=null?{kind:"FloatValue",value:e+s}:{kind:"IntValue",value:e}}else{if((e=n[Os.BlockString])!=null)return{kind:"StringValue",value:D8(e.slice(3,-3)),block:!0};if((e=n[Os.String])!=null)return{kind:"StringValue",value:R8.test(e)?JSON.parse(e):e.slice(1,-1),block:!1};if((e=n[Os.Enum])!=null)return{kind:"EnumValue",value:e}}}throw Pt("Value")}function t1(t){if(st.charCodeAt(ge)===40){var e=[];ge++,Fe();var n;do{if((n=lr(Pn))==null||(Fe(),st.charCodeAt(ge++)!==58))throw Pt("Argument");Fe(),e.push({kind:"Argument",name:{kind:"Name",value:n},value:Od(t)})}while(st.charCodeAt(ge)!==41);return ge++,Fe(),e}}function Va(t){if(st.charCodeAt(ge)===64){var e=[],n;do{if(ge++,(n=lr(Pn))==null)throw Pt("Directive");Fe(),e.push({kind:"Directive",name:{kind:"Name",value:n},arguments:t1(t)})}while(st.charCodeAt(ge)===64);return e}}function M8(){for(var t,e=0;st.charCodeAt(ge)===91;)e++,ge++,Fe();if((t=lr(Pn))==null)throw Pt("NamedType");Fe();var n={kind:"NamedType",name:{kind:"Name",value:t}};do if(st.charCodeAt(ge)===33&&(ge++,Fe(),n={kind:"NonNullType",type:n}),e){if(st.charCodeAt(ge++)!==93)throw Pt("NamedType");Fe(),n={kind:"ListType",type:n}}while(e--);return n}var dv=new RegExp("(?:(\\.{3})|("+Pn.source+"))","y"),hv=function(t){return t[t.Spread=1]="Spread",t[t.Name=2]="Name",t}(hv||{});function kd(){var t=[],e,n;do if(dv.lastIndex=ge,(n=dv.exec(st))!=null){if(ge=dv.lastIndex,n[hv.Spread]!=null){Fe();var r=lr(Pn);if(r!=null&&r!=="on")Fe(),t.push({kind:"FragmentSpread",name:{kind:"Name",value:r},directives:Va(!1)});else{if(Fe(),r==="on"){if((r=lr(Pn))==null)throw Pt("NamedType");Fe()}var i=Va(!1);if(st.charCodeAt(ge++)!==123)throw Pt("InlineFragment");Fe(),t.push({kind:"InlineFragment",typeCondition:r?{kind:"NamedType",name:{kind:"Name",value:r}}:void 0,directives:i,selectionSet:kd()})}}else if((e=n[hv.Name])!=null){var s=void 0;if(Fe(),st.charCodeAt(ge)===58){if(ge++,Fe(),s=e,(e=lr(Pn))==null)throw Pt("Field");Fe()}var o=t1(!1);Fe();var a=Va(!1),l=void 0;st.charCodeAt(ge)===123&&(ge++,Fe(),l=kd()),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 Pt("SelectionSet");while(st.charCodeAt(ge)!==125);return ge++,Fe(),{kind:"SelectionSet",selections:t}}function P8(){var t,e;if((t=lr(Pn))==null||(Fe(),lr(Pn)!=="on")||(Fe(),(e=lr(Pn))==null))throw Pt("FragmentDefinition");Fe();var n=Va(!1);if(st.charCodeAt(ge++)!==123)throw Pt("FragmentDefinition");return Fe(),{kind:"FragmentDefinition",name:{kind:"Name",value:t},typeCondition:{kind:"NamedType",name:{kind:"Name",value:e}},directives:n,selectionSet:kd()}}var F8=/(?:query|mutation|subscription|fragment)/y;function L8(t){var e,n,r;if(t&&(Fe(),e=lr(Pn),n=function(){if(Fe(),st.charCodeAt(ge)===40){var s=[];ge++,Fe();var o;do{if(st.charCodeAt(ge++)!==36||(o=lr(Pn))==null)throw Pt("Variable");if(Fe(),st.charCodeAt(ge++)!==58)throw Pt("VariableDefinition");Fe();var a=M8(),l=void 0;st.charCodeAt(ge)===61&&(ge++,Fe(),l=Od(!0)),Fe(),s.push({kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:o}},type:a,defaultValue:l,directives:Va(!0)})}while(st.charCodeAt(ge)!==41);return ge++,Fe(),s}}(),r=Va(!1)),st.charCodeAt(ge)===123)return ge++,Fe(),{kind:"OperationDefinition",operation:t||"query",name:e?{kind:"Name",value:e}:void 0,variableDefinitions:n,directives:r,selectionSet:kd()}}function $8(t,e){return ge=0,function(r,i){var s,o;Fe();var a=[];do if((s=lr(F8))==="fragment")Fe(),a.push(P8());else if((o=L8(s))!=null)a.push(o);else throw Pt("Document");while(ge<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}}}}(st=typeof t.body=="string"?t.body:t)}var n1=0,pv=new Set;function r1(){function t(e,n){var r=$8(e).definitions,i=new Set;for(var s of n||[])for(var o of s.definitions)o.kind===Td.FRAGMENT_DEFINITION&&!i.has(o)&&(r.push(o),i.add(o));var a;(a=r[0].kind===Td.FRAGMENT_DEFINITION)&&r[0].directives&&(r[0].directives=r[0].directives.filter(u=>u.name.value!=="_unmask"));var l;return{kind:Td.DOCUMENT,definitions:r,get loc(){if(!l&&a){var u=e+function(h){try{n1++;var p="";for(var g of h)if(!pv.has(g)){pv.add(g);var{loc:y}=g;y&&(p+=y.source.body)}return p}finally{--n1==0&&pv.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:Td.DOCUMENT,definitions:r?r.definitions:[],documentId:n}},t}function V8(...t){return t.length===2?t[1]:t[0]}r1();const Oo=r1(),j8=Oo(`
254
254
  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.1.0",
3
+ "version": "1.1.1",
4
4
  "license": "MIT",
5
5
  "main": "dist/wp-react-sdk.cjs.js",
6
6
  "module": "dist/wp-react-sdk.es.js",