PageSourceSearch

https://www.start.gg/assets/__static/2219/_next/static/chunks/page…/[[...optionalParams]]-3047153b23de1587.js

js start.gg collected 2026-09-24 08:51:04 UTC 173,118 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6017],{10686:function(e,n,i){"use strict";i.d(n,{Z:function(){return C}});var t=i(78147),a=i(41074),d=i(92777),r=i(82262),s=i(10748),l=i(81531),m=i(63553),c=i(37247),o=i(59499),u=i(98844),v=i(67294),k=i(43393),g=i(96486),p=i(34174),N=i(50229),h=i(37448),f=i(1007),S=i(15420),y=i(48548),F=i(99874),b=i(23148),I=i(30044),D=i(44013),x=i(85893);function j(e){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,t=(0,c.Z)(e);if(n){var a=(0,c.Z)(this).constructor;i=Reflect.construct(t,arguments,a)}else i=t.apply(this,arguments);return(0,m.Z)(this,i)}}var T=function(e){(0,l.Z)(i,e);var n=j(i);function i(e){var t;return(0,d.Z)(this,i),(t=n.call(this,e)).formSubmit=t.formSubmit.bind((0,s.Z)(t)),t}return(0,r.Z)(i,[{key:"formSubmit",value:function(e,n,i){i&&this.props.executeAction(b.Z,(0,g.extend)({validationKey:n},{track:{expandedFields:{dimension2:S.Z.DEFAULT.DIMENSION2.REGISTRATION_MANAGEMENT}}}))}},{key:"isRegisteredForOption",value:function(e){var n=this.props.regOptions,i=n&&n.getIn(["options","additional"]);return i&&i.get(e&&e.get("id"))}},{key:"isValidSubfield",value:function(e){var n=this.props,i=n.regOptionValues,t=n.subFieldEventId;if(t){var a=i.find((function(e){return e.get("optionType")===h.Z.EVENT&&e.get("optionTypeId")===t})),d=a&&a.getIn(["additional","subfields"]);return d&&d.contains(e&&e.get("id"))}return!function(e){return e.get("isSubfield")}(e)}},{key:"render",value:function(){var e=this,n=this.props,i=n.currentUser,t=n.registrationState,a=n.regOptions,d=n.regOptionSelections,r=n.regOptionValues,s=n.regOptionValuesByOption,l=n.tournament,m=n.translate,c=n.onEventManagePage,o=a.filter((function(n){return(function(e){return e.get("visible")}(n)||e.isRegisteredForOption(n))&&e.isValidSubfield(n)&&function(e){return e.get("optionType")===h.Z.ADDITIONAL}(n)&&function(e){return(0,g.includes)([f.Z.DISCORD_JOIN,f.Z.TWITCH_SUB,f.Z.TWITCH_FOLLOW],e.get("fieldType"))}(n)})),v=y.Z.getRequiredOptionIds(t,a,r);return o&&o.size?(0,x.jsx)(N.Z,{autoComplete:"on",name:"manageConnectedAccounts",role:"form",onSubmit:this.formSubmit,validationKey:"manageConnectedAccounts",showSubmit:!1,children:(0,x.jsxs)(p.Zb,{children:[(0,x.jsx)(p.Ol,{children:(0,x.jsx)(u.ZT,{variant:"h5",component:"h3",children:"Connections"})}),(0,x.jsx)(p.eW,{isBordered:!0,children:(0,x.jsx)(F.Z,{currentUser:i,isManageRegistration:!0,name:"options",optionType:h.Z.ADDITIONAL,registrationOptions:o,registrationState:t,requiredRegOptionIds:v,regOptionSelections:d,regOptionValuesByOption:s,tournament:l})}),(0,x.jsx)(p.iR,{children:(0,x.jsx)(p.zx,{buttonType:"submit",type:"primary",label:m("Common.save")})})]})}):c?(0,x.jsxs)("section",{className:"tw",children:[(0,x.jsx)(I.Z,{title:m("ManageConnectedAccounts.connectedTitle")}),(0,x.jsx)(D.Z,{image:"https://images.start.gg/empty-states/accounts.webp",description:m("ManageConnectedAccounts.connectedEmptyState")})]}):null}}]),i}(v.Component);(0,o.Z)(T,"defaultProps",{participant:(0,k.Map)(),registrationState:(0,k.Map)(),subFieldEventId:null,onEventManagePage:!1});var P=T,C=(0,a.Z)()((0,t.Z)(P))},51355:function(e,n,i){"use strict";var t=i(59499),a=(i(67294),i(43393)),d=i(33241),r=i(5680),s=i(85893);function l(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function m(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?l(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):l(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var c={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"EventProfileContentHeader"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"slug"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"event"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"slug"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tournament"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"events"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filter"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"published"},value:{kind:"BooleanValue",value:!0}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:207,source:{body:"query EventProfileContentHeader($slug: String) {\n\tevent(slug: $slug) {\n\t\tid\n\t\tname\n\t\tstate\n\t\tslug\n\t\ttournament {\n\t\t\tid\n\t\t\tslug\n\t\t\tevents(filter: { published: true }) {\n\t\t\t\tid\n\t\t\t\tname\n\t\t\t\tslug\n\t\t\t}\n\t\t}\n\t}\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}}}},o={isLoading:!1,currentRoute:(0,a.Map)(),label:null,isActiveFn:function(){}};function u(e){var n=e.slug,i=e.eventSlug,t="".concat(d.Z.TOURNAMENT,"/").concat(n,"/").concat(d.Z.EVENT,"/").concat(i),a=d.Z.EVENT;return t?(0,s.jsx)(r.Z,m(m({isEventHeader:!0},e),{},{query:c,variables:{slug:t},profileSlug:t,profileType:a,eventFromQuery:function(e){return(e||{}).event}})):null}u.defaultProps=o,n.Z=u},5655:function(e,n,i){"use strict";var t=i(81645).Z.extend({BASE_URL:"/participant/",add:function(e,n,i){this.request("create",this.BASE_URL,e,n,i)},save:function(e,n,i,t){var a=n;a.id=e,this.request("update",this.BASE_URL+e,a,i,t)},getPage:function(e,n){var i="/tournament/".concat(e.params.slug,"/participant"),t=this;this.request("read",i,e,(function(i,a,d){var r=t.normalizePaginatedData(i,d,e.schema,a);n(r,a)}))},matchPlayers:function(e){this.request("create","".concat(this.BASE_URL,"match"),e)},bulkAdd:function(e){this.request("create","".concat(this.BASE_URL,"bulkAdd"),e)},updatePhase:function(e,n,i){var t="".concat(this.BASE_URL+e,"/updatePhase");this.request("update",t,n,i,n.validationKey)}});n.Z=t},54226:function(e,n,i){"use strict";i.d(n,{Z:function(){return s}});var t=i(43393),a=i.n(t),d=i(30343),r=i(9301);function s(e,n,i){var t=n.data;e.dispatch(r.Z.LINEITEM.ADD,t);var s=e.getStore("ActiveCartStore"),l=e.getStore("ShopStore"),m=e.getStore("ShopProductStore"),c=t.productId,o=m.get(c),u=l.get(o.get("shopI
1d")),v=m.getByShop(u.get("id")),k=s.getState(),g=n.track||{},p=g.expandedFields||{},N=a().fromJS(t);d.Z.trackAddToCart(g.tracker,N,k,u,v,p),i()}},10414:function(e,n,i){"use strict";var t=i(10748),a=i(92777),d=i(82262),r=i(81531),s=i(63553),l=i(37247),m=i(59499),c=i(81020),o=i.n(c),u=i(67294),v=i(72555),k=i.n(v),g=i(96486),p=i(11151),N=i(78147),h=i(9301),f=i(52761),S=i(24069),y=i(35244),F=i(93362),b=i(71324),I=i(48402),D=i(3248),x=i(85893);function j(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function T(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?j(Object(i),!0).forEach((function(n){(0,m.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):j(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}function P(e){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,t=(0,l.Z)(e);if(n){var a=(0,l.Z)(this).constructor;i=Reflect.construct(t,arguments,a)}else i=t.apply(this,arguments);return(0,s.Z)(this,i)}}var C,O,Z=k()({displayName:"ModalWrapper",getDefaultProps:function(){return{openOnMount:!0}},getInitialState:function(){var e=this.getStateFromStores();return this.props.openOnMount&&(e.hidden=!1),e},getStateFromStores:function(){var e=this.props,n=e.shouldClose,i=e.shouldOpen,t=e.id;return this.hiding&&!n&&i&&(this.hiding=!1),{hidden:t&&!i||n&&!i}},componentDidMount:function(){if(this._isMounted=!0,!this.state.hidden){this.setState({justMounted:!0}),this.props.executeAction(f.Z,{path:this.props.urlPath,modalId:this.props.id});var e=this.props.id||"unknown";this.props.executeAction(b.Z,{action:F.Z.MODAL_SHOW,modal:e})}},componentDidUpdate:function(e,n){var i=this.props,t=i.shouldClose,a=i.shouldOpen;e.shouldClose===t&&e.shouldOpen===a||this.onStoreChange();var d=this.props.id||"unknown";!this.state.hidden&&n.hidden?(this.props.executeAction(b.Z,{action:F.Z.MODAL_SHOW,modal:d}),this.props.executeAction(f.Z,{path:this.props.urlPath,modalId:this.props.id})):!n.hidden&&this.state.hidden&&this.onClose()},componentWillUnmount:function(){var e=this.props.id||"unknown";I.Z.track(F.Z.MODAL_HIDE,{action:F.Z.MODAL_HIDE,modal:e}),this.state.hiding||this.hideModal(),this._isMounted=!1},onStoreChange:function(){this._isMounted&&!this.state.justMounted?this.setState(this.getStateFromStores()):this.state.justMounted&&this.setState({justMounted:!1})},onClose:function(){"function"===typeof this.props.onClose&&this.props.onClose()},hideModal:function(){if(!this.hiding){this.setState({hiding:!0}),this.hiding=!0;var e=this.validationKey||this.props.validationKey;e&&this.props.executeAction(y.Z,{key:e}),this.props.executeAction(S.Z,{modalId:this.props.id})}},renderOverlay:function(){if(!this.state.hidden)return u.cloneElement(this.props.modal,{onRequestHide:this.hideModal})},render:function(){return(0,x.jsx)(p.h_,{container:function(){return document.body},children:this.renderOverlay()})}});Z.withContext=(C=Z,O="modal",function(e){var n,i=function(e){(0,r.Z)(i,e);var n=P(i);function i(){return(0,a.Z)(this,i),n.apply(this,arguments)}return(0,d.Z)(i,[{key:"getChildContext",value:function(){return this.props.context}},{key:"render",value:function(){var e=this.props,n=e.wrapped,i=(0,g.omit)(e,"wrapped");return delete i.context,u.cloneElement(n,i)}}]),i}(u.Component);return(0,m.Z)(i,"childContextTypes",e),n=function(e){(0,r.Z)(s,e);var n=P(s);function s(){var e;(0,a.Z)(this,s);for(var d=arguments.length,r=new Array(d),l=0;l<d;l++)r[l]=arguments[l];return e=n.call.apply(n,[this].concat(r)),(0,m.Z)((0,t.Z)(e),"getWrappedOverlay",(function(){return(0,x.jsx)(i,{context:e.context,wrapped:e.props[O],__modalId:e.props.id})})),e}return(0,d.Z)(s,[{key:"render",value:function(){var e=this.props,n={};return n[O]=this.getWrappedOverlay(),(0,x.jsx)(C,T(T(T({},e),n),{},{children:this.props.children}))}}]),s}(u.Component),(0,m.Z)(n,"contextTypes",e),n}),n.Z=(0,D.Z)((0,N.Z)(Z.withContext({dragDropManager:o().object,getStore:o().func,executeAction:o().func,_trackingData:o().object})),["AppStateStore"],(function(e,n){return{shouldClose:!e.AppStateStore.hasState(h.Z.APP.CLOSE_MODAL),shouldOpen:e.AppStateStore.isModalOpen(n.id
1)}}))},55352:function(e,n,i){"use strict";i.d(n,{Z:function(){return g}});var t=i(59499),a=i(17674),d=(i(67294),i(50319)),r=i(41640),s=i(79845),l=i(84250),m=i(85893);function c(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function o(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?c(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var u={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ConfirmLeaveTeamDialog"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"teamId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"team"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"teamId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"confirmLeaveTeamDialog"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"confirmLeaveTeamDialog"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Team"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCurrentUserAdmin"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userMember"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"adminRole"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"roleName"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:149,source:{body:'#import "./ConfirmLeaveTeamDialog.fragment.gql"\n\nquery ConfirmLeaveTeamDialog ($teamId: ID!) {\n\tteam (id: $teamId) {\n\t\t...confirmLeaveTeamDialog\n\t}\n}',name:"GraphQL request",locationOffset:{line:1,column:1}}}},v={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"LeaveTeam"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"memberId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeMember"},arguments:[{kind:"Argument",name:{kind:"Name",value:"memberId"},value:{kind:"Variable",name:{kind:"Name",value:"memberId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"confirmLeaveTeamDialog"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"confirmLeaveTeamDialog"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Team"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCurrentUserAdmin"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userMember"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"adminRole"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"roleName"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:157,source:{body:'#import "./ConfirmLeaveTeamDialog.fragment.gql"\n\nmutation LeaveTeam ($memberId: ID!) {\n\tremoveMember (memberId: $memberId) {\n\t\t...confirmLeaveTeamDialog\n\t}\n}',name:"GraphQL request",locationOffset:{line:1,column:1}}}};function k(e){var n=e.teamId,i=e.team,t=e.onCompleted,c=(0,r.Z)(u,{variables:{teamId:n},skip:!!i}),k=c.loading,g=(c.error,c.data),p=(0,d.D)(v,{refetchQueries:function(){return["ParticipantTeams","GlobalTeamRoster","UserTeams","TeamsEventManager"]}}),N=(0,a.Z)(p,1)[0],h=(0,s.Z)().translate;if(k)return null;var f=((i||g.team).userMember||{}).id;return(0,m.jsx)(l.Z,o(o({},e),{},{content:h("ConfirmLeaveTeamDialog.confirmation"),onSuccess:t,mutation:function(){return N({variables:{memberId:f}})}}))}k.defaultProps={team:null,onCompleted:function(){}};var g=k},15420:function(e,n,i){"use strict";
1var t=i(96486),a={DIMENSION2:{REGISTRATION:"Tournament Registration",SHOP:"Shop",REGISTRATION_MANAGEMENT:"Registration Management"}};n.Z={DEFAULT:(0,t.extend)(a,{}),SHOP:(0,t.extend)(a,{})}},30343:function(e,n,i){"use strict";var t=i(96486),a=i(43393),d=i.n(a),r=i(15420),s=i(21011),l=i(58999),m=i(48402);n.Z={trackPurchase:function(e,n,i,a,d,r){r=r||{};var l=new s.Z(e).getTrackingData();l=(0,t.extend)({},l,{affiliation:i.get("name")}),this.setProducts("shop",n,i,a,d,r),m.Z.trackEventForProperty("shop",["ec:setAction","purchase",l]),m.Z.trackEventForProperty("shop",["send","event","Shop","Purchase",l.id])},setProducts:function(e,n,i,a,s,c){var o=new l.Z(d().Map(),i,a).getCartVars(n,(0,t.extend)({dimension2:r.Z.SHOP.DIMENSION2.SHOP,dimension6:s},c));m.Z.setProductsForProperty(e,o)},trackAddToCart:function(e,n,i,t,a,d){var r=new l.Z(i,t,a).getTrackingVars(n,d);m.Z.trackEventForProperty(e,["ec:addProduct",r]),m.Z.trackEventForProperty(e,["ec:setAction","add"]),m.Z.trackEventForProperty(e,["send","event","Shop","click","add to cart"])},trackRemoveFromCart:function(e,n,i,t,a,d){var r=new l.Z(i,t,a).getTrackingVars(n,d);m.Z.trackEventForProperty(e,["ec:addProduct",r]),m.Z.trackEventForProperty(e,["ec:setAction","remove"]),m.Z.trackEventForProperty(e,["send","event","Shop","click","remove from cart"])},setCurrency:function(e){m.Z.trackEventForProperty("shop",["set","&cu",e])},trackFunnelStep:function(e,n,i,t,a,d){var r=new l.Z(i,t,a).getCartVars(!1,d);m.Z.setProductsForProperty("shop",r),m.Z.trackEventForProperty("shop",["ec:setAction","checkout",{step:e,option:n}]),m.Z.trackEventForProperty("shop",["send","event","Shop","Checkout",e])}}},37078:function(e,n,i){"use strict";i.d(n,{Z:function(){return T}});var t=i(59499),a=(i(67294),i(41640)),d=i(23198),r=i(21671),s=i(42844),l=i(17674),m=i(81020),c=i.n(m),o=i(79845),u=i(70923),v=i(98844),k=i(49202),g=i(55352),p=i(86989),N=i(37770),h=i(85893),f=(c().object.isRequired,c().func,{onLeaveTeam:null}),S=function(e){var n=e.team,i=e.onLeaveTeam,t=n.editTeamUrl,a=n.isCurrentUserAdmin,s=n.userMember,m=(n.event||{}).canEditTeams,c=(0,o.Z)().translate,f=(0,u.Z)(g.Z),S=(0,l.Z)(f,2),y=S[0],F=S[1];return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(y,{team:n,onCompleted:i}),(0,h.jsx)(d.Zb,{children:(0,h.jsx)(d.aY,{children:(0,h.jsxs)(r.xu,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[(0,h.jsx)(k.ZP,{team:n,infoLines:[(0,h.jsx)(p.ZP,{team:n}),(0,h.jsx)(N.ZP,{team:n})]}),a&&(0,h.jsx)(r.xu,{display:"flex",flexShrink:0,ml:2,children:(0,h.jsx)(v.zx,{href:t,type:"outline",children:(0,h.jsx)(r.xu,{whiteSpace:"nowrap",children:c("ManageTeamCard.editTeam")})})}),!a&&s&&m&&(0,h.jsx)(r.xu,{display:"flex",flexShrink:0,ml:2,children:(0,h.jsx)(v.zx,{onClick:F,type:"outline",children:(0,h.jsx)(r.xu,{whiteSpace:"nowrap",children:c("ManageTeamCard.leaveTeam")})})})]})})})]})};S.defaultProps=f;var y=S;function F(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function b(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?F(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):F(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var I={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ManageTeamCard"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"teamId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"team"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"teamId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"manageTeamCard"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"manageTeamCard"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventTeam"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCurrentUserAdmin"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"editTeamUrl"},name:{kind:"Name",value:"adminUrl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"tab"},value:{kind:"StringValue",value:"event-settings",block:!1}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"entrant"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"event"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"canEditTeams"},arguments:[],directives:[]}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"confirmLeaveTeamDialog"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"teamPassport"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"teamEventInfoLine"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"teamAlertsInfoLine"},directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"confirmLeaveTeamDialog"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Team"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCurrentUserAdmin"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userMember"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"adminRole"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"roleName"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"teamPassport"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Team"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"verified"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCurrentUserAdmin"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"teamName"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"teamAvatar"},directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventTeam"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"entrant"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"teamEventInfoLine"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Team"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventTeam"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"event"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tournament"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"videogame"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"teamAlertsInfoLine"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventTeam"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"entrant"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"teamName"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Team"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"teamAvatar"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Team"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"image"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"height"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isOriginal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]}]}}],loc:{start:0,end:125,source:{body:'#import "./ManageTeamCard.fragment.gql"\n\nquery ManageTeamCard ($teamId: ID!) {\n\tteam (id: $teamId) {\n\t\t...manageTeamCard\n\t}\n}',name:"GraphQL request",locationOffset:{line:1,column:1}}}},D=b({},f);function x(e){var n=e.teamId,i=e.team,t=(0,a.Z)(I,{variables:{teamId:n},skip:!!i}),l=t.loading,m=(t.error,t.data);return l?(0,h.jsx)(d.Zb,{children:(0,h.jsx)(r.xu,{mt:2,mb:2,ml:1,children:(0,h.jsx)(s.Sk,{})})}):(0,h.jsx)(y,b({team:i||m.team},e))}x.defaultProps=D;var j=x;j.pres=y;var T=j},37770:function(e,n,i){"use strict";i.d(n,{lG:function(){return l}});var t=i(81020),a=i.n(t),d=(i(67294),i(79845)),r=i(98844),s=i(85893),l=(a().object.isRequired,{}),m=function(e){var n=e.team.entrant,i=(0,d.Z)().translate;return n?null:(0,s.jsxs)(r.QP,{type:"warning",hasPadding:!1,children:[(0,s.jsx)("i",{className:"fa fa-warning"}),i("TeamAlertsInfoLine.incompleteTeam")]})};m.defaultProps=l,n.ZP=m},40859:function(e,n,i){"use strict";i.r(n),i.d(n,{__N_SSP:function(){return it},default:function(){return tt}});var t=i(59499),a=i(66147),d=i(67294),r=i(11214),s=i(40114),l=i(74188),m=i(78147),c=i(41074),o=i(51355),u=i(33241),v=i(45564),k=i(81930),g=i(92777),p=i(82262),N=i(81531),h=i(63553),f=i(37247),S=i(43393),y=i.n(S),F=i(94184),b=i.n(F),I=i(34174),D=i(98844),x=i(21671),j=i(55543),T=i(509),P=i(96908),C=i(85302),O=i(34202),Z=i(61140),w=i(50877
1),E=i(88564),M=i(90773),A=i(3248),V=i(23080),L=i(12315),q=i(47090),R=i(77838),U=i(85893);function $(e){var n=e.message;return(0,U.jsx)(R.Z,{imageUrl:"https://images.start.gg/images/site-images/Lock-Empty-State.svg",message:n,altText:"Empty"})}$.defaultProps={message:""};var B=$,z=i(41444),_=i(98821),G=i(17674),H=i(73337),Q=i(66688),W=i(84589),K=i(73342),J=i(96486),X=i(50319),Y=i(25403),ee=i(19001),ne=i(12848),ie=i(37342),te=i(6327),ae=i(99971),de=i(38668),re=i(38912),se=i(37078),le=i(46972),me=i(95114),ce=i(90102),oe=i(2473),ue=i(95070),ve=i(29370),ke=i(41640),ge=i(81020),pe=i.n(ge),Ne={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AcceptInvite"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"teamId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"inviteCode"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"requestSpot"},arguments:[{kind:"Argument",name:{kind:"Name",value:"teamId"},value:{kind:"Variable",name:{kind:"Name",value:"teamId"}}},{kind:"Argument",name:{kind:"Name",value:"inviteCode"},value:{kind:"Variable",name:{kind:"Name",value:"inviteCode"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:125,source:{body:"mutation AcceptInvite ($teamId: ID, $inviteCode: String) {\n\trequestSpot(teamId: $teamId, inviteCode: $inviteCode) {\n\t\tid\n\t}\n}",name:"GraphQL request",locationOffset:{line:1,column:1}}}},he={inviteCode:pe().string,teamId:pe().number};function fe(e){var n=e.inviteCode,i=e.teamId,t=(0,X.D)(Ne,{variables:{inviteCode:n,teamId:i},refetchQueries:function(){return["TeamsEventManager"]}}),a=(0,de.eF)().translate;return(0,U.jsx)(D.j9,{mutation:t,label:a("Common.accept"),asLink:!0})}fe.defaultProps=he;var Se=fe,ye={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"LeaveTeam"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"memberId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeMember"},arguments:[{kind:"Argument",name:{kind:"Name",value:"memberId"},value:{kind:"Variable",name:{kind:"Name",value:"memberId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:85,source:{body:"mutation LeaveTeam ($memberId: ID!) {\n\tremoveMember (memberId: $memberId) {\n\t\tid\n\t}\n}",name:"GraphQL request",locationOffset:{line:1,column:1}}}};var Fe=function(e){var n=e.memberId,i=(0,X.D)(ye,{variables:{memberId:n},refetchQueries:function(){return["TeamsEventManager"]}}),t=(0,de.eF)().translate;return(0,U.jsx)(D.j9,{mutation:i,label:t("Common.decline"),type:"destructive",asLink:!0})},be=i(30044);function Ie(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function De(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Ie(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ie(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var xe={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddTeam"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"eventId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}
1,{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"globalTeamId"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"invitedPlayers"}},type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"InvitedPlayers"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createEventTeam"},arguments:[{kind:"Argument",name:{kind:"Name",value:"eventId"},value:{kind:"Variable",name:{kind:"Name",value:"eventId"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"globalTeamId"},value:{kind:"Variable",name:{kind:"Name",value:"globalTeamId"}}},{kind:"Argument",name:{kind:"Name",value:"invitedPlayers"},value:{kind:"Variable",name:{kind:"Name",value:"invitedPlayers"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:238,source:{body:"mutation AddTeam($eventId: ID!, $name: String, $globalTeamId: ID, $invitedPlayers: [InvitedPlayers]) {\n    createEventTeam(eventId: $eventId, name: $name, globalTeamId: $globalTeamId, invitedPlayers: $invitedPlayers) {\n        id\n    }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}}}},je={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"TeamsEventManager"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"eventId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"player"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"teams"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"filter"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"eventId"},value:{kind:"Variable",name:{kind:"Name",value:"eventId"}}},{kind:"ObjectField",name:{kind:"Name",value:"memberStatus"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"ACCEPTED"},{kind:"EnumValue",value:"INVITED"}]}}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pageInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"pageInfo"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"teamsEventManager"},directives:[]}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"pageInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PageInfo"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"page"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"total"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"perPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sortBy"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"teamsEventManager"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventTeam"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"manageTeamCard"},directives:[]},{kind:"Field",name:{kind:"Name",value:"globalTeam"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"userMember"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"manageTeamCard"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventTeam"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCurrentUserAdmin"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"editTeamUrl"},name:{kind:"Name",value:"adminUrl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"tab"},value:{kind:"StringValue",value:"event-settings",block:!1}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"entrant"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"event"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"canEditTeams"},arguments:[],directives:[]}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"confirmLeaveTeamDialog"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"teamPassport"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"teamEventInfoLine"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"teamAlertsInfoLine"},directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"confirmLeaveTeamDialog"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Team"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCurrentUserAdmin"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userMember"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"adminRole"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"roleName"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"teamPassport"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Team"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"verified"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCurrentUserAdmin"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"teamName"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"teamAvatar"},directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventTeam"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"entrant"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"teamEventInfoLine"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Team"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventTeam"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"event"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tournament"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"videogame"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"teamAlertsInfoLine"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventTeam"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"entrant"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"teamName"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Team"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"teamAvatar"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Team"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"image"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"height"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isOriginal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]}]}}],loc:{start:0,end:411,source:{body:'#import "gg-common/gql/fragments/utils/pagination.gql"\n#import "app/components/event/team/TeamsEventManager/TeamsEventManager.fragment.gql"\n\nquery TeamsEventManager ($eventId: ID!) {\n\tcurrentUser {\n\t\tid\n\t\tplayer {\n\t\t\tid\n\t\t}\n\t\tteams(query: {\n\t\t\tfilter: {\n\t\t\t\teventId: $eventId,\n\t\t\t\tmemberStatus: [ACCEPTED, INVITED]\n\t\t\t}\n\t\t}) {\n\t\t\tpageInfo {\n\t\t\t\t...pageInfo\n\t\t\t}\n\t\t\tnodes {\n\t\t\t\t...teamsEventManager\n\t\t\t}\n\t\t}\n\t}\n}',name:"GraphQL request",locationOffset:{line:1,column:1}}}},Te={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"InviteCodeTeam"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"inviteCode"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"team"},arguments:[{kind:"Argument",name:{kind:"Name",value:"inviteCode"},value:{kind:"Variable",name:{kind:"Name",value:"inviteCode"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:89,source:{body:"query InviteCodeTeam ($inviteCode: String!) {\n\tteam (inviteCode: $inviteCode) {\n\t\tid\n\t}\n}",name:"GraphQL request",locationOffset:{line:1,column:1}}}},Pe="create",Ce="load",Oe="invite",Ze=function(e){var n=e.event,i=e.inviteCode,t=e.currentUser,a=e.forceSkipTeamCreation,r=(0,de.eF)().translate,s=new ae.Z(r),l=t.get("playerId"),m=(0,X.D)(xe,{variables:{eventId:n.id},refetchQueries:function(){return["TeamsEventManager"]}}),c=(0,G.Z)(m,1)[0],o=(0,d.useState)(),u=o[0],v=o[1],k=(0,de.D9)(u),g=(0,ke.Z)(je,{variables:{eventId:n.id}}),p=g.loading,N=(g.error,g.data),h=(0,ke.Z)(Te,{variables:{inviteCode:i},skip:!i}),f=h.loading,S=h.data;if(p||f)return null;var y,F=(0,J.get)(N,["currentUser","teams","nodes"]),b=F.filter((function(e){return e.userMember.status===ue.Z.getName(ue.Z.ACCEPTED)})),I=i?[S.team]:F.filter((function(e){return e.userMember.status===ue.Z.getName(ue.Z.INVITED)})),j=I&&I.length>0,T=n.canEditTeams,P=void 0===T||T;if(b&&b.length>0){var C=b[0];y=(0,U.jsx)(se.Z,{team:C})}else y=P?function(){if(a)return(0,U.jsx)(D.e3,{type:"info",children:r("TeamsEventManager.forceSkipTeam")});var e=n.teamRosterSize,t=e.minPlayers,d=e.maxPlayers,m=e.minAlternates,o=e.maxAlternates,g=function(e,n){return e?e.filter((function(e){return(0,J.castArray)(e.role).includes(n)})).length:0},p=function(e,n,i){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=(0,J.findIndex)(t,(function(n){return n.id===e}));a>=0?n?i.update("invitedPlayers",a,De({id:e},n)):i.remove("invitedPlayers",a):i.push("invitedPlayers",De({id:e},n))},N=function(e){var n=null;do{n=e.pop("invitedPlayers")}while(n)};return(0,U.jsx)(ie.Z,{onSubmit:function(e){return c({variables:{globalTeamId:e.globalTeamId,invitedPlayers:e.invitedPlayers,name:e.name}})},initialValues:{joinTeamType:j?Oe:Ce},mutators:De({},K.Z),children:function(e){var a=e.handleSubmit,c=e.values,h=e.form,f=e.form.mutators;return(0,U.jsx)("form",{onSubmit:a,children:(0,U.jsxs)(x.Ki,{children:[(0,U.jsx)(Q.gN,{name:"joinTeamType",children:function(e){var n=e.input,i=n.onChange,t=n.value;return(0,U.jsxs)(ne.S,{value:t,onChange:function(e){return i(e.currentTarget.value)},row:!0,children:[j&&(0,U.jsx)(ne.Z,{label:r("TeamsEventManager.acceptInvite"),value:Oe,fullWidth:!1}),(0,U.jsx)(ne.Z,{label:r("TeamsEventManager.selectTeam"),value:Ce,fullWidth:!1}),(0,U.jsx)(ne.Z,{label:r("TeamsEventManager.createTeam"),value:Pe,fullWidth:!1})]})}}),(0,U.jsx)(H.GU,{name:"joinTeamType",children:function(){f.setValue("globalTeamId",null),N(f)}}),(0,U.jsx)(H.GU,{name:"globalTeamId",children:function(e){e||N(f),v(e)}}),c.joinTeamType===Oe&&(0,U.jsx)(x.Ki,{children:I.map((function(e){return(0,U.jsxs)(x.Ki,{spacing:.5,children:[(0,U.jsx)(me.Z,{teamId:e.id,inviteCode:i,infoLines:[(0,U.jsx)(re.Z,{teamId:e.id})],actionNode:(0,U.jsxs)(x.Ki,{children:[(0,U.jsx)(Se,{teamId:e.id,inviteCode:i}),!i&&(0,U.jsx)(Fe,{memberId:e.userMember.id})]})}),(0,U.jsx)(ve.Z,{eventId:n.id,playerId:l,selectedTeam:e,isInvite:!0})]})}))}),c.joinTeamType===Ce&&(0,U.jsx)(U.Fragment,{children:(0,U.jsx)(Q.gN,{name:"globalTeamId",required:!0,validate:s.required,children:function(e){var i=e.input.onChange,t=e.meta;return u?(0,U.jsx)(me.Z,{teamId:u,actionNode:(0,U.jsx)(D.rU,{onClick:function(){return i(null)},children:r("TeamRegistration.tabs.load.changeTeam")})}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(le.Z,{onSelected:function(e){return i(e?e.id:null)},playerId:l,eventId:n.id,previousTeam:k}),t&&t.touched&&t.error&&(0,U.jsx)(D.QP,{type:"error",children:t.error})]})}})}),n.teamNameAllowed&&c.joinTeamType===Pe&&(0,U.jsx)(Q.gN,{name:"name",label:"".concat(r("entityType.team")," ").concat(r("Common.name")),required:!0,component:Y.II.ffAdapter}),(c.globalTeamId||c.joinTeamType===Pe)&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(ve.Z,{eventId:n.id,playerId:l,globalTeamId:c.globalTeamId,isSelect:c.joinTeamType===Ce}),(0,U.jsx)(W.F2,{name:"invitedPlayers",children:function(e){return e.fields.map((function(e){return(0,U.jsx)(Q.gN,{name:e,component:Y.II.ffAdapter,hidden:!0})}))}}),(0,U.jsx)(ee.Z,{isMixedMode:n.type===V.Z.MIXED_MODE,showTitle:!1,numCaptains:g(c.invitedPlayers,oe.Z.CAPTAIN),numPlayers:c.invitedPlayers?c.invitedPlayers.length-g(c.invitedPlayers,oe.Z.ALTERNATE):0,numAlternates:g(c.invitedPlayers,oe.Z.ALTERNATE),minPlayers:t,maxPlayers:d,minAlternates:m,maxAlternates:o}),(0,U.jsx)(ce.Z,{teamId:c.globalTeamId,team:c.joinTeamType===Pe?{}:null,creatingNewTeam:c.joinTeamType===Pe,updateInvitedPlayer:function(e,n){return function(e,n,i){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];(0,J.isArray)(e)?e.forEach((function(e){return p(e,n,i,t)})):p(e,n,i,t)}(e,n,f,h.getState().values.invitedPlayers)},clearInvitedPlayers:function(){return N(f)},teamInvites:(0,J.keyBy)(c.invitedPlayers,"id"),minRequiredPlayers:t,minRequiredAlternates:m,numAllowedPlayers:d,numAllowedAlternates:o,currentPlayerId:l})]}),c.joinTeamType!==Oe&&(0,U.jsx)(te.Mm,{label:r("AddTeamDialog.title")})]})})}})}():(0,U.jsx)(D.e3,{type:"warning",children:r("TeamsEventManager.manageTeamDeadlineEnded")});return(0,U.jsxs)(x.Ki,{children:[(0,U.jsx)(be.Z,{title:r("TeamsEventManager.title")}),(0,U.jsx)("div",{className:"event-overview-card",children:y})]})};Ze.defaultProps={inviteCode:null};var we=Ze,Ee=i(44071),Me=i(10686),Ae=i(90116),Ve=i(10748),Le=function(e){return-1===e},qe=i(50029),Re=i(87794),Ue=i.n(Re),$e=i(83934),Be=i(51123),ze=i(44434),_e=i.n(ze);function Ge(e){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,t=(0,f.Z)(e);if(n){var a=(0,f.Z)(this).constructor;i=Reflect.construct(t,arguments,a)}else i=t.apply(this,arguments);return(0,h.Z)(this,i)}}
1var He={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DeckCard"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"deckId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deck"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"deckId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"deckCard"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"deckCard"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Deck"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPrimary"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"valid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isEmpty"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"},directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"image"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"height"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isOriginal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]}]}}],loc:{start:0,end:106,source:{body:'#import "./deckCard.fragment.gql"\n\nquery DeckCard($deckId: ID!) {\n\tdeck(id: $deckId) {\n\t\t...deckCard\n\t}\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}}}},Qe=function(e){(0,N.Z)(i,e);var n=Ge(i);function i(){var e;(0,g.Z)(this,i);for(var a=arguments.length,d=new Array(a),r=0;r<a;r++)d[r]=arguments[r];return e=n.call.apply(n,[this].concat(d)),(0,t.Z)((0,Ve.Z)(e),"isEmptyDeck",(function(){var n=e.props.deck;return!!n&&n.get("isEmpty")})),(0,t.Z)((0,Ve.Z)(e),"isPlaceholderDeck",(function(){var n=e.props.deckId;return Le(n)})),(0,t.Z)((0,Ve.Z)(e),"isPrimaryDeck",(function(){return e.props.deck.get("isPrimary")})),(0,t.Z)((0,Ve.Z)(e),"handleSetAsPrimaryDeck",(0,qe.Z)(Ue().mark((function n(){var i,t;return Ue().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=e.props,t=i.deckId,(0,i.setPrimaryDeck)(t);case 2:case"end":return n.stop()}}),n)})))),e}return(0,p.Z)(i,[{key:"renderDeckIcon",value:function(){var e=this.props.deck;if(this.isPlaceholderDeck())return i.renderPlaceholderDeckIcon();var n=e.getIn(["characters",0]);if(!n)return null;var t=$e.Z.getImageUrl(n);return(0,U.jsx)("div",{children:(0,U.jsx)(Be.E,{src:t,width:48,height:48,alt:n.get("name")})})}},{key:"renderInvalidDeckAlertText",value:function(){if(this.isPlaceholderDeck()||!this.isEmptyDeck())return null;var e=this.props.translate;return(0,U.jsxs)(I.QP,{type:"error",hasPadding:!1,children:[(0,U.jsx)(I.xu,{className:"fa fa-exclamation-circle"}),(0,U.jsx)("span",{children:e("DeckCard.incompleteDeckWarning")})]})}},{key:"renderAddOrEditButton",value:function(){var e=this,n=this.props.translate;return this.isPlaceholderDeck()?(0,U.jsx)(I.zx,{type:"primary",size:"sm",fullWidth:!0,label:n("DeckCard.addDeckButton.label"),onClick:function(){return e.props.onClick(e.props.deckId)}}):(0,U.jsx)(I.zx,{type:"outline",size:"sm",label:n("DeckCard.editDeckButton.label"),onClick:function(){return e.props.onClick(e.props.deckId)}})}},{key:"renderSetAsPrimaryButton",value:function(){if(this.isPlaceholderDeck())return null;var e=this.props.translate;return this.isPrimaryDeck()?(0,U.jsx)("div",{children:(0,U.jsx)(D.MZ,{placement:"bottom",message:e("DeckCard.primaryDeckChiclet.tooltip"),children:(0,U.jsx)("span",{children:(0,U.jsx)(I.Df,{backgroundColor:"gg-background-color-green",textColor:"gg-background-color-white",children:(0,U.jsx)(I.M5,{icon:"fa fa-star",text:e("DeckCard.primaryDeckChiclet.text")})})})})}
1):(0,U.jsx)(I.Dr,{className:b()(_e().aside,_e().setAsPrimaryButton),type:"primary",size:"sm",onClick:this.handleSetAsPrimaryDeck,children:(0,U.jsx)("span",{children:e("DeckCard.setAsPrimaryDeckButton.label")})})}},{key:"render",value:function(){var e,n,i,a=this.props,d=a.apollo,r=a.deckIndex,s=a.deck,l=a.hasPersistedDecks,m=a.requirePrimaryDeck,c=a.translate;if(!this.isPlaceholderDeck()&&(null!==d&&void 0!==d&&null!==(n=d.forOperation)&&void 0!==n&&null!==(i=n.call(d,He))&&void 0!==i&&i.loading))return null;var o=(s||(0,S.Map)()).get("name")||"".concat(c("DeckCard.deck")," ").concat(r);return(0,U.jsx)(I.tW,{isInset:!0,className:b()((e={},(0,t.Z)(e,_e().DeckCard,!0),(0,t.Z)(e,_e().onlyPreviewDecks,!l),e)),children:(0,U.jsxs)(I.pN,{useLegacyStyles:!0,size:"sm",children:[(0,U.jsxs)("div",{className:_e().cardPreviewContainer,children:[this.renderDeckIcon(),(0,U.jsx)("div",{className:_e().uppercaseLabel,children:o})]}),(0,U.jsx)("div",{className:b()((0,t.Z)({},_e().cardButtonContainer,!0)),children:(0,U.jsxs)(I.pN,{useLegacyStyles:!0,size:"sm",isCentered:!0,children:[this.renderAddOrEditButton(),m&&this.renderSetAsPrimaryButton(),this.renderInvalidDeckAlertText()]})})]})})}}]),i}(d.PureComponent);(0,t.Z)(Qe,"defaultProps",{deck:null,hasPersistedDecks:!1,requirePrimaryDeck:!1,onClick:function(){}}),(0,t.Z)(Qe,"renderPlaceholderDeckIcon",(function(){return(0,U.jsx)("div",{className:_e().cardPreview,children:(0,U.jsx)(I.xu,{className:"fa fa-plus"})})}));var We=(0,r.qC)((0,l.Z)({kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DeckCard"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"deckId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deck"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"deckId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"deckCard"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"deckCard"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Deck"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPrimary"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"valid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isEmpty"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"},directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"image"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"height"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isOriginal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]}]}}],loc:{start:0,end:106,source:{body:'#import "./deckCard.fragment.gql"\n\nquery DeckCard($deckId: ID!) {\n\tdeck(id: $deckId) {\n\t\t...deckCard\n\t}\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}}}},{skip:function(e){var n=e.deckId;return Le(n)},options:function(e){return{variables:{deckId:e.deckId}}}}),(0,l.Z)({kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SetPrimaryDeck"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"deckId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"setPrimaryDeck"},arguments:[{kind:"Argument",name:{kind:"Name",value:"deckId"},value:{kind:"Variable",name:{kind:"Name",value:"deckId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPrimary"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"participant"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"decks"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"deckCard"},directives:[]}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"deckCard"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Deck"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPrimary"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"valid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isEmpty"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"},directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"image"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"height"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isOriginal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]}]}}],loc:{start:0,end:190,source:{body:'#import "./deckCard.fragment.gql"\n\nmutation SetPrimaryDeck($deckId: ID!) {\n\tsetPrimaryDeck(deckId: $deckId) {\n\t\tid\n\t\tisPrimary\n\t\tparticipant {\n\t\t\tid\n\t\t\tdecks {\n\t\t\t\t...deckCard\n\t\t\t}\n\t\t}\n\t}\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}}}},{props:function(e){var n=e.mutate;return{setPrimaryDeck:function(e){return n({variables:{deckId:e}})}}}}),(0,c.Z)())(Qe),Ke=i(13933),Je=i(95142),Xe=i(93665),Ye=i(58396),en=i(54730),nn=i(48769),tn=i(92033),an=i(24766),dn=i.n(an);function rn(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function sn(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?rn(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):rn(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var ln={getSharedRarityStyles:function(e){var n;return n={},(0,t.Z)(n,dn().isFree,"Free"===e),(0,t.Z)(n,dn().isCommon,"Common"===e),(0,t.Z)(n,dn().isRare,"Rare"===e),(0,t.Z)(n,dn().isEpic,"Epic"===e),(0,t.Z)(n,dn().isLegendary,"Legend
1ary"===e),n},getBackgroundColors:function(e){return sn((0,t.Z)({},dn().rarityBackgroundColor,!0),this.getSharedRarityStyles(e))},getBorderColors:function(e){return sn((0,t.Z)({},dn().rarityBorderColor,!0),this.getSharedRarityStyles(e))},getColors:function(e){return sn((0,t.Z)({},dn().rarityColor,!0),this.getSharedRarityStyles(e))}},mn=i(1190),cn=i.n(mn);var on=(0,c.Z)()((function(e){var n=e.translate,i=function(e){return(0,U.jsx)("td",{className:b()(ln.getBorderColors(e.getIn(["metadata","rarity"])),cn().cardName),children:"".concat(e.get("name")," x ").concat(e.get("quantity"))},"card-".concat(e.get("externalId"),"-name"))},t=function(e){var n;return e&&"hearthstoneapi"===e.get("externalSource")&&(n=(0,U.jsx)(I.XB,{maxWidth:15,url:"https://images.start.gg/images/site-images/mana.png"})),(0,U.jsx)("td",{className:cn().cardCost,children:(0,U.jsxs)(I.pN,{useLegacyStyles:!0,size:"xs",direction:"horizontal",className:cn().costContent,children:[(0,U.jsx)("div",{children:e.getIn(["metadata","cost"])}),(0,U.jsx)("div",{children:n})]})},"card-".concat(e.get("externalId"),"-cost"))};return(0,U.jsx)(Q.gN,{name:"deckList",children:function(e){var a=e.input,d=a.value||(0,S.Map)(),r=(0,S.List)([(0,S.Map)({heading:n("DeckList.table.name"),cell:i}),(0,S.Map)({heading:n("DeckList.table.cost"),cell:t}),(0,S.Map)({heading:n("DeckList.table.remove"),cell:function(e){return function(e,i){return(0,U.jsx)("td",{className:cn().cardRemove,children:(0,U.jsx)(I.rU,{onClick:function(){var n=i.value,t=n,a=e.get("externalId"),d=n.getIn([a,"quantity"]);d>1?t=n.setIn([a,"quantity"],d-1):1===d&&(t=n.delete(a)),i.onChange(t)},type:"destructive",children:n("DeckList.remove")})},"card-".concat(e.get("externalId"),"-remove"))}(e,a)}})]),s=(0,U.jsx)(I.iA,{columnMeta:r,data:d,hasHeader:!1,className:cn().table});return(0,U.jsx)("div",{className:cn().DeckList,children:s})}})})),un=i(36113),vn=i(67397),kn=(i(45488),i(47590)),gn=i.n(kn);function pn(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function Nn(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?pn(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):pn(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}function hn(e){var n=e.node,i=e.resultProps,a=b()(i.className,(0,t.Z)({},i.interactiveClassName,!0));return(0,U.jsx)(vn.Z,Nn(Nn({className:a},(0,J.omit)(i,["className","interactiveClassName"])),{},{children:(0,U.jsx)("div",{className:gn().cardResult,children:(0,U.jsx)("b",{children:n.get("name")})})}))}hn.defaultProps={node:(0,S.Map)()};var fn=hn,Sn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CardSpotlightResults"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CardPaginationQuery"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cards"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"hearthstoneCard"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"pageInfo"},directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"hearthstoneCard"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Card"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalSource"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characterId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"pageInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PageInfo"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"page"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"total"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"perPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sortBy"},arguments:[],directives:[]}]}}],loc:{start:0,end:377,source:{body:'# TODO: move somewhere more common (maybe)?\n#import "gg-common/gql/fragments/utils/pagination.gql"\n#import "app/components/decks/DeckManagementCard/DeckModal/Card.fragment.gql"\n\nquery CardSpotlightResults($query: CardPaginationQuery!) {\n\tcards(query: $query) {\n\t\tnodes {\n\t\t\t...hearthstoneCard\n\t\t}\n\t\t# pageInfo is a pretty hard requirement.\n\t\tpageInfo {\n\t\t\t...pageInfo\n\t\t}\n\t}\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}}}};function yn(e){var n=e.videogameId,i=e.translate;return(0,U.jsx)(Q.gN,{name:"deckList",children:function(e){var t=e.input;return(0,U.jsx)(un.$1,{name:"select-entrants",allowMultiple:!1,shouldCloseOnSelect:!0,shouldClearOnSelect:!0,allowCreate:!1,query:Sn,resultComponent:fn,noSelections:!0,variables:{query:{page:1,perPage:25,filter:{videogameId:n}}},pathToNodes:["cards"],valueToSearch:"name",onChange:function(e){var n=t.value,i=e.get("externalId");if(n.has(i)){var a=n.getIn([i,"quantity"])+1;n=n.setIn([i,"quantity"],a)}else{var d=e.set("quantity",1);n=n.set(i,d)}t.onChange(n)},placeholder:i("CardSearch")})}})}yn.defaultProps={videogameId:null};var Fn=(0,c.Z)()(yn),bn=i(37690),In=i.n(bn),Dn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DeckModal"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"deckId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"eventId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"videogameId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deck"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"deckId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"deckModalDeck"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"event"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"eventId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ruleset"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cardLimit"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"rulesetSettings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tournament"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"manageUrl"},name:{kind:"Name",value:"url"},arguments:[{kind:"Argument",name:{kind:"Name",value:"tab"},value:{kind:"StringValue",value:"manage_registration",block:!1}}],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"videogame"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"videogameId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"deckModalDeck"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Deck"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"},directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"cards"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"hearthstoneCard"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"externalLink"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"image"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"height"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isOriginal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"hearthstoneCard"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Card"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalSource"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characterId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[]}]}}],loc:{start:0,end:378,source:{body:'#import "./DeckModalDeck.fragment.gql"\n\nquery DeckModal($deckId: ID!, $eventId: ID!, $videogameId: ID!) {\n\tdeck(id: $deckId) {\n\t\t...deckModalDeck\n\t}\n\tevent(id: $eventId) {\n\t\tid\n\t\truleset {\n\t\t\tid\n\t\t\tcardLimit\n\t\t}\n\t\trulesetSettings\n\t\ttournament {\n\t\t\tid\n\t\t\tmanageUrl: url(tab: "manage_registration")\n\t\t}\n\t}\n\tvideogame(id: $videogameId) {\n\t\tid\n\t\tcharacters {\n\t\t\tid\n\t\t\tname\n\t\t}\n\t}\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}}}},xn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Cards"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"cardIds"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cards"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"page"},value:{kind:"IntValue",value:"1"}},{kind:"ObjectField",name:{kind:"Name",value:"perPage"},value:{kind:"IntValue",value:"-1"}},{kind:"ObjectField",name:{kind:"Name",value:"filter"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"externalId"},value:{kind:"Variable",name:{kind:"Name",value:"cardIds"}}}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"hearthstoneCard"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"pageInfo"},directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"hearthstoneCard"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Card"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalSource"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characterId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"pageInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PageInfo"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"page"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"total"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"perPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalPages"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sortBy"},arguments:[],directives:[]}]}}],loc:{start:0,end:280,source:{body:'#import "gg-common/gql/fragments/utils/pagination.gql"\n#import "./Card.fragment.gql"\n\nquery Cards($cardIds: [ID!]) {\n\tcards(\n\t\tquery: {\n\t\t\tpage: 1\n\t\t\tperPage: -1\n\t\t\tfilter: { externalId: $cardIds }\n\t\t}\n\t) {\n\t\tnodes {\n\t\t\t...hearthstoneCard\n\t\t}\n\t\tpageInfo {\n\t\t\t...pageInfo\n\t\t}\n\t}\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}}}};function jn(e){var n,i,a=e.apollo,d=e.videogameId,r=e.event,s=e.videogame,l=e.translate,m=e.deckId,c=e.onClose,o=null===a||void 0===a||null===(n=a.forOperation)||void 0===n||null===(i=n.call(a,Dn))||void 0===i?void 0:i.isInitialLoad;if(o)return null;var u=e.deck||(0,S.Map)(),v=u.get("cards"),k=u.getIn(["characters",0,"id"]),g=r.getIn(["ruleset","cardLimit"]),p=new _.Z(r.get("ruleset")).getEventSettings(r),N=parseInt(p.get("deckUploadMethod"),10),h=u.get("type")||(0,z.r)(N),f=new ae.Z(l),y=r.getIn(["tournament","manageUrl"]),F=u.getIn(["characters",0]),j=$e.Z.getImageUrl(F),T=!u.isEmpty()&&F?(0,U.jsxs)(x.MI,{alignItems:"center",children:[(0,U.jsx)("div",{children:(0,U.jsx)(Be.E,{url:j,width:48,height:48})}),(0,U.jsx)("div",{children:(0,U.jsx)(D.ZT,{variant:"h5",component:"h3",children:F.get("name")})})]}):(0,U.jsx)(D.ZT,{variant:"h4",component:"h2",children:u.get("name")||"New Deck"}),P=(0,S.Map)();v&&v.forEach((function(e){var n=e.get("externalId");if(P.has(n)){var i=P.getIn([n,"quantity"])+1;P=P.setIn([n,"quantity"],i)}else{var t=e.set("quantity",1);
1P=P.set(n,t)}}));var C={deckName:u.get("name"),deckOptions:"code",deckList:P,classSelect:k,externalLink:u.get("externalLink")},O=(s.get("characters")||(0,S.List)()).map((function(e){return(0,S.Map)({value:e.get("id"),label:e.get("name")})})),Z=(u.get("externalLink")||"").includes("rk9labs.com"),w=!Le(m)&&!Z,E=function(){var n=(0,qe.Z)(Ue().mark((function n(i){var a,d,r,s,l,o,u,v,k;return Ue().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=e.eventId,d=e.participantId,r=e.createDeck,s=e.updateDeck,l=i.deckName,o=parseInt(i.classSelect,10),u=i.deckList.valueSeq().toArray().map((function(e){return{id:e.get("id"),quantity:e.get("quantity")}})),v={name:l,type:h,eventId:a,participantId:d,cards:u,characterIds:[o],externalLink:i.externalLink},!Le(m)){n.next=11;break}return n.next=8,r(v);case 8:k=n.sent,n.next=15;break;case 11:return v.deckId=m,n.next=14,s(v);case 14:k=n.sent;case 15:if((0,J.isEmpty)(k.errors)){n.next=17;break}return n.abrupt("return",(0,t.Z)({},Je.Ck,k.errors[0].message));case 17:c();case 18:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),M=function(){var n=(0,qe.Z)(Ue().mark((function n(i){var t,a;return Ue().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.client.query({query:xn,variables:{cardIds:i}});case 2:return t=n.sent,a=t.data,n.abrupt("return",(0,S.fromJS)(a).getIn(["cards","nodes"]));case 5:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),A=function(){var e=(0,qe.Z)(Ue().mark((function e(n){var i,a,d,r,s,l;return Ue().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,i=(0,S.fromJS)(tn.Z.getDeckFromString(n)),a=i.get("cards"),d=(0,S.Map)(a.map((function(e){return[e.get(0),e.get(1)]}))),r=d.keySeq().toArray(),e.next=7,M(r);case 7:return s=e.sent,l=L.Z.indexBy(s.map((function(e){var n=parseInt(e.get("externalId"),10);return e.set("quantity",d.get(n))})),"externalId"),e.abrupt("return",l);case 12:return e.prev=12,e.t0=e.catch(0),e.abrupt("return",(0,S.Map)((0,t.Z)({},Je.Ck,e.t0.toString())));case 15:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(n){return e.apply(this,arguments)}}(),V=function(){var n=(0,qe.Z)(Ue().mark((function n(){var i,t,a;return Ue().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.eventId,t=e.participantId,a=e.deleteDeck,n.next=3,a({deckId:m,eventId:i,participantId:t});case 3:c();case 4:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}(),q=function(e,n,i){var a;switch(h){case nn.Z.CARD:return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Xe.hj,{headerText:l("DeckModal.list.title"),description:(0,U.jsx)("div",{className:In().cardCount,children:"".concat(i,"/").concat(g," ").concat(l("DeckModal.list.limit"))})}),(0,U.jsx)("div",{className:b()((a={},(0,t.Z)(a,In().hidden,!0),(0,t.Z)(a,In().deckList,e.deckList&&!e.deckList.isEmpty()),a)),children:(0,U.jsx)(on,{isLoading:o})}),(0,U.jsx)(Q.gN,{name:"deckOptions",inline:!0,component:te.EJ,legend:"",options:(0,S.List)([(0,S.Map)({label:l("DeckModal.options.code.label"),value:"code"}),(0,S.Map)({label:l("DeckModal.options.search.label"),value:"search"})])}),(0,U.jsx)(te.gP,{fieldName:"deckOptions",comparator:function(e){return"code"===e},children:(0,U.jsxs)(x.MI,{direction:"column",children:[e.deckList&&(0,U.jsx)("div",{children:(0,U.jsxs)(I.QP,{type:"warning",hasPadding:!1,children:[(0,U.jsx)(I.xu,{className:"fa fa-warning gg-color-yellow"}),l("DeckModal.options.code.warning")]})}),(0,U.jsx)("div",{children:(0,U.jsx)(Q.gN,{name:"deckCode",placeholder:l("DeckModal.options.code.placeholder"),label:"",component:te.h$})}),(0,U.jsx)("div",{className:In().deckCode,children:(0,U.jsxs)(x.MI,{children:[(0,U.jsx)("div",{children:(0,U.jsx)(I.zx,{label:l("DeckModal.options.code.import"),type:"secondary",disabled:!e.deckCode,onClick:(0,qe.Z)(Ue().mark((function i(){var t;return Ue().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,A(e.deckCode);case 2:t=i.sent,t.get(Je.Ck)?n.change("deckCodeError",!0):(n.change("deckCodeError",!1),n.change("deckList",t));case 5:case"end":return i.stop()}}),i)})))})}),(0,U.jsx)("div",{children:(0,U.jsx)(Q.gN,{name:"deckCodeError",children:function(e){var n,i=e.input;return(0,U.jsx)("div",{className:b()(In().error,(n={},(0,t.Z)(n,In().show,Boolean(i.value)),(0,t.Z)(n,"test",!0),n)),children:l("DeckModal.deckstring")})}})})]})})]})}),(0,U.jsx)(te.gP,{fieldName:"deckOptions",comparator:function(e){return"search"===e},children:(0,U.jsx)(Fn,{videogameId:d})})]});case nn.Z.EXTERNAL_LINK:return Z?(0,U.jsxs)(x.MI,{direction:"column",children:[(0,U.jsx)(Ye.B,{deckId:u.get("id")}),(0,U.jsx)(D.e3,{type:"info",children:l("DeckModal.rk9Info--m^",{manageUrl:y})})]}):(0,U.jsx)(U.Fragment,{children:(0,U.jsx)(Q.gN,{id:"externalLink",name:"externalLink",disabled:Z,label:l("DeckModal.externalLink.title"),placeholder:l("DeckModal.externalLink.placeholder"),component:Xe.II.ffAdapter,validate:f.composeValidators(f.required,f.maxLength(2e3),f.isUrl)})});default:return null}},R=e.disableClassSelection,$=(0,U.jsx)(ie.Z,{onSubmit:E,initialValues:C,children:function(e){var n=e.handleSubmit,i=e.submitError;return(0,U.jsx)("form",{onSubmit:n,children:(0,U.jsx)(Q.lP,{subscription:{values:!0},children:function(e){var n=e.values,t=e.form,a=n.deckList.map((function(e){return e.get("quantity")})).reduce((function(e,n){return e+n}))||0;return(0,U.jsxs)("div",{className:In().DeckModal,children:[(0,U.jsx)(I.xB,{children:T}),(0,U.jsxs)(I.hz,{children:[(0,U.jsx)(Xe.hj,{headerText:l("DeckModal.info.title")}),(0,U.jsx)(Q.gN,{id:"deckName",name:"deckName",label:l("DeckModal.name.title"),placeholder:l("DeckModal.name.placeholder"),component:Xe.II.ffAdapter}),!O.isEmpty()&&(0,U.jsx)(Q.gN,{id:"classSelect",name:"classSelect",placeholder:l("DeckModal.class.placeholder"),label:l("DeckModal.class.title"),component:Xe.Ph.ffAdapter,required:!0,disabled:R,options:O}),q(n,t,a)]}),(0,U.jsx)(I.mz,{children:(0,U.jsxs)(x.MI,{direction:"column",children:[i&&(0,U.jsx)(D.e3,{type:"error",children:i}),(0,U.jsx)("div",{children:(0,U.jsxs)(te.Mm,{label:l("DeckModal.save"),shouldRenderSubmitError:!1,children:[(0,U.jsx)(I.zx,{type:"secondary",label:l("DeckModal.cancel"),onClick:c}),w&&(0,U.jsx)("div",{children:(0,U.jsx)(I.zx,{type:"destructive",label:l("DeckModal.delete.label"),onClick:V})})]})})]})})]})}})})}});return(0,U.jsx)("div",{children:(0,U.jsx)(en.Z,{id:"deck-modal",size:"sm",show:!0,closeModal:c,modal:(0,U.jsx)(I.u_,{children:$})})})}jn.defaultProps={deck:null,event:null,videogame:null,disableClassSelection:null};var Tn=jn,Pn=(0,r.qC)((0,l.Z)({kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateDeck"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"eventId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"participantId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"characterIds"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"cards"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateDeckCard"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"type"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeckType"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"externalLink"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createDeck"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"eventId"},value:{kind:"Variable",name:{kind:"Name",value:"eventId"}}},{kind:"Argument",name:{kind:"Name",value:"participantId"},value:{kind:"Variable",name:{kind:"Name",value:"participantId"}}},{kind:"Argument",name:{kind:"Name",value:"characterIds"},value:{kind:"Variable",name:{kind:"Name",value:"characterIds"}}},{kind:"Argument",name:{kind:"Name",value:"cards"},value:{kind:"Variable",name:{kind:"Name",value:"cards"}}},{kind:"Argument",name:{kind:"Name",value:"externalLink"},value:{kind:"Variable",name:{kind:"Name",value:"externalLink"}}},{kind:"Argument",name:{kind:"Name",value:"type"},value:{kind:"Variable",name:{kind:"Name",value:"type"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"participant"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"decks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"eventId"},value:{kind:"Variable",name:{kind:"Name",value:"eventId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"deckCard"},directives:[]}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"deckModalDeck"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"deckCard"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Deck"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPrimary"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"valid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isEmpty"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"},directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"deckModalDeck"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Deck"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"},directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"cards"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"hearthstoneCard"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"externalLink"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"image"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"height"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isOriginal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"hearthstoneCard"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Card"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalSource"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characterId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[]}]}}],loc:{start:0,end:530,source:{body:'#import "../DeckCard/deckCard.fragment.gql"\n#import "./DeckModalDeck.fragment.gql"\n\nmutation CreateDeck(\n\t$eventId: ID!\n\t$participantId: ID!\n\t$characterIds: [ID]!\n\t$cards: [CreateDeckCard]!\n\t$type: DeckType!\n\t$name: String\n\t$externalLink: String\n) {\n\tcreateDeck(\n\t\tname: $name\n\t\teventId: $eventId\n\t\tparticipantId: $participantId\n\t\tcharacterIds: $characterIds\n\t\tcards: $cards\n\t\texternalLink: $externalLink\n\t\ttype: $type\n\t) {\n\t\tid\n\t\tparticipant {\n\t\t\tid\n\t\t\tdecks(eventId: $eventId) {\n\t\t\t\t...deckCard\n\t\t\t}\n\t\t}\n\t\t...deckModalDeck\n\t}\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}}}},{props:function(e){var n=e.mutate;return{createDeck:function(e){var i=e.name,t=e.eventId,a=e.participantId,d=e.characterIds,r=e.cards,s=e.externalLink,l=e.type;return n({variables:{name:i,eventId:t,participantId:a,characterIds:d,cards:r,externalLink:s,type:l}})}}},options:{refetchQueries:["NextTask"]}}),(0,l.Z)({kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateDeck"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"deckId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"eventId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"participantId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"characterIds"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"cards"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateDeckCard"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"externalLink"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateDeck"},arguments:[{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}},{kind:"Argument",name:{kind:"Name",value:"deckId"},value:{kind:"Variable",name:{kind:"Name",value:"deckId"}}},{kind:"Argument",name:{kind:"Name",value:"eventId"},value:{kind:"Variable",name:{kind:"Name",value:"eventId"}}},{kind:"Argument",name:{kind:"Name",value:"participantId"},value:{kind:"Variable",name:{kind:"Name",value:"participantId"}}},{kind:"Argument",name:{kind:"Name",value:"characterIds"},value:{kind:"Variable",name:{kind:"Name",value:"characterIds"}}},{kind:"Argument",name:{kind:"Name",value:"cards"},value:{kind:"Variable",name:{kind:"Name",value:"cards"}}},{kind:"Argument",name:{kind:"Name",value:"externalLink"},value:{kind:"Variable",name:{kind:"Name",value:"externalLink"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"participant"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"decks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"eventId"},value:{kind:"Variable",name:{kind:"Name",value:"eventId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"deckCard"},directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"cards"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"hearthstoneCard"},directives:[]}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"deckModalDeck"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"deckCard"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Deck"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPrimary"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"valid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isEmpty"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"},directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"hearthstoneCard"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Card"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalSource"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characterId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"deckModalDeck"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Deck"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"},directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"cards"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"hearthstoneCard"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"externalLink"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"image"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"height"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isOriginal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]}]}}],loc:{start:0,end:596,source:{body:'#import "../DeckCard/deckCard.fragment.gql"\n#import "./DeckModalDeck.fragment.gql"\n#import "./Card.fragment.gql"\n\nmutation UpdateDeck(\n\t$name: String\n\t$deckId: ID!\n\t$eventId: ID!\n\t$participantId: ID!\n\t$characterIds: [ID]!\n\t$cards: [CreateDeckCard]!\n\t$externalLink: String\n) {\n\tupdateDeck(\n\t\tname: $name\n\t\tdeckId: $deckId\n\t\teventId: $eventId\n\t\tparticipantId: $participantId\n\t\tcharacterIds: $characterIds\n\t\tcards: $cards\n\t\texternalLink: $externalLink\n\t) {\n\t\tid\n\t\tparticipant {\n\t\t\tid\n\t\t\tdecks(eventId: $eventId) {\n\t\t\t\t...deckCard\n\t\t\t}\n\t\t}\n\t\tcards {\n\t\t\t...hearthstoneCard\n\t\t}\n\t\t...deckModalDeck\n\t}\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}}}},{props:function(e){var n=e.mutate;return{updateDeck:function(e){var i=e.name,t=e.deckId,a=e.eventId,d=e.participantId,r=e.characterIds,s=e.cards,l=e.externalLink;return n({variables:{name:i,deckId:t,eventId:a,participantId:d,characterIds:r,cards:s,externalLink:l}})}}}}),(0,l.Z)({kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteDeck"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"deckId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"eventId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"participantId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteDeck"},arguments:[{kind:"Argument",name:{kind:"Name",value:"deckId"},value:{kind:"Variable",name:{kind:"Name",value:"deckId"}}},{kind:"Argument",name:{kind:"Name",value:"eventId"},value:{kind:"Variable",name:{kind:"Name",value:"eventId"}}},{kind:"Argument",name:{kind:"Name",value:"participantId"},value:{kind:"Variable",name:{kind:"Name",value:"participantId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"participant"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"decks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"eventId"},value:{kind:"Variable",name:{kind:"Name",value:"eventId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"deckCard"},directives:[]}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"deckCard"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Deck"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPrimary"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"valid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isEmpty"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"},directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"image"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"height"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isOriginal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]}]}}],loc:{start:0,end:292,source:{body:'#import "../DeckCard/deckCard.fragment.gql"\n\nmutation DeleteDeck($deckId: ID!, $eventId: ID!, $participantId: ID!) {\n\tdeleteDeck(\n\t\tdeckId: $deckId\n\t\teventId: $eventId\n\t\tparticipantId: $participantId\n\t) {\n\t\tid\n\t\tparticipant {\n\t\t\tid\n\t\t\tdecks(eventId: $eventId) {\n\t\t\t\t...deckCard\n\t\t\t}\n\t\t}\n\t}\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}}}},{props:function(e){var n=e.mutate;return{deleteDeck:function(e){var i=e.deckId,t=e.eventId,a=e.participantId;return n({variables:{deckId:i,eventId:t,participantId:a}})}}},options:{refetchQueries:["NextTask"]}}),(0,l.Z)({kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DeckModal"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"deckId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"eventId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"videogameId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deck"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"deckId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"deckModalDeck"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"event"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"eventId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ruleset"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cardLimit"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"rulesetSettings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tournament"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"manageUrl"},name:{kind:"Name",value:"url"},arguments:[{kind:"Argument",name:{kind:"Name",value:"tab"},value:{kind:"StringValue",value:"manage_registration",block:!1}}],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"videogame"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"videogameId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"deckModalDeck"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Deck"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"},directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"cards"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"hearthstoneCard"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"externalLink"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"image"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"height"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isOriginal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"hearthstoneCard"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Card"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"externalSource"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characterId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"metadata"},arguments:[],directives:[]}]}}],loc:{start:0,end:378,source:{body:'#import "./DeckModalDeck.fragment.gql"\n\nquery DeckModal($deckId: ID!, $eventId: ID!, $videogameId: ID!) {\n\tdeck(id: $deckId) {\n\t\t...deckModalDeck\n\t}\n\tevent(id: $eventId) {\n\t\tid\n\t\truleset {\n\t\t\tid\n\t\t\tcardLimit\n\t\t}\n\t\trulesetSettings\n\t\ttournament {\n\t\t\tid\n\t\t\tmanageUrl: url(tab: "manage_registration")\n\t\t}\n\t}\n\tvideogame(id: $videogameId) {\n\t\tid\n\t\tcharacters {\n\t\t\tid\n\t\t\tname\n\t\t}\n\t}\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}}}},{options:function(e){return{variables:{deckId:e.deckId,eventId:e.eventId,videogameId:e.videogameId}}}}),(0,c.Z)(),Ke.C)(Tn),Cn=i(55183),On=i.n(Cn);function Zn(e){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,t=(0,f.Z)(e);if(n){var a=(0,f.Z)(this).constructor;i=Reflect.construct(t,arguments,a)}else i=t.apply(this,arguments);return(0,h.Z)(this,i)}}var wn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DeckManagementCard"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"participantId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"eventId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"event"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"eventId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasDecks"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rulesetSettings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ruleset"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"videogameId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"classSelectionCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"decksPerClass"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deckLimit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"requirePrimaryDeck"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"participant"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"participantId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"decks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"eventId"},value:{kind:"Variable",name:{kind:"Name",value:"eventId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"deckCard"},directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"deckCard"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Deck"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPrimary"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"valid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isEmpty"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"},directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"image"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"height"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isOriginal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]}]}}],loc:{start:0,end:372,source:{body:'#import "./DeckCard/deckCard.fragment.gql"\n\nquery DeckManagementCard($participantId: ID!, $eventId: ID!) {\n\tevent(id: $eventId) {\n\t\tid\n\t\thasDecks\n\t\trulesetSettings\n\t\truleset {\n\t\t\tid\n\t\t\tvideogameId\n\t\t\tclassSelectionCount\n\t\t\tdecksPerClass\n\t\t\tdeckLim
1it\n\t\t\trequirePrimaryDeck\n\t\t}\n\t}\n\tparticipant(id: $participantId) {\n\t\tid\n\t\tdecks(eventId: $eventId) {\n\t\t\t...deckCard\n\t\t}\n\t}\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}}}},En=function(e){(0,N.Z)(i,e);var n=Zn(i);function i(e){var a;return(0,g.Z)(this,i),a=n.call(this,e),(0,t.Z)((0,Ve.Z)(a),"showModal",(function(e){a.setState({showModal:!0,deckId:e})})),(0,t.Z)((0,Ve.Z)(a),"closeModal",(function(){a.setState({showModal:!1,deckId:null})})),a.state={showModal:!1,deckId:null},a}return(0,p.Z)(i,[{key:"getNumberOfDecks",value:function(){var e=this.props.event;return new _.Z(e.get("ruleset")).getMaxDecks(e)}},{key:"renderDecks",value:function(){var e,n,i=this,t=this.props,a=t.apollo,d=t.event,r=t.participant;if(null!==a&&void 0!==a&&null!==(e=a.forOperation)&&void 0!==e&&null!==(n=e.call(a,wn))&&void 0!==n&&n.loading)return null;var s=d.get("ruleset"),l=d.get("rulesetSettings"),m=this.getNumberOfDecks(),c=_.Z.getRuleField("requirePrimaryDeck",s,l,!1),o=r.get("decks")||(0,S.List)(),u=m-o.count(),v=[].concat((0,Ae.Z)(o.map((function(e){return e.get("id")})).toArray()),(0,Ae.Z)((0,J.range)(-1,u-1,0))),k=!o.isEmpty();return(0,U.jsx)("div",{children:(0,U.jsx)(I.rj,{hasGutter:!0,hasNoBottomGutter:!0,children:v.map((function(e,n){return(0,U.jsx)(I.r8,{xlSize:3,lgSize:3,mdSize:3,smSize:6,size:6,children:(0,U.jsx)(We,{onClick:i.showModal,deckId:e,deckIndex:n+1,hasPersistedDecks:k,requirePrimaryDeck:c})})}))})})}},{key:"renderWarnings",value:function(){var e=this.props,n=e.participant,i=e.translate,t=n.get("decks")||(0,S.List)(),a=this.getNumberOfDecks();return t.count()<a?(0,U.jsx)("div",{children:(0,U.jsx)(I.e3,{type:"warning",text:i("DeckManagementCard.warnings.notEnoughDecks",{smart_count:a})})}):null}},{key:"render",value:function(){var e,n,i=this.props,t=i.apollo,a=i.event,r=i.eventId,s=i.participantId,l=i.videogameId,m=i.translate,c=this.state.deckId;return null!==t&&void 0!==t&&null!==(e=t.forOperation)&&void 0!==e&&null!==(n=e.call(t,wn))&&void 0!==n&&n.loading?null:O.Z.hasDeckSupport(a,a.get("rulesetSettings"))?(0,U.jsxs)(d.Fragment,{children:[this.state.showModal&&(0,U.jsx)(Pn,{onClose:this.closeModal,deckId:c,videogameId:l,eventId:r,participantId:s}),(0,U.jsxs)(I.Zb,{className:On().DeckManagementCard,children:[(0,U.jsx)(I.Ol,{children:(0,U.jsx)(D.ZT,{variant:"h6",component:"h4",children:m("DeckManagementCard.title")})}),(0,U.jsx)(I.eW,{isBordered:!0,children:(0,U.jsxs)(I.pN,{useLegacyStyles:!0,size:"sm",children:[this.renderWarnings(),this.renderDecks()]})})]})]}):null}}]),i}(d.PureComponent);(0,t.Z)(En,"defaultProps",{participant:(0,S.Map)(),event:(0,S.Map)()});var Mn=En,An=(0,r.qC)((0,l.Z)({kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DeckManagementCard"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"participantId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"eventId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"event"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"eventId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasDecks"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rulesetSettings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ruleset"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"videogameId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"classSelectionCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"decksPerClass"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deckLimit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"requirePrimaryDeck"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"participant"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"participantId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"decks"},arguments:[{kind:"Argument",name:{kind:"Name",value:"eventId"},value:{kind:"Variable",name:{kind:"Name",value:"eventId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"deckCard"},directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"deckCard"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Deck"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isPrimary"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"valid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isEmpty"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"characters"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"image"},directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"image"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Image"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"height"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isOriginal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]}]}}],loc:{start:0,end:372,source:{body:'#import "./DeckCard/deckCard.fragment.gql"\n\nquery DeckManagementCard($participantId: ID!, $eventId: ID!) {\n\tevent(id: $eventId) {\n\t\tid\n\t\thasDecks\n\t\trulesetSettings\n\t\truleset {\n\t\t\tid\n\t\t\tvideogameId\n\t\t\tclassSelectionCount\n\t\t\tdecksPerClass\n\t\t\tdeckLim
1it\n\t\t\trequirePrimaryDeck\n\t\t}\n\t}\n\tparticipant(id: $participantId) {\n\t\tid\n\t\tdecks(eventId: $eventId) {\n\t\t\t...deckCard\n\t\t}\n\t}\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}}}},{options:function(e){return{variables:{eventId:e.eventId,participantId:e.participantId,videogameId:e.videogameId}}}}),(0,c.Z)())(Mn),Vn=i(30381),Ln=i.n(Vn),qn=i(19237),Rn=i(50229),Un=i(65810),$n=i(10414),Bn=i(19348),zn=i(4574),_n=i(5655);function Gn(e,n,i){var t=new _n.Z(e),a=function(n,t){t||(e.dispatch(zn.Z.TOURNAMENT.FETCHED,n),e.dispatch(zn.Z.ATTENDEE.FETCHED,n)),i()};n.sourcePhaseId===n.destPhaseId?a():t.updatePhase(n.participantId,n,a,n.validationKey)}var Hn=i(72555),Qn=i.n(Hn),Wn=i(81266),Kn=i(74524),Jn=i(1392),Xn=i(98367),Yn=Qn()({displayName:"DeckEditModal",render:function(){var e=this.props.event||y().Map(),n=this.props.participant||y().Map(),i="participant_".concat(n.get("id")),t=this.props.startDeck,a=null,d=!1;t&&(t.get("newDeck")&&(d=!0),a=(a=y().Map()).set(i,t.get("id")));var r=(0,U.jsx)(Xn.Z,{event:this.props.event,characters:this.props.characters,participant:this.props.participant,forceParticipant:!0,editable:!0,userIsEntrant:!0,startDecks:a,startInAddState:d}),s="Edit Deck - ".concat(e.get("name"));return(0,U.jsxs)(Jn.u,{show:!0,onHide:this.props.onRequestHide,children:[(0,U.jsx)(Jn.u.Header,{closeButton:!0,children:(0,U.jsx)(Jn.u.Title,{children:s})}),(0,U.jsx)(Jn.u.Body,{className:"gg-card-body gg-card-body-grey",children:r})]})}}),ei=(0,m.Z)(Yn),ni=i(53213),ii=i(81502),ti=i.n(ii);function ai(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function di(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ai(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ai(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var ri=Qn()({displayName:"EntrantDeckEditLauncher",getInitialState:function(){return{modalProps:null}},getDeckRules:function(){var e=this.props.event||y().Map(),n=this.props.ruleset||y().Map();return{deckLimit:new _.Z(n).getMaxDecks(e),cardLimit:n.get("cardLimit"),requirePrimaryDeck:e.getIn(["rulesetSettings","requirePrimaryDeck"],!1)}},showModal:function(e){var n={event:this.props.event,entrant:this.props.entrant,participant:this.props.participant,characters:this.props.characters,startDeck:e};this.setState({modalProps:n})},modalClosed:function(){this.setState({modalProps:null})},hasDeckUpload:function(e){return parseInt(e.get("deckUploadMethod"),10)!==z.Z.NONE},generateCharacterIcon:function(e){var n=this.props.characters||y().Map(),i=e.get("characterIds"),t=null,a=null,d=b()("fa",{"fa-fw":!0,"fa-plus-circle":!i,"fa-book":i,"fa-2x":!0,"vertical-center":!0}),r=(0,U.jsx)("i",{className:d});return i&&(t=e.get("characterIds").first(),(a=n.get(t))&&(r=(0,U.jsx)("img",{alt:"character icon",src:$e.Z.getStockImageUrl(a)}))),(0,U.jsx)("div",{className:"entrant-deck-list__character-icon",children:r})},renderModal:function(){return this.state.modalProps?(0,U.jsx)($n.Z,{onClose:this.modalClosed,id:"editDecksModal",name:"editDecksModal",modal:(0,U.jsx)(ei,di({},this.state.modalProps))}):null},renderDeck:function(e,n){var i=this,t=this.props,a=t.entrant,d=t.event,r=t.participant,s=t.translate,l=e;l||(l=y().Map({id:"tempdeck-".concat(n),newDeck:!0}));var m=n+1,c=this.generateCharacterIcon(l,n),o=(0,U.jsx)("div",{children:s("EntrantDeckEditLauncher.deck",{deck_index:m})}),u=(0,U.jsxs)("div",{children:[c,o]}),v=this.getDeckRules(),k=null;v.requirePrimaryDeck&&l.get("isPrimary")&&(k=(0,U.jsx)(I.Df,{backgroundColor:"gg-background-color-green",textColor:"gg-background-color-white",children:(0,U.jsx)(I.M5,{icon:"fa fa-star",text:"Primary"})}));var g=(0,J.isNumber)(l.get("id")),p=null;return v.requirePrimaryDeck&&!l.get("isPrimary")&&g&&(p=(0,U.jsx)(I.Dr,{size:"xs",type:"secondary",onClick:function(){var e=l.get("id"),n=l.get("
1characterIds"),t=d.get("id"),s=a.get("id"),m=r.get("id");i.props.executeAction(Wn.Z,{id:e,isPrimary:!0,participantId:m,eventId:t,entrantId:s,characterIds:n})},children:"Make Primary"})),(0,U.jsx)("div",{className:"entrant-deck-list col-xs-4 col-md-3 bottom-spacer-sm",children:(0,U.jsxs)("div",{className:ti().deckButtonContainer,children:[(0,U.jsx)(Kn.Z,{onClick:(0,J.partial)(this.showModal,l),children:(0,U.jsx)(D.zx,{buttonType:"button",type:"outline",children:u})}),(0,U.jsxs)("div",{className:ti().deckButtonPrimaryLabelContainer,children:[k,p]})]})},l.get("id"))},renderDecks:function(){var e=(this.props.decks||y().Map()).sortBy((function(e){return e.get("id")})).toList(),n=this.getDeckRules().deckLimit;return e.size<n&&(e=e.setSize(n)),e.map((function(e,n){return this.renderDeck(e,n)}),this).toArray()},renderAlert:function(e,n,i,t){var a=t?"error":"warning";if(e)return(0,U.jsx)(I.e3,{type:a,text:e},n)},renderAlerts:function(){var e=this.props.translate,n=this.props.decks||y().Map(),i=this.getDeckRules(),t=n.size,a=i.deckLimit,d=i.cardLimit,r=t<a,s=[],l=[],m=null,c=new _.Z(this.props.ruleset).getEventSettings(this.props.event);if(this.hasDeckUpload(c)){r&&(m=e("EntrantDeckEditLauncher.missingDecks",{total_decks:e("EntrantDeckEditLauncher.decks",{smart_count:a})}),l.push(this.renderAlert(m,"alert-missing-decks",!0))),n&&n.size&&(n.forEach((function(n,i){var t=n?n.get("cardIds"):null;(t?t.size:0)<d&&s.push(e("EntrantDeckEditLauncher.deck",{deck_index:i+1}))})),s&&s.length&&(m=e("EntrantDeckEditLauncher.incompleteDecks",{smart_count:s.length}),l.push(this.renderAlert(m,"alert-incomplete-decks",!0,!1))));var o=new O.Z(this.props.event).isDeckManagementAvailable(),u=this.props.event.get("deckSubmissionDeadline");if(o&&u){var v=ni.Z.formatDate(u,{includeTimezone:!0,useLocal:!0});m=e("EntrantDeckEditLauncher.deckDeadline",{deadline:v}),l.push(this.renderAlert(m,"alert-deckdeadline",!0,!1))}return l}},render:function(){return(0,U.jsx)("div",{className:ti().EntrantDeckEditLauncher,children:(0,U.jsxs)(I.pN,{children:[this.renderAlerts(),(0,U.jsx)("div",{className:"row",children:this.renderDecks()}),this.renderModal()]})})}});ri=(0,A.Z)(ri,["CardDeckStore","CharacterStore"],(function(e,n){var i=n.event||y().Map(),t=i.get("id"),a=(n.participant||y().Map()).get("id"),d=i.get("videogameId");return{decks:e.CardDeckStore.getByParticipantAndEvent(a,t),characters:e.CharacterStore.getByVideogame(d)}}));var si=(0,r.qC)((0,c.Z)(),m.Z)(ri);function li(e){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,t=(0,f.Z)(e);if(n){var a=(0,f.Z)(this).constructor;i=Reflect.construct(t,arguments,a)}else i=t.apply(this,arguments);return(0,h.Z)(this,i)}}var mi="edit-phase",ci=function(e){(0,N.Z)(i,e);var n=li(i);function i(){var e;(0,g.Z)(this,i);for(var a=arguments.length,d=new Array(a),r=0;r<a;r++)d[r]=arguments[r];return e=n.call.apply(n,[this].concat(d)),(0,t.Z)((0,Ve.Z)(e),"state",{editingPhaseForValue:null,destPhaseId:null}),(0,t.Z)((0,Ve.Z)(e),"editPhase",(function(){var n=e.props,i=n.registrationData,t=n.executeAction,a=e.state,d=a.editingPhaseForValue,r=a.destPhaseId;t(Gn,{participantId:i.get("id"),eventId:d.get("optionTypeId"),destPhaseId:r,validationKey:mi})})),(0,t.Z)((0,Ve.Z)(e),"showEditPhaseModal",(function(n){e.setState({editingPhaseForValue:n})})),(0,t.Z)((0,Ve.Z)(e),"hideEditPhaseModal",(function(){e.setState({editingPhaseForValue:null})})),(0,t.Z)((0,Ve.Z)(e),"setDestPhaseId",(function(n){e.setState({destPhaseId:n})})),e}return(0,p.Z)(i,[{key:"renderEditPhaseModal",value:function(){var e,n,i,t,a=this.props,d=a.tournament,r=a.phases,s=a.groups,l=a.waves,m=a.attendee,c=this.state.editingPhaseForValue;if(!c)return null;var o=c,u=new C.Z(d),v=o.getIn(["additional","phaseIds"]).reduce((function(e,n){var i=(0,J.extend)({},e);return i[n]=!0,i}),{}),k="phase.".concat(o.get("optionTypeId"));n=r.filter((function(e){return!!v[e.get("id")]}));var g=o.getIn(["additional","phaseLimits"]),p={},N=n.map((function(e){var n=e.get("id"),i=s.find((function(e){return e.get("phaseId")===n&&e.get("waveId")})),t=new qn.Z(i);return i&&t.getStartAt(l)?t.getStartAt(l):null})),h=n.map((function(e){var n=e.get("id"),a=!1,r=0,s="";if(d.get("entrantsByPhase")&&(r=d.get("entrantsByPhase").get(n)),g&&g.get(n)&&(t=g.get(n),s=" / ".concat(t),r>=t&&(a=!0,p[n]=e)),N.get(n)){var l=N.get(n);Ln().unix(l).isBefore(Ln()())&&(a=!0,p[n]=e),i=(0,U.jsx)("span",{className:"help-block",children:u.getTournamentTimezoneFormat(l,"dddd MMMM Do [at] LT",!1,!0)})}return(0,U.jsx)("div",{className:"radio",children:(0,U.jsxs)("label",{htmlFor:k,children:[(0,U.jsx)("input",{type:"radio",name:k,"data-value":n.toString(),disabled:a}),(0,U.jsx)("strong",{children:e.get("name")}
1),"\xa0",i,(0,U.jsxs)("em",{className:"text-muted",children:[r,s," entrants"," "]})]})},"phase-".concat(n))}),this).sortBy((function(e,n){return N.get(n)})).toArray();if(n.size&&(n=n.filter((function(e){return!p[e.get("id")]}))),m){var f=o.get("optionTypeId"),S=m.get("pools").filter((function(e){return e.get("eventId")===f}));if(1===S.size)e=S.first().get("phaseId")}var y=(0,U.jsx)(Rn.Z,{showSubmit:!1,name:"qualifier-selection-form",children:(0,U.jsxs)("div",{className:"gg-well",children:[(0,U.jsx)("span",{className:"help-block",children:"Select which qualifier you'd like to enter."}),(0,U.jsx)(Un.Z,{type:"number",name:k,value:e.toString(),onChange:this.setDestPhaseId,children:h})]})});return(0,U.jsx)($n.Z,{id:"editPhase",name:"editPhaseRegistrationModal",modal:(0,U.jsx)(Bn.Z,{validationKey:"edit-phase",autoHide:!1,onConfirm:this.editPhase,onSuccess:this.hideEditPhaseModal,onCancel:this.hideEditPhaseModal,title:"Change Event Registration",confirmText:"Save",body:y})})}},{key:"render",value:function(){var e=this,n=this.props,i=n.event,t=n.regOptionValuesByOption,a=n.attendee,r=n.participant,s=n.ruleset,l=n.translate;if(!O.Z.hasDeckSupport(i,s))return null;var m=null;t.forEach((function(n){var t=n.first();t.get("optionTypeId")===i.get("id")&&t.getIn(["additional","phaseIds"])&&(m=(0,U.jsx)("div",{children:(0,U.jsx)(D.zx,{onClick:(0,J.partial)(e.showEditPhaseModal,t),type:"primary",children:"Edit"})}))}));var c=i.get("id"),o=a&&(a.get("entrants")||(0,S.Map)()),u=L.Z.indexBy(o,"eventId")||(0,S.Map)(),v=(0,U.jsx)(si,{event:i,entrant:u.get(c),participant:r,ruleset:s});return(0,U.jsxs)(d.Fragment,{children:[(0,U.jsxs)(I.Zb,{children:[(0,U.jsx)(I.Ol,{children:(0,U.jsx)(D.ZT,{variant:"h6",component:"h4",children:l("DecksEventManager.title")})}),(0,U.jsxs)(I.eW,{isBordered:!0,children:[v,m]})]}),this.renderEditPhaseModal()]})}}]),i}(d.Component),oi=(0,m.Z)((0,c.Z)()(ci)),ui=i(69124),vi=i(44013);function ki(e,n){var i="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,n){if(!e)return;if("string"===typeof e)return gi(e,n);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return gi(e,n)}(e))||n&&e&&"number"===typeof e.length){i&&(e=i);var t=0,a=function(){};return{s:a,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var d,r=!0,s=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return r=e.done,e},e:function(e){s=!0,d=e},f:function(){try{r||null==i.return||i.return()}finally{if(s)throw d}}}}function gi(e,n){(null==n||n>e.length)&&(n=e.length);for(var i=0,t=new Array(n);i<n;i++)t[i]=e[i];return t}function pi(e){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,t=(0,f.Z)(e);if(n){var a=(0,f.Z)(this).constructor;i=Reflect.construct(t,arguments,a)}else i=t.apply(this,arguments);return(0,h.Z)(this,i)}}var Ni,hi=function(e){(0,N.Z)(i,e);var n=pi(i);function i(){return(0,g.Z)(this,i),n.apply(this,arguments)}return(0,p.Z)(i,[{key:"componentDidMount",value:function(){this.props.tournament&&this.props.tournament.get("id")&&this.props.executeAction(ui.Z,{tournament:this.props.tournament,participant:this.props.participant,options:this.props.regOptions,optionValues:this.props.regOptionValuesByOption,selections:this.props.regOptionSelections})}},{key:"renderParticipantEmpty",value:function(){var e=new C.Z(this.props.tournament).getTabUrl("register"),n=(0,U.jsxs)("div",{children:[(0,U.jsx)("div",{children:"You are not registered for this tournament"}),(0,U.jsxs)("div",{children:["Register"," ",(0,U.jsx)(I.rU,{url:e,type:"primary",children:"here"})]})]});return(0,U.jsx)(B,{message:n})}},{key:"renderEntrantEmpty",value:function(){var e=new C.Z(this.props.tournament).getTabUrl("dashboard"),n=(0,U.jsxs)("div",{children:[(0,U.jsx)("div",{children:"You are not registered for this event"}),(0,U.jsxs)("div",{children:["Register"," ",(0,U.jsx)(I.rU,{url:e,type:"primary",children:"here"})]})]});return(0,U.jsx)(B,{message:n})}},{key:"renderContent",value:function(){var e=this.props,n=e.tournament,i=e.event,t=e.currentUser,a=(e.apollo,e.participant),d=e.registrationData,r=e.ruleset,s=e.attendee,l=e.regOptions,m=e.regOptionSelections,c=e.regOptionValues,o=e.regOptionValuesByOption,u=e.registrationState,v=e.phases,k=e.groups,g=e.waves,p=e.inviteCode,N=e.translate,h=(0,S.Map)();d&&d.get("events")&&(h=d.get("events"));var f=h.some((function(e){return e===i.get("id")}
1)),y=V.Z.isTeams(i);if(!t)return(0,U.jsx)(Ee.Z,{currentUser:t});if(!a)return this.renderParticipantEmpty();if(!f)return this.renderEntrantEmpty();var F=null;if(y){var b,I=!1,D=ki(c.values());try{for(D.s();!(b=D.n()).done;){var j=b.value;"event"===j.get("optionType")&&j.get("optionTypeId")===i.get("id")&&(I=j.get("additional").get("forceSkipTeam"))}}catch(O){D.e(O)}finally{D.f()}F=(0,U.jsx)("div",{children:(0,U.jsx)(we,{event:i.toJS(),currentUser:t,participant:a,tournament:n,eventOnlySearch:!1,inviteCode:p,forceSkipTeamCreation:I})})}var T,P=i.get("rulesetSettings"),C=r&&r.getIn(["eventSettings","deckUploadMethod","defaultValue"]);switch(parseInt(_.Z.getRuleField("deckUploadMethod",(0,S.Map)({deckUploadMethod:C}),P,z.Z.NONE),10)){case z.Z.IMAGES:T=(0,U.jsx)(oi,{tournament:n,event:i,participant:a,registrationData:d,regOptionValuesByOption:o,attendee:s,ruleset:r,phases:v,groups:k,waves:g});break;case z.Z.USER_INPUT:case z.Z.EXTERNAL_LINK:T=(0,U.jsx)(An,{eventId:i.get("id"),participantId:a.get("id"),videogameId:i.get("videogameId")})}return(0,U.jsxs)(x.Ki,{spacing:4,children:[F,!Boolean(F)&&(0,U.jsxs)("section",{className:"tw",children:[(0,U.jsx)(be.Z,{title:N("EventManagePage.teamTitle")}),(0,U.jsx)(vi.Z,{image:"https://images.start.gg/empty-states/teams.webp",description:N("EventManagePage.teamEmptyState")})]}),T,!Boolean(T)&&(0,U.jsxs)("section",{className:"tw",children:[(0,U.jsx)(be.Z,{title:N("EventManagePage.deckTitle")}),(0,U.jsx)(vi.Z,{image:"https://images.start.gg/empty-states/deck.webp",description:N("EventManagePage.deckEmptyState")})]}),(0,U.jsx)(Me.Z,{currentUser:t,registrationState:u,regOptions:l,regOptionSelections:m,regOptionValues:c,regOptionValuesByOption:o,tournament:n,subFieldEventId:i.get("id"),onEventManagePage:!0})]})}},{key:"render",value:function(){var e=this.props,n=e.event,i=e.backLinkText,t=e.translate,a=new O.Z(n);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)("div",{className:"tw",children:(0,U.jsxs)("section",{className:"mb-8 flex justify-between",children:[(0,U.jsxs)(I.rU,{url:a.getTabUrl("overview"),className:"flex items-baseline gap-2",type:"primary",children:[(0,U.jsx)(I.xu,{className:"fa fa fa-chevron-left"}),i]}),(0,U.jsxs)(I.rU,{url:n.getIn(["tournament","manageRegUrl"]),className:"flex items-baseline gap-2",type:"primary",children:[t("EventManagePage.viewDashboard"),(0,U.jsx)(I.xu,{className:"fa fa fa-chevron-right"})]})]})}),this.renderContent()]})}}]),i}(d.Component),fi=(0,m.Z)(hi),Si=(0,c.Z)()((0,M.Z)((0,A.Z)(fi,["PlayerStore","ParticipantStore","UserLinkStore","RulesetStore","AttendeeStore","RegistrationOptionStore","RegistrationOptionSelectionStore","RegistrationOptionValueStore","TournamentRegistrationStore","PhaseStore","PhaseGroupStore","WaveStore"],(function(e,n){var i=n.tournament,t=n.event,a=n.currentUser,d=e.PlayerStore,r=e.ParticipantStore,s=e.UserLinkStore,l=e.RulesetStore,m=e.AttendeeStore,c=e.RegistrationOptionStore,o=e.RegistrationOptionSelectionStore,u=e.RegistrationOptionValueStore,v=e.TournamentRegistrationStore,k=e.PhaseStore,g=e.PhaseGroupStore,p=e.WaveStore,N=null,h=null;a&&(h=a.get("playerId"),N=d.get(h));var f=null;N&&(f=r.getByPlayer(N.get("id"),i.get("id")));var y=null;h&&i&&(y=m.getByPlayerAndTournament(h,i.get("id")).first());var F=(0,S.Map)();f&&(F=o.getByParticipant(f.get("id")));var b=l.get(t.get("rulesetId")),I=s.getTournamentData(i.get("id")),D=c.getByTournament(i.get("id")),x=L.Z.pluck(D,"id"),j=c.getByTournament(i.get("id")),T=u.getByOptionIds(x.toArray()),P=q.Z.groupByOptionId(T),C=v.getState(),O=k.getByEvent(t.get("id")),Z=L.Z.pluck(O,"id").toArray();return{participant:f,registrationData:I,ruleset:b,attendee:y,regOptions:j,regOptionSelections:F,regOptionValues:T,regOptionValuesByOption:P,registrationState:C,phases:O,groups:g.getByPhase(Z),waves:p.getByTournament(i.get("id"))}})))),yi=Si,Fi=i(16113),bi=i(25599),Ii=i(48206),Di=i(32794),xi=i(59796),ji=i(71383),Ti=i(14219),Pi=i.n(Ti),Ci=i(45939),Oi=i(68718),Zi=i(79680),wi=i(42844),Ei=Pi()(Ni||(Ni=(0,ji.Z)(["\n\tquery SinglePhaseEventStandings($id: ID) {\n\t\tevent(id: $id) {\n\t\t\tid\n\t\t\tphaseGroups {\n\t\t\t\tid\n\t\t\t\tgroupTypeId\n\t\t\t\tstate\n\t\t\t}\n\t\t}\n\t}\n"]))),Mi=function(e){var n=e.eventId,i=e.eventTab,t=(0,ke.Z)(Ei,{variables:{id:n}}),a=t.loading,d=(t.error,t.data);if(a)return(0,U.jsx)(wi.hM,{});var r=d.event.groups||[];if(1===r.length&&(r[0].get("groupTypeId")===Oi.Z.RACE||r[0].get("groupTypeId")!==Oi.Z.ELIMINATION_ROUNDS&&r[0].get("state")!==P.Z.CREATED)){var s=r[0];return(0,U.jsx)(Ci.Z,{phaseGroupId:s.get("id")})}return(0,U.jsx)(Zi.Z,{eventId:n,eventTab:i})},Ai=function(e){var n=e.event,i=e.tournament,t=e.currentRoute,a=e.translate,d=n.get("phases")||(0,S.List)();if(0===d.size)return(0,U.jsx)(vi.Z,{image:"https://images.start.gg/empty-states/entrants.webp",description:"No standings available"});if(!new C.Z(i).isAttendeesPublished())return(0,U.jsx)(vi.Z,{image:"https://images.start.gg/empty-states/entrants.webp",description:a("EventOverviewPage.empty.standings_published")});var r=t.get("eventTab");return d.size>1?(0,U.jsx)(Zi.Z,{eventId:n.get("id"),eventTab:r}):(0,U.jsx)(Mi,{eventId:n.get("id"),eventTab:r})},Vi=i(64138),Li=i.n(Vi);function qi(e){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var i,t=(0,f.Z)(e);if(n){var a=(0,f.Z)(this).constructor;i=Reflect.construct(t,arguments,a)}else i=t.apply(this,arguments);return(0,h.Z)(this,i)}}var Ri={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"EventOverviewPage"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"eventSlug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"event"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"eventSlug"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"eventOverviewPageFragment"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"eventOverviewPageFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Event"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bracketsPublished"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasDecks"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasTasks"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"matchRulesMarkdown"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"prizingInfo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rulesMarkdown"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rulesetId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rulesetSettings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"teamNameAllowed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"teamRosterSize"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"minPlayers"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"maxPlayers"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"minAlternates"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"maxAlternates"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"canEditTeams"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tournament"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"manageRegUrl"},name:{kind:"Name",value:"url"},arguments:[{kind:"Argument",name:{kind:"Name",value:"tab"},value:{kind:"StringValue",value:"manage_registration",block:!1}},{kind:"Argument",name:{kind:"Name",value:"relative"},value:{kind:"BooleanValue",value:!0}}],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"videogame"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"videogameId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phases"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"seedingPublished"},arguments:[],directives:[]}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"eventUserStanding"},directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"eventUserStanding"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Event"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"overviewUrl"},name:{kind:"Name",value:"url"},arguments:[{kind:"Argument",name:{kind:"Name",value:"tab"},value:{kind:"StringValue",value:"overview",block:!1}}],directives:[]},{kind:"Field",alias:{kind:"Name",value:"standingsUrl"},name:{kind:"Name",value:"url"},arguments:[{kind:"Argument",name:{kind:"Name",value:"tab"},value:{kind:"StringValue",value:"standings",block:!1}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"tournament"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"userEntrant"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"standing"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"placement"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isFinal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"prizing"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"prizingType"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ProductPrizing"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"claimed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"shopProduct"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"productPassport"},directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MonetaryPrizing"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},arguments:[],directives:[]}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"productPassport"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ShopProduct"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"productAvatar"},directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"productAvatar"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ShopProduct"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[{kind:"Argument",name:{kind:"Name",value:"type"},value:{kind:"StringValue",value:"cart_thumbnail",block:!1}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}],loc:{start:0,end:154,source:{body:'#import "./EventOverviewPage.fragment.gql"\n\nquery EventOverviewPage($eventSlug: String!) {\n\tevent(slug: $eventSlug) {\n\t\t...eventOverviewPageFragment\n\t}\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}}}},Ui={userRegistrationData:(0,S.Map)(),currentUser:null,subTab:null},$i=function(e){(0,N.Z)(i,e);var n=qi(i);function i(e){var t;return(0,g.Z)(this,i),(t=n.call(this,e)).state={showAttendeeModal:!1,editAttendee:null},t}
1return(0,p.Z)(i,[{key:"componentDidMount",value:function(){this.maybeScrollToMatches()}},{key:"componentDidUpdate",value:function(){this.maybeScrollToMatches()}},{key:"maybeScrollToMatches",value:function(){if(!this.didScrollToMatches&&"#your-matches"===window.location.hash){var e=document.getElementById("your-matches");e&&(this.didScrollToMatches=!0,e.scrollIntoView({behavior:"smooth",block:"start"}))}}},{key:"renderScheduleList",value:function(){var e=this.props,n=e.event,i=e.apollo,t=e.translate,a=T.Z.isInitialLoad(i,Ri),d=n.get("phases",(0,S.List)()),r=d&&d.some((function(e){return e&&e.get("seedingPublished")})),s=function(e){return(0,U.jsx)(vi.Z,{image:"https://images.start.gg/empty-states/bracket.webp",description:e})};return a||r?(0,U.jsx)(Di.Z,{entityType:u.Z.PHASE,profileType:u.Z.EVENT,profileId:n.get("id"),usePublicCache:!0,perPage:25,showPagination:!1,emptyState:function(){return s(t("EventOverviewPage.empty.brackets_empty"))}}):s(t("EventOverviewPage.empty.brackets_published"))}},{key:"renderOverviewContent",value:function(){var e=this,n=this.props,i=n.userRegistrationData,t=n.event,a=n.tournament,d=n.translate,r=n.currentRoute,s=this.state,l=s.showAttendeeModal,m=s.editAttendee,c=new O.Z(t),o=new C.Z(a).isAttendeesPublished(),u=t.get("id"),v=c.getBracketsUrl(),k=c.getTabUrl("standings"),g=JSON.stringify({eventIds:[String(u)]}),p="/".concat(a.get("slug"),"/attendees?filter=").concat(encodeURIComponent(g)),N=t.get("rulesMarkdown"),h=t.getIn(["prizingInfo","enablePrizing"]),f=P.Z.getEnumState(t.get("state")),S=f===P.Z.CREATED,y=f===P.Z.COMPLETED,F=i&&i.getIn(["entrants","".concat(u)]);return(0,U.jsxs)(x.MI,{className:Li().overviewGrid,direction:"column",spacing:{xs:4,md:6},children:[(0,U.jsx)(Fi.Z,{eventId:u,template:Fi.x.SM,isManageRegVisible:!0,isViewEventVisible:!1,shouldAggregate:!1,showTitle:!0}),F&&!y&&(0,U.jsxs)("div",{className:"tw",children:[(0,U.jsx)(be.Z,{title:d("EventOverviewPage.header.schedule")}),(0,U.jsx)("div",{className:"p-6 bg-white border shadow-sm",children:(0,U.jsx)(bi.Z,{tournament:a,entrantId:F,useInfoCard:!1,isCurrentUserSchedule:!0,shouldHaveMinHeight:!0,onEventOverviewPage:!0})})]}),F&&(0,U.jsxs)("div",{id:"your-matches",children:[(0,U.jsx)(be.Z,{title:d(y?"EventOverviewPage.header.results":"EventOverviewPage.header.matches")}),(0,U.jsx)(j.GE,{eventId:u,onEventOverviewPage:!0}),(0,U.jsx)(E.Z,{eventId:u,entrantId:F,publicCache:!1,pollIntervalMs:f===P.Z.ACTIVE?3e4:0})]}),(0,U.jsxs)("div",{children:[(0,U.jsx)(be.Z,{title:d("EventOverviewPage.sections.schedule.title"),rightSection:(0,U.jsx)(I.rU,{className:"text-sm text-sky-700 hu",url:v,children:d("EventOverviewPage.sections.schedule.view_all")})}),this.renderScheduleList()]}),S?(0,U.jsxs)("div",{children:[(0,U.jsx)(be.Z,{title:"Attendees",rightSection:(0,U.jsx)(I.rU,{className:"text-sm text-sky-700 hu",url:p,children:"View all attendees"})}),o?(0,U.jsxs)("div",{className:"AttendeesTable",children:[(0,U.jsx)(w.Z,{open:l,tournament:a,participantId:m?m.get("id"):null,isAdmin:!1,path:null,onClose:function(){return e.setState({showAttendeeModal:!1})}}),(0,U.jsx)(Z.Z,{tournamentId:a.get("id"),tournament:a,baseUrl:c.getTabUrl("overview"),defaultFilter:{eventIds:[String(u)]},rankingsVideogameId:t.get("videogameId"),perPage:8,hideToolbar:!0,hidePaginationControl:!0,onClickRow:function(n,i){return e.setState({showAttendeeModal:!0,editAttendee:i})}})]}):(0,U.jsx)(vi.Z,{image:"https://images.start.gg/empty-states/entrants.webp",description:"Attendees have not been published for this event"})]}):(0,U.jsxs)("div",{children:[(0,U.jsx)(be.Z,{title:d("EventOverviewPage.sections.standings.title"),rightSection:(0,U.jsx)(I.rU,{className:"text-sm text-sky-700 hu",url:k,children:d("EventOverviewPage.sections.standings.view_all")})}),(0,U.jsx)("div",{className:"AttendeesTable",children:(0,U.jsx)(Ai,{currentRoute:r,tournament:a,event:t,translate:d})})]}),h&&(0,U.jsxs)("div",{children:[(0,U.jsx)(be.Z,{title:d("EventOverviewPage.sections.prizing.title"),rightSection:(0,U.jsx)(I.rU,{className:"text-sm text-sky-700 hu",url:c.getTabUrl("overview/prizing"),children:d("EventOverviewPage.sections.prizing.view_all")})}),(0,U.jsx)("div",{className:"event-overview-card",children:(0,U.jsx)(j.sl,{eventId:t.get("id"),limit:3})})]}),N&&(0,U.jsxs)("div",{children:[(0,U.jsx)(be.Z,{title:d("EventOverviewPage.sections.rules.title"),rightSection:(0,U.jsx)(I.rU,{className:"text-sm text-sky-700 hu",url:c.getTabUrl("overview/rules"),children:d("EventOverviewPage.sections.rules.view_all")})}),(0,U.jsx)("div",{className:"event-overview-card",children:(0,U.jsx)(xi.Z,{markdown:N})})]})]})}},{key:"renderPrizingContent",value:function(){var e=this.props,n=e.event,i=e.translate,t=new O.Z(n);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)("div",{className:"tw",children:(0,U.jsx)("section",{className:"mb-6 flex justify-between",children:(0,U.jsxs)(I.rU,{url:t.getTabUrl("overview"),className:"flex items-baseline gap-2",type:"primary",children:[(0,U.jsx)(I.xu,{className:"fa fa fa-chevron-left"}),i("EventOverviewPage.back")]})})}),(0,U.jsx)(be.Z,{title:i("EventOverviewPage.sections.prizing.title")}),(0,U.jsx)("div",{className:"event-overview-card",children:(0,U.jsx)(j.sl,{eventId:n.get("id")})})]})}},{key:"renderRulesContent",value:function(){var e=this.props,n=e.event,i=e.tournament,t=e.translate,a=new O.Z(n),d=function(e,n){return n?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)("div",{className:"tw",children:(0,U.jsx)("section",{className:"mb-6 flex justify-between",children:(0,U.jsxs)(I.rU,{url:a.getTabUrl("overview"),className:"flex items-baseline gap-2",type:"primary",children:[(0,U.jsx)(I.xu,{className:"fa fa fa-chevron-left"}),t("EventOverviewPage.back")]})})}),(0,U.jsx)(be.Z,{title:e}),(0,U.jsx)("div",{className:"event-overview-card",children:(0,U.jsx)(xi.Z,{markdown:n})})]}):null},r=d(t("EventOverviewPage.rules.tournament"),i.get("rules")),s=d(t("EventOverviewPage.rules.event"),n.get("rulesMarkdown")),l=d(t("EventOverviewPage.rules.match"),n.get("matchRulesMarkdown")),m=(0,U.jsxs)(x.MI,{direction:"column",spacing:{xs:4,md:6},children:[s,l,r]});return r||s||l||(m=(0,U.jsx)(D.ZT,{variant:"h4",component:"h2",className:"text-muted text-center",children:t("EventOverviewPage.empty.rules")})),m}},{key:"renderContent",value:function(){var e=this.props,n=e.currentRoute,i=e.tournament,t=e.currentUser,a=e.event,d=e.apollo,r=e.translate,s=e.subTab,l=n.getIn(["query","invite
1Code"]);switch(s){case"prizing":return this.renderPrizingContent();case"rules":return this.renderRulesContent();case"manage":return(0,U.jsx)(yi,{tournament:i,currentUser:t,event:a,backLinkText:r("EventOverviewPage.back"),apollo:d,inviteCode:l});default:return this.renderOverviewContent()}}},{key:"render",value:function(){var e=this.props.event;return!e||e.isEmpty()?null:(0,U.jsx)("div",{className:b()((0,t.Z)({},Li().EventOverviewPage,!0)),children:(0,U.jsx)(Ii.Z,{size:"large",children:this.renderContent()})})}}]),i}(d.PureComponent);$i.defaultProps=Ui;var Bi=$i;function zi(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}var _i=(0,r.qC)((0,l.Z)({kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"EventOverviewPage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"eventSlug"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"event"},arguments:[{kind:"Argument",name:{kind:"Name",value:"slug"},value:{kind:"Variable",name:{kind:"Name",value:"eventSlug"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"eventOverviewPageFragment"},directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"eventOverviewPageFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Event"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bracketsPublished"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasDecks"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"hasTasks"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"matchRulesMarkdown"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"prizingInfo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rulesMarkdown"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rulesetId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rulesetSettings"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"teamNameAllowed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"teamRosterSize"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"minPlayers"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"maxPlayers"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"minAlternates"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"maxAlternates"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"canEditTeams"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"tournament"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"slug"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"manageRegUrl"},name:{kind:"Name",value:"url"},arguments:[{kind:"Argument",name:{kind:"Name",value:"tab"},value:{kind:"StringValue",value:"manage_registration",block:!1}},{kind:"Argument",name:{kind:"Name",value:"relative"},value:{kind:"BooleanValue",value:!0}}],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"videogame"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"videogameId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phases"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"seedingPublished"},arguments:[],directives:[]}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"eventUserStanding"},directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"eventUserStanding"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Event"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"overviewUrl"},name:{kind:"Name",value:"url"},arguments:[{kind:"Argument",name:{kind:"Name",value:"tab"},value:{kind:"StringValue",value:"overview",block:!1}}],directives:[]},{kind:"Field",alias:{kind:"Name",value:"standingsUrl"},name:{kind:"Name",value:"url"},arguments:[{kind:"Argument",name:{kind:"Name",value:"tab"},value:{kind:"StringValue",value:"standings",block:!1}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"tournament"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"userEntrant"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"standing"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"placement"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isFinal"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"prizing"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"prizingType"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ProductPrizing"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"claimed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"shopProduct"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"productPassport"},directives:[]}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MonetaryPrizing"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"amount"},arguments:[],directives:[]}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"productPassport"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ShopProduct"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"productAvatar"},directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"productAvatar"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ShopProduct"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"images"},arguments:[{kind:"Argument",name:{kind:"Name",value:"type"},value:{kind:"StringValue",value:"cart_thumbnail",block:!1}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}],loc:{start:0,end:154,source:{body:'#import "./EventOverviewPage.fragment.gql"\n\nquery EventOverviewPage($eventSlug: String!) {\n\tevent(slug: $eventSlug) {\n\t\t...eventOverviewPageFragment\n\t}\n}\n',name:"GraphQL request",locationOffset:{line:1,column:1}}}}
1,{options:function(e){var n=e.slug,i=e.eventSlug,t=e.event;return{variables:{eventSlug:"tournament/".concat(n,"/").concat(u.Z.EVENT,"/").concat(i)},fetchPolicy:"network-only",skip:!!t}}}))(Bi),Gi=(0,v.Z)(_i,{global:function(e){var n,i,t,a=null===(n=e.tournament)||void 0===n?void 0:n.get("id"),d=null===(i=e.event)||void 0===i?void 0:i.get("id"),r=null===(t=e.currentRoute)||void 0===t?void 0:t.get("tab");return{pageObjectId:a,pageObjectType:u.Z.TOURNAMENT,eventId:d,tab:r,subTab:"standings"}}}),Hi=(0,k.Z)(Gi,["events"]),Qi=(0,s.Z)(Hi,{contentHeader:function(e){return(0,U.jsx)(o.Z,function(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?zi(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):zi(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}({},e))}}),Wi=(0,c.Z)()(Qi),Ki=(0,m.Z)(Wi),Ji=i(28968);function Xi(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function Yi(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?Xi(Object(i),!0).forEach((function(n){(0,t.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Xi(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var et={tab:"events",eventTab:"overview",titleKey:"events_overview",name:"events_overview",pageTelemetry:{name:"Event Homepage"}},nt=function(e){return(0,U.jsx)(Ki,Yi(Yi(Yi({},e),et),{},{currentRoute:(0,Ji.N0)()}))};nt.routeMeta=et,nt.getLayout=(0,a.G)(et);var it=!0,tt=nt},65146:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/tournament/[slug]/event/[eventSlug]/overview/[[...optionalParams]]",function(){return i(40859)}])},44434:function(e){e.exports={DeckCard:"DeckCard-sggpMymH",onlyPreviewDecks:"onlyPreviewDecks-sggcdDiE",cardPreviewContainer:"cardPreviewContainer-sggRJzzL",cardPreview:"cardPreview-sgguulyj",cardButtonContainer:"cardButtonContainer-sgg0Z9me",he
1ightMedium:"heightMedium-sggzYeEV",heightLarge:"heightLarge-sggsd2Pq",setAsPrimaryButton:"setAsPrimaryButton-sggURZZX",uppercaseLabel:"uppercaseLabel-sggYJke2",aside:"aside-sggEg48l"}},55183:function(e){e.exports={DeckManagementCard:"DeckManagementCard-sggdMI4q",alertBoxList:"alertBoxList-sgggqap3"}},47590:function(e){e.exports={cardResult:"cardResult-sggfGSS-"}},1190:function(e){e.exports={DeckList:"DeckList-sggextcA",table:"table-sggr4-50",cardName:"cardName-sggnSvVh",cardCost:"cardCost-sggb0zH7",costContent:"costContent-sggHbz76",cardRemove:"cardRemove-sggvJ6E-"}},37690:function(e){e.exports={DeckModal:"DeckModal-sggWshbn",modalHeader:"modalHeader-sggr-7SU",deckListHeader:"deckListHeader-sgguYqvo",cardCount:"cardCount-sggq3zU7",hidden:"hidden-sggSNqbp",deckList:"deckList-sggiJxvP",deckCode:"deckCode-sgglvjC0",error:"error-sggQGM93",show:"show-sggyrlwl"}},81502:function(e){e.exports={EntrantDeckEditLauncher:"EntrantDeckEditLauncher-sggIecDH",deckButtonContainer:"deckButtonContainer-sggxxK0o",deckButtonPrimaryLabelContainer:"deckButtonPrimaryLabelContainer-sgg6apkz"}},64138:function(e){e.exports={EventOverviewPage:"EventOverviewPage-sgge2mHr",container:"container-sggzt34N",overviewGrid:"overviewGrid-sggGiCpk",matches:"matches-sggt6bmu",title:"title-sggHaPjL",matchlet:"matchlet-sgg-2KPG",task:"task-sggM5NQ-",taskHeader:"taskHeader-sggSdN0k",taskBody:"taskBody-sggs0FAH"}},24766:function(e){e.exports={rarityBackgroundColor:"rarityBackgroundColor-sggToeTI",isFree:"isFree-sgg1ZHzG",isCommon:"isCommon-sggyMxy4",isRare:"isRare-sggTI4mj",isEpic:"isEpic-sggdTg2y",isLegendary:"isLegendary-sggKMlZO",rarityColor:"rarityColor-sgg8Oid9",rarityBorderColor:"rarityBorderColor-sggH9SKq"}}},function(e){e.O(0,[6017],(function(){e.E(5720)}),5);e.O(0,[5675,705,7401,7736,5774,2937,7379,1151,1774,4738,3206,792,646,8965,4591,7125,3027,1346,6113,7586,4716,3372,1592,1867,183,5705,5939,2996,2794,2884,9650,6843,487,8367,5e3,3977,2106,7597,4304,9774,2888,179],(function(){return n=65146,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
2//# sourceMappingURL=[[...optionalParams]]-3047153b23de1587.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.