@golstats/gsc-relevant-data 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/{CardBaseAllIndividual-BNOgnH6t-D0xjZkGw.js → CardBaseAllIndividual-Din4dnnE-ClvswX2H.js} +13 -12
  2. package/dist/CardGeneral-70CyP1c9-DzGLKPLW.js +127 -0
  3. package/dist/{CardGeneralIndividual-BHjZ12n1-BvodKC3y.js → CardGeneralIndividual-CFAG9SL3-Cm2WMulY.js} +83 -77
  4. package/dist/{CardGeneralTeams-ByBEp-8b-CbLocm8U.js → CardGeneralTeams-C1b59sT7-DKIH3pKd.js} +151 -146
  5. package/dist/{CardIndividual-BR1r5B5u-DqflCygx.js → CardIndividual-BVJEvLuq-DNLGRnJn.js} +38 -37
  6. package/dist/CardIndividual1vs1-BEIdhWs1-CmX-Dpme.js +109 -0
  7. package/dist/{CardIndividualAreas-qEYtV2XP-C97pNpBa.js → CardIndividualAreas-T43vItFr-GlwzP3pQ.js} +22 -21
  8. package/dist/{CardIndividualCenters-DURH48kE-BAeLhbBk.js → CardIndividualCenters-fZNKbbXo-CvIgTyZn.js} +121 -120
  9. package/dist/{CardIndividualDistance-BKeSbWJ9-B6Vj1YLa.js → CardIndividualDistance-CcU2Vbnx-DlR0hivB.js} +32 -31
  10. package/dist/{CardIndividualFouls-BqWT8Bzx-D0EDbSJl.js → CardIndividualFouls-BYcKqeFK-BGZfrm52.js} +111 -110
  11. package/dist/CardIndividualGoalParticipation-yPoWp2QU-DpNpWdqc.js +112 -0
  12. package/dist/{CardIndividualGoals-CBAA7DE3-Dco1VuBc.js → CardIndividualGoals-C69mSV2s-CBAHkKBm.js} +181 -180
  13. package/dist/{CardIndividualGold-BBYsUCND-BhqSGl0q.js → CardIndividualGold-BxCrvpoF-BEc0OJ86.js} +28 -26
  14. package/dist/{CardIndividualNoGoalReceived-HaDOJruE-CKzigvOP.js → CardIndividualNoGoalReceived-CqVz1A2y-Bkyl-TxG.js} +56 -55
  15. package/dist/CardIndividualPerformance-JjUTmJQy-8qdezjEh.js +104 -0
  16. package/dist/{CardIndividualSaves-BqBRjEt7-CJBgPvne.js → CardIndividualSaves-DEvTL6Uw-_tm_oIfl.js} +70 -65
  17. package/dist/{CardIndividualShotsOnGoal-X_3YzAE3-CbiYLtzD.js → CardIndividualShotsOnGoal-BxwPL-4b-8RHeYE0k.js} +55 -54
  18. package/dist/{CardIndividualStatistics-D769xisE-D2KNSIfX.js → CardIndividualStatistics-DQRVwOUb-Cq_TJCc_.js} +35 -34
  19. package/dist/{CardPromTournament-DFGqM4we-C4dX0pKz.js → CardPromTournament-HcWvduRV-BAoQc2Cb.js} +28 -27
  20. package/dist/{CardSuccessfulPasses-CTjMzZAt-Bv_X927S.js → CardSuccessfulPasses-D9ZpWlLr-u3HOsral.js} +16 -15
  21. package/dist/CardTheMostProductive-CNNFBK3--DOPfJcMr.js +76 -0
  22. package/dist/{CircleWithDotsBig-DfppYko9-BYZNX7zX.js → CircleWithDotsBig-DOPQy89I-Cv_-f5J6.js} +1 -1
  23. package/dist/{Shield-BjoeEr7g-C7yufXoK.js → Shield-COMdrYaO-CAc0Epy_.js} +60 -55
  24. package/dist/gsc-relevant-data.css +1 -1
  25. package/dist/gsc-relevant-data.js +2 -4918
  26. package/dist/gsc-relevant-data.umd.cjs +6 -6
  27. package/dist/index-Cb9m7Z8V.js +4933 -0
  28. package/dist/misc-CMAhmOsp-CuP1bOXh.js +163 -0
  29. package/package.json +2 -2
  30. package/dist/CardGeneral-D2PYPb95-DycFnfDS.js +0 -116
  31. package/dist/CardIndividual1vs1-DPov_cGc-DtWs-qcq.js +0 -487
  32. package/dist/CardIndividualGoalParticipation-CRBepIcB-CBc1Wh03.js +0 -108
  33. package/dist/CardIndividualPerformance-CEPnHtE9-Da4MXSxk.js +0 -99
  34. package/dist/CardTheMostProductive-DzbDtzZn-Dewb8MoQ.js +0 -74
  35. package/dist/misc-BJvl3Yld-2p2XKW1m.js +0 -168
