diff --git a/extension/index.js b/extension/index.js index 9853d9cd..fe0f5a45 100644 --- a/extension/index.js +++ b/extension/index.js @@ -1 +1 @@ -(()=>{var e={5295:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RadiaProductionsClient=void 0;const r=o(n(2167)),i=n(6409),s=n(8157);t.RadiaProductionsClient=class{constructor(e,t){this.axios=r.default.create({baseURL:e,headers:{Authorization:t}}),this.axios.interceptors.response.use(null,i.handleAxiosError)}getLiveCasters(e){return a(this,void 0,void 0,(function*(){var t;try{return(yield this.axios.get(`live/guild/${e}`,{validateStatus:e=>200===e})).data}catch(e){if(404===(null===(t=e.response)||void 0===t?void 0:t.status))return null;throw e}}))}searchCasters(e){return a(this,void 0,void 0,(function*(){return(0,s.isBlank)(e)?[]:(yield this.axios.get(`commentators/profile/search/${encodeURI(e)}`)).data}))}setCasters(e,t){return a(this,void 0,void 0,(function*(){yield this.axios.post(`live/guild/${e}`,t)}))}}},2553:function(e,t,n){"use strict";var a,o,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},l=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SendouInkClientInstance=t.SendouInkClient=void 0;const c=u(n(2167)),d=n(4134),m=s(n(8604));class p{constructor(e){this.axios=c.default.create({baseURL:"https://sendou.ink/api",headers:{Authorization:`Bearer ${e}`}})}getTournamentData(e){return l(this,void 0,void 0,(function*(){const t=yield this.axios.get(`/tournament/${e}`),n=yield this.axios.get(`/tournament/${e}/teams`);return{meta:{id:e,source:d.TournamentDataSource.SENDOU_INK,name:t.data.name,shortName:t.data.name,url:t.data.url},teams:n.data.map((e=>({id:String(e.id),name:e.name,showLogo:!0,players:e.members.map((e=>({name:e.name})))})))}}))}}t.SendouInkClient=p;const f=m.get();null!=(null===(a=f.bundleConfig.sendouInk)||void 0===a?void 0:a.apiKey)&&(t.SendouInkClientInstance=new p(null===(o=f.bundleConfig.sendouInk)||void 0===o?void 0:o.apiKey))},761:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AutomationActionController=void 0;const o=n(31),r=n(4365);class i extends o.BaseController{constructor(e,t){super(e),this.listen("startGame",(()=>{t.startAutomationAction(r.GameAutomationAction.START_GAME)})),this.listen("endGame",(()=>{t.startAutomationAction(r.GameAutomationAction.END_GAME)})),this.listen("fastForwardToNextGameAutomationTask",(()=>a(this,void 0,void 0,(function*(){yield t.fastForwardToNextAutomationTask()})))),this.listen("cancelAutomationAction",(()=>{t.cancelAutomationAction()}))}}t.AutomationActionController=i},31:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseController=void 0,t.BaseController=class{constructor(e){this.nodecg=e}listen(e,t){this.nodecg.listenFor(e,((e,a)=>n(this,void 0,void 0,(function*(){try{const n=yield t(e);a.handled||a(null,n)}catch(e){a.handled||a(e)}}))))}}},4065:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CasterImportController=void 0;const o=n(31);class r extends o.BaseController{constructor(e,t){super(e),this.listen("getLiveCommentators",(()=>a(this,void 0,void 0,(function*(){return t.getLiveCommentators()})))),this.listen("searchCommentators",(e=>a(this,void 0,void 0,(function*(){return t.searchCommentators(e)})))),this.listen("pushCastersToRadia",(()=>a(this,void 0,void 0,(function*(){return t.pushCastersToRadia()}))))}}t.CasterImportController=r},4:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ObsConnectorController=void 0;const r=n(31),i=o(n(8805)),s=n(702),l=n(6983);class u extends r.BaseController{constructor(e,t,n){super(e);const o=e.Replicant("obsCredentials"),r=e.Replicant("obsState"),u=e.Replicant("swapColorsInternally");this.listen("connectToObs",(e=>a(this,void 0,void 0,(function*(){if(o.value=e,!r.value.enabled)throw new Error(i.default.t("obs.obsSocketDisabled"));t.stopReconnecting(),yield t.connect()})))),this.listen("setObsConfig",(e=>{var n,a,o;if(!(null===(n=r.value.scenes)||void 0===n?void 0:n.some((t=>t===e.gameplayScene)))||!(null===(a=r.value.scenes)||void 0===a?void 0:a.some((t=>t===e.intermissionScene))))throw new Error(i.default.t("obs.sceneNotFound"));if(!(null===(o=r.value.inputs)||void 0===o?void 0:o.some((t=>t.name===e.gameplayInput))))throw new Error(i.default.t("obs.inputNotFound"));if(null==r.value.currentSceneCollection)throw new Error(i.default.t("obs.missingCurrentSceneCollection"));t.updateConfig(Object.assign({sceneCollection:r.value.currentSceneCollection},e))})),this.listen("setObsSocketEnabled",(e=>a(this,void 0,void 0,(function*(){if(null==e)throw new Error(i.default.t("invalidArgumentsError"));r.value.enabled=e,e?yield t.connect():yield t.disconnect()})))),this.listen("setActiveColorsFromGameplaySource",(()=>a(this,void 0,void 0,(function*(){const e=t.findCurrentConfig(),a=null==e?void 0:e.gameplayInput;if(null==a)throw new Error(i.default.t("obs.missingGameplayInput"));const o=yield t.getSourceScreenshot(a),r=yield n.sampleTeamColors(o);(0,s.setActiveColor)({categoryName:r.categoryName,categoryKey:r.categoryKey,color:u.value?(0,l.swapColors)(r):r})}))))}}t.ObsConnectorController=u},3990:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeConfigController=void 0;const a=n(31),o=n(8209),r=n(4647),i=n(2099);class s extends a.BaseController{constructor(e,t,n){super(e);const a=e.Replicant("runtimeConfig");this.listen("setGameVersion",(e=>{if(a.value.gameVersion===e.version)return null;const s=o.dependentBundles.filter((t=>!t.compatibleGameVersions.includes(e.version))).map((e=>e.name));return a.value.gameVersion=e.version,t.updateLocaleInfo(a.value.locale,e.version),n.updateAssetPaths(e.version),(0,r.resetRoundStore)(),(0,i.resetMatchStore)(!0),{incompatibleBundles:s}})),this.listen("setLocale",(e=>{t.updateLocaleInfo(e,a.value.gameVersion),a.value.locale=e}))}}t.RuntimeConfigController=s},2062:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizePronouns=void 0;const a=n(8157);t.normalizePronouns=function(e){if(null==e||"string"!=typeof e||(0,a.isBlank)(e))return e;if(e=e.toLowerCase(),/(^|\s)any\s/gi.test(e))return"any pronouns";const t=e.replace(/\s*\/\s*/g,"/").match(/\S*\/\S*/g);return null==t?e:t.map((e=>e.replace(/[.,!-]/g,""))).join(", ")}},702:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getPreviousColor=t.getNextColor=t.setActiveColor=void 0;const s=r(n(8604)),l=i(n(9591)),u=n(4719),c=n(6983),d=s.get(),m=d.Replicant("activeRound"),p=d.Replicant("runtimeConfig"),f=d.Replicant("swapColorsInternally");function h(){return u.perGameData[p.value.gameVersion].colors.find((e=>e.meta.name===m.value.activeColor.categoryName))}t.setActiveColor=function(e){const t=(0,l.default)(m.value);t.activeColor={categoryName:e.categoryName,index:e.color.index,title:e.color.title,isCustom:e.color.isCustom,clrNeutral:e.color.clrNeutral,colorKey:e.color.key,categoryKey:e.categoryKey},t.teamA.color=e.color.clrA,t.teamB.color=e.color.clrB,m.value=t},t.getNextColor=function(){const e=h(),t=m.value.activeColor.index,n=e.colors.find((n=>n.index===(t+1===e.colors.length?0:t+1)));return Object.assign(Object.assign({},f.value?(0,c.swapColors)(n):n),{categoryName:e.meta.name,categoryKey:e.meta.key})},t.getPreviousColor=function(){const e=h(),t=m.value.activeColor.index,n=e.colors.find((n=>n.index===(0===t?e.colors.length-1:t-1)));return Object.assign(Object.assign({},f.value?(0,c.swapColors)(n):n),{categoryName:e.meta.name,categoryKey:e.meta.key})}},5851:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setActiveRoundTeams=t.setActiveRoundGames=t.setWinner=void 0;const s=n(9383),l=n(117),u=r(n(8604)),c=i(n(9699)),d=n(5780),m=i(n(9591)),p=i(n(8805)),f=n(6123),h=u.get(),g=h.Replicant("activeRound"),v=h.Replicant("swapColorsInternally"),b=h.Replicant("matchStore"),y=h.Replicant("tournamentData");t.setWinner=function(e,t){if(e>=g.value.games.length||e<0)throw new Error(p.default.t("activeRoundHelper.gameOutOfRange",{index:e+1}));const n=(0,m.default)(g.value),a=(0,m.default)(g.value.games[e]);if(t===s.GameWinner.NO_WINNER?(a.winner===s.GameWinner.ALPHA?n.teamA.score--:a.winner===s.GameWinner.BRAVO&&n.teamB.score--,n.games[e].winner=s.GameWinner.NO_WINNER,n.games[e].color=void 0):(t===s.GameWinner.ALPHA?(n.teamA.score++,n.games[e].winner=t,a.winner===s.GameWinner.BRAVO&&n.teamB.score--):t===s.GameWinner.BRAVO&&(n.teamB.score++,n.games[e].winner=t,a.winner===s.GameWinner.ALPHA&&n.teamA.score--),a.color||(n.games[e].color=Object.assign(Object.assign({},g.value.activeColor),{clrA:g.value.teamA.color,clrB:g.value.teamB.color,colorsSwapped:v.value}))),n.match.type===f.PlayType.BEST_OF){const e=n.games.length/2;n.match.isCompleted=n.teamA.score>e||n.teamB.score>e}else n.match.isCompleted=!n.games.some((e=>e.winner===s.GameWinner.NO_WINNER));g.value=n,(0,l.commitActiveRoundToMatchStore)()},t.setActiveRoundGames=function(e,t){const n=b.value[t];if((0,c.default)(n))throw new Error(p.default.t("activeRoundHelper.matchNotFound",{matchId:t}));e.match={id:t,name:n.meta.name,isCompleted:n.meta.isCompleted,type:n.meta.type},e.games=(0,m.default)(n.games),e.teamA.score=n.teamA.score,e.teamB.score=n.teamB.score},t.setActiveRoundTeams=function(e,t,n){const a=(0,d.getTeam)(t,y.value),o=(0,d.getTeam)(n,y.value);if([a,o].filter(c.default).length>0)throw new Error(p.default.t("activeRoundHelper.teamNotFound"));const r=(0,m.default)(e.teamA),i=(0,m.default)(e.teamB);e.teamA=Object.assign({score:r.score,color:r.color},a),e.teamB=Object.assign({score:i.score,color:i.color},o)}},8209:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.dependentBundles=void 0;const s=n(7147),l=r(n(8604)),u=n(8250),c=i(n(8805)),d=l.get(),m=`${process.cwd()}/bundles`,p=Object.keys(u.GameVersion);t.dependentBundles=(0,s.readdirSync)(m,{withFileTypes:!0}).filter((e=>e.isDirectory()&&e.name!==d.bundleName)).map((e=>{const t=`${m}/${e.name}/package.json`;if((0,s.existsSync)(t)){const a=JSON.parse((0,s.readFileSync)(t,"utf-8")),o=(n=a.compatibleGameVersions,!Array.isArray(n)||n.length<=0?[u.GameVersion.SPLATOON_2]:n.filter((e=>p.includes(e))));if(o.length<=0&&d.log.warn(c.default.t("bundleHelper.gameVersionParsingFailedWarning",{bundleName:e.name})),"compatibleDashboardVersion"in a)return{name:e.name,compatibleDashboardVersion:a.compatibleDashboardVersion,compatibleGameVersions:null!=o?o:[]}}var n;return null})).filter(Boolean)},2099:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setActiveRoundToFirstMatch=t.resetMatchStore=void 0;const s=r(n(8604)),l=n(4615),u=i(n(9591)),c=n(9383),d=n(5851),m=n(4719),p=s.get(),f=p.Replicant("matchStore"),h=p.Replicant("roundStore"),g=p.Replicant("tournamentData"),v=p.Replicant("activeRound"),b=p.Replicant("runtimeConfig"),y=p.Replicant("swapColorsInternally");function _(e=!1){const t=Object.keys(f.value)[0],n=f.value[t],a=(0,u.default)(v.value);if((0,d.setActiveRoundGames)(a,t),(0,d.setActiveRoundTeams)(a,n.teamA.id,n.teamB.id),e){const e=m.perGameData[b.value.gameVersion].colors[0],t=e.colors[0];a.teamA.color=y.value?t.clrB:t.clrA,a.teamB.color=y.value?t.clrA:t.clrB,a.activeColor={index:t.index,title:t.title,categoryName:e.meta.name,categoryKey:e.meta.key,colorKey:t.key,isCustom:t.isCustom,clrNeutral:t.clrNeutral}}v.value=a}t.resetMatchStore=function(e=!1){const t=Object.keys(h.value)[0],n=h.value[t],a=(0,l.generateId)(),o=(0,u.default)(g.value.teams[0]),r=(0,u.default)(g.value.teams[1]);f.value={[a]:{meta:{name:n.meta.name,isCompleted:!1,type:n.meta.type},teamA:Object.assign(Object.assign({},o),{score:0}),teamB:Object.assign(Object.assign({},r),{score:0}),games:n.games.map((e=>Object.assign(Object.assign({},e),{winner:c.GameWinner.NO_WINNER})))}},_(e)},t.setActiveRoundToFirstMatch=_},4594:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setNextRoundTeams=t.setNextRoundGames=void 0;const s=i(n(9699)),l=n(5780),u=r(n(8604)),c=i(n(8805)),d=u.get(),m=d.Replicant("nextRound"),p=d.Replicant("tournamentData"),f=d.Replicant("roundStore");t.setNextRoundGames=function(e){const t=f.value[e];if((0,s.default)(t))throw new Error(c.default.t("nextRoundHelper.roundNotFound",{roundId:e}));m.value.round={id:e,name:t.meta.name,type:t.meta.type},m.value.games=t.games.map((e=>({stage:e.stage,mode:e.mode})))},t.setNextRoundTeams=function(e,t){const n=(0,l.getTeam)(e,p.value),a=(0,l.getTeam)(t,p.value);if([n,a].filter(s.default).length>0)throw new Error(c.default.t("nextRoundHelper.teamNotFound"));m.value.teamA=n,m.value.teamB=a}},8604:(e,t)=>{"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),t.get=t.set=void 0,t.set=function(e){n=e},t.get=function(){return n}},4647:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.resetRoundStore=void 0;const s=r(n(8604)),l=n(6123),u=n(4594),c=n(4719),d=n(307),m=i(n(3901)),p=n(8275),f=i(n(8805)),h=s.get(),g=h.Replicant("roundStore"),v=h.Replicant("runtimeConfig");t.resetRoundStore=function(){const e="11111",t=c.perGameData[v.value.gameVersion],n=Object.keys((0,m.default)(t.stages[p.Locale.EN],["Unknown Stage","Counterpick"])),a=Object.keys((0,m.default)(t.modes[p.Locale.EN],["Unknown Mode"])),o=()=>({stage:(0,d.randomFromArray)(n),mode:(0,d.randomFromArray)(a)});g.value={"00000":{meta:{name:f.default.t("roundStoreHelper.defaultRoundName",{roundNumber:1}),type:l.PlayType.BEST_OF},games:[o(),o(),o()]},[e]:{meta:{name:f.default.t("roundStoreHelper.defaultRoundName",{roundNumber:2}),type:l.PlayType.BEST_OF},games:[o(),o(),o()]}},(0,u.setNextRoundGames)(e)}},5780:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getTeam=void 0;const o=a(n(739));t.getTeam=function(e,t,n=!0){const a=t.teams.filter((t=>t.id===e))[0];return n?(0,o.default)(a):a}},5014:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getBattlefyTournamentInfo=t.getBattlefyTournamentData=t.getBattlefyTournamentUrl=t.getBattlefyMatches=void 0;const r=o(n(2167)),i=n(4134),s=n(4417),l=o(n(8805));function u(e){return`https://battlefy.com/${e.organization.slug}/${e.slug}/${e._id}/info?infoTab=details`}function c(e){return a(this,void 0,void 0,(function*(){const t=`https://api.battlefy.com/tournaments/${e}?extend%5Bcampaign%5D%5Bsponsor%5D=true&extend%5Bstages%5D%5B%24query%5D%5BdeletedAt%5D%5B%24exists%5D=false&extend%5Bstages%5D%5B%24opts%5D%5Bname%5D=1&extend%5Bstages%5D%5B%24opts%5D%5Bbracket%5D=1&extend%5Bstages%5D%5B%24opts%5D%5BstartTime%5D=1&extend%5Bstages%5D%5B%24opts%5D%5BendTime%5D=1&extend%5Bstages%5D%5B%24opts%5D%5Bschedule%5D=1&extend%5Bstages%5D%5B%24opts%5D%5BmatchCheckinDuration%5D=1&extend%5Bstages%5D%5B%24opts%5D%5BhasCheckinTimer%5D=1&extend%5Bstages%5D%5B%24opts%5D%5BhasStarted%5D=1&extend%5Bstages%5D%5B%24opts%5D%5BhasMatchCheckin%5D=1&extend%5Borganization%5D%5Bowner%5D%5B%24opts%5D%5Btimezone%5D=1&extend%5Borganization%5D%5B%24opts%5D%5Bname%5D=1&extend%5Borganization%5D%5B%24opts%5D%5Bslug%5D=1&extend%5Borganization%5D%5B%24opts%5D%5BownerID%5D=1&extend%5Borganization%5D%5B%24opts%5D%5BlogoUrl%5D=1&extend%5Borganization%5D%5B%24opts%5D%5BbannerUrl%5D=1&extend%5Borganization%5D%5B%24opts%5D%5Bfeatures%5D=1&extend%5Borganization%5D%5B%24opts%5D%5Bfollowers%5D=1&extend%5Bgame%5D=true&extend%5Bstreams%5D%5B%24query%5D%5BdeletedAt%5D%5B%24exists%5D=false`;return(yield r.default.get(t)).data[0]}))}t.getBattlefyMatches=function(e,t,n){return a(this,void 0,void 0,(function*(){const a=`https://api.battlefy.com/tournaments/${e}?extend[stages][$query][deletedAt][$exists]=false&extend[stages][matches]=1&extend[stages][$opts][name]=1&extend[stages][$opts][matches][$elemMatch][isMarkedLive]=true&extend[stages.matches.top.team]=1&extend[stages.matches.bottom.team]=1&extend[stages][$opts][bracket]=1&extend[stages.matches.top.team.persistentTeam]=1&extend[stages.matches.bottom.team.persistentTeam]=1&extend[stages.matches.top.team.players]=1&extend[stages.matches.bottom.team.players]=1`,o=yield r.default.get(a),{data:i}=o;if(i.error)throw new Error(l.default.t("battlefyClient.battlefyReturnedError",{message:i.error}));if(!i[0])throw new Error(l.default.t("battlefyClient.battlefyReturnedNoData"));const u=i[0];return n?(0,s.mapBattlefyStagesToHighlightedMatches)(u.stages):(0,s.mapBattlefyStagesToHighlightedMatches)(u.stages.filter((e=>t.includes(e._id))))}))},t.getBattlefyTournamentUrl=u,t.getBattlefyTournamentData=function(e){return a(this,void 0,void 0,(function*(){const t=yield c(e),n="https://dtmwra1jsgyb0.cloudfront.net/tournaments/"+e+"/teams";return new Promise(((a,o)=>{r.default.get(n).then((n=>{var r;const{data:c}=n;if(!Array.isArray(c))return c.error?o(new Error(c.error)):o(new Error(l.default.t("battlefyClient.battlefyReturnedUnknownResponse")));const d={meta:{id:e,source:i.TournamentDataSource.BATTLEFY,name:t.name,shortName:null!==(r=t.name)&&void 0!==r?r:l.default.t("battlefyClient.placeholderTournamentName"),url:u(t)},teams:c.filter((e=>{var t;return!!e.players&&(null===(t=e.players)||void 0===t?void 0:t.length)>0})).map((e=>{var t;return{id:e._id,name:e.name,logoUrl:null===(t=e.persistentTeam)||void 0===t?void 0:t.logoUrl,showLogo:!0,players:e.players.map((e=>({name:e.inGameName,username:e.username})))}})),stages:(0,s.mapBattlefyStagesToTournamentData)(t.stages)};a(d)})).catch((e=>{o(e)}))}))}))},t.getBattlefyTournamentInfo=c},6409:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.updateTournamentData=t.handleAxiosError=t.createPrediction=t.updatePrediction=t.getPredictions=t.hasPredictionSupport=t.getGuildInfo=void 0;const l=s(n(2167)),u=r(n(8604)),c=n(8157),d=s(n(8805)),m=u.get();function p(e){var t;if("response"in e){let n=d.default.t("radiaClient.requestFailed",{statusCode:e.response.status});throw(null===(t=e.response.data)||void 0===t?void 0:t.detail)&&("object"==typeof e.response.data.detail?e.response.data.detail.message?n+=`: ${e.response.data.detail.message}`:n+=`: ${JSON.stringify(e.response.data.detail)}`:n+=`: ${e.response.data.detail}`),new Error(n)}throw e}t.getGuildInfo=function(e){return i(this,void 0,void 0,(function*(){if((0,c.isBlank)(e))throw new Error(d.default.t("radiaClient.missingGuildId"));try{return(yield l.default.get(`${m.bundleConfig.radia.url}/organisation/guild/${e}`,{headers:{Authorization:m.bundleConfig.radia.authentication}})).data}catch(e){p(e)}}))},t.hasPredictionSupport=function(e){return i(this,void 0,void 0,(function*(){if((0,c.isBlank)(m.bundleConfig.radia.authentication)||(0,c.isBlank)(e))return!1;try{const t=yield l.default.get(`${m.bundleConfig.radia.url}/predictions/check/${e}`,{headers:{Authorization:m.bundleConfig.radia.authentication}});return 200===t.status?"boolean"==typeof t.data.twitch&&t.data.twitch:(m.log.error(d.default.t("radiaClient.predictionSupportCheckError",{message:t.data.detail})),!1)}catch(e){return m.log.error(d.default.t("radiaClient.predictionSupportCheckError",{message:e})),!1}}))},t.getPredictions=function(e){return i(this,void 0,void 0,(function*(){if((0,c.isBlank)(e))throw new Error(d.default.t("radiaClient.missingGuildId"));try{return(yield l.default.get(`${m.bundleConfig.radia.url}/predictions/${e}`,{headers:{Authorization:m.bundleConfig.radia.authentication}})).data}catch(e){p(e)}}))},t.updatePrediction=function(e,t){return i(this,void 0,void 0,(function*(){if((0,c.isBlank)(e))throw new Error(d.default.t("radiaClient.missingGuildId"));try{return(yield l.default.patch(`${m.bundleConfig.radia.url}/predictions/${e}`,t,{headers:{Authorization:m.bundleConfig.radia.authentication}})).data}catch(e){p(e)}}))},t.createPrediction=function(e,t){return i(this,void 0,void 0,(function*(){if((0,c.isBlank)(e))throw new Error(d.default.t("radiaClient.missingGuildId"));try{return(yield l.default.post(`${m.bundleConfig.radia.url}/predictions/${e}`,t,{headers:{Authorization:m.bundleConfig.radia.authentication}})).data}catch(e){p(e)}}))},t.handleAxiosError=p,t.updateTournamentData=function(e,t,n){return i(this,void 0,void 0,(function*(){if((0,c.isBlank)(e))throw new Error(d.default.t("radiaClient.missingGuildId"));const a=yield l.default.post(`${m.bundleConfig.radia.url}/organisation/guild/${e}`,{bracket_link:t,tournament_name:n},{headers:{Authorization:m.bundleConfig.radia.authentication}});if(200!==a.status)throw new Error(d.default.t("radiaClient.requestFailed",{statusCode:a.status}));return a.data}))}},6337:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSmashGGStreamQueue=t.getSmashGGData=t.getSmashGGEvents=void 0;const r=o(n(2167)),i=n(4134),s=o(n(9699)),l=n(5735),u=n(2062),c=o(n(8805));function d(e,t,n){return a(this,arguments,void 0,(function*(e,t,n,a=!1){const o=yield r.default.post("https://api.smash.gg/gql/alpha",JSON.stringify({query:"query EventEntrants($eventId: ID!, $page: Int!, $perPage: Int!) {\n event(id: $eventId) {\n id\n videogame {\n displayName\n }\n tournament {\n id\n name\n slug\n streams{\n id\n streamName\n }\n }\n name\n entrants(query: {\n page: $page\n perPage: $perPage\n }) {\n pageInfo {\n total\n totalPages\n }\n nodes {\n id\n name\n team {\n images {\n type\n url\n }\n }\n participants {\n id\n prefix\n gamerTag\n user{\n genderPronoun\n }\n }\n }\n }\n }\n }",variables:{eventId:t,page:e,perPage:"50"}}),{headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${n}`}}),{data:i}=o;if(!i.data.event)throw new Error(c.default.t("startggClient.eventNotFound",{eventId:t}));const l=[];return i.data.event.entrants.nodes.forEach((e=>{var t,n;l.push({id:e.id.toString(10),name:e.name,showLogo:!0,logoUrl:null===(n=null===(t=e.team)||void 0===t?void 0:t.images.find((e=>"profile"===e.type)))||void 0===n?void 0:n.url,players:e.participants.map((e=>{var t;return{name:(0,s.default)(e.prefix)?e.gamerTag:`${e.prefix} ${e.gamerTag}`,pronouns:(0,u.normalizePronouns)(null===(t=e.user)||void 0===t?void 0:t.genderPronoun)}}))})})),a?{pageInfo:l,raw:i}:{pageInfo:l}}))}function m(e){var t,n,a;return{id:e.entrant.id.toString(),name:e.entrant.name,showLogo:!0,seed:e.seed.groupSeedNum,players:e.entrant.participants.map((e=>{var t,n;return{name:(0,s.default)(e.prefix)?e.gamerTag:`${e.prefix} ${e.gamerTag}`,pronouns:null===(n=null===(t=e.user)||void 0===t?void 0:t.genderPronoun)||void 0===n?void 0:n.toLowerCase()}})),logoUrl:null===(a=null===(n=null===(t=e.entrant.team)||void 0===t?void 0:t.images)||void 0===n?void 0:n.find((e=>"profile"===e.type)))||void 0===a?void 0:a.url}}t.getSmashGGEvents=function(e,t){return a(this,void 0,void 0,(function*(){const n=yield r.default.post("https://api.smash.gg/gql/alpha",JSON.stringify({query:"query Events($slug: String!) {\n tournament(slug: $slug) {\n id\n events {\n id\n name\n videogame {\n displayName\n }\n }\n }\n }",variables:{slug:e}}),{headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${t}`}});if(!n.data.data.tournament)throw new Error(c.default.t("startggClient.tournamentNotFound",{slug:e}));if(!n.data.data.tournament.events)throw new Error(c.default.t("startggClient.noEventsFoundForTournament",{slug:e}));return n.data.data.tournament.events.map((e=>({id:e.id,name:e.name,game:e.videogame.displayName})))}))},t.getSmashGGData=function(e,t){return a(this,void 0,void 0,(function*(){var n,a;const o=yield d(1,e,t,!0),r=o.raw.data.event.tournament.slug,s={meta:{id:r.substring(r.indexOf("/")+1),source:i.TournamentDataSource.SMASHGG,name:o.raw.data.event.tournament.name,shortName:null!==(n=o.raw.data.event.tournament.name)&&void 0!==n?n:"Unknown Tournament",url:`https://smash.gg/${o.raw.data.event.tournament.slug}/details`,sourceSpecificData:{smashgg:{tournamentId:o.raw.data.event.tournament.id,streams:null!==(a=o.raw.data.event.tournament.streams)&&void 0!==a?a:void 0,eventData:{id:o.raw.data.event.id,name:o.raw.data.event.name,game:o.raw.data.event.videogame.displayName}}}},teams:o.pageInfo};if(o.raw.data.event.entrants.pageInfo.totalPages>1){const n=[];for(let a=2;a<=o.raw.data.event.entrants.pageInfo.totalPages;a++)n.push(d(a,e,t));const a=yield Promise.all(n);for(let e=0;e{(i||o.includes(e.stream.id))&&e.sets.forEach((e=>{if(2===e.slots.length&&!e.slots.some((e=>null===e.entrant))&&e.event.id===n){const t=e.phaseGroup.phase.groupCount>1?c.default.t("startggClient.shortRoundName.withPool",{phaseName:e.phaseGroup.phase.name,poolName:e.phaseGroup.displayIdentifier,roundNumber:e.round}):c.default.t("startggClient.shortRoundName.withoutPool",{phaseName:e.phaseGroup.phase.name,roundNumber:e.round});d.push({meta:{id:e.id.toString(),stageName:e.phaseGroup.displayIdentifier,round:e.round,match:0,name:c.default.t("startggClient.longRoundName",{set:e.identifier,round:e.round,pool:e.phaseGroup.displayIdentifier,phase:e.phaseGroup.phase.name}),shortName:t,playType:l.PlayTypeHelper.fromSmashggSetGamesType(e.setGamesType)},teamA:m(e.slots[0]),teamB:m(e.slots[1])})}}))})),d):[]}))}},3842:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const l=n(5608),u=r(n(8604)),c=s(n(6674)),d=n(4137),m=n(406),p=s(n(8805)),f=u.get(),h=f.Replicant("runtimeConfig"),g=f.Router();g.post("/upload-tournament-json",(0,c.default)({limits:{fileSize:52428800}}),((e,t)=>i(void 0,void 0,void 0,(function*(){if(!e.files||!e.files.file||!e.body.jsonType||Array.isArray(e.files.file)||"application/json"!==e.files.file.mimetype)return t.status(400).send(p.default.t("fileImport.invalidFileOrJsonType"));const n=e.files.file,a=JSON.parse(n.data.toString());switch(e.body.jsonType){case"rounds":try{(0,m.updateRounds)((0,l.handleRoundData)(a,h.value.gameVersion))}catch(e){return f.log.error(p.default.t("fileImport.roundDataUpdateFailed.console",{message:e})),t.status(400).send(p.default.t("fileImport.roundDataUpdateFailed.response"))}break;case"teams":try{const e=yield(0,d.parseUploadedTeamData)(a,n.name);(0,d.updateTournamentDataReplicants)(e)}catch(e){return f.log.error(p.default.t("fileImport.teamDataUpdateFailed.console",{message:e})),t.status(400).send(p.default.t("fileImport.teamDataUpdateFailed.response"))}break;default:return t.status(400).send("Invalid value provided for jsonType.")}t.sendStatus(200)})))),f.mount("/ipl-overlay-controls",g)},4278:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8604)),l=n(8394),u=n(4134),c=n(5014),d=n(6337),m=s.get(),p=m.Replicant("highlightedMatches"),f=m.Replicant("tournamentData");function h(e){e.sort(((e,t)=>{const n=`${e.meta.stageName} ${e.meta.name}`,a=`${t.meta.stageName} ${t.meta.name}`;return na?1:0})),e.length>0&&(p.value=e)}m.listenFor("getHighlightedMatches",((e,t)=>i(void 0,void 0,void 0,(function*(){var n,a;switch(f.value.meta.source){case u.TournamentDataSource.BATTLEFY:if(!e.stages&&!e.getAllMatches)return t(new Error("Missing arguments."));(0,c.getBattlefyMatches)(f.value.meta.id,e.stages,e.getAllMatches).then((e=>e.length>0?(h(e),t(null,{status:l.ImportStatus.SUCCESS,data:e})):t(null,{status:l.ImportStatus.NO_DATA,data:e}))).catch((e=>{t(e)}));break;case u.TournamentDataSource.SMASHGG:{const o=null===(a=null===(n=m.bundleConfig)||void 0===n?void 0:n.smashgg)||void 0===a?void 0:a.apiKey;if(!o)return t(new Error("No Smash.gg API key found."));if(!e.streamIDs&&!e.getAllMatches)return t(new Error("Missing arguments."));(0,d.getSmashGGStreamQueue)(f.value.meta.id,o,f.value.meta.sourceSpecificData.smashgg.eventData.id,e.streamIDs,e.getAllMatches).then((e=>e.length>0?(h(e),t(null,{status:l.ImportStatus.SUCCESS,data:e})):t(null,{status:l.ImportStatus.NO_DATA,data:e}))).catch((e=>{t(e)}));break}default:t(new Error(`Invalid or unsupported source '${f.value.meta.source}' given.`))}}))))},4417:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.mapBattlefyStagesToHighlightedMatches=t.mapBattlefyStagesToTournamentData=void 0;const o=n(2276),r=a(n(9699)),i=n(5735),s=n(4137),l=a(n(8805));function u(e){var t;const n={id:e.team._id,name:e.team.name,logoUrl:null===(t=e.team.persistentTeam)||void 0===t?void 0:t.logoUrl,showLogo:!0,players:[]};for(let t=0;t({name:e.name,id:e._id,type:o.BracketTypeHelper.fromBattlefy(e.bracket.type,e.bracket.style),playType:i.PlayTypeHelper.fromBattlefySeriesStyle(e.bracket.seriesStyle)})))},t.mapBattlefyStagesToHighlightedMatches=function(e){const t=[],n=e.filter((e=>["swiss","elimination","roundrobin"].includes(e.bracket.type)));for(let e=0;e!0===e.isMarkedLive));for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PredictionDataMapper=void 0;const a=n(2748);t.PredictionDataMapper=class{static fromApiResponse(e){var t,n,a;return{id:e.id,broadcasterId:e.broadcaster_id,broadcasterName:e.broadcaster_name,broadcasterLogin:e.broadcaster_login,title:e.title,winningOutcome:null!==(t=e.winning_outcome_id)&&void 0!==t?t:void 0,outcomes:this.mapOutcomes(e.outcomes),duration:e.prediction_window,status:e.status,creationTime:e.created_at,endTime:null!==(n=e.ended_at)&&void 0!==n?n:void 0,lockTime:null!==(a=e.locked_at)&&void 0!==a?a:void 0}}static fromBeginEvent(e){return{id:e.id,broadcasterId:e.broadcaster_user_id,broadcasterName:e.broadcaster_user_name,broadcasterLogin:e.broadcaster_user_login,title:e.title,outcomes:e.outcomes.map((e=>({id:e.id,title:e.title,color:e.color.toUpperCase(),users:0,pointsUsed:0,topPredictors:[]}))),duration:this.getIsoTimeDifferenceSeconds(e.started_at,e.locks_at),status:"ACTIVE",creationTime:e.started_at,lockTime:e.locks_at}}static fromProgressEvent(e){return{id:e.id,broadcasterId:e.broadcaster_user_id,broadcasterName:e.broadcaster_user_name,broadcasterLogin:e.broadcaster_user_login,title:e.title,outcomes:this.mapOutcomes(e.outcomes),duration:this.getIsoTimeDifferenceSeconds(e.started_at,e.locks_at),status:"ACTIVE",creationTime:e.started_at,lockTime:e.locks_at}}static fromLockEvent(e){return{id:e.id,broadcasterId:e.broadcaster_user_id,broadcasterName:e.broadcaster_user_name,broadcasterLogin:e.broadcaster_user_login,title:e.title,outcomes:this.mapOutcomes(e.outcomes),duration:this.getIsoTimeDifferenceSeconds(e.started_at,e.locked_at),status:"LOCKED",creationTime:e.started_at,lockTime:e.locked_at}}static applyEndEvent(e,t){var n;return{id:e.id,broadcasterId:e.broadcaster_user_id,broadcasterName:e.broadcaster_user_name,broadcasterLogin:e.broadcaster_user_login,title:e.title,winningOutcome:e.winning_outcome_id,outcomes:this.mapOutcomes(e.outcomes),duration:t.duration,status:e.status.toUpperCase(),creationTime:e.started_at,lockTime:t.lockTime,endTime:null!==(n=e.ended_at)&&void 0!==n?n:void 0}}static mapOutcomes(e){return e.map((e=>({id:e.id,title:e.title,users:e.users,pointsUsed:e.channel_points,topPredictors:null==e.top_predictors?[]:e.top_predictors.map((e=>{var t;return{id:e.user_id,login:e.user_login,username:e.user_name,pointsUsed:e.channel_points_used,pointsWon:null!==(t=e.channel_points_won)&&void 0!==t?t:0}})),color:e.color.toUpperCase()})))}static getIsoTimeDifferenceSeconds(e,t){const n=a.DateTime.fromISO(e),o=a.DateTime.fromISO(t);return Math.round(o.diff(n).as("seconds"))}}},1910:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(2085),l=i(n(739)),u=r(n(8604)),c=i(n(9699)),d=i(n(8805)),m=u.get(),p=m.Replicant("lastFmNowPlaying"),f=m.Replicant("manualNowPlaying"),h=m.Replicant("nowPlayingSource"),g=m.Replicant("nowPlaying");!function(){const e=new s.LastFmNode({api_key:m.bundleConfig.lastfm.apiKey,secret:m.bundleConfig.lastfm.secret});let t;m.Replicant("lastFmSettings").on("change",(n=>{(0,c.default)(m.bundleConfig)||(0,c.default)(m.bundleConfig.lastfm)||(0,c.default)(m.bundleConfig.lastfm.apiKey)||(0,c.default)(m.bundleConfig.lastfm.secret)?m.log.warn(d.default.t("music.missingLastfmConfigWarning",{bundleName:m.bundleName})):(0,c.default)(n.username)||(t&&t.stop(),t=e.stream(n.username),t.on("nowPlaying",(e=>{p.value={artist:e.artist["#text"],song:e.name,album:e.album["#text"],cover:e.image[2]["#text"],artistSong:`${e.artist["#text"]} - ${e.name}`}})),t.on("error",(e=>{6===e.error&&(m.log.info(d.default.t("music.userNotFound",{username:n.username,message:e.message})),t.stop())})),t.start())}))}(),function(){const e={lastfm:p,manual:f};h.on("change",(t=>{switch(t){case"manual":case"lastfm":g.value=(0,l.default)(e[t].value);break;default:throw new Error("Invalid value for nowPlayingSource.")}}));for(const[t,n]of Object.entries(e))n.on("change",(e=>{h.value===t&&(g.value=(0,l.default)(e))}))}()},4029:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(n(8604)),u=n(6409),c=s(n(5352)),d=n(1068),m=n(2748),p=s(n(9699)),f=n(8157),h=n(9694),g=s(n(8805)),v=l.get(),b=v.Replicant("radiaSettings"),y=v.Replicant("predictionStore");let _,S,w,C=0;const O=[1e3,2500,5e3,1e4,25e3],k=5,A=2e4,D=4001;function M(e){function t(){clearTimeout(S),S=setTimeout((()=>{v.log.warn(g.default.t("predictions.socketTimeout",{count:A})),_.terminate()}),A+1e3)}clearTimeout(w),(0,p.default)(v.bundleConfig.radia.socketUrl)?v.log.warn(g.default.t("predictions.missingBundleConfigurationWarning",{bundleName:v.bundleName})):(_&&_.close(D),_=new c.default(`${v.bundleConfig.radia.socketUrl}/events/guild/${e}`,{headers:{Authorization:v.bundleConfig.radia.authentication}}),_.on("open",(()=>{v.log.info(g.default.t("predictions.socketOpen")),y.value.status.socketOpen=!0,clearTimeout(w),C=0,t()})),_.on("ping",(()=>{t()})),_.on("error",(e=>{var t;v.log.error(g.default.t("predictions.socketReceivedError",{code:null!==(t=e.code)&&void 0!==t?t:"???",message:e.message}))})),_.on("close",(t=>{y.value.status.socketOpen=!1,clearTimeout(S),t!==D&&(C{v.log.info(g.default.t("predictions.reconnectingToSocket",{count:C})),M(e)}),O[C-1])):v.log.warn(g.default.t("predictions.tooManyReconnectionAttempts")))})),_.on("message",(e=>{const t=JSON.parse(e.toString());if(t.subscription&&["channel.prediction.begin","channel.prediction.progress","channel.prediction.lock","channel.prediction.end"].includes(t.subscription.type)){if(t.timestamp){if(m.DateTime.fromISO(y.value.modificationTime)>m.DateTime.fromISO(t.timestamp))return;y.value.modificationTime=t.timestamp}switch(t.subscription.type){case"channel.prediction.begin":y.value.currentPrediction=d.PredictionDataMapper.fromBeginEvent(t.event);break;case"channel.prediction.progress":y.value.currentPrediction=d.PredictionDataMapper.fromProgressEvent(t.event);break;case"channel.prediction.lock":y.value.currentPrediction=d.PredictionDataMapper.fromLockEvent(t.event);break;case"channel.prediction.end":y.value.currentPrediction=d.PredictionDataMapper.applyEndEvent(t.event,y.value.currentPrediction)}}})))}function P(e){return i(this,void 0,void 0,(function*(){if((0,f.isBlank)(e)||(0,f.isBlank)(v.bundleConfig.radia.socketUrl))throw y.value.status.predictionsEnabled=!1,y.value.status.predictionStatusReason="missingConfiguration",y.value.status.socketOpen=!1,new Error(g.default.t("predictions.missingGuildId"));const t=yield(0,u.hasPredictionSupport)(e);if(y.value.status.predictionsEnabled=t,!t)throw y.value.status.predictionStatusReason="predictionsNotSupportedByGuild",_&&_.close(D),new Error(g.default.t("predictions.missingConfigurationError"));C=0,M(e),T((yield(0,u.getPredictions)(e))[0])}))}function T(e){y.value.currentPrediction=d.PredictionDataMapper.fromApiResponse(e)}b.on("change",((e,t)=>i(void 0,void 0,void 0,(function*(){if(e.guildID!==(null==t?void 0:t.guildID))try{yield P(e.guildID)}catch(e){v.log.warn(g.default.t("predictions.predictionDataRequestError",{message:String(e)}))}})))),v.listenFor("reconnectToRadiaSocket",((e,t)=>i(void 0,void 0,void 0,(function*(){try{yield P(b.value.guildID),t(null,null)}catch(e){return v.log.warn(g.default.t("predictions.socketReconnectionFailed",{message:e.toString()})),t(e,null)}})))),v.listenFor("getPredictions",((e,t)=>i(void 0,void 0,void 0,(function*(){try{const e=yield(0,u.getPredictions)(b.value.guildID);e.length>0?(T(e[0]),t(null,e[0])):t(null,null)}catch(e){t(e)}})))),v.listenFor("postPrediction",((e,t)=>i(void 0,void 0,void 0,(function*(){var n;const a=null===(n=y.value.currentPrediction)||void 0===n?void 0:n.status;if(a===h.PredictionStatus.ACTIVE||a===h.PredictionStatus.LOCKED)return t(new Error(g.default.t("predictions.unresolvedPredictionAlreadyExists")));try{const n=yield(0,u.createPrediction)(b.value.guildID,e);T(n),t(null,n)}catch(e){t(e)}})))),v.listenFor("patchPrediction",((e,t)=>i(void 0,void 0,void 0,(function*(){var n;if(null==(null===(n=y.value.currentPrediction)||void 0===n?void 0:n.id))return t(new Error(g.default.t("predictions.noPredictionAvailable")));const a=y.value.currentPrediction.status;switch(e.status){case"CANCELED":if(a!==h.PredictionStatus.ACTIVE&&a!==h.PredictionStatus.LOCKED)return t(new Error(g.default.t("predictions.cannotCancelPrediction")));break;case"LOCKED":if(a!==h.PredictionStatus.ACTIVE)return t(new Error(g.default.t("predictions.cannotLockPrediction")));break;case"RESOLVED":if(null==e.winning_outcome_id)return t(new Error(g.default.t("predictions.missingOutcome")));if(a!==h.PredictionStatus.LOCKED)return t(new Error(g.default.t("predictions.cannotResolvePrediction")))}try{const n=yield(0,u.updatePrediction)(b.value.guildID,Object.assign({id:y.value.currentPrediction.id},e));T(n),t(null,n)}catch(e){t(e)}}))))},6574:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8604)),l=n(6409),u=s.get(),c=u.Replicant("radiaSettings");function d(e){return i(this,void 0,void 0,(function*(){try{const t=yield(0,l.getGuildInfo)(e);c.value.enabled=!0,c.value.connectedChannel=t.twitch_channel}catch(e){c.value.enabled=!1,c.value.connectedChannel=null}}))}c.on("change",((e,t)=>{if(e.guildID!==(null==t?void 0:t.guildID))return d(e.guildID)})),u.listenFor("retryRadiaAvailabilityCheck",((e,t)=>i(void 0,void 0,void 0,(function*(){return yield d(c.value.guildID),t(null,null)}))))},5608:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeStageName=t.handleRoundData=void 0;const a=n(4615),o=n(6123),r=n(4719),i=n(6517),s=n(8275);function l(e,t){const n=Object.values(r.perGameData[t].stages[s.Locale.EN]),a=n.map(i.toLower);return e=e.toLowerCase(),a.includes(e)?n[a.indexOf(e)]:"Unknown Stage"}function u(e,t){const n=Object.values(r.perGameData[t].modes[s.Locale.EN]),a=n.map(i.toLower);return e=e.toLowerCase(),a.includes(e)?n[a.indexOf(e)]:"Unknown Mode"}t.handleRoundData=function(e,t){const n={};for(let r=0;r0}(n))throw new Error(u.default.t("roundFromMapsIplabs.invalidJsonFormat"));const a={};for(const e in n.rounds){const o=n.rounds[e],u=[];for(const e in o.games){const n=o.games[e];"counterpick"!==n?"string"!=typeof n.map?u.push({stage:null!==(t=d[n.map])&&void 0!==t?t:"Unknown Stage",mode:c(n.mode)}):u.push({stage:(0,s.normalizeStageName)(n.map,l.GameVersion.SPLATOON_3),mode:c(n.mode)}):u.push({stage:"Counterpick",mode:"Unknown Mode"})}const m="playAll"===o.playStyle?i.PlayType.PLAY_ALL:i.PlayType.BEST_OF;a[(0,r.generateId)()]={meta:{name:o.name,isCompleted:!1,type:m},games:u}}return a}(n);if(a>=1)throw new Error(u.default.t("roundFromMapsIplabs.encodingVersionTooNew"));throw new Error(u.default.t("roundFromMapsIplabs.unsupportedEncodingVersion"))};const d=["Scorch Gorge","Eeltail Alley","Hagglefish Market","Undertow Spillway","Mincemeat Metalworks","Hammerhead Bridge","Museum d'Alfonsino","Mahi-Mahi Resort","Inkblot Art Academy","Sturgeon Shipyard","MakoMart","Wahoo World","Flounder Heights","Brinewater Springs","Manta Maria","Um'ami Ruins","Humpback Pump Track","Barnacle & Dime","Crableg Capital","Shipshape Cargo Co.","Bluefin Depot","Robo ROM-en"]},406:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.updateRounds=void 0;const l=s(n(2167)),u=r(n(8604)),c=n(5608),d=n(4594),m=n(8250),p=n(3185),f=s(n(8805)),h=u.get(),g=h.Replicant("roundStore"),v=h.Replicant("runtimeConfig");function b(e){g.value=e,(0,d.setNextRoundGames)(Object.keys(e)[0])}h.listenFor("getRounds",((e,t)=>i(void 0,void 0,void 0,(function*(){if(e.url)if(e.url.includes("maps.iplabs.ink")){if(v.value.gameVersion!==m.GameVersion.SPLATOON_3)return void t(new Error(f.default.t("roundImporter.badGameVersionForMapsIplabs")));try{b((0,p.importFromMapsIplabs)(e.url)),t(null,e.url)}catch(e){t(e)}}else try{const n=yield function(e){return i(this,void 0,void 0,(function*(){return new Promise(((t,n)=>{l.default.get(e,{responseType:"json"}).then((n=>{const a=(0,c.handleRoundData)(n.data,v.value.gameVersion);t({rounds:a,url:e})})).catch((e=>{n(e)}))}))}))}(e.url);b(n.rounds),t(null,n.url)}catch(e){t(e)}else t(new Error(f.default.t("invalidArgumentsError")))})))),t.updateRounds=b},4137:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.updateRadiaTournamentData=t.parseUploadedTeamData=t.updateTournamentDataReplicants=t.teamExists=void 0;const l=n(5851),u=n(4594),c=r(n(8604)),d=n(4615),m=n(4134),p=s(n(9699)),f=n(6409),h=n(8157),g=n(5014),v=n(4417),b=n(117),y=s(n(8805)),_=c.get(),S=_.Replicant("tournamentData"),w=_.Replicant("highlightedMatches"),C=_.Replicant("radiaSettings"),O=_.Replicant("activeRound"),k=_.Replicant("nextRound");function A(e){return M(e).map((e=>(null==e.id&&(e.id=(0,d.generateId)()),null==e.showLogo&&(e.showLogo=!0),e)))}t.teamExists=function(e){return S.value.teams.some((t=>t.id===e))},t.updateTournamentDataReplicants=function(e){var t,n,a,o,r;if(e.teams.length<=0)throw new Error(y.default.t("tournamentDataHelper.noTeamsFound"));e.teams.sort(((e,t)=>{const n=e.name.toUpperCase(),a=t.name.toUpperCase();return na?1:0})),e.teams=M(e.teams),S.value.meta.id!==e.meta.id||(0,h.isBlank)(S.value.meta.shortName)||(e.meta.shortName=S.value.meta.shortName),S.value=e,w.value=[],(0,b.clearMatchesWithUnknownTeams)(e),P(null===(t=e.meta)||void 0===t?void 0:t.url,null===(n=e.meta)||void 0===n?void 0:n.name);const i=e.teams[0],s=null!==(a=e.teams[1])&&void 0!==a?a:e.teams[0],c=t=>e.teams.some((e=>e.id===t));c(O.value.teamA.id)&&c(O.value.teamB.id)||(0,l.setActiveRoundTeams)(O.value,i.id,s.id),c(k.value.teamA.id)&&c(k.value.teamB.id)||(e.teams.length<5?(0,u.setNextRoundTeams)(null!==(r=null===(o=e.teams[e.teams.length-2])||void 0===o?void 0:o.id)&&void 0!==r?r:i.id,e.teams[e.teams.length-1].id):(0,u.setNextRoundTeams)(e.teams[2].id,e.teams[3].id))},t.parseUploadedTeamData=function(e,t){return i(this,void 0,void 0,(function*(){if(Array.isArray(e)){if((0,p.default)(e))throw new Error(y.default.t("tournamentDataHelper.noTeamsFound"));return{meta:{id:t,source:m.TournamentDataSource.UPLOAD,shortName:y.default.t("tournamentDataHelper.placeholderUploadedTournamentName")},teams:A(e)}}if(e instanceof Object){if((0,p.default)(e.teams))throw new Error(y.default.t("tournamentDataHelper.noTeamsFound"));(0,p.default)(e.meta.id)&&(e.meta.id=t),(0,p.default)(e.meta.source)&&(e.meta.source=m.TournamentDataSource.UPLOAD);const n=Object.assign(Object.assign({},e),{teams:A(e.teams)});if(e.meta.source===m.TournamentDataSource.BATTLEFY&&(null==e.stages||(0,p.default)(e.meta.name)||(0,p.default)(e.meta.url)))try{const t=yield(0,g.getBattlefyTournamentInfo)(e.meta.id);null==e.stages&&(n.stages=(0,v.mapBattlefyStagesToTournamentData)(t.stages)),(0,p.default)(e.meta.name)&&(n.meta.name=t.name),(0,p.default)(e.meta.url)&&(e.meta.url=(0,g.getBattlefyTournamentUrl)(t))}catch(t){_.log.warn(y.default.t("tournamentDataHelper.battlefyDataImportFailed",{tournamentId:e.meta.id}),t)}return(0,h.isBlank)(e.meta.shortName)&&(e.meta.shortName=(0,h.isBlank)(e.meta.name)?y.default.t("tournamentDataHelper.placeholderTournamentName"):e.meta.name),n}throw new Error(y.default.t("tournamentDataHelper.tournamentDataParsingFailed"))}))};const D=512;function M(e){return e.map((e=>{var t;return Object.assign(Object.assign({},e),{name:(0,h.addDots)(e.name,D),players:null===(t=e.players)||void 0===t?void 0:t.map((e=>Object.assign(Object.assign({},e),{name:(0,h.addDots)(e.name,D)})))})}))}function P(e,t){return i(this,void 0,void 0,(function*(){if(C.value.updateOnImport&&!(0,h.isBlank)(C.value.guildID)&&!(0,h.isBlank)(e)&&!(0,h.isBlank)(t))try{yield(0,f.updateTournamentData)(C.value.guildID,e,t)}catch(e){_.log.warn(y.default.t("tournamentDataHelper.radiaTournamentDataUpdateFailed",{message:e}))}}))}t.updateRadiaTournamentData=P},52:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const l=s(n(2167)),u=r(n(8604)),c=n(4134),d=n(5014),m=n(6337),p=n(4137),f=n(2553),h=s(n(8805)),g=u.get();function v(e){return i(this,void 0,void 0,(function*(){var t,n;const a=yield(0,m.getSmashGGData)(e,null===(n=null===(t=g.bundleConfig)||void 0===t?void 0:t.smashgg)||void 0===n?void 0:n.apiKey);(0,p.updateTournamentDataReplicants)(a)}))}g.bundleConfig&&void 0!==g.bundleConfig.smashgg||g.log.warn(h.default.t("tournamentImporter.missingStartggConfigurationWarning",{bundleName:g.bundleName})),g.listenFor("getTournamentData",((e,t)=>i(void 0,void 0,void 0,(function*(){var n,a,o,r;if(e.id&&e.method)try{switch(e.method){case c.TournamentDataSource.BATTLEFY:{const n=yield(0,d.getBattlefyTournamentData)(e.id);(0,p.updateTournamentDataReplicants)(n),t(null,{id:n.meta.id});break}case c.TournamentDataSource.SMASHGG:{if(!(null===(a=null===(n=g.bundleConfig)||void 0===n?void 0:n.smashgg)||void 0===a?void 0:a.apiKey)){t(new Error(h.default.t("tournamentImporter.missingStartggApiKey")));break}const i=yield(0,m.getSmashGGEvents)(e.id,null===(r=null===(o=g.bundleConfig)||void 0===o?void 0:o.smashgg)||void 0===r?void 0:r.apiKey);return 1===i.length?(yield v(i[0].id),t(null,{id:e.id})):t(null,{id:e.id,events:i})}case c.TournamentDataSource.SENDOU_INK:{if(null==f.SendouInkClientInstance){t(new Error(h.default.t("tournamentImporter.missingSendouInkApiKey")));break}const n=yield f.SendouInkClientInstance.getTournamentData(e.id);(0,p.updateTournamentDataReplicants)(n),t(null,{id:n.meta.id});break}case c.TournamentDataSource.UPLOAD:{const n=yield function(e){return i(this,void 0,void 0,(function*(){const t=yield l.default.get(e);if(200===t.status)return(0,p.parseUploadedTeamData)(t.data,e);throw new Error(h.default.t("tournamentImporter.rawDataImportFailed",{statusCode:t.status,url:e}))}))}(e.id);(0,p.updateTournamentDataReplicants)(n),t(null,{id:n.meta.id});break}default:return t(new Error(h.default.t("invalidArgumentsError")))}}catch(e){t(e)}else t(new Error(h.default.t("invalidArgumentsError")),null)})))),g.listenFor("getSmashggEvent",((e,t)=>i(void 0,void 0,void 0,(function*(){try{return yield v(e.eventId),t(null,e.eventId)}catch(e){return t(e)}}))))},2662:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(n(8604)),u=n(4134),c=n(5014),d=n(6337),m=n(4137),p=n(2553),f=s(n(8805)),h=l.get(),g=h.Replicant("tournamentData");h.listenFor("refreshTournamentData",((e,t)=>i(void 0,void 0,void 0,(function*(){var e,n,a,o;try{const r=g.value.meta.source;switch(r){case u.TournamentDataSource.BATTLEFY:return(0,m.updateTournamentDataReplicants)(yield(0,c.getBattlefyTournamentData)(g.value.meta.id)),t(null);case u.TournamentDataSource.SMASHGG:return(null===(n=null===(e=h.bundleConfig)||void 0===e?void 0:e.smashgg)||void 0===n?void 0:n.apiKey)?((0,m.updateTournamentDataReplicants)(yield(0,d.getSmashGGData)(g.value.meta.sourceSpecificData.smashgg.eventData.id,null===(o=null===(a=h.bundleConfig)||void 0===a?void 0:a.smashgg)||void 0===o?void 0:o.apiKey)),t(null)):t(new Error(f.default.t("tournamentImporter.missingStartggApiKey")));case u.TournamentDataSource.SENDOU_INK:return null==p.SendouInkClientInstance?t(new Error(f.default.t("tournamentImporter.missingSendouInkApiKey"))):((0,m.updateTournamentDataReplicants)(yield p.SendouInkClientInstance.getTournamentData(g.value.meta.id)),t(null));default:return t(new Error(f.default.t("tournamentRefresh.unsupportedSource",{source:r})))}}catch(e){t(e)}}))))},5480:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const s=r(n(8604)),l=i(n(9699)),u=n(6908),c=n(2326),d=i(n(8805)),m=n(6197);function p(e,t){try{return n(7597)(`./${e.toLowerCase()}/${t}.json`)}catch(e){return null}}function f(){const e={};for(const t of Object.values(m.InterfaceLocale))e[t.toLowerCase()]={common:p(t,"common"),translation:p(t,"server")};return e}e.exports=e=>{!function(e){d.default.init({lng:"en",fallbackLng:"en",resources:f(),interpolation:{escapeValue:!1}}),e.Replicant("runtimeConfig").on("change",((t,n)=>{n&&t.interfaceLocale===n.interfaceLocale||d.default.changeLanguage(t.interfaceLocale.toLowerCase()).catch((t=>{e.log.error("Failed to change interface language",t)}))}))}(e),s.set(e),n(1910),n(52),n(2662),n(406),n(3842),n(4278),n(7295),n(1018),n(22),n(3582),n(3261),n(117),n(2584),n(4643),n(7348);const{AutomationActionService:t}=n(9811),{AutomationActionController:a}=n(761),{ReplicantFixerService:o}=n(2330),{LocaleInfoService:r}=n(3567),{RuntimeConfigController:i}=n(3990),{ScreenshotParserService:m}=n(8936),{ObsConnectorController:p}=n(4),h=new m(e),g=new u.ObsConnectorService(e);new p(e,g,h);const v=new t(e,g);v.resetGameAutomationData(),new a(e,v),new o(e).fix();const b=e.Replicant("radiaSettings"),y=e.Replicant("predictionStore");y.value.status.socketOpen=!1,b.value.enabled=!1;const _=e.Replicant("runtimeConfig"),S=new c.AssetPathService(e);S.updateAssetPaths(_.value.gameVersion);const w=new r(e);if(w.initIfNeeded(),new i(e,w,S),(0,l.default)(e.bundleConfig)||(0,l.default)(e.bundleConfig.radia))e.log.warn(d.default.t("missingRadiaConfigurationWarning",{bundleName:e.bundleName})),y.value.status.predictionsEnabled=!1,y.value.status.predictionStatusReason="missingConfiguration";else{n(6574),n(4029);const{CasterImportController:t}=n(4065),{RadiaProductionsService:a}=n(5758),{RadiaProductionsClient:o}=n(5295);new t(e,new a(e,new o(e.bundleConfig.radia.url,e.bundleConfig.radia.authentication)))}}},7295:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.switchToPreviousColor=t.switchToNextColor=void 0;const s=r(n(8604)),l=n(9383),u=i(n(739)),c=n(117),d=n(5851),m=i(n(5359)),p=n(4615),f=n(8157),h=i(n(9591)),g=n(702),v=s.get(),b=v.Replicant("activeRound"),y=v.Replicant("nextRound");function _(){if(b.value.activeColor.isCustom)return;const e=(0,g.getNextColor)();(0,g.setActiveColor)({color:e,categoryName:e.categoryName,categoryKey:e.categoryKey})}function S(){if(b.value.activeColor.isCustom)return;const e=(0,g.getPreviousColor)();(0,g.setActiveColor)({color:e,categoryName:e.categoryName,categoryKey:e.categoryKey})}v.Replicant("swapColorsInternally").on("change",((e,t)=>{if(void 0!==t){const e=b.value.teamA.color;b.value.teamA.color=b.value.teamB.color,b.value.teamB.color=e}})),v.listenFor("removeWinner",((e,t)=>{try{const e=(0,m.default)(b.value.games,(e=>e.winner!==l.GameWinner.NO_WINNER));if(e<0)return;(0,d.setWinner)(e,l.GameWinner.NO_WINNER)}catch(e){t(e)}})),v.listenFor("setWinner",((e,t)=>{const n=b.value.teamA.score+b.value.teamB.score,a=null!=e.roundIndex?e.roundIndex:n;0===a&&e.winner!==l.GameWinner.NO_WINNER&&(y.value.showOnStream=!1);try{(0,d.setWinner)(a,e.winner)}catch(e){t(e)}})),v.listenFor("setActiveRound",((e,t)=>{try{const t=(0,h.default)(b.value);(0,d.setActiveRoundTeams)(t,e.teamAId,e.teamBId),e.matchId&&(0,d.setActiveRoundGames)(t,e.matchId),(0,f.isBlank)(e.matchName)||b.value.match.name===e.matchName||(b.value.match.name=e.matchName,t.match.name=e.matchName),b.value=t}catch(e){return t(e)}(0,c.commitActiveRoundToMatchStore)()})),v.listenFor("resetActiveRound",(()=>{b.value.teamA.score=0,b.value.teamB.score=0,b.value.games=b.value.games.map((e=>Object.assign(Object.assign({},e),{winner:l.GameWinner.NO_WINNER,color:void 0}))),(0,c.commitActiveRoundToMatchStore)()})),v.listenFor("updateActiveGames",(e=>{b.value.games=(0,u.default)(e.games),(0,c.commitActiveRoundToMatchStore)()})),v.listenFor("beginNextMatch",(e=>{const t=(0,f.isBlank)(null==e?void 0:e.matchName)?y.value.name:e.matchName;b.value=Object.assign(Object.assign({},b.value),{teamA:Object.assign(Object.assign({color:b.value.teamA.color},(0,u.default)(y.value.teamA)),{score:0}),teamB:Object.assign(Object.assign({color:b.value.teamB.color},(0,u.default)(y.value.teamB)),{score:0}),games:y.value.games.map((e=>Object.assign(Object.assign({},e),{winner:l.GameWinner.NO_WINNER,color:void 0}))),match:{id:(0,p.generateId)(),name:t,isCompleted:!1,type:y.value.round.type}}),(0,c.commitActiveRoundToMatchStore)()})),v.listenFor("setActiveColor",(e=>{(0,g.setActiveColor)(e)})),t.switchToNextColor=_,t.switchToPreviousColor=S,v.listenFor("switchToNextColor",(()=>{_()})),v.listenFor("switchToPreviousColor",(()=>{S()})),v.listenFor("getNextAndPreviousColors",((e,t)=>{t(null,{nextColor:(0,g.getNextColor)(),previousColor:(0,g.getPreviousColor)()})})),v.listenFor("swapRoundColor",(e=>{var t;const n=null===(t=b.value.games[e.roundIndex])||void 0===t?void 0:t.color;n&&n.colorsSwapped!==e.colorsSwapped&&(b.value.games[e.roundIndex].color=Object.assign(Object.assign({},n),{clrA:n.clrB,clrB:n.clrA,colorsSwapped:!n.colorsSwapped}))}))},3582:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8604)),l=n(4615),u=i(n(8805)),c=s.get(),d=c.Replicant("casters");c.listenFor("removeCaster",((e,t)=>{if(!d.value[e.id])return t(new Error(u.default.t("casters.casterNotFound",{id:e.id})));delete d.value[e.id]})),c.listenFor("saveCaster",((e,t)=>{const n=(0,l.generateId)();d.value[n]=e,t(null,n)})),c.listenFor("setCasterOrder",((e,t)=>Array.isArray(e.casterIds)?e.casterIds.every((e=>!!d.value[e]))&&e.casterIds.length===Object.keys(d.value).length?(d.value=e.casterIds.reduce(((e,t)=>(e[t]=d.value[t],e)),{}),void t(null)):t(new Error(u.default.t("casters.badCasterIdListForReordering"))):t(new Error(u.default.t("invalidArgumentsError")))))},3261:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(8604)),s=n(2748),l=i.get(),u=l.Router(),c=l.Replicant("matchStore");u.get("/match-data",((e,t)=>{t.set({"Content-Disposition":`attachment; filename="iploc-match-data_${s.DateTime.now().setZone("utc").toFormat("yyyy-LL-dd'T'T")}.json"`}),t.send(JSON.stringify(Object.values(c.value),null,4))})),l.mount(`/${l.bundleName}`,u)},117:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.commitActiveRoundToMatchStore=t.clearMatchesWithUnknownTeams=void 0;const s=r(n(8604)),l=i(n(739)),u=n(2748),c=i(n(9591)),d=i(n(9699)),m=n(2099),p=s.get(),f=p.Replicant("matchStore"),h=p.Replicant("activeRound");t.clearMatchesWithUnknownTeams=function(e){const t=e.teams.map((e=>e.id)),n=(0,c.default)(f.value);Object.entries(n).forEach((([e,a])=>{(0,d.default)(a.teamA)&&(0,d.default)(a.teamB)||t.includes(a.teamA.id)&&t.includes(a.teamB.id)||delete n[e]})),Object.keys(n).length<=0?(0,m.resetMatchStore)():(f.value=n,n[h.value.match.id]||(0,m.setActiveRoundToFirstMatch)())},t.commitActiveRoundToMatchStore=function(){const e=(0,l.default)(h.value),t=e.match.isCompleted?u.DateTime.utc().toISO():void 0;f.value[e.match.id]={meta:{name:e.match.name,isCompleted:e.match.isCompleted,completionTime:t,type:e.match.type},teamA:e.teamA,teamB:e.teamB,games:e.games.map((e=>({stage:e.stage,mode:e.mode,winner:e.winner,color:e.color})))}}},1018:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(8604)),s=n(4594),l=i.get(),u=l.Replicant("nextRound");l.listenFor("setNextRound",((e,t)=>{try{(0,s.setNextRoundTeams)(e.teamAId,e.teamBId),e.roundId&&(0,s.setNextRoundGames)(e.roundId),u.value.name=e.name}catch(e){return t(e)}return t(null)}))},2584:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8604)),l=n(4594),u=n(4615),c=n(4647),d=i(n(8805)),m=s.get(),p=m.Replicant("roundStore"),f=m.Replicant("nextRound");m.listenFor("updateRound",((e,t)=>{if(!e.id)return t(new Error(d.default.t("invalidArgumentsError")));if(!p.value[e.id])return t(new Error(d.default.t("roundStore.roundNotFound",{id:e.id})));const n=p.value[e.id];e.games&&(n.games=e.games),e.roundName&&(n.meta.name=e.roundName),e.type&&(n.meta.type=e.type),f.value.round.id===e.id&&(0,l.setNextRoundGames)(e.id),t(null)})),m.listenFor("insertRound",((e,t)=>{var n;if(e.id&&p.value[e.id])return t(new Error(d.default.t("roundStore.roundAlreadyExists",{id:e.id})));const a=null!==(n=e.id)&&void 0!==n?n:(0,u.generateId)();return p.value[a]={games:e.games,meta:{name:e.roundName,isCompleted:!1,type:e.type}},t(null,{id:a,round:{games:e.games,meta:{name:e.roundName,type:e.type}}})})),m.listenFor("removeRound",((e,t)=>{if(Object.keys(p.value).length<=1)return t(new Error(d.default.t("roundStore.cannotDeleteLastRound")));if(!p.value[e.roundId])return t(new Error(d.default.t("roundStore.roundNotFound",{id:e.roundId})));delete p.value[e.roundId];try{const t=Object.keys(p.value)[0];f.value.round.id===e.roundId&&(0,l.setNextRoundGames)(t)}catch(e){return t(e)}})),m.listenFor("resetRoundStore",(()=>{(0,c.resetRoundStore)()}))},4643:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.setFlavorText=void 0;const i=r(n(8604)).get(),s=i.Replicant("scoreboardData"),l=i.Replicant("activeRound"),u=i.Replicant("tournamentData");function c(e,t){s.value.flavorText=`${e} - ${t}`}l.on("change",((e,t)=>{e.match.name!==(null==t?void 0:t.match.name)&&c(u.value.meta.shortName,e.match.name)})),u.on("change",((e,t)=>{t&&e.meta.shortName!==t.meta.shortName&&c(e.meta.shortName,l.value.match.name)})),t.setFlavorText=c},22:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(5780),l=r(n(8604)),u=i(n(8805)),c=l.get(),d=c.Replicant("tournamentData"),m=c.Replicant("activeRound"),p=c.Replicant("nextRound");function f(e){const t=(0,s.getTeam)(e.id,d.value);return Object.assign(Object.assign({},e),t)}c.listenFor("toggleTeamImage",((e,t)=>{const n=d.value.teams.filter((t=>t.id===e.teamId))[0];if(null==n)return t(new Error(u.default.t("tournamentData.teamNotFound")));n.showLogo=e.isVisible,m.value.teamA=f(m.value.teamA),m.value.teamB=f(m.value.teamB),p.value.teamA=f(p.value.teamA),p.value.teamB=f(p.value.teamB)}))},2326:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AssetPathService=void 0;const a=n(4719);t.AssetPathService=class{constructor(e){this.nodecg=e,this.assetPaths=e.Replicant("assetPaths")}updateAssetPaths(e){const t=a.perGameData[e];this.assetPaths.value.stageImages=Object.fromEntries(Object.entries(t.stageImagePaths).map((([e,t])=>[e,`/bundles/${this.nodecg.bundleName}/stage-images/${t}`])))}}},9811:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AutomationActionService=void 0;const l=n(8250),u=n(4365),c=n(7295),d=r(n(3837)),m=s(n(8805)),p={[l.GameVersion.SPLATOON_2]:{showScoreboard:11500,showCasters:12e3},[l.GameVersion.SPLATOON_3]:{showScoreboard:14e3,showCasters:1e4}},f={[l.GameVersion.SPLATOON_2]:{hideScoreboard:3e3,changeScene:7500},[l.GameVersion.SPLATOON_3]:{hideScoreboard:3e3,changeScene:7500}};t.AutomationActionService=class{constructor(e,t){this.nodecg=e,this.scoreboardData=e.Replicant("scoreboardData"),this.runtimeConfig=e.Replicant("runtimeConfig"),this.gameAutomationData=e.Replicant("gameAutomationData"),this.obsConnectorService=t,this.automationTasks=null}getAutomationTasks(e){const t=this.runtimeConfig.value.gameVersion;switch(e){case u.GameAutomationAction.START_GAME:return[{timeout:1e3,name:"changeScene",action:()=>i(this,void 0,void 0,(function*(){(0,c.switchToNextColor)();const e=this.obsConnectorService.findCurrentConfig();null!=(null==e?void 0:e.gameplayScene)&&(yield this.obsConnectorService.setCurrentScene(e.gameplayScene))}))},{timeout:p[t].showScoreboard,name:"showScoreboard",action:()=>{this.scoreboardData.value.isVisible=!0}},{timeout:p[t].showCasters,name:"showCasters",action:()=>{this.nodecg.sendMessage("mainShowCasters")}}];case u.GameAutomationAction.END_GAME:return[{timeout:f[t].hideScoreboard,name:"hideScoreboard",action:()=>{this.scoreboardData.value.isVisible=!1}},{timeout:f[t].changeScene,name:"changeScene",action:()=>i(this,void 0,void 0,(function*(){const e=this.obsConnectorService.findCurrentConfig();null!=(null==e?void 0:e.intermissionScene)&&(yield this.obsConnectorService.setCurrentScene(e.intermissionScene))}))}];default:throw new Error(m.default.t("automationActions.unknownTask",{name:e}))}}startAutomationAction(e){if(this.gameAutomationData.value.actionInProgress!==u.GameAutomationAction.NONE)throw new Error(m.default.t("automationActions.actionAlreadyOngoing"));this.gameAutomationData.value.actionInProgress=e,this.automationTasks=this.getAutomationTasks(e),this.queueNextAutomationTask().catch((e=>{this.nodecg.log.error(m.default.t("automationActions.taskStartFailed"),e)}))}queueNextAutomationTask(){return i(this,void 0,void 0,(function*(){var e,t;let n=(null!==(t=null===(e=this.gameAutomationData.value.nextTaskForAction)||void 0===e?void 0:e.index)&&void 0!==t?t:-1)+1,a=this.automationTasks[n];for(;0===(null==a?void 0:a.timeout);)yield this.executeAutomationTask(a),n++,a=this.automationTasks[n];a?(this.gameAutomationData.value.nextTaskForAction={index:n,name:a.name,executionTimeMillis:(new Date).getTime()+a.timeout},this.nextAutomationTaskTimeout=setTimeout((()=>i(this,void 0,void 0,(function*(){yield this.completeTimedAutomationTask(a)}))),a.timeout)):this.resetGameAutomationData()}))}completeTimedAutomationTask(e){return i(this,void 0,void 0,(function*(){clearTimeout(this.nextAutomationTaskTimeout),yield this.executeAutomationTask(e),yield this.queueNextAutomationTask()}))}executeAutomationTask(e){return i(this,void 0,void 0,(function*(){try{const t=e.action();d.types.isPromise(t)&&(yield t)}catch(e){this.nodecg.log.error(m.default.t("automationActions.errorInTask"),e)}}))}fastForwardToNextAutomationTask(){return i(this,void 0,void 0,(function*(){if(this.gameAutomationData.value.actionInProgress===u.GameAutomationAction.NONE)throw new Error(m.default.t("automationActions.noActionOngoing"));yield this.completeTimedAutomationTask(this.automationTasks[this.gameAutomationData.value.nextTaskForAction.index])}))}cancelAutomationAction(){if(this.gameAutomationData.value.actionInProgress===u.GameAutomationAction.NONE)throw new Error(m.default.t("automationActions.noActionOngoing"));clearTimeout(this.nextAutomationTaskTimeout),this.resetGameAutomationData()}resetGameAutomationData(){this.gameAutomationData.value.actionInProgress=u.GameAutomationAction.NONE,this.gameAutomationData.value.nextTaskForAction=null,this.automationTasks=null}}},3567:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocaleInfoService=void 0;const a=n(4719);t.LocaleInfoService=class{constructor(e){this.localeInfo=e.Replicant("localeInfo"),this.runtimeConfig=e.Replicant("runtimeConfig")}initIfNeeded(){Object.keys(this.localeInfo.value.modes).length<=0&&Object.keys(this.localeInfo.value.stages).length<=0&&this.updateLocaleInfo(this.runtimeConfig.value.locale,this.runtimeConfig.value.gameVersion)}updateLocaleInfo(e,t){const n=a.perGameData[t];this.localeInfo.value={stages:n.stages[e],modes:n.modes[e]}}}},6908:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ObsConnectorService=void 0;const r=o(n(3848)),i=n(5279),s=n(8157),l=o(n(8805)),u=o(n(7441)),c=[4009,4010,4011],d=["webp","jpg","jpeg","png","tiff"],m=["sck_audio_capture","coreaudio_input_capture","coreaudio_output_capture","oss_input_capture","pulse_input_capture","pulse_output_capture","alsa_input_capture","jack_output_capture","audio_line","sndio_output_capture"];t.ObsConnectorService=class{constructor(e){this.nodecg=e,this.obsState=e.Replicant("obsState"),this.obsCredentials=e.Replicant("obsCredentials"),this.obsConfig=e.Replicant("obsConfig"),this.socket=new r.default,this.reconnectionCount=0,this.screenshotImageFormat=null,this.socket.on("ConnectionClosed",(e=>this.handleClosure(e))).on("ConnectionOpened",(()=>this.handleOpening())).on("Identified",(()=>{this.handleIdentification().catch((e=>{this.nodecg.log.error(l.default.t("obs.errorAfterSocketOpen"),e)}))})).on("CurrentProgramSceneChanged",(e=>this.handleProgramSceneChange(e))).on("CurrentSceneCollectionChanged",this.handleSceneCollectionChange.bind(this)),this.obsState.value.enabled&&this.connect().catch((t=>{e.log.error(l.default.t("obs.errorWhileConnecting"),t.toString())}))}updateConfig(e){const t=this.obsConfig.value.findIndex((t=>t.sceneCollection===e.sceneCollection));-1===t?this.obsConfig.value.push(e):this.obsConfig.value[t]=e}handleClosure(e){this.obsState.value.status===i.ObsStatus.CONNECTED&&(1e3!==e.code&&this.nodecg.log.error(l.default.t("obs.socketClosed",{message:e.message})),this.obsState.value.status=i.ObsStatus.NOT_CONNECTED,this.obsState.value.enabled&&this.startReconnecting(e.code)),this.socket.off("SceneCreated").off("SceneRemoved").off("SceneNameChanged").off("InputCreated").off("InputRemoved").off("InputNameChanged")}handleIdentification(){return a(this,void 0,void 0,(function*(){yield this.loadScreenshotImageFormat();const e=yield this.socket.call("GetSceneCollectionList");yield this.loadState(e.currentSceneCollectionName),this.socket.on("SceneCreated",this.handleSceneCreation.bind(this)).on("SceneRemoved",this.handleSceneRemoval.bind(this)).on("SceneNameChanged",this.handleSceneNameChange.bind(this)).on("InputCreated",this.handleInputCreation.bind(this)).on("InputRemoved",this.handleInputRemoval.bind(this)).on("InputNameChanged",this.handleInputNameChange.bind(this))}))}handleSceneCollectionChange(e){this.loadState(e.sceneCollectionName).catch((e=>{this.nodecg.log.error(l.default.t("obs.errorAfterSceneCollectionChange"),e)}))}loadState(e){return a(this,void 0,void 0,(function*(){const t=yield this.getScenes(),n=yield this.getInputs();this.obsState.value=Object.assign(Object.assign({},this.obsState.value),{scenes:t.scenes,currentScene:t.currentScene,currentSceneCollection:e,inputs:n})}))}handleOpening(){this.nodecg.log.info(l.default.t("obs.socketOpen")),this.obsState.value.status=i.ObsStatus.CONNECTED,this.stopReconnecting()}loadScreenshotImageFormat(){return a(this,void 0,void 0,(function*(){const e=yield this.socket.call("GetVersion");for(const t of d)if(e.supportedImageFormats.includes(t))return void(this.screenshotImageFormat=t);this.screenshotImageFormat=null}))}handleInputCreation(e){null==this.obsState.value.inputs?this.obsState.value.inputs=[{name:e.inputName,uuid:e.inputUuid,noVideoOutput:m.includes(e.inputKind)}]:this.obsState.value.inputs.push({name:e.inputName,uuid:e.inputUuid,noVideoOutput:m.includes(e.inputKind)})}handleInputRemoval(e){null!=this.obsState.value.inputs&&(this.obsState.value.inputs=this.obsState.value.inputs.filter((t=>t.name!==e.inputName)))}handleInputNameChange(e){null!=this.obsState.value.inputs&&(this.obsState.value.inputs=this.obsState.value.inputs.map((t=>t.name===e.oldInputName?Object.assign(Object.assign({},t),{name:e.inputName}):t)));const t=this.findCurrentConfig();e.oldInputName===(null==t?void 0:t.gameplayInput)&&this.updateConfig(Object.assign(Object.assign({},t),{gameplayInput:e.inputName}))}getInputs(){return a(this,void 0,void 0,(function*(){return(yield this.socket.call("GetInputList")).inputs.map((e=>({name:String(e.inputName),uuid:null==e.inputUuid?null:String(e.inputUuid),noVideoOutput:m.includes(String(e.inputKind))})))}))}handleSceneCreation(e){e.isGroup||(null==this.obsState.value.scenes?this.obsState.value.scenes=[e.sceneName]:this.obsState.value.scenes.push(e.sceneName))}handleSceneRemoval(e){e.isGroup||null==this.obsState.value.scenes||(this.obsState.value.scenes=this.obsState.value.scenes.filter((t=>t!==e.sceneName)))}handleSceneNameChange(e){null!=this.obsState.value.scenes&&(this.obsState.value.scenes=this.obsState.value.scenes.map((t=>t===e.oldSceneName?e.sceneName:t)));const t=this.findCurrentConfig();if(null!=t){const n={};for(const a of["gameplayScene","intermissionScene"])t[a]===e.oldSceneName&&(n[a]=e.sceneName);Object.keys(n).length>0&&this.updateConfig(Object.assign(Object.assign({},t),n))}}handleProgramSceneChange(e){this.obsState.value.currentScene=e.sceneName}getScenes(){return a(this,void 0,void 0,(function*(){const e=yield this.socket.call("GetSceneList"),t=e.scenes.map((e=>String(e.sceneName)));return{currentScene:e.currentProgramSceneName,scenes:t}}))}setCurrentScene(e){return this.socket.call("SetCurrentProgramScene",{sceneName:e})}connect(){return a(this,arguments,void 0,(function*(e=!0){var t;yield this.socket.disconnect(),this.obsState.value.status=i.ObsStatus.CONNECTING;const n=-1===this.obsCredentials.value.address.indexOf("://")?`ws://${this.obsCredentials.value.address}`:this.obsCredentials.value.address;try{yield this.socket.connect(n,(0,s.isBlank)(this.obsCredentials.value.password)?void 0:this.obsCredentials.value.password)}catch(n){throw this.obsState.value.status=i.ObsStatus.NOT_CONNECTED,e&&this.startReconnecting(n.code),new Error(l.default.t("obs.obsConnectionFailed",{message:null!==(t=n.message)&&void 0!==t?t:String(n)}))}}))}disconnect(){return a(this,void 0,void 0,(function*(){this.stopReconnecting(),yield this.socket.disconnect()}))}startReconnecting(e){c.includes(e)||(this.stopReconnecting(),this.reconnectionInterval=setInterval((()=>{this.reconnectionCount++,1===this.reconnectionCount&&this.nodecg.log.info(l.default.t("obs.reconnectingToSocket")),this.connect(!1).catch((()=>{}))}),1e4))}stopReconnecting(){clearInterval(this.reconnectionInterval),this.reconnectionInterval=null,this.reconnectionCount=0}getSourceScreenshot(e){return a(this,void 0,void 0,(function*(){if(this.obsState.value.status!==i.ObsStatus.CONNECTED)throw new Error(l.default.t("obs.socketNotOpen"));if(null==this.screenshotImageFormat)throw new Error(l.default.t("obs.missingScreenshotImageFormat"));const t=yield this.socket.call("GetSourceScreenshot",{sourceName:e,imageFormat:this.screenshotImageFormat}),n=t.imageData.substring(t.imageData.indexOf(",")+1),a=Buffer.from(n,"base64");return(0,u.default)(a)}))}findConfig(e){if(null!=e)return this.obsConfig.value.find((t=>t.sceneCollection===e))}findCurrentConfig(){return this.findConfig(this.obsState.value.currentSceneCollection)}}},5758:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RadiaProductionsService=void 0;const r=o(n(8805));t.RadiaProductionsService=class{constructor(e,t){this.radiaProductionsClient=t,this.radiaSettings=e.Replicant("radiaSettings"),this.casters=e.Replicant("casters")}getLiveCommentators(){return a(this,void 0,void 0,(function*(){const e=yield this.radiaProductionsClient.getLiveCasters(this.radiaSettings.value.guildID);if(e.length<=0)throw new Error(r.default.t("casterImport.noCommentatorsReceived"));const t=e.map(this.normalizeCaster),n=this.mapRadiaCastersToReplicantSchema(t.slice(0,3)),a=this.mapRadiaCastersToReplicantSchema(t.slice(3));return this.casters.value=n,{add:n,extra:a}}))}searchCommentators(e){return a(this,void 0,void 0,(function*(){const t=(yield this.radiaProductionsClient.searchCasters(e)).map(this.normalizeCaster);return this.mapRadiaCastersToReplicantSchema(t)}))}pushCastersToRadia(){return a(this,void 0,void 0,(function*(){yield this.radiaProductionsClient.setCasters(this.radiaSettings.value.guildID,this.mapCastersToRadiaApi(this.casters.value))}))}normalizeCaster(e){return e.twitter=`@${e.twitter}`,e.pronouns=e.pronouns.toLowerCase(),e}mapRadiaCastersToReplicantSchema(e){return e.reduce(((e,t)=>{const n=t.discord_user_id;return delete t.discord_user_id,e[n]=t,e}),{})}mapCastersToRadiaApi(e){return Object.entries(e).map((([e,t])=>({discord_user_id:e,name:t.name,pronouns:t.pronouns,twitter:t.twitter})))}}},2330:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReplicantFixerService=void 0;const o=n(4719),r=a(n(8805));t.ReplicantFixerService=class{constructor(e){this.nodecg=e,this.activeRound=e.Replicant("activeRound"),this.runtimeConfig=e.Replicant("runtimeConfig"),this.swapColorsInternally=e.Replicant("swapColorsInternally")}fix(){const e=o.perGameData[this.runtimeConfig.value.gameVersion].colors;if(null==e.find((e=>e.meta.name===this.activeRound.value.activeColor.categoryName))){this.nodecg.log.info(r.default.t("replicantFixer.resettingActiveColors"));const t=e[0].colors[0];this.activeRound.value.activeColor={categoryName:e[0].meta.name,categoryKey:e[0].meta.key,clrNeutral:t.clrNeutral,index:t.index,title:t.title,isCustom:t.isCustom,colorKey:t.key},this.activeRound.value.teamA.color=this.swapColorsInternally.value?t.clrB:t.clrA,this.activeRound.value.teamB.color=this.swapColorsInternally.value?t.clrA:t.clrB}}}},8936:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ScreenshotParserService=void 0;const r=o(n(7441)),i=o(n(1611)),s=o(n(3993)),l=n(8250),u=o(n(8805)),c=n(4719),d=o(n(9591));t.ScreenshotParserService=class{constructor(e){var t,n;this.nodecg=e,this.runtimeConfig=e.Replicant("runtimeConfig"),this.saveBadScreenshotsToDisk=null!==(n=null===(t=e.bundleConfig.screenshotParser)||void 0===t?void 0:t.saveBadScreenshotsToDisk)&&void 0!==n&&n}sampleTeamColors(e){return a(this,void 0,void 0,(function*(){if(this.runtimeConfig.value.gameVersion!==l.GameVersion.SPLATOON_3)throw new Error(u.default.t("screenshotParser.badGameVersion",{gameVersion:this.runtimeConfig.value.gameVersion}));e.resize({width:1920,height:1080});try{return this.findClosestTeamColor([yield this.samplePoints(e,[{top:29,left:567},{top:29,left:655},{top:29,left:744},{top:29,left:833},{top:104,left:544},{top:104,left:632},{top:104,left:720},{top:104,left:809}]),yield this.samplePoints(e,[{top:29,left:1084},{top:29,left:1172},{top:29,left:1261},{top:29,left:1349},{top:104,left:1060},{top:104,left:1148},{top:104,left:1236},{top:104,left:1324}])])}catch(t){throw this.saveBadScreenshotsToDisk&&(yield this.writeToDisk(e)),t}}))}findClosestTeamColor(e){const t=(0,d.default)(c.perGameData[this.runtimeConfig.value.gameVersion].colors).flatMap((e=>e.colors.map((t=>Object.assign(Object.assign({},t),{categoryName:e.meta.name,categoryKey:e.meta.key}))))).filter((e=>!e.isCustom)).map((t=>{var n,a;const o=new i.default(null!==(n=t.referenceClrA)&&void 0!==n?n:t.clrA).deltaE2000(e[0]);if(o>10)return null;const r=new i.default(null!==(a=t.referenceClrB)&&void 0!==a?a:t.clrB).deltaE2000(e[1]);return r>10?null:Object.assign(Object.assign({},t),{clrADelta:o,clrBDelta:r})})).filter(Boolean);if(0===t.length)throw new Error(u.default.t("screenshotParser.noMatchingColors"));t.sort(((e,t)=>(e.clrADelta+e.clrBDelta)/2-(t.clrADelta+t.clrBDelta)/2));const n=t[0];return{index:n.index,title:n.title,key:n.key,clrA:n.clrA,clrB:n.clrB,referenceClrA:n.referenceClrA,referenceClrB:n.referenceClrB,clrNeutral:n.clrNeutral,isCustom:n.isCustom,categoryKey:n.categoryKey,categoryName:n.categoryName}}samplePoints(e,t){return a(this,void 0,void 0,(function*(){const n=yield Promise.all(t.map((t=>this.samplePoint(e,t.left,t.top)))),a=n.filter((e=>{const t=n.map((t=>e.deltaE2000(t)));return(0,s.default)(t)<15}));if(0===a.length)throw new Error(u.default.t("screenshotParser.badColorSamples"));return this.mixMultiple(a)}))}mixMultiple(e){if(0===e.length)return new i.default("srgb",[NaN,NaN,NaN],0);let t=e[0];for(let n=1;n{u.default.satisfies(s.version,e.compatibleDashboardVersion)||m.log.warn(d.default.t("versionChecker.incompatibleBundleWarning",{otherBundle:e.name,compatibleVersion:e.compatibleDashboardVersion,thisBundle:m.bundleName,installedVersion:s.version}));const t=p.value.gameVersion;e.compatibleGameVersions.includes(t)||m.log.warn(d.default.t("versionChecker.incompatibleGameVersionWarning",{bundleName:e.name,gameVersion:t}))}))},307:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.cartesian=t.prettyPrintList=t.randomFromArray=void 0;const o=a(n(5526));t.randomFromArray=function(e){return e&&e.length?e[(0,o.default)(0,e.length-1)]:null},t.prettyPrintList=function(e){return e.reduce(((t,n,a)=>(t+=n,a===e.length-2?t+=" and ":a!==e.length-1&&(t+=", "),t)),"")},t.cartesian=function(e,t){return[].concat(...e.map((e=>t.map((t=>[].concat(e,t))))))}},6983:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.swapColors=void 0,t.swapColors=function(e){return Object.assign(Object.assign({},e),{clrA:e.clrB,clrB:e.clrA})}},5735:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayTypeHelper=void 0;const a=n(6123);t.PlayTypeHelper=class{static fromBattlefySeriesStyle(e){switch(null==e?void 0:e.toLowerCase()){case"gamespermatch":return a.PlayType.PLAY_ALL;case"bestof":return a.PlayType.BEST_OF;default:return}}static fromSmashggSetGamesType(e){switch(e){case 1:return a.PlayType.BEST_OF;case 2:return a.PlayType.PLAY_ALL;default:return}}}},4719:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.perGameData=void 0;const a=n(8250),o=n(3716),r=n(8954);t.perGameData={[a.GameVersion.SPLATOON_2]:o.splatoon2Data,[a.GameVersion.SPLATOON_3]:r.splatoon3Data}},9117:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeGameData=void 0;const o=a(n(9591)),r=n(8275),i={[r.Locale.EN]:{"Unknown Stage":"Unknown Stage",Counterpick:"Counterpick"},[r.Locale.DE]:{"Unknown Stage":"Unbekannte Arena",Counterpick:"Counterpick"},[r.Locale.EU_FR]:{"Unknown Stage":"Stage à déterminer",Counterpick:"Counterpick"},[r.Locale.JA]:{"Unknown Stage":"ステージ未選択",Counterpick:"カウンターピック"}},s={[r.Locale.EN]:{"Unknown Mode":"Unknown Mode"},[r.Locale.DE]:{"Unknown Mode":"Unbekannte Kampfart"},[r.Locale.EU_FR]:{"Unknown Mode":"Mode à déterminer"},[r.Locale.JA]:{"Unknown Mode":"ルール未選択"}};t.normalizeGameData=function(e){const t=(0,o.default)(e);return Object.assign(Object.assign({},t),{stages:Object.entries(t.stages).reduce(((e,[t,n])=>(e[t]=Object.assign(Object.assign({},n),i[t]),e)),{}),modes:Object.entries(t.modes).reduce(((e,[t,n])=>(e[t]=Object.assign(Object.assign({},n),s[t]),e)),{}),colors:[...t.colors.map((e=>Object.assign(Object.assign({},e),{colors:e.colors.map((e=>Object.assign(Object.assign({},e),{isCustom:!1})))}))),{meta:{name:"Custom Color",key:"customColor"},colors:[{index:0,title:"Custom Color",key:"customColor",clrA:"#000000",clrB:"#FFFFFF",clrNeutral:"#818181",isCustom:!0}]}]})}},3716:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splatoon2Data=t.Splatoon2Modes=t.Splatoon2Stages=void 0;const a=n(9117),o=n(8275);t.Splatoon2Stages=["Ancho-V Games","Arowana Mall","Blackbelly Skatepark","Camp Triggerfish","Goby Arena","Humpback Pump Track","Inkblot Art Academy","Kelp Dome","MakoMart","Manta Maria","Moray Towers","Musselforge Fitness","New Albacore Hotel","Piranha Pit","Port Mackerel","Shellendorf Institute","Shifty Station","Snapper Canal","Starfish Mainstage","Sturgeon Shipyard","The Reef","Wahoo World","Walleye Warehouse","Skipper Pavilion"],t.Splatoon2Modes=["Clam Blitz","Tower Control","Rainmaker","Splat Zones","Turf War"],t.splatoon2Data=(0,a.normalizeGameData)({stages:{[o.Locale.EN]:{"Ancho-V Games":"Ancho-V Games","Arowana Mall":"Arowana Mall","Blackbelly Skatepark":"Blackbelly Skatepark","Camp Triggerfish":"Camp Triggerfish","Goby Arena":"Goby Arena","Humpback Pump Track":"Humpback Pump Track","Inkblot Art Academy":"Inkblot Art Academy","Kelp Dome":"Kelp Dome",MakoMart:"MakoMart","Manta Maria":"Manta Maria","Moray Towers":"Moray Towers","Musselforge Fitness":"Musselforge Fitness","New Albacore Hotel":"New Albacore Hotel","Piranha Pit":"Piranha Pit","Port Mackerel":"Port Mackerel","Shellendorf Institute":"Shellendorf Institute","Shifty Station":"Shifty Station","Snapper Canal":"Snapper Canal","Starfish Mainstage":"Starfish Mainstage","Sturgeon Shipyard":"Sturgeon Shipyard","The Reef":"The Reef","Wahoo World":"Wahoo World","Walleye Warehouse":"Walleye Warehouse","Skipper Pavilion":"Skipper Pavilion"},[o.Locale.DE]:{"Ancho-V Games":"Anchobit Games HQ","Arowana Mall":"Arowana Center","Blackbelly Skatepark":"Punkasius-Skatepark","Camp Triggerfish":"Camp Schützenfisch","Goby Arena":"Backfisch-Stadion","Humpback Pump Track":"Buckelwal-Piste","Inkblot Art Academy":"Perlmutt-Akademie","Kelp Dome":"Tümmlerkuppel",MakoMart:"Cetacea-Markt","Manta Maria":"Manta Maria","Moray Towers":"Muränentürme","Musselforge Fitness":"Molluskelbude","New Albacore Hotel":"Hotel Neothun","Piranha Pit":"Steinköhler-Grube","Port Mackerel":"Heilbutt-Hafen","Shellendorf Institute":"Abyssal-Museum","Shifty Station":"Wandelzone","Snapper Canal":"Grätenkanal","Starfish Mainstage":"Seeigel-Rockbühne","Sturgeon Shipyard":"Störwerft","The Reef":"Korallenviertel","Wahoo World":"Flunder-Funpark","Walleye Warehouse":"Kofferfisch-Lager","Skipper Pavilion":"Grundel-Pavillon"},[o.Locale.EU_FR]:{"Ancho-V Games":"Tentatec Studio","Arowana Mall":"Centre Arowana","Blackbelly Skatepark":"Skatepark Mako","Camp Triggerfish":"Hippo-Camping","Goby Arena":"Stade Bernique","Humpback Pump Track":"Piste Méroule","Inkblot Art Academy":"Institut Calam'arts","Kelp Dome":"Serre Goémon",MakoMart:"Supermarché Cétacé","Manta Maria":"Manta Maria","Moray Towers":"Tours Girelle","Musselforge Fitness":"Gymnase Ancrage","New Albacore Hotel":"Hôtel Atoll","Piranha Pit":"Carrière Caviar","Port Mackerel":"Docks Haddock","Shellendorf Institute":"Galerie des abysses","Shifty Station":"Plateforme polymorphe","Snapper Canal":"Canalamar","Starfish Mainstage":"Scène Sirène","Sturgeon Shipyard":"Chantier Narval","The Reef":"Allées salées","Wahoo World":"Parc Carapince","Walleye Warehouse":"Encrepôt","Skipper Pavilion":"Lagune aux gobies"},[o.Locale.JA]:{"Ancho-V Games":"アンチョビットゲームズ","Arowana Mall":"アロワナモール","Blackbelly Skatepark":"Bバスパーク","Camp Triggerfish":"モンガラキャンプ場","Goby Arena":"アジフライスタジアム","Humpback Pump Track":"コンブトラック","Inkblot Art Academy":"海女美術大学","Kelp Dome":"モズク農園",MakoMart:"ザトウマーケット","Manta Maria":"マンタマリア号","Moray Towers":"タチウオパーキング","Musselforge Fitness":"フジツボスポーツクラブ","New Albacore Hotel":"ホテルニューオートロ","Piranha Pit":"ショッツル鉱山","Port Mackerel":"ホッケふ頭","Shellendorf Institute":"デボン海洋博物館","Shifty Station":"ミステリーゾーン","Snapper Canal":"エンガワ河川敷","Starfish Mainstage":"ガンガゼ野外音楽堂","Sturgeon Shipyard":"チョウザメ造船","The Reef":"バッテラストリート","Wahoo World":"スメーシーワールド","Walleye Warehouse":"ハコフグ倉庫","Skipper Pavilion":"ムツゴ楼"}},stageImagePaths:{"Ancho-V Games":"splatoon2/S2_Stage_Ancho-V_Games.webp","Arowana Mall":"splatoon2/S2_Stage_Arowana_Mall.webp","Blackbelly Skatepark":"splatoon2/S2_Stage_Blackbelly_Skatepark.webp","Camp Triggerfish":"splatoon2/S2_Stage_Camp_Triggerfish.webp","Goby Arena":"splatoon2/S2_Stage_Goby_Arena.webp","Humpback Pump Track":"splatoon2/S2_Stage_Humpback_Pump_Track.webp","Inkblot Art Academy":"splatoon2/S2_Stage_Inkblot_Art_Academy.webp","Kelp Dome":"splatoon2/S2_Stage_Kelp_Dome.webp",MakoMart:"splatoon2/S2_Stage_MakoMart.webp","Manta Maria":"splatoon2/S2_Stage_Manta_Maria.webp","Moray Towers":"splatoon2/S2_Stage_Moray_Towers.webp","Musselforge Fitness":"splatoon2/S2_Stage_Musselforge_Fitness.webp","New Albacore Hotel":"splatoon2/S2_Stage_New_Albacore_Hotel.webp","Piranha Pit":"splatoon2/S2_Stage_Piranha_Pit.webp","Port Mackerel":"splatoon2/S2_Stage_Port_Mackerel.webp","Shellendorf Institute":"splatoon2/S2_Stage_Shellendorf_Institute.webp","Shifty Station":"splatoon2/S2_Stage_Shifty_Station.webp","Snapper Canal":"splatoon2/S2_Stage_Snapper_Canal.webp","Starfish Mainstage":"splatoon2/S2_Stage_Starfish_Mainstage.webp","Sturgeon Shipyard":"splatoon2/S2_Stage_Sturgeon_Shipyard.webp","The Reef":"splatoon2/S2_Stage_The_Reef.webp","Wahoo World":"splatoon2/S2_Stage_Wahoo_World.webp","Walleye Warehouse":"splatoon2/S2_Stage_Walleye_Warehouse.webp","Skipper Pavilion":"splatoon2/S2_Stage_Skipper_Pavilion.webp"},modes:{[o.Locale.EN]:{"Clam Blitz":"Clam Blitz","Tower Control":"Tower Control",Rainmaker:"Rainmaker","Splat Zones":"Splat Zones","Turf War":"Turf War"},[o.Locale.DE]:{"Clam Blitz":"Muschelchaos","Tower Control":"Turmkommando",Rainmaker:"Operation Goldfisch","Splat Zones":"Herrschaft","Turf War":"Revierkampf"},[o.Locale.EU_FR]:{"Clam Blitz":"Pluie de palourdes","Tower Control":"Expédition risquée",Rainmaker:"Mission Bazookarpe","Splat Zones":"Défense de zone","Turf War":"Guerre de territoire"},[o.Locale.JA]:{"Clam Blitz":"ガチアサリ","Tower Control":"ガチヤグラ",Rainmaker:"ガチホコバトル","Splat Zones":"ガチエリア","Turf War":"ナワバリバトル"}},colors:[{meta:{name:"Ranked Modes",key:"rankedModes"},colors:[{index:0,title:"Green vs Grape",key:"greenGrape",clrA:"#37FC00",clrB:"#7D28FC",clrNeutral:"#F4067E"},{index:1,title:"Green vs Magenta",key:"greenMagenta",clrA:"#04D976",clrB:"#D600AB",clrNeutral:"#D2E500"},{index:2,title:"Turquoise vs Orange",key:"turquoiseOrange",clrA:"#10E38F",clrB:"#FB7B08",clrNeutral:"#6912CD"},{index:3,title:"Mustard vs Purple",key:"mustardPurple",clrA:"#FF9E03",clrB:"#B909E0",clrNeutral:"#08C66B"},{index:4,title:"Dark Blue vs Green",key:"darkBlueGreen",clrA:"#2F27CC",clrB:"#37FC00",clrNeutral:"#EA01B7"},{index:5,title:"Purple vs Green",key:"purpleGreen",clrA:"#B909E0",clrB:"#37FC00",clrNeutral:"#F87604"},{index:6,title:"Yellow vs Blue",key:"yellowBlue",clrA:"#FEF232",clrB:"#2ED2FE",clrNeutral:"#FD5600"}]},{meta:{name:"Turf War",key:"turfWar"},colors:[{index:0,title:"Yellow vs Purple",key:"yellowPurple",clrA:"#D1E004",clrB:"#960CB2",clrNeutral:"#0EB962"},{index:1,title:"Pink vs Blue",key:"pinkBlue",clrA:"#E61077",clrB:"#361CB8",clrNeutral:"#24C133"},{index:2,title:"Pink vs Yellow",key:"pinkYellow",clrA:"#ED0C6A",clrB:"#D5E802",clrNeutral:"#08C24D"},{index:3,title:"Purple vs Turquoise",key:"purpleTurquoise",clrA:"#6B10CC",clrB:"#08CC81",clrNeutral:"#EB246D"},{index:4,title:"Pink vs Light Blue",key:"pinkLightBlue",clrA:"#E30960",clrB:"#02ADCF",clrNeutral:"#DDE713"},{index:5,title:"Purple vs Orange",key:"purpleOrange",clrA:"#5617C2",clrB:"#FF5F03",clrNeutral:"#ACE81E"},{index:6,title:"Pink vs Green",key:"pinkGreen",clrA:"#E60572",clrB:"#1BBF0F",clrNeutral:"#CCE50C"},{index:7,title:"Yellow vs Blue",key:"yellowBlue",clrA:"#F1CE33",clrB:"#4B12BE",clrNeutral:"#E62E96"}]},{meta:{name:"Color Lock",key:"colorLock"},colors:[{index:0,title:"Yellow vs Blue (Color Lock)",key:"yellowBlue",clrA:"#FEF232",clrB:"#2F27CC",clrNeutral:"#DC1589"}]}]})},8954:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splatoon3Data=t.Splatoon3Modes=t.Splatoon3Stages=void 0;const a=n(9117),o=n(8275);t.Splatoon3Stages=["Museum d'Alfonsino","Scorch Gorge","Eeltail Alley","Hagglefish Market","Undertow Spillway","Mincemeat Metalworks","Hammerhead Bridge","Mahi-Mahi Resort","Inkblot Art Academy","Sturgeon Shipyard","MakoMart","Wahoo World","Brinewater Springs","Flounder Heights","Um'ami Ruins","Manta Maria","Barnacle & Dime","Humpback Pump Track","Crableg Capital","Shipshape Cargo Co.","Robo ROM-en","Bluefin Depot","Marlin Airport"],t.Splatoon3Modes=["Clam Blitz","Tower Control","Rainmaker","Splat Zones","Turf War"],t.splatoon3Data=(0,a.normalizeGameData)({stages:{[o.Locale.EN]:{"Museum d'Alfonsino":"Museum d'Alfonsino","Scorch Gorge":"Scorch Gorge","Eeltail Alley":"Eeltail Alley","Hagglefish Market":"Hagglefish Market","Undertow Spillway":"Undertow Spillway","Mincemeat Metalworks":"Mincemeat Metalworks","Hammerhead Bridge":"Hammerhead Bridge","Mahi-Mahi Resort":"Mahi-Mahi Resort","Inkblot Art Academy":"Inkblot Art Academy","Sturgeon Shipyard":"Sturgeon Shipyard",MakoMart:"MakoMart","Wahoo World":"Wahoo World","Brinewater Springs":"Brinewater Springs","Flounder Heights":"Flounder Heights","Um'ami Ruins":"Um'ami Ruins","Manta Maria":"Manta Maria","Barnacle & Dime":"Barnacle & Dime","Humpback Pump Track":"Humpback Pump Track","Crableg Capital":"Crableg Capital","Shipshape Cargo Co.":"Shipshape Cargo Co.","Robo ROM-en":"Robo ROM-en","Bluefin Depot":"Bluefin Depot","Marlin Airport":"Marlin Airport"},[o.Locale.DE]:{"Museum d'Alfonsino":"Pinakoithek","Scorch Gorge":"Sengkluft","Eeltail Alley":"Streifenaal-Straße","Hagglefish Market":"Schnapperchen-Basar","Undertow Spillway":"Schwertmuschel-Reservoir","Mincemeat Metalworks":"Aalstahl-Metallwerk","Hammerhead Bridge":"Makrelenbrücke","Mahi-Mahi Resort":"Mahi-Mahi-Resort","Inkblot Art Academy":"Perlmutt-Akademie","Sturgeon Shipyard":"Störwerft",MakoMart:"Cetacea-Markt","Wahoo World":"Flunder-Funpark","Brinewater Springs":"Kusaya-Quellen","Flounder Heights":"Schollensiedlung","Um'ami Ruins":"Um'ami-Ruinen","Manta Maria":"Manta Maria","Barnacle & Dime":"Talerfisch & Pock","Humpback Pump Track":"Buckelwal-Piste","Crableg Capital":"Majidae Skyline","Shipshape Cargo Co.":"Cargo Ship Heavyfish","Robo ROM-en":"ROM & RAMen","Bluefin Depot":"Blauflossen-Depot","Marlin Airport":"La Ola Airport"},[o.Locale.EU_FR]:{"Museum d'Alfonsino":"Galeries Guppy","Scorch Gorge":"Canyon aux colonnes","Eeltail Alley":"Banlieue Balibot","Hagglefish Market":"Marché Grefin","Undertow Spillway":"Réservoir Rigadelle","Mincemeat Metalworks":"Casse Rascasse","Hammerhead Bridge":"Pont Esturgeon","Mahi-Mahi Resort":"Club Ca$halot","Inkblot Art Academy":"Institut Calam'arts","Sturgeon Shipyard":"Chantier Narval",MakoMart:"Supermarché Cétacé","Wahoo World":"Parc Carapince","Brinewater Springs":"Sources Sauret","Flounder Heights":"Lotissement Filament","Um'ami Ruins":"Ruines Uma'mi","Manta Maria":"Manta Maria","Barnacle & Dime":"Halles de Port-merlu","Humpback Pump Track":"Piste Méroule","Crableg Capital":"Quartier Crabe-ciels","Shipshape Cargo Co.":"Chaland Flétan","Robo ROM-en":"Arène Méca-ramen","Bluefin Depot":"Mine Marine","Marlin Airport":"Terminal Rorqual"},[o.Locale.JA]:{"Museum d'Alfonsino":"キンメダイ美術館","Scorch Gorge":"ユノハナ大渓谷","Eeltail Alley":"ゴンズイ地区","Hagglefish Market":"ヤガラ市場","Undertow Spillway":"マテガイ放水路","Mincemeat Metalworks":"ナメロウ金属","Hammerhead Bridge":"マサバ海峡大橋","Mahi-Mahi Resort":"マヒマヒリゾート&スパ","Inkblot Art Academy":"海女美術大学","Sturgeon Shipyard":"チョウザメ造船",MakoMart:"ザトウマーケット","Wahoo World":"スメーシーワールド","Brinewater Springs":"クサヤ温泉","Flounder Heights":"ヒラメが丘団地","Um'ami Ruins":"ナンプラー遺跡","Manta Maria":"マンタマリア号","Barnacle & Dime":"タラポートショッピングパーク","Humpback Pump Track":"コンブトラック","Crableg Capital":"タカアシ経済特区","Shipshape Cargo Co.":"オヒョウ海運","Robo ROM-en":"バイガイ亭","Bluefin Depot":"ネギトロ炭鉱","Marlin Airport":"カジキ空港"}},stageImagePaths:{"Humpback Pump Track":"splatoon3/S3_Stage_Humpback_Pump_Track.webp","Inkblot Art Academy":"splatoon3/S3_Stage_Inkblot_Art_Academy.webp",MakoMart:"splatoon3/S3_Stage_MakoMart.webp","Manta Maria":"splatoon3/S3_Stage_Manta_Maria.webp","Sturgeon Shipyard":"splatoon3/S3_Stage_Sturgeon_Shipyard.webp","Wahoo World":"splatoon3/S3_Stage_Wahoo_World.webp","Museum d'Alfonsino":"splatoon3/S3_Stage_Museum_dAlfonsino.webp","Scorch Gorge":"splatoon3/S3_Stage_Scorch_Gorge.webp","Eeltail Alley":"splatoon3/S3_Stage_Eeltail_Alley.webp","Hagglefish Market":"splatoon3/S3_Stage_Hagglefish_Market.webp","Undertow Spillway":"splatoon3/S3_Stage_Undertow_Spillway.webp","Mincemeat Metalworks":"splatoon3/S3_Stage_Mincemeat_Metalworks.webp","Hammerhead Bridge":"splatoon3/S3_Stage_Hammerhead_Bridge.webp","Mahi-Mahi Resort":"splatoon3/S3_Stage_Mahi_Mahi_Resort.webp","Brinewater Springs":"splatoon3/S3_Stage_Brinewater_Springs.webp","Flounder Heights":"splatoon3/S3_Stage_Flounder_Heights.webp","Um'ami Ruins":"splatoon3/S3_Stage_Umami_Ruins.webp","Barnacle & Dime":"splatoon3/S3_Stage_Barnacle_&_Dime.webp","Crableg Capital":"splatoon3/S3_Stage_Crableg_Capital.webp","Shipshape Cargo Co.":"splatoon3/S3_Stage_Shipshape_Cargo_Co..webp","Robo ROM-en":"splatoon3/S3_Stage_Robo_ROM-en.webp","Bluefin Depot":"splatoon3/S3_Stage_Bluefin_Depot.webp","Marlin Airport":"splatoon3/S3_Marlin_Airport_Fresh_Season_2024_trailer.webp"},modes:{[o.Locale.EN]:{"Clam Blitz":"Clam Blitz","Tower Control":"Tower Control",Rainmaker:"Rainmaker","Splat Zones":"Splat Zones","Turf War":"Turf War"},[o.Locale.DE]:{"Clam Blitz":"Muschelchaos","Tower Control":"Turmkommando",Rainmaker:"Operation Goldfisch","Splat Zones":"Herrschaft","Turf War":"Revierkampf"},[o.Locale.EU_FR]:{"Clam Blitz":"Pluie de palourdes","Tower Control":"Expédition risquée",Rainmaker:"Mission Bazookarpe","Splat Zones":"Défense de zone","Turf War":"Guerre de territoire"},[o.Locale.JA]:{"Clam Blitz":"ガチアサリ","Tower Control":"ガチヤグラ",Rainmaker:"ガチホコバトル","Splat Zones":"ガチエリア","Turf War":"ナワバリバトル"}},colors:[{meta:{name:"Ranked Modes",key:"rankedModes"},colors:[{index:0,title:"Orange vs Purple",key:"orangePurple",clrA:"#F56522",clrB:"#821CD6",referenceClrA:"#C64D24",referenceClrB:"#6C0AB3",clrNeutral:"#CDFF45"},{index:1,title:"Yellow vs Dark Blue",key:"yellowDarkBlue",clrA:"#EDD921",clrB:"#461EE6",referenceClrA:"#D3CD23",referenceClrB:"#4010C9",clrNeutral:"#4445FF"},{index:2,title:"Turquoise vs Orange",key:"turquoiseOrange",clrA:"#2ADBC6",clrB:"#FA5A41",referenceClrA:"#37D5B2",referenceClrB:"#CF453F",clrNeutral:"#4445FF"},{index:3,title:"Orange vs Dark Blue",key:"orangeDarkBlue",clrA:"#FC7735",clrB:"#4048DB",referenceClrA:"#D9633A",referenceClrB:"#423BC4",clrNeutral:"#F8F755"},{index:4,title:"Turquoise vs Pink",key:"turquoisePink",clrA:"#2ADBC3",clrB:"#E34984",referenceClrA:"#35D3AE",referenceClrB:"#BE2C74",clrNeutral:"#7577FF"},{index:5,title:"Dark Blue vs Orange",key:"darkBlueOrange",clrA:"#2C2CDB",clrB:"#F29C33",referenceClrA:"#261DAD",referenceClrB:"#DD8E3A",clrNeutral:"#FF67EE"},{index:6,title:"Yellow vs Purple",key:"yellowPurple",clrA:"#EEFC58",clrB:"#7635F0",referenceClrA:"#C2DC4C",referenceClrB:"#641FCA",clrNeutral:"#54FDE8"},{index:7,title:"Gold vs Purple",key:"goldPurple",clrA:"#EBCC31",clrB:"#A032DB",referenceClrA:"#CFBC33",referenceClrB:"#901BC4",clrNeutral:"#73DE35"},{index:8,title:"Green vs Pink",key:"greenPink",clrA:"#B3DE45",clrB:"#D43BCA",referenceClrA:"#A6DA44",referenceClrB:"#B31FB0",clrNeutral:"#FFC042"},{index:9,title:"Pink vs Green",key:"pinkGreen",clrA:"#F753A1",clrB:"#35CC2D",referenceClrA:"#B82079",referenceClrB:"#39D42D",clrNeutral:"#4A36FF"}]},{meta:{name:"Color Lock (Variant 1)",key:"colorLock1"},colors:[{index:0,title:"Yellow vs Purple",key:"yellowPurple",clrA:"#F0EB24",clrB:"#6236DF",referenceClrA:"#CAC531",referenceClrB:"#5529BC",clrNeutral:"#B82FB6"}]},{meta:{name:"Color Lock (Variant 2)",key:"colorLock2"},colors:[{index:0,title:"Orange vs Blue",key:"orangeBlue",clrA:"#FDB605",clrB:"#2D63D7",referenceClrA:"#D5972C",referenceClrB:"#2858BC",clrNeutral:"#8FD20C"}]}]})},4615:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateId=void 0;const a=n(5828);t.generateId=function(){return(0,a.v4)()}},8157:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBlank=t.addDots=void 0,t.addDots=function(e,t=48){return e&&e.length>t?e.substring(0,t-3)+"...":e},t.isBlank=function(e){return"string"!=typeof e||""===e.trim()}},4365:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.GameAutomationAction=void 0,function(e){e.END_GAME="END_GAME",e.START_GAME="START_GAME",e.NONE="NONE"}(n||(t.GameAutomationAction=n={}))},6197:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.InterfaceLocale=void 0,function(e){e.EN="EN"}(n||(t.InterfaceLocale=n={}))},8275:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Locale=void 0,function(e){e.EN="EN",e.DE="DE",e.EU_FR="EU_FR",e.JA="JA"}(n||(t.Locale=n={}))},5279:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ObsStatus=void 0,function(e){e.CONNECTED="CONNECTED",e.CONNECTING="CONNECTING",e.NOT_CONNECTED="NOT_CONNECTED"}(n||(t.ObsStatus=n={}))},2276:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.BracketTypeHelper=t.BracketType=void 0,function(e){e.SWISS="SWISS",e.DOUBLE_ELIMINATION="DOUBLE_ELIMINATION",e.SINGLE_ELIMINATION="SINGLE_ELIMINATION",e.ROUND_ROBIN="ROUND_ROBIN",e.LADDER="LADDER"}(n||(t.BracketType=n={})),t.BracketTypeHelper=class{static fromBattlefy(e,t){if("elimination"===e){if(null==t)throw new Error('Got bracket type "elimination" from Battlefy without "style" parameter (single or double?)');return{single:n.SINGLE_ELIMINATION,double:n.DOUBLE_ELIMINATION}[t]}return{ladder:n.LADDER,swiss:n.SWISS,roundrobin:n.ROUND_ROBIN}[e]}}},8250:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.GameVersion=void 0,function(e){e.SPLATOON_2="SPLATOON_2",e.SPLATOON_3="SPLATOON_3"}(n||(t.GameVersion=n={}))},9383:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.GameWinner=void 0,function(e){e.NO_WINNER="none",e.ALPHA="alpha",e.BRAVO="bravo"}(n||(t.GameWinner=n={}))},8394:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ImportStatus=void 0,function(e){e.SUCCESS="SUCCESS",e.LOADING="LOADING",e.FAILURE="FAILURE",e.NO_DATA="NO_DATA",e.NO_STATUS="NO_STATUS"}(n||(t.ImportStatus=n={}))},6123:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayType=void 0,function(e){e.PLAY_ALL="PLAY_ALL",e.BEST_OF="BEST_OF"}(n||(t.PlayType=n={}))},9694:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PredictionStatus=void 0,function(e){e.RESOLVED="RESOLVED",e.ACTIVE="ACTIVE",e.CANCELED="CANCELED",e.LOCKED="LOCKED"}(n||(t.PredictionStatus=n={}))},4134:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TournamentDataSource=void 0,function(e){e.BATTLEFY="BATTLEFY",e.SMASHGG="SMASHGG",e.UPLOAD="UPLOAD",e.SENDOU_INK="SENDOU_INK",e.UNKNOWN="UNKNOWN"}(n||(t.TournamentDataSource=n={}))},7597:(e,t,n)=>{var a={"./en/breakScreen.json":8576,"./en/casters.json":8972,"./en/colors.json":3717,"./en/common.json":3943,"./en/createPredictionDialog.json":8839,"./en/dataIO.json":4104,"./en/matchManager.json":2144,"./en/music.json":8411,"./en/nextMatch.json":5146,"./en/predictions.json":3222,"./en/resolvePredictionDialog.json":1226,"./en/rounds.json":2757,"./en/server.json":1039,"./en/settings.json":8277};function o(e){var t=r(e);return n(t)}function r(e){if(!n.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}o.keys=function(){return Object.keys(a)},o.resolve=r,e.exports=o,o.id=7597},2167:e=>{"use strict";e.exports=require("axios")},739:e=>{"use strict";e.exports=require("clone")},1611:e=>{"use strict";e.exports=require("colorjs.io")},6674:e=>{"use strict";e.exports=require("express-fileupload")},8805:e=>{"use strict";e.exports=require("i18next")},2085:e=>{"use strict";e.exports=require("lastfm")},6517:e=>{"use strict";e.exports=require("lodash")},9591:e=>{"use strict";e.exports=require("lodash/cloneDeep")},5359:e=>{"use strict";e.exports=require("lodash/findLastIndex")},9699:e=>{"use strict";e.exports=require("lodash/isEmpty")},3993:e=>{"use strict";e.exports=require("lodash/mean")},3901:e=>{"use strict";e.exports=require("lodash/omit")},5526:e=>{"use strict";e.exports=require("lodash/random")},2748:e=>{"use strict";e.exports=require("luxon")},3848:e=>{"use strict";e.exports=require("obs-websocket-js")},1505:e=>{"use strict";e.exports=require("semver/preload")},7441:e=>{"use strict";e.exports=require("sharp")},5828:e=>{"use strict";e.exports=require("uuid")},5352:e=>{"use strict";e.exports=require("ws")},7147:e=>{"use strict";e.exports=require("fs")},3837:e=>{"use strict";e.exports=require("util")},4874:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});const a={crush:(e,t=50)=>{let n=[];for(let e=127;--e;)(e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||"-_.!~*'()".includes(String.fromCharCode(e)))&&n.push(String.fromCharCode(e));for(let e=32;e<255;++e){let t=String.fromCharCode(e);"\\"==t||n.includes(t)||n.unshift(t)}e=e.replace(new RegExp("","g"),"");const a=((e,n)=>{let a=n.length,o="";const r=e=>encodeURI(encodeURIComponent(e)).replace(/%../g,"i").length,i=e=>{let t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t>=56320&&t<=57343||n>=55296&&n<=56319};let s={};for(let n=2;n=0;++o)r=e.indexOf(a,r+n);o>1&&(s[a]=o)}for(;;){for(;a--&&e.includes(n[a]););if(a<0)break;let t,i=n[a],l=0,u=r(i);for(let e in s){let n=s[e],a=(n-1)*r(e)-(n+1)*u;o.length||(a-=r("")),a<=0?delete s[e]:a>l&&(t=e,l=a)}if(!t)break;e=e.split(t).join(i)+i+t,o=i+o;let c={};for(let n in s){let a=n.split(t).join(i),o=0;for(let t=e.indexOf(a);t>=0;++o)t=e.indexOf(a,t+a.length);o>1&&(c[a]=o)}s=c}return{a:e,b:o}})(e=o(e),n);let r=a.a;return a.b.length&&(r+=""+a.b),r+="_",r},uncrush:e=>{const t=(e=e.substring(0,e.length-1)).split("");let n=t[0];if(t.length>1){let e=t[1];for(let t of e){let e=n.split(t);n=e.join(e.pop())}}return o(n,0)}},o=(e,t=1)=>{const n=[['"',"'"],["':","!"],[",'","~"],["}",")","\\","\\"],["{","(","\\","\\"]],a=(e,t)=>{let n=new RegExp(`${(t[2]?t[2]:"")+t[0]}|${(t[3]?t[3]:"")+t[1]}`,"g");return e.replace(n,(e=>e===t[0]?t[1]:t[0]))};if(t)for(let t=0;t{"use strict";e.exports=JSON.parse('{"name":"ipl-overlay-controls","version":"4.14.1","description":"Dashboard elements for Inkling Performance Labs broadcast graphics.","homepage":"https://github.com/inkfarer/ipl-overlay-controls","author":{"name":"inkfarer","email":"inkfarer@inkfarer.com","url":"https://inkfarer.com"},"files":["dashboard","src/extension"],"keywords":["","nodecg-bundle"],"scripts":{"build":"cross-env NODE_ENV=production webpack","clean":"trash node_modules/.cache && trash dashboard && trash extension","cleanbuild":"npm run clean && npm run build","start":"node ../..","watch":"webpack -w","schema-types":"nodecg schema-types","lint":"eslint --ext .js,.vue,.ts ./src","fix":"eslint --ext .js,.vue,.ts --fix ./src","devbuild":"webpack","test":"jest","test:update":"jest -u","test:ci":"jest --json --outputFile=result.json --testLocationInResults"},"nodecg":{"compatibleRange":"^1.7.0 || ^2.0.0","dashboardPanels":[{"name":"music","title":"Music","width":2,"file":"music.html","workspace":"ipl","headerColor":"#262F40"},{"name":"breakscreen","title":"Break Screen","width":2,"file":"breakScreen.html","workspace":"ipl","headerColor":"#262F40"},{"name":"matchmanager","title":"Match Manager","width":4,"file":"matchManager.html","workspace":"ipl","headerColor":"#262F40"},{"name":"casters","title":"Casters","width":2,"file":"casters.html","workspace":"ipl","headerColor":"#262F40"},{"name":"nextMatch","title":"Next Match","width":2,"file":"nextMatch.html","workspace":"ipl","headerColor":"#262F40"},{"name":"predictions","title":"Predictions","width":2,"file":"predictions.html","workspace":"ipl","headerColor":"#262F40"},{"name":"dataIO","title":"Data import/export","width":4,"file":"dataIO.html","workspace":"ipl setup","headerColor":"#262F40"},{"name":"rounds","title":"Rounds","width":2,"file":"rounds.html","workspace":"ipl setup","headerColor":"#262F40"},{"name":"Settings","title":"Settings","width":2,"file":"settings.html","workspace":"ipl setup","headerColor":"#262F40"},{"name":"createPredictionDialog","title":"","width":4,"file":"createPredictionDialog.html","dialog":true},{"name":"resolvePredictionDialog","title":"","width":3,"file":"resolvePredictionDialog.html","dialog":true}],"mount":[{"directory":"assets/images/stages","endpoint":"stage-images"}]},"repository":"https://github.com/nodecg/nodecg.git","license":"MIT","dependencies":{"@fortawesome/fontawesome-svg-core":"^6.4.0","@fortawesome/free-solid-svg-icons":"^6.4.0","@fortawesome/vue-fontawesome":"^3.0.0-4","@iplsplatoon/vue-components":"^3.3.2","@pinia/testing":"^0.0.16","@types/fs-extra":"^9.0.13","axios":"^0.21.1","clone":"^2.1.2","colorjs.io":"^0.5.0","express-fileupload":"^1.2.1","fs-extra":"^10.0.0","i18next":"^23.10.1","i18next-vue":"^4.0.0","jsoncrush":"^1.1.8","lastfm":"git+https://github.com/inkfarer/lastfm-node.git","lodash":"^4.17.21","luxon":"2.5.2","obs-websocket-js":"^5.0.5","pinia":"^2.0.35","semver":"^7.3.5","sharp":"^0.33.3","ts-node":"^10.9.1","uuid":"^9.0.1","vue":"^3.4.21","ws":"^7.5.3"},"devDependencies":{"@nodecg/types":"^2.1.11","@types/clone":"^2.1.0","@types/express-fileupload":"^1.1.6","@types/jest":"^29.5.1","@types/jest-when":"^2.7.3","@types/lodash":"^4.14.171","@types/luxon":"^1.27.1","@types/node":"^18.16.3","@types/semver":"^7.3.7","@types/uuid":"^9.0.7","@types/webpack":"^5.28.1","@types/webpack-livereload-plugin":"^2.3.2","@types/webpack-node-externals":"^3.0.4","@types/ws":"^7.4.7","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","@vue/compiler-sfc":"^3.4.21","@vue/test-utils":"2.3.2","@vue/vue3-jest":"^29.2.6","cross-env":"^7.0.3","css-loader":"^6.7.3","eslint":"^8.39.0","eslint-import-resolver-typescript":"^3.5.5","eslint-import-resolver-webpack":"^0.13.2","eslint-plugin-import":"^2.27.5","eslint-plugin-vue":"^9.11.0","fork-ts-checker-webpack-plugin":"^6.5.3","globby":"^11.1.0","html-webpack-plugin":"^5.5.1","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jest-mock-extended":"^3.0.4","jest-when":"^3.5.2","sass":"^1.62.1","sass-loader":"^13.2.2","style-loader":"^3.3.2","trash-cli":"^5.0.0","ts-jest":"^29.1.0","ts-loader":"^9.4.2","tsconfig-paths-webpack-plugin":"^4.0.1","typescript":"^5.4.4","vue-eslint-parser":"^9.1.1","vue-loader":"^17.1.0","vuedraggable":"^4.1.0","webpack":"5.81.0","webpack-cli":"^5.0.2","webpack-livereload-plugin":"^3.0.1","webpack-node-externals":"^3.0.0"},"jest":{"projects":["/src/dashboard/jest.config.ts","/src/extension/jest.config.ts","/src/helpers/jest.config.ts"]}}')},8576:e=>{"use strict";e.exports=JSON.parse('{"title":"Break Screen","sceneName":{"main":"Main Scene","teams":"Teams","stages":"Stages"},"showSceneButton":"Show","mainScene":{"flavorTextInput":"Flavor Text"},"nextStageTimer":{"sectionTitle":"Next stage timer","showTimerCheckbox":"Show timer","hourInput":"Hour","minuteInput":"Min","daySelect":"Day"}}')},8972:e=>{"use strict";e.exports=JSON.parse('{"title":"Casters","controls":{"addCaster":"Add caster","uploadCastersToRadia":"Upload casters to Radia","loadFromVoiceChat":"Load from VC"},"casterEditor":{"unsavedCasterBadge":"Unsaved","saveNewCasterButton":"Save","nameInput":"Name","twitterInput":"Twitter","pronounInput":"Pronouns","imageUrlInput":"Image URL","videoUrlInput":"Video URL"},"casterSearch":{"buttonLabel":"Search casters","queryInput":"Query","noResultsMessage":"Type above to search..."}}')},3717:e=>{"use strict";e.exports=JSON.parse('{"customColor":{"groupName":"Custom Color","customColor":"Custom Color"},"SPLATOON_3":{"rankedModes":{"groupName":"Ranked Modes","orangePurple":"Orange vs Purple","yellowDarkBlue":"Yellow vs Dark Blue","turquoiseOrange":"Turquoise vs Orange","orangeDarkBlue":"Orange vs Dark Blue","turquoisePink":"Turquoise vs Pink","darkBlueOrange":"Dark Blue vs Orange","yellowPurple":"Yellow vs Purple","goldPurple":"Gold vs Purple","greenPink":"Green vs Pink","pinkGreen":"Pink vs Green"},"colorLock1":{"groupName":"Color Lock (Variant 1)","yellowPurple":"Yellow vs Purple"},"colorLock2":{"groupName":"Color Lock (Variant 2)","orangeBlue":"Orange vs Blue"}},"SPLATOON_2":{"rankedModes":{"groupName":"Ranked Modes","greenGrape":"Green vs Grape","greenMagenta":"Green vs Magenta","turquoiseOrange":"Turquoise vs Orange","mustardPurple":"Mustard vs Purple","darkBlueGreen":"Dark Blue vs Green","purpleGreen":"Purple vs Green","yellowBlue":"Yellow vs Blue"},"turfWar":{"groupName":"Turf War","yellowPurple":"Yellow vs Purple","pinkBlue":"Pink vs Blue","pinkYellow":"Pink vs Yellow","purpleTurquoise":"Purple vs Turquoise","pinkLightBlue":"Pink vs Light Blue","purpleOrange":"Purple vs Orange","pinkGreen":"Pink vs Green","yellowBlue":"Yellow vs Blue"},"colorLock":{"groupName":"Color Lock","yellowBlue":"Yellow vs Blue (Color Lock)"}}}')},3943:e=>{"use strict";e.exports=JSON.parse('{"interfaceLanguage":{"EN":"English","ET":"Eesti","JA":"日本語"},"gameLocale":{"EN":"English","DE":"Deutsch","EU_FR":"Français","JA":"日本語"},"largeToggle":{"show":"Show","hide":"Hide"},"button":{"shortConfirmationMessage":"Confirm?","confirmationMessage":"Are you sure?","loading":"Loading...","error":"Error!","success":"Done!","rightClickUndoMessage":"Right-click to undo changes.","update":"Update"},"validationError":{"minLength_one":"Must be at least {{count}} character","minLength_other":"Must be at least {{count}} characters","maxLength_one":"Must not be over {{count}} character","maxLength_other":"Must not be over {{count}} characters","maxValue":"Must not be above {{count}}","minValue":"Must not be below {{count}}","numeric":"Must be numeric","notBlank":"Must not be blank"},"predictionStatus":{"RESOLVED":"Resolved","ACTIVE":"Active","CANCELED":"Canceled","LOCKED":"Locked"},"predictionStatusReason":{"missingConfiguration":"Missing Radia configuration. Check your guild ID and socket URL.","predictionsNotSupportedByGuild":"Predictions are not supported by the configured guild."},"tournamentDataSource":{"BATTLEFY":"Battlefy","SMASHGG":"Start.gg","UPLOAD":"Uploaded file","SENDOU_INK":"sendou.ink","UNKNOWN":"Unknown"},"playType":{"BEST_OF":"Best of {{count}}","PLAY_ALL":"Play all {{count}}"},"obsStatus":{"CONNECTING":"Connecting","CONNECTED":"Connected","NOT_CONNECTED":"Not connected"},"gameVersion":{"SPLATOON_2":"Splatoon 2","SPLATOON_3":"Splatoon 3"},"fileUploadPlaceholder":"Drag a file here or click to browse...","roundSelect":"Round","tournamentDataStore":{"fileUploadError":"Import failed with status {{statusCode}}: {{message}}"},"stringHelper":{"invalidSendouInkTournamentUrlError":"Input URL path is too short - is this a tournament URL?"}}')},8839:e=>{"use strict";e.exports=JSON.parse('{"dialogTitle":"Create Prediction","activePredictionNotResolvedWarning":"The active prediction has not been resolved!","titleInput":"Title","durationInputLabel":"Duration","durationInputUnit":"seconds","teamANameInput":"Team A","teamBNameInput":"Team B","createButton":"Create","resetButton":"Reset","defaultPredictionTitle":"Who do you think will win this match?"}')},4104:e=>{"use strict";e.exports=JSON.parse('{"title":"Data import/export","matchExporter":{"sectionTitle":"Export saved matches","matchCount_one":"Storing data for {{count}} match","matchCount_other":"Storing data for {{count}} matches","exportButton":"Export"},"roundImporter":{"sectionTitle":"Round data","roundDataUrlInput":"Data URL / maps.iplabs.ink URL","uploadFileCheckbox":"Upload file","importButton":"Import","loadingImportButton":"Importing..."},"teamDataImporter":{"sectionTitle":"Tournament data","startgg":{"eventSelect":"Event","importButton":"Import","loadingImportButton":"Importing...","cancelImportButton":"Cancel"},"dataSourceSelect":"Source","tournamentIdInput":"Tournament ID","tournamentIdInput_BATTLEFY":"Tournament URL","tournamentIdInput_SENDOU_INK":"Tournament URL","tournamentIdInput_SMASHGG":"Tournament Slug","tournamentIdInput_UPLOAD":"Data URL","uploadFileCheckbox":"Upload file","importButton":"Import","loadingImportButton":"Importing...","savedDataSection":{"title":"Saved data","tournamentNamePlaceholder":"No name","refreshButton":"Refresh","loadingRefreshButton":"Refreshing..."},"shortTournamentNameInput":"Short tournament name"}}')},2144:e=>{"use strict";e.exports=JSON.parse('{"title":"Match Manager","obsSceneConfigChangedWarning":"The OBS scene configuration has changed. Please confirm that the configured gameplay and intermission scenes (\'{{gameplayScene}}\' & \'{{intermissionScene}}\') are still correct.","startGameButton":"Start Game","endGameButton":"End Game","automationActionTask":"???","automationActionTask_changeScene":"Change Scene","automationActionTask_showScoreboard":"Show Scoreboard","automationActionTask_hideScoreboard":"Hide Scoreboard","automationActionTask_showCasters":"Show Casters","cancelAutomationActionButton":"Cancel action","showCastersButton":"Show casters","swapColorsButton":"Swap","readColorsFromSourceScreenshotButton":"Read colors from OBS","badObsConfigWarning":"Some OBS configuration is missing or invalid. Please ensure it is correct from the Settings dashboard panel.","colorList":{"sectionTitle":"More Colors","useCustomColorCheckbox":"Use custom color","showColorNamesCheckbox":"Show color names"},"activeMatchEditor":{"sectionTitle":"Active Match","selectedMatchCompletedMessage":"\'{{matchName}}\' is already completed. ({{teamA}} vs {{teamB}})","selectedMatchHasProgressMessage":"\'{{matchName}}\' already has saved progress. ({{teamA}} vs {{teamB}})","teamASelect":"Team A","teamBSelect":"Team B","showTeamImageCheckbox":"Show image","matchSelect":"Match","matchNameInput":"Match Name","duplicateMatchNameOption":"{{matchName}} ({{teamA}} vs {{teamB}})"},"nextMatchStarter":{"sectionTitle":"Begin Next Match","teamADisplayLabel":"Team A","teamBDisplayLabel":"Team B","roundNameDisplayLabel":"Round","matchNameInput":"Match Name","beginNextMatchButton":"Begin next match"},"scoreboardEditor":{"sectionTitle":"Scoreboard","flavorTextDisplayLabel":"Flavor Text"},"setEditor":{"sectionTitle":"Edit match","nextGameLabel":"Next up","nextGameTemplate":"{{mode}} on {{stage}}","customColorCheckbox":"Custom color","swapColorsCheckbox":"Swap colors","resetButton":"Reset","editColorsToggle":"Edit colors"},"activeRosters":{"sectionTitle":"Active Rosters"}}')},8411:e=>{"use strict";e.exports=JSON.parse('{"title":"Music","nowPlayingLabel_lastfm":"Now Playing (Last.fm)","nowPlayingLabel_manual":"Now Playing (Manual)","changeSongManually":{"sectionHeading":"Change song manually","enableCheckboxLabel":"Enable","artistInputLabel":"Artist","songInputLabel":"Song"}}')},5146:e=>{"use strict";e.exports=JSON.parse('{"title":"Next Match","chooseTeamsManuallyToggle":"Choose teams manually","showOnStreamToggle":"Show on stream","highlightedMatches":{"missingStageDataMessage":"No stages present to import from.","matchSourceSelect":"???","matchSourceSelect_BATTLEFY":"Bracket","matchSourceSelect_SMASHGG":"Stream","allBattlefyBracketsOption":"All Brackets","allStartggStreamsOption":"All Streams","importButton":"Import","noMatchesLoadedMessage":"No matches loaded.","matchSelect":"Match","matchNameInput":"Match Name","teamADisplayLabel":"Team A","teamBDisplayLabel":"Team B","playTypeDisplayLabel":"Type of play"},"manualTeamPicker":{"teamASelect":"Team A","teamBSelect":"Team B","matchNameInput":"Match Name"},"cannotImportDataError":"Cannot import data from $t(common:tournamentDataSource.{{source}})"}')},3222:e=>{"use strict";e.exports=JSON.parse('{"title":"Predictions","noPredictionDataMessage":"No prediction data loaded.","socketClosedWarning":{"message":"Prediction websocket is closed. Data may not be up to date.","reconnectButton":{"label":"Reconnect","loadingLabel":"Reconnecting..."}},"predictionStatusLabel":"Status","resolvePredictionButton":"Resolve","createPredictionButton":"New","lockPredictionButton":{"label":"Lock","loadingLabel":"Locking..."},"cancelPredictionButton":{"label":"Cancel","loadingLabel":"Cancelling..."},"showPredictionButton":{"label":"Show","labelOnClick":"Sent!"},"remainingDuration":"{{seconds, duration}} remaining","points_one":"{{count}} point","points_other":"{{count}} points"}')},1226:e=>{"use strict";e.exports=JSON.parse('{"dialogTitle":"Resolve Prediction","noPredictionDataMessage":"No prediction data loaded.","resolvingNotPossibleMessage":"This prediction cannot be resolved right now.","roundNotCompletedWarning":"The current round has not been completed!","predictionWinnerUnknownMessage":{"withoutWinner":"Unable to determine the current round\'s winner.","withWinner":"Unable to determine the current round\'s winner. The leading team is {{name}}"},"teamAButtonLabel":{"default":"Team A","winner":"Winner - Team A"},"teamBButtonLabel":{"default":"Team B","winner":"Winner - Team B"},"buttonResolvingInProgressLabel":"Resolving..."}')},2757:e=>{"use strict";e.exports=JSON.parse('{"title":"Rounds","resetRoundsButton":"Reset rounds","roundListNextRoundColorKey":"Next round","createRound":{"sectionTitle":"Create Round","create3GameRoundButton":"3 Games","create5GameRoundButton":"5 Games","create7GameRoundButton":"7 Games"},"showAllRoundsButton":"All Rounds","roundNameInput":"Name","roundTypeSelect":"Type","saveNewRoundButton":"Save"}')},1039:e=>{"use strict";e.exports=JSON.parse('{"casterImport":{"noCommentatorsReceived":"Got no commentators from API."},"obs":{"obsSocketDisabled":"OBS integration is disabled.","sceneNotFound":"Could not find one or more of the provided scenes.","inputNotFound":"Could not find one or more of the provided inputs.","missingCurrentSceneCollection":"The current scene collection is unknown.","socketClosed":"OBS websocket closed with message: {{message}}","socketOpen":"OBS websocket is open.","errorWhileConnecting":"Error while connecting to OBS:","obsConnectionFailed":"Failed to connect to OBS: {{message}}","reconnectingToSocket":"Attempting to reconnect to OBS...","receivedNoScenes":"Received scene list from OBS with no scenes. This should not be possible!","socketNotOpen":"OBS websocket is not open.","missingScreenshotImageFormat":"Screenshot image format is undefined. Cannot continue.","sceneItemLoadingFailed":"Failed to load items for scene {{sceneName}}:","errorAfterSocketOpen":"Error loading OBS data:","errorAfterSceneCollectionChange":"Error loading OBS data after scene collection change:","missingGameplayInput":"Gameplay input is unset. Change it from the Settings dashboard panel."},"activeRoundHelper":{"gameOutOfRange":"Cannot set winner for game {{index}} as it does not exist.","matchNotFound":"Could not find match {{matchId}}.","teamNotFound":"Could not find a team."},"bundleHelper":{"gameVersionParsingFailedWarning":"Could not parse compatible game versions for bundle \'{{bundleName}}\'"},"nextRoundHelper":{"roundNotFound":"Could not find round {{roundId}}.","teamNotFound":"Could not find a team."},"roundStoreHelper":{"defaultRoundName":"Default Round {{roundNumber}}"},"battlefyClient":{"battlefyReturnedError":"Got error from Battlefy: {{message}}","battlefyReturnedNoData":"Couldn\'t get tournament data from Battlefy.","battlefyReturnedUnknownResponse":"Received an unknown response from Battlefy.","placeholderTournamentName":"Unknown Tournament","matchName":"Round {{roundNumber}} Match {{matchNumber}}","shortMatchName":"{{stageName}} Round {{roundNumber}}"},"radiaClient":{"missingGuildId":"No guild ID provided.","predictionSupportCheckError":"Failed to check for prediction support: {{message}}","requestFailed":"Radia API request failed with response {{statusCode}}"},"startggClient":{"tournamentNotFound":"Could not find tournament with slug \'{{slug}}\'.","noEventsFoundForTournament":"Tournament \'{{slug}} has no events.","eventNotFound":"Could not find event with id \'{{eventId}}\'","shortRoundName":{"withoutPool":"{{phaseName}} Round {{roundNumber}}","withPool":"{{phaseName}} Pool {{poolName}} Round {{roundNumber}}"},"longRoundName":"Set {{set}} - Round {{round}} - Pool {{pool}} - {{phase}}"},"fileImport":{"invalidFileOrJsonType":"Invalid attached file or jsonType property provided.","roundDataUpdateFailed":{"console":"Failed to update round data: {{message}}","response":"Got an error while parsing round data."},"teamDataUpdateFailed":{"console":"Failed to parse team data: {{message}}","response":"Got an error while parsing team data."}},"music":{"missingLastfmConfigWarning":"\\"lastfm\\" is missing from cfg/{{bundleName}}.json! Getting music information from last.fm automatically will not function.","userNotFound":"Last.fm couldn\'t find user \'{{username}}\' - error message: \'{{message}}\'"},"predictions":{"socketClosed":"Radia websocket has closed.","reconnectingToSocket":"Reconnecting to socket... (Attempt {{count}})","tooManyReconnectionAttempts":"Too many reconnection attempts. Radia websocket is closed.","socketTimeout":"Radia websocket has not been reachable for {{count}} milliseconds. Closing connection...","missingBundleConfigurationWarning":"\\"radia.socketUrl\\" is missing from cfg/{{bundleName}}.json! Importing predictions will not be possible.","socketOpen":"Radia websocket is open.","socketReceivedError":"Received error from Radia websocket. Code: {{code}}, Message: {{message}}","missingGuildId":"Radia guild ID is not configured!","missingConfigurationError":"Unable to proceed as some Radia configuration is missing.","predictionDataRequestError":"Unable to get prediction data: {{message}}","socketReconnectionFailed":"Unable to reconnect to Radia websocket: {{message}}","unresolvedPredictionAlreadyExists":"An unresolved prediction already exists.","noPredictionAvailable":"No prediction available to resolve.","cannotCancelPrediction":"Cannot cancel a prediction that is not locked or active.","cannotLockPrediction":"Only an active prediction may be locked.","missingOutcome":"No outcome to resolve provided.","cannotResolvePrediction":"Only a locked prediction may be resolved."},"roundFromMapsIplabs":{"missingRoundData":"No round data found in maps.iplabs.ink url. (If this is from an older version of the site - try remaking the url.)","missingEncodingVersion":"Encoding version of maps.iplabs.ink not found.","encodingVersionTooNew":"Encoding version of maps.iplabs.ink too new. Try updating ipl-overlay-controls.","unsupportedEncodingVersion":"Encoding version of maps.iplabs.ink not supported. Try remaking the url.","invalidJsonFormat":"Invalid URL encoded JSON format."},"roundImporter":{"badGameVersionForMapsIplabs":"maps.iplabs.ink links only support Splatoon 3"},"tournamentDataHelper":{"noTeamsFound":"Tournament has no teams.","placeholderUploadedTournamentName":"Uploaded Tournament","battlefyDataImportFailed":"Could not fetch Battlefy data for tournament \'{{tournamentId}}\'","placeholderTournamentName":"Unknown Tournament","tournamentDataParsingFailed":"Invalid data provided.","radiaTournamentDataUpdateFailed":"Failed to update tournament data in Radia: {{message}}"},"tournamentImporter":{"missingStartggConfigurationWarning":"\\"smashgg\\" is not defined in cfg/{{bundleName}}.json! Importing tournament data from start.gg will not be possible.","missingStartggApiKey":"No start.gg API key is configured.","missingSendouInkApiKey":"No sendou.ink API key is configured.","rawDataImportFailed":"Got response code {{statusCode}} from {{url}}"},"tournamentRefresh":{"unsupportedSource":"Cannot refresh data from $t(common:tournamentDataSource.{{source}})"},"casters":{"casterNotFound":"Caster \'{{id}}\' not found.","badCasterIdListForReordering":"Could not re-order casters as caster ID list has unknown or missing IDs"},"roundStore":{"roundNotFound":"Could not find round \'{{id}}\'.","roundAlreadyExists":"Round \'{{id}}\' already exists.","cannotDeleteLastRound":"Cannot delete the last round."},"tournamentData":{"teamNotFound":"No team found."},"automationActions":{"unknownTask":"Unknown automation task \'{{name}}\'","actionAlreadyOngoing":"An action is already in progress.","noActionOngoing":"No action is in progress.","taskStartFailed":"Failed to start automation task","errorInTask":"Encountered an error during automation task"},"replicantFixer":{"resettingActiveColors":"Resetting active round colors as the currently assigned colors are unknown"},"versionChecker":{"incompatibleBundleWarning":"Bundle \'{{otherBundle}}\' expects version {{compatibleVersion}} of {{thisBundle}}! The installed version is {{installedVersion}}.","incompatibleGameVersionWarning":"Bundle \'{{bundleName}}\' is not compatible with $t(common:gameVersion.{{gameVersion}})!"},"screenshotParser":{"badGameVersion":"Colors cannot be detected for $t(common:gameVersion.{{gameVersion}}).","noMatchingColors":"Sampled ink colors couldn\'t be matched to any existing color combinations.","badColorSamples":"All sampled colors were too different from each other."},"missingRadiaConfigurationWarning":"\\"radia\\" is not defined in cfg/{{bundleName}}.json! Importing data from the Radia Productions API will not be possible.","invalidArgumentsError":"Invalid arguments."}')},8277:e=>{"use strict";e.exports=JSON.parse('{"title":"Settings","sectionName":{"general":"General","lastfm":"Last.fm","radia":"Radia","obs":"OBS Socket"},"showAllSettingsButton":"All Settings","lastfm":{"usernameInput":"Username"},"obs":{"missingDataMessage":"OBS data is missing. Please connect to an OBS websocket to continue.","gameplayInputSelect":"Gameplay source","gameplaySceneSelect":"Gameplay scene","intermissionSceneSelect":"Intermission scene","toggleEnable":"Enable","toggleDisable":"Disable","socketUrlInput":"Socket address","passwordInput":"Password (Optional)","connectButton":"Connect","loadingConnectButton":"Connecting...","connectButtonSuccess":"Connected!","socketDisabledMessage":"OBS websocket is disabled."},"radia":{"radiaDisabledMessage":"Radia integration is disabled.","reconnectButton":"Attempt to connect","loadingReconnectButton":"Connecting...","guildIdInput":"Guild ID","updateTournamentDataOnImportCheckbox":"Update tournament data on import"},"general":{"incompatibleBundleWarning_one":"Bundle {{bundles, list}} is incompatible with $t(common:gameVersion.{{gameVersion}}).","incompatibleBundleWarning_other":"Bundles {{bundles, list}} are incompatible with $t(common:gameVersion.{{gameVersion}}).","gameVersionChangeWarning":"Changing game versions will reset round and match data!","gameVersionSelect":"Game version","gameLocaleSelect":"Game language","interfaceLocaleSelect":"Interface language"}}')}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var r=t[a]={exports:{}};return e[a].call(r.exports,r,r.exports,n),r.exports}n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a=n(5480);module.exports=a})(); \ No newline at end of file +(()=>{var e={5295:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RadiaProductionsClient=void 0;const r=o(n(2167)),i=n(6409),s=n(8157);t.RadiaProductionsClient=class{constructor(e,t){this.axios=r.default.create({baseURL:e,headers:{Authorization:t}}),this.axios.interceptors.response.use(null,i.handleAxiosError)}getLiveCasters(e){return a(this,void 0,void 0,(function*(){var t;try{return(yield this.axios.get(`live/guild/${e}`,{validateStatus:e=>200===e})).data}catch(e){if(404===(null===(t=e.response)||void 0===t?void 0:t.status))return null;throw e}}))}searchCasters(e){return a(this,void 0,void 0,(function*(){return(0,s.isBlank)(e)?[]:(yield this.axios.get(`commentators/profile/search/${encodeURI(e)}`)).data}))}setCasters(e,t){return a(this,void 0,void 0,(function*(){yield this.axios.post(`live/guild/${e}`,t)}))}}},2553:function(e,t,n){"use strict";var a,o,r=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},l=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SendouInkClientInstance=t.SendouInkClient=void 0;const c=u(n(2167)),d=n(4134),m=s(n(8604));class p{constructor(e){this.axios=c.default.create({baseURL:"https://sendou.ink/api",headers:{Authorization:`Bearer ${e}`}})}getTournamentData(e){return l(this,void 0,void 0,(function*(){const t=yield this.axios.get(`/tournament/${e}`),n=yield this.axios.get(`/tournament/${e}/teams`);return{meta:{id:e,source:d.TournamentDataSource.SENDOU_INK,name:t.data.name,shortName:t.data.name,url:t.data.url},teams:n.data.map((e=>({id:String(e.id),name:e.name,showLogo:!0,players:e.members.map((e=>({name:e.name})))})))}}))}}t.SendouInkClient=p;const f=m.get();null!=(null===(a=f.bundleConfig.sendouInk)||void 0===a?void 0:a.apiKey)&&(t.SendouInkClientInstance=new p(null===(o=f.bundleConfig.sendouInk)||void 0===o?void 0:o.apiKey))},761:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AutomationActionController=void 0;const o=n(31),r=n(4365);class i extends o.BaseController{constructor(e,t){super(e),this.listen("startGame",(()=>{t.startAutomationAction(r.GameAutomationAction.START_GAME)})),this.listen("endGame",(()=>{t.startAutomationAction(r.GameAutomationAction.END_GAME)})),this.listen("fastForwardToNextGameAutomationTask",(()=>a(this,void 0,void 0,(function*(){yield t.fastForwardToNextAutomationTask()})))),this.listen("cancelAutomationAction",(()=>{t.cancelAutomationAction()}))}}t.AutomationActionController=i},31:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseController=void 0,t.BaseController=class{constructor(e){this.nodecg=e}listen(e,t){this.nodecg.listenFor(e,((e,a)=>n(this,void 0,void 0,(function*(){try{const n=yield t(e);a.handled||a(null,n)}catch(e){a.handled||a(e)}}))))}}},4065:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CasterImportController=void 0;const o=n(31);class r extends o.BaseController{constructor(e,t){super(e),this.listen("getLiveCommentators",(()=>a(this,void 0,void 0,(function*(){return t.getLiveCommentators()})))),this.listen("searchCommentators",(e=>a(this,void 0,void 0,(function*(){return t.searchCommentators(e)})))),this.listen("pushCastersToRadia",(()=>a(this,void 0,void 0,(function*(){return t.pushCastersToRadia()}))))}}t.CasterImportController=r},4:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ObsConnectorController=void 0;const r=n(31),i=o(n(8805)),s=n(702),l=n(6983);class u extends r.BaseController{constructor(e,t,n){super(e);const o=e.Replicant("obsCredentials"),r=e.Replicant("obsState"),u=e.Replicant("swapColorsInternally");this.listen("connectToObs",(e=>a(this,void 0,void 0,(function*(){if(o.value=e,!r.value.enabled)throw new Error(i.default.t("obs.obsSocketDisabled"));t.stopReconnecting(),yield t.connect()})))),this.listen("setObsConfig",(e=>{var n,a,o;if(!(null===(n=r.value.scenes)||void 0===n?void 0:n.some((t=>t===e.gameplayScene)))||!(null===(a=r.value.scenes)||void 0===a?void 0:a.some((t=>t===e.intermissionScene))))throw new Error(i.default.t("obs.sceneNotFound"));if(!(null===(o=r.value.inputs)||void 0===o?void 0:o.some((t=>t.name===e.gameplayInput))))throw new Error(i.default.t("obs.inputNotFound"));if(null==r.value.currentSceneCollection)throw new Error(i.default.t("obs.missingCurrentSceneCollection"));t.updateConfig(Object.assign({sceneCollection:r.value.currentSceneCollection},e))})),this.listen("setObsSocketEnabled",(e=>a(this,void 0,void 0,(function*(){if(null==e)throw new Error(i.default.t("invalidArgumentsError"));r.value.enabled=e,e?yield t.connect():yield t.disconnect()})))),this.listen("setActiveColorsFromGameplaySource",(()=>a(this,void 0,void 0,(function*(){const e=t.findCurrentConfig(),a=null==e?void 0:e.gameplayInput;if(null==a)throw new Error(i.default.t("obs.missingGameplayInput"));const o=yield t.getSourceScreenshot(a),r=yield n.sampleTeamColors(o);(0,s.setActiveColor)({categoryName:r.categoryName,categoryKey:r.categoryKey,color:u.value?(0,l.swapColors)(r):r})}))))}}t.ObsConnectorController=u},3990:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RuntimeConfigController=void 0;const a=n(31),o=n(8209),r=n(4647),i=n(2099);class s extends a.BaseController{constructor(e,t,n){super(e);const a=e.Replicant("runtimeConfig");this.listen("setGameVersion",(e=>{if(a.value.gameVersion===e.version)return null;const s=o.dependentBundles.filter((t=>!t.compatibleGameVersions.includes(e.version))).map((e=>e.name));return a.value.gameVersion=e.version,t.updateLocaleInfo(a.value.locale,e.version),n.updateAssetPaths(e.version),(0,r.resetRoundStore)(),(0,i.resetMatchStore)(!0),{incompatibleBundles:s}})),this.listen("setLocale",(e=>{t.updateLocaleInfo(e,a.value.gameVersion),a.value.locale=e}))}}t.RuntimeConfigController=s},2062:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizePronouns=void 0;const a=n(8157);t.normalizePronouns=function(e){if(null==e||"string"!=typeof e||(0,a.isBlank)(e))return e;if(e=e.toLowerCase(),/(^|\s)any\s/gi.test(e))return"any pronouns";const t=e.replace(/\s*\/\s*/g,"/").match(/\S*\/\S*/g);return null==t?e:t.map((e=>e.replace(/[.,!-]/g,""))).join(", ")}},702:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getPreviousColor=t.getNextColor=t.setActiveColor=void 0;const s=r(n(8604)),l=i(n(9591)),u=n(4719),c=n(6983),d=s.get(),m=d.Replicant("activeRound"),p=d.Replicant("runtimeConfig"),f=d.Replicant("swapColorsInternally");function h(){return u.perGameData[p.value.gameVersion].colors.find((e=>e.meta.name===m.value.activeColor.categoryName))}t.setActiveColor=function(e){const t=(0,l.default)(m.value);t.activeColor={categoryName:e.categoryName,index:e.color.index,title:e.color.title,isCustom:e.color.isCustom,clrNeutral:e.color.clrNeutral,colorKey:e.color.key,categoryKey:e.categoryKey},t.teamA.color=e.color.clrA,t.teamB.color=e.color.clrB,m.value=t},t.getNextColor=function(){const e=h(),t=m.value.activeColor.index,n=e.colors.find((n=>n.index===(t+1===e.colors.length?0:t+1)));return Object.assign(Object.assign({},f.value?(0,c.swapColors)(n):n),{categoryName:e.meta.name,categoryKey:e.meta.key})},t.getPreviousColor=function(){const e=h(),t=m.value.activeColor.index,n=e.colors.find((n=>n.index===(0===t?e.colors.length-1:t-1)));return Object.assign(Object.assign({},f.value?(0,c.swapColors)(n):n),{categoryName:e.meta.name,categoryKey:e.meta.key})}},5851:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setActiveRoundTeams=t.setActiveRoundGames=t.setWinner=void 0;const s=n(9383),l=n(117),u=r(n(8604)),c=i(n(9699)),d=n(5780),m=i(n(9591)),p=i(n(8805)),f=n(6123),h=u.get(),g=h.Replicant("activeRound"),v=h.Replicant("swapColorsInternally"),b=h.Replicant("matchStore"),y=h.Replicant("tournamentData");t.setWinner=function(e,t){if(e>=g.value.games.length||e<0)throw new Error(p.default.t("activeRoundHelper.gameOutOfRange",{index:e+1}));const n=(0,m.default)(g.value),a=(0,m.default)(g.value.games[e]);if(t===s.GameWinner.NO_WINNER?(a.winner===s.GameWinner.ALPHA?n.teamA.score--:a.winner===s.GameWinner.BRAVO&&n.teamB.score--,n.games[e].winner=s.GameWinner.NO_WINNER,n.games[e].color=void 0):(t===s.GameWinner.ALPHA?(n.teamA.score++,n.games[e].winner=t,a.winner===s.GameWinner.BRAVO&&n.teamB.score--):t===s.GameWinner.BRAVO&&(n.teamB.score++,n.games[e].winner=t,a.winner===s.GameWinner.ALPHA&&n.teamA.score--),a.color||(n.games[e].color=Object.assign(Object.assign({},g.value.activeColor),{clrA:g.value.teamA.color,clrB:g.value.teamB.color,colorsSwapped:v.value}))),n.match.type===f.PlayType.BEST_OF){const e=n.games.length/2;n.match.isCompleted=n.teamA.score>e||n.teamB.score>e}else n.match.isCompleted=!n.games.some((e=>e.winner===s.GameWinner.NO_WINNER));g.value=n,(0,l.commitActiveRoundToMatchStore)()},t.setActiveRoundGames=function(e,t){const n=b.value[t];if((0,c.default)(n))throw new Error(p.default.t("activeRoundHelper.matchNotFound",{matchId:t}));e.match={id:t,name:n.meta.name,isCompleted:n.meta.isCompleted,type:n.meta.type},e.games=(0,m.default)(n.games),e.teamA.score=n.teamA.score,e.teamB.score=n.teamB.score},t.setActiveRoundTeams=function(e,t,n){const a=(0,d.getTeam)(t,y.value),o=(0,d.getTeam)(n,y.value);if([a,o].filter(c.default).length>0)throw new Error(p.default.t("activeRoundHelper.teamNotFound"));const r=(0,m.default)(e.teamA),i=(0,m.default)(e.teamB);e.teamA=Object.assign({score:r.score,color:r.color},a),e.teamB=Object.assign({score:i.score,color:i.color},o)}},8209:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.dependentBundles=void 0;const s=n(7147),l=r(n(8604)),u=n(8250),c=i(n(8805)),d=l.get(),m=`${process.cwd()}/bundles`,p=Object.keys(u.GameVersion);t.dependentBundles=(0,s.readdirSync)(m,{withFileTypes:!0}).filter((e=>e.isDirectory()&&e.name!==d.bundleName)).map((e=>{const t=`${m}/${e.name}/package.json`;if((0,s.existsSync)(t)){const a=JSON.parse((0,s.readFileSync)(t,"utf-8")),o=(n=a.compatibleGameVersions,!Array.isArray(n)||n.length<=0?[u.GameVersion.SPLATOON_2]:n.filter((e=>p.includes(e))));if(o.length<=0&&d.log.warn(c.default.t("bundleHelper.gameVersionParsingFailedWarning",{bundleName:e.name})),"compatibleDashboardVersion"in a)return{name:e.name,compatibleDashboardVersion:a.compatibleDashboardVersion,compatibleGameVersions:null!=o?o:[]}}var n;return null})).filter(Boolean)},2099:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setActiveRoundToFirstMatch=t.resetMatchStore=void 0;const s=r(n(8604)),l=n(4615),u=i(n(9591)),c=n(9383),d=n(5851),m=n(4719),p=s.get(),f=p.Replicant("matchStore"),h=p.Replicant("roundStore"),g=p.Replicant("tournamentData"),v=p.Replicant("activeRound"),b=p.Replicant("runtimeConfig"),y=p.Replicant("swapColorsInternally");function _(e=!1){const t=Object.keys(f.value)[0],n=f.value[t],a=(0,u.default)(v.value);if((0,d.setActiveRoundGames)(a,t),(0,d.setActiveRoundTeams)(a,n.teamA.id,n.teamB.id),e){const e=m.perGameData[b.value.gameVersion].colors[0],t=e.colors[0];a.teamA.color=y.value?t.clrB:t.clrA,a.teamB.color=y.value?t.clrA:t.clrB,a.activeColor={index:t.index,title:t.title,categoryName:e.meta.name,categoryKey:e.meta.key,colorKey:t.key,isCustom:t.isCustom,clrNeutral:t.clrNeutral}}v.value=a}t.resetMatchStore=function(e=!1){const t=Object.keys(h.value)[0],n=h.value[t],a=(0,l.generateId)(),o=(0,u.default)(g.value.teams[0]),r=(0,u.default)(g.value.teams[1]);f.value={[a]:{meta:{name:n.meta.name,isCompleted:!1,type:n.meta.type},teamA:Object.assign(Object.assign({},o),{score:0}),teamB:Object.assign(Object.assign({},r),{score:0}),games:n.games.map((e=>Object.assign(Object.assign({},e),{winner:c.GameWinner.NO_WINNER})))}},_(e)},t.setActiveRoundToFirstMatch=_},4594:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setNextRoundTeams=t.setNextRoundGames=void 0;const s=i(n(9699)),l=n(5780),u=r(n(8604)),c=i(n(8805)),d=u.get(),m=d.Replicant("nextRound"),p=d.Replicant("tournamentData"),f=d.Replicant("roundStore");t.setNextRoundGames=function(e){const t=f.value[e];if((0,s.default)(t))throw new Error(c.default.t("nextRoundHelper.roundNotFound",{roundId:e}));m.value.round={id:e,name:t.meta.name,type:t.meta.type},m.value.games=t.games.map((e=>({stage:e.stage,mode:e.mode})))},t.setNextRoundTeams=function(e,t){const n=(0,l.getTeam)(e,p.value),a=(0,l.getTeam)(t,p.value);if([n,a].filter(s.default).length>0)throw new Error(c.default.t("nextRoundHelper.teamNotFound"));m.value.teamA=n,m.value.teamB=a}},8604:(e,t)=>{"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),t.get=t.set=void 0,t.set=function(e){n=e},t.get=function(){return n}},4647:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.resetRoundStore=void 0;const s=r(n(8604)),l=n(6123),u=n(4594),c=n(4719),d=n(307),m=i(n(3901)),p=n(8275),f=i(n(8805)),h=s.get(),g=h.Replicant("roundStore"),v=h.Replicant("runtimeConfig");t.resetRoundStore=function(){const e="11111",t=c.perGameData[v.value.gameVersion],n=Object.keys((0,m.default)(t.stages[p.Locale.EN],["Unknown Stage","Counterpick"])),a=Object.keys((0,m.default)(t.modes[p.Locale.EN],["Unknown Mode"])),o=()=>({stage:(0,d.randomFromArray)(n),mode:(0,d.randomFromArray)(a)});g.value={"00000":{meta:{name:f.default.t("roundStoreHelper.defaultRoundName",{roundNumber:1}),type:l.PlayType.BEST_OF},games:[o(),o(),o()]},[e]:{meta:{name:f.default.t("roundStoreHelper.defaultRoundName",{roundNumber:2}),type:l.PlayType.BEST_OF},games:[o(),o(),o()]}},(0,u.setNextRoundGames)(e)}},5780:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getTeam=void 0;const o=a(n(739));t.getTeam=function(e,t,n=!0){const a=t.teams.filter((t=>t.id===e))[0];return n?(0,o.default)(a):a}},5014:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getBattlefyTournamentInfo=t.getBattlefyTournamentData=t.getBattlefyTournamentUrl=t.getBattlefyMatches=void 0;const r=o(n(2167)),i=n(4134),s=n(4417),l=o(n(8805));function u(e){return`https://battlefy.com/${e.organization.slug}/${e.slug}/${e._id}/info?infoTab=details`}function c(e){return a(this,void 0,void 0,(function*(){const t=`https://api.battlefy.com/tournaments/${e}?extend%5Bcampaign%5D%5Bsponsor%5D=true&extend%5Bstages%5D%5B%24query%5D%5BdeletedAt%5D%5B%24exists%5D=false&extend%5Bstages%5D%5B%24opts%5D%5Bname%5D=1&extend%5Bstages%5D%5B%24opts%5D%5Bbracket%5D=1&extend%5Bstages%5D%5B%24opts%5D%5BstartTime%5D=1&extend%5Bstages%5D%5B%24opts%5D%5BendTime%5D=1&extend%5Bstages%5D%5B%24opts%5D%5Bschedule%5D=1&extend%5Bstages%5D%5B%24opts%5D%5BmatchCheckinDuration%5D=1&extend%5Bstages%5D%5B%24opts%5D%5BhasCheckinTimer%5D=1&extend%5Bstages%5D%5B%24opts%5D%5BhasStarted%5D=1&extend%5Bstages%5D%5B%24opts%5D%5BhasMatchCheckin%5D=1&extend%5Borganization%5D%5Bowner%5D%5B%24opts%5D%5Btimezone%5D=1&extend%5Borganization%5D%5B%24opts%5D%5Bname%5D=1&extend%5Borganization%5D%5B%24opts%5D%5Bslug%5D=1&extend%5Borganization%5D%5B%24opts%5D%5BownerID%5D=1&extend%5Borganization%5D%5B%24opts%5D%5BlogoUrl%5D=1&extend%5Borganization%5D%5B%24opts%5D%5BbannerUrl%5D=1&extend%5Borganization%5D%5B%24opts%5D%5Bfeatures%5D=1&extend%5Borganization%5D%5B%24opts%5D%5Bfollowers%5D=1&extend%5Bgame%5D=true&extend%5Bstreams%5D%5B%24query%5D%5BdeletedAt%5D%5B%24exists%5D=false`;return(yield r.default.get(t)).data[0]}))}t.getBattlefyMatches=function(e,t,n){return a(this,void 0,void 0,(function*(){const a=`https://api.battlefy.com/tournaments/${e}?extend[stages][$query][deletedAt][$exists]=false&extend[stages][matches]=1&extend[stages][$opts][name]=1&extend[stages][$opts][matches][$elemMatch][isMarkedLive]=true&extend[stages.matches.top.team]=1&extend[stages.matches.bottom.team]=1&extend[stages][$opts][bracket]=1&extend[stages.matches.top.team.persistentTeam]=1&extend[stages.matches.bottom.team.persistentTeam]=1&extend[stages.matches.top.team.players]=1&extend[stages.matches.bottom.team.players]=1`,o=yield r.default.get(a),{data:i}=o;if(i.error)throw new Error(l.default.t("battlefyClient.battlefyReturnedError",{message:i.error}));if(!i[0])throw new Error(l.default.t("battlefyClient.battlefyReturnedNoData"));const u=i[0];return n?(0,s.mapBattlefyStagesToHighlightedMatches)(u.stages):(0,s.mapBattlefyStagesToHighlightedMatches)(u.stages.filter((e=>t.includes(e._id))))}))},t.getBattlefyTournamentUrl=u,t.getBattlefyTournamentData=function(e){return a(this,void 0,void 0,(function*(){const t=yield c(e),n="https://dtmwra1jsgyb0.cloudfront.net/tournaments/"+e+"/teams";return new Promise(((a,o)=>{r.default.get(n).then((n=>{var r;const{data:c}=n;if(!Array.isArray(c))return c.error?o(new Error(c.error)):o(new Error(l.default.t("battlefyClient.battlefyReturnedUnknownResponse")));const d={meta:{id:e,source:i.TournamentDataSource.BATTLEFY,name:t.name,shortName:null!==(r=t.name)&&void 0!==r?r:l.default.t("battlefyClient.placeholderTournamentName"),url:u(t)},teams:c.filter((e=>{var t;return!!e.players&&(null===(t=e.players)||void 0===t?void 0:t.length)>0})).map((e=>{var t;return{id:e._id,name:e.name,logoUrl:null===(t=e.persistentTeam)||void 0===t?void 0:t.logoUrl,showLogo:!0,players:e.players.map((e=>({name:e.inGameName,username:e.username})))}})),stages:(0,s.mapBattlefyStagesToTournamentData)(t.stages)};a(d)})).catch((e=>{o(e)}))}))}))},t.getBattlefyTournamentInfo=c},6409:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.updateTournamentData=t.handleAxiosError=t.createPrediction=t.updatePrediction=t.getPredictions=t.hasPredictionSupport=t.getGuildInfo=void 0;const l=s(n(2167)),u=r(n(8604)),c=n(8157),d=s(n(8805)),m=u.get();function p(e){var t;if("response"in e){let n=d.default.t("radiaClient.requestFailed",{statusCode:e.response.status});throw(null===(t=e.response.data)||void 0===t?void 0:t.detail)&&("object"==typeof e.response.data.detail?e.response.data.detail.message?n+=`: ${e.response.data.detail.message}`:n+=`: ${JSON.stringify(e.response.data.detail)}`:n+=`: ${e.response.data.detail}`),new Error(n)}throw e}t.getGuildInfo=function(e){return i(this,void 0,void 0,(function*(){if((0,c.isBlank)(e))throw new Error(d.default.t("radiaClient.missingGuildId"));try{return(yield l.default.get(`${m.bundleConfig.radia.url}/organisation/guild/${e}`,{headers:{Authorization:m.bundleConfig.radia.authentication}})).data}catch(e){p(e)}}))},t.hasPredictionSupport=function(e){return i(this,void 0,void 0,(function*(){if((0,c.isBlank)(m.bundleConfig.radia.authentication)||(0,c.isBlank)(e))return!1;try{const t=yield l.default.get(`${m.bundleConfig.radia.url}/predictions/check/${e}`,{headers:{Authorization:m.bundleConfig.radia.authentication}});return 200===t.status?"boolean"==typeof t.data.twitch&&t.data.twitch:(m.log.error(d.default.t("radiaClient.predictionSupportCheckError",{message:t.data.detail})),!1)}catch(e){return m.log.error(d.default.t("radiaClient.predictionSupportCheckError",{message:e})),!1}}))},t.getPredictions=function(e){return i(this,void 0,void 0,(function*(){if((0,c.isBlank)(e))throw new Error(d.default.t("radiaClient.missingGuildId"));try{return(yield l.default.get(`${m.bundleConfig.radia.url}/predictions/${e}`,{headers:{Authorization:m.bundleConfig.radia.authentication}})).data}catch(e){p(e)}}))},t.updatePrediction=function(e,t){return i(this,void 0,void 0,(function*(){if((0,c.isBlank)(e))throw new Error(d.default.t("radiaClient.missingGuildId"));try{return(yield l.default.patch(`${m.bundleConfig.radia.url}/predictions/${e}`,t,{headers:{Authorization:m.bundleConfig.radia.authentication}})).data}catch(e){p(e)}}))},t.createPrediction=function(e,t){return i(this,void 0,void 0,(function*(){if((0,c.isBlank)(e))throw new Error(d.default.t("radiaClient.missingGuildId"));try{return(yield l.default.post(`${m.bundleConfig.radia.url}/predictions/${e}`,t,{headers:{Authorization:m.bundleConfig.radia.authentication}})).data}catch(e){p(e)}}))},t.handleAxiosError=p,t.updateTournamentData=function(e,t,n){return i(this,void 0,void 0,(function*(){if((0,c.isBlank)(e))throw new Error(d.default.t("radiaClient.missingGuildId"));const a=yield l.default.post(`${m.bundleConfig.radia.url}/organisation/guild/${e}`,{bracket_link:t,tournament_name:n},{headers:{Authorization:m.bundleConfig.radia.authentication}});if(200!==a.status)throw new Error(d.default.t("radiaClient.requestFailed",{statusCode:a.status}));return a.data}))}},6337:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSmashGGStreamQueue=t.getSmashGGData=t.getSmashGGEvents=void 0;const r=o(n(2167)),i=n(4134),s=o(n(9699)),l=n(5735),u=n(2062),c=o(n(8805));function d(e,t,n){return a(this,arguments,void 0,(function*(e,t,n,a=!1){const o=yield r.default.post("https://api.smash.gg/gql/alpha",JSON.stringify({query:"query EventEntrants($eventId: ID!, $page: Int!, $perPage: Int!) {\n event(id: $eventId) {\n id\n videogame {\n displayName\n }\n tournament {\n id\n name\n slug\n streams{\n id\n streamName\n }\n }\n name\n entrants(query: {\n page: $page\n perPage: $perPage\n }) {\n pageInfo {\n total\n totalPages\n }\n nodes {\n id\n name\n team {\n images {\n type\n url\n }\n }\n participants {\n id\n prefix\n gamerTag\n user{\n genderPronoun\n }\n }\n }\n }\n }\n }",variables:{eventId:t,page:e,perPage:"50"}}),{headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${n}`}}),{data:i}=o;if(!i.data.event)throw new Error(c.default.t("startggClient.eventNotFound",{eventId:t}));const l=[];return i.data.event.entrants.nodes.forEach((e=>{var t,n;l.push({id:e.id.toString(10),name:e.name,showLogo:!0,logoUrl:null===(n=null===(t=e.team)||void 0===t?void 0:t.images.find((e=>"profile"===e.type)))||void 0===n?void 0:n.url,players:e.participants.map((e=>{var t;return{name:(0,s.default)(e.prefix)?e.gamerTag:`${e.prefix} ${e.gamerTag}`,pronouns:(0,u.normalizePronouns)(null===(t=e.user)||void 0===t?void 0:t.genderPronoun)}}))})})),a?{pageInfo:l,raw:i}:{pageInfo:l}}))}function m(e){var t,n,a;return{id:e.entrant.id.toString(),name:e.entrant.name,showLogo:!0,seed:e.seed.groupSeedNum,players:e.entrant.participants.map((e=>{var t,n;return{name:(0,s.default)(e.prefix)?e.gamerTag:`${e.prefix} ${e.gamerTag}`,pronouns:null===(n=null===(t=e.user)||void 0===t?void 0:t.genderPronoun)||void 0===n?void 0:n.toLowerCase()}})),logoUrl:null===(a=null===(n=null===(t=e.entrant.team)||void 0===t?void 0:t.images)||void 0===n?void 0:n.find((e=>"profile"===e.type)))||void 0===a?void 0:a.url}}t.getSmashGGEvents=function(e,t){return a(this,void 0,void 0,(function*(){const n=yield r.default.post("https://api.smash.gg/gql/alpha",JSON.stringify({query:"query Events($slug: String!) {\n tournament(slug: $slug) {\n id\n events {\n id\n name\n videogame {\n displayName\n }\n }\n }\n }",variables:{slug:e}}),{headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${t}`}});if(!n.data.data.tournament)throw new Error(c.default.t("startggClient.tournamentNotFound",{slug:e}));if(!n.data.data.tournament.events)throw new Error(c.default.t("startggClient.noEventsFoundForTournament",{slug:e}));return n.data.data.tournament.events.map((e=>({id:e.id,name:e.name,game:e.videogame.displayName})))}))},t.getSmashGGData=function(e,t){return a(this,void 0,void 0,(function*(){var n,a;const o=yield d(1,e,t,!0),r=o.raw.data.event.tournament.slug,s={meta:{id:r.substring(r.indexOf("/")+1),source:i.TournamentDataSource.SMASHGG,name:o.raw.data.event.tournament.name,shortName:null!==(n=o.raw.data.event.tournament.name)&&void 0!==n?n:"Unknown Tournament",url:`https://smash.gg/${o.raw.data.event.tournament.slug}/details`,sourceSpecificData:{smashgg:{tournamentId:o.raw.data.event.tournament.id,streams:null!==(a=o.raw.data.event.tournament.streams)&&void 0!==a?a:void 0,eventData:{id:o.raw.data.event.id,name:o.raw.data.event.name,game:o.raw.data.event.videogame.displayName}}}},teams:o.pageInfo};if(o.raw.data.event.entrants.pageInfo.totalPages>1){const n=[];for(let a=2;a<=o.raw.data.event.entrants.pageInfo.totalPages;a++)n.push(d(a,e,t));const a=yield Promise.all(n);for(let e=0;e{(i||o.includes(e.stream.id))&&e.sets.forEach((e=>{if(2===e.slots.length&&!e.slots.some((e=>null===e.entrant))&&e.event.id===n){const t=e.phaseGroup.phase.groupCount>1?c.default.t("startggClient.shortRoundName.withPool",{phaseName:e.phaseGroup.phase.name,poolName:e.phaseGroup.displayIdentifier,roundNumber:e.round}):c.default.t("startggClient.shortRoundName.withoutPool",{phaseName:e.phaseGroup.phase.name,roundNumber:e.round});d.push({meta:{id:e.id.toString(),stageName:e.phaseGroup.displayIdentifier,round:e.round,match:0,name:c.default.t("startggClient.longRoundName",{set:e.identifier,round:e.round,pool:e.phaseGroup.displayIdentifier,phase:e.phaseGroup.phase.name}),shortName:t,playType:l.PlayTypeHelper.fromSmashggSetGamesType(e.setGamesType)},teamA:m(e.slots[0]),teamB:m(e.slots[1])})}}))})),d):[]}))}},3842:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const l=n(5608),u=r(n(8604)),c=s(n(6674)),d=n(4137),m=n(406),p=s(n(8805)),f=u.get(),h=f.Replicant("runtimeConfig"),g=f.Router();g.post("/upload-tournament-json",(0,c.default)({limits:{fileSize:52428800}}),((e,t)=>i(void 0,void 0,void 0,(function*(){if(!e.files||!e.files.file||!e.body.jsonType||Array.isArray(e.files.file)||"application/json"!==e.files.file.mimetype)return t.status(400).send(p.default.t("fileImport.invalidFileOrJsonType"));const n=e.files.file,a=JSON.parse(n.data.toString());switch(e.body.jsonType){case"rounds":try{(0,m.updateRounds)((0,l.handleRoundData)(a,h.value.gameVersion))}catch(e){return f.log.error(p.default.t("fileImport.roundDataUpdateFailed.console",{message:e})),t.status(400).send(p.default.t("fileImport.roundDataUpdateFailed.response"))}break;case"teams":try{const e=yield(0,d.parseUploadedTeamData)(a,n.name);(0,d.updateTournamentDataReplicants)(e)}catch(e){return f.log.error(p.default.t("fileImport.teamDataUpdateFailed.console",{message:e})),t.status(400).send(p.default.t("fileImport.teamDataUpdateFailed.response"))}break;default:return t.status(400).send("Invalid value provided for jsonType.")}t.sendStatus(200)})))),f.mount("/ipl-overlay-controls",g)},4278:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8604)),l=n(8394),u=n(4134),c=n(5014),d=n(6337),m=s.get(),p=m.Replicant("highlightedMatches"),f=m.Replicant("tournamentData");function h(e){e.sort(((e,t)=>{const n=`${e.meta.stageName} ${e.meta.name}`,a=`${t.meta.stageName} ${t.meta.name}`;return na?1:0})),e.length>0&&(p.value=e)}m.listenFor("getHighlightedMatches",((e,t)=>i(void 0,void 0,void 0,(function*(){var n,a;switch(f.value.meta.source){case u.TournamentDataSource.BATTLEFY:if(!e.stages&&!e.getAllMatches)return t(new Error("Missing arguments."));(0,c.getBattlefyMatches)(f.value.meta.id,e.stages,e.getAllMatches).then((e=>e.length>0?(h(e),t(null,{status:l.ImportStatus.SUCCESS,data:e})):t(null,{status:l.ImportStatus.NO_DATA,data:e}))).catch((e=>{t(e)}));break;case u.TournamentDataSource.SMASHGG:{const o=null===(a=null===(n=m.bundleConfig)||void 0===n?void 0:n.smashgg)||void 0===a?void 0:a.apiKey;if(!o)return t(new Error("No Smash.gg API key found."));if(!e.streamIDs&&!e.getAllMatches)return t(new Error("Missing arguments."));(0,d.getSmashGGStreamQueue)(f.value.meta.id,o,f.value.meta.sourceSpecificData.smashgg.eventData.id,e.streamIDs,e.getAllMatches).then((e=>e.length>0?(h(e),t(null,{status:l.ImportStatus.SUCCESS,data:e})):t(null,{status:l.ImportStatus.NO_DATA,data:e}))).catch((e=>{t(e)}));break}default:t(new Error(`Invalid or unsupported source '${f.value.meta.source}' given.`))}}))))},4417:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.mapBattlefyStagesToHighlightedMatches=t.mapBattlefyStagesToTournamentData=void 0;const o=n(2276),r=a(n(9699)),i=n(5735),s=n(4137),l=a(n(8805));function u(e){var t;const n={id:e.team._id,name:e.team.name,logoUrl:null===(t=e.team.persistentTeam)||void 0===t?void 0:t.logoUrl,showLogo:!0,players:[]};for(let t=0;t({name:e.name,id:e._id,type:o.BracketTypeHelper.fromBattlefy(e.bracket.type,e.bracket.style),playType:i.PlayTypeHelper.fromBattlefySeriesStyle(e.bracket.seriesStyle)})))},t.mapBattlefyStagesToHighlightedMatches=function(e){const t=[],n=e.filter((e=>["swiss","elimination","roundrobin"].includes(e.bracket.type)));for(let e=0;e!0===e.isMarkedLive));for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PredictionDataMapper=void 0;const a=n(2748);t.PredictionDataMapper=class{static fromApiResponse(e){var t,n,a;return{id:e.id,broadcasterId:e.broadcaster_id,broadcasterName:e.broadcaster_name,broadcasterLogin:e.broadcaster_login,title:e.title,winningOutcome:null!==(t=e.winning_outcome_id)&&void 0!==t?t:void 0,outcomes:this.mapOutcomes(e.outcomes),duration:e.prediction_window,status:e.status,creationTime:e.created_at,endTime:null!==(n=e.ended_at)&&void 0!==n?n:void 0,lockTime:null!==(a=e.locked_at)&&void 0!==a?a:void 0}}static fromBeginEvent(e){return{id:e.id,broadcasterId:e.broadcaster_user_id,broadcasterName:e.broadcaster_user_name,broadcasterLogin:e.broadcaster_user_login,title:e.title,outcomes:e.outcomes.map((e=>({id:e.id,title:e.title,color:e.color.toUpperCase(),users:0,pointsUsed:0,topPredictors:[]}))),duration:this.getIsoTimeDifferenceSeconds(e.started_at,e.locks_at),status:"ACTIVE",creationTime:e.started_at,lockTime:e.locks_at}}static fromProgressEvent(e){return{id:e.id,broadcasterId:e.broadcaster_user_id,broadcasterName:e.broadcaster_user_name,broadcasterLogin:e.broadcaster_user_login,title:e.title,outcomes:this.mapOutcomes(e.outcomes),duration:this.getIsoTimeDifferenceSeconds(e.started_at,e.locks_at),status:"ACTIVE",creationTime:e.started_at,lockTime:e.locks_at}}static fromLockEvent(e){return{id:e.id,broadcasterId:e.broadcaster_user_id,broadcasterName:e.broadcaster_user_name,broadcasterLogin:e.broadcaster_user_login,title:e.title,outcomes:this.mapOutcomes(e.outcomes),duration:this.getIsoTimeDifferenceSeconds(e.started_at,e.locked_at),status:"LOCKED",creationTime:e.started_at,lockTime:e.locked_at}}static applyEndEvent(e,t){var n;return{id:e.id,broadcasterId:e.broadcaster_user_id,broadcasterName:e.broadcaster_user_name,broadcasterLogin:e.broadcaster_user_login,title:e.title,winningOutcome:e.winning_outcome_id,outcomes:this.mapOutcomes(e.outcomes),duration:t.duration,status:e.status.toUpperCase(),creationTime:e.started_at,lockTime:t.lockTime,endTime:null!==(n=e.ended_at)&&void 0!==n?n:void 0}}static mapOutcomes(e){return e.map((e=>({id:e.id,title:e.title,users:e.users,pointsUsed:e.channel_points,topPredictors:null==e.top_predictors?[]:e.top_predictors.map((e=>{var t;return{id:e.user_id,login:e.user_login,username:e.user_name,pointsUsed:e.channel_points_used,pointsWon:null!==(t=e.channel_points_won)&&void 0!==t?t:0}})),color:e.color.toUpperCase()})))}static getIsoTimeDifferenceSeconds(e,t){const n=a.DateTime.fromISO(e),o=a.DateTime.fromISO(t);return Math.round(o.diff(n).as("seconds"))}}},1910:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(2085),l=i(n(739)),u=r(n(8604)),c=i(n(9699)),d=i(n(8805)),m=u.get(),p=m.Replicant("lastFmNowPlaying"),f=m.Replicant("manualNowPlaying"),h=m.Replicant("nowPlayingSource"),g=m.Replicant("nowPlaying");!function(){const e=new s.LastFmNode({api_key:m.bundleConfig.lastfm.apiKey,secret:m.bundleConfig.lastfm.secret});let t;m.Replicant("lastFmSettings").on("change",(n=>{(0,c.default)(m.bundleConfig)||(0,c.default)(m.bundleConfig.lastfm)||(0,c.default)(m.bundleConfig.lastfm.apiKey)||(0,c.default)(m.bundleConfig.lastfm.secret)?m.log.warn(d.default.t("music.missingLastfmConfigWarning",{bundleName:m.bundleName})):(0,c.default)(n.username)||(t&&t.stop(),t=e.stream(n.username),t.on("nowPlaying",(e=>{p.value={artist:e.artist["#text"],song:e.name,album:e.album["#text"],cover:e.image[2]["#text"],artistSong:`${e.artist["#text"]} - ${e.name}`}})),t.on("error",(e=>{6===e.error&&(m.log.info(d.default.t("music.userNotFound",{username:n.username,message:e.message})),t.stop())})),t.start())}))}(),function(){const e={lastfm:p,manual:f};h.on("change",(t=>{switch(t){case"manual":case"lastfm":g.value=(0,l.default)(e[t].value);break;default:throw new Error("Invalid value for nowPlayingSource.")}}));for(const[t,n]of Object.entries(e))n.on("change",(e=>{h.value===t&&(g.value=(0,l.default)(e))}))}()},4029:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(n(8604)),u=n(6409),c=s(n(5352)),d=n(1068),m=n(2748),p=s(n(9699)),f=n(8157),h=n(9694),g=s(n(8805)),v=l.get(),b=v.Replicant("radiaSettings"),y=v.Replicant("predictionStore");let _,S,w,C=0;const O=[1e3,2500,5e3,1e4,25e3],k=5,A=2e4,D=4001;function M(e){function t(){clearTimeout(S),S=setTimeout((()=>{v.log.warn(g.default.t("predictions.socketTimeout",{count:A})),_.terminate()}),A+1e3)}clearTimeout(w),(0,p.default)(v.bundleConfig.radia.socketUrl)?v.log.warn(g.default.t("predictions.missingBundleConfigurationWarning",{bundleName:v.bundleName})):(_&&_.close(D),_=new c.default(`${v.bundleConfig.radia.socketUrl}/events/guild/${e}`,{headers:{Authorization:v.bundleConfig.radia.authentication}}),_.on("open",(()=>{v.log.info(g.default.t("predictions.socketOpen")),y.value.status.socketOpen=!0,clearTimeout(w),C=0,t()})),_.on("ping",(()=>{t()})),_.on("error",(e=>{var t;v.log.error(g.default.t("predictions.socketReceivedError",{code:null!==(t=e.code)&&void 0!==t?t:"???",message:e.message}))})),_.on("close",(t=>{y.value.status.socketOpen=!1,clearTimeout(S),t!==D&&(C{v.log.info(g.default.t("predictions.reconnectingToSocket",{count:C})),M(e)}),O[C-1])):v.log.warn(g.default.t("predictions.tooManyReconnectionAttempts")))})),_.on("message",(e=>{const t=JSON.parse(e.toString());if(t.subscription&&["channel.prediction.begin","channel.prediction.progress","channel.prediction.lock","channel.prediction.end"].includes(t.subscription.type)){if(t.timestamp){if(m.DateTime.fromISO(y.value.modificationTime)>m.DateTime.fromISO(t.timestamp))return;y.value.modificationTime=t.timestamp}switch(t.subscription.type){case"channel.prediction.begin":y.value.currentPrediction=d.PredictionDataMapper.fromBeginEvent(t.event);break;case"channel.prediction.progress":y.value.currentPrediction=d.PredictionDataMapper.fromProgressEvent(t.event);break;case"channel.prediction.lock":y.value.currentPrediction=d.PredictionDataMapper.fromLockEvent(t.event);break;case"channel.prediction.end":y.value.currentPrediction=d.PredictionDataMapper.applyEndEvent(t.event,y.value.currentPrediction)}}})))}function P(e){return i(this,void 0,void 0,(function*(){if((0,f.isBlank)(e)||(0,f.isBlank)(v.bundleConfig.radia.socketUrl))throw y.value.status.predictionsEnabled=!1,y.value.status.predictionStatusReason="missingConfiguration",y.value.status.socketOpen=!1,new Error(g.default.t("predictions.missingGuildId"));const t=yield(0,u.hasPredictionSupport)(e);if(y.value.status.predictionsEnabled=t,!t)throw y.value.status.predictionStatusReason="predictionsNotSupportedByGuild",_&&_.close(D),new Error(g.default.t("predictions.missingConfigurationError"));C=0,M(e),T((yield(0,u.getPredictions)(e))[0])}))}function T(e){y.value.currentPrediction=d.PredictionDataMapper.fromApiResponse(e)}b.on("change",((e,t)=>i(void 0,void 0,void 0,(function*(){if(e.guildID!==(null==t?void 0:t.guildID))try{yield P(e.guildID)}catch(e){v.log.warn(g.default.t("predictions.predictionDataRequestError",{message:String(e)}))}})))),v.listenFor("reconnectToRadiaSocket",((e,t)=>i(void 0,void 0,void 0,(function*(){try{yield P(b.value.guildID),t(null,null)}catch(e){return v.log.warn(g.default.t("predictions.socketReconnectionFailed",{message:e.toString()})),t(e,null)}})))),v.listenFor("getPredictions",((e,t)=>i(void 0,void 0,void 0,(function*(){try{const e=yield(0,u.getPredictions)(b.value.guildID);e.length>0?(T(e[0]),t(null,e[0])):t(null,null)}catch(e){t(e)}})))),v.listenFor("postPrediction",((e,t)=>i(void 0,void 0,void 0,(function*(){var n;const a=null===(n=y.value.currentPrediction)||void 0===n?void 0:n.status;if(a===h.PredictionStatus.ACTIVE||a===h.PredictionStatus.LOCKED)return t(new Error(g.default.t("predictions.unresolvedPredictionAlreadyExists")));try{const n=yield(0,u.createPrediction)(b.value.guildID,e);T(n),t(null,n)}catch(e){t(e)}})))),v.listenFor("patchPrediction",((e,t)=>i(void 0,void 0,void 0,(function*(){var n;if(null==(null===(n=y.value.currentPrediction)||void 0===n?void 0:n.id))return t(new Error(g.default.t("predictions.noPredictionAvailable")));const a=y.value.currentPrediction.status;switch(e.status){case"CANCELED":if(a!==h.PredictionStatus.ACTIVE&&a!==h.PredictionStatus.LOCKED)return t(new Error(g.default.t("predictions.cannotCancelPrediction")));break;case"LOCKED":if(a!==h.PredictionStatus.ACTIVE)return t(new Error(g.default.t("predictions.cannotLockPrediction")));break;case"RESOLVED":if(null==e.winning_outcome_id)return t(new Error(g.default.t("predictions.missingOutcome")));if(a!==h.PredictionStatus.LOCKED)return t(new Error(g.default.t("predictions.cannotResolvePrediction")))}try{const n=yield(0,u.updatePrediction)(b.value.guildID,Object.assign({id:y.value.currentPrediction.id},e));T(n),t(null,n)}catch(e){t(e)}}))))},6574:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8604)),l=n(6409),u=s.get(),c=u.Replicant("radiaSettings");function d(e){return i(this,void 0,void 0,(function*(){try{const t=yield(0,l.getGuildInfo)(e);c.value.enabled=!0,c.value.connectedChannel=t.twitch_channel}catch(e){c.value.enabled=!1,c.value.connectedChannel=null}}))}c.on("change",((e,t)=>{if(e.guildID!==(null==t?void 0:t.guildID))return d(e.guildID)})),u.listenFor("retryRadiaAvailabilityCheck",((e,t)=>i(void 0,void 0,void 0,(function*(){return yield d(c.value.guildID),t(null,null)}))))},5608:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeStageName=t.handleRoundData=void 0;const a=n(4615),o=n(6123),r=n(4719),i=n(6517),s=n(8275);function l(e,t){const n=Object.values(r.perGameData[t].stages[s.Locale.EN]),a=n.map(i.toLower);return e=e.toLowerCase(),a.includes(e)?n[a.indexOf(e)]:"Unknown Stage"}function u(e,t){const n=Object.values(r.perGameData[t].modes[s.Locale.EN]),a=n.map(i.toLower);return e=e.toLowerCase(),a.includes(e)?n[a.indexOf(e)]:"Unknown Mode"}t.handleRoundData=function(e,t){const n={};for(let r=0;r0}(n))throw new Error(u.default.t("roundFromMapsIplabs.invalidJsonFormat"));const a={};for(const e in n.rounds){const o=n.rounds[e],u=[];for(const e in o.games){const n=o.games[e];"counterpick"!==n?"string"!=typeof n.map?u.push({stage:null!==(t=d[n.map])&&void 0!==t?t:"Unknown Stage",mode:c(n.mode)}):u.push({stage:(0,s.normalizeStageName)(n.map,l.GameVersion.SPLATOON_3),mode:c(n.mode)}):u.push({stage:"Counterpick",mode:"Unknown Mode"})}const m="playAll"===o.playStyle?i.PlayType.PLAY_ALL:i.PlayType.BEST_OF;a[(0,r.generateId)()]={meta:{name:o.name,isCompleted:!1,type:m},games:u}}return a}(n);if(a>=1)throw new Error(u.default.t("roundFromMapsIplabs.encodingVersionTooNew"));throw new Error(u.default.t("roundFromMapsIplabs.unsupportedEncodingVersion"))};const d=["Scorch Gorge","Eeltail Alley","Hagglefish Market","Undertow Spillway","Mincemeat Metalworks","Hammerhead Bridge","Museum d'Alfonsino","Mahi-Mahi Resort","Inkblot Art Academy","Sturgeon Shipyard","MakoMart","Wahoo World","Flounder Heights","Brinewater Springs","Manta Maria","Um'ami Ruins","Humpback Pump Track","Barnacle & Dime","Crableg Capital","Shipshape Cargo Co.","Bluefin Depot","Robo ROM-en"]},406:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.updateRounds=void 0;const l=s(n(2167)),u=r(n(8604)),c=n(5608),d=n(4594),m=n(8250),p=n(3185),f=s(n(8805)),h=u.get(),g=h.Replicant("roundStore"),v=h.Replicant("runtimeConfig");function b(e){g.value=e,(0,d.setNextRoundGames)(Object.keys(e)[0])}h.listenFor("getRounds",((e,t)=>i(void 0,void 0,void 0,(function*(){if(e.url)if(e.url.includes("maps.iplabs.ink")){if(v.value.gameVersion!==m.GameVersion.SPLATOON_3)return void t(new Error(f.default.t("roundImporter.badGameVersionForMapsIplabs")));try{b((0,p.importFromMapsIplabs)(e.url)),t(null,e.url)}catch(e){t(e)}}else try{const n=yield function(e){return i(this,void 0,void 0,(function*(){return new Promise(((t,n)=>{l.default.get(e,{responseType:"json"}).then((n=>{const a=(0,c.handleRoundData)(n.data,v.value.gameVersion);t({rounds:a,url:e})})).catch((e=>{n(e)}))}))}))}(e.url);b(n.rounds),t(null,n.url)}catch(e){t(e)}else t(new Error(f.default.t("invalidArgumentsError")))})))),t.updateRounds=b},4137:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.updateRadiaTournamentData=t.parseUploadedTeamData=t.updateTournamentDataReplicants=t.teamExists=void 0;const l=n(5851),u=n(4594),c=r(n(8604)),d=n(4615),m=n(4134),p=s(n(9699)),f=n(6409),h=n(8157),g=n(5014),v=n(4417),b=n(117),y=s(n(8805)),_=c.get(),S=_.Replicant("tournamentData"),w=_.Replicant("highlightedMatches"),C=_.Replicant("radiaSettings"),O=_.Replicant("activeRound"),k=_.Replicant("nextRound");function A(e){return M(e).map((e=>(null==e.id&&(e.id=(0,d.generateId)()),null==e.showLogo&&(e.showLogo=!0),e)))}t.teamExists=function(e){return S.value.teams.some((t=>t.id===e))},t.updateTournamentDataReplicants=function(e){var t,n,a,o,r;if(e.teams.length<=0)throw new Error(y.default.t("tournamentDataHelper.noTeamsFound"));e.teams.sort(((e,t)=>{const n=e.name.toUpperCase(),a=t.name.toUpperCase();return na?1:0})),e.teams=M(e.teams),S.value.meta.id!==e.meta.id||(0,h.isBlank)(S.value.meta.shortName)||(e.meta.shortName=S.value.meta.shortName),S.value=e,w.value=[],(0,b.clearMatchesWithUnknownTeams)(e),P(null===(t=e.meta)||void 0===t?void 0:t.url,null===(n=e.meta)||void 0===n?void 0:n.name);const i=e.teams[0],s=null!==(a=e.teams[1])&&void 0!==a?a:e.teams[0],c=t=>e.teams.some((e=>e.id===t));c(O.value.teamA.id)&&c(O.value.teamB.id)||(0,l.setActiveRoundTeams)(O.value,i.id,s.id),c(k.value.teamA.id)&&c(k.value.teamB.id)||(e.teams.length<5?(0,u.setNextRoundTeams)(null!==(r=null===(o=e.teams[e.teams.length-2])||void 0===o?void 0:o.id)&&void 0!==r?r:i.id,e.teams[e.teams.length-1].id):(0,u.setNextRoundTeams)(e.teams[2].id,e.teams[3].id))},t.parseUploadedTeamData=function(e,t){return i(this,void 0,void 0,(function*(){if(Array.isArray(e)){if((0,p.default)(e))throw new Error(y.default.t("tournamentDataHelper.noTeamsFound"));return{meta:{id:t,source:m.TournamentDataSource.UPLOAD,shortName:y.default.t("tournamentDataHelper.placeholderUploadedTournamentName")},teams:A(e)}}if(e instanceof Object){if((0,p.default)(e.teams))throw new Error(y.default.t("tournamentDataHelper.noTeamsFound"));(0,p.default)(e.meta.id)&&(e.meta.id=t),(0,p.default)(e.meta.source)&&(e.meta.source=m.TournamentDataSource.UPLOAD);const n=Object.assign(Object.assign({},e),{teams:A(e.teams)});if(e.meta.source===m.TournamentDataSource.BATTLEFY&&(null==e.stages||(0,p.default)(e.meta.name)||(0,p.default)(e.meta.url)))try{const t=yield(0,g.getBattlefyTournamentInfo)(e.meta.id);null==e.stages&&(n.stages=(0,v.mapBattlefyStagesToTournamentData)(t.stages)),(0,p.default)(e.meta.name)&&(n.meta.name=t.name),(0,p.default)(e.meta.url)&&(e.meta.url=(0,g.getBattlefyTournamentUrl)(t))}catch(t){_.log.warn(y.default.t("tournamentDataHelper.battlefyDataImportFailed",{tournamentId:e.meta.id}),t)}return(0,h.isBlank)(e.meta.shortName)&&(e.meta.shortName=(0,h.isBlank)(e.meta.name)?y.default.t("tournamentDataHelper.placeholderTournamentName"):e.meta.name),n}throw new Error(y.default.t("tournamentDataHelper.tournamentDataParsingFailed"))}))};const D=512;function M(e){return e.map((e=>{var t;return Object.assign(Object.assign({},e),{name:(0,h.addDots)(e.name,D),players:null===(t=e.players)||void 0===t?void 0:t.map((e=>Object.assign(Object.assign({},e),{name:(0,h.addDots)(e.name,D)})))})}))}function P(e,t){return i(this,void 0,void 0,(function*(){if(C.value.updateOnImport&&!(0,h.isBlank)(C.value.guildID)&&!(0,h.isBlank)(e)&&!(0,h.isBlank)(t))try{yield(0,f.updateTournamentData)(C.value.guildID,e,t)}catch(e){_.log.warn(y.default.t("tournamentDataHelper.radiaTournamentDataUpdateFailed",{message:e}))}}))}t.updateRadiaTournamentData=P},52:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const l=s(n(2167)),u=r(n(8604)),c=n(4134),d=n(5014),m=n(6337),p=n(4137),f=n(2553),h=s(n(8805)),g=u.get();function v(e){return i(this,void 0,void 0,(function*(){var t,n;const a=yield(0,m.getSmashGGData)(e,null===(n=null===(t=g.bundleConfig)||void 0===t?void 0:t.smashgg)||void 0===n?void 0:n.apiKey);(0,p.updateTournamentDataReplicants)(a)}))}g.bundleConfig&&void 0!==g.bundleConfig.smashgg||g.log.warn(h.default.t("tournamentImporter.missingStartggConfigurationWarning",{bundleName:g.bundleName})),g.listenFor("getTournamentData",((e,t)=>i(void 0,void 0,void 0,(function*(){var n,a,o,r;if(e.id&&e.method)try{switch(e.method){case c.TournamentDataSource.BATTLEFY:{const n=yield(0,d.getBattlefyTournamentData)(e.id);(0,p.updateTournamentDataReplicants)(n),t(null,{id:n.meta.id});break}case c.TournamentDataSource.SMASHGG:{if(!(null===(a=null===(n=g.bundleConfig)||void 0===n?void 0:n.smashgg)||void 0===a?void 0:a.apiKey)){t(new Error(h.default.t("tournamentImporter.missingStartggApiKey")));break}const i=yield(0,m.getSmashGGEvents)(e.id,null===(r=null===(o=g.bundleConfig)||void 0===o?void 0:o.smashgg)||void 0===r?void 0:r.apiKey);return 1===i.length?(yield v(i[0].id),t(null,{id:e.id})):t(null,{id:e.id,events:i})}case c.TournamentDataSource.SENDOU_INK:{if(null==f.SendouInkClientInstance){t(new Error(h.default.t("tournamentImporter.missingSendouInkApiKey")));break}const n=yield f.SendouInkClientInstance.getTournamentData(e.id);(0,p.updateTournamentDataReplicants)(n),t(null,{id:n.meta.id});break}case c.TournamentDataSource.UPLOAD:{const n=yield function(e){return i(this,void 0,void 0,(function*(){const t=yield l.default.get(e);if(200===t.status)return(0,p.parseUploadedTeamData)(t.data,e);throw new Error(h.default.t("tournamentImporter.rawDataImportFailed",{statusCode:t.status,url:e}))}))}(e.id);(0,p.updateTournamentDataReplicants)(n),t(null,{id:n.meta.id});break}default:return t(new Error(h.default.t("invalidArgumentsError")))}}catch(e){t(e)}else t(new Error(h.default.t("invalidArgumentsError")),null)})))),g.listenFor("getSmashggEvent",((e,t)=>i(void 0,void 0,void 0,(function*(){try{return yield v(e.eventId),t(null,e.eventId)}catch(e){return t(e)}}))))},2662:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const l=r(n(8604)),u=n(4134),c=n(5014),d=n(6337),m=n(4137),p=n(2553),f=s(n(8805)),h=l.get(),g=h.Replicant("tournamentData");h.listenFor("refreshTournamentData",((e,t)=>i(void 0,void 0,void 0,(function*(){var e,n,a,o;try{const r=g.value.meta.source;switch(r){case u.TournamentDataSource.BATTLEFY:return(0,m.updateTournamentDataReplicants)(yield(0,c.getBattlefyTournamentData)(g.value.meta.id)),t(null);case u.TournamentDataSource.SMASHGG:return(null===(n=null===(e=h.bundleConfig)||void 0===e?void 0:e.smashgg)||void 0===n?void 0:n.apiKey)?((0,m.updateTournamentDataReplicants)(yield(0,d.getSmashGGData)(g.value.meta.sourceSpecificData.smashgg.eventData.id,null===(o=null===(a=h.bundleConfig)||void 0===a?void 0:a.smashgg)||void 0===o?void 0:o.apiKey)),t(null)):t(new Error(f.default.t("tournamentImporter.missingStartggApiKey")));case u.TournamentDataSource.SENDOU_INK:return null==p.SendouInkClientInstance?t(new Error(f.default.t("tournamentImporter.missingSendouInkApiKey"))):((0,m.updateTournamentDataReplicants)(yield p.SendouInkClientInstance.getTournamentData(g.value.meta.id)),t(null));default:return t(new Error(f.default.t("tournamentRefresh.unsupportedSource",{source:r})))}}catch(e){t(e)}}))))},5480:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const s=r(n(8604)),l=i(n(9699)),u=n(6908),c=n(2326),d=i(n(8805)),m=n(6197);function p(e,t){try{return n(7597)(`./${e.toLowerCase()}/${t}.json`)}catch(e){return null}}function f(){const e={};for(const t of Object.values(m.InterfaceLocale))e[t.toLowerCase()]={common:p(t,"common"),translation:p(t,"server")};return e}e.exports=e=>{!function(e){d.default.init({lng:"en",fallbackLng:"en",resources:f(),interpolation:{escapeValue:!1}}),e.Replicant("runtimeConfig").on("change",((t,n)=>{n&&t.interfaceLocale===n.interfaceLocale||d.default.changeLanguage(t.interfaceLocale.toLowerCase()).catch((t=>{e.log.error("Failed to change interface language",t)}))}))}(e),s.set(e),n(1910),n(52),n(2662),n(406),n(3842),n(4278),n(7295),n(1018),n(22),n(3582),n(3261),n(117),n(2584),n(4643),n(7348);const{AutomationActionService:t}=n(9811),{AutomationActionController:a}=n(761),{ReplicantFixerService:o}=n(2330),{LocaleInfoService:r}=n(3567),{RuntimeConfigController:i}=n(3990),{ScreenshotParserService:m}=n(8936),{ObsConnectorController:p}=n(4),h=new m(e),g=new u.ObsConnectorService(e);new p(e,g,h);const v=new t(e,g);v.resetGameAutomationData(),new a(e,v),new o(e).fix();const b=e.Replicant("radiaSettings"),y=e.Replicant("predictionStore");y.value.status.socketOpen=!1,b.value.enabled=!1;const _=e.Replicant("runtimeConfig"),S=new c.AssetPathService(e);S.updateAssetPaths(_.value.gameVersion);const w=new r(e);if(w.initIfNeeded(),new i(e,w,S),(0,l.default)(e.bundleConfig)||(0,l.default)(e.bundleConfig.radia))e.log.warn(d.default.t("missingRadiaConfigurationWarning",{bundleName:e.bundleName})),y.value.status.predictionsEnabled=!1,y.value.status.predictionStatusReason="missingConfiguration";else{n(6574),n(4029);const{CasterImportController:t}=n(4065),{RadiaProductionsService:a}=n(5758),{RadiaProductionsClient:o}=n(5295);new t(e,new a(e,new o(e.bundleConfig.radia.url,e.bundleConfig.radia.authentication)))}}},7295:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.switchToPreviousColor=t.switchToNextColor=void 0;const s=r(n(8604)),l=n(9383),u=i(n(739)),c=n(117),d=n(5851),m=i(n(5359)),p=n(4615),f=n(8157),h=i(n(9591)),g=n(702),v=s.get(),b=v.Replicant("activeRound"),y=v.Replicant("nextRound");function _(){if(b.value.activeColor.isCustom)return;const e=(0,g.getNextColor)();(0,g.setActiveColor)({color:e,categoryName:e.categoryName,categoryKey:e.categoryKey})}function S(){if(b.value.activeColor.isCustom)return;const e=(0,g.getPreviousColor)();(0,g.setActiveColor)({color:e,categoryName:e.categoryName,categoryKey:e.categoryKey})}v.Replicant("swapColorsInternally").on("change",((e,t)=>{if(void 0!==t){const e=b.value.teamA.color;b.value.teamA.color=b.value.teamB.color,b.value.teamB.color=e}})),v.listenFor("removeWinner",((e,t)=>{try{const e=(0,m.default)(b.value.games,(e=>e.winner!==l.GameWinner.NO_WINNER));if(e<0)return;(0,d.setWinner)(e,l.GameWinner.NO_WINNER)}catch(e){t(e)}})),v.listenFor("setWinner",((e,t)=>{const n=b.value.teamA.score+b.value.teamB.score,a=null!=e.roundIndex?e.roundIndex:n;0===a&&e.winner!==l.GameWinner.NO_WINNER&&(y.value.showOnStream=!1);try{(0,d.setWinner)(a,e.winner)}catch(e){t(e)}})),v.listenFor("setActiveRound",((e,t)=>{try{const t=(0,h.default)(b.value);(0,d.setActiveRoundTeams)(t,e.teamAId,e.teamBId),e.matchId&&(0,d.setActiveRoundGames)(t,e.matchId),(0,f.isBlank)(e.matchName)||b.value.match.name===e.matchName||(b.value.match.name=e.matchName,t.match.name=e.matchName),b.value=t}catch(e){return t(e)}(0,c.commitActiveRoundToMatchStore)()})),v.listenFor("resetActiveRound",(()=>{b.value.teamA.score=0,b.value.teamB.score=0,b.value.games=b.value.games.map((e=>Object.assign(Object.assign({},e),{winner:l.GameWinner.NO_WINNER,color:void 0}))),(0,c.commitActiveRoundToMatchStore)()})),v.listenFor("updateActiveGames",(e=>{b.value.games=(0,u.default)(e.games),(0,c.commitActiveRoundToMatchStore)()})),v.listenFor("beginNextMatch",(e=>{const t=(0,f.isBlank)(null==e?void 0:e.matchName)?y.value.name:e.matchName;b.value=Object.assign(Object.assign({},b.value),{teamA:Object.assign(Object.assign({color:b.value.teamA.color},(0,u.default)(y.value.teamA)),{score:0}),teamB:Object.assign(Object.assign({color:b.value.teamB.color},(0,u.default)(y.value.teamB)),{score:0}),games:y.value.games.map((e=>Object.assign(Object.assign({},e),{winner:l.GameWinner.NO_WINNER,color:void 0}))),match:{id:(0,p.generateId)(),name:t,isCompleted:!1,type:y.value.round.type}}),(0,c.commitActiveRoundToMatchStore)()})),v.listenFor("setActiveColor",(e=>{(0,g.setActiveColor)(e)})),t.switchToNextColor=_,t.switchToPreviousColor=S,v.listenFor("switchToNextColor",(()=>{_()})),v.listenFor("switchToPreviousColor",(()=>{S()})),v.listenFor("getNextAndPreviousColors",((e,t)=>{t(null,{nextColor:(0,g.getNextColor)(),previousColor:(0,g.getPreviousColor)()})})),v.listenFor("swapRoundColor",(e=>{var t;const n=null===(t=b.value.games[e.roundIndex])||void 0===t?void 0:t.color;n&&n.colorsSwapped!==e.colorsSwapped&&(b.value.games[e.roundIndex].color=Object.assign(Object.assign({},n),{clrA:n.clrB,clrB:n.clrA,colorsSwapped:!n.colorsSwapped}))}))},3582:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8604)),l=n(4615),u=i(n(8805)),c=s.get(),d=c.Replicant("casters");c.listenFor("removeCaster",((e,t)=>{if(!d.value[e.id])return t(new Error(u.default.t("casters.casterNotFound",{id:e.id})));delete d.value[e.id]})),c.listenFor("saveCaster",((e,t)=>{const n=(0,l.generateId)();d.value[n]=e,t(null,n)})),c.listenFor("setCasterOrder",((e,t)=>Array.isArray(e.casterIds)?e.casterIds.every((e=>!!d.value[e]))&&e.casterIds.length===Object.keys(d.value).length?(d.value=e.casterIds.reduce(((e,t)=>(e[t]=d.value[t],e)),{}),void t(null)):t(new Error(u.default.t("casters.badCasterIdListForReordering"))):t(new Error(u.default.t("invalidArgumentsError")))))},3261:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(8604)),s=n(2748),l=i.get(),u=l.Router(),c=l.Replicant("matchStore");u.get("/match-data",((e,t)=>{t.set({"Content-Disposition":`attachment; filename="iploc-match-data_${s.DateTime.now().setZone("utc").toFormat("yyyy-LL-dd'T'T")}.json"`}),t.send(JSON.stringify(Object.values(c.value),null,4))})),l.mount(`/${l.bundleName}`,u)},117:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.commitActiveRoundToMatchStore=t.clearMatchesWithUnknownTeams=void 0;const s=r(n(8604)),l=i(n(739)),u=n(2748),c=i(n(9591)),d=i(n(9699)),m=n(2099),p=s.get(),f=p.Replicant("matchStore"),h=p.Replicant("activeRound");t.clearMatchesWithUnknownTeams=function(e){const t=e.teams.map((e=>e.id)),n=(0,c.default)(f.value);Object.entries(n).forEach((([e,a])=>{(0,d.default)(a.teamA)&&(0,d.default)(a.teamB)||t.includes(a.teamA.id)&&t.includes(a.teamB.id)||delete n[e]})),Object.keys(n).length<=0?(0,m.resetMatchStore)():(f.value=n,n[h.value.match.id]||(0,m.setActiveRoundToFirstMatch)())},t.commitActiveRoundToMatchStore=function(){const e=(0,l.default)(h.value),t=e.match.isCompleted?u.DateTime.utc().toISO():void 0;f.value[e.match.id]={meta:{name:e.match.name,isCompleted:e.match.isCompleted,completionTime:t,type:e.match.type},teamA:e.teamA,teamB:e.teamB,games:e.games.map((e=>({stage:e.stage,mode:e.mode,winner:e.winner,color:e.color})))}}},1018:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(8604)),s=n(4594),l=i.get(),u=l.Replicant("nextRound");l.listenFor("setNextRound",((e,t)=>{try{(0,s.setNextRoundTeams)(e.teamAId,e.teamBId),e.roundId&&(0,s.setNextRoundGames)(e.roundId),u.value.name=e.name}catch(e){return t(e)}return t(null)}))},2584:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(n(8604)),l=n(4594),u=n(4615),c=n(4647),d=i(n(8805)),m=s.get(),p=m.Replicant("roundStore"),f=m.Replicant("nextRound");m.listenFor("updateRound",((e,t)=>{if(!e.id)return t(new Error(d.default.t("invalidArgumentsError")));if(!p.value[e.id])return t(new Error(d.default.t("roundStore.roundNotFound",{id:e.id})));const n=p.value[e.id];e.games&&(n.games=e.games),e.roundName&&(n.meta.name=e.roundName),e.type&&(n.meta.type=e.type),f.value.round.id===e.id&&(0,l.setNextRoundGames)(e.id),t(null)})),m.listenFor("insertRound",((e,t)=>{var n;if(e.id&&p.value[e.id])return t(new Error(d.default.t("roundStore.roundAlreadyExists",{id:e.id})));const a=null!==(n=e.id)&&void 0!==n?n:(0,u.generateId)();return p.value[a]={games:e.games,meta:{name:e.roundName,isCompleted:!1,type:e.type}},t(null,{id:a,round:{games:e.games,meta:{name:e.roundName,type:e.type}}})})),m.listenFor("removeRound",((e,t)=>{if(Object.keys(p.value).length<=1)return t(new Error(d.default.t("roundStore.cannotDeleteLastRound")));if(!p.value[e.roundId])return t(new Error(d.default.t("roundStore.roundNotFound",{id:e.roundId})));delete p.value[e.roundId];try{const t=Object.keys(p.value)[0];f.value.round.id===e.roundId&&(0,l.setNextRoundGames)(t)}catch(e){return t(e)}})),m.listenFor("resetRoundStore",(()=>{(0,c.resetRoundStore)()}))},4643:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.setFlavorText=void 0;const i=r(n(8604)).get(),s=i.Replicant("scoreboardData"),l=i.Replicant("activeRound"),u=i.Replicant("tournamentData");function c(e,t){s.value.flavorText=`${e} - ${t}`}l.on("change",((e,t)=>{e.match.name!==(null==t?void 0:t.match.name)&&c(u.value.meta.shortName,e.match.name)})),u.on("change",((e,t)=>{t&&e.meta.shortName!==t.meta.shortName&&c(e.meta.shortName,l.value.match.name)})),t.setFlavorText=c},22:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=n(5780),l=r(n(8604)),u=i(n(8805)),c=l.get(),d=c.Replicant("tournamentData"),m=c.Replicant("activeRound"),p=c.Replicant("nextRound");function f(e){const t=(0,s.getTeam)(e.id,d.value);return Object.assign(Object.assign({},e),t)}c.listenFor("toggleTeamImage",((e,t)=>{const n=d.value.teams.filter((t=>t.id===e.teamId))[0];if(null==n)return t(new Error(u.default.t("tournamentData.teamNotFound")));n.showLogo=e.isVisible,m.value.teamA=f(m.value.teamA),m.value.teamB=f(m.value.teamB),p.value.teamA=f(p.value.teamA),p.value.teamB=f(p.value.teamB)}))},2326:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AssetPathService=void 0;const a=n(4719);t.AssetPathService=class{constructor(e){this.nodecg=e,this.assetPaths=e.Replicant("assetPaths")}updateAssetPaths(e){const t=a.perGameData[e];this.assetPaths.value.stageImages=Object.fromEntries(Object.entries(t.stageImagePaths).map((([e,t])=>[e,`/bundles/${this.nodecg.bundleName}/stage-images/${t}`])))}}},9811:function(e,t,n){"use strict";var a=this&&this.__createBinding||(Object.create?function(e,t,n,a){void 0===a&&(a=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,o)}:function(e,t,n,a){void 0===a&&(a=n),e[a]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},i=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AutomationActionService=void 0;const l=n(8250),u=n(4365),c=n(7295),d=r(n(3837)),m=s(n(8805)),p={[l.GameVersion.SPLATOON_2]:{showScoreboard:11500,showCasters:12e3},[l.GameVersion.SPLATOON_3]:{showScoreboard:14e3,showCasters:1e4}},f={[l.GameVersion.SPLATOON_2]:{hideScoreboard:3e3,changeScene:7500},[l.GameVersion.SPLATOON_3]:{hideScoreboard:3e3,changeScene:7500}};t.AutomationActionService=class{constructor(e,t){this.nodecg=e,this.scoreboardData=e.Replicant("scoreboardData"),this.runtimeConfig=e.Replicant("runtimeConfig"),this.gameAutomationData=e.Replicant("gameAutomationData"),this.obsConnectorService=t,this.automationTasks=null}getAutomationTasks(e){const t=this.runtimeConfig.value.gameVersion;switch(e){case u.GameAutomationAction.START_GAME:return[{timeout:1e3,name:"changeScene",action:()=>i(this,void 0,void 0,(function*(){(0,c.switchToNextColor)();const e=this.obsConnectorService.findCurrentConfig();null!=(null==e?void 0:e.gameplayScene)&&(yield this.obsConnectorService.setCurrentScene(e.gameplayScene))}))},{timeout:p[t].showScoreboard,name:"showScoreboard",action:()=>{this.scoreboardData.value.isVisible=!0}},{timeout:p[t].showCasters,name:"showCasters",action:()=>{this.nodecg.sendMessage("mainShowCasters")}}];case u.GameAutomationAction.END_GAME:return[{timeout:f[t].hideScoreboard,name:"hideScoreboard",action:()=>{this.scoreboardData.value.isVisible=!1}},{timeout:f[t].changeScene,name:"changeScene",action:()=>i(this,void 0,void 0,(function*(){const e=this.obsConnectorService.findCurrentConfig();null!=(null==e?void 0:e.intermissionScene)&&(yield this.obsConnectorService.setCurrentScene(e.intermissionScene))}))}];default:throw new Error(m.default.t("automationActions.unknownTask",{name:e}))}}startAutomationAction(e){if(this.gameAutomationData.value.actionInProgress!==u.GameAutomationAction.NONE)throw new Error(m.default.t("automationActions.actionAlreadyOngoing"));this.gameAutomationData.value.actionInProgress=e,this.automationTasks=this.getAutomationTasks(e),this.queueNextAutomationTask().catch((e=>{this.nodecg.log.error(m.default.t("automationActions.taskStartFailed"),e)}))}queueNextAutomationTask(){return i(this,void 0,void 0,(function*(){var e,t;let n=(null!==(t=null===(e=this.gameAutomationData.value.nextTaskForAction)||void 0===e?void 0:e.index)&&void 0!==t?t:-1)+1,a=this.automationTasks[n];for(;0===(null==a?void 0:a.timeout);)yield this.executeAutomationTask(a),n++,a=this.automationTasks[n];a?(this.gameAutomationData.value.nextTaskForAction={index:n,name:a.name,executionTimeMillis:(new Date).getTime()+a.timeout},this.nextAutomationTaskTimeout=setTimeout((()=>i(this,void 0,void 0,(function*(){yield this.completeTimedAutomationTask(a)}))),a.timeout)):this.resetGameAutomationData()}))}completeTimedAutomationTask(e){return i(this,void 0,void 0,(function*(){clearTimeout(this.nextAutomationTaskTimeout),yield this.executeAutomationTask(e),yield this.queueNextAutomationTask()}))}executeAutomationTask(e){return i(this,void 0,void 0,(function*(){try{const t=e.action();d.types.isPromise(t)&&(yield t)}catch(e){this.nodecg.log.error(m.default.t("automationActions.errorInTask"),e)}}))}fastForwardToNextAutomationTask(){return i(this,void 0,void 0,(function*(){if(this.gameAutomationData.value.actionInProgress===u.GameAutomationAction.NONE)throw new Error(m.default.t("automationActions.noActionOngoing"));yield this.completeTimedAutomationTask(this.automationTasks[this.gameAutomationData.value.nextTaskForAction.index])}))}cancelAutomationAction(){if(this.gameAutomationData.value.actionInProgress===u.GameAutomationAction.NONE)throw new Error(m.default.t("automationActions.noActionOngoing"));clearTimeout(this.nextAutomationTaskTimeout),this.resetGameAutomationData()}resetGameAutomationData(){this.gameAutomationData.value.actionInProgress=u.GameAutomationAction.NONE,this.gameAutomationData.value.nextTaskForAction=null,this.automationTasks=null}}},3567:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LocaleInfoService=void 0;const a=n(4719);t.LocaleInfoService=class{constructor(e){this.localeInfo=e.Replicant("localeInfo"),this.runtimeConfig=e.Replicant("runtimeConfig")}initIfNeeded(){Object.keys(this.localeInfo.value.modes).length<=0&&Object.keys(this.localeInfo.value.stages).length<=0&&this.updateLocaleInfo(this.runtimeConfig.value.locale,this.runtimeConfig.value.gameVersion)}updateLocaleInfo(e,t){const n=a.perGameData[t];this.localeInfo.value={stages:n.stages[e],modes:n.modes[e]}}}},6908:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ObsConnectorService=void 0;const r=o(n(3848)),i=n(5279),s=n(8157),l=o(n(8805)),u=o(n(7441)),c=[4009,4010,4011],d=["webp","jpg","jpeg","png","tiff"],m=["sck_audio_capture","coreaudio_input_capture","coreaudio_output_capture","oss_input_capture","pulse_input_capture","pulse_output_capture","alsa_input_capture","jack_output_capture","audio_line","sndio_output_capture"];t.ObsConnectorService=class{constructor(e){this.nodecg=e,this.obsState=e.Replicant("obsState"),this.obsCredentials=e.Replicant("obsCredentials"),this.obsConfig=e.Replicant("obsConfig"),this.socket=new r.default,this.reconnectionCount=0,this.screenshotImageFormat=null,this.socket.on("ConnectionClosed",(e=>this.handleClosure(e))).on("ConnectionOpened",(()=>this.handleOpening())).on("Identified",(()=>{this.handleIdentification().catch((e=>{this.nodecg.log.error(l.default.t("obs.errorAfterSocketOpen"),e)}))})).on("CurrentProgramSceneChanged",(e=>this.handleProgramSceneChange(e))).on("CurrentSceneCollectionChanged",this.handleSceneCollectionChange.bind(this)),this.obsState.value.enabled&&this.connect().catch((t=>{e.log.error(l.default.t("obs.errorWhileConnecting"),t.toString())}))}updateConfig(e){const t=this.obsConfig.value.findIndex((t=>t.sceneCollection===e.sceneCollection));-1===t?this.obsConfig.value.push(e):this.obsConfig.value[t]=e}handleClosure(e){this.obsState.value.status===i.ObsStatus.CONNECTED&&(1e3!==e.code&&this.nodecg.log.error(l.default.t("obs.socketClosed",{message:e.message})),this.obsState.value.status=i.ObsStatus.NOT_CONNECTED,this.obsState.value.enabled&&this.startReconnecting(e.code)),this.socket.off("SceneCreated").off("SceneRemoved").off("SceneNameChanged").off("InputCreated").off("InputRemoved").off("InputNameChanged")}handleIdentification(){return a(this,void 0,void 0,(function*(){yield this.loadScreenshotImageFormat();const e=yield this.socket.call("GetSceneCollectionList");yield this.loadState(e.currentSceneCollectionName),this.socket.on("SceneCreated",this.handleSceneCreation.bind(this)).on("SceneRemoved",this.handleSceneRemoval.bind(this)).on("SceneNameChanged",this.handleSceneNameChange.bind(this)).on("InputCreated",this.handleInputCreation.bind(this)).on("InputRemoved",this.handleInputRemoval.bind(this)).on("InputNameChanged",this.handleInputNameChange.bind(this))}))}handleSceneCollectionChange(e){this.loadState(e.sceneCollectionName).catch((e=>{this.nodecg.log.error(l.default.t("obs.errorAfterSceneCollectionChange"),e)}))}loadState(e){return a(this,void 0,void 0,(function*(){const t=yield this.getScenes(),n=yield this.getInputs();this.obsState.value=Object.assign(Object.assign({},this.obsState.value),{scenes:t.scenes,currentScene:t.currentScene,currentSceneCollection:e,inputs:n})}))}handleOpening(){this.nodecg.log.info(l.default.t("obs.socketOpen")),this.obsState.value.status=i.ObsStatus.CONNECTED,this.stopReconnecting()}loadScreenshotImageFormat(){return a(this,void 0,void 0,(function*(){const e=yield this.socket.call("GetVersion");for(const t of d)if(e.supportedImageFormats.includes(t))return void(this.screenshotImageFormat=t);this.screenshotImageFormat=null}))}handleInputCreation(e){null==this.obsState.value.inputs?this.obsState.value.inputs=[{name:e.inputName,uuid:e.inputUuid,noVideoOutput:m.includes(e.inputKind)}]:this.obsState.value.inputs.push({name:e.inputName,uuid:e.inputUuid,noVideoOutput:m.includes(e.inputKind)})}handleInputRemoval(e){null!=this.obsState.value.inputs&&(this.obsState.value.inputs=this.obsState.value.inputs.filter((t=>t.name!==e.inputName)))}handleInputNameChange(e){null!=this.obsState.value.inputs&&(this.obsState.value.inputs=this.obsState.value.inputs.map((t=>t.name===e.oldInputName?Object.assign(Object.assign({},t),{name:e.inputName}):t)));const t=this.findCurrentConfig();e.oldInputName===(null==t?void 0:t.gameplayInput)&&this.updateConfig(Object.assign(Object.assign({},t),{gameplayInput:e.inputName}))}getInputs(){return a(this,void 0,void 0,(function*(){return(yield this.socket.call("GetInputList")).inputs.map((e=>({name:String(e.inputName),uuid:null==e.inputUuid?null:String(e.inputUuid),noVideoOutput:m.includes(String(e.inputKind))})))}))}handleSceneCreation(e){e.isGroup||(null==this.obsState.value.scenes?this.obsState.value.scenes=[e.sceneName]:this.obsState.value.scenes.push(e.sceneName))}handleSceneRemoval(e){e.isGroup||null==this.obsState.value.scenes||(this.obsState.value.scenes=this.obsState.value.scenes.filter((t=>t!==e.sceneName)))}handleSceneNameChange(e){null!=this.obsState.value.scenes&&(this.obsState.value.scenes=this.obsState.value.scenes.map((t=>t===e.oldSceneName?e.sceneName:t)));const t=this.findCurrentConfig();if(null!=t){const n={};for(const a of["gameplayScene","intermissionScene"])t[a]===e.oldSceneName&&(n[a]=e.sceneName);Object.keys(n).length>0&&this.updateConfig(Object.assign(Object.assign({},t),n))}}handleProgramSceneChange(e){this.obsState.value.currentScene=e.sceneName}getScenes(){return a(this,void 0,void 0,(function*(){const e=yield this.socket.call("GetSceneList"),t=e.scenes.map((e=>String(e.sceneName)));return{currentScene:e.currentProgramSceneName,scenes:t}}))}setCurrentScene(e){return this.socket.call("SetCurrentProgramScene",{sceneName:e})}connect(){return a(this,arguments,void 0,(function*(e=!0){var t;yield this.socket.disconnect(),this.obsState.value.status=i.ObsStatus.CONNECTING;const n=-1===this.obsCredentials.value.address.indexOf("://")?`ws://${this.obsCredentials.value.address}`:this.obsCredentials.value.address;try{yield this.socket.connect(n,(0,s.isBlank)(this.obsCredentials.value.password)?void 0:this.obsCredentials.value.password)}catch(n){throw this.obsState.value.status=i.ObsStatus.NOT_CONNECTED,e&&this.startReconnecting(n.code),new Error(l.default.t("obs.obsConnectionFailed",{message:null!==(t=n.message)&&void 0!==t?t:String(n)}))}}))}disconnect(){return a(this,void 0,void 0,(function*(){this.stopReconnecting(),yield this.socket.disconnect()}))}startReconnecting(e){c.includes(e)||(this.stopReconnecting(),this.reconnectionInterval=setInterval((()=>{this.reconnectionCount++,1===this.reconnectionCount&&this.nodecg.log.info(l.default.t("obs.reconnectingToSocket")),this.connect(!1).catch((()=>{}))}),1e4))}stopReconnecting(){clearInterval(this.reconnectionInterval),this.reconnectionInterval=null,this.reconnectionCount=0}getSourceScreenshot(e){return a(this,void 0,void 0,(function*(){if(this.obsState.value.status!==i.ObsStatus.CONNECTED)throw new Error(l.default.t("obs.socketNotOpen"));if(null==this.screenshotImageFormat)throw new Error(l.default.t("obs.missingScreenshotImageFormat"));const t=yield this.socket.call("GetSourceScreenshot",{sourceName:e,imageFormat:this.screenshotImageFormat}),n=t.imageData.substring(t.imageData.indexOf(",")+1),a=Buffer.from(n,"base64");return(0,u.default)(a)}))}findConfig(e){if(null!=e)return this.obsConfig.value.find((t=>t.sceneCollection===e))}findCurrentConfig(){return this.findConfig(this.obsState.value.currentSceneCollection)}}},5758:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RadiaProductionsService=void 0;const r=o(n(8805));t.RadiaProductionsService=class{constructor(e,t){this.radiaProductionsClient=t,this.radiaSettings=e.Replicant("radiaSettings"),this.casters=e.Replicant("casters")}getLiveCommentators(){return a(this,void 0,void 0,(function*(){const e=yield this.radiaProductionsClient.getLiveCasters(this.radiaSettings.value.guildID);if(e.length<=0)throw new Error(r.default.t("casterImport.noCommentatorsReceived"));const t=e.map(this.normalizeCaster),n=this.mapRadiaCastersToReplicantSchema(t.slice(0,3)),a=this.mapRadiaCastersToReplicantSchema(t.slice(3));return this.casters.value=n,{add:n,extra:a}}))}searchCommentators(e){return a(this,void 0,void 0,(function*(){const t=(yield this.radiaProductionsClient.searchCasters(e)).map(this.normalizeCaster);return this.mapRadiaCastersToReplicantSchema(t)}))}pushCastersToRadia(){return a(this,void 0,void 0,(function*(){yield this.radiaProductionsClient.setCasters(this.radiaSettings.value.guildID,this.mapCastersToRadiaApi(this.casters.value))}))}normalizeCaster(e){return e.twitter=`@${e.twitter}`,e.pronouns=e.pronouns.toLowerCase(),e}mapRadiaCastersToReplicantSchema(e){return e.reduce(((e,t)=>{const n=t.discord_user_id;return delete t.discord_user_id,e[n]=t,e}),{})}mapCastersToRadiaApi(e){return Object.entries(e).map((([e,t])=>({discord_user_id:e,name:t.name,pronouns:t.pronouns,twitter:t.twitter})))}}},2330:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReplicantFixerService=void 0;const o=n(4719),r=a(n(8805));t.ReplicantFixerService=class{constructor(e){this.nodecg=e,this.activeRound=e.Replicant("activeRound"),this.runtimeConfig=e.Replicant("runtimeConfig"),this.swapColorsInternally=e.Replicant("swapColorsInternally")}fix(){const e=o.perGameData[this.runtimeConfig.value.gameVersion].colors;if(null==e.find((e=>e.meta.name===this.activeRound.value.activeColor.categoryName))){this.nodecg.log.info(r.default.t("replicantFixer.resettingActiveColors"));const t=e[0].colors[0];this.activeRound.value.activeColor={categoryName:e[0].meta.name,categoryKey:e[0].meta.key,clrNeutral:t.clrNeutral,index:t.index,title:t.title,isCustom:t.isCustom,colorKey:t.key},this.activeRound.value.teamA.color=this.swapColorsInternally.value?t.clrB:t.clrA,this.activeRound.value.teamB.color=this.swapColorsInternally.value?t.clrA:t.clrB}}}},8936:function(e,t,n){"use strict";var a=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function i(e){try{l(a.next(e))}catch(e){r(e)}}function s(e){try{l(a.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((a=a.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ScreenshotParserService=void 0;const r=o(n(7441)),i=o(n(1611)),s=o(n(3993)),l=n(8250),u=o(n(8805)),c=n(4719),d=o(n(9591));t.ScreenshotParserService=class{constructor(e){var t,n;this.nodecg=e,this.runtimeConfig=e.Replicant("runtimeConfig"),this.saveBadScreenshotsToDisk=null!==(n=null===(t=e.bundleConfig.screenshotParser)||void 0===t?void 0:t.saveBadScreenshotsToDisk)&&void 0!==n&&n}sampleTeamColors(e){return a(this,void 0,void 0,(function*(){if(this.runtimeConfig.value.gameVersion!==l.GameVersion.SPLATOON_3)throw new Error(u.default.t("screenshotParser.badGameVersion",{gameVersion:this.runtimeConfig.value.gameVersion}));e.resize({width:1920,height:1080});try{return this.findClosestTeamColor([yield this.samplePoints(e,[{top:29,left:567},{top:29,left:655},{top:29,left:744},{top:29,left:833},{top:104,left:544},{top:104,left:632},{top:104,left:720},{top:104,left:809}]),yield this.samplePoints(e,[{top:29,left:1084},{top:29,left:1172},{top:29,left:1261},{top:29,left:1349},{top:104,left:1060},{top:104,left:1148},{top:104,left:1236},{top:104,left:1324}])])}catch(t){throw this.saveBadScreenshotsToDisk&&(yield this.writeToDisk(e)),t}}))}findClosestTeamColor(e){const t=(0,d.default)(c.perGameData[this.runtimeConfig.value.gameVersion].colors).filter((e=>!e.meta.key.toLowerCase().includes("colorlock"))).flatMap((e=>e.colors.map((t=>Object.assign(Object.assign({},t),{categoryName:e.meta.name,categoryKey:e.meta.key}))))).filter((e=>!e.isCustom)).map((t=>{var n,a;const o=new i.default(null!==(n=t.referenceClrA)&&void 0!==n?n:t.clrA).deltaE2000(e[0]);if(o>10)return null;const r=new i.default(null!==(a=t.referenceClrB)&&void 0!==a?a:t.clrB).deltaE2000(e[1]);return r>10?null:Object.assign(Object.assign({},t),{clrADelta:o,clrBDelta:r})})).filter(Boolean);if(0===t.length)throw new Error(u.default.t("screenshotParser.noMatchingColors"));t.sort(((e,t)=>(e.clrADelta+e.clrBDelta)/2-(t.clrADelta+t.clrBDelta)/2));const n=t[0];return{index:n.index,title:n.title,key:n.key,clrA:n.clrA,clrB:n.clrB,referenceClrA:n.referenceClrA,referenceClrB:n.referenceClrB,clrNeutral:n.clrNeutral,isCustom:n.isCustom,categoryKey:n.categoryKey,categoryName:n.categoryName}}samplePoints(e,t){return a(this,void 0,void 0,(function*(){const n=yield Promise.all(t.map((t=>this.samplePoint(e,t.left,t.top)))),a=n.filter((e=>{const t=n.map((t=>e.deltaE2000(t)));return(0,s.default)(t)<15}));if(0===a.length)throw new Error(u.default.t("screenshotParser.badColorSamples"));return this.mixMultiple(a)}))}mixMultiple(e){if(0===e.length)return new i.default("srgb",[NaN,NaN,NaN],0);let t=e[0];for(let n=1;n{u.default.satisfies(s.version,e.compatibleDashboardVersion)||m.log.warn(d.default.t("versionChecker.incompatibleBundleWarning",{otherBundle:e.name,compatibleVersion:e.compatibleDashboardVersion,thisBundle:m.bundleName,installedVersion:s.version}));const t=p.value.gameVersion;e.compatibleGameVersions.includes(t)||m.log.warn(d.default.t("versionChecker.incompatibleGameVersionWarning",{bundleName:e.name,gameVersion:t}))}))},307:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.cartesian=t.prettyPrintList=t.randomFromArray=void 0;const o=a(n(5526));t.randomFromArray=function(e){return e&&e.length?e[(0,o.default)(0,e.length-1)]:null},t.prettyPrintList=function(e){return e.reduce(((t,n,a)=>(t+=n,a===e.length-2?t+=" and ":a!==e.length-1&&(t+=", "),t)),"")},t.cartesian=function(e,t){return[].concat(...e.map((e=>t.map((t=>[].concat(e,t))))))}},6983:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.swapColors=void 0,t.swapColors=function(e){return Object.assign(Object.assign({},e),{clrA:e.clrB,clrB:e.clrA})}},5735:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayTypeHelper=void 0;const a=n(6123);t.PlayTypeHelper=class{static fromBattlefySeriesStyle(e){switch(null==e?void 0:e.toLowerCase()){case"gamespermatch":return a.PlayType.PLAY_ALL;case"bestof":return a.PlayType.BEST_OF;default:return}}static fromSmashggSetGamesType(e){switch(e){case 1:return a.PlayType.BEST_OF;case 2:return a.PlayType.PLAY_ALL;default:return}}}},4719:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.perGameData=void 0;const a=n(8250),o=n(3716),r=n(8954);t.perGameData={[a.GameVersion.SPLATOON_2]:o.splatoon2Data,[a.GameVersion.SPLATOON_3]:r.splatoon3Data}},9117:function(e,t,n){"use strict";var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeGameData=void 0;const o=a(n(9591)),r=n(8275),i={[r.Locale.EN]:{"Unknown Stage":"Unknown Stage",Counterpick:"Counterpick"},[r.Locale.DE]:{"Unknown Stage":"Unbekannte Arena",Counterpick:"Counterpick"},[r.Locale.EU_FR]:{"Unknown Stage":"Stage à déterminer",Counterpick:"Counterpick"},[r.Locale.JA]:{"Unknown Stage":"ステージ未選択",Counterpick:"カウンターピック"}},s={[r.Locale.EN]:{"Unknown Mode":"Unknown Mode"},[r.Locale.DE]:{"Unknown Mode":"Unbekannte Kampfart"},[r.Locale.EU_FR]:{"Unknown Mode":"Mode à déterminer"},[r.Locale.JA]:{"Unknown Mode":"ルール未選択"}};t.normalizeGameData=function(e){const t=(0,o.default)(e);return Object.assign(Object.assign({},t),{stages:Object.entries(t.stages).reduce(((e,[t,n])=>(e[t]=Object.assign(Object.assign({},n),i[t]),e)),{}),modes:Object.entries(t.modes).reduce(((e,[t,n])=>(e[t]=Object.assign(Object.assign({},n),s[t]),e)),{}),colors:[...t.colors.map((e=>Object.assign(Object.assign({},e),{colors:e.colors.map((e=>Object.assign(Object.assign({},e),{isCustom:!1})))}))),{meta:{name:"Custom Color",key:"customColor"},colors:[{index:0,title:"Custom Color",key:"customColor",clrA:"#000000",clrB:"#FFFFFF",clrNeutral:"#818181",isCustom:!0}]}]})}},3716:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splatoon2Data=t.Splatoon2Modes=t.Splatoon2Stages=void 0;const a=n(9117),o=n(8275);t.Splatoon2Stages=["Ancho-V Games","Arowana Mall","Blackbelly Skatepark","Camp Triggerfish","Goby Arena","Humpback Pump Track","Inkblot Art Academy","Kelp Dome","MakoMart","Manta Maria","Moray Towers","Musselforge Fitness","New Albacore Hotel","Piranha Pit","Port Mackerel","Shellendorf Institute","Shifty Station","Snapper Canal","Starfish Mainstage","Sturgeon Shipyard","The Reef","Wahoo World","Walleye Warehouse","Skipper Pavilion"],t.Splatoon2Modes=["Clam Blitz","Tower Control","Rainmaker","Splat Zones","Turf War"],t.splatoon2Data=(0,a.normalizeGameData)({stages:{[o.Locale.EN]:{"Ancho-V Games":"Ancho-V Games","Arowana Mall":"Arowana Mall","Blackbelly Skatepark":"Blackbelly Skatepark","Camp Triggerfish":"Camp Triggerfish","Goby Arena":"Goby Arena","Humpback Pump Track":"Humpback Pump Track","Inkblot Art Academy":"Inkblot Art Academy","Kelp Dome":"Kelp Dome",MakoMart:"MakoMart","Manta Maria":"Manta Maria","Moray Towers":"Moray Towers","Musselforge Fitness":"Musselforge Fitness","New Albacore Hotel":"New Albacore Hotel","Piranha Pit":"Piranha Pit","Port Mackerel":"Port Mackerel","Shellendorf Institute":"Shellendorf Institute","Shifty Station":"Shifty Station","Snapper Canal":"Snapper Canal","Starfish Mainstage":"Starfish Mainstage","Sturgeon Shipyard":"Sturgeon Shipyard","The Reef":"The Reef","Wahoo World":"Wahoo World","Walleye Warehouse":"Walleye Warehouse","Skipper Pavilion":"Skipper Pavilion"},[o.Locale.DE]:{"Ancho-V Games":"Anchobit Games HQ","Arowana Mall":"Arowana Center","Blackbelly Skatepark":"Punkasius-Skatepark","Camp Triggerfish":"Camp Schützenfisch","Goby Arena":"Backfisch-Stadion","Humpback Pump Track":"Buckelwal-Piste","Inkblot Art Academy":"Perlmutt-Akademie","Kelp Dome":"Tümmlerkuppel",MakoMart:"Cetacea-Markt","Manta Maria":"Manta Maria","Moray Towers":"Muränentürme","Musselforge Fitness":"Molluskelbude","New Albacore Hotel":"Hotel Neothun","Piranha Pit":"Steinköhler-Grube","Port Mackerel":"Heilbutt-Hafen","Shellendorf Institute":"Abyssal-Museum","Shifty Station":"Wandelzone","Snapper Canal":"Grätenkanal","Starfish Mainstage":"Seeigel-Rockbühne","Sturgeon Shipyard":"Störwerft","The Reef":"Korallenviertel","Wahoo World":"Flunder-Funpark","Walleye Warehouse":"Kofferfisch-Lager","Skipper Pavilion":"Grundel-Pavillon"},[o.Locale.EU_FR]:{"Ancho-V Games":"Tentatec Studio","Arowana Mall":"Centre Arowana","Blackbelly Skatepark":"Skatepark Mako","Camp Triggerfish":"Hippo-Camping","Goby Arena":"Stade Bernique","Humpback Pump Track":"Piste Méroule","Inkblot Art Academy":"Institut Calam'arts","Kelp Dome":"Serre Goémon",MakoMart:"Supermarché Cétacé","Manta Maria":"Manta Maria","Moray Towers":"Tours Girelle","Musselforge Fitness":"Gymnase Ancrage","New Albacore Hotel":"Hôtel Atoll","Piranha Pit":"Carrière Caviar","Port Mackerel":"Docks Haddock","Shellendorf Institute":"Galerie des abysses","Shifty Station":"Plateforme polymorphe","Snapper Canal":"Canalamar","Starfish Mainstage":"Scène Sirène","Sturgeon Shipyard":"Chantier Narval","The Reef":"Allées salées","Wahoo World":"Parc Carapince","Walleye Warehouse":"Encrepôt","Skipper Pavilion":"Lagune aux gobies"},[o.Locale.JA]:{"Ancho-V Games":"アンチョビットゲームズ","Arowana Mall":"アロワナモール","Blackbelly Skatepark":"Bバスパーク","Camp Triggerfish":"モンガラキャンプ場","Goby Arena":"アジフライスタジアム","Humpback Pump Track":"コンブトラック","Inkblot Art Academy":"海女美術大学","Kelp Dome":"モズク農園",MakoMart:"ザトウマーケット","Manta Maria":"マンタマリア号","Moray Towers":"タチウオパーキング","Musselforge Fitness":"フジツボスポーツクラブ","New Albacore Hotel":"ホテルニューオートロ","Piranha Pit":"ショッツル鉱山","Port Mackerel":"ホッケふ頭","Shellendorf Institute":"デボン海洋博物館","Shifty Station":"ミステリーゾーン","Snapper Canal":"エンガワ河川敷","Starfish Mainstage":"ガンガゼ野外音楽堂","Sturgeon Shipyard":"チョウザメ造船","The Reef":"バッテラストリート","Wahoo World":"スメーシーワールド","Walleye Warehouse":"ハコフグ倉庫","Skipper Pavilion":"ムツゴ楼"}},stageImagePaths:{"Ancho-V Games":"splatoon2/S2_Stage_Ancho-V_Games.webp","Arowana Mall":"splatoon2/S2_Stage_Arowana_Mall.webp","Blackbelly Skatepark":"splatoon2/S2_Stage_Blackbelly_Skatepark.webp","Camp Triggerfish":"splatoon2/S2_Stage_Camp_Triggerfish.webp","Goby Arena":"splatoon2/S2_Stage_Goby_Arena.webp","Humpback Pump Track":"splatoon2/S2_Stage_Humpback_Pump_Track.webp","Inkblot Art Academy":"splatoon2/S2_Stage_Inkblot_Art_Academy.webp","Kelp Dome":"splatoon2/S2_Stage_Kelp_Dome.webp",MakoMart:"splatoon2/S2_Stage_MakoMart.webp","Manta Maria":"splatoon2/S2_Stage_Manta_Maria.webp","Moray Towers":"splatoon2/S2_Stage_Moray_Towers.webp","Musselforge Fitness":"splatoon2/S2_Stage_Musselforge_Fitness.webp","New Albacore Hotel":"splatoon2/S2_Stage_New_Albacore_Hotel.webp","Piranha Pit":"splatoon2/S2_Stage_Piranha_Pit.webp","Port Mackerel":"splatoon2/S2_Stage_Port_Mackerel.webp","Shellendorf Institute":"splatoon2/S2_Stage_Shellendorf_Institute.webp","Shifty Station":"splatoon2/S2_Stage_Shifty_Station.webp","Snapper Canal":"splatoon2/S2_Stage_Snapper_Canal.webp","Starfish Mainstage":"splatoon2/S2_Stage_Starfish_Mainstage.webp","Sturgeon Shipyard":"splatoon2/S2_Stage_Sturgeon_Shipyard.webp","The Reef":"splatoon2/S2_Stage_The_Reef.webp","Wahoo World":"splatoon2/S2_Stage_Wahoo_World.webp","Walleye Warehouse":"splatoon2/S2_Stage_Walleye_Warehouse.webp","Skipper Pavilion":"splatoon2/S2_Stage_Skipper_Pavilion.webp"},modes:{[o.Locale.EN]:{"Clam Blitz":"Clam Blitz","Tower Control":"Tower Control",Rainmaker:"Rainmaker","Splat Zones":"Splat Zones","Turf War":"Turf War"},[o.Locale.DE]:{"Clam Blitz":"Muschelchaos","Tower Control":"Turmkommando",Rainmaker:"Operation Goldfisch","Splat Zones":"Herrschaft","Turf War":"Revierkampf"},[o.Locale.EU_FR]:{"Clam Blitz":"Pluie de palourdes","Tower Control":"Expédition risquée",Rainmaker:"Mission Bazookarpe","Splat Zones":"Défense de zone","Turf War":"Guerre de territoire"},[o.Locale.JA]:{"Clam Blitz":"ガチアサリ","Tower Control":"ガチヤグラ",Rainmaker:"ガチホコバトル","Splat Zones":"ガチエリア","Turf War":"ナワバリバトル"}},colors:[{meta:{name:"Ranked Modes",key:"rankedModes"},colors:[{index:0,title:"Green vs Grape",key:"greenGrape",clrA:"#37FC00",clrB:"#7D28FC",clrNeutral:"#F4067E"},{index:1,title:"Green vs Magenta",key:"greenMagenta",clrA:"#04D976",clrB:"#D600AB",clrNeutral:"#D2E500"},{index:2,title:"Turquoise vs Orange",key:"turquoiseOrange",clrA:"#10E38F",clrB:"#FB7B08",clrNeutral:"#6912CD"},{index:3,title:"Mustard vs Purple",key:"mustardPurple",clrA:"#FF9E03",clrB:"#B909E0",clrNeutral:"#08C66B"},{index:4,title:"Dark Blue vs Green",key:"darkBlueGreen",clrA:"#2F27CC",clrB:"#37FC00",clrNeutral:"#EA01B7"},{index:5,title:"Purple vs Green",key:"purpleGreen",clrA:"#B909E0",clrB:"#37FC00",clrNeutral:"#F87604"},{index:6,title:"Yellow vs Blue",key:"yellowBlue",clrA:"#FEF232",clrB:"#2ED2FE",clrNeutral:"#FD5600"}]},{meta:{name:"Turf War",key:"turfWar"},colors:[{index:0,title:"Yellow vs Purple",key:"yellowPurple",clrA:"#D1E004",clrB:"#960CB2",clrNeutral:"#0EB962"},{index:1,title:"Pink vs Blue",key:"pinkBlue",clrA:"#E61077",clrB:"#361CB8",clrNeutral:"#24C133"},{index:2,title:"Pink vs Yellow",key:"pinkYellow",clrA:"#ED0C6A",clrB:"#D5E802",clrNeutral:"#08C24D"},{index:3,title:"Purple vs Turquoise",key:"purpleTurquoise",clrA:"#6B10CC",clrB:"#08CC81",clrNeutral:"#EB246D"},{index:4,title:"Pink vs Light Blue",key:"pinkLightBlue",clrA:"#E30960",clrB:"#02ADCF",clrNeutral:"#DDE713"},{index:5,title:"Purple vs Orange",key:"purpleOrange",clrA:"#5617C2",clrB:"#FF5F03",clrNeutral:"#ACE81E"},{index:6,title:"Pink vs Green",key:"pinkGreen",clrA:"#E60572",clrB:"#1BBF0F",clrNeutral:"#CCE50C"},{index:7,title:"Yellow vs Blue",key:"yellowBlue",clrA:"#F1CE33",clrB:"#4B12BE",clrNeutral:"#E62E96"}]},{meta:{name:"Color Lock",key:"colorLock"},colors:[{index:0,title:"Yellow vs Blue (Color Lock)",key:"yellowBlue",clrA:"#FEF232",clrB:"#2F27CC",clrNeutral:"#DC1589"}]}]})},8954:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splatoon3Data=t.Splatoon3Modes=t.Splatoon3Stages=void 0;const a=n(9117),o=n(8275);t.Splatoon3Stages=["Museum d'Alfonsino","Scorch Gorge","Eeltail Alley","Hagglefish Market","Undertow Spillway","Mincemeat Metalworks","Hammerhead Bridge","Mahi-Mahi Resort","Inkblot Art Academy","Sturgeon Shipyard","MakoMart","Wahoo World","Brinewater Springs","Flounder Heights","Um'ami Ruins","Manta Maria","Barnacle & Dime","Humpback Pump Track","Crableg Capital","Shipshape Cargo Co.","Robo ROM-en","Bluefin Depot","Marlin Airport"],t.Splatoon3Modes=["Clam Blitz","Tower Control","Rainmaker","Splat Zones","Turf War"],t.splatoon3Data=(0,a.normalizeGameData)({stages:{[o.Locale.EN]:{"Museum d'Alfonsino":"Museum d'Alfonsino","Scorch Gorge":"Scorch Gorge","Eeltail Alley":"Eeltail Alley","Hagglefish Market":"Hagglefish Market","Undertow Spillway":"Undertow Spillway","Mincemeat Metalworks":"Mincemeat Metalworks","Hammerhead Bridge":"Hammerhead Bridge","Mahi-Mahi Resort":"Mahi-Mahi Resort","Inkblot Art Academy":"Inkblot Art Academy","Sturgeon Shipyard":"Sturgeon Shipyard",MakoMart:"MakoMart","Wahoo World":"Wahoo World","Brinewater Springs":"Brinewater Springs","Flounder Heights":"Flounder Heights","Um'ami Ruins":"Um'ami Ruins","Manta Maria":"Manta Maria","Barnacle & Dime":"Barnacle & Dime","Humpback Pump Track":"Humpback Pump Track","Crableg Capital":"Crableg Capital","Shipshape Cargo Co.":"Shipshape Cargo Co.","Robo ROM-en":"Robo ROM-en","Bluefin Depot":"Bluefin Depot","Marlin Airport":"Marlin Airport"},[o.Locale.DE]:{"Museum d'Alfonsino":"Pinakoithek","Scorch Gorge":"Sengkluft","Eeltail Alley":"Streifenaal-Straße","Hagglefish Market":"Schnapperchen-Basar","Undertow Spillway":"Schwertmuschel-Reservoir","Mincemeat Metalworks":"Aalstahl-Metallwerk","Hammerhead Bridge":"Makrelenbrücke","Mahi-Mahi Resort":"Mahi-Mahi-Resort","Inkblot Art Academy":"Perlmutt-Akademie","Sturgeon Shipyard":"Störwerft",MakoMart:"Cetacea-Markt","Wahoo World":"Flunder-Funpark","Brinewater Springs":"Kusaya-Quellen","Flounder Heights":"Schollensiedlung","Um'ami Ruins":"Um'ami-Ruinen","Manta Maria":"Manta Maria","Barnacle & Dime":"Talerfisch & Pock","Humpback Pump Track":"Buckelwal-Piste","Crableg Capital":"Majidae Skyline","Shipshape Cargo Co.":"Cargo Ship Heavyfish","Robo ROM-en":"ROM & RAMen","Bluefin Depot":"Blauflossen-Depot","Marlin Airport":"La Ola Airport"},[o.Locale.EU_FR]:{"Museum d'Alfonsino":"Galeries Guppy","Scorch Gorge":"Canyon aux colonnes","Eeltail Alley":"Banlieue Balibot","Hagglefish Market":"Marché Grefin","Undertow Spillway":"Réservoir Rigadelle","Mincemeat Metalworks":"Casse Rascasse","Hammerhead Bridge":"Pont Esturgeon","Mahi-Mahi Resort":"Club Ca$halot","Inkblot Art Academy":"Institut Calam'arts","Sturgeon Shipyard":"Chantier Narval",MakoMart:"Supermarché Cétacé","Wahoo World":"Parc Carapince","Brinewater Springs":"Sources Sauret","Flounder Heights":"Lotissement Filament","Um'ami Ruins":"Ruines Uma'mi","Manta Maria":"Manta Maria","Barnacle & Dime":"Halles de Port-merlu","Humpback Pump Track":"Piste Méroule","Crableg Capital":"Quartier Crabe-ciels","Shipshape Cargo Co.":"Chaland Flétan","Robo ROM-en":"Arène Méca-ramen","Bluefin Depot":"Mine Marine","Marlin Airport":"Terminal Rorqual"},[o.Locale.JA]:{"Museum d'Alfonsino":"キンメダイ美術館","Scorch Gorge":"ユノハナ大渓谷","Eeltail Alley":"ゴンズイ地区","Hagglefish Market":"ヤガラ市場","Undertow Spillway":"マテガイ放水路","Mincemeat Metalworks":"ナメロウ金属","Hammerhead Bridge":"マサバ海峡大橋","Mahi-Mahi Resort":"マヒマヒリゾート&スパ","Inkblot Art Academy":"海女美術大学","Sturgeon Shipyard":"チョウザメ造船",MakoMart:"ザトウマーケット","Wahoo World":"スメーシーワールド","Brinewater Springs":"クサヤ温泉","Flounder Heights":"ヒラメが丘団地","Um'ami Ruins":"ナンプラー遺跡","Manta Maria":"マンタマリア号","Barnacle & Dime":"タラポートショッピングパーク","Humpback Pump Track":"コンブトラック","Crableg Capital":"タカアシ経済特区","Shipshape Cargo Co.":"オヒョウ海運","Robo ROM-en":"バイガイ亭","Bluefin Depot":"ネギトロ炭鉱","Marlin Airport":"カジキ空港"}},stageImagePaths:{"Humpback Pump Track":"splatoon3/S3_Stage_Humpback_Pump_Track.webp","Inkblot Art Academy":"splatoon3/S3_Stage_Inkblot_Art_Academy.webp",MakoMart:"splatoon3/S3_Stage_MakoMart.webp","Manta Maria":"splatoon3/S3_Stage_Manta_Maria.webp","Sturgeon Shipyard":"splatoon3/S3_Stage_Sturgeon_Shipyard.webp","Wahoo World":"splatoon3/S3_Stage_Wahoo_World.webp","Museum d'Alfonsino":"splatoon3/S3_Stage_Museum_dAlfonsino.webp","Scorch Gorge":"splatoon3/S3_Stage_Scorch_Gorge.webp","Eeltail Alley":"splatoon3/S3_Stage_Eeltail_Alley.webp","Hagglefish Market":"splatoon3/S3_Stage_Hagglefish_Market.webp","Undertow Spillway":"splatoon3/S3_Stage_Undertow_Spillway.webp","Mincemeat Metalworks":"splatoon3/S3_Stage_Mincemeat_Metalworks.webp","Hammerhead Bridge":"splatoon3/S3_Stage_Hammerhead_Bridge.webp","Mahi-Mahi Resort":"splatoon3/S3_Stage_Mahi_Mahi_Resort.webp","Brinewater Springs":"splatoon3/S3_Stage_Brinewater_Springs.webp","Flounder Heights":"splatoon3/S3_Stage_Flounder_Heights.webp","Um'ami Ruins":"splatoon3/S3_Stage_Umami_Ruins.webp","Barnacle & Dime":"splatoon3/S3_Stage_Barnacle_&_Dime.webp","Crableg Capital":"splatoon3/S3_Stage_Crableg_Capital.webp","Shipshape Cargo Co.":"splatoon3/S3_Stage_Shipshape_Cargo_Co..webp","Robo ROM-en":"splatoon3/S3_Stage_Robo_ROM-en.webp","Bluefin Depot":"splatoon3/S3_Stage_Bluefin_Depot.webp","Marlin Airport":"splatoon3/S3_Marlin_Airport_Fresh_Season_2024_trailer.webp"},modes:{[o.Locale.EN]:{"Clam Blitz":"Clam Blitz","Tower Control":"Tower Control",Rainmaker:"Rainmaker","Splat Zones":"Splat Zones","Turf War":"Turf War"},[o.Locale.DE]:{"Clam Blitz":"Muschelchaos","Tower Control":"Turmkommando",Rainmaker:"Operation Goldfisch","Splat Zones":"Herrschaft","Turf War":"Revierkampf"},[o.Locale.EU_FR]:{"Clam Blitz":"Pluie de palourdes","Tower Control":"Expédition risquée",Rainmaker:"Mission Bazookarpe","Splat Zones":"Défense de zone","Turf War":"Guerre de territoire"},[o.Locale.JA]:{"Clam Blitz":"ガチアサリ","Tower Control":"ガチヤグラ",Rainmaker:"ガチホコバトル","Splat Zones":"ガチエリア","Turf War":"ナワバリバトル"}},colors:[{meta:{name:"Ranked Modes",key:"rankedModes"},colors:[{index:0,title:"Orange vs Purple",key:"orangePurple",clrA:"#F56522",clrB:"#821CD6",referenceClrA:"#C64D24",referenceClrB:"#6C0AB3",clrNeutral:"#CDFF45"},{index:1,title:"Yellow vs Dark Blue",key:"yellowDarkBlue",clrA:"#EDD921",clrB:"#461EE6",referenceClrA:"#D3CD23",referenceClrB:"#4010C9",clrNeutral:"#4445FF"},{index:2,title:"Turquoise vs Orange",key:"turquoiseOrange",clrA:"#2ADBC6",clrB:"#FA5A41",referenceClrA:"#37D5B2",referenceClrB:"#CF453F",clrNeutral:"#4445FF"},{index:3,title:"Orange vs Dark Blue",key:"orangeDarkBlue",clrA:"#FC7735",clrB:"#4048DB",referenceClrA:"#D9633A",referenceClrB:"#423BC4",clrNeutral:"#F8F755"},{index:4,title:"Turquoise vs Pink",key:"turquoisePink",clrA:"#2ADBC3",clrB:"#E34984",referenceClrA:"#35D3AE",referenceClrB:"#BE2C74",clrNeutral:"#7577FF"},{index:5,title:"Dark Blue vs Orange",key:"darkBlueOrange",clrA:"#2C2CDB",clrB:"#F29C33",referenceClrA:"#261DAD",referenceClrB:"#DD8E3A",clrNeutral:"#FF67EE"},{index:6,title:"Yellow vs Purple",key:"yellowPurple",clrA:"#EEFC58",clrB:"#7635F0",referenceClrA:"#C2DC4C",referenceClrB:"#641FCA",clrNeutral:"#54FDE8"},{index:7,title:"Gold vs Purple",key:"goldPurple",clrA:"#EBCC31",clrB:"#A032DB",referenceClrA:"#CFBC33",referenceClrB:"#901BC4",clrNeutral:"#73DE35"},{index:8,title:"Green vs Pink",key:"greenPink",clrA:"#B3DE45",clrB:"#D43BCA",referenceClrA:"#A6DA44",referenceClrB:"#B31FB0",clrNeutral:"#FFC042"},{index:9,title:"Pink vs Green",key:"pinkGreen",clrA:"#F753A1",clrB:"#35CC2D",referenceClrA:"#B82079",referenceClrB:"#39D42D",clrNeutral:"#4A36FF"}]},{meta:{name:"Color Lock (Variant 1)",key:"colorLock1"},colors:[{index:0,title:"Yellow vs Purple",key:"yellowPurple",clrA:"#F0EB24",clrB:"#6236DF",referenceClrA:"#CAC531",referenceClrB:"#5529BC",clrNeutral:"#B82FB6"}]},{meta:{name:"Color Lock (Variant 2)",key:"colorLock2"},colors:[{index:0,title:"Orange vs Blue",key:"orangeBlue",clrA:"#FDB605",clrB:"#2D63D7",referenceClrA:"#D5972C",referenceClrB:"#2858BC",clrNeutral:"#8FD20C"}]}]})},4615:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateId=void 0;const a=n(5828);t.generateId=function(){return(0,a.v4)()}},8157:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBlank=t.addDots=void 0,t.addDots=function(e,t=48){return e&&e.length>t?e.substring(0,t-3)+"...":e},t.isBlank=function(e){return"string"!=typeof e||""===e.trim()}},4365:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.GameAutomationAction=void 0,function(e){e.END_GAME="END_GAME",e.START_GAME="START_GAME",e.NONE="NONE"}(n||(t.GameAutomationAction=n={}))},6197:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.InterfaceLocale=void 0,function(e){e.EN="EN"}(n||(t.InterfaceLocale=n={}))},8275:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Locale=void 0,function(e){e.EN="EN",e.DE="DE",e.EU_FR="EU_FR",e.JA="JA"}(n||(t.Locale=n={}))},5279:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ObsStatus=void 0,function(e){e.CONNECTED="CONNECTED",e.CONNECTING="CONNECTING",e.NOT_CONNECTED="NOT_CONNECTED"}(n||(t.ObsStatus=n={}))},2276:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.BracketTypeHelper=t.BracketType=void 0,function(e){e.SWISS="SWISS",e.DOUBLE_ELIMINATION="DOUBLE_ELIMINATION",e.SINGLE_ELIMINATION="SINGLE_ELIMINATION",e.ROUND_ROBIN="ROUND_ROBIN",e.LADDER="LADDER"}(n||(t.BracketType=n={})),t.BracketTypeHelper=class{static fromBattlefy(e,t){if("elimination"===e){if(null==t)throw new Error('Got bracket type "elimination" from Battlefy without "style" parameter (single or double?)');return{single:n.SINGLE_ELIMINATION,double:n.DOUBLE_ELIMINATION}[t]}return{ladder:n.LADDER,swiss:n.SWISS,roundrobin:n.ROUND_ROBIN}[e]}}},8250:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.GameVersion=void 0,function(e){e.SPLATOON_2="SPLATOON_2",e.SPLATOON_3="SPLATOON_3"}(n||(t.GameVersion=n={}))},9383:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.GameWinner=void 0,function(e){e.NO_WINNER="none",e.ALPHA="alpha",e.BRAVO="bravo"}(n||(t.GameWinner=n={}))},8394:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ImportStatus=void 0,function(e){e.SUCCESS="SUCCESS",e.LOADING="LOADING",e.FAILURE="FAILURE",e.NO_DATA="NO_DATA",e.NO_STATUS="NO_STATUS"}(n||(t.ImportStatus=n={}))},6123:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayType=void 0,function(e){e.PLAY_ALL="PLAY_ALL",e.BEST_OF="BEST_OF"}(n||(t.PlayType=n={}))},9694:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.PredictionStatus=void 0,function(e){e.RESOLVED="RESOLVED",e.ACTIVE="ACTIVE",e.CANCELED="CANCELED",e.LOCKED="LOCKED"}(n||(t.PredictionStatus=n={}))},4134:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TournamentDataSource=void 0,function(e){e.BATTLEFY="BATTLEFY",e.SMASHGG="SMASHGG",e.UPLOAD="UPLOAD",e.SENDOU_INK="SENDOU_INK",e.UNKNOWN="UNKNOWN"}(n||(t.TournamentDataSource=n={}))},7597:(e,t,n)=>{var a={"./en/breakScreen.json":8576,"./en/casters.json":8972,"./en/colors.json":3717,"./en/common.json":3943,"./en/createPredictionDialog.json":8839,"./en/dataIO.json":4104,"./en/matchManager.json":2144,"./en/music.json":8411,"./en/nextMatch.json":5146,"./en/predictions.json":3222,"./en/resolvePredictionDialog.json":1226,"./en/rounds.json":2757,"./en/server.json":1039,"./en/settings.json":8277};function o(e){var t=r(e);return n(t)}function r(e){if(!n.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}o.keys=function(){return Object.keys(a)},o.resolve=r,e.exports=o,o.id=7597},2167:e=>{"use strict";e.exports=require("axios")},739:e=>{"use strict";e.exports=require("clone")},1611:e=>{"use strict";e.exports=require("colorjs.io")},6674:e=>{"use strict";e.exports=require("express-fileupload")},8805:e=>{"use strict";e.exports=require("i18next")},2085:e=>{"use strict";e.exports=require("lastfm")},6517:e=>{"use strict";e.exports=require("lodash")},9591:e=>{"use strict";e.exports=require("lodash/cloneDeep")},5359:e=>{"use strict";e.exports=require("lodash/findLastIndex")},9699:e=>{"use strict";e.exports=require("lodash/isEmpty")},3993:e=>{"use strict";e.exports=require("lodash/mean")},3901:e=>{"use strict";e.exports=require("lodash/omit")},5526:e=>{"use strict";e.exports=require("lodash/random")},2748:e=>{"use strict";e.exports=require("luxon")},3848:e=>{"use strict";e.exports=require("obs-websocket-js")},1505:e=>{"use strict";e.exports=require("semver/preload")},7441:e=>{"use strict";e.exports=require("sharp")},5828:e=>{"use strict";e.exports=require("uuid")},5352:e=>{"use strict";e.exports=require("ws")},7147:e=>{"use strict";e.exports=require("fs")},3837:e=>{"use strict";e.exports=require("util")},4874:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});const a={crush:(e,t=50)=>{let n=[];for(let e=127;--e;)(e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||"-_.!~*'()".includes(String.fromCharCode(e)))&&n.push(String.fromCharCode(e));for(let e=32;e<255;++e){let t=String.fromCharCode(e);"\\"==t||n.includes(t)||n.unshift(t)}e=e.replace(new RegExp("","g"),"");const a=((e,n)=>{let a=n.length,o="";const r=e=>encodeURI(encodeURIComponent(e)).replace(/%../g,"i").length,i=e=>{let t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t>=56320&&t<=57343||n>=55296&&n<=56319};let s={};for(let n=2;n=0;++o)r=e.indexOf(a,r+n);o>1&&(s[a]=o)}for(;;){for(;a--&&e.includes(n[a]););if(a<0)break;let t,i=n[a],l=0,u=r(i);for(let e in s){let n=s[e],a=(n-1)*r(e)-(n+1)*u;o.length||(a-=r("")),a<=0?delete s[e]:a>l&&(t=e,l=a)}if(!t)break;e=e.split(t).join(i)+i+t,o=i+o;let c={};for(let n in s){let a=n.split(t).join(i),o=0;for(let t=e.indexOf(a);t>=0;++o)t=e.indexOf(a,t+a.length);o>1&&(c[a]=o)}s=c}return{a:e,b:o}})(e=o(e),n);let r=a.a;return a.b.length&&(r+=""+a.b),r+="_",r},uncrush:e=>{const t=(e=e.substring(0,e.length-1)).split("");let n=t[0];if(t.length>1){let e=t[1];for(let t of e){let e=n.split(t);n=e.join(e.pop())}}return o(n,0)}},o=(e,t=1)=>{const n=[['"',"'"],["':","!"],[",'","~"],["}",")","\\","\\"],["{","(","\\","\\"]],a=(e,t)=>{let n=new RegExp(`${(t[2]?t[2]:"")+t[0]}|${(t[3]?t[3]:"")+t[1]}`,"g");return e.replace(n,(e=>e===t[0]?t[1]:t[0]))};if(t)for(let t=0;t{"use strict";e.exports=JSON.parse('{"name":"ipl-overlay-controls","version":"4.14.2","description":"Dashboard elements for Inkling Performance Labs broadcast graphics.","homepage":"https://github.com/inkfarer/ipl-overlay-controls","author":{"name":"inkfarer","email":"inkfarer@inkfarer.com","url":"https://inkfarer.com"},"files":["dashboard","src/extension"],"keywords":["","nodecg-bundle"],"scripts":{"build":"cross-env NODE_ENV=production webpack","clean":"trash node_modules/.cache && trash dashboard && trash extension","cleanbuild":"npm run clean && npm run build","start":"node ../..","watch":"webpack -w","schema-types":"nodecg schema-types","lint":"eslint --ext .js,.vue,.ts ./src","fix":"eslint --ext .js,.vue,.ts --fix ./src","devbuild":"webpack","test":"jest","test:update":"jest -u","test:ci":"jest --json --outputFile=result.json --testLocationInResults"},"nodecg":{"compatibleRange":"^1.7.0 || ^2.0.0","dashboardPanels":[{"name":"music","title":"Music","width":2,"file":"music.html","workspace":"ipl","headerColor":"#262F40"},{"name":"breakscreen","title":"Break Screen","width":2,"file":"breakScreen.html","workspace":"ipl","headerColor":"#262F40"},{"name":"matchmanager","title":"Match Manager","width":4,"file":"matchManager.html","workspace":"ipl","headerColor":"#262F40"},{"name":"casters","title":"Casters","width":2,"file":"casters.html","workspace":"ipl","headerColor":"#262F40"},{"name":"nextMatch","title":"Next Match","width":2,"file":"nextMatch.html","workspace":"ipl","headerColor":"#262F40"},{"name":"predictions","title":"Predictions","width":2,"file":"predictions.html","workspace":"ipl","headerColor":"#262F40"},{"name":"dataIO","title":"Data import/export","width":4,"file":"dataIO.html","workspace":"ipl setup","headerColor":"#262F40"},{"name":"rounds","title":"Rounds","width":2,"file":"rounds.html","workspace":"ipl setup","headerColor":"#262F40"},{"name":"Settings","title":"Settings","width":2,"file":"settings.html","workspace":"ipl setup","headerColor":"#262F40"},{"name":"createPredictionDialog","title":"","width":4,"file":"createPredictionDialog.html","dialog":true},{"name":"resolvePredictionDialog","title":"","width":3,"file":"resolvePredictionDialog.html","dialog":true}],"mount":[{"directory":"assets/images/stages","endpoint":"stage-images"}]},"repository":"https://github.com/nodecg/nodecg.git","license":"MIT","dependencies":{"@fortawesome/fontawesome-svg-core":"^6.4.0","@fortawesome/free-solid-svg-icons":"^6.4.0","@fortawesome/vue-fontawesome":"^3.0.0-4","@iplsplatoon/vue-components":"^3.3.2","@pinia/testing":"^0.0.16","@types/fs-extra":"^9.0.13","axios":"^0.21.1","clone":"^2.1.2","colorjs.io":"^0.5.0","express-fileupload":"^1.2.1","fs-extra":"^10.0.0","i18next":"^23.10.1","i18next-vue":"^4.0.0","jsoncrush":"^1.1.8","lastfm":"git+https://github.com/inkfarer/lastfm-node.git","lodash":"^4.17.21","luxon":"2.5.2","obs-websocket-js":"^5.0.5","pinia":"^2.0.35","semver":"^7.3.5","sharp":"^0.33.3","ts-node":"^10.9.1","uuid":"^9.0.1","vue":"^3.4.21","ws":"^7.5.3"},"devDependencies":{"@nodecg/types":"^2.1.11","@types/clone":"^2.1.0","@types/express-fileupload":"^1.1.6","@types/jest":"^29.5.1","@types/jest-when":"^2.7.3","@types/lodash":"^4.14.171","@types/luxon":"^1.27.1","@types/node":"^18.16.3","@types/semver":"^7.3.7","@types/uuid":"^9.0.7","@types/webpack":"^5.28.1","@types/webpack-livereload-plugin":"^2.3.2","@types/webpack-node-externals":"^3.0.4","@types/ws":"^7.4.7","@typescript-eslint/eslint-plugin":"^5.59.1","@typescript-eslint/parser":"^5.59.1","@vue/compiler-sfc":"^3.4.21","@vue/test-utils":"2.3.2","@vue/vue3-jest":"^29.2.6","cross-env":"^7.0.3","css-loader":"^6.7.3","eslint":"^8.39.0","eslint-import-resolver-typescript":"^3.5.5","eslint-import-resolver-webpack":"^0.13.2","eslint-plugin-import":"^2.27.5","eslint-plugin-vue":"^9.11.0","fork-ts-checker-webpack-plugin":"^6.5.3","globby":"^11.1.0","html-webpack-plugin":"^5.5.1","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","jest-mock-extended":"^3.0.4","jest-when":"^3.5.2","sass":"^1.62.1","sass-loader":"^13.2.2","style-loader":"^3.3.2","trash-cli":"^5.0.0","ts-jest":"^29.1.0","ts-loader":"^9.4.2","tsconfig-paths-webpack-plugin":"^4.0.1","typescript":"^5.4.4","vue-eslint-parser":"^9.1.1","vue-loader":"^17.1.0","vuedraggable":"^4.1.0","webpack":"5.81.0","webpack-cli":"^5.0.2","webpack-livereload-plugin":"^3.0.1","webpack-node-externals":"^3.0.0"},"jest":{"projects":["/src/dashboard/jest.config.ts","/src/extension/jest.config.ts","/src/helpers/jest.config.ts"]}}')},8576:e=>{"use strict";e.exports=JSON.parse('{"title":"Break Screen","sceneName":{"main":"Main Scene","teams":"Teams","stages":"Stages"},"showSceneButton":"Show","mainScene":{"flavorTextInput":"Flavor Text"},"nextStageTimer":{"sectionTitle":"Next stage timer","showTimerCheckbox":"Show timer","hourInput":"Hour","minuteInput":"Min","daySelect":"Day"}}')},8972:e=>{"use strict";e.exports=JSON.parse('{"title":"Casters","controls":{"addCaster":"Add caster","uploadCastersToRadia":"Upload casters to Radia","loadFromVoiceChat":"Load from VC"},"casterEditor":{"unsavedCasterBadge":"Unsaved","saveNewCasterButton":"Save","nameInput":"Name","twitterInput":"Twitter","pronounInput":"Pronouns","imageUrlInput":"Image URL","videoUrlInput":"Video URL"},"casterSearch":{"buttonLabel":"Search casters","queryInput":"Query","noResultsMessage":"Type above to search..."}}')},3717:e=>{"use strict";e.exports=JSON.parse('{"customColor":{"groupName":"Custom Color","customColor":"Custom Color"},"SPLATOON_3":{"rankedModes":{"groupName":"Ranked Modes","orangePurple":"Orange vs Purple","yellowDarkBlue":"Yellow vs Dark Blue","turquoiseOrange":"Turquoise vs Orange","orangeDarkBlue":"Orange vs Dark Blue","turquoisePink":"Turquoise vs Pink","darkBlueOrange":"Dark Blue vs Orange","yellowPurple":"Yellow vs Purple","goldPurple":"Gold vs Purple","greenPink":"Green vs Pink","pinkGreen":"Pink vs Green"},"colorLock1":{"groupName":"Color Lock (Variant 1)","yellowPurple":"Yellow vs Purple"},"colorLock2":{"groupName":"Color Lock (Variant 2)","orangeBlue":"Orange vs Blue"}},"SPLATOON_2":{"rankedModes":{"groupName":"Ranked Modes","greenGrape":"Green vs Grape","greenMagenta":"Green vs Magenta","turquoiseOrange":"Turquoise vs Orange","mustardPurple":"Mustard vs Purple","darkBlueGreen":"Dark Blue vs Green","purpleGreen":"Purple vs Green","yellowBlue":"Yellow vs Blue"},"turfWar":{"groupName":"Turf War","yellowPurple":"Yellow vs Purple","pinkBlue":"Pink vs Blue","pinkYellow":"Pink vs Yellow","purpleTurquoise":"Purple vs Turquoise","pinkLightBlue":"Pink vs Light Blue","purpleOrange":"Purple vs Orange","pinkGreen":"Pink vs Green","yellowBlue":"Yellow vs Blue"},"colorLock":{"groupName":"Color Lock","yellowBlue":"Yellow vs Blue (Color Lock)"}}}')},3943:e=>{"use strict";e.exports=JSON.parse('{"interfaceLanguage":{"EN":"English","ET":"Eesti","JA":"日本語"},"gameLocale":{"EN":"English","DE":"Deutsch","EU_FR":"Français","JA":"日本語"},"largeToggle":{"show":"Show","hide":"Hide"},"button":{"shortConfirmationMessage":"Confirm?","confirmationMessage":"Are you sure?","loading":"Loading...","error":"Error!","success":"Done!","rightClickUndoMessage":"Right-click to undo changes.","update":"Update"},"validationError":{"minLength_one":"Must be at least {{count}} character","minLength_other":"Must be at least {{count}} characters","maxLength_one":"Must not be over {{count}} character","maxLength_other":"Must not be over {{count}} characters","maxValue":"Must not be above {{count}}","minValue":"Must not be below {{count}}","numeric":"Must be numeric","notBlank":"Must not be blank"},"predictionStatus":{"RESOLVED":"Resolved","ACTIVE":"Active","CANCELED":"Canceled","LOCKED":"Locked"},"predictionStatusReason":{"missingConfiguration":"Missing Radia configuration. Check your guild ID and socket URL.","predictionsNotSupportedByGuild":"Predictions are not supported by the configured guild."},"tournamentDataSource":{"BATTLEFY":"Battlefy","SMASHGG":"Start.gg","UPLOAD":"Uploaded file","SENDOU_INK":"sendou.ink","UNKNOWN":"Unknown"},"playType":{"BEST_OF":"Best of {{count}}","PLAY_ALL":"Play all {{count}}"},"obsStatus":{"CONNECTING":"Connecting","CONNECTED":"Connected","NOT_CONNECTED":"Not connected"},"gameVersion":{"SPLATOON_2":"Splatoon 2","SPLATOON_3":"Splatoon 3"},"fileUploadPlaceholder":"Drag a file here or click to browse...","roundSelect":"Round","tournamentDataStore":{"fileUploadError":"Import failed with status {{statusCode}}: {{message}}"},"stringHelper":{"invalidSendouInkTournamentUrlError":"Input URL path is too short - is this a tournament URL?"}}')},8839:e=>{"use strict";e.exports=JSON.parse('{"dialogTitle":"Create Prediction","activePredictionNotResolvedWarning":"The active prediction has not been resolved!","titleInput":"Title","durationInputLabel":"Duration","durationInputUnit":"seconds","teamANameInput":"Team A","teamBNameInput":"Team B","createButton":"Create","resetButton":"Reset","defaultPredictionTitle":"Who do you think will win this match?"}')},4104:e=>{"use strict";e.exports=JSON.parse('{"title":"Data import/export","matchExporter":{"sectionTitle":"Export saved matches","matchCount_one":"Storing data for {{count}} match","matchCount_other":"Storing data for {{count}} matches","exportButton":"Export"},"roundImporter":{"sectionTitle":"Round data","roundDataUrlInput":"Data URL / maps.iplabs.ink URL","uploadFileCheckbox":"Upload file","importButton":"Import","loadingImportButton":"Importing..."},"teamDataImporter":{"sectionTitle":"Tournament data","startgg":{"eventSelect":"Event","importButton":"Import","loadingImportButton":"Importing...","cancelImportButton":"Cancel"},"dataSourceSelect":"Source","tournamentIdInput":"Tournament ID","tournamentIdInput_BATTLEFY":"Tournament URL","tournamentIdInput_SENDOU_INK":"Tournament URL","tournamentIdInput_SMASHGG":"Tournament Slug","tournamentIdInput_UPLOAD":"Data URL","uploadFileCheckbox":"Upload file","importButton":"Import","loadingImportButton":"Importing...","savedDataSection":{"title":"Saved data","tournamentNamePlaceholder":"No name","refreshButton":"Refresh","loadingRefreshButton":"Refreshing..."},"shortTournamentNameInput":"Short tournament name"}}')},2144:e=>{"use strict";e.exports=JSON.parse('{"title":"Match Manager","obsSceneConfigChangedWarning":"The OBS scene configuration has changed. Please confirm that the configured gameplay and intermission scenes (\'{{gameplayScene}}\' & \'{{intermissionScene}}\') are still correct.","startGameButton":"Start Game","endGameButton":"End Game","automationActionTask":"???","automationActionTask_changeScene":"Change Scene","automationActionTask_showScoreboard":"Show Scoreboard","automationActionTask_hideScoreboard":"Hide Scoreboard","automationActionTask_showCasters":"Show Casters","cancelAutomationActionButton":"Cancel action","showCastersButton":"Show casters","swapColorsButton":"Swap","readColorsFromSourceScreenshotButton":"Read colors from OBS","badObsConfigWarning":"Some OBS configuration is missing or invalid. Please ensure it is correct from the Settings dashboard panel.","colorList":{"sectionTitle":"More Colors","useCustomColorCheckbox":"Use custom color","showColorNamesCheckbox":"Show color names"},"activeMatchEditor":{"sectionTitle":"Active Match","selectedMatchCompletedMessage":"\'{{matchName}}\' is already completed. ({{teamA}} vs {{teamB}})","selectedMatchHasProgressMessage":"\'{{matchName}}\' already has saved progress. ({{teamA}} vs {{teamB}})","teamASelect":"Team A","teamBSelect":"Team B","showTeamImageCheckbox":"Show image","matchSelect":"Match","matchNameInput":"Match Name","duplicateMatchNameOption":"{{matchName}} ({{teamA}} vs {{teamB}})"},"nextMatchStarter":{"sectionTitle":"Begin Next Match","teamADisplayLabel":"Team A","teamBDisplayLabel":"Team B","roundNameDisplayLabel":"Round","matchNameInput":"Match Name","beginNextMatchButton":"Begin next match"},"scoreboardEditor":{"sectionTitle":"Scoreboard","flavorTextDisplayLabel":"Flavor Text"},"setEditor":{"sectionTitle":"Edit match","nextGameLabel":"Next up","nextGameTemplate":"{{mode}} on {{stage}}","customColorCheckbox":"Custom color","swapColorsCheckbox":"Swap colors","resetButton":"Reset","editColorsToggle":"Edit colors"},"activeRosters":{"sectionTitle":"Active Rosters"}}')},8411:e=>{"use strict";e.exports=JSON.parse('{"title":"Music","nowPlayingLabel_lastfm":"Now Playing (Last.fm)","nowPlayingLabel_manual":"Now Playing (Manual)","changeSongManually":{"sectionHeading":"Change song manually","enableCheckboxLabel":"Enable","artistInputLabel":"Artist","songInputLabel":"Song"}}')},5146:e=>{"use strict";e.exports=JSON.parse('{"title":"Next Match","chooseTeamsManuallyToggle":"Choose teams manually","showOnStreamToggle":"Show on stream","highlightedMatches":{"missingStageDataMessage":"No stages present to import from.","matchSourceSelect":"???","matchSourceSelect_BATTLEFY":"Bracket","matchSourceSelect_SMASHGG":"Stream","allBattlefyBracketsOption":"All Brackets","allStartggStreamsOption":"All Streams","importButton":"Import","noMatchesLoadedMessage":"No matches loaded.","matchSelect":"Match","matchNameInput":"Match Name","teamADisplayLabel":"Team A","teamBDisplayLabel":"Team B","playTypeDisplayLabel":"Type of play"},"manualTeamPicker":{"teamASelect":"Team A","teamBSelect":"Team B","matchNameInput":"Match Name"},"cannotImportDataError":"Cannot import data from $t(common:tournamentDataSource.{{source}})"}')},3222:e=>{"use strict";e.exports=JSON.parse('{"title":"Predictions","noPredictionDataMessage":"No prediction data loaded.","socketClosedWarning":{"message":"Prediction websocket is closed. Data may not be up to date.","reconnectButton":{"label":"Reconnect","loadingLabel":"Reconnecting..."}},"predictionStatusLabel":"Status","resolvePredictionButton":"Resolve","createPredictionButton":"New","lockPredictionButton":{"label":"Lock","loadingLabel":"Locking..."},"cancelPredictionButton":{"label":"Cancel","loadingLabel":"Cancelling..."},"showPredictionButton":{"label":"Show","labelOnClick":"Sent!"},"remainingDuration":"{{seconds, duration}} remaining","points_one":"{{count}} point","points_other":"{{count}} points"}')},1226:e=>{"use strict";e.exports=JSON.parse('{"dialogTitle":"Resolve Prediction","noPredictionDataMessage":"No prediction data loaded.","resolvingNotPossibleMessage":"This prediction cannot be resolved right now.","roundNotCompletedWarning":"The current round has not been completed!","predictionWinnerUnknownMessage":{"withoutWinner":"Unable to determine the current round\'s winner.","withWinner":"Unable to determine the current round\'s winner. The leading team is {{name}}"},"teamAButtonLabel":{"default":"Team A","winner":"Winner - Team A"},"teamBButtonLabel":{"default":"Team B","winner":"Winner - Team B"},"buttonResolvingInProgressLabel":"Resolving..."}')},2757:e=>{"use strict";e.exports=JSON.parse('{"title":"Rounds","resetRoundsButton":"Reset rounds","roundListNextRoundColorKey":"Next round","createRound":{"sectionTitle":"Create Round","create3GameRoundButton":"3 Games","create5GameRoundButton":"5 Games","create7GameRoundButton":"7 Games"},"showAllRoundsButton":"All Rounds","roundNameInput":"Name","roundTypeSelect":"Type","saveNewRoundButton":"Save"}')},1039:e=>{"use strict";e.exports=JSON.parse('{"casterImport":{"noCommentatorsReceived":"Got no commentators from API."},"obs":{"obsSocketDisabled":"OBS integration is disabled.","sceneNotFound":"Could not find one or more of the provided scenes.","inputNotFound":"Could not find one or more of the provided inputs.","missingCurrentSceneCollection":"The current scene collection is unknown.","socketClosed":"OBS websocket closed with message: {{message}}","socketOpen":"OBS websocket is open.","errorWhileConnecting":"Error while connecting to OBS:","obsConnectionFailed":"Failed to connect to OBS: {{message}}","reconnectingToSocket":"Attempting to reconnect to OBS...","receivedNoScenes":"Received scene list from OBS with no scenes. This should not be possible!","socketNotOpen":"OBS websocket is not open.","missingScreenshotImageFormat":"Screenshot image format is undefined. Cannot continue.","sceneItemLoadingFailed":"Failed to load items for scene {{sceneName}}:","errorAfterSocketOpen":"Error loading OBS data:","errorAfterSceneCollectionChange":"Error loading OBS data after scene collection change:","missingGameplayInput":"Gameplay input is unset. Change it from the Settings dashboard panel."},"activeRoundHelper":{"gameOutOfRange":"Cannot set winner for game {{index}} as it does not exist.","matchNotFound":"Could not find match {{matchId}}.","teamNotFound":"Could not find a team."},"bundleHelper":{"gameVersionParsingFailedWarning":"Could not parse compatible game versions for bundle \'{{bundleName}}\'"},"nextRoundHelper":{"roundNotFound":"Could not find round {{roundId}}.","teamNotFound":"Could not find a team."},"roundStoreHelper":{"defaultRoundName":"Default Round {{roundNumber}}"},"battlefyClient":{"battlefyReturnedError":"Got error from Battlefy: {{message}}","battlefyReturnedNoData":"Couldn\'t get tournament data from Battlefy.","battlefyReturnedUnknownResponse":"Received an unknown response from Battlefy.","placeholderTournamentName":"Unknown Tournament","matchName":"Round {{roundNumber}} Match {{matchNumber}}","shortMatchName":"{{stageName}} Round {{roundNumber}}"},"radiaClient":{"missingGuildId":"No guild ID provided.","predictionSupportCheckError":"Failed to check for prediction support: {{message}}","requestFailed":"Radia API request failed with response {{statusCode}}"},"startggClient":{"tournamentNotFound":"Could not find tournament with slug \'{{slug}}\'.","noEventsFoundForTournament":"Tournament \'{{slug}} has no events.","eventNotFound":"Could not find event with id \'{{eventId}}\'","shortRoundName":{"withoutPool":"{{phaseName}} Round {{roundNumber}}","withPool":"{{phaseName}} Pool {{poolName}} Round {{roundNumber}}"},"longRoundName":"Set {{set}} - Round {{round}} - Pool {{pool}} - {{phase}}"},"fileImport":{"invalidFileOrJsonType":"Invalid attached file or jsonType property provided.","roundDataUpdateFailed":{"console":"Failed to update round data: {{message}}","response":"Got an error while parsing round data."},"teamDataUpdateFailed":{"console":"Failed to parse team data: {{message}}","response":"Got an error while parsing team data."}},"music":{"missingLastfmConfigWarning":"\\"lastfm\\" is missing from cfg/{{bundleName}}.json! Getting music information from last.fm automatically will not function.","userNotFound":"Last.fm couldn\'t find user \'{{username}}\' - error message: \'{{message}}\'"},"predictions":{"socketClosed":"Radia websocket has closed.","reconnectingToSocket":"Reconnecting to socket... (Attempt {{count}})","tooManyReconnectionAttempts":"Too many reconnection attempts. Radia websocket is closed.","socketTimeout":"Radia websocket has not been reachable for {{count}} milliseconds. Closing connection...","missingBundleConfigurationWarning":"\\"radia.socketUrl\\" is missing from cfg/{{bundleName}}.json! Importing predictions will not be possible.","socketOpen":"Radia websocket is open.","socketReceivedError":"Received error from Radia websocket. Code: {{code}}, Message: {{message}}","missingGuildId":"Radia guild ID is not configured!","missingConfigurationError":"Unable to proceed as some Radia configuration is missing.","predictionDataRequestError":"Unable to get prediction data: {{message}}","socketReconnectionFailed":"Unable to reconnect to Radia websocket: {{message}}","unresolvedPredictionAlreadyExists":"An unresolved prediction already exists.","noPredictionAvailable":"No prediction available to resolve.","cannotCancelPrediction":"Cannot cancel a prediction that is not locked or active.","cannotLockPrediction":"Only an active prediction may be locked.","missingOutcome":"No outcome to resolve provided.","cannotResolvePrediction":"Only a locked prediction may be resolved."},"roundFromMapsIplabs":{"missingRoundData":"No round data found in maps.iplabs.ink url. (If this is from an older version of the site - try remaking the url.)","missingEncodingVersion":"Encoding version of maps.iplabs.ink not found.","encodingVersionTooNew":"Encoding version of maps.iplabs.ink too new. Try updating ipl-overlay-controls.","unsupportedEncodingVersion":"Encoding version of maps.iplabs.ink not supported. Try remaking the url.","invalidJsonFormat":"Invalid URL encoded JSON format."},"roundImporter":{"badGameVersionForMapsIplabs":"maps.iplabs.ink links only support Splatoon 3"},"tournamentDataHelper":{"noTeamsFound":"Tournament has no teams.","placeholderUploadedTournamentName":"Uploaded Tournament","battlefyDataImportFailed":"Could not fetch Battlefy data for tournament \'{{tournamentId}}\'","placeholderTournamentName":"Unknown Tournament","tournamentDataParsingFailed":"Invalid data provided.","radiaTournamentDataUpdateFailed":"Failed to update tournament data in Radia: {{message}}"},"tournamentImporter":{"missingStartggConfigurationWarning":"\\"smashgg\\" is not defined in cfg/{{bundleName}}.json! Importing tournament data from start.gg will not be possible.","missingStartggApiKey":"No start.gg API key is configured.","missingSendouInkApiKey":"No sendou.ink API key is configured.","rawDataImportFailed":"Got response code {{statusCode}} from {{url}}"},"tournamentRefresh":{"unsupportedSource":"Cannot refresh data from $t(common:tournamentDataSource.{{source}})"},"casters":{"casterNotFound":"Caster \'{{id}}\' not found.","badCasterIdListForReordering":"Could not re-order casters as caster ID list has unknown or missing IDs"},"roundStore":{"roundNotFound":"Could not find round \'{{id}}\'.","roundAlreadyExists":"Round \'{{id}}\' already exists.","cannotDeleteLastRound":"Cannot delete the last round."},"tournamentData":{"teamNotFound":"No team found."},"automationActions":{"unknownTask":"Unknown automation task \'{{name}}\'","actionAlreadyOngoing":"An action is already in progress.","noActionOngoing":"No action is in progress.","taskStartFailed":"Failed to start automation task","errorInTask":"Encountered an error during automation task"},"replicantFixer":{"resettingActiveColors":"Resetting active round colors as the currently assigned colors are unknown"},"versionChecker":{"incompatibleBundleWarning":"Bundle \'{{otherBundle}}\' expects version {{compatibleVersion}} of {{thisBundle}}! The installed version is {{installedVersion}}.","incompatibleGameVersionWarning":"Bundle \'{{bundleName}}\' is not compatible with $t(common:gameVersion.{{gameVersion}})!"},"screenshotParser":{"badGameVersion":"Colors cannot be detected for $t(common:gameVersion.{{gameVersion}}).","noMatchingColors":"Sampled ink colors couldn\'t be matched to any existing color combinations.","badColorSamples":"All sampled colors were too different from each other."},"missingRadiaConfigurationWarning":"\\"radia\\" is not defined in cfg/{{bundleName}}.json! Importing data from the Radia Productions API will not be possible.","invalidArgumentsError":"Invalid arguments."}')},8277:e=>{"use strict";e.exports=JSON.parse('{"title":"Settings","sectionName":{"general":"General","lastfm":"Last.fm","radia":"Radia","obs":"OBS Socket"},"showAllSettingsButton":"All Settings","lastfm":{"usernameInput":"Username"},"obs":{"missingDataMessage":"OBS data is missing. Please connect to an OBS websocket to continue.","gameplayInputSelect":"Gameplay source","gameplaySceneSelect":"Gameplay scene","intermissionSceneSelect":"Intermission scene","toggleEnable":"Enable","toggleDisable":"Disable","socketUrlInput":"Socket address","passwordInput":"Password (Optional)","connectButton":"Connect","loadingConnectButton":"Connecting...","connectButtonSuccess":"Connected!","socketDisabledMessage":"OBS websocket is disabled."},"radia":{"radiaDisabledMessage":"Radia integration is disabled.","reconnectButton":"Attempt to connect","loadingReconnectButton":"Connecting...","guildIdInput":"Guild ID","updateTournamentDataOnImportCheckbox":"Update tournament data on import"},"general":{"incompatibleBundleWarning_one":"Bundle {{bundles, list}} is incompatible with $t(common:gameVersion.{{gameVersion}}).","incompatibleBundleWarning_other":"Bundles {{bundles, list}} are incompatible with $t(common:gameVersion.{{gameVersion}}).","gameVersionChangeWarning":"Changing game versions will reset round and match data!","gameVersionSelect":"Game version","gameLocaleSelect":"Game language","interfaceLocaleSelect":"Interface language"}}')}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var r=t[a]={exports:{}};return e[a].call(r.exports,r,r.exports,n),r.exports}n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a=n(5480);module.exports=a})(); \ No newline at end of file