{"version":3,"sources":["webpack:///./node_modules/core-js/modules/_string-pad.js","webpack:///./src/utils/date-helpers.ts","webpack:///./src/config/wow/armor-types.ts","webpack:///./src/components/composition/CompositionsViewDistributionPage.vue?1ac9","webpack:///./src/components/composition/CompositionsViewDistributionPage.vue","webpack:///./src/components/composition/CompositionsViewDistributionPage.vue?fcc5","webpack:///./src/components/composition/CompositionsViewDistributionPage.vue?bd85","webpack:///./src/components/_global/DataFetcher.vue?0fc9","webpack:///./src/components/_global/DataFetcher.vue?77e7","webpack:///./src/components/_global/DataFetcher.vue","webpack:///./src/components/_global/DataFetcher.vue?6448","webpack:///./src/components/_global/DataFetcher.vue?d9b7","webpack:///./src/components/composition/lib/helpers.ts","webpack:///./src/utils/sort-helpers.ts","webpack:///./node_modules/core-js/modules/es7.string.pad-start.js"],"names":["toLength","repeat","defined","module","exports","that","maxLength","fillString","left","S","String","stringLength","length","fillStr","undefined","intMaxLength","fillLen","stringFiller","call","Math","ceil","slice","createDateString","year","month","day","toString","padStart","getLocaleString","date","locale","toLocaleString","getLocaleStringFromDateString","dateString","Date","parse","getLocaleStringFromDateStringWithOptions","options","getDateTimeString","getTime","getTimezoneOffset","toISOString","getElegantDateString","toLocaleDateString","weekday","getElegantDateStringFromString","dateAsString","getMonthName","monthNumber","getDateStringFromDateTimeAsString","dateTimeAsString","split","getDateString","smartDisplayDays","numberOfDays","years","floor","months","days","result","push","join","differenceInMinutesBetweenDates","date1","date2","round","differenceInDaysBetweenDates","UTC","getFullYear","getMonth","getDate","getMaxDate","dates","reduce","a","b","getTimeSince","referenceDate","onlyMinutes","intervalType","seconds","interval","type","classes","render","_vm","this","_h","$createElement","_c","_self","attrs","fetch","compositionGroup","displayedData","headers","scopedSlots","_u","_l","composition","key","getHeaderSlotName","id","fn","ref","header","boss","on","_g","staticClass","imageLinks","thumbnailBoss","urlSlug","_e","_v","_s","text","item","style","character","class","color","$vuetify","theme","dark","thumbnailClass","name","getSlotName","compositions","iconRole","role","characters","staticRenderFns","teamModule","$t","value","align","sort","x","sortable","filter","map","arr","charactersNotYetInArr","c","some","ac","usedCharacters","res","find","total","Object","keys","sum","k","fetchCompositionGroup","notifyFetchCompositionGroup","compositionID","State","methods","components","DataFetcher","GroupCard","component","VAvatar","VChip","VCol","VContainer","VDataTable","VImg","VRow","VTooltip","_t","loading","silentLoading","handleLoad","hideLoading","useSilentLoading","handleSecondaryLoad","$emit","fetchData","error","secondaryFetchData","Function","required","Boolean","default","colorPlayerCount","nbPlayers","sortByAsc","f","sortByDesc","$export","$pad","userAgent","WEBKIT_BUG","test","P","F","arguments"],"mappings":"qGACA,IAAIA,EAAW,EAAQ,QACnBC,EAAS,EAAQ,QACjBC,EAAU,EAAQ,QAEtBC,EAAOC,QAAU,SAAUC,EAAMC,EAAWC,EAAYC,GACtD,IAAIC,EAAIC,OAAOR,EAAQG,IACnBM,EAAeF,EAAEG,OACjBC,OAAyBC,IAAfP,EAA2B,IAAMG,OAAOH,GAClDQ,EAAef,EAASM,GAC5B,GAAIS,GAAgBJ,GAA2B,IAAXE,EAAe,OAAOJ,EAC1D,IAAIO,EAAUD,EAAeJ,EACzBM,EAAehB,EAAOiB,KAAKL,EAASM,KAAKC,KAAKJ,EAAUH,EAAQD,SAEpE,OADIK,EAAaL,OAASI,IAASC,EAAeA,EAAaI,MAAM,EAAGL,IACjER,EAAOS,EAAeR,EAAIA,EAAIQ,I,0cCR1BK,G,8BAAmB,SAACC,EAAcC,EAAeC,GAC7D,gBAAUF,EAAV,YAAkBC,EAAME,WAAWC,SAAS,EAAG,KAA/C,YAAuDF,EAAIC,WAAWC,SAAS,EAAG,QAiBtEC,EAAkB,SAACC,GAAgC,IAApBC,EAAoB,uDAAX,QACpD,OAAOD,EAAKE,eAAeD,IAQfE,EAAgC,SAACC,GAAwC,IAApBH,EAAoB,uDAAX,QAC1E,OAAOF,EAAgB,IAAIM,KAAKA,KAAKC,MAAMF,IAAcH,IAM7CM,EAA2C,SAACH,EAAoBI,GAA0D,IAApBP,EAA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C,UAAU,K,gCAQX,gBAJC,eAAK,CACLtG,KAAMqG,SACNC,UAAU,K,yCASX,gBALC,eAAK,CACLtG,KAAMuG,QACND,UAAU,EACVE,SAAS,K,uCASV,gBALC,eAAK,CACLxG,KAAMuG,QACND,UAAU,EACVE,SAAS,K,kCAeV,gBADC,eAAM,O,yBAMN,MA7CmB,EAAW,gBAD/B,QACoB,WC/BmY,I,wBCQpZvB,EAAY,eACd,EACA/E,EACAgD,GACA,EACA,KACA,WACA,MAIa,OAAA+B,E,2CCnBf,kCAAO,IAAMwB,EAAmB,SAACC,GAChC,OAAIA,EAAY,GACR,MAEC,IAAMA,GAAaA,EAAY,GAChC,OAEe,KAAdA,EACD,QAEC,GAAKA,GAAaA,GAAa,GAChC,OAED,Q,kCCbR,oEAAO,IAAMC,EAAY,SAAUC,GAClC,OAAO,SAACpH,EAAMC,GACb,OAAImH,EAAEpH,GAAKoH,EAAEnH,IAAc,EACvBmH,EAAEpH,GAAKoH,EAAEnH,GAAa,EACnB,IAIIoH,EAAa,SAAUD,GACnC,OAAO,SAACpH,EAAMC,GACb,OAAImH,EAAEpH,GAAKoH,EAAEnH,GAAa,EACtBmH,EAAEpH,GAAKoH,EAAEnH,IAAc,EACpB,K,kCCVT,IAAIqH,EAAU,EAAQ,QAClBC,EAAO,EAAQ,QACfC,EAAY,EAAQ,QAGpBC,EAAa,mDAAmDC,KAAKF,GAEzEF,EAAQA,EAAQK,EAAIL,EAAQM,EAAIH,EAAY,SAAU,CACpDxK,SAAU,SAAkBrB,GAC1B,OAAO2L,EAAK3G,KAAMhF,EAAWiM,UAAU3L,OAAS,EAAI2L,UAAU,QAAKzL,GAAW,O","file":"dist/js/chunk-19428cd5.4b65faf5.js","sourcesContent":["// https://github.com/tc39/proposal-string-pad-start-end\nvar toLength = require('./_to-length');\nvar repeat = require('./_string-repeat');\nvar defined = require('./_defined');\n\nmodule.exports = function (that, maxLength, fillString, left) {\n var S = String(defined(that));\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : String(fillString);\n var intMaxLength = toLength(maxLength);\n if (intMaxLength <= stringLength || fillStr == '') return S;\n var fillLen = intMaxLength - stringLength;\n var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);\n return left ? stringFiller + S : S + stringFiller;\n};\n","/**\n * Retourne un *string* de la forme \"YYYY-MM-DD\" à partir de Year, Month, Day.\n * @param year\n * @param month\n * @param day\n */\nexport const createDateString = (year: number, month: number, day: number) => {\n\treturn `${year}-${month.toString().padStart(2, \"0\")}-${day.toString().padStart(2, \"0\")}`;\n};\n\n/**\n * Retourne un *string* de la forme \"DD/MM/YYYY\" à partir d'une date.\n * @param date\n * @param locale\n */\nexport const getLocaleDateString = (date: Date, locale = \"en-US\") => {\n\treturn date.toLocaleDateString(locale);\n};\n\n/**\n * Retourne un *string* de la forme \"DD/MM/YYYY à HH:mm:ss\" à partir d'une date.\n * @param date\n * @param locale\n */\nexport const getLocaleString = (date: Date, locale = \"en-US\") => {\n\treturn date.toLocaleString(locale);\n};\n\n/**\n * Retourne un *string* de la forme \"DD/MM/YYYY à HH:mm:ss\" à partir d'une date string.\n * @param dateString\n * @param locale\n */\nexport const getLocaleStringFromDateString = (dateString: string, locale = \"en-GB\") => {\n\treturn getLocaleString(new Date(Date.parse(dateString)), locale);\n};\n\n/**\n * Retourne un *string* de la forme \"Aug 22nd 2020 hh:mm:ss UTC\" à partir d'une date string.\n */\nexport const getLocaleStringFromDateStringWithOptions = (dateString: string, options?: Intl.DateTimeFormatOptions, locale = \"en-GB\") => {\n\treturn (new Date(Date.parse(dateString))).toLocaleString(locale, options);\n};\n\n\n/**\n * Retourne un *string* de la forme \"2019-03-20T11:24:06.065Z\".\n * @param date\n */\nexport const getDateTimeString = (date: Date) => {\n\treturn new Date(date.getTime() - (date.getTimezoneOffset() * 60000)).toISOString();\n};\n\n\n/**\n * Retourne un *string* de la forme \"lundi 1 janvier 2000\" à partir d'une date.\n * @param date\n * @param locale\n */\nexport const getElegantDateString = (date: Date, locale = \"en-US\") => {\n\treturn date.toLocaleDateString(locale, {\n\t\tweekday: \"long\",\n\t\tyear: \"numeric\",\n\t\tmonth: \"long\",\n\t\tday: \"numeric\"\n\t});\n};\n\n/**\n * Retourne un *string* de la forme \"lundi 1 janvier 2000\" à partir d'une string de la forme yyyy-MM-dd.\n */\nexport const getElegantDateStringFromString = (dateAsString: string, locale = \"en-US\") => {\n\treturn (new Date(`${dateAsString}T00:00:00`)).toLocaleDateString(locale, {\n\t\tweekday: \"long\",\n\t\tyear: \"numeric\",\n\t\tmonth: \"long\",\n\t\tday: \"numeric\"\n\t});\n};\n\n/**\n * Retourne le mois traduit dans la {locale} à partir du numéro du mois.\n * @param monthNumber\n * @param locale\n */\nexport const getMonthName = (monthNumber: number, locale = \"en-US\") => {\n\treturn (new Date(`2000-${monthNumber.toString().padStart(2, \"0\")}-01T00:00:00`)).toLocaleDateString(locale, {\n\t\tmonth: \"long\"\n\t});\n};\n\n\n/**\n * Retourne un *string* de la forme \"janvier\" à partir d'une date.\n * @param date\n * @param locale\n */\nexport const getMonthStringFromDate = (date: Date, locale = \"en-US\") => {\n\treturn date.toLocaleDateString(locale, {\n\t\tmonth: \"long\"\n\t});\n};\n\n/**\n * Retourne le timestamp en nombre de jours (arrondi en floor).\n */\nexport const getTimestampInDays = (timestampInMS: number) => {\n\treturn Math.floor((((timestampInMS / 1000) / 60) / 60) / 24);\n};\n\n/**\n * Retourne un *string* de la forme \"2019-03-20\".\n */\nexport const getDateStringFromDateTimeAsString = (dateTimeAsString: string) => {\n\treturn dateTimeAsString.split(\"T\")[0];\n};\n\n/**\n * Retourne un *string* de la forme \"2019-03-20\".\n * @param date\n */\nexport const getDateString = (date: Date) => {\n\treturn getDateStringFromDateTimeAsString(getDateTimeString(date));\n};\n/**\n * Retourne un *string* de la forme \"2019-03\".\n * @param date\n */\nexport const getYearMonthString = (date: Date) => {\n\tconst dateStringSplit = getDateString(date).split(\"-\");\n\treturn `${dateStringSplit[0]}-${dateStringSplit[1]}`;\n};\n/**\n * Retourne un *string* de la forme \"11:24:06.065Z\".\n * @param date\n */\nexport const getTimeString = (date: Date) => {\n\treturn getDateTimeString(date).split(\"T\")[1];\n};\n/**\n * Retourne un *string* de la forme \"11:24\".\n * @param date\n */\nexport const getShortTimeString = (date: Date) => {\n\tconst timeSplit = getTimeString(date).split(\":\");\n\treturn `${timeSplit[0]}:${timeSplit[1]}`;\n};\n\n/**\n * Ajout un nombre de minutes à un time de la forme \"11:24\".\n * @param time\n * @param nbMinutesToAdd\n */\nexport const addMinutes = (time: string, nbMinutesToAdd: number) => {\n\tconst timeSplit = time.split(\":\");\n\tconst hour = parseInt(timeSplit[0], 10);\n\tconst minute = parseInt(timeSplit[1], 10);\n\n\tconst rawMinuteAfterAddition = minute + nbMinutesToAdd;\n\treturn `${(hour + Math.floor(rawMinuteAfterAddition / 60)).toString().padStart(2, \"0\")}:${(rawMinuteAfterAddition % 60).toString().padStart(2, \"0\")}`;\n};\n\n/**\n * Retourne un affichage *string* intelligent d'une durée en heures ou en minutes.\n * @param minutes\n */\nexport const smartDisplayMinutes = (minutes: number) => {\n\tif (minutes == null) {\n\t\treturn \"-\";\n\t}\n\tif (minutes >= 60) {\n\t\tconst remainingSeconds = minutes % 60;\n\t\treturn `${Math.floor(minutes / 60)}h` + (remainingSeconds > 0 ? remainingSeconds.toString().padStart(2, \"0\") : \"\");\n\t}\n\treturn `${minutes} min`;\n};\n\n/**\n * Retourne un affichage *string* intelligent d'une durée en jours (Y year, M months, D days).\n * @param numberOfDays\n */\nexport const smartDisplayDays = (numberOfDays: number) => {\n\tif (numberOfDays == 0) {\n\t\treturn \"today\";\n\t}\n\n\tconst years = Math.floor(numberOfDays / 365);\n\tconst months = Math.floor(numberOfDays % 365 / 30);\n\tconst days = Math.floor(numberOfDays % 365 % 30);\n\n\tconst result = [];\n\tif (years > 0) {\n\t\tresult.push(years + (years == 1 ? \" year\" : \" years\"));\n\t}\n\tif (months > 0) {\n\t\tresult.push(months + (months == 1 ? \" month\" : \" months\"));\n\t}\n\tif (days > 0) {\n\t\tresult.push(days + (days == 1 ? \" day\" : \" days\"));\n\t}\n\n\treturn result.join(\", \");\n};\n\n/**\n * Retourne la différence en minutes entre *date1* et *date2* telles que date1 < date2.\n */\nexport const differenceInMinutesBetweenDates = (date1: Date, date2: Date) => {\n\treturn Math.round(((date2.getTime() - date1.getTime()) / 1000) / 60); // minutes\n};\n\n/**\n * Retourne la différence en jours entre *date1* et *date2* telles que date1 < date2.\n */\nexport const differenceInDaysBetweenDates = function (date1: Date, date2: Date) {\n\treturn Math.floor((Date.UTC(date2.getFullYear(), date2.getMonth(), date2.getDate()) - Date.UTC(date1.getFullYear(), date1.getMonth(), date1.getDate())) / (1000 * 60 * 60 * 24));\n};\n\n/**\n * Retourne la différence en minutes entre *hh1:mm1* et *hh2:mm2* telles que hh1:mm1 < hh2:mm2.\n */\nexport const differenceInMinutesBetweenHoursMinutes = (hm1: string, hm2: string) => {\n\tconst h1 = parseInt(hm1.split(\":\")[0], 10);\n\tconst m1 = parseInt(hm1.split(\":\")[1], 10);\n\tconst h2 = parseInt(hm2.split(\":\")[0], 10);\n\tconst m2 = parseInt(hm2.split(\":\")[1], 10);\n\treturn (60 * h2 + m2) - (60 * h1 + m1);\n};\n\n/**\n * Fonction de tri par date croissant si a < b.\n * @param a\n * @param b\n */\nexport const sortByDate = (a: Date, b: Date) => {\n\treturn a > b ? -1 : a < b ? 1 : 0;\n};\n\n\n/**\n * Retourne la date minimale d'un array de dates.\n */\nexport const getMinDate = (dates: Date[]) => {\n\treturn dates.reduce(function (a, b) {\n\t\treturn a < b ? a : b;\n\t});\n};\n\n/**\n * Retourne la date maximale d'un array de dates.\n */\nexport const getMaxDate = (dates: Date[]) => {\n\treturn dates.reduce(function (a, b) {\n\t\treturn a > b ? a : b;\n\t});\n};\n\n/**\n * Retourne la durée formatée entre maintenant et la date passée en paramètre.\n * @param date\n * @param referenceDate\n * @param onlyMinutes\n */\nexport const getTimeSince = (date: Date, referenceDate: Date = new Date(), onlyMinutes = false) => {\n\tif (typeof date !== \"object\") {\n\t\tdate = new Date(date);\n\t}\n\n\tlet seconds = Math.floor((+referenceDate - +date) / 1000);\n\tif (seconds < 0) {\n\t\tseconds = 0;\n\t}\n\tlet intervalType;\n\n\tlet interval = Math.floor(seconds / 31536000);\n\tif (interval >= 1) {\n\t\tintervalType = \"year\";\n\t}\n\telse {\n\t\tinterval = Math.floor(seconds / 2592000);\n\t\tif (interval >= 1) {\n\t\t\tintervalType = \"month\";\n\t\t}\n\t\telse {\n\t\t\tinterval = Math.floor(seconds / 86400);\n\t\t\tif (interval >= 1) {\n\t\t\t\tintervalType = \"day\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tinterval = Math.floor(seconds / 3600);\n\t\t\t\tif (interval >= 1) {\n\t\t\t\t\tintervalType = \"hour\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tinterval = Math.floor(seconds / 60);\n\t\t\t\t\tif (interval >= 1 || onlyMinutes) {\n\t\t\t\t\t\tintervalType = \"minute\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tinterval = seconds;\n\t\t\t\t\t\tintervalType = \"second\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif (interval > 1 || interval === 0) {\n\t\tintervalType += \"s\";\n\t}\n\n\n\tif (onlyMinutes) {\n\n\t}\n\n\treturn (interval > 0 ? interval : \"< 1\") + \" \" + intervalType;\n};","export default [{\n\ttype: \"Cloth\",\n\tclasses: [8, 5, 9]\n}, {\n\ttype: \"Leather\",\n\tclasses: [4, 11, 10, 12]\n}, {\n\ttype: \"Mail\",\n\tclasses: [7, 3, 13]\n}, {\n\ttype: \"Plate\",\n\tclasses: [1, 2, 6]\n}];","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('data-fetcher',{attrs:{\"fetch-data\":_vm.fetch}},[(_vm.compositionGroup != null)?_c('v-container',{attrs:{\"fluid\":\"\",\"pa-0\":\"\",\"ma-0\":\"\",\"grid-list-xl\":\"\"}},[_c('v-row',{attrs:{\"justify\":\"center\"}},[_c('v-col',{attrs:{\"cols\":\"auto\"}},[(_vm.displayedData.length > 0)?_c('v-data-table',{attrs:{\"headers\":_vm.headers,\"items\":_vm.displayedData,\"items-per-page\":-1,\"mobile-breakpoint\":0,\"sort-by\":\"character\",\"hide-default-footer\":\"\",\"dense\":\"\"},scopedSlots:_vm._u([_vm._l((_vm.compositionGroup.compositions),function(composition){return {key:_vm.getHeaderSlotName(composition.id),fn:function(ref){\nvar header = ref.header;\nreturn [_c('span',{key:(\"\" + (composition.name))},[_c('v-tooltip',{attrs:{\"disabled\":!composition.boss,\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('span',_vm._g({},on),[(composition.boss)?_c('v-avatar',{staticClass:\"my-2\",attrs:{\"center\":\"\",\"size\":\"38\"}},[_c('v-img',{attrs:{\"src\":_vm.imageLinks.thumbnailBoss(composition.boss.urlSlug)}})],1):_vm._e()],1)]}}],null,true)},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(header.text)+\"\\n\\t\\t\\t\\t\\t\\t\\t\")]),(!composition.boss)?_c('span',[_vm._v(_vm._s(header.text))]):_vm._e()],1)]}}}),{key:\"item.character\",fn:function(ref){\nvar item = ref.item;\nreturn [(item.character)?_c('v-chip',{style:({'width':'100%', 'white-space': 'nowrap', 'border':0, 'padding':'20px'}),attrs:{\"color\":_vm.classes[item.character.class].color,\"outlined\":_vm.$vuetify.theme.dark,\"label\":\"\"}},[_c('v-avatar',{attrs:{\"left\":\"\"}},[_c('v-img',{attrs:{\"src\":_vm.imageLinks.thumbnailClass(item.character.class)}})],1),_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(item.character.name)+\"\\n\\t\\t\\t\\t\\t\\t\")],1):_vm._e()]}},_vm._l((_vm.compositionGroup.compositions),function(composition){return {key:_vm.getSlotName(composition.id),fn:function(ref){\nvar item = ref.item;\nreturn [(item.character)?_c('div',{key:((item.character.id) + \"-\" + (composition.id))},[(item.compositions[composition.id])?_c('div',[_c('v-img',{attrs:{\"max-height\":28,\"src\":_vm.imageLinks.iconRole(item.compositions[composition.id].role),\"contain\":\"\"}})],1):_vm._e()]):_c('div',{key:(\"total-\" + (composition.id))},[_vm._v(\"\\n\\t\\t\\t\\t\\t\\t\\t\"+_vm._s(composition.characters.length)+\"\\n\\t\\t\\t\\t\\t\\t\")])]}}})],null,true)}):_vm._e()],1)],1)],1):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue, Prop } from \"vue-property-decorator\";\nimport { namespace } from \"vuex-class\";\n\n/**\n * Utils\n */\nimport classes from \"@/config/wow/classes\";\nimport * as externalLinks from \"@/config/external-links\";\nimport * as imageLinks from \"@/config/image-links\";\nimport armorTypes from \"@/config/wow/armor-types\";\n\nimport { colorPlayerCount } from \"./lib/helpers\";\n\nimport { getElegantDateString, getLocaleStringFromDateString } from \"@/utils/date-helpers\";\nimport { sortByAsc } from \"@/utils/sort-helpers\";\n\n/**\n * Components\n */\nimport GroupCard from \"@/components/_global/GroupCard.vue\";\n\n/**\n * API\n */\nimport { CompositionGroupResponse, GetOneCompositionGroupResponse } from \"@/api/compositions/get-one-composition-group.response\";\nimport { GetOneTeamResponse } from \"@/api/teams/get-one-team.response\";\nimport { Guid } from \"@/domain/guid\";\nimport DataFetcher from \"@/components/_global/DataFetcher.vue\";\nimport { thumbnailClass } from \"@/config/image-links\";\n\n\n/**\n * Types\n */\n\n/**\n * VueX Modules\n */\nconst teamModule = namespace(\"team\");\n\n/**\n * Compositions' view distribution page.\n */\n@Component({\n\tmethods: {thumbnailClass},\n\tcomponents: {\n\t\tDataFetcher,\n\t\tGroupCard\n\t}\n})\nexport default class CompositionsViewDistributionPage extends Vue {\n\t/// Injections\n\tclasses = classes;\n\texternalLinks = externalLinks;\n\timageLinks = imageLinks;\n\tarmorTypes = armorTypes;\n\tcolorPlayerCount = colorPlayerCount;\n\tgetElegantDateString = getElegantDateString;\n\tgetLocaleStringFromDateString = getLocaleStringFromDateString;\n\n\t/// Props\n\t@Prop()\n\tcompositionGroup!: GetOneCompositionGroupResponse | null;\n\t@Prop()\n\tnotifyFetchCompositionGroup!: () => Promise;\n\n\t/// Attributes\n\tisLoading = false;\n\n\t/// VueX Modules\n\t@teamModule.State(\"team\")\n\tcurrentTeam!: GetOneTeamResponse;\n\n\tget headers() {\n\t\treturn [\n\t\t\t{\n\t\t\t\ttext: this.$t(\"composition.character\"),\n\t\t\t\tvalue: \"character\",\n\t\t\t\talign: \"left\",\n\t\t\t\tclass: \"collapsing\",\n\t\t\t\tsort: sortByAsc(x => x != null && x.name),\n\t\t\t\tsortable: false\n\t\t\t},\n\t\t\t...this.compositionGroup != null ? this.compositionGroup.compositions\n\t\t\t\t.filter(composition => composition.characters.length > 0)\n\t\t\t\t.map(composition =>\n\t\t\t\t\t({\n\t\t\t\t\t\ttext: composition.name,\n\t\t\t\t\t\tvalue: composition.id,\n\t\t\t\t\t\talign: \"center\",\n\t\t\t\t\t\tclass: \"collapsing\",\n\t\t\t\t\t\tsortable: false\n\t\t\t\t\t})\n\t\t\t\t) : [],\n\t\t\t{\n\t\t\t\ttext: this.$t(\"composition.total\"),\n\t\t\t\tvalue: \"total\",\n\t\t\t\talign: \"left\",\n\t\t\t\tclass: \"collapsing\",\n\t\t\t\tsortable: false\n\t\t\t},\n\t\t];\n\t}\n\n\tget usedCharacters() {\n\t\tif (this.compositionGroup == null) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn this.compositionGroup.compositions.reduce((arr: CompositionGroupResponse.Character[], composition) => {\n\t\t\tconst charactersNotYetInArr = composition.characters.filter(c => !arr.some(ac => ac.id === c.id));\n\t\t\treturn [...arr, ...charactersNotYetInArr];\n\t\t}, []);\n\t}\n\n\tget displayedData() {\n\t\tconst compositionGroup = this.compositionGroup;\n\n\t\tif (compositionGroup == null) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif (this.usedCharacters.length == 0) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t...this.usedCharacters.map(character => {\n\t\t\t\tconst res: any = {};\n\t\t\t\tres.compositions = {};\n\t\t\t\tfor (const composition of compositionGroup.compositions) {\n\t\t\t\t\tres.compositions[composition.id] = composition.characters.find(c => c.id === character.id);\n\t\t\t\t}\n\t\t\t\tres.name = character.name;\n\t\t\t\tres.total = Object.keys(res.compositions).reduce((sum: number, k) => sum + (res.compositions[k] != null ? 1 : 0), 0);\n\t\t\t\tres.character = character;\n\t\t\t\treturn res;\n\t\t\t}),\n\t\t\t{\n\t\t\t\tname: \"\",\n\t\t\t\tcharacter: null,\n\t\t\t\ttotal: null\n\t\t\t}\n\t\t];\n\t}\n\n\t/// Methods\n\tasync created() {\n\t}\n\n\tasync fetch() {\n\t\tawait this.fetchCompositionGroup();\n\t}\n\n\tasync fetchCompositionGroup() {\n\t\tawait this.notifyFetchCompositionGroup();\n\t}\n\n\tgetSlotName(compositionID: Guid) {\n\t\treturn `item.${compositionID}`;\n\t}\n\n\tgetHeaderSlotName(compositionID: Guid) {\n\t\treturn `header.${compositionID}`;\n\t}\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CompositionsViewDistributionPage.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CompositionsViewDistributionPage.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./CompositionsViewDistributionPage.vue?vue&type=template&id=2a4e55bf&\"\nimport script from \"./CompositionsViewDistributionPage.vue?vue&type=script&lang=ts&\"\nexport * from \"./CompositionsViewDistributionPage.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VAvatar } from 'vuetify/lib/components/VAvatar';\nimport { VChip } from 'vuetify/lib/components/VChip';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VDataTable } from 'vuetify/lib/components/VDataTable';\nimport { VImg } from 'vuetify/lib/components/VImg';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VTooltip } from 'vuetify/lib/components/VTooltip';\ninstallComponents(component, {VAvatar,VChip,VCol,VContainer,VDataTable,VImg,VRow,VTooltip})\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataFetcher.vue?vue&type=style&index=0&id=452e8cc9&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.error)?_c('div',[_vm._t(\"message\",function(){return [_c('p',[_vm._v(\"Something went wrong. Please try again.\")])]}),_c('button',{attrs:{\"disabled\":_vm.loading || _vm.silentLoading},on:{\"click\":_vm.handleLoad}},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.loading ? \"Retrying...\" : \"Retry\")+\"\\n\\t\")])],2):(_vm.loading && !_vm.silentLoading && !_vm.hideLoading)?_c('div',{staticClass:\"fill-height\"},[_c('app-loading')],1):_c('div',{staticClass:\"fill-height\"},[_vm._t(\"default\")],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Vue, Component, Prop, Watch } from \"vue-property-decorator\";\n\n@Component\nexport default class DataFetcher extends Vue {\n\t@Prop() id?: string; // ID passed as a prop (from route)\n\n\t@Prop({\n\t\ttype: Function,\n\t\trequired: true\n\t})\n\treadonly fetchData!: () => Promise;\n\n\t@Prop({\n\t\ttype: Function,\n\t\trequired: false\n\t})\n\treadonly secondaryFetchData?: () => Promise;\n\n\t@Prop({\n\t\ttype: Boolean,\n\t\trequired: false,\n\t\tdefault: false\n\t})\n\treadonly useSilentLoading!: boolean;\n\n\t@Prop({\n\t\ttype: Boolean,\n\t\trequired: false,\n\t\tdefault: false\n\t})\n\treadonly hideLoading!: boolean;\n\n\tloading = false;\n\tsilentLoading = false;\n\terror = false;\n\n\tasync created() {\n\t\tawait this.handleLoad();\n\t}\n\n\n\t// Watch for route param changes (id change)\n\t@Watch(\"id\")\n\tasync onIdChange() {\n\t\tif (this.useSilentLoading) {\n\t\t\tthis.silentLoading = true;\n\t\t}\n\t\tawait this.handleSecondaryLoad();\n\t}\n\n\tasync handleLoad() {\n\t\tthis.loading = true;\n\t\tthis.$emit(\"update:isLoading\", this.loading);\n\n\t\ttry {\n\t\t\tawait this.fetchData();\n\t\t\tthis.error = false;\n\t\t} catch (error) {\n\t\t\tthis.error = true;\n\t\t}\n\t\tthis.loading = false;\n\t\tthis.$emit(\"update:isLoading\", this.loading);\n\n\t\tthis.silentLoading = false;\n\t}\n\n\tasync handleSecondaryLoad() {\n\t\tthis.loading = true;\n\t\tthis.$emit(\"update:isLoading\", this.loading);\n\n\t\ttry {\n\t\t\tif (this.secondaryFetchData) {\n\t\t\t\tawait this.secondaryFetchData();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tawait this.fetchData();\n\t\t\t}\n\t\t\tthis.error = false;\n\t\t} catch (error) {\n\t\t\tthis.error = true;\n\t\t}\n\t\tthis.loading = false;\n\t\tthis.$emit(\"update:isLoading\", this.loading);\n\n\t\tthis.silentLoading = false;\n\t}\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataFetcher.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataFetcher.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DataFetcher.vue?vue&type=template&id=452e8cc9&scoped=true&\"\nimport script from \"./DataFetcher.vue?vue&type=script&lang=ts&\"\nexport * from \"./DataFetcher.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./DataFetcher.vue?vue&type=style&index=0&id=452e8cc9&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"452e8cc9\",\n null\n \n)\n\nexport default component.exports","export const colorPlayerCount = (nbPlayers: number) => {\n\tif (nbPlayers < 10) {\n\t\treturn \"red\";\n\t}\n\telse if (10 <= nbPlayers && nbPlayers < 20) {\n\t\treturn \"teal\";\n\t}\n\telse if (nbPlayers === 20) {\n\t\treturn \"green\";\n\t}\n\telse if (20 < nbPlayers && nbPlayers <= 30) {\n\t\treturn \"teal\";\n\t}\n\treturn \"red\";\n};","export const sortByAsc = (f: (x: T) => string | number) => {\n\treturn (a: T, b: T): number => {\n\t\tif (f(a) < f(b)) { return -1; }\n\t\tif (f(a) > f(b)) { return 1; }\n\t\treturn 0;\n\t};\n};\n\nexport const sortByDesc = (f: (x: T) => string | number) => {\n\treturn (a: T, b: T): number => {\n\t\tif (f(a) < f(b)) { return 1; }\n\t\tif (f(a) > f(b)) { return -1; }\n\t\treturn 0;\n\t};\n};","'use strict';\n// https://github.com/tc39/proposal-string-pad-start-end\nvar $export = require('./_export');\nvar $pad = require('./_string-pad');\nvar userAgent = require('./_user-agent');\n\n// https://github.com/zloirock/core-js/issues/280\nvar WEBKIT_BUG = /Version\\/10\\.\\d+(\\.\\d+)?( Mobile\\/\\w+)? Safari\\//.test(userAgent);\n\n$export($export.P + $export.F * WEBKIT_BUG, 'String', {\n padStart: function padStart(maxLength /* , fillString = ' ' */) {\n return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);\n }\n});\n"],"sourceRoot":""}