@@ -1,4920 +1,4 @@
1
- import { useCssVars as se, ref as F, onMounted as ge, onUnmounted as Jt, resolveComponent as $, openBlock as f, createElementBlock as p, createElementVNode as h, normalizeStyle as k, Fragment as A, renderList as P, toDisplayString as I, renderSlot as Z, createCommentVNode as S, createVNode as z, withCtx as M, normalizeClass as E, computed as W, createBlock as q, unref as ye, watch as fe, onBeforeMount as St, Transition as vt, withDirectives as Q, vShow as re, pushScopeId as ie, popScopeId as ne, mergeProps as Gt, defineAsyncComponent as x, resolveDynamicComponent as Vt, withModifiers as Xe, vModelText as Xt } from "vue";
2
- function Zt(e) {
3
- const r = F({ width: 0, height: 0 });
4
- function t() {
5
- const o = e.value.getBoundingClientRect();
6
- r.value.width = o.width, r.value.height = o.height;
7
- }
8
- return ge(() => {
9
- t(), window.addEventListener("resize", t);
10
- }), Jt(() => {
11
- window.removeEventListener("resize", t);
12
- }), { elementSize: r };
13
- }
14
- const Kt = (e, r) => {
15
- const t = e.__vccOpts || e;
16
- for (const [o, s] of r)
17
- t[o] = s;
18
- return t;
19
- }, ze = {
20
- name: "ScrollableContainer",
21
- props: {
22
- backgroundColor: { type: String, default: "#0D1D29" },
23
- pxScroll: { type: Number, default: 100 },
24
- arrows: { type: Boolean, default: !0 },
25
- arrowsHideOnNoScroll: { type: Boolean, default: !1 },
26
- arrowsScrollHide: { type: Boolean, default: !1 },
27
- arrowsColor: { type: String, default: "#CBEE6B" },
28
- arrowsHeight: { type: Number, default: 15 },
29
- arrowsWidth: { type: Number, default: 15 },
30
- arrowsPadding: { type: Number, default: 5 },
31
- arrowsMargin: { type: Number, default: 10 },
32
- arrowsRadius: { type: String, default: "0%" },
33
- arrowsBorder: { type: String, default: "none" },
34
- arrowsBackground: { type: String, default: "#0D1D29" },
35
- arrowsContainerBgL: { type: String, default: "#0D1D29" },
36
- arrowsContainerBgR: { type: String, default: "#0D1D29" },
37
- scrollColor: { type: String, default: "#c3e569" },
38
- arrowsPosition: { type: String, default: "relative" },
39
- height: { type: String, default: "100%" }
40
- },
41
- data() {
42
- return {
43
- showLeftArrow: !1,
44
- showRightArrow: !0,
45
- intervalid1: ""
46
- };
47
- },
48
- mounted() {
49
- this.getScroll(), this.arrowsHideOnNoScroll && window.addEventListener("resize", this.resizeSlider), this.arrowsHideOnNoScroll && this.listenerLoad();
50
- },
51
- beforeUnmount() {
52
- this.arrowsHideOnNoScroll && window.removeEventListener("resize", this.resizeSlider), this.arrowsHideOnNoScroll && clearInterval(this.intervalid1);
53
- },
54
- computed: {
55
- getViewBox() {
56
- return `-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`;
57
- },
58
- hideShowLeftArrow() {
59
- let e = "";
60
- return this.arrowsPosition == "absolute" ? e = "leftAbsolute" : e = "leftRelative", this.arrowsScrollHide ? this.showLeftArrow ? e += " showArrowSlide" : e += " hideArrowSlide" : e += " showArrowSlide", e;
61
- },
62
- hideShowRightArrow() {
63
- let e = "";
64
- return this.arrowsPosition == "absolute" ? e = "rightAbsolute" : e = "rightRelative", this.arrowsScrollHide ? this.showRightArrow ? e += " showArrowSlide" : e += " hideArrowSlide" : e += " showArrowSlide", e;
65
- }
66
- },
67
- methods: {
68
- scrollLeft() {
69
- this.$refs.content.scrollLeft -= this.pxScroll;
70
- },
71
- scrollRight() {
72
- this.$refs.content.scrollLeft += this.pxScroll;
73
- },
74
- getScroll() {
75
- let e = 0;
76
- this.arrowsPosition == "relative" ? e = this.$refs.content.scrollWidth - this.$el.clientWidth + this.arrowsMargin * 2 + this.arrowsWidth * 4 : e = this.$refs.content.scrollWidth - this.$el.clientWidth, this.$refs.content.scrollLeft == 0 ? this.showLeftArrow = !1 : this.showLeftArrow = !0, e > 0 && (this.$refs.content.scrollLeft == e ? this.showRightArrow = !1 : this.showRightArrow = !0), this.arrowsHideOnNoScroll && this.$refs.content.clientWidth === this.$refs.content.scrollWidth && (this.showRightArrow = !1);
77
- },
78
- resizeSlider() {
79
- this.getScroll();
80
- let e;
81
- clearTimeout(e), e = setTimeout(this.getScroll, 1e3);
82
- },
83
- listenerLoad() {
84
- this.intervalid1 = setInterval((function() {
85
- var e = this.$el.clientWidth, r = this.$refs.content.scrollWidth;
86
- r > 0 && e > 0 && (r > e ? (this.showRightArrow = !0, clearInterval(this.intervalid1)) : clearInterval(this.intervalid1));
87
- }).bind(this), 3e3);
88
- }
89
- }
90
- }, Ze = () => {
91
- se((e) => ({
92
- "42d3dba6": e.backgroundColor,
93
- "4de5d2cf": e.height,
94
- "67bafa7b": e.arrowsPosition,
95
- "61e1032e": e.arrowsPadding + "px",
96
- "79a4ac00": e.arrowsBackground,
97
- "6b8355c6": e.arrowsHeight * 2 + "px",
98
- "29a58368": e.arrowsWidth * 2 + "px",
99
- "3622fa64": e.arrowsRadius,
100
- "1ba101fe": e.arrowsBorder,
101
- "0bafb5e6": e.arrowsMargin + "px",
102
- "423a44b8": e.arrowsContainerBgL,
103
- "423a44be": e.arrowsContainerBgR,
104
- "10b117ee": e.scrollColor
105
- }));
106
- }, Ke = ze.setup;
107
- ze.setup = Ke ? (e, r) => (Ze(), Ke(e, r)) : Ze;
108
- const Qt = {
109
- ref: "gscScrollableContainer",
110
- class: "scrollable-container"
111
- }, Yt = { class: "scrollable-arrows" }, er = ["width", "height", "viewBox"], tr = ["stroke"], rr = { class: "scrollable-wrapper" }, or = { class: "scrollable-arrows" }, sr = ["width", "height", "viewBox"], ir = ["stroke"];
112
- function nr(e, r, t, o, s, i) {
113
- return f(), p("div", Qt, [
114
- t.arrows ? (f(), p("div", {
115
- key: 0,
116
- class: E(["arrows-container", i.hideShowLeftArrow]),
117
- onClick: r[0] || (r[0] = (...n) => i.scrollLeft && i.scrollLeft(...n))
118
- }, [
119
- h("div", Yt, [
120
- (f(), p("svg", {
121
- width: t.arrowsWidth,
122
- height: t.arrowsHeight,
123
- viewBox: i.getViewBox,
124
- fill: "none",
125
- xmlns: "http://www.w3.org/2000/svg"
126
- }, [
127
- h("path", {
128
- d: "M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",
129
- stroke: t.arrowsColor
130
- }, null, 8, tr)
131
- ], 8, er))
132
- ])
133
- ], 2)) : S("", !0),
134
- h("div", {
135
- class: "scrollable-content scrollable-content-slider",
136
- ref: "content",
137
- onScroll: r[1] || (r[1] = (...n) => i.getScroll && i.getScroll(...n))
138
- }, [
139
- h("div", rr, [
140
- Z(e.$slots, "default", {}, void 0, !0)
141
- ])
142
- ], 544),
143
- t.arrows ? (f(), p("div", {
144
- key: 1,
145
- id: "arrows-container-right",
146
- class: E(["arrows-container", i.hideShowRightArrow]),
147
- onClick: r[2] || (r[2] = (...n) => i.scrollRight && i.scrollRight(...n))
148
- }, [
149
- h("div", or, [
150
- (f(), p("svg", {
151
- width: t.arrowsWidth,
152
- height: t.arrowsHeight,
153
- viewBox: i.getViewBox,
154
- fill: "none",
155
- xmlns: "http://www.w3.org/2000/svg"
156
- }, [
157
- h("path", {
158
- d: "M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",
159
- stroke: t.arrowsColor
160
- }, null, 8, ir)
161
- ], 8, sr))
162
- ])
163
- ], 2)) : S("", !0)
164
- ], 512);
165
- }
166
- const ar = /* @__PURE__ */ Kt(ze, [["render", nr], ["__scopeId", "data-v-b548a08d"]]), lr = (e, r) => {
167
- const t = e.__vccOpts || e;
168
- for (const [o, s] of r)
169
- t[o] = s;
170
- return t;
171
- }, Fe = {
172
- components: {
173
- GSCSlider: ar
174
- },
175
- props: {
176
- arrow: {
177
- type: Boolean,
178
- required: !0
179
- },
180
- buttons: {
181
- type: Array,
182
- required: !0
183
- },
184
- width: {
185
- type: String,
186
- default: "300px"
187
- },
188
- height: {
189
- type: String,
190
- default: "80px"
191
- },
192
- fontSize: {
193
- type: String,
194
- default: "16px"
195
- },
196
- colorFont: {
197
- type: String,
198
- default: "#ffffff"
199
- },
200
- backgroundOptionActive: {
201
- type: String,
202
- default: "#0d1d29"
203
- },
204
- colorOptionActive: {
205
- type: String,
206
- default: "#cbee6b"
207
- },
208
- colorOptionDisable: {
209
- type: String,
210
- default: "gray"
211
- },
212
- backgroundOptionDisable: {
213
- type: String,
214
- default: "#0d1d29"
215
- },
216
- fontFamily: {
217
- type: String,
218
- default: "Poppins-Semibold"
219
- },
220
- borderWidth: {
221
- type: String,
222
- default: "3px"
223
- },
224
- borderRadius: {
225
- type: String,
226
- default: "0px"
227
- },
228
- selectedOption: {
229
- type: String,
230
- default: ""
231
- },
232
- type: {
233
- type: Number,
234
- default: 0
235
- },
236
- borderWidthContainer: {
237
- type: String,
238
- default: "1px"
239
- },
240
- background: {
241
- type: String,
242
- default: "#0d1d29"
243
- },
244
- borderColorContainer: {
245
- type: String,
246
- default: "#505355"
247
- },
248
- pxScroll: { type: Number, default: 100 },
249
- scrollColor: { type: String, default: "#c3e569" },
250
- arrowsPosition: { type: String, default: "relative" },
251
- arrowsScrollHide: { type: Boolean, default: !1 },
252
- arrowsBackground: { type: String, default: "#0D1D29" },
253
- arrowsContainerBgL: { type: String, default: "#0D1D29" },
254
- arrowsContainerBgR: { type: String, default: "#0D1D29" },
255
- arrowsMargin: { type: Number, default: 10 },
256
- arrowsRadius: { type: String, default: "0%" },
257
- arrowsBorder: { type: String, default: "none" }
258
- },
259
- setup() {
260
- const e = F("myDivRef"), {
261
- elementSize: r
262
- } = Zt(e);
263
- return {
264
- myDivRef: e,
265
- elementSize: r
266
- };
267
- },
268
- methods: {
269
- clickEmitEvent(e) {
270
- this.$emit("input", e);
271
- },
272
- customGrid(e) {
273
- var r = {};
274
- return e.width > 768 ? r = {
275
- fontSize: "16px"
276
- } : e.width > 480 ? r = {
277
- fontSize: "14px"
278
- } : r = {
279
- fontSize: "12px"
280
- }, r;
281
- }
282
- }
283
- }, Qe = () => {
284
- se((e) => ({
285
- cff4a118: e.fontSize,
286
- "42aab7f6": e.borderWidth,
287
- d29bcbd2: e.fontFamily,
288
- df6c5a9c: e.background,
289
- "09b32862": e.borderRadius,
290
- "8c0d6daa": e.borderWidthContainer,
291
- e8a86fa4: e.borderColorContainer,
292
- "179494da": e.colorOptionActive,
293
- cea5647c: e.width
294
- }));
295
- }, Ye = Fe.setup;
296
- Fe.setup = Ye ? (e, r) => (Qe(), Ye(e, r)) : Qe;
297
- const dr = { ref: "myDivRef" }, cr = {
298
- key: 0,
299
- class: "gs-switch-container"
300
- }, ur = ["onClick"], hr = {
301
- key: 1,
302
- class: "gs-switch-container-type"
303
- }, fr = ["onClick"], pr = {
304
- key: 2,
305
- class: "gs-switch-container-carousel"
306
- }, mr = ["onClick"];
307
- function gr(e, r, t, o, s, i) {
308
- const n = $("GSCSlider");
309
- return f(), p("div", dr, [
310
- t.type == 0 ? (f(), p("div", cr, [
311
- h("div", {
312
- class: "gs-switch-container__control",
313
- style: k([i.customGrid(o.elementSize)])
314
- }, [
315
- (f(!0), p(A, null, P(t.buttons, (l, a) => (f(), p("div", {
316
- class: "gs-switch-container__control__button-option",
317
- style: k([{ height: t.height }, t.selectedOption == l ? { borderColor: t.colorOptionActive, color: t.colorFont + "!important", background: t.backgroundOptionActive } : { borderColor: t.colorOptionDisable, color: "grey !important" }]),
318
- key: a,
319
- onClick: (c) => (t.selectedOption = l, i.clickEmitEvent(l))
320
- }, I(l), 13, ur))), 128))
321
- ], 4),
322
- Z(e.$slots, t.selectedOption, {}, void 0, !0)
323
- ])) : S("", !0),
324
- t.type == 1 ? (f(), p("div", hr, [
325
- h("div", {
326
- class: "gs-switch-container-type__control",
327
- style: k([i.customGrid(o.elementSize)])
328
- }, [
329
- (f(!0), p(A, null, P(t.buttons, (l, a) => (f(), p("div", {
330
- class: "gs-switch-container-type__control__button-option-type",
331
- style: k([{ height: t.height }, t.selectedOption == l ? { borderColor: t.colorOptionActive, color: t.colorFont + "!important", background: t.backgroundOptionActive } : { borderColor: t.colorOptionDisable, borderWidth: "0px", borderWidth: "0px !important", color: "grey !important", background: t.backgroundOptionDisable }]),
332
- key: a,
333
- onClick: (c) => (t.selectedOption = l, i.clickEmitEvent(l))
334
- }, I(l), 13, fr))), 128))
335
- ], 4)
336
- ])) : S("", !0),
337
- t.type == 2 ? (f(), p("div", pr, [
338
- z(n, {
339
- arrows: t.arrow,
340
- "background-color": t.background,
341
- "px-scroll": t.pxScroll,
342
- "scroll-color": t.scrollColor,
343
- "arrows-position": t.arrowsPosition,
344
- arrowsScrollHide: t.arrowsScrollHide,
345
- "arrows-background": t.arrowsBackground,
346
- "arrows-container-bg-l": t.arrowsContainerBgL,
347
- "arrows-container-bg-r": t.arrowsContainerBgR,
348
- "arrows-margin": t.arrowsMargin,
349
- "arrows-radius": t.arrowsRadius,
350
- "arrows-border": t.arrowsBorder
351
- }, {
352
- default: M(() => [
353
- (f(!0), p(A, null, P(t.buttons, (l, a) => (f(), p("div", {
354
- class: "button-option-multi",
355
- style: k([{ height: t.height }, t.selectedOption == l ? { borderColor: t.colorOptionActive, color: t.colorFont + "!important", background: t.backgroundOptionActive } : { borderColor: t.colorOptionDisable, color: "grey !important" }]),
356
- key: a,
357
- onClick: (c) => (t.selectedOption = l, i.clickEmitEvent(l))
358
- }, I(l), 13, mr))), 128))
359
- ]),
360
- _: 1
361
- }, 8, ["arrows", "background-color", "px-scroll", "scroll-color", "arrows-position", "arrowsScrollHide", "arrows-background", "arrows-container-bg-l", "arrows-container-bg-r", "arrows-margin", "arrows-radius", "arrows-border"])
362
- ])) : S("", !0)
363
- ], 512);
364
- }
365
- const yr = /* @__PURE__ */ lr(Fe, [["render", gr], ["__scopeId", "data-v-8a86dfaf"]]), wr = (e, r) => {
366
- const t = e.__vccOpts || e;
367
- for (const [o, s] of r)
368
- t[o] = s;
369
- return t;
370
- }, We = {
371
- props: {
372
- type: { type: Number, default: 0 },
373
- value: { type: Boolean, default: !1 },
374
- textValue: String,
375
- icon: String,
376
- iconPosition: { type: String, default: "left" },
377
- iconSize: String,
378
- fontColor: { type: String, default: "#FFFFFF" },
379
- textDecoration: String,
380
- fontSize: { type: String, default: "16px" },
381
- fontSizeStat: { type: String, default: "16px" },
382
- fontStyle: String,
383
- fontFamily: { type: String, default: "Poppins-Regular" },
384
- height: { type: String, default: "fit-content" },
385
- width: { type: String, default: "fit-content" },
386
- borderRadius: { type: String, default: "0px" },
387
- borderType: { type: String, default: "solid" },
388
- borderWidth: { type: Number, default: 0 },
389
- borderWidthBtn: { type: String, default: "2px" },
390
- borderColor: String,
391
- backgroundColor: { type: String, default: "none" },
392
- activeBackgroundColor: { type: String, default: "#000000" },
393
- activeBorderWidth: { type: Number, default: 2 },
394
- activeBorderType: { type: String, default: "solid" },
395
- activeBorderColor: { type: String, default: "#cbee6b" },
396
- activeColorText: { type: String, default: "#FFFFFF" },
397
- cursorType: { type: String, default: "default" },
398
- typeOnOff: { type: Boolean, default: !1 },
399
- textCategory: String,
400
- textStat: String,
401
- marginLeftStat: { type: String, default: "15%" }
402
- },
403
- watch: {
404
- value: {
405
- deep: !0,
406
- immediate: !0,
407
- handler(e) {
408
- this.status = e;
409
- }
410
- }
411
- },
412
- data() {
413
- return { status: !1 };
414
- },
415
- computed: {
416
- customStyle() {
417
- return {
418
- height: this.height,
419
- width: this.width,
420
- backgroundColor: this.backgroundColor,
421
- borderRadius: this.borderRadius,
422
- border: `${this.borderType} ${this.borderWidth}px ${this.borderColor}`,
423
- color: this.fontColor,
424
- textDecoration: this.textDecoration,
425
- cursor: this.cursorType,
426
- fontSize: this.fontSize,
427
- fontStyle: this.fontStyle,
428
- fontFamily: `${this.fontFamily} !important`
429
- };
430
- },
431
- customActive() {
432
- return {
433
- backgroundColor: this.activeBackgroundColor,
434
- color: this.activeColorText,
435
- border: `${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`
436
- };
437
- }
438
- },
439
- methods: {
440
- btnClick(e) {
441
- this.$emit("click", e), this.typeOnOff && (this.status = !this.status, this.$emit("status", this.status));
442
- }
443
- }
444
- }, et = () => {
445
- se((e) => ({
446
- "9d01acb4": e.height,
447
- "14e95081": e.borderWidthBtn,
448
- "38fec285": e.borderType,
449
- 34353510: e.borderColor,
450
- "20d20dc6": e.borderRadius,
451
- 17130967: e.width,
452
- "4ccb7d36": e.backgroundColor,
453
- "5d1e86a2": e.cursorType,
454
- ce65d4a2: e.fontSize,
455
- fe4ac47a: e.fontStyle,
456
- f98e44dc: e.fontFamily,
457
- "93b87770": e.marginLeftStat,
458
- c7f7beba: e.fontSizeStat
459
- }));
460
- }, tt = We.setup;
461
- We.setup = tt ? (e, r) => (et(), tt(e, r)) : et;
462
- const br = (e) => (ie("data-v-f3ee6b2b"), e = e(), ne(), e), Sr = ["src"], vr = {
463
- key: 1,
464
- class: "text"
465
- }, Cr = ["src"], _r = { class: "stats" }, kr = /* @__PURE__ */ br(() => /* @__PURE__ */ h("img", {
466
- class: "iconstats",
467
- src: "https://golstatsimages.blob.core.windows.net/todoelfut/playdes.png"
468
- }, null, -1)), Tr = { class: "numstats" }, Ir = { class: "leyend" };
469
- function xr(e, r, t, o, s, i) {
470
- return f(), p("div", null, [
471
- t.type == 0 ? (f(), p("div", {
472
- key: 0,
473
- class: E(["button", s.status && t.typeOnOff && "button-active"]),
474
- style: k([i.customStyle, s.status && t.typeOnOff && i.customActive]),
475
- onClick: r[0] || (r[0] = (...n) => i.btnClick && i.btnClick(...n))
476
- }, [
477
- t.icon && t.iconPosition.toLowerCase() === "left" ? (f(), p("img", {
478
- key: 0,
479
- class: "icon",
480
- style: k({ width: t.iconSize }),
481
- src: t.icon
482
- }, null, 12, Sr)) : S("", !0),
483
- t.textValue ? (f(), p("div", vr, I(t.textValue), 1)) : S("", !0),
484
- t.icon && t.iconPosition.toLowerCase() === "right" ? (f(), p("img", {
485
- key: 2,
486
- class: "icon",
487
- style: k({ width: t.iconSize }),
488
- src: t.icon
489
- }, null, 12, Cr)) : S("", !0)
490
- ], 6)) : S("", !0),
491
- t.type == 1 ? (f(), p("div", {
492
- key: 1,
493
- class: "button-target",
494
- onClick: r[1] || (r[1] = (...n) => i.btnClick && i.btnClick(...n))
495
- }, [
496
- h("div", _r, [
497
- kr,
498
- h("div", Tr, I(t.textStat), 1)
499
- ]),
500
- h("div", Ir, I(t.textCategory), 1)
501
- ])) : S("", !0)
502
- ]);
503
- }
504
- const Or = /* @__PURE__ */ wr(We, [["render", xr], ["__scopeId", "data-v-f3ee6b2b"]]), Ar = { class: "gsc-dropdown__main-container__item-selected" }, Pr = ["height", "width"], Rr = ["stroke"], Er = { class: "gsc-dropdown__items-container" }, Br = ["onClick"], Dr = {
505
- key: 0,
506
- class: "gsc-dropdown__items-footer"
507
- }, Nr = {
508
- __name: "GSC-Dropdown",
509
- props: {
510
- modelValue: {
511
- type: [Object, Number, String],
512
- default: () => null
513
- },
514
- height: {
515
- type: String,
516
- default: "fit-content"
517
- },
518
- width: {
519
- type: String,
520
- default: "fit-content"
521
- },
522
- fontSize: {
523
- type: String,
524
- default: "14px"
525
- },
526
- borderRadius: {
527
- type: Number,
528
- default: 5
529
- },
530
- arrowHeight: {
531
- type: Number,
532
- default: 24
533
- },
534
- arrowWidth: {
535
- type: Number,
536
- default: 24
537
- },
538
- borderType: {
539
- type: String,
540
- default: "solid",
541
- validator: function(e) {
542
- return ["solid", "dotted", "dashed"].includes(e);
543
- }
544
- },
545
- borderWidth: {
546
- type: Number,
547
- default: 1
548
- },
549
- borderColor: {
550
- type: String,
551
- default: "black"
552
- },
553
- backgroundColor: {
554
- type: String,
555
- default: "grey"
556
- },
557
- color: {
558
- type: String,
559
- default: "black"
560
- },
561
- arrowColor: {
562
- type: String,
563
- default: "#CBEE6B"
564
- },
565
- items: {
566
- type: Array,
567
- default: () => []
568
- },
569
- defaultItemByIndex: {
570
- type: Number,
571
- default: 0
572
- },
573
- defaultItemByProp: {
574
- type: Object,
575
- default: null,
576
- validator: (e) => ["propName", "value"].every((r) => r in e)
577
- },
578
- listBackgroundColor: {
579
- type: String,
580
- default: "white"
581
- },
582
- hoverBackgroundColor: {
583
- type: String,
584
- default: "#f1f1f1"
585
- },
586
- listMarginTop: {
587
- type: String,
588
- default: "0"
589
- },
590
- listContainerPadding: {
591
- type: String,
592
- default: "0"
593
- },
594
- listItemPadding: {
595
- type: String,
596
- default: "10px 12px"
597
- },
598
- listItemMargin: {
599
- type: String,
600
- default: "0"
601
- },
602
- listHeight: {
603
- type: String,
604
- default: "fit-content"
605
- },
606
- listItemSelectedColor: {
607
- type: String,
608
- default: "white"
609
- },
610
- listItemSelectedBackgroundColor: {
611
- type: String,
612
- default: "#399cfd"
613
- },
614
- listItemColor: {
615
- type: String,
616
- default: "black"
617
- },
618
- listBorderRadius: {
619
- type: String,
620
- default: "0"
621
- },
622
- listBorderColor: {
623
- type: String,
624
- default: ""
625
- },
626
- listBorderWidth: {
627
- type: Number,
628
- default: 1
629
- },
630
- listItemBorderRadius: {
631
- type: String,
632
- default: "0"
633
- },
634
- listAlignment: {
635
- type: String,
636
- default: "left"
637
- },
638
- isListSameWidth: {
639
- type: Boolean,
640
- default: !1
641
- },
642
- isMultipleOption: {
643
- type: Boolean,
644
- default: !1
645
- },
646
- footerBorderColor: {
647
- type: String,
648
- default: "#626970"
649
- },
650
- footerBorderWidth: {
651
- type: Number,
652
- default: 1
653
- },
654
- isFooterVisible: {
655
- type: Boolean,
656
- default: !1
657
- },
658
- isDisabled: {
659
- type: Boolean,
660
- default: !1
661
- },
662
- onlyFirstTime: {
663
- type: Boolean,
664
- default: !1
665
- }
666
- },
667
- emits: ["input", "click-ready", "update:modelValue"],
668
- setup(e, { emit: r }) {
669
- const t = e, o = F({}), s = F(null), i = F(t.isMultipleOption ? -1 : 0), n = F(!1);
670
- fe(
671
- () => t.items,
672
- (y, g) => {
673
- if (!t.modelValue && (!t.onlyFirstTime || !g || !g.length) && y && y.length) {
674
- if (t.defaultItemByProp) {
675
- const w = t.items.findIndex(
676
- (b) => b[t.defaultItemByProp.propName] === t.defaultItemByProp.value
677
- );
678
- w !== -1 ? (i.value = w, o.value = y[w]) : (i.value = 0, o.value = y[0]);
679
- } else
680
- o.value = y[t.defaultItemByIndex];
681
- r("input", o.value);
682
- }
683
- },
684
- { immediate: !0 }
685
- ), fe(
686
- () => t.modelValue,
687
- (y) => {
688
- if (y) {
689
- const g = t.items.findIndex((w) => typeof y == "object" ? JSON.stringify(w) === JSON.stringify(y) : w === y);
690
- g !== -1 && (i.value = g, o.value = t.items[g], r("update:modelValue", o.value));
691
- }
692
- },
693
- { immediate: !0 }
694
- );
695
- const l = W(() => ({
696
- height: t.height,
697
- width: t.width,
698
- backgroundColor: t.backgroundColor,
699
- borderRadius: `${t.borderRadius}px`,
700
- border: `${t.borderType} ${t.borderWidth}px ${t.borderColor}`,
701
- color: t.color,
702
- "--hover-background-color": t.hoverBackgroundColor,
703
- "--list-container-padding": t.listContainerPadding,
704
- "--list-item-padding": t.listItemPadding,
705
- "--list-item-margin": t.listItemMargin,
706
- "--list-background-color": t.listBackgroundColor,
707
- "--list-height": t.listHeight,
708
- "--list-item-border-radius": t.listItemBorderRadius,
709
- "--list-item-selected-color": t.listItemSelectedColor,
710
- "--list-item-selected-background-color": t.listItemSelectedBackgroundColor,
711
- "--list-item-color": t.listItemColor,
712
- "--list-border-radius": `${t.listBorderRadius}`,
713
- "--list-border-color": t.listBorderColor,
714
- "--list-width": t.isListSameWidth ? t.width : "fit-content",
715
- "--list-border-width": `${t.listBorderWidth}px`,
716
- "--list-margin-top": t.listMarginTop,
717
- "--list-left": t.listAlignment === "left" ? "0" : "auto",
718
- "--list-right": t.listAlignment === "right" ? "0" : "auto",
719
- "--footer-border": `${t.footerBorderWidth}px solid ${t.footerBorderColor}`,
720
- "--dropdown-opacity": t.isDisabled ? "0.5" : "1",
721
- "--dropdown-cursor": t.isDisabled ? "not-allowed" : "pointer",
722
- "--dropdown-font-size": t.fontSize ? t.fontSize : "14px"
723
- })), a = W(() => ({
724
- height: `${t.arrowHeight}px`,
725
- width: `${t.arrowWidth}px`
726
- }));
727
- function c() {
728
- t.isDisabled || (n.value = !n.value);
729
- }
730
- function u(y) {
731
- s.value && !s.value.contains(y.target) && (n.value = !1);
732
- }
733
- function m(y, g) {
734
- t.isMultipleOption ? i.value = -1 : (i.value = g, n.value = !1), o.value = y, r("input", o.value), r("update:modelValue", o.value);
735
- }
736
- function v() {
737
- n.value = !1, r("click-ready");
738
- }
739
- return ge(() => {
740
- document.addEventListener("click", u);
741
- }), St(() => {
742
- document.removeEventListener("click", u);
743
- }), (y, g) => (f(), p("div", {
744
- ref_key: "dropDown",
745
- ref: s,
746
- class: "gsc-dropdown",
747
- style: k(l.value)
748
- }, [
749
- h("div", {
750
- class: "gsc-dropdown__main-container",
751
- style: k({ "padding-right": `${e.arrowWidth + 8}px` }),
752
- onClick: c
753
- }, [
754
- h("div", Ar, [
755
- Z(y.$slots, "default", { selectedItem: o.value })
756
- ]),
757
- h("div", {
758
- class: E(["gsc-dropdown__main-container__icon", { "rotated-180": n.value }]),
759
- style: k(a.value)
760
- }, [
761
- (f(), p("svg", {
762
- height: e.arrowHeight,
763
- width: e.arrowWidth,
764
- viewBox: "0 0 24 24",
765
- fill: "none",
766
- xmlns: "http://www.w3.org/2000/svg"
767
- }, [
768
- h("path", {
769
- d: "M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",
770
- stroke: e.arrowColor
771
- }, null, 8, Rr)
772
- ], 8, Pr))
773
- ], 6)
774
- ], 4),
775
- z(vt, null, {
776
- default: M(() => [
777
- Q(h("div", Er, [
778
- h("div", null, [
779
- h("div", {
780
- class: "gsc-dropdown__items",
781
- style: k({ "margin-top": `${t.borderWidth}px` })
782
- }, [
783
- (f(!0), p(A, null, P(e.items, (w, b) => (f(), p("div", {
784
- class: E(["gsc-dropdown__items__item", { selected: b === i.value }]),
785
- key: b,
786
- onClick: (T) => m(w, b)
787
- }, [
788
- Z(y.$slots, "availableItem", { item: w })
789
- ], 10, Br))), 128))
790
- ], 4),
791
- e.isFooterVisible ? (f(), p("div", Dr, [
792
- z(ye(Or), {
793
- "text-value": "Listo",
794
- "border-color": "#cbee6b",
795
- "font-size": "12px",
796
- width: "72px",
797
- height: "22px",
798
- "border-radius": "62px",
799
- "border-width": 0.8,
800
- onClick: v
801
- })
802
- ])) : S("", !0)
803
- ])
804
- ], 512), [
805
- [re, n.value]
806
- ])
807
- ]),
808
- _: 3
809
- })
810
- ], 4));
811
- }
812
- }, $r = (e, r) => {
813
- const t = e.__vccOpts || e;
814
- for (const [o, s] of r)
815
- t[o] = s;
816
- return t;
817
- }, Lr = { class: "season-name" }, zr = { class: "items-list-season" }, Fr = {
818
- __name: "GSC-SeasonSelect",
819
- props: {
820
- seasons: {
821
- type: Array,
822
- default: () => []
823
- },
824
- currentSeasonId: {
825
- type: Number,
826
- default: 0
827
- }
828
- },
829
- emits: ["input"],
830
- setup(e, { emit: r }) {
831
- const t = e, o = W(() => t.seasons.find((n) => n.id === t.currentSeasonId));
832
- function s(n) {
833
- r("input", n);
834
- }
835
- function i(n) {
836
- r("input", n);
837
- }
838
- return (n, l) => (f(), q(ye(Nr), {
839
- items: e.seasons,
840
- "model-value": o.value,
841
- height: "40px",
842
- width: "179px",
843
- "background-color": "#0d1d29",
844
- color: "white",
845
- "border-color": "rgba(255, 255, 255, 0.2)",
846
- "font-family": "Poppins-Regular",
847
- "border-radius": 8,
848
- onInput: i,
849
- "onUpdate:modelValue": s
850
- }, {
851
- default: M(({ selectedItem: a }) => [
852
- h("div", Lr, [
853
- h("span", null, I(a.name), 1)
854
- ])
855
- ]),
856
- availableItem: M(({ item: a }) => [
857
- h("span", zr, I(a.name), 1)
858
- ]),
859
- _: 1
860
- }, 8, ["items", "model-value"]));
861
- }
862
- }, Wr = /* @__PURE__ */ $r(Fr, [["__scopeId", "data-v-d23e9ee2"]]), Mr = (e, r) => {
863
- const t = e.__vccOpts || e;
864
- for (const [o, s] of r)
865
- t[o] = s;
866
- return t;
867
- }, Me = {
868
- props: {
869
- type: { type: Number, default: 0 },
870
- value: { type: Boolean, default: !1 },
871
- textValue: String,
872
- icon: String,
873
- iconPosition: { type: String, default: "left" },
874
- iconSize: String,
875
- fontColor: { type: String, default: "#FFFFFF" },
876
- textDecoration: String,
877
- fontSize: { type: String, default: "16px" },
878
- fontSizeStat: { type: String, default: "16px" },
879
- fontStyle: String,
880
- fontFamily: { type: String, default: "Poppins-Regular" },
881
- height: { type: String, default: "fit-content" },
882
- width: { type: String, default: "fit-content" },
883
- borderRadius: { type: String, default: "0px" },
884
- borderType: { type: String, default: "solid" },
885
- borderWidth: { type: Number, default: 0 },
886
- borderWidthBtn: { type: String, default: "2px" },
887
- borderColor: String,
888
- backgroundColor: { type: String, default: "none" },
889
- activeBackgroundColor: { type: String, default: "#000000" },
890
- activeBorderWidth: { type: Number, default: 2 },
891
- activeBorderType: { type: String, default: "solid" },
892
- activeBorderColor: { type: String, default: "#cbee6b" },
893
- activeColorText: { type: String, default: "#FFFFFF" },
894
- cursorType: { type: String, default: "default" },
895
- typeOnOff: { type: Boolean, default: !1 },
896
- textCategory: String,
897
- textStat: String,
898
- marginLeftStat: { type: String, default: "15%" }
899
- },
900
- watch: {
901
- value: {
902
- deep: !0,
903
- immediate: !0,
904
- handler(e) {
905
- this.status = e;
906
- }
907
- }
908
- },
909
- data() {
910
- return { status: !1 };
911
- },
912
- computed: {
913
- customStyle() {
914
- return {
915
- height: this.height,
916
- width: this.width,
917
- backgroundColor: this.backgroundColor,
918
- borderRadius: this.borderRadius,
919
- border: `${this.borderType} ${this.borderWidth}px ${this.borderColor}`,
920
- color: this.fontColor,
921
- textDecoration: this.textDecoration,
922
- cursor: this.cursorType,
923
- fontSize: this.fontSize,
924
- fontStyle: this.fontStyle,
925
- fontFamily: `${this.fontFamily} !important`
926
- };
927
- },
928
- customActive() {
929
- return {
930
- backgroundColor: this.activeBackgroundColor,
931
- color: this.activeColorText,
932
- border: `${this.activeBorderType} ${this.activeBorderWidth}px ${this.activeBorderColor}`
933
- };
934
- }
935
- },
936
- methods: {
937
- btnClick(e) {
938
- this.$emit("click", e), this.typeOnOff && (this.status = !this.status, this.$emit("status", this.status));
939
- }
940
- }
941
- }, rt = () => {
942
- se((e) => ({
943
- "1c960139": e.height,
944
- b2f635d8: e.borderWidthBtn,
945
- "06e99898": e.borderType,
946
- "55555c76": e.borderColor,
947
- "23b6d320": e.borderRadius,
948
- "22c97374": e.width,
949
- "22bb09fa": e.backgroundColor,
950
- c148da7c: e.cursorType,
951
- cce756fc: e.fontSize,
952
- cff98d60: e.fontStyle,
953
- "5123b3a5": e.fontFamily,
954
- "47bf58db": e.marginLeftStat,
955
- cadc8414: e.fontSizeStat
956
- }));
957
- }, ot = Me.setup;
958
- Me.setup = ot ? (e, r) => (rt(), ot(e, r)) : rt;
959
- const jr = (e) => (ie("data-v-fb269a1e"), e = e(), ne(), e), Ur = ["src"], qr = {
960
- key: 1,
961
- class: "text"
962
- }, Hr = ["src"], Jr = { class: "stats" }, Gr = /* @__PURE__ */ jr(() => /* @__PURE__ */ h("img", {
963
- class: "iconstats",
964
- src: "https://az755631.vo.msecnd.net/todoelfut/playdes.png"
965
- }, null, -1)), Vr = { class: "numstats" }, Xr = { class: "leyend" };
966
- function Zr(e, r, t, o, s, i) {
967
- return f(), p("div", null, [
968
- t.type == 0 ? (f(), p("div", {
969
- key: 0,
970
- class: E(["button", s.status && t.typeOnOff && "button-active"]),
971
- style: k([i.customStyle, s.status && t.typeOnOff && i.customActive]),
972
- onClick: r[0] || (r[0] = (...n) => i.btnClick && i.btnClick(...n))
973
- }, [
974
- t.icon && t.iconPosition.toLowerCase() === "left" ? (f(), p("img", {
975
- key: 0,
976
- class: "icon",
977
- style: k({ width: t.iconSize }),
978
- src: t.icon
979
- }, null, 12, Ur)) : S("", !0),
980
- t.textValue ? (f(), p("div", qr, I(t.textValue), 1)) : S("", !0),
981
- t.icon && t.iconPosition.toLowerCase() === "right" ? (f(), p("img", {
982
- key: 2,
983
- class: "icon",
984
- style: k({ width: t.iconSize }),
985
- src: t.icon
986
- }, null, 12, Hr)) : S("", !0)
987
- ], 6)) : S("", !0),
988
- t.type == 1 ? (f(), p("div", {
989
- key: 1,
990
- class: "button-target",
991
- onClick: r[1] || (r[1] = (...n) => i.btnClick && i.btnClick(...n))
992
- }, [
993
- h("div", Jr, [
994
- Gr,
995
- h("div", Vr, I(t.textStat), 1)
996
- ]),
997
- h("div", Xr, I(t.textCategory), 1)
998
- ])) : S("", !0)
999
- ]);
1000
- }
1001
- const Kr = /* @__PURE__ */ Mr(Me, [["render", Zr], ["__scopeId", "data-v-fb269a1e"]]), Qr = { class: "gsc-dropdown__main-container__item-selected" }, Yr = ["height", "width"], eo = ["stroke"], to = { class: "gsc-dropdown__items-container" }, ro = ["onClick"], oo = {
1002
- key: 0,
1003
- class: "gsc-dropdown__items-footer"
1004
- }, so = {
1005
- __name: "GSC-Dropdown",
1006
- props: {
1007
- modelValue: {
1008
- type: [Object, Number, String],
1009
- default: () => null
1010
- },
1011
- height: {
1012
- type: String,
1013
- default: "fit-content"
1014
- },
1015
- width: {
1016
- type: String,
1017
- default: "fit-content"
1018
- },
1019
- fontSize: {
1020
- type: String,
1021
- default: "14px"
1022
- },
1023
- borderRadius: {
1024
- type: Number,
1025
- default: 5
1026
- },
1027
- arrowHeight: {
1028
- type: Number,
1029
- default: 24
1030
- },
1031
- arrowWidth: {
1032
- type: Number,
1033
- default: 24
1034
- },
1035
- borderType: {
1036
- type: String,
1037
- default: "solid",
1038
- validator: function(e) {
1039
- return ["solid", "dotted", "dashed"].includes(e);
1040
- }
1041
- },
1042
- borderWidth: {
1043
- type: Number,
1044
- default: 1
1045
- },
1046
- borderColor: {
1047
- type: String,
1048
- default: "black"
1049
- },
1050
- backgroundColor: {
1051
- type: String,
1052
- default: "grey"
1053
- },
1054
- color: {
1055
- type: String,
1056
- default: "black"
1057
- },
1058
- arrowColor: {
1059
- type: String,
1060
- default: "#CBEE6B"
1061
- },
1062
- items: {
1063
- type: Array,
1064
- default: () => []
1065
- },
1066
- defaultItemByIndex: {
1067
- type: Number,
1068
- default: 0
1069
- },
1070
- defaultItemByProp: {
1071
- type: Object,
1072
- default: null,
1073
- validator: (e) => ["propName", "value"].every((r) => r in e)
1074
- },
1075
- listBackgroundColor: {
1076
- type: String,
1077
- default: "white"
1078
- },
1079
- hoverBackgroundColor: {
1080
- type: String,
1081
- default: "#f1f1f1"
1082
- },
1083
- listMarginTop: {
1084
- type: String,
1085
- default: "0"
1086
- },
1087
- listContainerPadding: {
1088
- type: String,
1089
- default: "0"
1090
- },
1091
- listItemPadding: {
1092
- type: String,
1093
- default: "10px 12px"
1094
- },
1095
- listItemMargin: {
1096
- type: String,
1097
- default: "0"
1098
- },
1099
- listHeight: {
1100
- type: String,
1101
- default: "fit-content"
1102
- },
1103
- listItemSelectedColor: {
1104
- type: String,
1105
- default: "white"
1106
- },
1107
- listItemSelectedBackgroundColor: {
1108
- type: String,
1109
- default: "#399cfd"
1110
- },
1111
- listItemColor: {
1112
- type: String,
1113
- default: "black"
1114
- },
1115
- listBorderRadius: {
1116
- type: String,
1117
- default: "0"
1118
- },
1119
- listBorderColor: {
1120
- type: String,
1121
- default: ""
1122
- },
1123
- listBorderWidth: {
1124
- type: Number,
1125
- default: 1
1126
- },
1127
- listItemBorderRadius: {
1128
- type: String,
1129
- default: "0"
1130
- },
1131
- listAlignment: {
1132
- type: String,
1133
- default: "left"
1134
- },
1135
- isListSameWidth: {
1136
- type: Boolean,
1137
- default: !1
1138
- },
1139
- isMultipleOption: {
1140
- type: Boolean,
1141
- default: !1
1142
- },
1143
- footerBorderColor: {
1144
- type: String,
1145
- default: "#626970"
1146
- },
1147
- footerBorderWidth: {
1148
- type: Number,
1149
- default: 1
1150
- },
1151
- isFooterVisible: {
1152
- type: Boolean,
1153
- default: !1
1154
- },
1155
- isDisabled: {
1156
- type: Boolean,
1157
- default: !1
1158
- },
1159
- onlyFirstTime: {
1160
- type: Boolean,
1161
- default: !1
1162
- }
1163
- },
1164
- emits: ["input", "click-ready", "update:modelValue"],
1165
- setup(e, { emit: r }) {
1166
- const t = e, o = F({}), s = F(null), i = F(t.isMultipleOption ? -1 : 0), n = F(!1);
1167
- fe(
1168
- () => t.items,
1169
- (y, g) => {
1170
- if (!t.modelValue && (!t.onlyFirstTime || !g || !g.length) && y && y.length) {
1171
- if (t.defaultItemByProp) {
1172
- const w = t.items.findIndex(
1173
- (b) => b[t.defaultItemByProp.propName] === t.defaultItemByProp.value
1174
- );
1175
- w !== -1 ? (i.value = w, o.value = y[w]) : (i.value = 0, o.value = y[0]);
1176
- } else
1177
- o.value = y[t.defaultItemByIndex];
1178
- r("input", o.value);
1179
- }
1180
- },
1181
- { immediate: !0 }
1182
- ), fe(
1183
- () => t.modelValue,
1184
- (y) => {
1185
- if (y) {
1186
- const g = t.items.findIndex((w) => typeof y == "object" ? JSON.stringify(w) === JSON.stringify(y) : w === y);
1187
- g !== -1 && (i.value = g, o.value = t.items[g], r("update:modelValue", o.value));
1188
- }
1189
- },
1190
- { immediate: !0 }
1191
- );
1192
- const l = W(() => ({
1193
- height: t.height,
1194
- width: t.width,
1195
- backgroundColor: t.backgroundColor,
1196
- borderRadius: `${t.borderRadius}px`,
1197
- border: `${t.borderType} ${t.borderWidth}px ${t.borderColor}`,
1198
- color: t.color,
1199
- "--hover-background-color": t.hoverBackgroundColor,
1200
- "--list-container-padding": t.listContainerPadding,
1201
- "--list-item-padding": t.listItemPadding,
1202
- "--list-item-margin": t.listItemMargin,
1203
- "--list-background-color": t.listBackgroundColor,
1204
- "--list-height": t.listHeight,
1205
- "--list-item-border-radius": t.listItemBorderRadius,
1206
- "--list-item-selected-color": t.listItemSelectedColor,
1207
- "--list-item-selected-background-color": t.listItemSelectedBackgroundColor,
1208
- "--list-item-color": t.listItemColor,
1209
- "--list-border-radius": `${t.listBorderRadius}`,
1210
- "--list-border-color": t.listBorderColor,
1211
- "--list-width": t.isListSameWidth ? t.width : "fit-content",
1212
- "--list-border-width": `${t.listBorderWidth}px`,
1213
- "--list-margin-top": t.listMarginTop,
1214
- "--list-left": t.listAlignment === "left" ? "0" : "auto",
1215
- "--list-right": t.listAlignment === "right" ? "0" : "auto",
1216
- "--footer-border": `${t.footerBorderWidth}px solid ${t.footerBorderColor}`,
1217
- "--dropdown-opacity": t.isDisabled ? "0.5" : "1",
1218
- "--dropdown-cursor": t.isDisabled ? "not-allowed" : "pointer",
1219
- "--dropdown-font-size": t.fontSize ? t.fontSize : "14px"
1220
- })), a = W(() => ({
1221
- height: `${t.arrowHeight}px`,
1222
- width: `${t.arrowWidth}px`
1223
- }));
1224
- function c() {
1225
- t.isDisabled || (n.value = !n.value);
1226
- }
1227
- function u(y) {
1228
- s.value && !s.value.contains(y.target) && (n.value = !1);
1229
- }
1230
- function m(y, g) {
1231
- t.isMultipleOption ? i.value = -1 : (i.value = g, n.value = !1), o.value = y, r("input", o.value), r("update:modelValue", o.value);
1232
- }
1233
- function v() {
1234
- n.value = !1, r("click-ready");
1235
- }
1236
- return ge(() => {
1237
- document.addEventListener("click", u);
1238
- }), St(() => {
1239
- document.removeEventListener("click", u);
1240
- }), (y, g) => (f(), p("div", {
1241
- ref_key: "dropDown",
1242
- ref: s,
1243
- class: "gsc-dropdown",
1244
- style: k(l.value)
1245
- }, [
1246
- h("div", {
1247
- class: "gsc-dropdown__main-container",
1248
- style: k({ "padding-right": `${e.arrowWidth + 8}px` }),
1249
- onClick: c
1250
- }, [
1251
- h("div", Qr, [
1252
- Z(y.$slots, "default", { selectedItem: o.value })
1253
- ]),
1254
- h("div", {
1255
- class: E(["gsc-dropdown__main-container__icon", { "rotated-180": n.value }]),
1256
- style: k(a.value)
1257
- }, [
1258
- (f(), p("svg", {
1259
- height: e.arrowHeight,
1260
- width: e.arrowWidth,
1261
- viewBox: "0 0 24 24",
1262
- fill: "none",
1263
- xmlns: "http://www.w3.org/2000/svg"
1264
- }, [
1265
- h("path", {
1266
- d: "M18.394 9.13501L13.1302 14.3988C12.5086 15.0204 11.4914 15.0204 10.8697 14.3988L5.60596 9.13501",
1267
- stroke: e.arrowColor
1268
- }, null, 8, eo)
1269
- ], 8, Yr))
1270
- ], 6)
1271
- ], 4),
1272
- z(vt, null, {
1273
- default: M(() => [
1274
- Q(h("div", to, [
1275
- h("div", null, [
1276
- h("div", {
1277
- class: "gsc-dropdown__items",
1278
- style: k({ "margin-top": `${t.borderWidth}px` })
1279
- }, [
1280
- (f(!0), p(A, null, P(e.items, (w, b) => (f(), p("div", {
1281
- class: E(["gsc-dropdown__items__item", { selected: b === i.value }]),
1282
- key: b,
1283
- onClick: (T) => m(w, b)
1284
- }, [
1285
- Z(y.$slots, "availableItem", { item: w })
1286
- ], 10, ro))), 128))
1287
- ], 4),
1288
- e.isFooterVisible ? (f(), p("div", oo, [
1289
- z(ye(Kr), {
1290
- "text-value": "Listo",
1291
- "border-color": "#cbee6b",
1292
- "font-size": "12px",
1293
- width: "72px",
1294
- height: "22px",
1295
- "border-radius": "62px",
1296
- "border-width": 0.8,
1297
- onClick: v
1298
- })
1299
- ])) : S("", !0)
1300
- ])
1301
- ], 512), [
1302
- [re, n.value]
1303
- ])
1304
- ]),
1305
- _: 3
1306
- })
1307
- ], 4));
1308
- }
1309
- }, io = (e, r) => {
1310
- const t = e.__vccOpts || e;
1311
- for (const [o, s] of r)
1312
- t[o] = s;
1313
- return t;
1314
- }, no = { class: "tournament-select__selected-tournament" }, ao = { class: "tournament-select__selected-tournament__logo" }, lo = ["src"], co = { class: "tournament-select__selected-tournament__name" }, uo = "https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments", ho = {
1315
- __name: "GSCTournamentSelect",
1316
- props: {
1317
- apiUrl: {
1318
- type: String,
1319
- default: "https://kefloixzy1.execute-api.us-west-2.amazonaws.com/prod/gs3/tournaments"
1320
- },
1321
- fontFamily: {
1322
- type: String,
1323
- default: "Poppins-Light"
1324
- },
1325
- logosUrl: {
1326
- type: String,
1327
- default: "https://golstatsimages.blob.core.windows.net/todoelfut/"
1328
- },
1329
- logoFileType: {
1330
- type: String,
1331
- default: "png"
1332
- },
1333
- height: {
1334
- type: String,
1335
- default: "40px"
1336
- },
1337
- width: {
1338
- type: String,
1339
- default: "179px"
1340
- },
1341
- borderRadius: {
1342
- type: Number,
1343
- default: 8
1344
- },
1345
- arrowHeight: {
1346
- type: Number,
1347
- default: 24
1348
- },
1349
- arrowWidth: {
1350
- type: Number,
1351
- default: 24
1352
- },
1353
- borderType: {
1354
- type: String,
1355
- default: "solid",
1356
- validator: function(e) {
1357
- return ["solid", "dotted", "dashed"].includes(e);
1358
- }
1359
- },
1360
- borderWidth: {
1361
- type: Number,
1362
- default: 1
1363
- },
1364
- borderColor: {
1365
- type: String,
1366
- default: "rgba(255, 255, 255, 0.2)"
1367
- },
1368
- backgroundColor: {
1369
- type: String,
1370
- default: "#0d1d29"
1371
- },
1372
- color: {
1373
- type: String,
1374
- default: "white"
1375
- },
1376
- arrowColor: {
1377
- type: String,
1378
- default: "#CBEE6B"
1379
- },
1380
- items: {
1381
- type: Array,
1382
- default: () => []
1383
- },
1384
- defaultItemByIndex: {
1385
- type: Number,
1386
- default: 0
1387
- },
1388
- defaultItemByProp: {
1389
- type: Object,
1390
- default: null,
1391
- validator: (e) => ["propName", "value"].every((r) => r in e)
1392
- },
1393
- currentSeasonId: {
1394
- type: Number,
1395
- default: 0
1396
- },
1397
- tournamentsIdsToInclude: {
1398
- type: Set,
1399
- default: () => /* @__PURE__ */ new Set()
1400
- }
1401
- },
1402
- emits: ["input", "change-tournaments"],
1403
- setup(e, { emit: r }) {
1404
- const t = e, o = F([]), s = W(() => {
1405
- const y = {};
1406
- return t.fontFamily && (y["font-family"] = `${t.fontFamily}`), y;
1407
- }), i = W(() => t.tournamentsIdsToInclude.size ? a(o.value) : o.value), n = W(() => i.value.find((y) => y.seasonsIds.has(t.currentSeasonId)) || i.value[0]);
1408
- async function l() {
1409
- try {
1410
- if (t.items && t.items.length)
1411
- o.value = [...t.items];
1412
- else {
1413
- const y = await u();
1414
- r("change-tournaments", y), o.value = y.map((g) => ({
1415
- ...g.tournament,
1416
- seasons: g.seasons,
1417
- seasonsIds: g.seasons.reduce((w, b) => (w.add(b.id), w), /* @__PURE__ */ new Set())
1418
- })).sort((g, w) => g.order - w.order);
1419
- }
1420
- } catch (y) {
1421
- throw new Error(y);
1422
- }
1423
- }
1424
- function a(y) {
1425
- return y.filter((g) => t.tournamentsIdsToInclude.has(g.id));
1426
- }
1427
- function c(y) {
1428
- const g = new XMLHttpRequest(), w = `${t.logosUrl}${y}.${t.logoFileType}`;
1429
- return g.open("HEAD", w, !1), g.send(), g.status !== 404;
1430
- }
1431
- async function u() {
1432
- try {
1433
- return (await fetch(t.apiUrl || uo)).json();
1434
- } catch (y) {
1435
- return Promise.reject(y);
1436
- }
1437
- }
1438
- function m(y) {
1439
- r("input", y);
1440
- }
1441
- function v(y) {
1442
- r("input", y);
1443
- }
1444
- return ge(() => {
1445
- l();
1446
- }), (y, g) => (f(), p("div", {
1447
- class: "tournament-select",
1448
- style: k(s.value)
1449
- }, [
1450
- z(ye(so), Gt(t, {
1451
- "model-value": n.value,
1452
- items: i.value,
1453
- onInput: m,
1454
- "onUpdate:modelValue": v
1455
- }), {
1456
- default: M(({ selectedItem: w }) => [
1457
- h("div", no, [
1458
- h("div", ao, [
1459
- c(w.id) ? (f(), p("img", {
1460
- key: 0,
1461
- src: `${t.logosUrl}${w.id}.${t.logoFileType}`,
1462
- alt: ""
1463
- }, null, 8, lo)) : S("", !0)
1464
- ]),
1465
- h("div", co, I(w.name), 1)
1466
- ])
1467
- ]),
1468
- availableItem: M(({ item: w }) => [
1469
- h("div", null, I(w.name), 1)
1470
- ]),
1471
- _: 1
1472
- }, 16, ["model-value", "items"])
1473
- ], 4));
1474
- }
1475
- }, fo = /* @__PURE__ */ io(ho, [["__scopeId", "data-v-5c8e9511"]]), po = (e, r) => {
1476
- const t = e.__vccOpts || e;
1477
- for (const [o, s] of r)
1478
- t[o] = s;
1479
- return t;
1480
- }, je = {
1481
- name: "ScrollableContainer",
1482
- props: {
1483
- backgroundColor: { type: String, default: "#0D1D29" },
1484
- pxScroll: { type: Number, default: 100 },
1485
- arrows: { type: Boolean, default: !0 },
1486
- arrowsHideOnNoScroll: { type: Boolean, default: !1 },
1487
- arrowsScrollHide: { type: Boolean, default: !1 },
1488
- arrowsColor: { type: String, default: "#CBEE6B" },
1489
- arrowsHeight: { type: Number, default: 15 },
1490
- arrowsWidth: { type: Number, default: 15 },
1491
- arrowsPadding: { type: Number, default: 5 },
1492
- arrowsMargin: { type: Number, default: 10 },
1493
- arrowsRadius: { type: String, default: "0%" },
1494
- arrowsBorder: { type: String, default: "none" },
1495
- arrowsBackground: { type: String, default: "#0D1D29" },
1496
- arrowsContainerBgL: { type: String, default: "#0D1D29" },
1497
- arrowsContainerBgR: { type: String, default: "#0D1D29" },
1498
- scrollColor: { type: String, default: "#c3e569" },
1499
- arrowsPosition: { type: String, default: "relative" },
1500
- height: { type: String, default: "100%" }
1501
- },
1502
- data() {
1503
- return {
1504
- showLeftArrow: !1,
1505
- showRightArrow: !0,
1506
- intervalid1: ""
1507
- };
1508
- },
1509
- mounted() {
1510
- this.getScroll(), this.arrowsHideOnNoScroll && window.addEventListener("resize", this.resizeSlider), this.arrowsHideOnNoScroll && this.listenerLoad();
1511
- },
1512
- beforeUnmount() {
1513
- this.arrowsHideOnNoScroll && window.removeEventListener("resize", this.resizeSlider), this.arrowsHideOnNoScroll && clearInterval(this.intervalid1);
1514
- },
1515
- computed: {
1516
- getViewBox() {
1517
- return `-2 0 ${this.arrowsWidth} ${this.arrowsHeight}`;
1518
- },
1519
- hideShowLeftArrow() {
1520
- let e = "";
1521
- return this.arrowsPosition == "absolute" ? e = "leftAbsolute" : e = "leftRelative", this.arrowsScrollHide ? this.showLeftArrow ? e += " showArrowSlide" : e += " hideArrowSlide" : e += " showArrowSlide", e;
1522
- },
1523
- hideShowRightArrow() {
1524
- let e = "";
1525
- return this.arrowsPosition == "absolute" ? e = "rightAbsolute" : e = "rightRelative", this.arrowsScrollHide ? this.showRightArrow ? e += " showArrowSlide" : e += " hideArrowSlide" : e += " showArrowSlide", e;
1526
- }
1527
- },
1528
- methods: {
1529
- scrollLeft() {
1530
- this.$refs.content.scrollLeft -= this.pxScroll;
1531
- },
1532
- scrollRight() {
1533
- this.$refs.content.scrollLeft += this.pxScroll;
1534
- },
1535
- getScroll() {
1536
- let e = 0;
1537
- this.arrowsPosition == "relative" ? e = this.$refs.content.scrollWidth - this.$el.clientWidth + this.arrowsMargin * 2 + this.arrowsWidth * 4 : e = this.$refs.content.scrollWidth - this.$el.clientWidth, this.$refs.content.scrollLeft == 0 ? this.showLeftArrow = !1 : this.showLeftArrow = !0, e > 0 && (this.$refs.content.scrollLeft == e ? this.showRightArrow = !1 : this.showRightArrow = !0), this.arrowsHideOnNoScroll && this.$refs.content.clientWidth === this.$refs.content.scrollWidth && (this.showRightArrow = !1);
1538
- },
1539
- resizeSlider() {
1540
- this.getScroll();
1541
- let e;
1542
- clearTimeout(e), e = setTimeout(this.getScroll, 1e3);
1543
- },
1544
- listenerLoad() {
1545
- this.intervalid1 = setInterval((function() {
1546
- var e = this.$el.clientWidth, r = this.$refs.content.scrollWidth;
1547
- r > 0 && e > 0 && (r > e ? (this.showRightArrow = !0, clearInterval(this.intervalid1)) : clearInterval(this.intervalid1));
1548
- }).bind(this), 3e3);
1549
- }
1550
- }
1551
- }, st = () => {
1552
- se((e) => ({
1553
- "26acffa8": e.backgroundColor,
1554
- "3d95bef4": e.height,
1555
- "86ba1cc0": e.arrowsPosition,
1556
- "140b6ada": e.arrowsPadding + "px",
1557
- "7df46be5": e.arrowsBackground,
1558
- "33f99798": e.arrowsHeight * 2 + "px",
1559
- "1c8a858d": e.arrowsWidth * 2 + "px",
1560
- "4a7876c9": e.arrowsRadius,
1561
- "2ff67e63": e.arrowsBorder,
1562
- "59c5dd08": e.arrowsMargin + "px",
1563
- "6658215d": e.arrowsContainerBgL,
1564
- 66582163: e.arrowsContainerBgR,
1565
- e5900a2e: e.scrollColor
1566
- }));
1567
- }, it = je.setup;
1568
- je.setup = it ? (e, r) => (st(), it(e, r)) : st;
1569
- const mo = {
1570
- ref: "gscScrollableContainer",
1571
- class: "scrollable-container"
1572
- }, go = { class: "scrollable-arrows" }, yo = ["width", "height", "viewBox"], wo = ["stroke"], bo = { class: "scrollable-wrapper" }, So = { class: "scrollable-arrows" }, vo = ["width", "height", "viewBox"], Co = ["stroke"];
1573
- function _o(e, r, t, o, s, i) {
1574
- return f(), p("div", mo, [
1575
- t.arrows ? (f(), p("div", {
1576
- key: 0,
1577
- class: E(["arrows-container", i.hideShowLeftArrow]),
1578
- onClick: r[0] || (r[0] = (...n) => i.scrollLeft && i.scrollLeft(...n))
1579
- }, [
1580
- h("div", go, [
1581
- (f(), p("svg", {
1582
- width: t.arrowsWidth,
1583
- height: t.arrowsHeight,
1584
- viewBox: i.getViewBox,
1585
- fill: "none",
1586
- xmlns: "http://www.w3.org/2000/svg"
1587
- }, [
1588
- h("path", {
1589
- d: "M6.36523 13.788L1.10146 8.52429C0.479824 7.90265 0.479824 6.88541 1.10147 6.26377L6.36523 1",
1590
- stroke: t.arrowsColor
1591
- }, null, 8, wo)
1592
- ], 8, yo))
1593
- ])
1594
- ], 2)) : S("", !0),
1595
- h("div", {
1596
- class: "scrollable-content scrollable-content-slider",
1597
- ref: "content",
1598
- onScroll: r[1] || (r[1] = (...n) => i.getScroll && i.getScroll(...n))
1599
- }, [
1600
- h("div", bo, [
1601
- Z(e.$slots, "default", {}, void 0, !0)
1602
- ])
1603
- ], 544),
1604
- t.arrows ? (f(), p("div", {
1605
- key: 1,
1606
- id: "arrows-container-right",
1607
- class: E(["arrows-container", i.hideShowRightArrow]),
1608
- onClick: r[2] || (r[2] = (...n) => i.scrollRight && i.scrollRight(...n))
1609
- }, [
1610
- h("div", So, [
1611
- (f(), p("svg", {
1612
- width: t.arrowsWidth,
1613
- height: t.arrowsHeight,
1614
- viewBox: i.getViewBox,
1615
- fill: "none",
1616
- xmlns: "http://www.w3.org/2000/svg"
1617
- }, [
1618
- h("path", {
1619
- d: "M0.634765 1.21195L5.89853 6.47571C6.52018 7.09735 6.52018 8.11459 5.89853 8.73623L0.634766 14",
1620
- stroke: t.arrowsColor
1621
- }, null, 8, Co)
1622
- ], 8, vo))
1623
- ])
1624
- ], 2)) : S("", !0)
1625
- ], 512);
1626
- }
1627
- const we = /* @__PURE__ */ po(je, [["render", _o], ["__scopeId", "data-v-7d0811ac"]]), ko = { key: 0 }, Ue = {
1628
- __name: "GSC-DataCard",
1629
- props: {
1630
- data: {
1631
- type: Object,
1632
- required: !0
1633
- },
1634
- height: {
1635
- type: String,
1636
- default: "445px"
1637
- },
1638
- width: {
1639
- type: String,
1640
- default: "319px"
1641
- },
1642
- userId: {
1643
- type: Number,
1644
- default: 0
1645
- }
1646
- },
1647
- setup(e) {
1648
- const r = {
1649
- CardGeneral: x(() => import("./CardGeneral-D2PYPb95-DycFnfDS.js")),
1650
- CardGeneralIndividual: x(() => import("./CardGeneralIndividual-BHjZ12n1-BvodKC3y.js")),
1651
- CardGeneralTeams: x(() => import("./CardGeneralTeams-ByBEp-8b-CbLocm8U.js")),
1652
- CardIndividual: x(() => import("./CardIndividual-BR1r5B5u-DqflCygx.js")),
1653
- CardIndividualDistance: x(() => import("./CardIndividualDistance-BKeSbWJ9-B6Vj1YLa.js")),
1654
- CardIndividualAreas: x(() => import("./CardIndividualAreas-qEYtV2XP-C97pNpBa.js")),
1655
- CardIndividualGoalParticipation: x(() => import("./CardIndividualGoalParticipation-CRBepIcB-CBc1Wh03.js")),
1656
- CardIndividualGoals: x(() => import("./CardIndividualGoals-CBAA7DE3-Dco1VuBc.js")),
1657
- CardIndividualShotsOnGoal: x(() => import("./CardIndividualShotsOnGoal-X_3YzAE3-CbiYLtzD.js")),
1658
- CardIndividualFouls: x(() => import("./CardIndividualFouls-BqWT8Bzx-D0EDbSJl.js")),
1659
- CardIndividualCenters: x(() => import("./CardIndividualCenters-DURH48kE-BAeLhbBk.js")),
1660
- CardIndividualSaves: x(() => import("./CardIndividualSaves-BqBRjEt7-CJBgPvne.js")),
1661
- CardIndividual1vs1: x(() => import("./CardIndividual1vs1-DPov_cGc-DtWs-qcq.js")),
1662
- CardIndividualStatistics: x(() => import("./CardIndividualStatistics-D769xisE-D2KNSIfX.js")),
1663
- CardIndividualPerformance: x(() => import("./CardIndividualPerformance-CEPnHtE9-Da4MXSxk.js")),
1664
- CardIndividualGold: x(() => import("./CardIndividualGold-BBYsUCND-BhqSGl0q.js")),
1665
- CardPromTournament: x(() => import("./CardPromTournament-DFGqM4we-C4dX0pKz.js")),
1666
- CardIndividualNoGoalReceived: x(() => import("./CardIndividualNoGoalReceived-HaDOJruE-CKzigvOP.js")),
1667
- CardTheMostProductive: x(() => import("./CardTheMostProductive-DzbDtzZn-Dewb8MoQ.js")),
1668
- CardSuccessfulPasses: x(() => import("./CardSuccessfulPasses-CTjMzZAt-Bv_X927S.js"))
1669
- }, t = [
1670
- {
1671
- componentName: "CardGeneral",
1672
- ids: [
1673
- "1-g",
1674
- "2-g",
1675
- "3-g",
1676
- "5-g",
1677
- "8-g",
1678
- "10-g",
1679
- "17-g",
1680
- "18-g",
1681
- "21-g",
1682
- "22-g",
1683
- "23-g",
1684
- "24-g",
1685
- "25-g",
1686
- "26-g"
1687
- ]
1688
- },
1689
- {
1690
- componentName: "CardGeneralIndividual",
1691
- ids: [
1692
- "4-g",
1693
- "6-g",
1694
- "7-g",
1695
- "11-g",
1696
- "15-g",
1697
- "16-g",
1698
- "19-g",
1699
- "20-g"
1700
- ]
1701
- },
1702
- {
1703
- componentName: "CardGeneralTeams",
1704
- ids: [
1705
- "9-g",
1706
- "12-g",
1707
- "13-g",
1708
- "14-g"
1709
- ]
1710
- },
1711
- {
1712
- componentName: "CardIndividual",
1713
- ids: [
1714
- "4-i",
1715
- "5-i",
1716
- "6-i",
1717
- "1-e",
1718
- "2-e",
1719
- "3-e"
1720
- ]
1721
- },
1722
- {
1723
- componentName: "CardIndividualDistance",
1724
- ids: [
1725
- "77-i",
1726
- "78-i",
1727
- "36-e"
1728
- ]
1729
- },
1730
- {
1731
- componentName: "CardIndividualAreas",
1732
- ids: [
1733
- "71-i",
1734
- "72-i",
1735
- "73-i",
1736
- "74-i",
1737
- "75-i",
1738
- "76-i",
1739
- "34-e",
1740
- "35-e"
1741
- ]
1742
- },
1743
- {
1744
- componentName: "CardIndividualGoalParticipation",
1745
- ids: [
1746
- "22-i",
1747
- "23-i",
1748
- "8-e"
1749
- ]
1750
- },
1751
- {
1752
- componentName: "CardIndividualGoals",
1753
- ids: [
1754
- "24-i",
1755
- "25-i",
1756
- "26-i",
1757
- "27-i",
1758
- "9-e"
1759
- ]
1760
- },
1761
- {
1762
- componentName: "CardIndividualShotsOnGoal",
1763
- ids: [
1764
- "28-i",
1765
- "29-i",
1766
- "30-i",
1767
- "31-i",
1768
- "32-i",
1769
- "33-i",
1770
- "34-i",
1771
- "10-e",
1772
- "11-e",
1773
- "12-e"
1774
- ]
1775
- },
1776
- {
1777
- componentName: "CardIndividualFouls",
1778
- ids: [
1779
- "48-i",
1780
- "49-i",
1781
- "50-i",
1782
- "51-i",
1783
- "52-i",
1784
- "53-i",
1785
- "54-i",
1786
- "55-i",
1787
- "56-i",
1788
- "20-e",
1789
- "21-e",
1790
- "22-e"
1791
- ]
1792
- },
1793
- {
1794
- componentName: "CardIndividualCenters",
1795
- ids: [
1796
- "35-i",
1797
- "36-i",
1798
- "37-i",
1799
- "38-i",
1800
- "39-i",
1801
- "40-i",
1802
- "41-i",
1803
- "42-i",
1804
- "43-i",
1805
- "44-i",
1806
- "45-i",
1807
- "46-i",
1808
- "47-i",
1809
- "13-e",
1810
- "14-e",
1811
- "15-e",
1812
- "16-e",
1813
- "17-e",
1814
- "18-e",
1815
- "19-e"
1816
- ]
1817
- },
1818
- {
1819
- componentName: "CardIndividualSaves",
1820
- ids: [
1821
- "57-i",
1822
- "58-i",
1823
- "59-i",
1824
- "60-i",
1825
- "61-i",
1826
- "62-i",
1827
- "23-e",
1828
- "24-e",
1829
- "25-e",
1830
- "26-e",
1831
- "27-e"
1832
- ]
1833
- },
1834
- {
1835
- componentName: "CardIndividual1vs1",
1836
- ids: [
1837
- "19-i",
1838
- "20-i",
1839
- "21-i",
1840
- "68-i",
1841
- "69-i",
1842
- "70-i",
1843
- "7-e",
1844
- "33-e"
1845
- ]
1846
- },
1847
- {
1848
- componentName: "CardIndividualStatistics",
1849
- ids: [
1850
- "81-i",
1851
- "84-i",
1852
- "87-i",
1853
- "90-i",
1854
- "93-i",
1855
- "96-i",
1856
- "99-i",
1857
- "102-i",
1858
- "105-i",
1859
- "108-i",
1860
- "111-i",
1861
- "114-i",
1862
- "117-i",
1863
- "120-i",
1864
- "123-i",
1865
- "126-i",
1866
- "129-i",
1867
- "132-i",
1868
- "135-i",
1869
- "138-i",
1870
- "141-i",
1871
- "144-i",
1872
- "147-i",
1873
- "150-i",
1874
- "153-i",
1875
- "156-i",
1876
- "159-i",
1877
- "162-i",
1878
- "165-i",
1879
- "168-i",
1880
- "171-i",
1881
- "176-i"
1882
- ]
1883
- },
1884
- {
1885
- componentName: "CardIndividualPerformance",
1886
- ids: [
1887
- "82-i",
1888
- "88-i",
1889
- "94-i",
1890
- "100-i",
1891
- "106-i",
1892
- "112-i",
1893
- "118-i",
1894
- "124-i",
1895
- "130-i",
1896
- "136-i",
1897
- "142-i",
1898
- "148-i",
1899
- "154-i",
1900
- "160-i",
1901
- "166-i",
1902
- "172-i",
1903
- "177-i",
1904
- "182-i"
1905
- ]
1906
- },
1907
- {
1908
- componentName: "CardIndividualGold",
1909
- ids: [
1910
- "83-i",
1911
- "85-i",
1912
- "89-i",
1913
- "91-i",
1914
- "95-i",
1915
- "97-i",
1916
- "101-i",
1917
- "103-i",
1918
- "107-i",
1919
- "109-i",
1920
- "113-i",
1921
- "115-i",
1922
- "119-i",
1923
- "121-i",
1924
- "125-i",
1925
- "127-i",
1926
- "131-i",
1927
- "133-i",
1928
- "137-i",
1929
- "139-i",
1930
- "143-i",
1931
- "145-i",
1932
- "149-i",
1933
- "151-i",
1934
- "155-i",
1935
- "157-i",
1936
- "161-i",
1937
- "163-i",
1938
- "167-i",
1939
- "169-i",
1940
- "174-i",
1941
- "178-i"
1942
- ]
1943
- },
1944
- {
1945
- componentName: "CardPromTournament",
1946
- ids: [
1947
- "86-i",
1948
- "92-i",
1949
- "98-i",
1950
- "104-i",
1951
- "110-i",
1952
- "116-i",
1953
- "122-i",
1954
- "128-i",
1955
- "134-i",
1956
- "140-i",
1957
- "146-i",
1958
- "152-i",
1959
- "158-i",
1960
- "164-i",
1961
- "170-i",
1962
- "175-i"
1963
- ]
1964
- },
1965
- {
1966
- componentName: "CardIndividualNoGoalReceived",
1967
- ids: [
1968
- "63-i",
1969
- "64-i",
1970
- "65-i",
1971
- "66-i",
1972
- "67-i"
1973
- ]
1974
- },
1975
- {
1976
- componentName: "CardTheMostProductive",
1977
- ids: [
1978
- "79-i",
1979
- "80-i",
1980
- "37-e"
1981
- ]
1982
- },
1983
- {
1984
- componentName: "CardSuccessfulPasses",
1985
- ids: [
1986
- "10-i",
1987
- "11-i",
1988
- "12-i",
1989
- "13-i",
1990
- "14-i",
1991
- "15-i",
1992
- "16-i",
1993
- "17-i",
1994
- "18-i",
1995
- "4-e",
1996
- "5-e",
1997
- "6-e"
1998
- ]
1999
- }
2000
- ].reduce((l, { componentName: a, ids: c }) => (c.forEach((u) => {
2001
- l.set(u, a);
2002
- }), l), /* @__PURE__ */ new Map()), o = e, s = W(() => t.get(o.data.id)), i = W(() => r[s.value]), n = W(() => o.data.id.includes("-e") ? o.data.is_finished ? 5 : 6 : o.data.player_id === o.userId ? o.data.is_finished ? 1 : 2 : o.data.is_finished ? 3 : 4);
2003
- return (l, a) => i.value ? (f(), p("div", ko, [
2004
- (f(), q(Vt(i.value), {
2005
- data: e.data,
2006
- height: e.height,
2007
- width: e.width,
2008
- "description-type": n.value
2009
- }, null, 8, ["data", "height", "width", "description-type"]))
2010
- ])) : S("", !0);
2011
- }
2012
- };
2013
- function Ct(e, r) {
2014
- return function() {
2015
- return e.apply(r, arguments);
2016
- };
2017
- }
2018
- const { toString: To } = Object.prototype, { getPrototypeOf: qe } = Object, be = /* @__PURE__ */ ((e) => (r) => {
2019
- const t = To.call(r);
2020
- return e[t] || (e[t] = t.slice(8, -1).toLowerCase());
2021
- })(/* @__PURE__ */ Object.create(null)), j = (e) => (e = e.toLowerCase(), (r) => be(r) === e), Se = (e) => (r) => typeof r === e, { isArray: Y } = Array, oe = Se("undefined");
2022
- function Io(e) {
2023
- return e !== null && !oe(e) && e.constructor !== null && !oe(e.constructor) && L(e.constructor.isBuffer) && e.constructor.isBuffer(e);
2024
- }
2025
- const _t = j("ArrayBuffer");
2026
- function xo(e) {
2027
- let r;
2028
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? r = ArrayBuffer.isView(e) : r = e && e.buffer && _t(e.buffer), r;
2029
- }
2030
- const Oo = Se("string"), L = Se("function"), kt = Se("number"), ve = (e) => e !== null && typeof e == "object", Ao = (e) => e === !0 || e === !1, ce = (e) => {
2031
- if (be(e) !== "object")
2032
- return !1;
2033
- const r = qe(e);
2034
- return (r === null || r === Object.prototype || Object.getPrototypeOf(r) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
2035
- }, Po = j("Date"), Ro = j("File"), Eo = j("Blob"), Bo = j("FileList"), Do = (e) => ve(e) && L(e.pipe), No = (e) => {
2036
- let r;
2037
- return e && (typeof FormData == "function" && e instanceof FormData || L(e.append) && ((r = be(e)) === "formdata" || // detect form-data instance
2038
- r === "object" && L(e.toString) && e.toString() === "[object FormData]"));
2039
- }, $o = j("URLSearchParams"), [Lo, zo, Fo, Wo] = ["ReadableStream", "Request", "Response", "Headers"].map(j), Mo = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
2040
- function ae(e, r, { allOwnKeys: t = !1 } = {}) {
2041
- if (e === null || typeof e > "u")
2042
- return;
2043
- let o, s;
2044
- if (typeof e != "object" && (e = [e]), Y(e))
2045
- for (o = 0, s = e.length; o < s; o++)
2046
- r.call(null, e[o], o, e);
2047
- else {
2048
- const i = t ? Object.getOwnPropertyNames(e) : Object.keys(e), n = i.length;
2049
- let l;
2050
- for (o = 0; o < n; o++)
2051
- l = i[o], r.call(null, e[l], l, e);
2052
- }
2053
- }
2054
- function Tt(e, r) {
2055
- r = r.toLowerCase();
2056
- const t = Object.keys(e);
2057
- let o = t.length, s;
2058
- for (; o-- > 0; )
2059
- if (s = t[o], r === s.toLowerCase())
2060
- return s;
2061
- return null;
2062
- }
2063
- const V = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, It = (e) => !oe(e) && e !== V;
2064
- function Ee() {
2065
- const { caseless: e } = It(this) && this || {}, r = {}, t = (o, s) => {
2066
- const i = e && Tt(r, s) || s;
2067
- ce(r[i]) && ce(o) ? r[i] = Ee(r[i], o) : ce(o) ? r[i] = Ee({}, o) : Y(o) ? r[i] = o.slice() : r[i] = o;
2068
- };
2069
- for (let o = 0, s = arguments.length; o < s; o++)
2070
- arguments[o] && ae(arguments[o], t);
2071
- return r;
2072
- }
2073
- const jo = (e, r, t, { allOwnKeys: o } = {}) => (ae(r, (s, i) => {
2074
- t && L(s) ? e[i] = Ct(s, t) : e[i] = s;
2075
- }, { allOwnKeys: o }), e), Uo = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), qo = (e, r, t, o) => {
2076
- e.prototype = Object.create(r.prototype, o), e.prototype.constructor = e, Object.defineProperty(e, "super", {
2077
- value: r.prototype
2078
- }), t && Object.assign(e.prototype, t);
2079
- }, Ho = (e, r, t, o) => {
2080
- let s, i, n;
2081
- const l = {};
2082
- if (r = r || {}, e == null) return r;
2083
- do {
2084
- for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
2085
- n = s[i], (!o || o(n, e, r)) && !l[n] && (r[n] = e[n], l[n] = !0);
2086
- e = t !== !1 && qe(e);
2087
- } while (e && (!t || t(e, r)) && e !== Object.prototype);
2088
- return r;
2089
- }, Jo = (e, r, t) => {
2090
- e = String(e), (t === void 0 || t > e.length) && (t = e.length), t -= r.length;
2091
- const o = e.indexOf(r, t);
2092
- return o !== -1 && o === t;
2093
- }, Go = (e) => {
2094
- if (!e) return null;
2095
- if (Y(e)) return e;
2096
- let r = e.length;
2097
- if (!kt(r)) return null;
2098
- const t = new Array(r);
2099
- for (; r-- > 0; )
2100
- t[r] = e[r];
2101
- return t;
2102
- }, Vo = /* @__PURE__ */ ((e) => (r) => e && r instanceof e)(typeof Uint8Array < "u" && qe(Uint8Array)), Xo = (e, r) => {
2103
- const o = (e && e[Symbol.iterator]).call(e);
2104
- let s;
2105
- for (; (s = o.next()) && !s.done; ) {
2106
- const i = s.value;
2107
- r.call(e, i[0], i[1]);
2108
- }
2109
- }, Zo = (e, r) => {
2110
- let t;
2111
- const o = [];
2112
- for (; (t = e.exec(r)) !== null; )
2113
- o.push(t);
2114
- return o;
2115
- }, Ko = j("HTMLFormElement"), Qo = (e) => e.toLowerCase().replace(
2116
- /[-_\s]([a-z\d])(\w*)/g,
2117
- function(t, o, s) {
2118
- return o.toUpperCase() + s;
2119
- }
2120
- ), nt = (({ hasOwnProperty: e }) => (r, t) => e.call(r, t))(Object.prototype), Yo = j("RegExp"), xt = (e, r) => {
2121
- const t = Object.getOwnPropertyDescriptors(e), o = {};
2122
- ae(t, (s, i) => {
2123
- let n;
2124
- (n = r(s, i, e)) !== !1 && (o[i] = n || s);
2125
- }), Object.defineProperties(e, o);
2126
- }, es = (e) => {
2127
- xt(e, (r, t) => {
2128
- if (L(e) && ["arguments", "caller", "callee"].indexOf(t) !== -1)
2129
- return !1;
2130
- const o = e[t];
2131
- if (L(o)) {
2132
- if (r.enumerable = !1, "writable" in r) {
2133
- r.writable = !1;
2134
- return;
2135
- }
2136
- r.set || (r.set = () => {
2137
- throw Error("Can not rewrite read-only method '" + t + "'");
2138
- });
2139
- }
2140
- });
2141
- }, ts = (e, r) => {
2142
- const t = {}, o = (s) => {
2143
- s.forEach((i) => {
2144
- t[i] = !0;
2145
- });
2146
- };
2147
- return Y(e) ? o(e) : o(String(e).split(r)), t;
2148
- }, rs = () => {
2149
- }, os = (e, r) => e != null && Number.isFinite(e = +e) ? e : r, Oe = "abcdefghijklmnopqrstuvwxyz", at = "0123456789", Ot = {
2150
- DIGIT: at,
2151
- ALPHA: Oe,
2152
- ALPHA_DIGIT: Oe + Oe.toUpperCase() + at
2153
- }, ss = (e = 16, r = Ot.ALPHA_DIGIT) => {
2154
- let t = "";
2155
- const { length: o } = r;
2156
- for (; e--; )
2157
- t += r[Math.random() * o | 0];
2158
- return t;
2159
- };
2160
- function is(e) {
2161
- return !!(e && L(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
2162
- }
2163
- const ns = (e) => {
2164
- const r = new Array(10), t = (o, s) => {
2165
- if (ve(o)) {
2166
- if (r.indexOf(o) >= 0)
2167
- return;
2168
- if (!("toJSON" in o)) {
2169
- r[s] = o;
2170
- const i = Y(o) ? [] : {};
2171
- return ae(o, (n, l) => {
2172
- const a = t(n, s + 1);
2173
- !oe(a) && (i[l] = a);
2174
- }), r[s] = void 0, i;
2175
- }
2176
- }
2177
- return o;
2178
- };
2179
- return t(e, 0);
2180
- }, as = j("AsyncFunction"), ls = (e) => e && (ve(e) || L(e)) && L(e.then) && L(e.catch), At = ((e, r) => e ? setImmediate : r ? ((t, o) => (V.addEventListener("message", ({ source: s, data: i }) => {
2181
- s === V && i === t && o.length && o.shift()();
2182
- }, !1), (s) => {
2183
- o.push(s), V.postMessage(t, "*");
2184
- }))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(
2185
- typeof setImmediate == "function",
2186
- L(V.postMessage)
2187
- ), ds = typeof queueMicrotask < "u" ? queueMicrotask.bind(V) : typeof process < "u" && process.nextTick || At, d = {
2188
- isArray: Y,
2189
- isArrayBuffer: _t,
2190
- isBuffer: Io,
2191
- isFormData: No,
2192
- isArrayBufferView: xo,
2193
- isString: Oo,
2194
- isNumber: kt,
2195
- isBoolean: Ao,
2196
- isObject: ve,
2197
- isPlainObject: ce,
2198
- isReadableStream: Lo,
2199
- isRequest: zo,
2200
- isResponse: Fo,
2201
- isHeaders: Wo,
2202
- isUndefined: oe,
2203
- isDate: Po,
2204
- isFile: Ro,
2205
- isBlob: Eo,
2206
- isRegExp: Yo,
2207
- isFunction: L,
2208
- isStream: Do,
2209
- isURLSearchParams: $o,
2210
- isTypedArray: Vo,
2211
- isFileList: Bo,
2212
- forEach: ae,
2213
- merge: Ee,
2214
- extend: jo,
2215
- trim: Mo,
2216
- stripBOM: Uo,
2217
- inherits: qo,
2218
- toFlatObject: Ho,
2219
- kindOf: be,
2220
- kindOfTest: j,
2221
- endsWith: Jo,
2222
- toArray: Go,
2223
- forEachEntry: Xo,
2224
- matchAll: Zo,
2225
- isHTMLForm: Ko,
2226
- hasOwnProperty: nt,
2227
- hasOwnProp: nt,
2228
- // an alias to avoid ESLint no-prototype-builtins detection
2229
- reduceDescriptors: xt,
2230
- freezeMethods: es,
2231
- toObjectSet: ts,
2232
- toCamelCase: Qo,
2233
- noop: rs,
2234
- toFiniteNumber: os,
2235
- findKey: Tt,
2236
- global: V,
2237
- isContextDefined: It,
2238
- ALPHABET: Ot,
2239
- generateString: ss,
2240
- isSpecCompliantForm: is,
2241
- toJSONObject: ns,
2242
- isAsyncFn: as,
2243
- isThenable: ls,
2244
- setImmediate: At,
2245
- asap: ds
2246
- };
2247
- function C(e, r, t, o, s) {
2248
- Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", r && (this.code = r), t && (this.config = t), o && (this.request = o), s && (this.response = s, this.status = s.status ? s.status : null);
2249
- }
2250
- d.inherits(C, Error, {
2251
- toJSON: function() {
2252
- return {
2253
- // Standard
2254
- message: this.message,
2255
- name: this.name,
2256
- // Microsoft
2257
- description: this.description,
2258
- number: this.number,
2259
- // Mozilla
2260
- fileName: this.fileName,
2261
- lineNumber: this.lineNumber,
2262
- columnNumber: this.columnNumber,
2263
- stack: this.stack,
2264
- // Axios
2265
- config: d.toJSONObject(this.config),
2266
- code: this.code,
2267
- status: this.status
2268
- };
2269
- }
2270
- });
2271
- const Pt = C.prototype, Rt = {};
2272
- [
2273
- "ERR_BAD_OPTION_VALUE",
2274
- "ERR_BAD_OPTION",
2275
- "ECONNABORTED",
2276
- "ETIMEDOUT",
2277
- "ERR_NETWORK",
2278
- "ERR_FR_TOO_MANY_REDIRECTS",
2279
- "ERR_DEPRECATED",
2280
- "ERR_BAD_RESPONSE",
2281
- "ERR_BAD_REQUEST",
2282
- "ERR_CANCELED",
2283
- "ERR_NOT_SUPPORT",
2284
- "ERR_INVALID_URL"
2285
- // eslint-disable-next-line func-names
2286
- ].forEach((e) => {
2287
- Rt[e] = { value: e };
2288
- });
2289
- Object.defineProperties(C, Rt);
2290
- Object.defineProperty(Pt, "isAxiosError", { value: !0 });
2291
- C.from = (e, r, t, o, s, i) => {
2292
- const n = Object.create(Pt);
2293
- return d.toFlatObject(e, n, function(a) {
2294
- return a !== Error.prototype;
2295
- }, (l) => l !== "isAxiosError"), C.call(n, e.message, r, t, o, s), n.cause = e, n.name = e.name, i && Object.assign(n, i), n;
2296
- };
2297
- const cs = null;
2298
- function Be(e) {
2299
- return d.isPlainObject(e) || d.isArray(e);
2300
- }
2301
- function Et(e) {
2302
- return d.endsWith(e, "[]") ? e.slice(0, -2) : e;
2303
- }
2304
- function lt(e, r, t) {
2305
- return e ? e.concat(r).map(function(s, i) {
2306
- return s = Et(s), !t && i ? "[" + s + "]" : s;
2307
- }).join(t ? "." : "") : r;
2308
- }
2309
- function us(e) {
2310
- return d.isArray(e) && !e.some(Be);
2311
- }
2312
- const hs = d.toFlatObject(d, {}, null, function(r) {
2313
- return /^is[A-Z]/.test(r);
2314
- });
2315
- function Ce(e, r, t) {
2316
- if (!d.isObject(e))
2317
- throw new TypeError("target must be an object");
2318
- r = r || new FormData(), t = d.toFlatObject(t, {
2319
- metaTokens: !0,
2320
- dots: !1,
2321
- indexes: !1
2322
- }, !1, function(w, b) {
2323
- return !d.isUndefined(b[w]);
2324
- });
2325
- const o = t.metaTokens, s = t.visitor || u, i = t.dots, n = t.indexes, a = (t.Blob || typeof Blob < "u" && Blob) && d.isSpecCompliantForm(r);
2326
- if (!d.isFunction(s))
2327
- throw new TypeError("visitor must be a function");
2328
- function c(g) {
2329
- if (g === null) return "";
2330
- if (d.isDate(g))
2331
- return g.toISOString();
2332
- if (!a && d.isBlob(g))
2333
- throw new C("Blob is not supported. Use a Buffer instead.");
2334
- return d.isArrayBuffer(g) || d.isTypedArray(g) ? a && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
2335
- }
2336
- function u(g, w, b) {
2337
- let T = g;
2338
- if (g && !b && typeof g == "object") {
2339
- if (d.endsWith(w, "{}"))
2340
- w = o ? w : w.slice(0, -2), g = JSON.stringify(g);
2341
- else if (d.isArray(g) && us(g) || (d.isFileList(g) || d.endsWith(w, "[]")) && (T = d.toArray(g)))
2342
- return w = Et(w), T.forEach(function(R, H) {
2343
- !(d.isUndefined(R) || R === null) && r.append(
2344
- // eslint-disable-next-line no-nested-ternary
2345
- n === !0 ? lt([w], H, i) : n === null ? w : w + "[]",
2346
- c(R)
2347
- );
2348
- }), !1;
2349
- }
2350
- return Be(g) ? !0 : (r.append(lt(b, w, i), c(g)), !1);
2351
- }
2352
- const m = [], v = Object.assign(hs, {
2353
- defaultVisitor: u,
2354
- convertValue: c,
2355
- isVisitable: Be
2356
- });
2357
- function y(g, w) {
2358
- if (!d.isUndefined(g)) {
2359
- if (m.indexOf(g) !== -1)
2360
- throw Error("Circular reference detected in " + w.join("."));
2361
- m.push(g), d.forEach(g, function(T, O) {
2362
- (!(d.isUndefined(T) || T === null) && s.call(
2363
- r,
2364
- T,
2365
- d.isString(O) ? O.trim() : O,
2366
- w,
2367
- v
2368
- )) === !0 && y(T, w ? w.concat(O) : [O]);
2369
- }), m.pop();
2370
- }
2371
- }
2372
- if (!d.isObject(e))
2373
- throw new TypeError("data must be an object");
2374
- return y(e), r;
2375
- }
2376
- function dt(e) {
2377
- const r = {
2378
- "!": "%21",
2379
- "'": "%27",
2380
- "(": "%28",
2381
- ")": "%29",
2382
- "~": "%7E",
2383
- "%20": "+",
2384
- "%00": "\0"
2385
- };
2386
- return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(o) {
2387
- return r[o];
2388
- });
2389
- }
2390
- function He(e, r) {
2391
- this._pairs = [], e && Ce(e, this, r);
2392
- }
2393
- const Bt = He.prototype;
2394
- Bt.append = function(r, t) {
2395
- this._pairs.push([r, t]);
2396
- };
2397
- Bt.toString = function(r) {
2398
- const t = r ? function(o) {
2399
- return r.call(this, o, dt);
2400
- } : dt;
2401
- return this._pairs.map(function(s) {
2402
- return t(s[0]) + "=" + t(s[1]);
2403
- }, "").join("&");
2404
- };
2405
- function fs(e) {
2406
- return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
2407
- }
2408
- function Dt(e, r, t) {
2409
- if (!r)
2410
- return e;
2411
- const o = t && t.encode || fs;
2412
- d.isFunction(t) && (t = {
2413
- serialize: t
2414
- });
2415
- const s = t && t.serialize;
2416
- let i;
2417
- if (s ? i = s(r, t) : i = d.isURLSearchParams(r) ? r.toString() : new He(r, t).toString(o), i) {
2418
- const n = e.indexOf("#");
2419
- n !== -1 && (e = e.slice(0, n)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
2420
- }
2421
- return e;
2422
- }
2423
- class ct {
2424
- constructor() {
2425
- this.handlers = [];
2426
- }
2427
- /**
2428
- * Add a new interceptor to the stack
2429
- *
2430
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
2431
- * @param {Function} rejected The function to handle `reject` for a `Promise`
2432
- *
2433
- * @return {Number} An ID used to remove interceptor later
2434
- */
2435
- use(r, t, o) {
2436
- return this.handlers.push({
2437
- fulfilled: r,
2438
- rejected: t,
2439
- synchronous: o ? o.synchronous : !1,
2440
- runWhen: o ? o.runWhen : null
2441
- }), this.handlers.length - 1;
2442
- }
2443
- /**
2444
- * Remove an interceptor from the stack
2445
- *
2446
- * @param {Number} id The ID that was returned by `use`
2447
- *
2448
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
2449
- */
2450
- eject(r) {
2451
- this.handlers[r] && (this.handlers[r] = null);
2452
- }
2453
- /**
2454
- * Clear all interceptors from the stack
2455
- *
2456
- * @returns {void}
2457
- */
2458
- clear() {
2459
- this.handlers && (this.handlers = []);
2460
- }
2461
- /**
2462
- * Iterate over all the registered interceptors
2463
- *
2464
- * This method is particularly useful for skipping over any
2465
- * interceptors that may have become `null` calling `eject`.
2466
- *
2467
- * @param {Function} fn The function to call for each interceptor
2468
- *
2469
- * @returns {void}
2470
- */
2471
- forEach(r) {
2472
- d.forEach(this.handlers, function(o) {
2473
- o !== null && r(o);
2474
- });
2475
- }
2476
- }
2477
- const Nt = {
2478
- silentJSONParsing: !0,
2479
- forcedJSONParsing: !0,
2480
- clarifyTimeoutError: !1
2481
- }, ps = typeof URLSearchParams < "u" ? URLSearchParams : He, ms = typeof FormData < "u" ? FormData : null, gs = typeof Blob < "u" ? Blob : null, ys = {
2482
- isBrowser: !0,
2483
- classes: {
2484
- URLSearchParams: ps,
2485
- FormData: ms,
2486
- Blob: gs
2487
- },
2488
- protocols: ["http", "https", "file", "blob", "url", "data"]
2489
- }, Je = typeof window < "u" && typeof document < "u", De = typeof navigator == "object" && navigator || void 0, ws = Je && (!De || ["ReactNative", "NativeScript", "NS"].indexOf(De.product) < 0), bs = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
2490
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Ss = Je && window.location.href || "http://localhost", vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2491
- __proto__: null,
2492
- hasBrowserEnv: Je,
2493
- hasStandardBrowserEnv: ws,
2494
- hasStandardBrowserWebWorkerEnv: bs,
2495
- navigator: De,
2496
- origin: Ss
2497
- }, Symbol.toStringTag, { value: "Module" })), B = {
2498
- ...vs,
2499
- ...ys
2500
- };
2501
- function Cs(e, r) {
2502
- return Ce(e, new B.classes.URLSearchParams(), Object.assign({
2503
- visitor: function(t, o, s, i) {
2504
- return B.isNode && d.isBuffer(t) ? (this.append(o, t.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
2505
- }
2506
- }, r));
2507
- }
2508
- function _s(e) {
2509
- return d.matchAll(/\w+|\[(\w*)]/g, e).map((r) => r[0] === "[]" ? "" : r[1] || r[0]);
2510
- }
2511
- function ks(e) {
2512
- const r = {}, t = Object.keys(e);
2513
- let o;
2514
- const s = t.length;
2515
- let i;
2516
- for (o = 0; o < s; o++)
2517
- i = t[o], r[i] = e[i];
2518
- return r;
2519
- }
2520
- function $t(e) {
2521
- function r(t, o, s, i) {
2522
- let n = t[i++];
2523
- if (n === "__proto__") return !0;
2524
- const l = Number.isFinite(+n), a = i >= t.length;
2525
- return n = !n && d.isArray(s) ? s.length : n, a ? (d.hasOwnProp(s, n) ? s[n] = [s[n], o] : s[n] = o, !l) : ((!s[n] || !d.isObject(s[n])) && (s[n] = []), r(t, o, s[n], i) && d.isArray(s[n]) && (s[n] = ks(s[n])), !l);
2526
- }
2527
- if (d.isFormData(e) && d.isFunction(e.entries)) {
2528
- const t = {};
2529
- return d.forEachEntry(e, (o, s) => {
2530
- r(_s(o), s, t, 0);
2531
- }), t;
2532
- }
2533
- return null;
2534
- }
2535
- function Ts(e, r, t) {
2536
- if (d.isString(e))
2537
- try {
2538
- return (r || JSON.parse)(e), d.trim(e);
2539
- } catch (o) {
2540
- if (o.name !== "SyntaxError")
2541
- throw o;
2542
- }
2543
- return (0, JSON.stringify)(e);
2544
- }
2545
- const le = {
2546
- transitional: Nt,
2547
- adapter: ["xhr", "http", "fetch"],
2548
- transformRequest: [function(r, t) {
2549
- const o = t.getContentType() || "", s = o.indexOf("application/json") > -1, i = d.isObject(r);
2550
- if (i && d.isHTMLForm(r) && (r = new FormData(r)), d.isFormData(r))
2551
- return s ? JSON.stringify($t(r)) : r;
2552
- if (d.isArrayBuffer(r) || d.isBuffer(r) || d.isStream(r) || d.isFile(r) || d.isBlob(r) || d.isReadableStream(r))
2553
- return r;
2554
- if (d.isArrayBufferView(r))
2555
- return r.buffer;
2556
- if (d.isURLSearchParams(r))
2557
- return t.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), r.toString();
2558
- let l;
2559
- if (i) {
2560
- if (o.indexOf("application/x-www-form-urlencoded") > -1)
2561
- return Cs(r, this.formSerializer).toString();
2562
- if ((l = d.isFileList(r)) || o.indexOf("multipart/form-data") > -1) {
2563
- const a = this.env && this.env.FormData;
2564
- return Ce(
2565
- l ? { "files[]": r } : r,
2566
- a && new a(),
2567
- this.formSerializer
2568
- );
2569
- }
2570
- }
2571
- return i || s ? (t.setContentType("application/json", !1), Ts(r)) : r;
2572
- }],
2573
- transformResponse: [function(r) {
2574
- const t = this.transitional || le.transitional, o = t && t.forcedJSONParsing, s = this.responseType === "json";
2575
- if (d.isResponse(r) || d.isReadableStream(r))
2576
- return r;
2577
- if (r && d.isString(r) && (o && !this.responseType || s)) {
2578
- const n = !(t && t.silentJSONParsing) && s;
2579
- try {
2580
- return JSON.parse(r);
2581
- } catch (l) {
2582
- if (n)
2583
- throw l.name === "SyntaxError" ? C.from(l, C.ERR_BAD_RESPONSE, this, null, this.response) : l;
2584
- }
2585
- }
2586
- return r;
2587
- }],
2588
- /**
2589
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
2590
- * timeout is not created.
2591
- */
2592
- timeout: 0,
2593
- xsrfCookieName: "XSRF-TOKEN",
2594
- xsrfHeaderName: "X-XSRF-TOKEN",
2595
- maxContentLength: -1,
2596
- maxBodyLength: -1,
2597
- env: {
2598
- FormData: B.classes.FormData,
2599
- Blob: B.classes.Blob
2600
- },
2601
- validateStatus: function(r) {
2602
- return r >= 200 && r < 300;
2603
- },
2604
- headers: {
2605
- common: {
2606
- Accept: "application/json, text/plain, */*",
2607
- "Content-Type": void 0
2608
- }
2609
- }
2610
- };
2611
- d.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
2612
- le.headers[e] = {};
2613
- });
2614
- const Is = d.toObjectSet([
2615
- "age",
2616
- "authorization",
2617
- "content-length",
2618
- "content-type",
2619
- "etag",
2620
- "expires",
2621
- "from",
2622
- "host",
2623
- "if-modified-since",
2624
- "if-unmodified-since",
2625
- "last-modified",
2626
- "location",
2627
- "max-forwards",
2628
- "proxy-authorization",
2629
- "referer",
2630
- "retry-after",
2631
- "user-agent"
2632
- ]), xs = (e) => {
2633
- const r = {};
2634
- let t, o, s;
2635
- return e && e.split(`
2636
- `).forEach(function(n) {
2637
- s = n.indexOf(":"), t = n.substring(0, s).trim().toLowerCase(), o = n.substring(s + 1).trim(), !(!t || r[t] && Is[t]) && (t === "set-cookie" ? r[t] ? r[t].push(o) : r[t] = [o] : r[t] = r[t] ? r[t] + ", " + o : o);
2638
- }), r;
2639
- }, ut = Symbol("internals");
2640
- function te(e) {
2641
- return e && String(e).trim().toLowerCase();
2642
- }
2643
- function ue(e) {
2644
- return e === !1 || e == null ? e : d.isArray(e) ? e.map(ue) : String(e);
2645
- }
2646
- function Os(e) {
2647
- const r = /* @__PURE__ */ Object.create(null), t = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
2648
- let o;
2649
- for (; o = t.exec(e); )
2650
- r[o[1]] = o[2];
2651
- return r;
2652
- }
2653
- const As = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
2654
- function Ae(e, r, t, o, s) {
2655
- if (d.isFunction(o))
2656
- return o.call(this, r, t);
2657
- if (s && (r = t), !!d.isString(r)) {
2658
- if (d.isString(o))
2659
- return r.indexOf(o) !== -1;
2660
- if (d.isRegExp(o))
2661
- return o.test(r);
2662
- }
2663
- }
2664
- function Ps(e) {
2665
- return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (r, t, o) => t.toUpperCase() + o);
2666
- }
2667
- function Rs(e, r) {
2668
- const t = d.toCamelCase(" " + r);
2669
- ["get", "set", "has"].forEach((o) => {
2670
- Object.defineProperty(e, o + t, {
2671
- value: function(s, i, n) {
2672
- return this[o].call(this, r, s, i, n);
2673
- },
2674
- configurable: !0
2675
- });
2676
- });
2677
- }
2678
- class N {
2679
- constructor(r) {
2680
- r && this.set(r);
2681
- }
2682
- set(r, t, o) {
2683
- const s = this;
2684
- function i(l, a, c) {
2685
- const u = te(a);
2686
- if (!u)
2687
- throw new Error("header name must be a non-empty string");
2688
- const m = d.findKey(s, u);
2689
- (!m || s[m] === void 0 || c === !0 || c === void 0 && s[m] !== !1) && (s[m || a] = ue(l));
2690
- }
2691
- const n = (l, a) => d.forEach(l, (c, u) => i(c, u, a));
2692
- if (d.isPlainObject(r) || r instanceof this.constructor)
2693
- n(r, t);
2694
- else if (d.isString(r) && (r = r.trim()) && !As(r))
2695
- n(xs(r), t);
2696
- else if (d.isHeaders(r))
2697
- for (const [l, a] of r.entries())
2698
- i(a, l, o);
2699
- else
2700
- r != null && i(t, r, o);
2701
- return this;
2702
- }
2703
- get(r, t) {
2704
- if (r = te(r), r) {
2705
- const o = d.findKey(this, r);
2706
- if (o) {
2707
- const s = this[o];
2708
- if (!t)
2709
- return s;
2710
- if (t === !0)
2711
- return Os(s);
2712
- if (d.isFunction(t))
2713
- return t.call(this, s, o);
2714
- if (d.isRegExp(t))
2715
- return t.exec(s);
2716
- throw new TypeError("parser must be boolean|regexp|function");
2717
- }
2718
- }
2719
- }
2720
- has(r, t) {
2721
- if (r = te(r), r) {
2722
- const o = d.findKey(this, r);
2723
- return !!(o && this[o] !== void 0 && (!t || Ae(this, this[o], o, t)));
2724
- }
2725
- return !1;
2726
- }
2727
- delete(r, t) {
2728
- const o = this;
2729
- let s = !1;
2730
- function i(n) {
2731
- if (n = te(n), n) {
2732
- const l = d.findKey(o, n);
2733
- l && (!t || Ae(o, o[l], l, t)) && (delete o[l], s = !0);
2734
- }
2735
- }
2736
- return d.isArray(r) ? r.forEach(i) : i(r), s;
2737
- }
2738
- clear(r) {
2739
- const t = Object.keys(this);
2740
- let o = t.length, s = !1;
2741
- for (; o--; ) {
2742
- const i = t[o];
2743
- (!r || Ae(this, this[i], i, r, !0)) && (delete this[i], s = !0);
2744
- }
2745
- return s;
2746
- }
2747
- normalize(r) {
2748
- const t = this, o = {};
2749
- return d.forEach(this, (s, i) => {
2750
- const n = d.findKey(o, i);
2751
- if (n) {
2752
- t[n] = ue(s), delete t[i];
2753
- return;
2754
- }
2755
- const l = r ? Ps(i) : String(i).trim();
2756
- l !== i && delete t[i], t[l] = ue(s), o[l] = !0;
2757
- }), this;
2758
- }
2759
- concat(...r) {
2760
- return this.constructor.concat(this, ...r);
2761
- }
2762
- toJSON(r) {
2763
- const t = /* @__PURE__ */ Object.create(null);
2764
- return d.forEach(this, (o, s) => {
2765
- o != null && o !== !1 && (t[s] = r && d.isArray(o) ? o.join(", ") : o);
2766
- }), t;
2767
- }
2768
- [Symbol.iterator]() {
2769
- return Object.entries(this.toJSON())[Symbol.iterator]();
2770
- }
2771
- toString() {
2772
- return Object.entries(this.toJSON()).map(([r, t]) => r + ": " + t).join(`
2773
- `);
2774
- }
2775
- get [Symbol.toStringTag]() {
2776
- return "AxiosHeaders";
2777
- }
2778
- static from(r) {
2779
- return r instanceof this ? r : new this(r);
2780
- }
2781
- static concat(r, ...t) {
2782
- const o = new this(r);
2783
- return t.forEach((s) => o.set(s)), o;
2784
- }
2785
- static accessor(r) {
2786
- const o = (this[ut] = this[ut] = {
2787
- accessors: {}
2788
- }).accessors, s = this.prototype;
2789
- function i(n) {
2790
- const l = te(n);
2791
- o[l] || (Rs(s, n), o[l] = !0);
2792
- }
2793
- return d.isArray(r) ? r.forEach(i) : i(r), this;
2794
- }
2795
- }
2796
- N.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
2797
- d.reduceDescriptors(N.prototype, ({ value: e }, r) => {
2798
- let t = r[0].toUpperCase() + r.slice(1);
2799
- return {
2800
- get: () => e,
2801
- set(o) {
2802
- this[t] = o;
2803
- }
2804
- };
2805
- });
2806
- d.freezeMethods(N);
2807
- function Pe(e, r) {
2808
- const t = this || le, o = r || t, s = N.from(o.headers);
2809
- let i = o.data;
2810
- return d.forEach(e, function(l) {
2811
- i = l.call(t, i, s.normalize(), r ? r.status : void 0);
2812
- }), s.normalize(), i;
2813
- }
2814
- function Lt(e) {
2815
- return !!(e && e.__CANCEL__);
2816
- }
2817
- function ee(e, r, t) {
2818
- C.call(this, e ?? "canceled", C.ERR_CANCELED, r, t), this.name = "CanceledError";
2819
- }
2820
- d.inherits(ee, C, {
2821
- __CANCEL__: !0
2822
- });
2823
- function zt(e, r, t) {
2824
- const o = t.config.validateStatus;
2825
- !t.status || !o || o(t.status) ? e(t) : r(new C(
2826
- "Request failed with status code " + t.status,
2827
- [C.ERR_BAD_REQUEST, C.ERR_BAD_RESPONSE][Math.floor(t.status / 100) - 4],
2828
- t.config,
2829
- t.request,
2830
- t
2831
- ));
2832
- }
2833
- function Es(e) {
2834
- const r = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
2835
- return r && r[1] || "";
2836
- }
2837
- function Bs(e, r) {
2838
- e = e || 10;
2839
- const t = new Array(e), o = new Array(e);
2840
- let s = 0, i = 0, n;
2841
- return r = r !== void 0 ? r : 1e3, function(a) {
2842
- const c = Date.now(), u = o[i];
2843
- n || (n = c), t[s] = a, o[s] = c;
2844
- let m = i, v = 0;
2845
- for (; m !== s; )
2846
- v += t[m++], m = m % e;
2847
- if (s = (s + 1) % e, s === i && (i = (i + 1) % e), c - n < r)
2848
- return;
2849
- const y = u && c - u;
2850
- return y ? Math.round(v * 1e3 / y) : void 0;
2851
- };
2852
- }
2853
- function Ds(e, r) {
2854
- let t = 0, o = 1e3 / r, s, i;
2855
- const n = (c, u = Date.now()) => {
2856
- t = u, s = null, i && (clearTimeout(i), i = null), e.apply(null, c);
2857
- };
2858
- return [(...c) => {
2859
- const u = Date.now(), m = u - t;
2860
- m >= o ? n(c, u) : (s = c, i || (i = setTimeout(() => {
2861
- i = null, n(s);
2862
- }, o - m)));
2863
- }, () => s && n(s)];
2864
- }
2865
- const pe = (e, r, t = 3) => {
2866
- let o = 0;
2867
- const s = Bs(50, 250);
2868
- return Ds((i) => {
2869
- const n = i.loaded, l = i.lengthComputable ? i.total : void 0, a = n - o, c = s(a), u = n <= l;
2870
- o = n;
2871
- const m = {
2872
- loaded: n,
2873
- total: l,
2874
- progress: l ? n / l : void 0,
2875
- bytes: a,
2876
- rate: c || void 0,
2877
- estimated: c && l && u ? (l - n) / c : void 0,
2878
- event: i,
2879
- lengthComputable: l != null,
2880
- [r ? "download" : "upload"]: !0
2881
- };
2882
- e(m);
2883
- }, t);
2884
- }, ht = (e, r) => {
2885
- const t = e != null;
2886
- return [(o) => r[0]({
2887
- lengthComputable: t,
2888
- total: e,
2889
- loaded: o
2890
- }), r[1]];
2891
- }, ft = (e) => (...r) => d.asap(() => e(...r)), Ns = B.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, r) => (t) => (t = new URL(t, B.origin), e.protocol === t.protocol && e.host === t.host && (r || e.port === t.port)))(
2892
- new URL(B.origin),
2893
- B.navigator && /(msie|trident)/i.test(B.navigator.userAgent)
2894
- ) : () => !0, $s = B.hasStandardBrowserEnv ? (
2895
- // Standard browser envs support document.cookie
2896
- {
2897
- write(e, r, t, o, s, i) {
2898
- const n = [e + "=" + encodeURIComponent(r)];
2899
- d.isNumber(t) && n.push("expires=" + new Date(t).toGMTString()), d.isString(o) && n.push("path=" + o), d.isString(s) && n.push("domain=" + s), i === !0 && n.push("secure"), document.cookie = n.join("; ");
2900
- },
2901
- read(e) {
2902
- const r = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
2903
- return r ? decodeURIComponent(r[3]) : null;
2904
- },
2905
- remove(e) {
2906
- this.write(e, "", Date.now() - 864e5);
2907
- }
2908
- }
2909
- ) : (
2910
- // Non-standard browser env (web workers, react-native) lack needed support.
2911
- {
2912
- write() {
2913
- },
2914
- read() {
2915
- return null;
2916
- },
2917
- remove() {
2918
- }
2919
- }
2920
- );
2921
- function Ls(e) {
2922
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
2923
- }
2924
- function zs(e, r) {
2925
- return r ? e.replace(/\/?\/$/, "") + "/" + r.replace(/^\/+/, "") : e;
2926
- }
2927
- function Ft(e, r) {
2928
- return e && !Ls(r) ? zs(e, r) : r;
2929
- }
2930
- const pt = (e) => e instanceof N ? { ...e } : e;
2931
- function K(e, r) {
2932
- r = r || {};
2933
- const t = {};
2934
- function o(c, u, m, v) {
2935
- return d.isPlainObject(c) && d.isPlainObject(u) ? d.merge.call({ caseless: v }, c, u) : d.isPlainObject(u) ? d.merge({}, u) : d.isArray(u) ? u.slice() : u;
2936
- }
2937
- function s(c, u, m, v) {
2938
- if (d.isUndefined(u)) {
2939
- if (!d.isUndefined(c))
2940
- return o(void 0, c, m, v);
2941
- } else return o(c, u, m, v);
2942
- }
2943
- function i(c, u) {
2944
- if (!d.isUndefined(u))
2945
- return o(void 0, u);
2946
- }
2947
- function n(c, u) {
2948
- if (d.isUndefined(u)) {
2949
- if (!d.isUndefined(c))
2950
- return o(void 0, c);
2951
- } else return o(void 0, u);
2952
- }
2953
- function l(c, u, m) {
2954
- if (m in r)
2955
- return o(c, u);
2956
- if (m in e)
2957
- return o(void 0, c);
2958
- }
2959
- const a = {
2960
- url: i,
2961
- method: i,
2962
- data: i,
2963
- baseURL: n,
2964
- transformRequest: n,
2965
- transformResponse: n,
2966
- paramsSerializer: n,
2967
- timeout: n,
2968
- timeoutMessage: n,
2969
- withCredentials: n,
2970
- withXSRFToken: n,
2971
- adapter: n,
2972
- responseType: n,
2973
- xsrfCookieName: n,
2974
- xsrfHeaderName: n,
2975
- onUploadProgress: n,
2976
- onDownloadProgress: n,
2977
- decompress: n,
2978
- maxContentLength: n,
2979
- maxBodyLength: n,
2980
- beforeRedirect: n,
2981
- transport: n,
2982
- httpAgent: n,
2983
- httpsAgent: n,
2984
- cancelToken: n,
2985
- socketPath: n,
2986
- responseEncoding: n,
2987
- validateStatus: l,
2988
- headers: (c, u, m) => s(pt(c), pt(u), m, !0)
2989
- };
2990
- return d.forEach(Object.keys(Object.assign({}, e, r)), function(u) {
2991
- const m = a[u] || s, v = m(e[u], r[u], u);
2992
- d.isUndefined(v) && m !== l || (t[u] = v);
2993
- }), t;
2994
- }
2995
- const Wt = (e) => {
2996
- const r = K({}, e);
2997
- let { data: t, withXSRFToken: o, xsrfHeaderName: s, xsrfCookieName: i, headers: n, auth: l } = r;
2998
- r.headers = n = N.from(n), r.url = Dt(Ft(r.baseURL, r.url), e.params, e.paramsSerializer), l && n.set(
2999
- "Authorization",
3000
- "Basic " + btoa((l.username || "") + ":" + (l.password ? unescape(encodeURIComponent(l.password)) : ""))
3001
- );
3002
- let a;
3003
- if (d.isFormData(t)) {
3004
- if (B.hasStandardBrowserEnv || B.hasStandardBrowserWebWorkerEnv)
3005
- n.setContentType(void 0);
3006
- else if ((a = n.getContentType()) !== !1) {
3007
- const [c, ...u] = a ? a.split(";").map((m) => m.trim()).filter(Boolean) : [];
3008
- n.setContentType([c || "multipart/form-data", ...u].join("; "));
3009
- }
3010
- }
3011
- if (B.hasStandardBrowserEnv && (o && d.isFunction(o) && (o = o(r)), o || o !== !1 && Ns(r.url))) {
3012
- const c = s && i && $s.read(i);
3013
- c && n.set(s, c);
3014
- }
3015
- return r;
3016
- }, Fs = typeof XMLHttpRequest < "u", Ws = Fs && function(e) {
3017
- return new Promise(function(t, o) {
3018
- const s = Wt(e);
3019
- let i = s.data;
3020
- const n = N.from(s.headers).normalize();
3021
- let { responseType: l, onUploadProgress: a, onDownloadProgress: c } = s, u, m, v, y, g;
3022
- function w() {
3023
- y && y(), g && g(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
3024
- }
3025
- let b = new XMLHttpRequest();
3026
- b.open(s.method.toUpperCase(), s.url, !0), b.timeout = s.timeout;
3027
- function T() {
3028
- if (!b)
3029
- return;
3030
- const R = N.from(
3031
- "getAllResponseHeaders" in b && b.getAllResponseHeaders()
3032
- ), D = {
3033
- data: !l || l === "text" || l === "json" ? b.responseText : b.response,
3034
- status: b.status,
3035
- statusText: b.statusText,
3036
- headers: R,
3037
- config: e,
3038
- request: b
3039
- };
3040
- zt(function(G) {
3041
- t(G), w();
3042
- }, function(G) {
3043
- o(G), w();
3044
- }, D), b = null;
3045
- }
3046
- "onloadend" in b ? b.onloadend = T : b.onreadystatechange = function() {
3047
- !b || b.readyState !== 4 || b.status === 0 && !(b.responseURL && b.responseURL.indexOf("file:") === 0) || setTimeout(T);
3048
- }, b.onabort = function() {
3049
- b && (o(new C("Request aborted", C.ECONNABORTED, e, b)), b = null);
3050
- }, b.onerror = function() {
3051
- o(new C("Network Error", C.ERR_NETWORK, e, b)), b = null;
3052
- }, b.ontimeout = function() {
3053
- let H = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
3054
- const D = s.transitional || Nt;
3055
- s.timeoutErrorMessage && (H = s.timeoutErrorMessage), o(new C(
3056
- H,
3057
- D.clarifyTimeoutError ? C.ETIMEDOUT : C.ECONNABORTED,
3058
- e,
3059
- b
3060
- )), b = null;
3061
- }, i === void 0 && n.setContentType(null), "setRequestHeader" in b && d.forEach(n.toJSON(), function(H, D) {
3062
- b.setRequestHeader(D, H);
3063
- }), d.isUndefined(s.withCredentials) || (b.withCredentials = !!s.withCredentials), l && l !== "json" && (b.responseType = s.responseType), c && ([v, g] = pe(c, !0), b.addEventListener("progress", v)), a && b.upload && ([m, y] = pe(a), b.upload.addEventListener("progress", m), b.upload.addEventListener("loadend", y)), (s.cancelToken || s.signal) && (u = (R) => {
3064
- b && (o(!R || R.type ? new ee(null, e, b) : R), b.abort(), b = null);
3065
- }, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
3066
- const O = Es(s.url);
3067
- if (O && B.protocols.indexOf(O) === -1) {
3068
- o(new C("Unsupported protocol " + O + ":", C.ERR_BAD_REQUEST, e));
3069
- return;
3070
- }
3071
- b.send(i || null);
3072
- });
3073
- }, Ms = (e, r) => {
3074
- const { length: t } = e = e ? e.filter(Boolean) : [];
3075
- if (r || t) {
3076
- let o = new AbortController(), s;
3077
- const i = function(c) {
3078
- if (!s) {
3079
- s = !0, l();
3080
- const u = c instanceof Error ? c : this.reason;
3081
- o.abort(u instanceof C ? u : new ee(u instanceof Error ? u.message : u));
3082
- }
3083
- };
3084
- let n = r && setTimeout(() => {
3085
- n = null, i(new C(`timeout ${r} of ms exceeded`, C.ETIMEDOUT));
3086
- }, r);
3087
- const l = () => {
3088
- e && (n && clearTimeout(n), n = null, e.forEach((c) => {
3089
- c.unsubscribe ? c.unsubscribe(i) : c.removeEventListener("abort", i);
3090
- }), e = null);
3091
- };
3092
- e.forEach((c) => c.addEventListener("abort", i));
3093
- const { signal: a } = o;
3094
- return a.unsubscribe = () => d.asap(l), a;
3095
- }
3096
- }, js = function* (e, r) {
3097
- let t = e.byteLength;
3098
- if (t < r) {
3099
- yield e;
3100
- return;
3101
- }
3102
- let o = 0, s;
3103
- for (; o < t; )
3104
- s = o + r, yield e.slice(o, s), o = s;
3105
- }, Us = async function* (e, r) {
3106
- for await (const t of qs(e))
3107
- yield* js(t, r);
3108
- }, qs = async function* (e) {
3109
- if (e[Symbol.asyncIterator]) {
3110
- yield* e;
3111
- return;
3112
- }
3113
- const r = e.getReader();
3114
- try {
3115
- for (; ; ) {
3116
- const { done: t, value: o } = await r.read();
3117
- if (t)
3118
- break;
3119
- yield o;
3120
- }
3121
- } finally {
3122
- await r.cancel();
3123
- }
3124
- }, mt = (e, r, t, o) => {
3125
- const s = Us(e, r);
3126
- let i = 0, n, l = (a) => {
3127
- n || (n = !0, o && o(a));
3128
- };
3129
- return new ReadableStream({
3130
- async pull(a) {
3131
- try {
3132
- const { done: c, value: u } = await s.next();
3133
- if (c) {
3134
- l(), a.close();
3135
- return;
3136
- }
3137
- let m = u.byteLength;
3138
- if (t) {
3139
- let v = i += m;
3140
- t(v);
3141
- }
3142
- a.enqueue(new Uint8Array(u));
3143
- } catch (c) {
3144
- throw l(c), c;
3145
- }
3146
- },
3147
- cancel(a) {
3148
- return l(a), s.return();
3149
- }
3150
- }, {
3151
- highWaterMark: 2
3152
- });
3153
- }, _e = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Mt = _e && typeof ReadableStream == "function", Hs = _e && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (r) => e.encode(r))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), jt = (e, ...r) => {
3154
- try {
3155
- return !!e(...r);
3156
- } catch {
3157
- return !1;
3158
- }
3159
- }, Js = Mt && jt(() => {
3160
- let e = !1;
3161
- const r = new Request(B.origin, {
3162
- body: new ReadableStream(),
3163
- method: "POST",
3164
- get duplex() {
3165
- return e = !0, "half";
3166
- }
3167
- }).headers.has("Content-Type");
3168
- return e && !r;
3169
- }), gt = 64 * 1024, Ne = Mt && jt(() => d.isReadableStream(new Response("").body)), me = {
3170
- stream: Ne && ((e) => e.body)
3171
- };
3172
- _e && ((e) => {
3173
- ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((r) => {
3174
- !me[r] && (me[r] = d.isFunction(e[r]) ? (t) => t[r]() : (t, o) => {
3175
- throw new C(`Response type '${r}' is not supported`, C.ERR_NOT_SUPPORT, o);
3176
- });
3177
- });
3178
- })(new Response());
3179
- const Gs = async (e) => {
3180
- if (e == null)
3181
- return 0;
3182
- if (d.isBlob(e))
3183
- return e.size;
3184
- if (d.isSpecCompliantForm(e))
3185
- return (await new Request(B.origin, {
3186
- method: "POST",
3187
- body: e
3188
- }).arrayBuffer()).byteLength;
3189
- if (d.isArrayBufferView(e) || d.isArrayBuffer(e))
3190
- return e.byteLength;
3191
- if (d.isURLSearchParams(e) && (e = e + ""), d.isString(e))
3192
- return (await Hs(e)).byteLength;
3193
- }, Vs = async (e, r) => {
3194
- const t = d.toFiniteNumber(e.getContentLength());
3195
- return t ?? Gs(r);
3196
- }, Xs = _e && (async (e) => {
3197
- let {
3198
- url: r,
3199
- method: t,
3200
- data: o,
3201
- signal: s,
3202
- cancelToken: i,
3203
- timeout: n,
3204
- onDownloadProgress: l,
3205
- onUploadProgress: a,
3206
- responseType: c,
3207
- headers: u,
3208
- withCredentials: m = "same-origin",
3209
- fetchOptions: v
3210
- } = Wt(e);
3211
- c = c ? (c + "").toLowerCase() : "text";
3212
- let y = Ms([s, i && i.toAbortSignal()], n), g;
3213
- const w = y && y.unsubscribe && (() => {
3214
- y.unsubscribe();
3215
- });
3216
- let b;
3217
- try {
3218
- if (a && Js && t !== "get" && t !== "head" && (b = await Vs(u, o)) !== 0) {
3219
- let D = new Request(r, {
3220
- method: "POST",
3221
- body: o,
3222
- duplex: "half"
3223
- }), J;
3224
- if (d.isFormData(o) && (J = D.headers.get("content-type")) && u.setContentType(J), D.body) {
3225
- const [G, de] = ht(
3226
- b,
3227
- pe(ft(a))
3228
- );
3229
- o = mt(D.body, gt, G, de);
3230
- }
3231
- }
3232
- d.isString(m) || (m = m ? "include" : "omit");
3233
- const T = "credentials" in Request.prototype;
3234
- g = new Request(r, {
3235
- ...v,
3236
- signal: y,
3237
- method: t.toUpperCase(),
3238
- headers: u.normalize().toJSON(),
3239
- body: o,
3240
- duplex: "half",
3241
- credentials: T ? m : void 0
3242
- });
3243
- let O = await fetch(g);
3244
- const R = Ne && (c === "stream" || c === "response");
3245
- if (Ne && (l || R && w)) {
3246
- const D = {};
3247
- ["status", "statusText", "headers"].forEach((Ve) => {
3248
- D[Ve] = O[Ve];
3249
- });
3250
- const J = d.toFiniteNumber(O.headers.get("content-length")), [G, de] = l && ht(
3251
- J,
3252
- pe(ft(l), !0)
3253
- ) || [];
3254
- O = new Response(
3255
- mt(O.body, gt, G, () => {
3256
- de && de(), w && w();
3257
- }),
3258
- D
3259
- );
3260
- }
3261
- c = c || "text";
3262
- let H = await me[d.findKey(me, c) || "text"](O, e);
3263
- return !R && w && w(), await new Promise((D, J) => {
3264
- zt(D, J, {
3265
- data: H,
3266
- headers: N.from(O.headers),
3267
- status: O.status,
3268
- statusText: O.statusText,
3269
- config: e,
3270
- request: g
3271
- });
3272
- });
3273
- } catch (T) {
3274
- throw w && w(), T && T.name === "TypeError" && /fetch/i.test(T.message) ? Object.assign(
3275
- new C("Network Error", C.ERR_NETWORK, e, g),
3276
- {
3277
- cause: T.cause || T
3278
- }
3279
- ) : C.from(T, T && T.code, e, g);
3280
- }
3281
- }), $e = {
3282
- http: cs,
3283
- xhr: Ws,
3284
- fetch: Xs
3285
- };
3286
- d.forEach($e, (e, r) => {
3287
- if (e) {
3288
- try {
3289
- Object.defineProperty(e, "name", { value: r });
3290
- } catch {
3291
- }
3292
- Object.defineProperty(e, "adapterName", { value: r });
3293
- }
3294
- });
3295
- const yt = (e) => `- ${e}`, Zs = (e) => d.isFunction(e) || e === null || e === !1, Ut = {
3296
- getAdapter: (e) => {
3297
- e = d.isArray(e) ? e : [e];
3298
- const { length: r } = e;
3299
- let t, o;
3300
- const s = {};
3301
- for (let i = 0; i < r; i++) {
3302
- t = e[i];
3303
- let n;
3304
- if (o = t, !Zs(t) && (o = $e[(n = String(t)).toLowerCase()], o === void 0))
3305
- throw new C(`Unknown adapter '${n}'`);
3306
- if (o)
3307
- break;
3308
- s[n || "#" + i] = o;
3309
- }
3310
- if (!o) {
3311
- const i = Object.entries(s).map(
3312
- ([l, a]) => `adapter ${l} ` + (a === !1 ? "is not supported by the environment" : "is not available in the build")
3313
- );
3314
- let n = r ? i.length > 1 ? `since :
3315
- ` + i.map(yt).join(`
3316
- `) : " " + yt(i[0]) : "as no adapter specified";
3317
- throw new C(
3318
- "There is no suitable adapter to dispatch the request " + n,
3319
- "ERR_NOT_SUPPORT"
3320
- );
3321
- }
3322
- return o;
3323
- },
3324
- adapters: $e
3325
- };
3326
- function Re(e) {
3327
- if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
3328
- throw new ee(null, e);
3329
- }
3330
- function wt(e) {
3331
- return Re(e), e.headers = N.from(e.headers), e.data = Pe.call(
3332
- e,
3333
- e.transformRequest
3334
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ut.getAdapter(e.adapter || le.adapter)(e).then(function(o) {
3335
- return Re(e), o.data = Pe.call(
3336
- e,
3337
- e.transformResponse,
3338
- o
3339
- ), o.headers = N.from(o.headers), o;
3340
- }, function(o) {
3341
- return Lt(o) || (Re(e), o && o.response && (o.response.data = Pe.call(
3342
- e,
3343
- e.transformResponse,
3344
- o.response
3345
- ), o.response.headers = N.from(o.response.headers))), Promise.reject(o);
3346
- });
3347
- }
3348
- const qt = "1.7.9", ke = {};
3349
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, r) => {
3350
- ke[e] = function(o) {
3351
- return typeof o === e || "a" + (r < 1 ? "n " : " ") + e;
3352
- };
3353
- });
3354
- const bt = {};
3355
- ke.transitional = function(r, t, o) {
3356
- function s(i, n) {
3357
- return "[Axios v" + qt + "] Transitional option '" + i + "'" + n + (o ? ". " + o : "");
3358
- }
3359
- return (i, n, l) => {
3360
- if (r === !1)
3361
- throw new C(
3362
- s(n, " has been removed" + (t ? " in " + t : "")),
3363
- C.ERR_DEPRECATED
3364
- );
3365
- return t && !bt[n] && (bt[n] = !0, console.warn(
3366
- s(
3367
- n,
3368
- " has been deprecated since v" + t + " and will be removed in the near future"
3369
- )
3370
- )), r ? r(i, n, l) : !0;
3371
- };
3372
- };
3373
- ke.spelling = function(r) {
3374
- return (t, o) => (console.warn(`${o} is likely a misspelling of ${r}`), !0);
3375
- };
3376
- function Ks(e, r, t) {
3377
- if (typeof e != "object")
3378
- throw new C("options must be an object", C.ERR_BAD_OPTION_VALUE);
3379
- const o = Object.keys(e);
3380
- let s = o.length;
3381
- for (; s-- > 0; ) {
3382
- const i = o[s], n = r[i];
3383
- if (n) {
3384
- const l = e[i], a = l === void 0 || n(l, i, e);
3385
- if (a !== !0)
3386
- throw new C("option " + i + " must be " + a, C.ERR_BAD_OPTION_VALUE);
3387
- continue;
3388
- }
3389
- if (t !== !0)
3390
- throw new C("Unknown option " + i, C.ERR_BAD_OPTION);
3391
- }
3392
- }
3393
- const he = {
3394
- assertOptions: Ks,
3395
- validators: ke
3396
- }, U = he.validators;
3397
- class X {
3398
- constructor(r) {
3399
- this.defaults = r, this.interceptors = {
3400
- request: new ct(),
3401
- response: new ct()
3402
- };
3403
- }
3404
- /**
3405
- * Dispatch a request
3406
- *
3407
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
3408
- * @param {?Object} config
3409
- *
3410
- * @returns {Promise} The Promise to be fulfilled
3411
- */
3412
- async request(r, t) {
3413
- try {
3414
- return await this._request(r, t);
3415
- } catch (o) {
3416
- if (o instanceof Error) {
3417
- let s = {};
3418
- Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
3419
- const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
3420
- try {
3421
- o.stack ? i && !String(o.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (o.stack += `
3422
- ` + i) : o.stack = i;
3423
- } catch {
3424
- }
3425
- }
3426
- throw o;
3427
- }
3428
- }
3429
- _request(r, t) {
3430
- typeof r == "string" ? (t = t || {}, t.url = r) : t = r || {}, t = K(this.defaults, t);
3431
- const { transitional: o, paramsSerializer: s, headers: i } = t;
3432
- o !== void 0 && he.assertOptions(o, {
3433
- silentJSONParsing: U.transitional(U.boolean),
3434
- forcedJSONParsing: U.transitional(U.boolean),
3435
- clarifyTimeoutError: U.transitional(U.boolean)
3436
- }, !1), s != null && (d.isFunction(s) ? t.paramsSerializer = {
3437
- serialize: s
3438
- } : he.assertOptions(s, {
3439
- encode: U.function,
3440
- serialize: U.function
3441
- }, !0)), he.assertOptions(t, {
3442
- baseUrl: U.spelling("baseURL"),
3443
- withXsrfToken: U.spelling("withXSRFToken")
3444
- }, !0), t.method = (t.method || this.defaults.method || "get").toLowerCase();
3445
- let n = i && d.merge(
3446
- i.common,
3447
- i[t.method]
3448
- );
3449
- i && d.forEach(
3450
- ["delete", "get", "head", "post", "put", "patch", "common"],
3451
- (g) => {
3452
- delete i[g];
3453
- }
3454
- ), t.headers = N.concat(n, i);
3455
- const l = [];
3456
- let a = !0;
3457
- this.interceptors.request.forEach(function(w) {
3458
- typeof w.runWhen == "function" && w.runWhen(t) === !1 || (a = a && w.synchronous, l.unshift(w.fulfilled, w.rejected));
3459
- });
3460
- const c = [];
3461
- this.interceptors.response.forEach(function(w) {
3462
- c.push(w.fulfilled, w.rejected);
3463
- });
3464
- let u, m = 0, v;
3465
- if (!a) {
3466
- const g = [wt.bind(this), void 0];
3467
- for (g.unshift.apply(g, l), g.push.apply(g, c), v = g.length, u = Promise.resolve(t); m < v; )
3468
- u = u.then(g[m++], g[m++]);
3469
- return u;
3470
- }
3471
- v = l.length;
3472
- let y = t;
3473
- for (m = 0; m < v; ) {
3474
- const g = l[m++], w = l[m++];
3475
- try {
3476
- y = g(y);
3477
- } catch (b) {
3478
- w.call(this, b);
3479
- break;
3480
- }
3481
- }
3482
- try {
3483
- u = wt.call(this, y);
3484
- } catch (g) {
3485
- return Promise.reject(g);
3486
- }
3487
- for (m = 0, v = c.length; m < v; )
3488
- u = u.then(c[m++], c[m++]);
3489
- return u;
3490
- }
3491
- getUri(r) {
3492
- r = K(this.defaults, r);
3493
- const t = Ft(r.baseURL, r.url);
3494
- return Dt(t, r.params, r.paramsSerializer);
3495
- }
3496
- }
3497
- d.forEach(["delete", "get", "head", "options"], function(r) {
3498
- X.prototype[r] = function(t, o) {
3499
- return this.request(K(o || {}, {
3500
- method: r,
3501
- url: t,
3502
- data: (o || {}).data
3503
- }));
3504
- };
3505
- });
3506
- d.forEach(["post", "put", "patch"], function(r) {
3507
- function t(o) {
3508
- return function(i, n, l) {
3509
- return this.request(K(l || {}, {
3510
- method: r,
3511
- headers: o ? {
3512
- "Content-Type": "multipart/form-data"
3513
- } : {},
3514
- url: i,
3515
- data: n
3516
- }));
3517
- };
3518
- }
3519
- X.prototype[r] = t(), X.prototype[r + "Form"] = t(!0);
3520
- });
3521
- class Ge {
3522
- constructor(r) {
3523
- if (typeof r != "function")
3524
- throw new TypeError("executor must be a function.");
3525
- let t;
3526
- this.promise = new Promise(function(i) {
3527
- t = i;
3528
- });
3529
- const o = this;
3530
- this.promise.then((s) => {
3531
- if (!o._listeners) return;
3532
- let i = o._listeners.length;
3533
- for (; i-- > 0; )
3534
- o._listeners[i](s);
3535
- o._listeners = null;
3536
- }), this.promise.then = (s) => {
3537
- let i;
3538
- const n = new Promise((l) => {
3539
- o.subscribe(l), i = l;
3540
- }).then(s);
3541
- return n.cancel = function() {
3542
- o.unsubscribe(i);
3543
- }, n;
3544
- }, r(function(i, n, l) {
3545
- o.reason || (o.reason = new ee(i, n, l), t(o.reason));
3546
- });
3547
- }
3548
- /**
3549
- * Throws a `CanceledError` if cancellation has been requested.
3550
- */
3551
- throwIfRequested() {
3552
- if (this.reason)
3553
- throw this.reason;
3554
- }
3555
- /**
3556
- * Subscribe to the cancel signal
3557
- */
3558
- subscribe(r) {
3559
- if (this.reason) {
3560
- r(this.reason);
3561
- return;
3562
- }
3563
- this._listeners ? this._listeners.push(r) : this._listeners = [r];
3564
- }
3565
- /**
3566
- * Unsubscribe from the cancel signal
3567
- */
3568
- unsubscribe(r) {
3569
- if (!this._listeners)
3570
- return;
3571
- const t = this._listeners.indexOf(r);
3572
- t !== -1 && this._listeners.splice(t, 1);
3573
- }
3574
- toAbortSignal() {
3575
- const r = new AbortController(), t = (o) => {
3576
- r.abort(o);
3577
- };
3578
- return this.subscribe(t), r.signal.unsubscribe = () => this.unsubscribe(t), r.signal;
3579
- }
3580
- /**
3581
- * Returns an object that contains a new `CancelToken` and a function that, when called,
3582
- * cancels the `CancelToken`.
3583
- */
3584
- static source() {
3585
- let r;
3586
- return {
3587
- token: new Ge(function(s) {
3588
- r = s;
3589
- }),
3590
- cancel: r
3591
- };
3592
- }
3593
- }
3594
- function Qs(e) {
3595
- return function(t) {
3596
- return e.apply(null, t);
3597
- };
3598
- }
3599
- function Ys(e) {
3600
- return d.isObject(e) && e.isAxiosError === !0;
3601
- }
3602
- const Le = {
3603
- Continue: 100,
3604
- SwitchingProtocols: 101,
3605
- Processing: 102,
3606
- EarlyHints: 103,
3607
- Ok: 200,
3608
- Created: 201,
3609
- Accepted: 202,
3610
- NonAuthoritativeInformation: 203,
3611
- NoContent: 204,
3612
- ResetContent: 205,
3613
- PartialContent: 206,
3614
- MultiStatus: 207,
3615
- AlreadyReported: 208,
3616
- ImUsed: 226,
3617
- MultipleChoices: 300,
3618
- MovedPermanently: 301,
3619
- Found: 302,
3620
- SeeOther: 303,
3621
- NotModified: 304,
3622
- UseProxy: 305,
3623
- Unused: 306,
3624
- TemporaryRedirect: 307,
3625
- PermanentRedirect: 308,
3626
- BadRequest: 400,
3627
- Unauthorized: 401,
3628
- PaymentRequired: 402,
3629
- Forbidden: 403,
3630
- NotFound: 404,
3631
- MethodNotAllowed: 405,
3632
- NotAcceptable: 406,
3633
- ProxyAuthenticationRequired: 407,
3634
- RequestTimeout: 408,
3635
- Conflict: 409,
3636
- Gone: 410,
3637
- LengthRequired: 411,
3638
- PreconditionFailed: 412,
3639
- PayloadTooLarge: 413,
3640
- UriTooLong: 414,
3641
- UnsupportedMediaType: 415,
3642
- RangeNotSatisfiable: 416,
3643
- ExpectationFailed: 417,
3644
- ImATeapot: 418,
3645
- MisdirectedRequest: 421,
3646
- UnprocessableEntity: 422,
3647
- Locked: 423,
3648
- FailedDependency: 424,
3649
- TooEarly: 425,
3650
- UpgradeRequired: 426,
3651
- PreconditionRequired: 428,
3652
- TooManyRequests: 429,
3653
- RequestHeaderFieldsTooLarge: 431,
3654
- UnavailableForLegalReasons: 451,
3655
- InternalServerError: 500,
3656
- NotImplemented: 501,
3657
- BadGateway: 502,
3658
- ServiceUnavailable: 503,
3659
- GatewayTimeout: 504,
3660
- HttpVersionNotSupported: 505,
3661
- VariantAlsoNegotiates: 506,
3662
- InsufficientStorage: 507,
3663
- LoopDetected: 508,
3664
- NotExtended: 510,
3665
- NetworkAuthenticationRequired: 511
3666
- };
3667
- Object.entries(Le).forEach(([e, r]) => {
3668
- Le[r] = e;
3669
- });
3670
- function Ht(e) {
3671
- const r = new X(e), t = Ct(X.prototype.request, r);
3672
- return d.extend(t, X.prototype, r, { allOwnKeys: !0 }), d.extend(t, r, null, { allOwnKeys: !0 }), t.create = function(s) {
3673
- return Ht(K(e, s));
3674
- }, t;
3675
- }
3676
- const _ = Ht(le);
3677
- _.Axios = X;
3678
- _.CanceledError = ee;
3679
- _.CancelToken = Ge;
3680
- _.isCancel = Lt;
3681
- _.VERSION = qt;
3682
- _.toFormData = Ce;
3683
- _.AxiosError = C;
3684
- _.Cancel = _.CanceledError;
3685
- _.all = function(r) {
3686
- return Promise.all(r);
3687
- };
3688
- _.spread = Qs;
3689
- _.isAxiosError = Ys;
3690
- _.mergeConfig = K;
3691
- _.AxiosHeaders = N;
3692
- _.formToJSON = (e) => $t(d.isHTMLForm(e) ? new FormData(e) : e);
3693
- _.getAdapter = Ut.getAdapter;
3694
- _.HttpStatusCode = Le;
3695
- _.default = _;
3696
- const Te = (e, r) => {
3697
- const t = e.__vccOpts || e;
3698
- for (const [o, s] of r)
3699
- t[o] = s;
3700
- return t;
3701
- }, ei = {
3702
- name: "DataIAGenerales",
3703
- components: {
3704
- GSCSlider: we,
3705
- GSCDataCard: Ue
3706
- },
3707
- props: {
3708
- currentSeasonId: {
3709
- type: [Number, String],
3710
- required: !0
3711
- }
3712
- },
3713
- data() {
3714
- return {
3715
- generalsData: [],
3716
- loading: !0,
3717
- tokenPremium: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE"
3718
- };
3719
- },
3720
- watch: {
3721
- currentSeasonId: {
3722
- immediate: !0,
3723
- handler(e) {
3724
- e && this.fetchGeneralsData(e);
3725
- }
3726
- }
3727
- },
3728
- methods: {
3729
- async fetchGeneralsData(e) {
3730
- this.loading = !0;
3731
- try {
3732
- const t = await _.create({
3733
- headers: {
3734
- Authorization: `${this.tokenPremium}`
3735
- }
3736
- }).get(
3737
- `https://qxk21vj1q7.execute-api.us-east-2.amazonaws.com/prod/seasons/${e}/generals`
3738
- );
3739
- this.generalsData = t.data;
3740
- const o = t.data.generals.find((s) => s.id === "16-g");
3741
- o && this.$emit("most-productive", {
3742
- player_id: o.player_id,
3743
- team_id: o.team_id
3744
- });
3745
- } catch (r) {
3746
- console.error("Error al obtener datos generals:", r);
3747
- } finally {
3748
- this.loading = !1;
3749
- }
3750
- }
3751
- }
3752
- }, ti = (e) => (ie("data-v-7da1c005"), e = e(), ne(), e), ri = { class: "generales-container" }, oi = { class: "container-generals-cards-ia-generales" }, si = { class: "container-data-cards-ia-generales" }, ii = /* @__PURE__ */ ti(() => /* @__PURE__ */ h("div", { class: "loading-overlay" }, [
3753
- /* @__PURE__ */ h("div", { class: "loading-animation" })
3754
- ], -1)), ni = [
3755
- ii
3756
- ];
3757
- function ai(e, r, t, o, s, i) {
3758
- const n = $("GSCDataCard"), l = $("GSCSlider");
3759
- return f(), p("div", ri, [
3760
- h("div", oi, [
3761
- z(l, {
3762
- height: 610,
3763
- "px-scroll": 377,
3764
- "scroll-color": "none",
3765
- "arrows-position": "absolute",
3766
- "arrows-scroll-hide": !0,
3767
- "arrows-hide-on-no-scroll": !0,
3768
- "arrows-background": "rgba(255,255,255,.16)",
3769
- "arrows-container-bg-l": "none",
3770
- "arrows-container-bg-r": "none",
3771
- "background-color": "none",
3772
- "arrows-margin": 0,
3773
- "arrows-radius": "50%",
3774
- "arrows-border": "#ddd",
3775
- arrows: !s.loading
3776
- }, {
3777
- default: M(() => [
3778
- h("div", si, [
3779
- s.loading ? (f(), p(A, { key: 0 }, P(4, (a) => h("div", {
3780
- key: a,
3781
- class: "skeleton-card",
3782
- style: k([
3783
- a > 1 ? { "margin-left": "20px" } : {},
3784
- a === 4 ? { "margin-right": "30px" } : {}
3785
- ])
3786
- }, ni, 4)), 64)) : s.generalsData && s.generalsData.generals ? (f(!0), p(A, { key: 1 }, P(s.generalsData.generals, (a, c) => (f(), q(n, {
3787
- key: c,
3788
- data: a,
3789
- style: k([
3790
- c > 0 ? { "margin-left": "20px" } : {},
3791
- c === s.generalsData.generals.length - 1 ? { "margin-right": "30px" } : {}
3792
- ]),
3793
- height: "520px"
3794
- }, null, 8, ["data", "style"]))), 128)) : S("", !0)
3795
- ])
3796
- ]),
3797
- _: 1
3798
- }, 8, ["arrows-background", "arrows"])
3799
- ])
3800
- ]);
3801
- }
3802
- const li = /* @__PURE__ */ Te(ei, [["render", ai], ["__scopeId", "data-v-7da1c005"]]), di = {
3803
- name: "DataIAEquipos",
3804
- components: {
3805
- GSCSlider: we,
3806
- GSCDataCard: Ue
3807
- },
3808
- props: {
3809
- currentSeasonId: Number,
3810
- tournamentsApiUrl: String,
3811
- torneoLiderId: {
3812
- type: Number,
3813
- required: !0
3814
- }
3815
- },
3816
- data() {
3817
- return {
3818
- loading: !0,
3819
- teams: [],
3820
- selectedTeam: null,
3821
- isOpen: !1,
3822
- teamData: null,
3823
- tokenPremium: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",
3824
- additionalCarousels: []
3825
- };
3826
- },
3827
- async created() {
3828
- try {
3829
- if (this.currentSeasonId != 0) {
3830
- const r = await _.create({
3831
- headers: {
3832
- Authorization: `${this.tokenPremium}`
3833
- }
3834
- }).get(
3835
- `https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${this.currentSeasonId}`
3836
- );
3837
- if (this.teams = Array.isArray(r.data) ? r.data : r.data.teams || [], this.torneoLiderId) {
3838
- const t = this.teams.find((o) => o.team_id === this.torneoLiderId);
3839
- t && this.selectTeam(t);
3840
- }
3841
- }
3842
- } catch (e) {
3843
- console.error("Error al obtener equipos:", e), this.teams = [];
3844
- }
3845
- },
3846
- mounted() {
3847
- document.addEventListener("click", this.handleClickOutside);
3848
- },
3849
- beforeUnmount() {
3850
- document.removeEventListener("click", this.handleClickOutside);
3851
- },
3852
- methods: {
3853
- toggleDropdown(e) {
3854
- e.stopPropagation(), this.isOpen = !this.isOpen;
3855
- },
3856
- selectTeam(e) {
3857
- this.selectedTeam = e, this.isOpen = !1, this.handleTeamChange();
3858
- },
3859
- async handleTeamChange() {
3860
- if (this.$emit("team-change", this.selectedTeam), this.selectedTeam && this.currentSeasonId) {
3861
- this.loading = !0;
3862
- try {
3863
- const e = _.create({
3864
- headers: {
3865
- Authorization: `${this.tokenPremium}`
3866
- }
3867
- });
3868
- console.log("this.selectedTeam: ", this.selectedTeam);
3869
- const r = await e.get(
3870
- `https://qxk21vj1q7.execute-api.us-east-2.amazonaws.com/prod/relevant-data/seasons/${this.currentSeasonId}/teams/${this.selectedTeam.team_id}`,
3871
- {
3872
- headers: {
3873
- Authorization: this.tokenPremium
3874
- }
3875
- }
3876
- );
3877
- this.teamData = r.data.teams, console.log("this.teamData: ", this.teamData);
3878
- } catch (e) {
3879
- console.error("Error al obtener datos del equipo:", e), this.teamData = null;
3880
- } finally {
3881
- this.loading = !1;
3882
- }
3883
- }
3884
- },
3885
- handleClickOutside(e) {
3886
- const r = this.$el.querySelectorAll(".custom-select");
3887
- let t = !0;
3888
- r.forEach((o) => {
3889
- o.contains(e.target) && (t = !1);
3890
- }), t && (this.isOpen = !1, this.additionalCarousels.forEach((o) => {
3891
- o.isOpen = !1;
3892
- }));
3893
- },
3894
- addCarousel() {
3895
- const e = this.additionalCarousels.length;
3896
- this.additionalCarousels.push({
3897
- id: `carousel-${e}`,
3898
- selectedTeam: null,
3899
- isOpen: !1,
3900
- teamData: null,
3901
- loading: !0
3902
- }), this.$nextTick(() => {
3903
- this.initializeSlider(e);
3904
- });
3905
- },
3906
- removeCarousel(e) {
3907
- this.additionalCarousels.splice(e, 1);
3908
- },
3909
- toggleDropdownAdditional(e) {
3910
- this.additionalCarousels[e].isOpen = !this.additionalCarousels[e].isOpen, this.isOpen = !1, this.additionalCarousels.forEach((r, t) => {
3911
- t !== e && (r.isOpen = !1);
3912
- });
3913
- },
3914
- async selectTeamAdditional(e, r) {
3915
- const t = this.additionalCarousels[r];
3916
- t.selectedTeam = e, t.isOpen = !1, t.loading = !0, t.teamData = null, await this.handleTeamChangeAdditional(r);
3917
- },
3918
- async handleTeamChangeAdditional(e) {
3919
- const r = this.additionalCarousels[e];
3920
- if (r.selectedTeam && this.currentSeasonId)
3921
- try {
3922
- const o = await _.create({
3923
- headers: {
3924
- Authorization: `${this.tokenPremium}`
3925
- }
3926
- }).get(
3927
- `https://qxk21vj1q7.execute-api.us-east-2.amazonaws.com/prod/relevant-data/seasons/${this.currentSeasonId}/teams/${r.selectedTeam.team_id}`
3928
- );
3929
- r.teamData = o.data;
3930
- } catch (t) {
3931
- console.error("Error al obtener datos del equipo adicional:", t), r.teamData = null;
3932
- } finally {
3933
- r.loading = !1;
3934
- }
3935
- },
3936
- getAvailableTeamsForCarousel(e) {
3937
- return this.teams.filter((r) => this.selectedTeam && this.selectedTeam.team_id === r.team_id ? !1 : !this.additionalCarousels.some(
3938
- (t, o) => o !== e && t.selectedTeam && t.selectedTeam.team_id === r.team_id
3939
- ));
3940
- },
3941
- getModifiedTeamData(e) {
3942
- return e != null && e.teams ? e.teams.map((r) => ({
3943
- ...r,
3944
- id: r.id + "-e"
3945
- })) : [];
3946
- },
3947
- initializeSlider(e) {
3948
- this.$nextTick(() => {
3949
- const r = this.$refs[`carouselSlider${e}`];
3950
- r && r[0] && r[0].$forceUpdate();
3951
- });
3952
- }
3953
- },
3954
- watch: {
3955
- async currentSeasonId(e) {
3956
- if (e && e !== 0)
3957
- try {
3958
- this.selectedTeam = null, this.teamData = null, this.additionalCarousels = [];
3959
- const t = await _.create({
3960
- headers: {
3961
- Authorization: `${this.tokenPremium}`
3962
- }
3963
- }).get(
3964
- `https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e}`
3965
- );
3966
- this.teams = Array.isArray(t.data) ? t.data : t.data.teams || [], console.log("Equipos actualizados para nueva temporada:", t.data);
3967
- } catch (r) {
3968
- console.error("Error al actualizar equipos para nueva temporada:", r), this.teams = [];
3969
- }
3970
- },
3971
- teams: {
3972
- immediate: !0,
3973
- handler(e) {
3974
- if ((e == null ? void 0 : e.length) > 0 && this.torneoLiderId && !this.selectedTeam) {
3975
- console.log(
3976
- "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ",
3977
- this.torneoLiderId,
3978
- "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% "
3979
- );
3980
- const r = e.find((t) => t.team_id === this.torneoLiderId);
3981
- r && this.selectTeam(r);
3982
- }
3983
- }
3984
- }
3985
- },
3986
- computed: {
3987
- selectedTeams() {
3988
- const e = [];
3989
- return this.selectedTeam && e.push(this.selectedTeam), this.additionalCarousels.forEach((r) => {
3990
- r.selectedTeam && e.push(r.selectedTeam);
3991
- }), e;
3992
- },
3993
- availableTeams() {
3994
- return this.teams.filter(
3995
- (e) => !this.selectedTeams.some((r) => r.team_id === e.team_id)
3996
- );
3997
- },
3998
- modifiedTeamData() {
3999
- return this.getModifiedTeamData(this.teamData);
4000
- }
4001
- }
4002
- }, Ie = (e) => (ie("data-v-a9c7cdcc"), e = e(), ne(), e), ci = { class: "equipos-container" }, ui = { class: "header-container-equipos" }, hi = { class: "select-container" }, fi = { class: "custom-select" }, pi = ["src", "alt"], mi = /* @__PURE__ */ Ie(() => /* @__PURE__ */ h("div", { class: "select-arrow" }, null, -1)), gi = {
4003
- key: 1,
4004
- class: "options-container"
4005
- }, yi = ["onClick"], wi = ["src", "alt"], bi = { class: "container-generals-cards-ia-equipos" }, Si = { class: "container-data-cards-ia-equipos" }, vi = {
4006
- key: 0,
4007
- class: "loading-overlay"
4008
- }, Ci = /* @__PURE__ */ Ie(() => /* @__PURE__ */ h("div", { class: "loading-animation" }, null, -1)), _i = [
4009
- Ci
4010
- ], ki = { class: "header-container-equipos" }, Ti = { class: "select-container" }, Ii = { class: "custom-select" }, xi = ["src", "alt"], Oi = ["onClick"], Ai = /* @__PURE__ */ Ie(() => /* @__PURE__ */ h("div", { class: "select-arrow" }, null, -1)), Pi = {
4011
- key: 1,
4012
- class: "options-container"
4013
- }, Ri = ["onClick"], Ei = ["src", "alt"], Bi = ["onClick"], Di = { class: "container-generals-cards-ia-equipos" }, Ni = { class: "container-data-cards-ia-equipos" }, $i = {
4014
- key: 0,
4015
- class: "loading-overlay"
4016
- }, Li = /* @__PURE__ */ Ie(() => /* @__PURE__ */ h("div", { class: "loading-animation" }, null, -1)), zi = [
4017
- Li
4018
- ], Fi = { class: "add-button-container" };
4019
- function Wi(e, r, t, o, s, i) {
4020
- const n = $("GSCDataCard"), l = $("GSCSlider");
4021
- return f(), p("div", ci, [
4022
- h("div", ui, [
4023
- h("div", hi, [
4024
- h("div", fi, [
4025
- s.selectedTeam && s.selectedTeam.logo ? (f(), p("img", {
4026
- key: 0,
4027
- src: s.selectedTeam.logo,
4028
- class: "selected-team-logo",
4029
- alt: s.selectedTeam.team_name
4030
- }, null, 8, pi)) : S("", !0),
4031
- h("div", {
4032
- class: E(["team-selector", { "has-logo": s.selectedTeam && s.selectedTeam.logo }]),
4033
- onClick: r[0] || (r[0] = (...a) => i.toggleDropdown && i.toggleDropdown(...a))
4034
- }, [
4035
- h("span", null, I(s.selectedTeam ? s.selectedTeam.team_name : "Seleccionar equipo"), 1),
4036
- mi
4037
- ], 2),
4038
- s.isOpen ? (f(), p("div", gi, [
4039
- (f(!0), p(A, null, P(i.availableTeams, (a) => (f(), p("div", {
4040
- key: a.id,
4041
- class: "option",
4042
- onClick: (c) => i.selectTeam(a)
4043
- }, [
4044
- a.logo ? (f(), p("img", {
4045
- key: 0,
4046
- src: a.logo,
4047
- class: "option-team-logo",
4048
- alt: a.team_name
4049
- }, null, 8, wi)) : S("", !0),
4050
- h("span", null, I(a.team_name), 1)
4051
- ], 8, yi))), 128))
4052
- ])) : S("", !0)
4053
- ])
4054
- ])
4055
- ]),
4056
- h("div", bi, [
4057
- (f(), q(l, {
4058
- key: "main-slider",
4059
- height: 510,
4060
- "px-scroll": 377,
4061
- "scroll-color": "none",
4062
- "arrows-position": "absolute",
4063
- "arrows-scroll-hide": !0,
4064
- "arrows-hide-on-no-scroll": !0,
4065
- "arrows-background": "rgba(255,255,255,.16)",
4066
- "arrows-container-bg-l": "none",
4067
- "arrows-container-bg-r": "none",
4068
- "background-color": "none",
4069
- "arrows-margin": 0,
4070
- "arrows-radius": "50%",
4071
- "arrows-border": "#ddd",
4072
- arrows: !s.loading && s.teamData,
4073
- ref: "mainSlider"
4074
- }, {
4075
- default: M(() => [
4076
- h("div", Si, [
4077
- s.loading ? (f(), p(A, { key: 0 }, P(4, (a) => h("div", {
4078
- key: a,
4079
- class: "skeleton-card",
4080
- style: k([
4081
- a > 1 ? { "margin-left": "20px" } : {},
4082
- a === 4 ? { "margin-right": "30px" } : {}
4083
- ])
4084
- }, [
4085
- s.selectedTeam ? (f(), p("div", vi, _i)) : S("", !0)
4086
- ], 4)), 64)) : s.teamData ? (f(!0), p(A, { key: 1 }, P(s.teamData, (a, c) => (f(), q(n, {
4087
- key: c,
4088
- data: a,
4089
- class: "data-card"
4090
- }, null, 8, ["data"]))), 128)) : S("", !0)
4091
- ])
4092
- ]),
4093
- _: 1
4094
- }, 8, ["arrows-background", "arrows"]))
4095
- ]),
4096
- (f(!0), p(A, null, P(s.additionalCarousels, (a, c) => {
4097
- var u;
4098
- return f(), p("div", {
4099
- key: c,
4100
- class: "additional-carousel"
4101
- }, [
4102
- h("div", ki, [
4103
- h("div", Ti, [
4104
- h("div", Ii, [
4105
- a.selectedTeam && a.selectedTeam.logo ? (f(), p("img", {
4106
- key: 0,
4107
- src: a.selectedTeam.logo,
4108
- class: "selected-team-logo",
4109
- alt: a.selectedTeam.team_name
4110
- }, null, 8, xi)) : S("", !0),
4111
- h("div", {
4112
- class: E(["team-selector", { "has-logo": a.selectedTeam && a.selectedTeam.logo }]),
4113
- onClick: (m) => i.toggleDropdownAdditional(c)
4114
- }, [
4115
- h("span", null, I(a.selectedTeam ? a.selectedTeam.team_name : "Seleccionar equipo"), 1),
4116
- Ai
4117
- ], 10, Oi),
4118
- a.isOpen ? (f(), p("div", Pi, [
4119
- (f(!0), p(A, null, P(i.getAvailableTeamsForCarousel(c), (m) => (f(), p("div", {
4120
- key: m.id,
4121
- class: "option",
4122
- onClick: (v) => i.selectTeamAdditional(m, c)
4123
- }, [
4124
- m.logo ? (f(), p("img", {
4125
- key: 0,
4126
- src: m.logo,
4127
- class: "option-team-logo",
4128
- alt: m.team_name
4129
- }, null, 8, Ei)) : S("", !0),
4130
- h("span", null, I(m.team_name), 1)
4131
- ], 8, Ri))), 128))
4132
- ])) : S("", !0)
4133
- ])
4134
- ]),
4135
- h("div", {
4136
- class: "remove-carousel-btn",
4137
- onClick: (m) => i.removeCarousel(c)
4138
- }, "×", 8, Bi)
4139
- ]),
4140
- h("div", Di, [
4141
- (f(), q(l, {
4142
- key: `carousel-slider-${c}`,
4143
- height: 510,
4144
- "px-scroll": 377,
4145
- "scroll-color": "none",
4146
- "arrows-position": "absolute",
4147
- "arrows-scroll-hide": !0,
4148
- "arrows-hide-on-no-scroll": !0,
4149
- "arrows-background": "rgba(255,255,255,.16)",
4150
- "arrows-container-bg-l": "none",
4151
- "arrows-container-bg-r": "none",
4152
- "background-color": "none",
4153
- "arrows-margin": 0,
4154
- "arrows-radius": "50%",
4155
- "arrows-border": "#ddd",
4156
- arrows: !a.loading && ((u = a.teamData) == null ? void 0 : u.teams),
4157
- ref_for: !0,
4158
- ref: `carouselSlider${c}`,
4159
- onMounted: (m) => i.initializeSlider(c)
4160
- }, {
4161
- default: M(() => [
4162
- h("div", Ni, [
4163
- a.loading ? (f(), p(A, { key: 0 }, P(4, (m) => h("div", {
4164
- key: m,
4165
- class: "skeleton-card",
4166
- style: k([
4167
- m > 1 ? { "margin-left": "20px" } : {},
4168
- m === 4 ? { "margin-right": "30px" } : {}
4169
- ])
4170
- }, [
4171
- a.selectedTeam ? (f(), p("div", $i, zi)) : S("", !0)
4172
- ], 4)), 64)) : a.teamData && a.teamData.teams ? (f(!0), p(A, { key: 1 }, P(a.teamData.teams, (m, v) => (f(), q(n, {
4173
- key: v,
4174
- data: m,
4175
- class: "data-card"
4176
- }, null, 8, ["data"]))), 128)) : S("", !0)
4177
- ])
4178
- ]),
4179
- _: 2
4180
- }, 1032, ["arrows-background", "arrows", "onMounted"]))
4181
- ])
4182
- ]);
4183
- }), 128)),
4184
- h("div", Fi, [
4185
- h("div", {
4186
- class: "carousel-placeholder-equipos",
4187
- onClick: r[1] || (r[1] = (...a) => i.addCarousel && i.addCarousel(...a))
4188
- }, " Agregar carrusel de jugadores ")
4189
- ])
4190
- ]);
4191
- }
4192
- const Mi = /* @__PURE__ */ Te(di, [["render", Wi], ["__scopeId", "data-v-a9c7cdcc"]]), ji = {
4193
- name: "DataIAJugadores",
4194
- components: {
4195
- "g-s-c-slider": we,
4196
- "g-s-c-data-card": Ue
4197
- },
4198
- props: {
4199
- currentSeasonId: {
4200
- type: Number,
4201
- required: !0
4202
- },
4203
- mostProductivePlayer: {
4204
- type: Object,
4205
- required: !0
4206
- }
4207
- },
4208
- data() {
4209
- return {
4210
- containers: [
4211
- {
4212
- id: Date.now(),
4213
- isOpen: !1,
4214
- selectedTeam: null,
4215
- selectedPlayer: null,
4216
- players: [],
4217
- isPlayerOpen: !1,
4218
- playerSearchQuery: "",
4219
- playerData: null
4220
- }
4221
- ],
4222
- maxContainers: 20,
4223
- // Límite máximo de contenedores
4224
- teams: [],
4225
- tokenPremium: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",
4226
- filteredTeams: [],
4227
- searchQuery: "",
4228
- loading: !0,
4229
- playerData: null,
4230
- selectedPlayer: null
4231
- };
4232
- },
4233
- computed: {
4234
- filteredPlayers() {
4235
- return (e) => {
4236
- const r = this.containers[e];
4237
- if (!r) return [];
4238
- const t = this.containers.filter((s, i) => i !== e).map((s) => s.selectedPlayer).filter(Boolean).map((s) => s.player_id);
4239
- let o = r.players.filter(
4240
- (s) => !t.includes(s.player_id)
4241
- );
4242
- if (r.playerSearchQuery) {
4243
- const s = r.playerSearchQuery.toLowerCase();
4244
- o = o.filter(
4245
- (i) => i.name.toLowerCase().includes(s)
4246
- );
4247
- }
4248
- return o;
4249
- };
4250
- }
4251
- },
4252
- watch: {
4253
- currentSeasonId: {
4254
- immediate: !0,
4255
- async handler(e) {
4256
- var r, t;
4257
- if (e && e !== 0) {
4258
- const o = {
4259
- id: ((r = this.containers[0]) == null ? void 0 : r.id) || Date.now(),
4260
- isOpen: !1,
4261
- selectedTeam: null,
4262
- selectedPlayer: null,
4263
- players: [],
4264
- isPlayerOpen: !1,
4265
- playerSearchQuery: "",
4266
- playerData: null
4267
- };
4268
- this.containers = [o], await this.loadTeams(e), (t = this.mostProductivePlayer) != null && t.team_id && await this.autoSelectProductivePlayer();
4269
- }
4270
- }
4271
- },
4272
- mostProductivePlayer: {
4273
- immediate: !0,
4274
- async handler(e) {
4275
- e != null && e.team_id && this.teams.length > 0 && !this.containers[0].selectedPlayer && await this.autoSelectProductivePlayer();
4276
- }
4277
- }
4278
- },
4279
- methods: {
4280
- async loadTeams(e) {
4281
- if (!(!e || e === 0))
4282
- try {
4283
- const r = _.create({
4284
- headers: {
4285
- Authorization: `${this.tokenPremium}`
4286
- }
4287
- }), { data: t } = await r.get(
4288
- `https://yjeig444bb.execute-api.us-west-2.amazonaws.com/prod/teamsBySeason/${e}`
4289
- );
4290
- this.teams = t.teams, this.filteredTeams = [...this.teams];
4291
- } catch (r) {
4292
- console.error("Error al cargar equipos:", r);
4293
- }
4294
- },
4295
- async loadPlayers(e, r, t) {
4296
- var o;
4297
- try {
4298
- const s = _.create({
4299
- headers: {
4300
- Authorization: `${this.tokenPremium}`
4301
- }
4302
- }), { data: i } = await s.get(
4303
- `https://pa3kubpuhg.execute-api.us-west-2.amazonaws.com/prod/playersByTeamAndSeason/${r}/${e}`
4304
- );
4305
- if (this.containers[t] = {
4306
- ...this.containers[t],
4307
- players: i[0].players
4308
- }, t === 0 && ((o = this.mostProductivePlayer) != null && o.player_id)) {
4309
- const n = i[0].players.find(
4310
- (l) => l.player_id === this.mostProductivePlayer.player_id
4311
- );
4312
- n && await this.selectPlayer(n, 0);
4313
- }
4314
- } catch (s) {
4315
- console.error("Error al cargar jugadores:", s);
4316
- }
4317
- },
4318
- toggleDropdown(e) {
4319
- this.containers[e].isOpen = !this.containers[e].isOpen, this.containers[e].isOpen && this.$nextTick(() => {
4320
- this.$refs.searchInput && this.$refs.searchInput.focus();
4321
- });
4322
- },
4323
- selectTeam(e, r) {
4324
- var o;
4325
- if (((o = this.containers[r].selectedTeam) == null ? void 0 : o.team_id) === e.team_id) {
4326
- this.containers[r].isOpen = !1;
4327
- return;
4328
- }
4329
- const t = {
4330
- ...this.containers[r],
4331
- selectedTeam: e,
4332
- isOpen: !1,
4333
- selectedPlayer: null,
4334
- players: [],
4335
- isPlayerOpen: !1,
4336
- playerSearchQuery: "",
4337
- playerData: null
4338
- };
4339
- this.containers[r] = t, this.loadPlayers(e.team_id, this.currentSeasonId, r), this.$emit("team-selected", { team: e, containerIndex: r });
4340
- },
4341
- filterTeams() {
4342
- if (!this.searchQuery) {
4343
- this.filteredTeams = [...this.teams];
4344
- return;
4345
- }
4346
- const e = this.searchQuery.toLowerCase();
4347
- this.filteredTeams = this.teams.filter((r) => r.name.toLowerCase().includes(e));
4348
- },
4349
- handlePlayerChange() {
4350
- this.$emit("player-change", this.selectedPlayer);
4351
- },
4352
- closeTeamDropdown(e) {
4353
- this.containers.forEach((r, t) => {
4354
- const o = this.$refs[`teamSelect${t}`];
4355
- o && !o[0].contains(e.target) && (r.isOpen = !1, this.searchQuery = "", this.filteredTeams = [...this.teams]);
4356
- });
4357
- },
4358
- closePlayerDropdown(e) {
4359
- const r = this.$refs.playerSelect;
4360
- r && (Array.isArray(r) ? !r.some((o) => o && o.contains(e.target)) && this.containers.forEach((o) => {
4361
- o.isPlayerOpen = !1;
4362
- }) : r && !r.contains(e.target) && this.containers.forEach((t) => {
4363
- t.isPlayerOpen = !1;
4364
- }));
4365
- },
4366
- handleTeamChange() {
4367
- this.selectedTeam && this.$emit("team-change", this.selectedTeam);
4368
- },
4369
- togglePlayerDropdown(e) {
4370
- this.containers[e].isPlayerOpen = !this.containers[e].isPlayerOpen;
4371
- },
4372
- async selectPlayer(e, r) {
4373
- const t = this.containers[r];
4374
- if (t.selectedPlayer = e, t.isPlayerOpen = !1, t.loading = !0, t.playerData = null, t.selectedPlayer && this.currentSeasonId)
4375
- try {
4376
- const o = _.create({
4377
- headers: {
4378
- Authorization: `${this.tokenPremium}`
4379
- }
4380
- }), { data: s } = await o.get(
4381
- `https://qxk21vj1q7.execute-api.us-east-2.amazonaws.com/prod/relevant-data/seasons/${this.currentSeasonId}/teams/${t.selectedTeam.team_id}/players/${e.player_id}`
4382
- );
4383
- t.playerData = s.players[e.player_id];
4384
- } catch (o) {
4385
- console.error("Error al cargar datos del jugador:", o), t.playerData = null;
4386
- } finally {
4387
- t.loading = !1;
4388
- }
4389
- this.$emit("player-selected", e);
4390
- },
4391
- clearSearch(e) {
4392
- this.containers[e].playerSearchQuery = "";
4393
- },
4394
- addContainer() {
4395
- this.containers.length < this.maxContainers && this.containers.push({
4396
- id: Date.now(),
4397
- isOpen: !1,
4398
- selectedTeam: null,
4399
- selectedPlayer: null,
4400
- players: [],
4401
- isPlayerOpen: !1,
4402
- playerSearchQuery: "",
4403
- playerData: null
4404
- });
4405
- },
4406
- removeContainer(e) {
4407
- e > 0 && this.containers.splice(e, 1);
4408
- },
4409
- async autoSelectProductivePlayer() {
4410
- console.log("Auto-seleccionando jugador productivo:", this.mostProductivePlayer);
4411
- const e = this.teams.find((r) => r.team_id === this.mostProductivePlayer.team_id);
4412
- if (e) {
4413
- this.containers[0] = {
4414
- ...this.containers[0],
4415
- selectedTeam: e,
4416
- isOpen: !1
4417
- }, await this.loadPlayers(e.team_id, this.currentSeasonId, 0), await new Promise((t) => setTimeout(t, 100));
4418
- const r = this.containers[0].players.find(
4419
- (t) => t.player_id === this.mostProductivePlayer.player_id
4420
- );
4421
- r && await this.selectPlayer(r, 0);
4422
- }
4423
- },
4424
- addCarousel() {
4425
- const e = this.additionalCarousels.length;
4426
- this.additionalCarousels.push({
4427
- id: `carousel-${e}`,
4428
- selectedPlayer: null,
4429
- isOpen: !1,
4430
- playerData: null,
4431
- loading: !0
4432
- // Iniciamos con loading true para mostrar el skeleton
4433
- }), this.$nextTick(() => {
4434
- this.initializeSlider(e);
4435
- });
4436
- },
4437
- async handlePlayerChange() {
4438
- if (this.selectedPlayer && this.currentSeasonId)
4439
- try {
4440
- const r = await _.create({
4441
- headers: {
4442
- Authorization: `${this.tokenPremium}`
4443
- }
4444
- }).get(
4445
- `https://qxk21vj1q7.execute-api.us-east-2.amazonaws.com/prod/relevant-data/seasons/${this.currentSeasonId}/players/${this.selectedPlayer.player_id}`
4446
- );
4447
- this.playerData = r.data.players;
4448
- } catch (e) {
4449
- console.error("Error al obtener datos del jugador:", e), this.playerData = null;
4450
- } finally {
4451
- this.loading = !1;
4452
- }
4453
- },
4454
- async handlePlayerChangeAdditional(e) {
4455
- const r = this.additionalCarousels[e];
4456
- if (r.selectedPlayer && this.currentSeasonId)
4457
- try {
4458
- const o = await _.create({
4459
- headers: {
4460
- Authorization: `${this.tokenPremium}`
4461
- }
4462
- }).get(
4463
- `https://qxk21vj1q7.execute-api.us-east-2.amazonaws.com/prod/relevant-data/seasons/${this.currentSeasonId}/players/${r.selectedPlayer.player_id}`
4464
- );
4465
- r.playerData = o.data;
4466
- } catch (t) {
4467
- console.error("Error al obtener datos del jugador adicional:", t), r.playerData = null;
4468
- } finally {
4469
- r.loading = !1;
4470
- }
4471
- }
4472
- },
4473
- mounted() {
4474
- this.loadTeams(), document.addEventListener("click", this.closeTeamDropdown), document.addEventListener("click", this.closePlayerDropdown);
4475
- },
4476
- beforeUnmount() {
4477
- document.removeEventListener("click", this.closeTeamDropdown), document.removeEventListener("click", this.closePlayerDropdown);
4478
- }
4479
- }, xe = (e) => (ie("data-v-747d21f0"), e = e(), ne(), e), Ui = { class: "jugadores-container" }, qi = ["onClick"], Hi = /* @__PURE__ */ xe(() => /* @__PURE__ */ h("span", null, "×", -1)), Ji = [
4480
- Hi
4481
- ], Gi = { class: "header-container-jugadores" }, Vi = { class: "custom-select" }, Xi = ["src", "alt"], Zi = ["onClick"], Ki = /* @__PURE__ */ xe(() => /* @__PURE__ */ h("div", { class: "select-arrow" }, null, -1)), Qi = {
4482
- key: 1,
4483
- class: "options-container"
4484
- }, Yi = ["onClick"], en = ["src", "alt"], tn = { class: "custom-select" }, rn = ["src", "alt"], on = ["onClick"], sn = /* @__PURE__ */ xe(() => /* @__PURE__ */ h("div", { class: "select-arrow" }, null, -1)), nn = {
4485
- key: 1,
4486
- class: "options-container"
4487
- }, an = {
4488
- key: 0,
4489
- class: "search-box"
4490
- }, ln = { class: "search-input-container" }, dn = ["onUpdate:modelValue"], cn = ["onClick"], un = ["onClick"], hn = ["src", "alt"], fn = { class: "container-generals-cards-ia-jugadores" }, pn = { class: "container-data-cards-ia-jugadores" }, mn = {
4491
- key: 1,
4492
- class: "skeleton-cards-container"
4493
- }, gn = {
4494
- key: 0,
4495
- class: "loading-overlay"
4496
- }, yn = /* @__PURE__ */ xe(() => /* @__PURE__ */ h("div", { class: "loading-animation" }, null, -1)), wn = [
4497
- yn
4498
- ];
4499
- function bn(e, r, t, o, s, i) {
4500
- const n = $("g-s-c-data-card"), l = $("g-s-c-slider");
4501
- return f(), p("div", Ui, [
4502
- (f(!0), p(A, null, P(s.containers, (a, c) => (f(), p("div", {
4503
- key: `container-${a.id}`,
4504
- class: "container-section"
4505
- }, [
4506
- c > 0 ? (f(), p("div", {
4507
- key: 0,
4508
- class: "close-container-button",
4509
- onClick: (u) => i.removeContainer(c)
4510
- }, Ji, 8, qi)) : S("", !0),
4511
- h("div", Gi, [
4512
- h("div", {
4513
- class: "select-container",
4514
- ref_for: !0,
4515
- ref: `teamSelect${c}`
4516
- }, [
4517
- h("div", Vi, [
4518
- a.selectedTeam && a.selectedTeam.logo ? (f(), p("img", {
4519
- key: 0,
4520
- src: a.selectedTeam.logo,
4521
- class: "selected-team-logo",
4522
- alt: a.selectedTeam.team_name
4523
- }, null, 8, Xi)) : S("", !0),
4524
- h("div", {
4525
- class: E(["team-selector", { "has-logo": a.selectedTeam && a.selectedTeam.logo }]),
4526
- onClick: (u) => i.toggleDropdown(c)
4527
- }, [
4528
- h("span", null, I(a.selectedTeam ? a.selectedTeam.team_name : "Seleccionar equipo"), 1),
4529
- Ki
4530
- ], 10, Zi),
4531
- a.isOpen ? (f(), p("div", Qi, [
4532
- (f(!0), p(A, null, P(s.filteredTeams, (u) => (f(), p("div", {
4533
- key: u.id,
4534
- class: "option",
4535
- onClick: (m) => i.selectTeam(u, c)
4536
- }, [
4537
- u.logo ? (f(), p("img", {
4538
- key: 0,
4539
- src: u.logo,
4540
- class: "option-team-logo",
4541
- alt: u.team_name
4542
- }, null, 8, en)) : S("", !0),
4543
- h("span", null, I(u.team_name), 1)
4544
- ], 8, Yi))), 128))
4545
- ])) : S("", !0)
4546
- ])
4547
- ], 512),
4548
- h("div", {
4549
- class: "select-container player-select",
4550
- ref_for: !0,
4551
- ref: "playerSelect"
4552
- }, [
4553
- h("div", tn, [
4554
- a.selectedPlayer && a.selectedPlayer.photo ? (f(), p("img", {
4555
- key: 0,
4556
- src: a.selectedPlayer.photo,
4557
- class: "selected-team-logo",
4558
- alt: a.selectedPlayer.name
4559
- }, null, 8, rn)) : S("", !0),
4560
- h("div", {
4561
- class: E(["team-selector", {
4562
- "has-logo": a.selectedPlayer && a.selectedPlayer.photo,
4563
- disabled: !a.selectedTeam || a.players.length === 0
4564
- }]),
4565
- onClick: (u) => a.selectedTeam && i.togglePlayerDropdown(c)
4566
- }, [
4567
- h("span", null, I(a.selectedPlayer ? a.selectedPlayer.name : "Seleccionar jugador"), 1),
4568
- sn
4569
- ], 10, on),
4570
- a.isPlayerOpen ? (f(), p("div", nn, [
4571
- a.players.length > 0 ? (f(), p("div", an, [
4572
- h("div", ln, [
4573
- Q(h("input", {
4574
- type: "text",
4575
- "onUpdate:modelValue": (u) => a.playerSearchQuery = u,
4576
- placeholder: "Buscar jugador...",
4577
- onClick: r[0] || (r[0] = Xe(() => {
4578
- }, ["stop"]))
4579
- }, null, 8, dn), [
4580
- [Xt, a.playerSearchQuery]
4581
- ]),
4582
- a.playerSearchQuery ? (f(), p("button", {
4583
- key: 0,
4584
- class: "clear-search",
4585
- onClick: Xe((u) => i.clearSearch(c), ["stop"])
4586
- }, " ✕ ", 8, cn)) : S("", !0)
4587
- ])
4588
- ])) : S("", !0),
4589
- (f(!0), p(A, null, P(i.filteredPlayers(c), (u) => (f(), p("div", {
4590
- key: u.player_id,
4591
- class: E(["option", {
4592
- selected: a.selectedPlayer && a.selectedPlayer.player_id === u.player_id
4593
- }]),
4594
- onClick: (m) => i.selectPlayer(u, c)
4595
- }, [
4596
- u.photo ? (f(), p("img", {
4597
- key: 0,
4598
- src: u.photo,
4599
- class: "option-team-logo",
4600
- alt: u.name
4601
- }, null, 8, hn)) : S("", !0),
4602
- h("span", null, I(u.name), 1)
4603
- ], 10, un))), 128))
4604
- ])) : S("", !0)
4605
- ])
4606
- ], 512)
4607
- ]),
4608
- h("div", fn, [
4609
- (f(), q(l, {
4610
- ref_for: !0,
4611
- ref: "slider",
4612
- key: `slider-${a.id}`,
4613
- height: 510,
4614
- "px-scroll": 377,
4615
- "scroll-color": "none",
4616
- "arrows-position": "absolute",
4617
- "arrows-scroll-hide": !0,
4618
- "arrows-hide-on-no-scroll": !0,
4619
- "arrows-padding": 0,
4620
- "arrows-background": "rgba(255,255,255,.16)",
4621
- "arrows-container-bg-l": "none",
4622
- "arrows-container-bg-r": "none",
4623
- "background-color": "none",
4624
- "arrows-margin": 0,
4625
- "arrows-radius": "50%",
4626
- "arrows-border": "#ddd",
4627
- arrows: a.selectedPlayer && a.playerData
4628
- }, {
4629
- default: M(() => [
4630
- h("div", pn, [
4631
- a.selectedPlayer && a.playerData ? (f(!0), p(A, { key: 0 }, P(a.playerData, (u, m) => (f(), p("div", { key: m }, [
4632
- z(n, { data: u }, null, 8, ["data"])
4633
- ]))), 128)) : (f(), p("div", mn, [
4634
- (f(), p(A, null, P(4, (u) => h("div", {
4635
- key: u,
4636
- class: "skeleton-card"
4637
- }, [
4638
- a.selectedPlayer && a.loading ? (f(), p("div", gn, wn)) : S("", !0)
4639
- ])), 64))
4640
- ]))
4641
- ])
4642
- ]),
4643
- _: 2
4644
- }, 1032, ["arrows-background", "arrows"]))
4645
- ])
4646
- ]))), 128)),
4647
- s.containers.length < s.maxContainers ? (f(), p("div", {
4648
- key: 0,
4649
- class: "carousel-placeholder-jugadores",
4650
- onClick: r[1] || (r[1] = (...a) => i.addContainer && i.addContainer(...a))
4651
- }, " Agregar carrusel de jugadores ")) : S("", !0)
4652
- ]);
4653
- }
4654
- const Sn = /* @__PURE__ */ Te(ji, [["render", bn], ["__scopeId", "data-v-747d21f0"]]), vn = {
4655
- name: "DataIA",
4656
- components: {
4657
- GSCSlider: we,
4658
- GscSwitchComponent: yr,
4659
- GSCSeasonSelect: Wr,
4660
- GSCTournamentSelect: fo,
4661
- DataIAGenerales: li,
4662
- DataIAEquipos: Mi,
4663
- DataIAJugadores: Sn
4664
- },
4665
- props: {
4666
- tournamentsApiUrl: {
4667
- type: String,
4668
- default: ""
4669
- }
4670
- },
4671
- computed: {
4672
- containerConfig() {
4673
- return this.parentWidth, {
4674
- width: this.parentWidth
4675
- };
4676
- },
4677
- responsiveConfig() {
4678
- const e = this.parentWidth;
4679
- return {
4680
- tabsWidth: e <= 460 ? `${Math.floor((e - 5) / 3)}px` : e < 680 ? "148px" : e <= 720 ? "122px" : (
4681
- // ... resto de la lógica ...
4682
- "173px"
4683
- ),
4684
- selectWidth: e <= 460 ? `${Math.floor((e - 10) / 2)}px` : e < 680 ? "218px" : "147px",
4685
- fontSize: e <= 330 ? "font-size-xs" : e <= 460 ? "font-size-sm" : "font-size-default"
4686
- };
4687
- },
4688
- sizeTabsMP() {
4689
- const e = this.parentWidth;
4690
- return e <= 480 ? `${Math.min(Math.floor((e - 72) / 3), 140)}px` : e < 680 ? "135px" : e < 690 ? "95px" : e <= 730 ? "100px" : e <= 760 ? "115px" : e <= 800 ? "125px" : "140px";
4691
- },
4692
- selectWidth() {
4693
- const e = this.parentWidth;
4694
- return e <= 460 ? `${Math.min(Math.floor((e - 15) / 2), 200)}px` : e < 680 ? "200px" : "147px";
4695
- },
4696
- headerFontSize() {
4697
- const e = this.parentWidth;
4698
- return e <= 330 ? "font-size-xs" : e <= 460 ? "font-size-sm" : "font-size-default";
4699
- },
4700
- disabledOptions() {
4701
- return {
4702
- Equipos: !this.torneoLiderId,
4703
- Jugadores: !this.mostProductivePlayerId
4704
- };
4705
- }
4706
- },
4707
- data() {
4708
- return {
4709
- containerWidth: 0,
4710
- containerSizeClass: "",
4711
- resizeObserver: null,
4712
- parentWidth: 0,
4713
- tokenPremium: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MCwibmFtZSI6IlVzdWFyaW8gRnJlZSIsInVzZXJuYW1lIjoiZnJlZUBnb2xzdGF0cy5jb20iLCJlbWFpbCI6ImZyZWVAZ29sc3RhdHMuY29tIiwiaWF0IjoxNjA2NzU4Nzk1LCJleHAiOjE2MzgyOTQ3OTV9.kPNmP7yDtk38cAXrUyc7OHRh6J25VFqy-XUNzbK-4YE",
4714
- optionSelected: "Generales",
4715
- selectedTournament: { seasons: [] },
4716
- tournamentSelectedObj: {},
4717
- tournamentType: "",
4718
- seasonActive: 0,
4719
- selectWidthGenerales: 200,
4720
- selectWidthEquipos: 200,
4721
- selectWidthJugadores: 200,
4722
- mostProductivePlayerId: null,
4723
- generalTableData: null,
4724
- torneoLiderId: null
4725
- };
4726
- },
4727
- watch: {
4728
- seasonActive: {
4729
- immediate: !0,
4730
- async handler(e) {
4731
- e && e !== 0 && await this.fetchGeneralTable(e);
4732
- }
4733
- }
4734
- },
4735
- mounted() {
4736
- this.updateContainerWidth(), this.resizeObserver = new ResizeObserver((e) => {
4737
- const r = e[0];
4738
- r && (this.parentWidth = r.contentRect.width, this.updateContainerWidth());
4739
- }), this.$refs.container && this.resizeObserver.observe(this.$refs.container), window.addEventListener("resize", this.handleResize);
4740
- },
4741
- beforeUnmount() {
4742
- this.resizeObserver && this.resizeObserver.disconnect(), window.removeEventListener("resize", this.handleResize);
4743
- },
4744
- methods: {
4745
- async selectedSeason(e) {
4746
- console.log("Valores: season: ", e), this.seasonActive !== e.id && (this.seasonActive = e.id, this.optionSelected = "Generales", this.$emit("change-season-id", e.id));
4747
- },
4748
- async changeTournament(e) {
4749
- e.id !== this.selectedTournament.id && (this.selectedTournament = e, this.tournamentType = e.tournament_type, this.optionSelected = "Generales", this.tournamentSelectedObj = {
4750
- propName: "id",
4751
- value: e.id,
4752
- is_female: e.is_female == 1
4753
- });
4754
- },
4755
- changeTabsGeneral(e) {
4756
- e === "Equipos" && !this.torneoLiderId || e === "Jugadores" && !this.mostProductivePlayerId || (this.optionSelected = e);
4757
- },
4758
- handleResize() {
4759
- this.$refs.container && (this.parentWidth = this.$refs.container.offsetWidth, this.updateContainerWidth());
4760
- },
4761
- updateContainerWidth() {
4762
- this.$refs.container && (this.$refs.container.offsetHeight, this.parentWidth >= 1200 ? (this.containerWidth = 1200, this.containerSizeClass = "size-xl") : this.parentWidth >= 992 ? (this.containerWidth = this.parentWidth - 48, this.containerSizeClass = "size-lg") : this.parentWidth >= 680 ? (this.containerWidth = this.parentWidth - 32, this.containerSizeClass = "size-md") : (this.containerWidth = this.parentWidth - 16, this.containerSizeClass = "size-sm"));
4763
- },
4764
- handleMostProductive(e) {
4765
- this.mostProductivePlayerId = e;
4766
- },
4767
- async fetchGeneralTable(e) {
4768
- var r, t, o, s, i;
4769
- try {
4770
- const l = await _.create({
4771
- headers: {
4772
- Authorization: `${this.tokenPremium}`
4773
- }
4774
- }).get(
4775
- `https://jfxv8fqkn3.execute-api.us-west-2.amazonaws.com/prod/generalTable/${e}`
4776
- );
4777
- if (this.generalTableData = l.data, this.tournamentType === 0 && ((t = (r = this.generalTableData) == null ? void 0 : r.data) == null ? void 0 : t.length) > 0)
4778
- this.torneoLiderId = this.generalTableData.data[0].team_id;
4779
- else if (this.tournamentType === 2 && ((s = (o = this.generalTableData) == null ? void 0 : o.data) == null ? void 0 : s.length) > 0) {
4780
- const a = [
4781
- 175,
4782
- 392,
4783
- 550,
4784
- 943,
4785
- 962,
4786
- 1054,
4787
- 1402,
4788
- 1405,
4789
- 1410,
4790
- 1492,
4791
- 2098,
4792
- 2156,
4793
- 2304,
4794
- 2315,
4795
- 2340,
4796
- 2343,
4797
- 2346,
4798
- 2349,
4799
- 2730,
4800
- 2832,
4801
- 2950,
4802
- 3036,
4803
- 3407,
4804
- 3454
4805
- ], c = [...this.generalTableData.data].sort((m, v) => m.team_name.localeCompare(v.team_name)), u = c.find((m) => a.includes(m.team_id));
4806
- this.torneoLiderId = u ? u.team_id : c[0].team_id, this.generalTableData.data = c;
4807
- } else if (this.tournamentType === 1 && ((i = this.generalTableData) != null && i.groups)) {
4808
- const c = this.generalTableData.groups.reduce((v, y) => v.concat(y.data || []), []).sort((v, y) => v.team_name.localeCompare(y.team_name)), u = [
4809
- 175,
4810
- 392,
4811
- 550,
4812
- 943,
4813
- 962,
4814
- 1054,
4815
- 1402,
4816
- 1405,
4817
- 1410,
4818
- 1492,
4819
- 2098,
4820
- 2156,
4821
- 2304,
4822
- 2315,
4823
- 2340,
4824
- 2343,
4825
- 2346,
4826
- 2349,
4827
- 2730,
4828
- 2832,
4829
- 2950,
4830
- 3036,
4831
- 3407,
4832
- 3454
4833
- ], m = c.find((v) => u.includes(v.team_id));
4834
- this.torneoLiderId = m ? m.team_id : c[0].team_id, this.generalTableData.data = c;
4835
- }
4836
- } catch (n) {
4837
- console.error("Error al obtener datos de la tabla general:", n);
4838
- }
4839
- }
4840
- }
4841
- }, Cn = {
4842
- class: "data-ia-container",
4843
- ref: "container"
4844
- }, _n = { class: "data-ia-header" }, kn = { class: "tabs" }, Tn = { class: "filters" }, In = { class: "league-select" }, xn = { class: "season-select" };
4845
- function On(e, r, t, o, s, i) {
4846
- const n = $("GscSwitchComponent"), l = $("GSCTournamentSelect"), a = $("GSCSeasonSelect"), c = $("DataIAGenerales"), u = $("DataIAEquipos"), m = $("DataIAJugadores");
4847
- return f(), p("div", Cn, [
4848
- h("div", _n, [
4849
- h("h2", {
4850
- class: E(i.headerFontSize)
4851
- }, "Datos inteligencia Artificial", 2),
4852
- h("div", {
4853
- class: E(["header-controls", s.containerSizeClass])
4854
- }, [
4855
- h("div", kn, [
4856
- z(n, {
4857
- type: 2,
4858
- buttons: ["Generales", "Equipos", "Jugadores"],
4859
- "selected-option": s.optionSelected,
4860
- "disabled-options": i.disabledOptions,
4861
- "font-size": "14px",
4862
- "font-family": "Poppins-Medium",
4863
- width: i.sizeTabsMP,
4864
- borderWidth: "1px",
4865
- arrow: !1,
4866
- height: "46px",
4867
- onInput: i.changeTabsGeneral
4868
- }, null, 8, ["selected-option", "disabled-options", "width", "onInput"])
4869
- ]),
4870
- h("div", Tn, [
4871
- h("div", In, [
4872
- z(l, {
4873
- width: i.selectWidth,
4874
- "current-season-id": e.currentSeasonId,
4875
- "api-url": t.tournamentsApiUrl,
4876
- onInput: i.changeTournament
4877
- }, null, 8, ["width", "current-season-id", "api-url", "onInput"])
4878
- ]),
4879
- h("div", xn, [
4880
- z(a, {
4881
- width: i.selectWidth,
4882
- "current-season-id": e.currentSeasonId,
4883
- seasons: s.selectedTournament.seasons,
4884
- onInput: i.selectedSeason
4885
- }, null, 8, ["width", "current-season-id", "seasons", "onInput"])
4886
- ])
4887
- ])
4888
- ], 2)
4889
- ]),
4890
- h("div", {
4891
- class: E(["cards-container", s.containerSizeClass]),
4892
- style: { width: "100%" }
4893
- }, [
4894
- Q(z(c, {
4895
- "current-season-id": s.seasonActive,
4896
- onMostProductive: i.handleMostProductive
4897
- }, null, 8, ["current-season-id", "onMostProductive"]), [
4898
- [re, s.optionSelected === "Generales"]
4899
- ]),
4900
- s.torneoLiderId ? Q((f(), q(u, {
4901
- key: 0,
4902
- "current-season-id": s.seasonActive,
4903
- "torneo-lider-id": s.torneoLiderId
4904
- }, null, 8, ["current-season-id", "torneo-lider-id"])), [
4905
- [re, s.optionSelected === "Equipos"]
4906
- ]) : S("", !0),
4907
- s.mostProductivePlayerId ? Q((f(), q(m, {
4908
- key: 1,
4909
- "current-season-id": s.seasonActive,
4910
- "most-productive-player": s.mostProductivePlayerId
4911
- }, null, 8, ["current-season-id", "most-productive-player"])), [
4912
- [re, s.optionSelected === "Jugadores"]
4913
- ]) : S("", !0)
4914
- ], 2)
4915
- ], 512);
4916
- }
4917
- const Pn = /* @__PURE__ */ Te(vn, [["render", On], ["__scopeId", "data-v-64df3f2a"]]);
1
+ import { D as r } from "./index-Cb9m7Z8V.js";
4918
2
  export {
4919
- Pn as GSCDataIA
3
+ r as GSCDataIA
4920
4
  };