· 5 years ago · Dec 10, 2020, 07:40 AM
1(this["webpackJsonppaper-scroll-app"] = this["webpackJsonppaper-scroll-app"] || []).push([[0], Array(27).concat([function(e, t, a) {
2 e.exports = a.p + "static/media/TransferMarketIcon.3aebdfe7.svg"
3}
4, , , , , , , , , , , , , , , , , , , , function(e, t, a) {
5 e.exports = a.p + "static/media/AdsButton.faacd4f6.svg"
6}
7, , function(e, t, a) {
8 e.exports = a.p + "static/media/UsersGroupIcon.51a28be0.svg"
9}
10, function(e, t, a) {
11 e.exports = a.p + "static/media/DismissRoundedIcon.9a407e3a.svg"
12}
13, function(e, t, a) {
14 e.exports = a.p + "static/media/CoinPrimaryIcon.7e1a6e64.svg"
15}
16, , , , , , , function(e, t, a) {
17 e.exports = a.p + "static/media/StarOutlineIcon.e89ed136.svg"
18}
19, , , , , , , , , , , , , function(e, t, a) {
20 e.exports = a.p + "static/media/StarIcon.b4b57eff.svg"
21}
22, function(e, t, a) {
23 e.exports = a.p + "static/media/TransferIcon.d24a9d99.svg"
24}
25, function(e, t, a) {
26 e.exports = a.p + "static/media/HistoryIcon.a00f03ec.svg"
27}
28, function(e, t, a) {
29 e.exports = a.p + "static/media/ShopIcon.df3d978d.svg"
30}
31, function(e, t, a) {
32 e.exports = a.p + "static/media/QuestionNegativeIcon.ca318a58.svg"
33}
34, function(e, t, a) {
35 e.exports = a.p + "static/media/CameraIcon.d6d06a74.svg"
36}
37, function(e, t, a) {
38 e.exports = a.p + "static/media/ShopMiniIcon.09ca7594.svg"
39}
40, function(e, t, a) {
41 e.exports = a.p + "static/media/StoryMiniIcon.736a7e5a.svg"
42}
43, function(e, t, a) {
44 e.exports = a.p + "static/media/AchievementMiniIcon.9ce603b0.svg"
45}
46, function(e, t, a) {
47 e.exports = a.p + "static/media/NotifyMiniIcon.ae90a334.svg"
48}
49, function(e, t, a) {
50 e.exports = a.p + "static/media/MoneyOutlineIcon.e43f4151.svg"
51}
52, function(e, t, a) {
53 e.exports = a.p + "static/media/NotifyWhiteIcon.76dc1055.svg"
54}
55, function(e, t, a) {
56 e.exports = a.p + "static/media/NavigationIcon.90fe9b5e.svg"
57}
58, function(e, t, a) {
59 e.exports = a.p + "static/media/Onboard.ea0c60e0.png"
60}
61, function(e, t, a) {
62 e.exports = a.p + "static/media/ShareIcon.736e7bfd.svg"
63}
64, function(e, t, a) {
65 e.exports = a.p + "static/media/TransferAchievementIcon.1654d08d.svg"
66}
67, function(e, t, a) {
68 e.exports = a.p + "static/media/FavoriteYellowIcon.562f39c7.svg"
69}
70, , function(e, t, a) {
71 e.exports = a.p + "static/media/NavigationBackIcon.838d34e7.svg"
72}
73, function(e, t, a) {
74 e.exports = a.p + "static/media/SnackbarSuccessIcon.1b8bfb97.svg"
75}
76, function(e, t, a) {
77 e.exports = a.p + "static/media/SnackbarErrorIcon.6c07687d.svg"
78}
79, function(e, t, a) {
80 e.exports = a.p + "static/media/SnackbarStarIcon.df289b1a.svg"
81}
82, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , function(e, t, a) {
83 e.exports = a(234)
84}
85, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , function(e, t, a) {}
86, function(e, t, a) {}
87, function(e, t, a) {}
88, , , , , , , , , , function(e, t, a) {}
89, function(e, t, a) {}
90, function(e, t, a) {}
91, function(e, t, a) {}
92, function(e, t, a) {}
93, function(e, t, a) {}
94, function(e, t, a) {}
95, function(e, t, a) {}
96, , function(e, t, a) {}
97, function(e, t, a) {}
98, function(e, t, a) {}
99, function(e, t, a) {}
100, function(e, t, a) {}
101, function(e, t, a) {}
102, function(e, t, a) {}
103, function(e, t, a) {}
104, function(e, t, a) {}
105, function(e, t, a) {}
106, function(e, t, a) {}
107, function(e, t, a) {}
108, function(e, t, a) {}
109, function(e, t, a) {}
110, function(e, t, a) {}
111, function(e, t, a) {}
112, function(e, t, a) {}
113, function(e, t, a) {}
114, function(e, t, a) {}
115, function(e, t, a) {}
116, function(e, t, a) {}
117, function(e, t, a) {}
118, function(e, t, a) {}
119, function(e, t, a) {}
120, , , function(e, t, a) {
121 "use strict";
122 a.r(t),
123 a.d(t, "store", (function() {
124 return tn
125 }
126 ));
127 var n = a(0)
128 , r = a.n(n)
129 , i = a(37)
130 , o = a.n(i)
131 , s = a(22)
132 , c = a(9)
133 , l = a(4)
134 , m = a(5)
135 , d = a(7)
136 , u = a(6)
137 , p = a(8)
138 , _ = a(11)
139 , v = a.n(_)
140 , f = Object({
141 NODE_ENV: "production",
142 PUBLIC_URL: "",
143 WDS_SOCKET_HOST: void 0,
144 WDS_SOCKET_PATH: void 0,
145 WDS_SOCKET_PORT: void 0
146 })
147 , h = f.REACT_APP_API_DOMAIN
148 , b = "production" === f.NODE_ENV ? "production" : "development"
149 , E = {
150 api_domain: h || "paper-scroll.ru",
151 env: b,
152 isDev: "development" === b,
153 isProd: "production" === b
154 }
155 , g = a(30)
156 , y = a.n(g)
157 , k = (a(184),
158 a(10))
159 , T = a.n(k)
160 , N = a(41)
161 , w = a(236)
162 , j = function() {
163 function e() {
164 Object(l.a)(this, e)
165 }
166 return Object(m.a)(e, null, [{
167 key: "sendEvent",
168 value: function(e) {
169 var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}
170 , a = function a() {
171 window.socket.readyState === WebSocket.OPEN ? window.socket.sendEvent(e, t) : setTimeout((function() {
172 return a()
173 }
174 ), 500)
175 };
176 a()
177 }
178 }, {
179 key: "sendBuffer",
180 value: function() {
181 window.socket.sendBuffer(arguments)
182 }
183 }]),
184 e
185 }()
186 , A = function() {
187 function e() {
188 Object(l.a)(this, e)
189 }
190 return Object(m.a)(e, null, [{
191 key: "sleep",
192 value: function(e) {
193 return new Promise((function(t) {
194 return setTimeout(t, e)
195 }
196 ))
197 }
198 }, {
199 key: "round",
200 value: function(e) {
201 return (Math.round(100 * e) / 100).toFixed(2)
202 }
203 }, {
204 key: "rand",
205 value: function(e, t) {
206 var a = e - .5 + Math.random() * (t - e + 1);
207 return Math.round(a)
208 }
209 }, {
210 key: "randItem",
211 value: function(t) {
212 return t[e.rand(0, t.length - 1)]
213 }
214 }, {
215 key: "randFloat",
216 value: function(e, t) {
217 t *= 100;
218 var a = (e *= 100) - .5 + Math.random() * (t - e + 1);
219 return Math.round(a) / 100
220 }
221 }, {
222 key: "randEvent",
223 value: function(t) {
224 return e.rand(0, 100) < t
225 }
226 }, {
227 key: "declOfNum",
228 value: function(e, t) {
229 return t[e % 100 > 4 && e % 100 < 20 ? 2 : [2, 0, 1, 1, 1, 2][e % 10 < 5 ? e % 10 : 5]]
230 }
231 }, {
232 key: "formatNumber",
233 value: function(e) {
234 return parseFloat(e).toLocaleString("ru-RU", {
235 maximumFractionDigits: 3
236 })
237 }
238 }, {
239 key: "formatMainBalance",
240 value: function(t) {
241 var a = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 3;
242 return e.roundFloat(t, !0).toLocaleString("ru-RU", {
243 maximumFractionDigits: a,
244 minimumFractionDigits: a
245 })
246 }
247 }, {
248 key: "escapeNewLineToBeak",
249 value: function(e) {
250 return e.split("\n").map((function(e, t) {
251 return 0 === t ? e : [r.a.createElement("br", {
252 key: t
253 }), e]
254 }
255 ))
256 }
257 }, {
258 key: "roundInt",
259 value: function(e) {
260 return isNaN(e) || "" === e ? 0 : Math.floor(e)
261 }
262 }, {
263 key: "roundFloat",
264 value: function(e) {
265 var t = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1];
266 return t ? parseFloat((Math.round(1e4 * e) / 1e4).toFixed(3)) : parseFloat((Math.round(100 * e) / 100).toFixed(2))
267 }
268 }, {
269 key: "shuffleArray",
270 value: function(e) {
271 for (var t = e.length - 1; t > 0; t--) {
272 var a = Math.floor(Math.random() * (t + 1))
273 , n = [e[a], e[t]];
274 e[t] = n[0],
275 e[a] = n[1]
276 }
277 return e
278 }
279 }, {
280 key: "openLink",
281 value: function(e) {
282 var t = document.createElement("a");
283 t.setAttribute("href", e),
284 t.setAttribute("rel", "noopener noreferrer"),
285 t.setAttribute("target", "_blank"),
286 t.dispatchEvent(new MouseEvent("click",{
287 view: window,
288 bubbles: !0,
289 cancelable: !0
290 }))
291 }
292 }, {
293 key: "openVkCoinLink",
294 value: function(t, a, n) {
295 e.openLink("https://vk.com/coin#x".concat(t, "_").concat(1e3 * a, "_").concat(n, "_1_").concat(e.rand(1, 1e3)))
296 }
297 }, {
298 key: "getImageLink",
299 value: function(e) {
300 var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "png";
301 return "https://".concat(E.api_domain, "/static/images/").concat(e, ".").concat(t)
302 }
303 }, {
304 key: "getEmojiLink",
305 value: function(e, t) {
306 return "https://".concat(E.api_domain, "/static/emojis/").concat(e, "_").concat(t, ".png")
307 }
308 }, {
309 key: "getAchievementEmojiLink",
310 value: function(e, t) {
311 return "https://".concat(E.api_domain, "/static/achievements/").concat(e, "_").concat(t, ".png")
312 }
313 }, {
314 key: "getEmojiPic",
315 value: function(e, t) {
316 return r.a.createElement("img", {
317 src: "https://".concat(E.api_domain, "/static/emojis/").concat(e, "_").concat(t, ".png"),
318 alt: ""
319 })
320 }
321 }, {
322 key: "scrollToBottom",
323 value: function() {
324 var e = document.body.firstElementChild.scrollHeight - document.body.firstElementChild.clientHeight;
325 document.body.firstElementChild.scrollTop = e > 0 ? e : 0
326 }
327 }, {
328 key: "generateUuid",
329 value: function() {
330 return Object(w.a)()
331 }
332 }, {
333 key: "getLocalTime",
334 value: function(e) {
335 return new Date(1e3 * e).toLocaleString("default", {
336 hour12: !1,
337 day: "2-digit",
338 month: "long",
339 hour: "2-digit",
340 minute: "2-digit"
341 })
342 }
343 }, {
344 key: "padNumber",
345 value: function(e, t) {
346 for (var a = e.toString(); a.length < t; )
347 a = "0" + a;
348 return a
349 }
350 }, {
351 key: "arrayColumns",
352 value: function(e, t) {
353 var a = [];
354 return e.forEach((function(e) {
355 a.push(e[t])
356 }
357 )),
358 a
359 }
360 }, {
361 key: "findUser",
362 value: function(e, t) {
363 var a = e.find((function(e) {
364 return e.user_id === t
365 }
366 ));
367 return a || {}
368 }
369 }, {
370 key: "findProfile",
371 value: function(e, t) {
372 var a = e.find((function(e) {
373 return e.id === t
374 }
375 ));
376 return a || {}
377 }
378 }, {
379 key: "loadUserFriends",
380 value: function() {
381 return v.a.api("friends.get", {
382 count: 1e3,
383 fields: "photo_200,photo_100,photo_50,domain,screen_name,first_name_dat,first_name_gen"
384 }, "friends").then((function(e) {
385 return e.response && e.response.items ? e.response.items : []
386 }
387 ))
388 }
389 }, {
390 key: "requestProfilesToCache",
391 value: function(e) {
392 j.sendEvent("profiles:proxy", {
393 user_ids: e
394 })
395 }
396 }, {
397 key: "requestUsersToCache",
398 value: function(e) {
399 j.sendEvent("users:info", {
400 user_ids: e
401 })
402 }
403 }, {
404 key: "requestUsersToCacheIfNecessary",
405 value: function(e, t) {
406 var a, n = [], r = e.map((function(e) {
407 return e.user_id
408 }
409 )), i = Object(N.a)(t);
410 try {
411 for (i.s(); !(a = i.n()).done; ) {
412 var o = a.value;
413 r.includes(o) || n.push(o)
414 }
415 } catch (s) {
416 i.e(s)
417 } finally {
418 i.f()
419 }
420 n.length > 0 && j.sendEvent("users:info", {
421 user_ids: n
422 })
423 }
424 }, {
425 key: "searchUsers",
426 value: function(e) {
427 var t = {
428 q: e,
429 count: 300,
430 fields: "photo_200,photo_100,photo_50,domain,screen_name,first_name_dat,first_name_gen"
431 };
432 return v.a.api("users.search", t).then((function(e) {
433 return e.response && e.response.items ? e.response.items : []
434 }
435 ))
436 }
437 }]),
438 e
439 }();
440 A.enableTouchMove = function() {
441 document.body.removeEventListener("touchstart", A.touchEventListener),
442 document.body.removeEventListener("touchmove", A.touchEventListener),
443 document.body.removeEventListener("touchend", A.touchEventListener)
444 }
445 ,
446 A.disableTouchMove = function() {
447 document.body.addEventListener("touchstart", A.touchEventListener, {
448 passive: !1
449 }),
450 document.body.addEventListener("touchmove", A.touchEventListener, {
451 passive: !1
452 }),
453 document.body.addEventListener("touchend", A.touchEventListener, {
454 passive: !1
455 })
456 }
457 ,
458 A.touchEventListener = function(e) {
459 e.preventDefault()
460 }
461 ,
462 A.getCustomizableColors = function() {
463 return [{
464 color_id: 0,
465 color: "#00b77c"
466 }, {
467 color_id: 1,
468 color: "#00b77c"
469 }, {
470 color_id: 2,
471 color: "#ffa500"
472 }, {
473 color_id: 3,
474 color: "#ff5d5d"
475 }, {
476 color_id: 4,
477 color: "#ff6512"
478 }, {
479 color_id: 5,
480 color: "#9f34d5"
481 }, {
482 color_id: 6,
483 color: "#3752d5"
484 }, {
485 color_id: 7,
486 color: "#6780ff"
487 }, {
488 color_id: 8,
489 color: "#d863ff"
490 }]
491 }
492 ,
493 A.getColorValue = function(e) {
494 var t = A.getCustomizableColors();
495 return (t.find((function(t) {
496 return t.color_id === e
497 }
498 )) || {}).color || t[0].color
499 }
500 ,
501 A.getCustomizableEmojis = function() {
502 return [{
503 emoji_id: 0,
504 emoji: "cross_mark"
505 }, {
506 emoji_id: 1,
507 emoji: "camping"
508 }, {
509 emoji_id: 2,
510 emoji: "alien_monster"
511 }, {
512 emoji_id: 3,
513 emoji: "moon_with_face"
514 }, {
515 emoji_id: 4,
516 emoji: "face_with_monocle"
517 }, {
518 emoji_id: 5,
519 emoji: "mask"
520 }, {
521 emoji_id: 6,
522 emoji: "raised_fist"
523 }, {
524 emoji_id: 7,
525 emoji: "raised_hand_with_part"
526 }, {
527 emoji_id: 8,
528 emoji: "writing_hand"
529 }, {
530 emoji_id: 9,
531 emoji: "waving_hand_sign"
532 }, {
533 emoji_id: 10,
534 emoji: "victory_hand"
535 }]
536 }
537 ,
538 A.getEmojiValue = function(e) {
539 var t = A.getCustomizableEmojis();
540 return (t.find((function(t) {
541 return t.emoji_id === e
542 }
543 )) || {}).emoji || t[0].emoji
544 }
545 ,
546 A.isFuckingIOS = function() {
547 var e = v.a.getStartParams().platform;
548 return ["mobile_iphone", "mobile_iphone_messenger"].includes(e)
549 }
550 ;
551 var S = A
552 , P = (a(187),
553 a(13))
554 , L = a.n(P)
555 , O = (a(188),
556 function(e) {
557 Object(d.a)(a, e);
558 var t = Object(u.a)(a);
559 function a() {
560 return Object(l.a)(this, a),
561 t.apply(this, arguments)
562 }
563 return Object(m.a)(a, [{
564 key: "render",
565 value: function() {
566 var e = this.props
567 , t = ["Button"];
568 return e.color && t.push("Button__color-" + e.color),
569 e.mini && t.push("Button--mini"),
570 e.stretched && t.push("Button--stretched"),
571 r.a.createElement("button", {
572 disabled: e.disabled,
573 type: e.type,
574 onClick: e.onClick,
575 className: L()(t),
576 children: e.children
577 })
578 }
579 }]),
580 a
581 }(r.a.Component))
582 , C = (a(189),
583 a(14))
584 , I = function(e) {
585 Object(d.a)(a, e);
586 var t = Object(u.a)(a);
587 function a(e) {
588 var n;
589 return Object(l.a)(this, a),
590 (n = t.call(this, e)).onMove = function(e) {
591 if (S.disableTouchMove(),
592 e.shiftY < -55 || e.shiftY > 180)
593 return 0;
594 n.setState({
595 verticalScroll: e.shiftY
596 })
597 }
598 ,
599 n.onStart = function() {
600 S.disableTouchMove(),
601 n.setState({
602 isActive: !0
603 })
604 }
605 ,
606 n.onEnd = function(e) {
607 if (S.enableTouchMove(),
608 n.setState({
609 verticalScroll: 0,
610 isActive: !1
611 }),
612 !e.shiftX || !e.shiftY)
613 return 0;
614 n.props.onScroll && e.shiftY > 70 && n.props.onScroll(e.shiftX, e.shiftY, e.startX, e.startY, (new Date).getTime() - e.startT.getTime())
615 }
616 ,
617 n.state = {
618 isActive: !1,
619 verticalScroll: 0
620 },
621 n
622 }
623 return Object(m.a)(a, [{
624 key: "renderSvg",
625 value: function() {
626 var e = parseInt(this.state.verticalScroll)
627 , t = "M.5.5v".concat(e < 65 ? 173 + e : e + 31)
628 , a = "M.5.5v".concat(e < 65 ? 181 + e : e + 39)
629 , n = {
630 transform: "translate(95.5px, ".concat(125 + e, "px)")
631 }
632 , i = function(e) {
633 var t = {
634 0: 61,
635 1: 62,
636 2: 63,
637 3: 64,
638 4: 65,
639 5: 66,
640 6: 67,
641 7: 68,
642 8: 69,
643 9: 70,
644 10: 71,
645 11: 72,
646 12: 73,
647 13: 74,
648 14: 75,
649 15: 76,
650 16: 77,
651 17: 77.5,
652 18: 78,
653 19: 78,
654 20: 79,
655 21: 79,
656 22: 80,
657 23: 80.3,
658 24: 80.6,
659 25: 81,
660 26: 81.5,
661 27: 82,
662 28: 82.5,
663 29: 83,
664 30: 83.5,
665 31: 84,
666 32: 84,
667 33: 85,
668 34: 85,
669 35: 86,
670 36: 86,
671 37: 87,
672 38: 87,
673 39: 88,
674 40: 88,
675 41: 89,
676 42: 89.3,
677 43: 89.6,
678 44: 90,
679 45: 90.3,
680 46: 90.6,
681 47: 91,
682 48: 91.3,
683 49: 91.6,
684 50: 92,
685 51: 92,
686 52: 92,
687 53: 92,
688 54: 92,
689 55: 92.3,
690 56: 92.6,
691 57: 92.6,
692 58: 93,
693 59: 93,
694 60: 93.3,
695 61: 93.3,
696 62: 93.6,
697 63: 93.6,
698 64: 94,
699 65: 94,
700 66: 94.3,
701 67: 94.3,
702 68: 94.6,
703 69: 94.6,
704 70: 95,
705 71: 95,
706 72: 95.3,
707 73: 95.3,
708 74: 95.6,
709 75: 95.6,
710 76: 95.6,
711 77: 95.6,
712 78: 96,
713 79: 96,
714 80: 96,
715 81: 96,
716 82: 96,
717 83: 96
718 }
719 , a = t[e -= 15];
720 return e > 83 && (a = t[83]),
721 {
722 opacity: e > 1 ? "1" : "0",
723 transform: "translate(".concat(a, "px, ").concat(e, "px)")
724 }
725 }(e)
726 , o = "M.5.5h".concat(160 + (e - 15 > 26 ? 5 : 0))
727 , s = ["M0 0.5L10.6227 0L20.7485 0.466667L30.8742 0L41 0.466667L51.1258 0L61.2515 0.466667L71.3773 0L81.503 0.466667L91.6288 0L101.755 0.466667L111.88 0L122.006 0.466667L132.132 0L142.258 0.466667L152.383 0L164 0.5", "M0 1L10.6227 0L20.7485 0.933333L30.8742 0L41 0.933333L51.1258 0L61.2515 0.933333L71.3773 0L81.503 0.933333L91.6288 0L101.755 0.933333L111.88 0L122.006 0.933333L132.132 0L142.258 0.933333L152.383 0L164 1", "M0 1.5L10.6227 0L20.7485 1.4L30.8742 0L41 1.4L51.1258 0L61.2515 1.4L71.3773 0L81.503 1.4L91.6288 0L101.755 1.4L111.88 0L122.006 1.4L132.132 0L142.258 1.4L152.383 0L164 1.5", "M0 2L10.6227 0L20.7485 1.86667L30.8742 0L41 1.86667L51.1258 0L61.2515 1.86667L71.3773 0L81.503 1.86667L91.6288 0L101.755 1.86667L111.88 0L122.006 1.86667L132.132 0L142.258 1.86667L152.383 0L164 2", "M0 2.5L10.6227 0L20.7485 2.33333L30.8742 0L41 2.33333L51.1258 0L61.2515 2.33333L71.3773 0L81.503 2.33333L91.6288 0L101.755 2.33333L111.88 0L122.006 2.33333L132.132 0L142.258 2.33333L152.383 0L164 2.5", "M0 3L10.6227 0L20.7485 2.8L30.8742 0L41 2.8L51.1258 0L61.2515 2.8L71.3773 0L81.503 2.8L91.6288 0L101.755 2.8L111.88 0L122.006 2.8L132.132 0L142.258 2.8L152.383 0L164 3", "M0 3.5L10.6227 0L20.7485 3.26667L30.8742 0L41 3.26667L51.1258 0L61.2515 3.26667L71.3773 0L81.503 3.26667L91.6288 0L101.755 3.26667L111.88 0L122.006 3.26667L132.132 0L142.258 3.26667L152.383 0L164 3.5", "M0 4L10.6227 0L20.7485 3.73333L30.8742 0L41 3.73333L51.1258 0L61.2515 3.73333L71.3773 0L81.503 3.73333L91.6288 0L101.755 3.73333L111.88 0L122.006 3.73333L132.132 0L142.258 3.73333L152.383 0L164 4", "M0 4.5L10.6227 0L20.7485 4.2L30.8742 0L41 4.2L51.1258 0L61.2515 4.2L71.3773 0L81.503 4.2L91.6288 0L101.755 4.2L111.88 0L122.006 4.2L132.132 0L142.258 4.2L152.383 0L164 4.5", "M0 5L10.6227 0L20.7485 4.66667L30.8742 0L41 4.66667L51.1258 0L61.2515 4.66667L71.3773 0L81.503 4.66667L91.6288 0L101.755 4.66667L111.88 0L122.006 4.66667L132.132 0L142.258 4.66667L152.383 0L164 5", "M0 5.5L10.6227 0L20.7485 5.13333L30.8742 0L41 5.13333L51.1258 0L61.2515 5.13333L71.3773 0L81.503 5.13333L91.6288 0L101.755 5.13333L111.88 0L122.006 5.13333L132.132 0L142.258 5.13333L152.383 0L164 5.5", "M0 6L10.6227 0L20.7485 5.6L30.8742 0L41 5.6L51.1258 0L61.2515 5.6L71.3773 0L81.503 5.6L91.6288 0L101.755 5.6L111.88 0L122.006 5.6L132.132 0L142.258 5.6L152.383 0L164 6", "M0 6.5L10.6227 0L20.7485 6.06667L30.8742 0L41 6.06667L51.1258 0L61.2515 6.06667L71.3773 0L81.503 6.06667L91.6288 0L101.755 6.06667L111.88 0L122.006 6.06667L132.132 0L142.258 6.06667L152.383 0L164 6.5", "M0 7L10.6227 0L20.7485 6.53333L30.8742 0L41 6.53333L51.1258 0L61.2515 6.53333L71.3773 0L81.503 6.53333L91.6288 0L101.755 6.53333L111.88 0L122.006 6.53333L132.132 0L142.258 6.53333L152.383 0L164 7"]
728 , c = function(e) {
729 return e > 13 && (e = 13),
730 e < 0 && alert(e),
731 s[e]
732 }
733 , l = function(e) {
734 return 52 === e ? 1 : 53 === e ? 2 : 3
735 }
736 , m = e < 65 ? 0 : 1.2 * (e - 65)
737 , d = {
738 transform: "translate(95px, ".concat(134 + e + m, "px)")
739 }
740 , u = {
741 transform: "translate(260px, ".concat(134 + e + m, "px)")
742 }
743 , p = "M.5.5v".concat(140)
744 , _ = "M.5.5v".concat(140)
745 , v = {
746 transform: "translate(96px, ".concat(127 + e + m, "px)")
747 }
748 , f = {
749 transform: "translate(95.5px, ".concat(127 + e + m + 140, "px)")
750 }
751 , h = 262
752 , b = 390
753 , E = 0;
754 return window.innerHeight <= 810 && (h = 250,
755 b = 340),
756 window.innerHeight <= 740 && (h = 250,
757 b = 300,
758 E = 20),
759 window.innerHeight <= 700 && (h = 250,
760 b = 270,
761 E = 25),
762 window.innerHeight <= 570 && (h = 210,
763 b = 210,
764 E = 30),
765 window.innerHeight <= 320 && (h = 190,
766 b = 195,
767 E = 35),
768 r.a.createElement("svg", {
769 id: "PaperRoll",
770 xmlns: "http://www.w3.org/2000/svg",
771 width: h,
772 height: b,
773 viewBox: "0 0 262.573 ".concat(350 - E)
774 }, r.a.createElement("linearGradient", {
775 id: "linear-gradient"
776 }, r.a.createElement("stop", {
777 offset: "50%",
778 stopColor: "rgb(242 250 255)"
779 }), r.a.createElement("stop", {
780 offset: "100%",
781 stopColor: "rgb(225 232 237)"
782 })), r.a.createElement("g", {
783 id: "BehindSide",
784 transform: "translate(49 119)",
785 fill: "url(#linear-gradient)",
786 stroke: "#979797",
787 strokeMiterlimit: "10",
788 strokeWidth: "1"
789 }, r.a.createElement("rect", {
790 id: "BehindSide-Background",
791 width: "47",
792 height: "73",
793 stroke: "none"
794 })), r.a.createElement("g", {
795 id: "SideOuterCircle",
796 fill: "#f2faff",
797 stroke: "#788b9c",
798 strokeMiterlimit: "10",
799 strokeWidth: "3"
800 }, r.a.createElement("ellipse", {
801 id: "SideOuterCircle-Background",
802 cx: "48.5",
803 cy: "96.5",
804 rx: "48.5",
805 ry: "96.5",
806 stroke: "none"
807 }), r.a.createElement("ellipse", {
808 id: "SideOuterCircle-Border",
809 cx: "48.5",
810 cy: "96.5",
811 rx: "47",
812 ry: "95",
813 fill: "none"
814 })), r.a.createElement("g", {
815 id: "SideInnerCircle",
816 transform: "translate(36 65)",
817 fill: "#b0c1d4",
818 stroke: "#788b9c",
819 strokeMiterlimit: "10",
820 strokeWidth: "3"
821 }, r.a.createElement("ellipse", {
822 id: "SideInnerCircle-Background",
823 cx: "13.5",
824 cy: "31",
825 rx: "13.5",
826 ry: "31",
827 stroke: "none"
828 }), r.a.createElement("ellipse", {
829 id: "SideInnerCircle-Border",
830 cx: "13.5",
831 cy: "31",
832 rx: "12",
833 ry: "29.5",
834 fill: "none"
835 })), r.a.createElement("path", {
836 id: "RollRightBorderRadius",
837 d: "M57,95C57,26.31,20.511,0,0,0",
838 transform: "translate(203.5 1.5)",
839 fill: "none",
840 stroke: "#788b9c",
841 strokeLinecap: "square",
842 strokeMiterlimit: "10",
843 strokeWidth: "3"
844 }), r.a.createElement("path", {
845 id: "RollBackgroundBorder",
846 d: "M0,1H46",
847 transform: "translate(49.5 190.5)",
848 fill: "none",
849 stroke: "#788b9c",
850 strokeLinecap: "square",
851 strokeMiterlimit: "10",
852 strokeWidth: "3"
853 }), r.a.createElement("path", {
854 id: "RollTopBorder",
855 key: "RollTopBorder",
856 d: "M.5.5h154",
857 transform: "translate(49 1)",
858 fill: "none",
859 stroke: "#788b9c",
860 strokeLinecap: "square",
861 strokeMiterlimit: "10",
862 strokeWidth: "3"
863 }), r.a.createElement("path", {
864 id: e >= 52 ? "ChunkTopBorder" : "RollBottomBorder",
865 key: v >= 52 ? "ChunkTopBorder" : "RollBottomBorder",
866 style: i,
867 d: o,
868 stroke: "#788b9c",
869 fill: "none",
870 strokeLinecap: "round",
871 strokeLinejoin: "round",
872 strokeMiterlimit: "10",
873 strokeWidth: "3",
874 strokeDasharray: "1 9"
875 }), r.a.createElement("path", {
876 id: "RollLeftBorder",
877 key: "RollLeftBorder",
878 d: t,
879 transform: "translate(95 100)",
880 fill: "none",
881 stroke: "#788b9c",
882 strokeLinecap: "round",
883 strokeLinejoin: "round",
884 strokeMiterlimit: "10",
885 strokeWidth: "3"
886 }), r.a.createElement("path", {
887 id: "RollRightBorder",
888 key: "RollRightBorder",
889 d: a,
890 transform: "translate(260 93)",
891 fill: "none",
892 stroke: "#788b9c",
893 strokeLinecap: "round",
894 strokeLinejoin: "round",
895 strokeMiterlimit: "10",
896 strokeWidth: "3"
897 }), e >= 65 && r.a.createElement("path", {
898 id: "ChunkLeftBorder",
899 key: "ChunkLeftBorder",
900 d: p,
901 style: d,
902 fill: "none",
903 stroke: "#788b9c",
904 strokeLinecap: "round",
905 strokeLinejoin: "round",
906 strokeMiterlimit: "10",
907 strokeWidth: "3"
908 }), e >= 65 && r.a.createElement("path", {
909 id: "ChunkRightBorder",
910 key: "ChunkRightBorder",
911 d: _,
912 style: u,
913 fill: "none",
914 stroke: "#788b9c",
915 strokeLinecap: "round",
916 strokeLinejoin: "round",
917 strokeMiterlimit: "10",
918 strokeWidth: "3"
919 }), e >= 65 && r.a.createElement("path", {
920 id: "ChunkBottomBorder",
921 key: "ChunkBottomBorder",
922 style: n,
923 d: c(e - 52),
924 fill: "none",
925 stroke: "#788b9c",
926 strokeLinecap: "round",
927 strokeLinejoin: "round",
928 strokeMiterlimit: "10",
929 strokeWidth: l(e)
930 }), e <= 52 && r.a.createElement("path", {
931 id: "ChunkTopBorder",
932 key: "ChunkTopBorder",
933 style: v,
934 stroke: "#788b9c",
935 d: "M.5.5h163",
936 fill: "none",
937 strokeLinecap: "round",
938 strokeLinejoin: "round",
939 strokeMiterlimit: "10",
940 strokeWidth: "3",
941 strokeDasharray: "1 9"
942 }), e > 52 && r.a.createElement("path", {
943 id: "ChunkTopBorder2",
944 key: "ChunkTopBorder2",
945 style: v,
946 d: c(e - 52),
947 fill: "none",
948 stroke: "#788b9c",
949 strokeLinecap: "round",
950 strokeLinejoin: "round",
951 strokeMiterlimit: "10",
952 strokeWidth: l(e)
953 }), e < 65 ? r.a.createElement("path", {
954 id: "ChunkBottomBorder",
955 key: "ChunkBottomBorder",
956 style: f,
957 d: "M0,7.5,10.688,0,20.875,7,31.063,0,41.25,7,51.438,0,61.625,7,71.813,0,82,7,92.188,0l10.188,7,10.188-7L122.75,7l10.188-7,10.188,7,10.188-7L165,7.5",
958 fill: "none",
959 stroke: "#788b9c",
960 strokeLinecap: "round",
961 strokeLinejoin: "round",
962 strokeMiterlimit: "10",
963 strokeWidth: "3"
964 }) : r.a.createElement("path", {
965 id: "ChunkBottomBorder2",
966 key: "ChunkBottomBorder2",
967 style: f,
968 d: "M0,7.5,10.688,0,20.875,7,31.063,0,41.25,7,51.438,0,61.625,7,71.813,0,82,7,92.188,0l10.188,7,10.188-7L122.75,7l10.188-7,10.188,7,10.188-7L165,7.5",
969 fill: "none",
970 stroke: "#788b9c",
971 strokeLinecap: "round",
972 strokeLinejoin: "round",
973 strokeMiterlimit: "10",
974 strokeWidth: "3"
975 }))
976 }
977 }, {
978 key: "render",
979 value: function() {
980 var e = L()({
981 PaperScroll: !0,
982 "PaperScroll--active": this.state.isActive
983 });
984 return r.a.createElement("div", {
985 className: e
986 }, r.a.createElement(C.p, {
987 onMove: this.onMove,
988 onEnd: this.onEnd,
989 onStart: this.onStart
990 }, this.renderSvg()))
991 }
992 }]),
993 a
994 }(r.a.Component)
995 , M = Object(p.c)((function(e) {
996 return {
997 app: e.app
998 }
999 }
1000 ), {})(I)
1001 , W = a(71)
1002 , D = a.n(W)
1003 , B = a(72)
1004 , R = a.n(B)
1005 , x = a(73)
1006 , V = a.n(x)
1007 , U = a(74)
1008 , F = a.n(U)
1009 , H = a(75)
1010 , G = a.n(H)
1011 , K = a(47)
1012 , z = a.n(K)
1013 , q = function(e) {
1014 return {
1015 type: "SET_ACTIVE_TAB",
1016 tab: e
1017 }
1018 }
1019 , Y = function(e, t) {
1020 return {
1021 type: "SET_ACTIVE_PANEL",
1022 tab: e,
1023 panel: t
1024 }
1025 }
1026 , J = function(e) {
1027 return {
1028 type: "SET_USER_FRIENDS",
1029 data: e
1030 }
1031 }
1032 , X = function(e) {
1033 return {
1034 type: "ADD_CACHE_PROFILES",
1035 data: e
1036 }
1037 }
1038 , Q = function(e, t) {
1039 var a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "\u041e\u043a\u0435\u0439"
1040 , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : "primary"
1041 , r = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4] : null;
1042 return {
1043 type: "ADD_TOAST",
1044 title: e,
1045 message: t,
1046 button: a,
1047 category: n,
1048 buttonCallback: r
1049 }
1050 }
1051 , Z = function(e, t) {
1052 var a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null
1053 , n = arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : null;
1054 return {
1055 type: "SET_SNACKBAR",
1056 category: e,
1057 message: t,
1058 button: a,
1059 onClick: n
1060 }
1061 }
1062 , $ = function() {
1063 return {
1064 type: "DELETE_SNACKBAR"
1065 }
1066 }
1067 , ee = function(e) {
1068 return {
1069 type: "SET_ACTIVE_MODAL",
1070 id: e
1071 }
1072 }
1073 , te = function(e, t) {
1074 return {
1075 type: "SET_ACTIVE_WINDOW",
1076 id: e,
1077 params: t
1078 }
1079 }
1080 , ae = function(e, t, a) {
1081 return {
1082 type: "SET_WINDOW_PARAM",
1083 id: e,
1084 param: t,
1085 value: a
1086 }
1087 }
1088 , ne = function() {
1089 return {
1090 type: "HIDE_ACTIVE_WINDOW"
1091 }
1092 }
1093 , re = function(e) {
1094 Object(d.a)(a, e);
1095 var t = Object(u.a)(a);
1096 function a(e) {
1097 var i;
1098 return Object(l.a)(this, a),
1099 (i = t.call(this, e)).onScroll = function(e, t, a, n, r) {
1100 if (j.sendBuffer(2, S.roundInt(e), S.roundInt(t), S.roundInt(a), S.roundInt(n), r),
1101 i.props.tickUserScroll(),
1102 "mobile_iphone" === v.a.getStartParams().platform && v.a.send("VKWebAppTapticSelectionChanged", {}).then((function() {}
1103 )).catch((function() {}
1104 )),
1105 !i.props.user.object.is_extended_animation_disabled) {
1106 var o = S.generateUuid();
1107 i.bgElements.push({
1108 id: o,
1109 x: S.rand(1, window.innerWidth - 50),
1110 y: S.rand(80, 250)
1111 }),
1112 i.forceUpdate(),
1113 setTimeout((function() {
1114 var e = i.bgElements.findIndex((function(e) {
1115 return e.id === o
1116 }
1117 ));
1118 e > -1 && i.bgElements.splice(e, 1),
1119 i.forceUpdate()
1120 }
1121 ), 2e3)
1122 }
1123 }
1124 ,
1125 i.setActivePanel = function(e) {
1126 i.props.setActivePanel("main", e)
1127 }
1128 ,
1129 i.setActiveModal = function(e) {
1130 i.props.setActiveModal(e)
1131 }
1132 ,
1133 i.onAdsButtonClick = function() {
1134 v.a.supports("VKWebAppShowNativeAds") ? v.a.send("VKWebAppShowNativeAds", {
1135 ad_format: "reward"
1136 }).then((function(e) {
1137 e.result ? (j.sendEvent("ad:watch", {}),
1138 T()("reachGoal", "ad:watch")) : (console.log("result", e),
1139 i.props.setSnackbar("error", "\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0443 \u043d\u0430\u0441 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438\u0441\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0434\u043b\u044f \u0432\u0430\u0441 \u0440\u043e\u043b\u0438\u043a\u0438, \u0437\u0430\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u043f\u043e\u0437\u0436\u0435!"))
1140 }
1141 )).catch((function(e) {
1142 console.error("error", e)
1143 }
1144 )) : i.props.setSnackbar("error", "\u0423\u043f\u0441, \u0432\u0430\u0448 \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0440\u0435\u043a\u043b\u0430\u043c\u044b :(")
1145 }
1146 ,
1147 i.onInfectedToastClick = function() {
1148 i.setState({
1149 infectedToastClosed: !0
1150 });
1151 var e = i.props.items.items
1152 , t = 0;
1153 e.forEach((function(e) {
1154 1 === e.type_id && (t = e.current_count)
1155 }
1156 ));
1157 var a, o, s;
1158 0 === t ? (a = r.a.createElement("span", {
1159 style: {
1160 fontSize: "16px"
1161 }
1162 }, "\u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u0437\u0430\u0440\u0430\u0436\u0435\u043d\u043d\u043e\u043c\u0443 \u0438\u0433\u0440\u043e\u043a\u0443 \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u043e\u0442 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0448\u0430\u043d\u0441 \u0437\u0430\u0431\u043e\u043b\u0435\u0442\u044c. ", r.a.createElement("br", null), "\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0430\u0441 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0437\u0430\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f 5% \u043e\u0442 \u043e\u0431\u0449\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438\u0433\u0440\u043e\u043a\u043e\u0432. ", r.a.createElement("br", null), r.a.createElement("br", null), "\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0435\u0441\u0442\u0430 \u043d\u0430 \u0432\u0438\u0440\u0443\u0441. \u041a\u0443\u043f\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u041c\u0430\u0433\u0430\u0437\u0438\u043d\u0435 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0439\u0442\u0435\u0441\u044c."),
1163 o = r.a.createElement(n.Fragment, null, "\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u041c\u0430\u0433\u0430\u0437\u0438\u043d"),
1164 s = function() {
1165 setTimeout((function() {
1166 i.props.setActiveTab("information"),
1167 i.props.setActivePanel("information", "shop")
1168 }
1169 ), 200)
1170 }
1171 ) : (a = r.a.createElement("span", {
1172 style: {
1173 fontSize: "16px"
1174 }
1175 }, "\u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u0437\u0430\u0440\u0430\u0436\u0435\u043d\u043d\u043e\u043c\u0443 \u0438\u0433\u0440\u043e\u043a\u0443 \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u043e\u0442 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0448\u0430\u043d\u0441 \u0437\u0430\u0431\u043e\u043b\u0435\u0442\u044c. ", r.a.createElement("br", null), "\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0430\u0441 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0437\u0430\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f 5% \u043e\u0442 \u043e\u0431\u0449\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438\u0433\u0440\u043e\u043a\u043e\u0432. ", r.a.createElement("br", null), "\u0412\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u0431\u043e\u043b\u0435\u0442\u044c. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u0432\u0430\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u044d\u0442\u043e."),
1176 o = r.a.createElement(n.Fragment, null, "\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 1 ", S.getEmojiPic("tube", 100)),
1177 s = function() {
1178 j.sendEvent("items:use", {
1179 type_id: 1
1180 })
1181 }
1182 ),
1183 i.props.addToast("\u0412\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u0440\u0430\u0437\u0438\u0442\u044c\u0441\u044f", a, o, "error", s)
1184 }
1185 ,
1186 i.state = {
1187 activeTab: "menu",
1188 infectedToastClosed: !1
1189 },
1190 i.bgElements = [],
1191 i.supportsAd = v.a.supports("VKWebAppShowNativeAds"),
1192 i
1193 }
1194 return Object(m.a)(a, [{
1195 key: "componentDidMount",
1196 value: function() {
1197 T()("reachGoal", "open_panel:main")
1198 }
1199 }, {
1200 key: "getTabClassNames",
1201 value: function(e) {
1202 return L()({
1203 "MainTab__footer-tab": !0,
1204 "MainTab__footer-tab--active": this.state.activeTab === e
1205 })
1206 }
1207 }, {
1208 key: "openTab",
1209 value: function(e) {
1210 this.setState({
1211 activeTab: e
1212 }),
1213 "improvements" === e && setTimeout((function() {
1214 return S.scrollToBottom()
1215 }
1216 ), 20)
1217 }
1218 }, {
1219 key: "render",
1220 value: function() {
1221 var e = this
1222 , t = this.props.app
1223 , a = this.props.user.object
1224 , n = this.props.bonuses.items
1225 , i = this.props.improvements.items
1226 , o = L()({
1227 "MainTab__header-balance": !0,
1228 "MainTab__header-balance--infected": a.is_infected,
1229 "MainTab__header-balance--mini": a.balance.toString().length >= 12
1230 })
1231 , c = Object(s.a)(n);
1232 c = c.filter((function(e) {
1233 return 0 === e.current_count
1234 }
1235 ));
1236 var l = a.balance > 5e3 || a.earned_balance > 5e3;
1237 return r.a.createElement("div", {
1238 className: "MainTab StyledGameWindow"
1239 }, r.a.createElement("div", {
1240 className: "MainTab__header"
1241 }, r.a.createElement("div", {
1242 className: "MainTab__header-title"
1243 }, "\u0412\u0430\u0448 \u0441\u0447\u0451\u0442"), r.a.createElement("div", {
1244 className: o
1245 }, S.formatMainBalance(a.balance / 1e3), " ", S.getEmojiPic("toilet", 100)), r.a.createElement("div", {
1246 className: "MainTab__header-counters"
1247 }, r.a.createElement("div", {
1248 className: "MainTab__header-counter"
1249 }, "+ ", 0 === a.improvements_sum ? S.formatMainBalance(a.improvements_sum / 1e3) : S.formatNumber(a.improvements_sum / 1e3), "/\u0441\u0435\u043a"), r.a.createElement("div", {
1250 className: "MainTab__header-counter"
1251 }, "+ ", S.formatNumber((a.bonuses_sum + 1) / 1e3), "/\u0441\u043a\u0440\u043e\u043b\u043b")), E.isDev && r.a.createElement("div", {
1252 className: "MainTab__header-info"
1253 }, "development mode"), t.socketFetching && r.a.createElement("div", {
1254 className: "MainTab__header-info"
1255 }, "\u041f\u043e\u0442\u0435\u0440\u044f\u043d\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043f\u0435\u0440\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435...")), r.a.createElement("div", {
1256 className: "MainTab__scroll"
1257 }, r.a.createElement(M, {
1258 onScroll: this.onScroll
1259 }), a.can_be_infected && !this.state.infectedToastClosed ? r.a.createElement("div", {
1260 className: "MainTab__scroll-toasts"
1261 }, r.a.createElement("div", {
1262 className: "MainTab__scroll-toast",
1263 onClick: function() {
1264 return e.onInfectedToastClick()
1265 }
1266 }, r.a.createElement("div", {
1267 className: "MainTab__scroll-toast-image"
1268 }, S.getEmojiPic("virus", 160)), r.a.createElement("div", {
1269 className: "MainTab__scroll-toast-message"
1270 }, "\u0412\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u0440\u0430\u0437\u0438\u0442\u044c\u0441\u044f"), r.a.createElement("div", {
1271 className: "MainTab__scroll-toast-button"
1272 }, r.a.createElement("img", {
1273 src: G.a,
1274 alt: ""
1275 })))) : r.a.createElement("div", {
1276 className: "MainTab__menu"
1277 }, this.supportsAd && l && r.a.createElement("div", {
1278 className: "MainTab__menu-item",
1279 onClick: this.onAdsButtonClick
1280 }, r.a.createElement("div", {
1281 className: "MainTab__menu-item-icon"
1282 }, r.a.createElement("img", {
1283 src: z.a,
1284 alt: ""
1285 })), r.a.createElement("div", {
1286 className: "MainTab__menu-item-text"
1287 }, "\u0415\u0449\u0451 \u0431\u0443\u043c\u0430\u0433\u0438?")))), r.a.createElement("div", {
1288 className: "MainTab__footer"
1289 }, r.a.createElement("div", {
1290 className: "MainTab__footer-tabs"
1291 }, r.a.createElement("div", {
1292 children: "\u041c\u0435\u043d\u044e",
1293 onClick: function() {
1294 return e.openTab("menu")
1295 },
1296 className: this.getTabClassNames("menu")
1297 }), r.a.createElement("div", {
1298 children: "\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f",
1299 onClick: function() {
1300 return e.openTab("improvements")
1301 },
1302 className: this.getTabClassNames("improvements")
1303 }), r.a.createElement("div", {
1304 children: "\u0411\u043e\u043d\u0443\u0441\u044b",
1305 onClick: function() {
1306 return e.openTab("bonuses")
1307 },
1308 className: this.getTabClassNames("bonuses")
1309 })), "menu" === this.state.activeTab && r.a.createElement("div", {
1310 className: "MainTab__footer-content"
1311 }, r.a.createElement("div", {
1312 className: "MainTab__buttons"
1313 }, r.a.createElement("div", {
1314 className: "MainTab__button MainTab__button--orange",
1315 onClick: function() {
1316 return e.setActivePanel("rating")
1317 }
1318 }, r.a.createElement("div", {
1319 className: "MainTab__button-icon"
1320 }, r.a.createElement("img", {
1321 src: D.a,
1322 alt: ""
1323 })), r.a.createElement("div", {
1324 className: "MainTab__button-title"
1325 }, "\u0420\u0435\u0439\u0442\u0438\u043d\u0433")), r.a.createElement("div", {
1326 className: "MainTab__button MainTab__button--green",
1327 onClick: function() {
1328 return e.setActivePanel("transfer")
1329 }
1330 }, r.a.createElement("div", {
1331 className: "MainTab__button-icon"
1332 }, r.a.createElement("img", {
1333 src: R.a,
1334 alt: ""
1335 })), r.a.createElement("div", {
1336 className: "MainTab__button-title"
1337 }, window.innerWidth > 350 ? "\u041f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438" : "\u041f\u0435\u0440\u0435\u0432\u043e\u0434")), r.a.createElement("div", {
1338 className: "MainTab__button MainTab__button--purple",
1339 onClick: function() {
1340 return e.setActivePanel("history")
1341 }
1342 }, r.a.createElement("div", {
1343 className: "MainTab__button-icon"
1344 }, r.a.createElement("img", {
1345 src: V.a,
1346 alt: ""
1347 })), r.a.createElement("div", {
1348 className: "MainTab__button-title"
1349 }, "\u0418\u0441\u0442\u043e\u0440\u0438\u044f")), r.a.createElement("div", {
1350 className: "MainTab__button MainTab__button--blue",
1351 onClick: function() {
1352 return e.setActivePanel("shop")
1353 }
1354 }, r.a.createElement("div", {
1355 className: "MainTab__button-icon"
1356 }, r.a.createElement("img", {
1357 src: F.a,
1358 alt: ""
1359 })), r.a.createElement("div", {
1360 className: "MainTab__button-title"
1361 }, "\u041c\u0430\u0433\u0430\u0437\u0438\u043d")))), "improvements" === this.state.activeTab && r.a.createElement("div", {
1362 className: "MainTab__footer-content"
1363 }, r.a.createElement("div", {
1364 className: "MainTab__improvements"
1365 }, r.a.createElement(C.e, null, i.map((function(t) {
1366 var a = S.roundFloat(t.speed / 1e3, !0);
1367 t.current_count > 0 && (a = S.roundFloat(t.speed * t.current_count / 1e3, !0));
1368 return r.a.createElement("div", {
1369 className: "MainTab__improvement-wrapper",
1370 key: t.type_id
1371 }, r.a.createElement("div", {
1372 className: "MainTab__improvement",
1373 onClick: function() {
1374 e.props.setActiveWindow("improvement", {
1375 type_id: t.type_id
1376 })
1377 }
1378 }, r.a.createElement("div", {
1379 className: "MainTab__improvement-image"
1380 }, r.a.createElement("img", {
1381 src: S.getEmojiLink(t.icon, 160),
1382 alt: ""
1383 })), r.a.createElement("div", {
1384 className: "MainTab__improvement-data"
1385 }, r.a.createElement("div", {
1386 className: "MainTab__improvement-title"
1387 }, t.name), r.a.createElement("div", {
1388 className: "MainTab__improvement-speed"
1389 }, "+", a, "/\u0441\u0435\u043a")), t.current_count > 0 && r.a.createElement("div", {
1390 className: "MainTab__improvement-counter"
1391 }, "x", t.current_count)))
1392 }
1393 )))), r.a.createElement(O, {
1394 color: "primary",
1395 stretched: !0,
1396 onClick: function() {
1397 return e.setActiveModal("improvements")
1398 }
1399 }, "\u041a\u0443\u043f\u0438\u0442\u044c \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f")), "bonuses" === this.state.activeTab && r.a.createElement("div", {
1400 className: "MainTab__footer-content"
1401 }, r.a.createElement("div", {
1402 className: "MainTab__bonuses"
1403 }, r.a.createElement(C.e, null, c.map((function(t) {
1404 var n = S.formatNumber(t.speed / 1e3)
1405 , i = L()({
1406 MainTab__bonus: !0,
1407 "MainTab__bonus--stripped": t.current_count > 0,
1408 "MainTab__bonus--hidden": t.earned_filter > a.earned_balance
1409 });
1410 return r.a.createElement("div", {
1411 className: "MainTab__bonus-wrapper",
1412 key: t.type_id
1413 }, r.a.createElement("div", {
1414 className: i,
1415 onClick: function() {
1416 e.props.setActiveWindow("bonus", {
1417 type_id: t.type_id
1418 })
1419 }
1420 }, r.a.createElement("div", {
1421 className: "MainTab__bonus-image"
1422 }, r.a.createElement("img", {
1423 src: S.getEmojiLink(t.icon, 160),
1424 alt: ""
1425 })), 0 === t.current_count && r.a.createElement("div", {
1426 className: "MainTab__bonus-data"
1427 }, r.a.createElement("div", {
1428 className: "MainTab__bonus-title"
1429 }, t.name), r.a.createElement("div", {
1430 className: "MainTab__bonus-speed"
1431 }, "+", n, "/\u0441\u043a\u0440\u043e\u043b\u043b"))))
1432 }
1433 )))), r.a.createElement(O, {
1434 color: "primary",
1435 stretched: !0,
1436 onClick: function() {
1437 return e.setActiveModal("bonuses")
1438 }
1439 }, "\u041a\u0443\u043f\u0438\u0442\u044c \u0431\u043e\u043d\u0443\u0441\u044b"))), r.a.createElement("div", {
1440 className: "MainTab__bg"
1441 }, this.bgElements.map((function(e) {
1442 return r.a.createElement("img", {
1443 alt: "",
1444 key: e.id,
1445 src: S.getEmojiLink(a.is_infected ? "virus" : "toilet", 100),
1446 style: {
1447 top: e.y,
1448 left: e.x
1449 }
1450 })
1451 }
1452 ))))
1453 }
1454 }]),
1455 a
1456 }(r.a.Component)
1457 , ie = {
1458 setActivePanel: Y,
1459 setActiveModal: ee,
1460 setActiveWindow: te,
1461 addToast: Q,
1462 setSnackbar: Z,
1463 tickUserScroll: function() {
1464 return {
1465 type: "TICK_USER_SCROLL"
1466 }
1467 }
1468 }
1469 , oe = Object(p.c)((function(e) {
1470 return {
1471 app: e.app,
1472 user: e.user,
1473 items: e.items,
1474 bonuses: e.bonuses,
1475 improvements: e.improvements
1476 }
1477 }
1478 ), ie)(re)
1479 , se = (a(199),
1480 a(48))
1481 , ce = (a(200),
1482 {
1483 user_id: 0,
1484 first_name: "",
1485 last_name: "",
1486 avatar: "",
1487 avatar_max: "",
1488 visual_color_id: 0,
1489 visual_emoji_id: 0,
1490 is_steal_available: !1,
1491 can_be_dishonest: !1
1492 })
1493 , le = function(e) {
1494 Object(d.a)(a, e);
1495 var t = Object(u.a)(a);
1496 function a() {
1497 return Object(l.a)(this, a),
1498 t.apply(this, arguments)
1499 }
1500 return Object(m.a)(a, [{
1501 key: "render",
1502 value: function() {
1503 var e = this.props
1504 , t = e.imageSize
1505 , a = e.emojiSize
1506 , n = e.fallbackImage
1507 , i = e.profile
1508 , o = i.visual_color_id || 0
1509 , s = i.visual_emoji_id || 0
1510 , c = S.getColorValue(o)
1511 , l = S.getEmojiValue(s);
1512 return r.a.createElement("div", {
1513 className: "ProfileAvatar"
1514 }, r.a.createElement("img", {
1515 alt: "",
1516 referrerPolicy: "no-referrer",
1517 src: i.avatar_max || i.avatar || i.photo_max || i.photo_200 || i.photo_100,
1518 onError: function(e) {
1519 n && (e.target.src = n)
1520 },
1521 style: {
1522 width: "".concat(t, "px"),
1523 height: "".concat(t, "px"),
1524 minHeight: "".concat(t, "px"),
1525 minWidth: "".concat(t, "px"),
1526 borderColor: o > 0 ? c : null
1527 }
1528 }), s > 0 && r.a.createElement("img", {
1529 alt: "",
1530 className: "ProfileAvatar__emoji",
1531 src: S.getEmojiLink(l, 160),
1532 style: {
1533 width: "".concat(a, "px"),
1534 height: "".concat(a, "px"),
1535 minHeight: "".concat(a, "px"),
1536 minWidth: "".concat(a, "px")
1537 }
1538 }))
1539 }
1540 }]),
1541 a
1542 }(r.a.Component);
1543 le.defaultProps = {
1544 fallbackImage: "",
1545 imageSize: 77,
1546 emojiSize: 27,
1547 profile: ce
1548 };
1549 var me = le
1550 , de = a(76)
1551 , ue = a.n(de)
1552 , pe = a(49)
1553 , _e = a.n(pe)
1554 , ve = function(e) {
1555 Object(d.a)(a, e);
1556 var t = Object(u.a)(a);
1557 function a(e) {
1558 var i;
1559 return Object(l.a)(this, a),
1560 (i = t.call(this, e)).countdownRenderer = function(e) {
1561 return e.completed ? r.a.createElement("span", null, "00:00") : r.a.createElement("span", null, "\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0436\u0438\u0442\u044c ", r.a.createElement("b", null, e.hours > 0 ? e.formatted.hours + ":" : "", e.formatted.minutes, ":", e.formatted.seconds))
1562 }
1563 ,
1564 i.onDeathTimerClick = function() {
1565 var e = i.props.items.items
1566 , t = 0;
1567 e.forEach((function(e) {
1568 2 === e.type_id && (t = e.current_count)
1569 }
1570 ));
1571 var a = r.a.createElement("span", {
1572 style: {
1573 fontSize: "16px"
1574 }
1575 }, "\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u0442\u0435 \u043b\u0435\u043a\u0430\u0440\u0441\u0442\u0432\u043e, \u043f\u043e \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u043f\u0440\u043e\u043f\u0430\u0434\u0451\u0442 \u0432\u0435\u0441\u044c \u0432\u0430\u0448 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441, \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u044b, \u043a\u0440\u043e\u043c\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439. ", r.a.createElement("br", null), "\u0423 \u0432\u0430\u0441 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c ", t, " ", S.declOfNum(t, ["\u0442\u0430\u0431\u043b\u0435\u0442\u043a\u0430", "\u0442\u0430\u0431\u043b\u0435\u0442\u043a\u0438", "\u0442\u0430\u0431\u043b\u0435\u0442\u043e\u043a"]), ". \u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432\u044b\u043b\u0435\u0447\u0438\u0442 \u0432\u0430\u0441 \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0432 90%")
1576 , o = r.a.createElement(n.Fragment, null, "\u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c 1 ", S.getEmojiPic("pill", 100));
1577 i.props.addToast("\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f", a, o, "error", (function() {
1578 j.sendEvent("items:use", {
1579 type_id: 2
1580 })
1581 }
1582 ))
1583 }
1584 ,
1585 i.state = {
1586 promoBanner: null
1587 },
1588 i
1589 }
1590 return Object(m.a)(a, [{
1591 key: "componentDidMount",
1592 value: function() {
1593 var e = this;
1594 T()("reachGoal", "open_panel:profile"),
1595 v.a.send("VKWebAppGetAds", {}).then((function(t) {
1596 e.setState({
1597 promoBanner: t
1598 }),
1599 T()("reachGoal", "ad_banner:show")
1600 }
1601 )).catch((function() {}
1602 ))
1603 }
1604 }, {
1605 key: "render",
1606 value: function() {
1607 var e = this
1608 , t = this.props.app
1609 , a = this.props.user.object
1610 , n = this.props.user.profile
1611 , i = this.props.improvements.items
1612 , o = this.props.achievements.categories
1613 , s = this.state.promoBanner
1614 , c = v.a.getStartParams().platform
1615 , l = L()({
1616 ProfileTab: !0,
1617 StyledGameWindow: !0,
1618 "ProfileTab--infected": a.is_infected
1619 })
1620 , m = 0;
1621 i.forEach((function(e) {
1622 m += e.current_count
1623 }
1624 ));
1625 var d = 0;
1626 o.forEach((function(e) {
1627 d += e.received_achievements_count
1628 }
1629 ));
1630 var u = S.formatMainBalance(a.earned_balance / 1e3, a.earned_balance < 1e8 ? 3 : 0)
1631 , p = a.is_infected ? "\u0437\u0430\u0440\u0430\u0436\u0451\u043d" : "\u0437\u0434\u043e\u0440\u043e\u0432";
1632 return 1 === n.sex && (p = a.is_infected ? "\u0437\u0430\u0440\u0430\u0436\u0435\u043d\u0430" : "\u0437\u0434\u043e\u0440\u043e\u0432\u0430"),
1633 r.a.createElement("div", {
1634 className: l
1635 }, r.a.createElement("div", {
1636 className: "ProfileTab__user"
1637 }, r.a.createElement(me, {
1638 profile: a,
1639 imageSize: 94
1640 }), r.a.createElement("div", {
1641 className: "ProfileTab__user-data"
1642 }, r.a.createElement("div", {
1643 className: "ProfileTab__user-data-name"
1644 }, a.first_name, " ", a.last_name), r.a.createElement("div", {
1645 className: "ProfileTab__user-data-status"
1646 }, "\u0421\u0442\u0430\u0442\u0443\u0441: ", p), a.is_infected && a.last_infection_date > 0 && r.a.createElement("div", {
1647 className: "ProfileTab__user-data-timer",
1648 onClick: function() {
1649 return e.onDeathTimerClick()
1650 }
1651 }, r.a.createElement(se.a, {
1652 daysInHours: !0,
1653 date: 1e3 * (a.last_infection_date + 259200),
1654 renderer: this.countdownRenderer
1655 })))), r.a.createElement("div", {
1656 className: "ProfileTab__stats"
1657 }, r.a.createElement("div", {
1658 className: "ProfileTab__stats-row"
1659 }, r.a.createElement("div", {
1660 className: "ProfileTab__stats-block"
1661 }, r.a.createElement("div", {
1662 className: "ProfileTab__stats-block-title"
1663 }, u, " ", S.getEmojiPic("toilet", 100)), r.a.createElement("div", {
1664 className: "ProfileTab__stats-block-description"
1665 }, "\u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e \u0437\u0430 \u0432\u0441\u0451 \u0432\u0440\u0435\u043c\u044f \u0438\u0433\u0440\u044b"))), r.a.createElement("div", {
1666 className: "ProfileTab__stats-row"
1667 }, r.a.createElement("div", {
1668 className: "ProfileTab__stats-block"
1669 }, r.a.createElement("div", {
1670 className: "ProfileTab__stats-block-title"
1671 }, a.infections_count), r.a.createElement("div", {
1672 className: "ProfileTab__stats-block-description"
1673 }, S.declOfNum(a.infections_count, ["\u0437\u0430\u0440\u0430\u0436\u0435\u043d\u0438\u0435", "\u0437\u0430\u0440\u0430\u0436\u0435\u043d\u0438\u044f", "\u0437\u0430\u0440\u0430\u0436\u0435\u043d\u0438\u0439"]))), r.a.createElement("div", {
1674 className: "ProfileTab__stats-block"
1675 }, r.a.createElement("div", {
1676 className: "ProfileTab__stats-block-title"
1677 }, a.recoveries_count), r.a.createElement("div", {
1678 className: "ProfileTab__stats-block-description"
1679 }, S.declOfNum(a.recoveries_count, ["\u0438\u0437\u043b\u0435\u0447\u0435\u043d\u0438\u0435", "\u0438\u0437\u043b\u0435\u0447\u0435\u043d\u0438\u044f", "\u0438\u0437\u043b\u0435\u0447\u0435\u043d\u0438\u0439"])))), r.a.createElement("div", {
1680 className: "ProfileTab__stats-row"
1681 }, r.a.createElement("div", {
1682 className: "ProfileTab__stats-block"
1683 }, r.a.createElement("div", {
1684 className: "ProfileTab__stats-block-title"
1685 }, a.salvations_count), r.a.createElement("div", {
1686 className: "ProfileTab__stats-block-description"
1687 }, "\u0440\u0430\u0437 \u0432\u0430\u0441 \u0441\u043f\u0430\u0441\u043b\u043e \u043d\u043e\u0448\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u0442 \u0437\u0430\u0440\u0430\u0436\u0435\u043d\u0438\u044f"))), r.a.createElement("div", {
1688 className: "ProfileTab__stats-row"
1689 }, r.a.createElement("div", {
1690 className: "ProfileTab__stats-block"
1691 }, r.a.createElement("div", {
1692 className: "ProfileTab__stats-block-title"
1693 }, m), r.a.createElement("div", {
1694 className: "ProfileTab__stats-block-description"
1695 }, S.declOfNum(m, ["\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435", "\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f", "\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439"]))), r.a.createElement("div", {
1696 className: "ProfileTab__stats-block"
1697 }, r.a.createElement("div", {
1698 className: "ProfileTab__stats-block-title"
1699 }, d), r.a.createElement("div", {
1700 className: "ProfileTab__stats-block-description"
1701 }, S.declOfNum(d, ["\u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435", "\u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f", "\u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439"]))))), !["mobile_iphone", "mobile_iphone_messenger"].includes(c) && r.a.createElement("div", {
1702 className: "ProfileTab__buttons"
1703 }, t.config.broadcast_id && r.a.createElement(O, {
1704 color: "gray",
1705 stretched: !0,
1706 onClick: function() {
1707 return S.openLink("https://vk.com/" + t.config.broadcast_id)
1708 }
1709 }, r.a.createElement("img", {
1710 src: ue.a,
1711 alt: ""
1712 }), " \u041f\u0440\u044f\u043c\u0430\u044f \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044f \u0438\u0433\u0440\u044b", r.a.createElement("div", {
1713 className: "ProfileTab__button-badge"
1714 }, "LIVE")), r.a.createElement(O, {
1715 color: "gray",
1716 stretched: !0,
1717 onClick: function() {
1718 return S.openLink("https://vk.com/paper_scroll")
1719 }
1720 }, r.a.createElement("img", {
1721 src: _e.a,
1722 alt: ""
1723 }), " \u0421\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e \u0438\u0433\u0440\u044b")), r.a.createElement("div", {
1724 className: "ProfileTab__toggles"
1725 }, r.a.createElement(C.a, {
1726 asideContent: r.a.createElement(C.n, {
1727 checked: a.is_extended_animation_disabled,
1728 onChange: function(e) {
1729 j.sendEvent("event:trigger", {
1730 type: "extended_animation_update",
1731 value: e.target.checked
1732 })
1733 }
1734 })
1735 }, "\u0423\u043f\u0440\u043e\u0449\u0451\u043d\u043d\u0430\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0438\u0433\u0440\u044b")), !!s && r.a.createElement("div", {
1736 className: "ProfileTab__ads"
1737 }, r.a.createElement(C.l, {
1738 bannerData: s,
1739 onClose: function() {
1740 e.setState({
1741 promoBanner: null
1742 })
1743 }
1744 })))
1745 }
1746 }]),
1747 a
1748 }(r.a.Component)
1749 , fe = {
1750 addToast: Q,
1751 setActiveTab: q,
1752 setActivePanel: Y,
1753 clearTabHistory: function(e) {
1754 return {
1755 type: "CLEAR_TAB_HISTORY",
1756 tab: e
1757 }
1758 }
1759 }
1760 , he = Object(p.c)((function(e) {
1761 return {
1762 app: e.app,
1763 user: e.user,
1764 items: e.items,
1765 improvements: e.improvements,
1766 achievements: e.achievements
1767 }
1768 }
1769 ), fe)(ve)
1770 , be = (a(201),
1771 a(77))
1772 , Ee = a.n(be)
1773 , ge = a(78)
1774 , ye = a.n(ge)
1775 , ke = a(79)
1776 , Te = a.n(ke)
1777 , Ne = a(80)
1778 , we = a.n(Ne)
1779 , je = a(81)
1780 , Ae = a.n(je)
1781 , Se = a(82)
1782 , Pe = a.n(Se)
1783 , Le = a(58)
1784 , Oe = a.n(Le)
1785 , Ce = function(e) {
1786 Object(d.a)(a, e);
1787 var t = Object(u.a)(a);
1788 function a() {
1789 var e;
1790 Object(l.a)(this, a);
1791 for (var i = arguments.length, o = new Array(i), s = 0; s < i; s++)
1792 o[s] = arguments[s];
1793 return (e = t.call.apply(t, [this].concat(o))).setActivePanel = function(t) {
1794 e.props.setActivePanel("information", t)
1795 }
1796 ,
1797 e.setActiveModal = function(t) {
1798 e.props.setActiveModal(t)
1799 }
1800 ,
1801 e.setSnackbar = function(t, a) {
1802 e.props.setSnackbar(t, a)
1803 }
1804 ,
1805 e.onItemClick = function(t) {
1806 if (0 === t.current_count)
1807 e.setActivePanel("shop");
1808 else {
1809 var a = ""
1810 , i = "";
1811 1 === t.type_id ? (a = r.a.createElement("span", null, "\u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u0437\u0430\u0440\u0430\u0436\u0435\u043d\u043d\u043e\u043c\u0443 \u0438\u0433\u0440\u043e\u043a\u0443 \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u043e\u0442 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0448\u0430\u043d\u0441 \u0437\u0430\u0431\u043e\u043b\u0435\u0442\u044c. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0430\u0441 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0437\u0430\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f 5% \u043e\u0442 \u043e\u0431\u0449\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0438\u0433\u0440\u043e\u043a\u043e\u0432. ", r.a.createElement("br", null), "\u0422\u0435\u0441\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u0443\u0441."),
1812 i = r.a.createElement(n.Fragment, null, "\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 1 ", S.getEmojiPic(t.icon, 100))) : 2 === t.type_id && (a = r.a.createElement("span", null, "\u0415\u0441\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0431\u043e\u043b\u0435\u0437\u043d\u0438 \u0432\u044b \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u0442\u0435 \u043b\u0435\u043a\u0430\u0440\u0441\u0442\u0432\u043e, \u043f\u043e \u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u043f\u0440\u043e\u043f\u0430\u0434\u0451\u0442 \u0432\u0435\u0441\u044c \u0432\u0430\u0448 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441, \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u044b, \u043a\u0440\u043e\u043c\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439. ", r.a.createElement("br", null), "\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432\u044b\u043b\u0435\u0447\u0438\u0442 \u0432\u0430\u0441 \u0441 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0432 90%"),
1813 i = r.a.createElement(n.Fragment, null, "\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 1 ", S.getEmojiPic(t.icon, 100))),
1814 e.props.addToast("\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f", a, i, "primary", (function() {
1815 j.sendEvent("items:use", {
1816 type_id: t.type_id
1817 })
1818 }
1819 ))
1820 }
1821 }
1822 ,
1823 e.onDisinfectantClick = function(t) {
1824 0 === t.current_count ? e.setActivePanel("shop") : e.showDisinfectantActivateToast(t)
1825 }
1826 ,
1827 e.onDisinfectantMenuClick = function(t) {
1828 t.is_active ? e.setSnackbar("error", "\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u0437\u0430\u0449\u0438\u0442\u044b \u0443\u0436\u0435 \u0430\u043a\u0442\u0438\u0432\u043d\u043e") : 0 === t.current_count ? e.setSnackbar("error", "\u0423 \u0432\u0430\u0441 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u044d\u0442\u043e\u0433\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0437\u0430\u0449\u0438\u0442\u044b. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u0443\u043f\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u041c\u0430\u0433\u0430\u0437\u0438\u043d\u0435.") : e.showDisinfectantActivateToast(t)
1829 }
1830 ,
1831 e.showDisinfectantActivateToast = function(t) {
1832 var a = S.roundInt(t.life_time / 60 / 60)
1833 , i = S.declOfNum(a, ["\u0447\u0430\u0441", "\u0447\u0430\u0441\u0430", "\u0447\u0430\u0441\u043e\u0432"])
1834 , o = null;
1835 "infection" === t.protection ? o = r.a.createElement("span", null, "\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 ", r.a.createElement("b", null, t.name_gen.toLowerCase()), " \u0441\u043d\u0438\u0437\u0438\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0440\u0430\u0437\u0438\u0442\u044c\u0441\u044f \u043d\u0430 ", r.a.createElement("b", null, t.chance_reduction, "%"), " \u043d\u0430 ", r.a.createElement("b", null, a), " ", i, ".") : "steal" === t.protection && (o = r.a.createElement("span", null, "\u041a\u0430\u0436\u0434\u044b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442 \u0443 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0438\u0433\u0440\u043e\u043a\u043e\u0432 \u0438\u0437 \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0438 \u0438\u0433\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0443\u043a\u0440\u0430\u0441\u0442\u044c \u0431\u0443\u043c\u0430\u0433\u0443.", r.a.createElement("br", null), r.a.createElement("br", null), "\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 ", r.a.createElement("b", null, t.name_gen.toLowerCase()), " \u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u0438\u0442 \u0432\u0430\u0448\u0438 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0438\u044f \u043d\u0430 ", r.a.createElement("b", null, a), " ", i, "."));
1836 var s = r.a.createElement(n.Fragment, null, "\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 1 ", S.getEmojiPic(t.icon, 100));
1837 e.props.addToast("\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f", o, s, "primary", (function() {
1838 j.sendEvent("disinfectants:activate", {
1839 type_id: t.type_id
1840 })
1841 }
1842 ))
1843 }
1844 ,
1845 e.countdownRenderer = function(e) {
1846 return e.completed ? r.a.createElement("span", null, "00:00") : r.a.createElement("span", null, e.hours > 0 ? e.formatted.hours + ":" : "", e.formatted.minutes, ":", e.formatted.seconds)
1847 }
1848 ,
1849 e.openShareWindow = function() {
1850 e.props.setActiveWindow("share", {})
1851 }
1852 ,
1853 e.changeNotificationsStatus = function() {
1854 var t = e.props.user.object
1855 , a = "\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f?"
1856 , i = r.a.createElement("span", null, "\u0423\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u043e\u0431 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044f\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u0433\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430.", r.a.createElement("br", null), r.a.createElement("br", null), "\u0412\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0445 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u043d\u044e \u0438\u043b\u0438 \u043d\u0430\u0436\u0430\u0432 \xab\u0417\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\xbb")
1857 , o = r.a.createElement(n.Fragment, null, r.a.createElement("img", {
1858 src: Pe.a,
1859 alt: ""
1860 }), " \u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f");
1861 t.are_notifications_enabled && (a = "\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f?",
1862 i = "\u0412\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044f\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u0433\u0440\u044b",
1863 o = "\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f"),
1864 e.props.addToast(a, i, o, "accent", (function() {
1865 t.are_notifications_enabled ? j.sendEvent("user:disable_notifications") : v.a.send("VKWebAppAllowMessagesFromGroup", {
1866 group_id: 194441652
1867 }).then((function() {
1868 j.sendEvent("user:enable_notifications")
1869 }
1870 )).catch((function() {}
1871 ))
1872 }
1873 ))
1874 }
1875 ,
1876 e
1877 }
1878 return Object(m.a)(a, [{
1879 key: "componentDidMount",
1880 value: function() {
1881 T()("reachGoal", "open_panel:information")
1882 }
1883 }, {
1884 key: "render",
1885 value: function() {
1886 var e = this
1887 , t = this.props.disinfectants.items
1888 , a = this.props.items.items
1889 , i = this.props.user.object
1890 , o = this.props.ratings.users
1891 , s = function(e) {
1892 return "steal" === e.protection && e.current_count < 1 && i.earned_balance < 2 * e.cost && o.current_place < 1e3
1893 };
1894 return r.a.createElement("div", {
1895 className: "InformationTab StyledGameWindow"
1896 }, r.a.createElement("div", {
1897 className: "InformationTab__title"
1898 }, "\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f"), r.a.createElement("div", {
1899 className: "InformationTab__disinfectants"
1900 }, r.a.createElement("div", {
1901 className: "InformationTab__disinfectants-title"
1902 }, "\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0437\u0430\u0449\u0438\u0442\u044b"), r.a.createElement("div", {
1903 className: "InformationTab__disinfectants-content"
1904 }, r.a.createElement(C.e, null, t.map((function(t) {
1905 return s(t) ? null : r.a.createElement("div", {
1906 className: "InformationTab__disinfectants-item-wrapper",
1907 key: t.type_id
1908 }, r.a.createElement("div", {
1909 className: "InformationTab__disinfectants-item",
1910 onClick: function() {
1911 return e.onDisinfectantMenuClick(t)
1912 }
1913 }, S.getEmojiPic(t.icon, 40), " ", t.is_active ? r.a.createElement(se.a, {
1914 date: t.end_date ? 1e3 * t.end_date : 1e3 * (t.activate_date + t.life_time),
1915 renderer: e.countdownRenderer
1916 }) : t.name))
1917 }
1918 ))))), r.a.createElement("div", {
1919 className: "InformationTab__inventory"
1920 }, r.a.createElement("div", {
1921 className: "InformationTab__inventory-title"
1922 }, "\u041c\u043e\u0439 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u044c"), r.a.createElement("div", {
1923 className: "InformationTab__inventory-content"
1924 }, r.a.createElement(C.e, null, t.map((function(t) {
1925 return s(t) ? null : r.a.createElement("div", {
1926 className: "InformationTab__inventory-item-wrapper",
1927 key: t.type_id
1928 }, r.a.createElement("div", {
1929 className: "InformationTab__inventory-item",
1930 onClick: function() {
1931 return e.onDisinfectantClick(t)
1932 }
1933 }, r.a.createElement("div", {
1934 className: "InformationTab__inventory-item-icon"
1935 }, r.a.createElement("img", {
1936 src: S.getEmojiLink(t.icon, 160),
1937 alt: ""
1938 })), r.a.createElement("div", {
1939 className: "InformationTab__inventory-item-title"
1940 }, t.current_count)))
1941 }
1942 )), a.map((function(t) {
1943 return r.a.createElement("div", {
1944 className: "InformationTab__inventory-item-wrapper",
1945 key: t.type_id
1946 }, r.a.createElement("div", {
1947 className: "InformationTab__inventory-item",
1948 onClick: function() {
1949 return e.onItemClick(t)
1950 }
1951 }, r.a.createElement("div", {
1952 className: "InformationTab__inventory-item-icon"
1953 }, r.a.createElement("img", {
1954 src: S.getEmojiLink(t.icon, 160),
1955 alt: ""
1956 })), r.a.createElement("div", {
1957 className: "InformationTab__inventory-item-title"
1958 }, t.current_count)))
1959 }
1960 ))))), r.a.createElement("div", {
1961 className: "InformationTab__menu"
1962 }, r.a.createElement("div", {
1963 className: "InformationTab__menu-title"
1964 }, "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f"), r.a.createElement("div", {
1965 className: "InformationTab__menu-content"
1966 }, r.a.createElement(O, {
1967 color: "gray",
1968 stretched: !0,
1969 onClick: function() {
1970 return e.setActivePanel("shop")
1971 }
1972 }, r.a.createElement("img", {
1973 src: Ee.a,
1974 alt: ""
1975 }), " \u041c\u0430\u0433\u0430\u0437\u0438\u043d"), r.a.createElement(O, {
1976 color: "gray",
1977 stretched: !0,
1978 onClick: function() {
1979 return e.setActivePanel("achievements")
1980 }
1981 }, r.a.createElement("img", {
1982 src: Te.a,
1983 alt: ""
1984 }), " \u0414\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f"), r.a.createElement(O, {
1985 color: "gray",
1986 stretched: !0,
1987 onClick: function() {
1988 return e.openShareWindow()
1989 }
1990 }, r.a.createElement("img", {
1991 src: ye.a,
1992 alt: ""
1993 }), " \u041f\u0440\u0438\u0433\u043b\u0430\u0441\u0438\u0442\u044c \u0434\u0440\u0443\u0437\u0435\u0439"))), r.a.createElement("div", {
1994 className: "InformationTab__buttons"
1995 }, S.isFuckingIOS() ? r.a.createElement(n.Fragment, null, r.a.createElement(O, {
1996 stretched: !0,
1997 color: "gray",
1998 onClick: function() {
1999 return e.props.setActiveModal("subscriptions")
2000 }
2001 }, r.a.createElement("img", {
2002 src: Oe.a,
2003 alt: ""
2004 }), " \u041a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044f", r.a.createElement("div", {
2005 className: "InformationTab__button-badge"
2006 }, "NEW")), r.a.createElement(O, {
2007 stretched: !0,
2008 color: "gray",
2009 onClick: function() {
2010 return S.openLink("https://vk.com/paper_scroll")
2011 }
2012 }, r.a.createElement("img", {
2013 src: _e.a,
2014 alt: ""
2015 }), " \u0421\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e \u0438\u0433\u0440\u044b")) : r.a.createElement(n.Fragment, null, r.a.createElement(O, {
2016 stretched: !0,
2017 color: "gray",
2018 onClick: function() {
2019 return e.props.setActiveModal("subscriptions")
2020 }
2021 }, r.a.createElement("img", {
2022 src: Oe.a,
2023 alt: ""
2024 }), " \u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 VK Donut", r.a.createElement("div", {
2025 className: "InformationTab__button-badge"
2026 }, "NEW")), r.a.createElement(O, {
2027 stretched: !0,
2028 color: "gray",
2029 onClick: function() {
2030 return S.openLink("https://vk.me/paper_scroll")
2031 }
2032 }, r.a.createElement("img", {
2033 src: Ae.a,
2034 alt: ""
2035 }), " \u041f\u0440\u0438\u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u0440\u0443\u043b\u043e\u043d\u044b")), r.a.createElement(O, {
2036 stretched: !0,
2037 color: "gray",
2038 onClick: function() {
2039 return e.changeNotificationsStatus()
2040 }
2041 }, r.a.createElement("img", {
2042 src: we.a,
2043 alt: ""
2044 }), " ", i.are_notifications_enabled ? "\u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f" : "\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f")))
2045 }
2046 }]),
2047 a
2048 }(r.a.Component)
2049 , Ie = {
2050 addToast: Q,
2051 setSnackbar: Z,
2052 deleteSnackbar: $,
2053 setActivePanel: Y,
2054 setActiveWindow: te,
2055 setActiveModal: ee
2056 }
2057 , Me = Object(p.c)((function(e) {
2058 return {
2059 user: e.user,
2060 items: e.items,
2061 ratings: e.ratings,
2062 disinfectants: e.disinfectants
2063 }
2064 }
2065 ), Ie)(Ce)
2066 , We = (a(202),
2067 a(83))
2068 , De = a.n(We)
2069 , Be = a(51)
2070 , Re = a.n(Be)
2071 , xe = a(84)
2072 , Ve = a.n(xe)
2073 , Ue = function(e) {
2074 Object(d.a)(a, e);
2075 var t = Object(u.a)(a);
2076 function a(e) {
2077 var n;
2078 return Object(l.a)(this, a),
2079 (n = t.call(this, e)).state = {
2080 openedPage: 1,
2081 pagesCount: 4
2082 },
2083 n
2084 }
2085 return Object(m.a)(a, [{
2086 key: "componentDidMount",
2087 value: function() {
2088 T()("reachGoal", "open_panel:onboard")
2089 }
2090 }, {
2091 key: "openExchangeLink",
2092 value: function() {
2093 var e = this.props.app.config
2094 , t = this.props.user.object;
2095 S.openVkCoinLink(e.merchant_id, S.roundInt(t.vkcoin_balance / 1e3), e.merchant_exchange_payload)
2096 }
2097 }, {
2098 key: "openNextPage",
2099 value: function() {
2100 var e = this.props.user.object;
2101 3 === this.state.openedPage && e.is_infected && v.a.setViewSettings("dark", "#ffffff").catch((function() {}
2102 )),
2103 this.setState({
2104 openedPage: this.state.openedPage + 1
2105 })
2106 }
2107 }, {
2108 key: "completeOnboard",
2109 value: function() {
2110 v.a.setViewSettings("dark", "#ffffff").catch((function() {}
2111 )),
2112 j.sendEvent("onboard:complete", {}),
2113 this.props.setActiveTab("main"),
2114 this.props.setUserData("is_onboard_completed", !0)
2115 }
2116 }, {
2117 key: "getProgressWidth",
2118 value: function(e) {
2119 return 1 === e ? "25%" : 2 === e ? "50%" : 3 === e ? "75%" : 4 === e ? "100%" : void 0
2120 }
2121 }, {
2122 key: "renderOnboardTab",
2123 value: function(e) {
2124 var t = this
2125 , a = this.props.user.object
2126 , i = this.props.user.onboard;
2127 if (1 === e)
2128 return r.a.createElement("div", {
2129 className: "OnboardTab"
2130 }, r.a.createElement("div", {
2131 className: "OnboardTab__image"
2132 }, r.a.createElement("img", {
2133 src: Ve.a,
2134 alt: ""
2135 })), r.a.createElement("div", {
2136 className: "OnboardTab__title"
2137 }, "\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u043c\u0438\u0440 2020"), r.a.createElement("div", {
2138 className: "OnboardTab__text"
2139 }, "\u0412 \u043c\u0438\u0440\u0435 \u0431\u0443\u0448\u0443\u0435\u0442 \u043d\u043e\u0432\u0430\u044f \u0437\u0430\u0440\u0430\u0437\u0430, \u0433\u043b\u0430\u0432\u044b \u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432 \u0445\u0432\u0430\u0442\u0430\u044e\u0442\u0441\u044f \u0437\u0430 \u0433\u043e\u043b\u043e\u0432\u0443.", r.a.createElement("br", null), "\u041c\u0438\u0440\u043e\u0432\u0430\u044f \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043a\u0430 \u0440\u0430\u0437\u0440\u0443\u0448\u0435\u043d\u0430 \u2014 \u0434\u0435\u043d\u044c\u0433\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u043a\u043e\u043c\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b.", r.a.createElement("br", null), "\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u0442 \u0442\u0443\u0430\u043b\u0435\u0442\u043d\u0430\u044f \u0431\u0443\u043c\u0430\u0433\u0430, \u043c\u0430\u0441\u043a\u0438 \u0438 \u0430\u043d\u0442\u0438\u0441\u0435\u043f\u0442\u0438\u043a\u0438."));
2140 if (2 === e) {
2141 var o = a.vkcoin_balance >= 1e6
2142 , s = a.vkcoin_balance > 0
2143 , c = o ? S.roundInt(a.vkcoin_balance / 1e3 / 1e3) : 0
2144 , l = S.roundInt(c / 1e3)
2145 , m = c - 1e3 * l;
2146 return r.a.createElement("div", {
2147 className: "OnboardTab StyledGameWindow"
2148 }, r.a.createElement("div", {
2149 className: "OnboardTab__title"
2150 }, "\u041f\u0430\u043d\u0438\u043a\u0430!"), r.a.createElement("div", {
2151 className: "OnboardTab__text"
2152 }, "\u041b\u044e\u0434\u0438 \u0432 \u0441\u043f\u0435\u0448\u043a\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442 \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043e\u0442 \u0441\u0432\u043e\u0438\u0445 \u043c\u043e\u043d\u0435\u0442 \u0438 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0435 \u0446\u0435\u043d\u043d\u043e\u0435 \u2014 \u0442\u0443\u0430\u043b\u0435\u0442\u043d\u0443\u044e \u0431\u0443\u043c\u0430\u0433\u0443. \u0427\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435 \u043e\u043d\u0438 \u043d\u0430\u0443\u0447\u0430\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0451 \u0441\u0430\u043c\u0438."), r.a.createElement("div", {
2153 className: "OnboardTab__block"
2154 }, r.a.createElement("div", {
2155 className: "OnboardTab__block-row"
2156 }, "1000 ", r.a.createElement("img", {
2157 src: Re.a,
2158 alt: "",
2159 className: "OnboardTab__block-row--coin"
2160 }), " = 1 ", S.getEmojiPic("paper", 100)), r.a.createElement("div", {
2161 className: "OnboardTab__block-row"
2162 }, "1000 ", S.getEmojiPic("paper", 100), " = 1 ", S.getEmojiPic("toilet", 100))), o ? r.a.createElement(n.Fragment, null, r.a.createElement("div", {
2163 className: "OnboardTab__text"
2164 }, "\u0422\u0432\u043e\u0439 \u0431\u0430\u043b\u0430\u043d\u0441 VK Coin"), r.a.createElement("div", {
2165 className: "OnboardTab__row"
2166 }, S.formatNumber(a.vkcoin_balance / 1e3), " ", r.a.createElement("img", {
2167 src: Re.a,
2168 alt: "",
2169 className: "OnboardTab__row--coin"
2170 })), r.a.createElement("div", {
2171 className: "OnboardTab__text"
2172 }, "\u041c\u043e\u0436\u043d\u043e \u043e\u0431\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430"), l > 0 && r.a.createElement("div", {
2173 className: "OnboardTab__row"
2174 }, S.formatNumber(l), " ", S.getEmojiPic("toilet", 36)), m > 0 && r.a.createElement("div", {
2175 className: "OnboardTab__row"
2176 }, S.formatNumber(m), " ", S.getEmojiPic("paper", 100)), r.a.createElement("div", {
2177 className: "OnboardTab__button"
2178 }, r.a.createElement(O, {
2179 onClick: function() {
2180 return t.openExchangeLink()
2181 }
2182 }, "\u041f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043e\u0431\u043c\u0435\u043d\u0443"))) : r.a.createElement(n.Fragment, null, r.a.createElement("div", {
2183 className: "OnboardTab__text"
2184 }, "VK Coin \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0430 \u0442\u0443\u0430\u043b\u0435\u0442\u043d\u0443\u044e \u0431\u0443\u043c\u0430\u0433\u0443 \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c \u0438\u0433\u0440\u044b, \u043d\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0443 \u0442\u0435\u0431\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0430\u043b\u044e\u0442\u044b"), s && r.a.createElement("div", {
2185 className: "OnboardTab__row"
2186 }, S.formatNumber(a.vkcoin_balance / 1e3), " ", r.a.createElement("img", {
2187 src: Re.a,
2188 alt: "",
2189 className: "OnboardTab__row--coin"
2190 }))))
2191 }
2192 return 3 === e ? r.a.createElement("div", {
2193 className: "OnboardTab"
2194 }, r.a.createElement("div", {
2195 className: "OnboardTab__title"
2196 }, "\u0418 \u0447\u0442\u043e \u043c\u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c", r.a.createElement("br", null), "\u0441 \u044d\u0442\u043e\u0439 \u0431\u0443\u043c\u0430\u0433\u043e\u0439?"), r.a.createElement("div", {
2197 className: "OnboardTab__text"
2198 }, "\u0420\u0443\u043b\u043e\u043d\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u0434\u0440\u0443\u0437\u044c\u044f\u043c, ", r.a.createElement("br", null), "\u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0430 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0435\u0439 \u0444\u0435\u0440\u043c\u044b \u0431\u0443\u043c\u0430\u0433\u0438, ", r.a.createElement("br", null), "\u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u043d\u0430 \u0430\u043d\u0442\u0438\u0441\u0435\u043f\u0442\u0438\u043a\u0438, \u043b\u0435\u043a\u0430\u0440\u0441\u0442\u0432\u0430, \u043c\u0430\u0441\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0433\u0440\u0430\u0442\u044c \u0432 \u0438\u0433\u0440\u044b \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438."), r.a.createElement("div", {
2199 className: "OnboardTab__banner"
2200 }, r.a.createElement("div", {
2201 className: "OnboardTab__banner-item"
2202 }, S.getEmojiPic("lotion", 100)), r.a.createElement("div", {
2203 className: "OnboardTab__banner-item"
2204 }, S.getEmojiPic("pill", 100)), r.a.createElement("div", {
2205 className: "OnboardTab__banner-item"
2206 }, S.getEmojiPic("mask", 100)), r.a.createElement("div", {
2207 className: "OnboardTab__banner-item"
2208 }, S.getEmojiPic("tube", 100))), r.a.createElement("div", {
2209 className: "OnboardTab__text"
2210 }, "\u041e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u041c\u0430\u0433\u0430\u0437\u0438\u043d\u0435.")) : 4 === e ? a.is_infected ? r.a.createElement("div", {
2211 className: "OnboardTab"
2212 }, r.a.createElement("div", {
2213 className: "OnboardTab__title"
2214 }, "\u0422\u0435\u0431\u0435 \u043d\u0435 \u043f\u043e\u0432\u0435\u0437\u043b\u043e: \u0442\u044b \u0437\u0430\u0440\u0430\u0437\u0438\u043b\u0441\u044f!"), r.a.createElement("div", {
2215 className: "OnboardTab__text"
2216 }, "\u0422\u044b \u043f\u0435\u0440\u0435\u0448\u0435\u043b \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u0437\u0430\u0431\u043e\u043b\u0435\u0432\u0448\u0435\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u0440\u0430\u0437\u0438\u043b\u0441\u044f \u0441\u0430\u043c \u0438 \u044f\u0432\u043b\u044f\u0435\u0448\u044c\u0441\u044f \u043d\u043e\u0441\u0438\u0442\u0435\u043b\u0435\u043c."), r.a.createElement("div", {
2217 className: "OnboardTab__profiles",
2218 key: "avatars"
2219 }, r.a.createElement("img", {
2220 alt: "",
2221 src: S.getEmojiLink("virus", 160),
2222 className: "OnboardTab__profiles-virus"
2223 }), r.a.createElement("div", {
2224 className: "OnboardTab__profiles-avatars"
2225 }, r.a.createElement("img", {
2226 src: a.avatar_max,
2227 alt: ""
2228 }), i.referer && i.referer.avatar_max && r.a.createElement("img", {
2229 src: i.referer.avatar_max,
2230 alt: ""
2231 }))), r.a.createElement("div", {
2232 className: "OnboardTab__text",
2233 onClick: function() {
2234 return S.openLink("https://vk.com/paper_scroll")
2235 }
2236 }, "\u0422\u0435\u0431\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0436\u0438\u0442\u044c 24 \u0447\u0430\u0441\u0430. \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u0434\u043e\u0440\u043e\u0432\u0435\u0442\u044c, \u0442\u0435\u0431\u0435 \u043d\u0443\u0436\u043d\u043e \u043b\u0435\u043a\u0430\u0440\u0441\u0442\u0432\u043e: \u043e\u043d\u043e \u0435\u0441\u0442\u044c \u0432 \u041c\u0430\u0433\u0430\u0437\u0438\u043d\u0435. \u041d\u0430\u043a\u043e\u043f\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0440\u0443\u043b\u043e\u043d\u043e\u0432 \u0438 \u043e\u0431\u043c\u0435\u043d\u044f\u0439 \u0438\u0445!", r.a.createElement("br", null), r.a.createElement("br", null), "\u0410 \u043c\u044b \u0434\u0430\u0440\u0438\u043c \u0442\u0435\u0431\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0431\u043e\u043d\u0443\u0441. ", r.a.createElement("br", null), "\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0438\u0433\u0440\u044b \u0432 ", r.a.createElement("b", null, "\u043d\u0430\u0448\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435"), ". \u0423\u0434\u0430\u0447\u0438!"), r.a.createElement("div", {
2237 className: "OnboardTab__bonus"
2238 }, r.a.createElement("div", {
2239 className: "OnboardTab__bonus-item"
2240 }, "1 ", S.getEmojiPic("mask", 30)), r.a.createElement("div", {
2241 className: "OnboardTab__bonus-item"
2242 }, "10 ", S.getEmojiPic("toilet", 36)))) : r.a.createElement("div", {
2243 className: "OnboardTab"
2244 }, r.a.createElement("div", {
2245 className: "OnboardTab__title"
2246 }, "\u0422\u0435\u0431\u0435 \u043f\u043e\u0432\u0435\u0437\u043b\u043e: \u0442\u044b \u0437\u0434\u043e\u0440\u043e\u0432!"), r.a.createElement("div", {
2247 className: "OnboardTab__text"
2248 }, i.referer ? "\u0422\u044b \u043f\u0435\u0440\u0435\u0448\u0435\u043b \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u0437\u0434\u043e\u0440\u043e\u0432\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0437\u0430\u0440\u0430\u0437\u0438\u043b\u0441\u044f." : "\u0422\u044b \u043f\u0435\u0440\u0435\u0448\u0435\u043b \u0432 \u0438\u0433\u0440\u0443 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u0435\u0449\u0435 \u043d\u0435 \u0443\u0441\u043f\u0435\u043b \u0437\u0430\u0440\u0430\u0437\u0438\u0442\u044c\u0441\u044f."), r.a.createElement("div", {
2249 className: "OnboardTab__profiles"
2250 }, r.a.createElement("div", {
2251 className: "OnboardTab__profiles-avatars",
2252 key: "avatars"
2253 }, r.a.createElement("img", {
2254 src: a.avatar_max,
2255 alt: ""
2256 }), i.referer && r.a.createElement("img", {
2257 src: i.referer.avatar_max,
2258 alt: ""
2259 }))), r.a.createElement("div", {
2260 className: "OnboardTab__text",
2261 onClick: function() {
2262 return S.openLink("https://vk.com/paper_scroll")
2263 }
2264 }, "\u041d\u043e \u0431\u0443\u0434\u044c \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u0435\u043d: \u044d\u0442\u043e\u0442 \u043c\u0438\u0440 \u0441\u0443\u0440\u043e\u0432 \u0438 \u0431\u0435\u0441\u043f\u043e\u0449\u0430\u0434\u0435\u043d, \u0438 \u043f\u043e\u0434 \u0443\u0433\u0440\u043e\u0437\u043e\u0439 \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e.", r.a.createElement("br", null), r.a.createElement("br", null), "\u041c\u044b \u0434\u0430\u0440\u0438\u043c \u0442\u0435\u0431\u0435 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0431\u043e\u043d\u0443\u0441. ", r.a.createElement("br", null), "\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0438\u0433\u0440\u044b \u0432 ", r.a.createElement("b", null, "\u043d\u0430\u0448\u0435\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435"), ". \u0423\u0434\u0430\u0447\u0438!"), r.a.createElement("div", {
2265 className: "OnboardTab__bonus"
2266 }, r.a.createElement("div", {
2267 className: "OnboardTab__bonus-item"
2268 }, "1 ", S.getEmojiPic("lotion", 100)))) : void 0
2269 }
2270 }, {
2271 key: "render",
2272 value: function() {
2273 var e = this
2274 , t = this.props.user.object
2275 , a = y.a.parse(window.location.search)
2276 , n = L()({
2277 Onboard: !0,
2278 "Onboard--infected": t.is_infected && 4 === this.state.openedPage
2279 })
2280 , i = L()({
2281 Onboard__navbar: !0,
2282 "Onboard__navbar--ios": "mobile_iphone" === a.vk_platform
2283 });
2284 return r.a.createElement("div", {
2285 className: n
2286 }, this.renderOnboardTab(this.state.openedPage), r.a.createElement("div", {
2287 className: i
2288 }, r.a.createElement("div", {
2289 className: "Onboard__navbar-container"
2290 }, r.a.createElement("div", {
2291 className: "Onboard__navbar-progress"
2292 }, r.a.createElement("span", {
2293 style: {
2294 width: this.getProgressWidth(this.state.openedPage)
2295 }
2296 })), 4 !== this.state.openedPage ? r.a.createElement("div", {
2297 className: "Onboard__navbar-button"
2298 }, r.a.createElement(O, {
2299 onClick: function() {
2300 return e.openNextPage()
2301 }
2302 }, "\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c ", r.a.createElement("img", {
2303 src: De.a,
2304 className: "Onboard__navbar-icon",
2305 alt: ""
2306 }))) : r.a.createElement("div", {
2307 className: "Onboard__navbar-button"
2308 }, r.a.createElement(O, {
2309 onClick: function() {
2310 return e.completeOnboard()
2311 }
2312 }, "\u041d\u0430\u0447\u0430\u0442\u044c \u0438\u0433\u0440\u0443")))))
2313 }
2314 }]),
2315 a
2316 }(r.a.Component)
2317 , Fe = {
2318 setActiveTab: q,
2319 setUserData: function(e, t) {
2320 return {
2321 type: "SET_USER_DATA",
2322 key: e,
2323 value: t
2324 }
2325 }
2326 }
2327 , He = Object(p.c)((function(e) {
2328 return {
2329 app: e.app,
2330 user: e.user
2331 }
2332 }
2333 ), Fe)(Ue)
2334 , Ge = (a(203),
2335 a(204),
2336 a(50))
2337 , Ke = a.n(Ge)
2338 , ze = function(e) {
2339 Object(d.a)(a, e);
2340 var t = Object(u.a)(a);
2341 function a() {
2342 var e;
2343 Object(l.a)(this, a);
2344 for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++)
2345 i[o] = arguments[o];
2346 return (e = t.call.apply(t, [this].concat(i))).renderToast = function(e, t) {
2347 var a = "primary"
2348 , n = "primary";
2349 ["error", "accent"].includes(e.category) && (a = e.category),
2350 "error" === e.category && (n = "negative"),
2351 "accent" === e.category && (n = "accent");
2352 var i = L()(["Toast", "Toast--".concat(a)]);
2353 return r.a.createElement("div", {
2354 className: i,
2355 key: e.id
2356 }, r.a.createElement("div", {
2357 className: "Toast__container"
2358 }, r.a.createElement("div", {
2359 className: "Toast__head"
2360 }, r.a.createElement("div", {
2361 className: "Toast__head-title"
2362 }, e.title), r.a.createElement("div", {
2363 className: "Toast__head-button",
2364 onClick: function() {
2365 return window.history.back()
2366 }
2367 }, r.a.createElement("img", {
2368 src: Ke.a,
2369 alt: ""
2370 }))), r.a.createElement("div", {
2371 className: "Toast__message"
2372 }, e.message), e.button && r.a.createElement("div", {
2373 className: "Toast__button"
2374 }, r.a.createElement(O, {
2375 stretched: !0,
2376 color: n,
2377 children: e.button,
2378 onClick: function() {
2379 e.buttonCallback && e.buttonCallback(),
2380 window.history.back()
2381 }
2382 }))))
2383 }
2384 ,
2385 e
2386 }
2387 return Object(m.a)(a, [{
2388 key: "render",
2389 value: function() {
2390 var e = this.props.app.toasts;
2391 return e[0] ? this.renderToast(e[0], 0) : null
2392 }
2393 }]),
2394 a
2395 }(r.a.Component)
2396 , qe = Object(p.c)((function(e) {
2397 return {
2398 app: e.app
2399 }
2400 }
2401 ), {})(ze)
2402 , Ye = (a(205),
2403 function(e) {
2404 Object(d.a)(a, e);
2405 var t = Object(u.a)(a);
2406 function a() {
2407 var e;
2408 Object(l.a)(this, a);
2409 for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++)
2410 r[i] = arguments[i];
2411 return (e = t.call.apply(t, [this].concat(r))).buyBonus = function(e) {
2412 j.sendEvent("bonuses:buy", {
2413 type_id: e
2414 })
2415 }
2416 ,
2417 e
2418 }
2419 return Object(m.a)(a, [{
2420 key: "componentDidMount",
2421 value: function() {
2422 T()("reachGoal", "open_window:bonus")
2423 }
2424 }, {
2425 key: "render",
2426 value: function() {
2427 var e = this
2428 , t = this.props.app
2429 , a = this.props.user.object
2430 , n = t.bonusWindow.params
2431 , i = this.props.bonuses.items.find((function(e) {
2432 return n.type_id === e.type_id
2433 }
2434 ));
2435 if (!i)
2436 return r.a.createElement("div", {
2437 className: "BonusWindow"
2438 }, "\u0411\u043e\u043d\u0443\u0441 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d");
2439 var o = {
2440 backgroundImage: "url('".concat(S.getEmojiLink(i.icon, 160), "')")
2441 }
2442 , s = S.formatNumber(i.cost / 1e3)
2443 , c = S.formatNumber(i.speed / 1e3)
2444 , l = 0 === i.current_count && i.earned_filter <= a.earned_balance
2445 , m = L()({
2446 BonusWindow: !0,
2447 "BonusWindow--reversed": ["mechanical_arm"].includes(i.icon)
2448 });
2449 return r.a.createElement("div", {
2450 className: m
2451 }, r.a.createElement("div", {
2452 className: "BonusWindow__bg",
2453 style: o
2454 }), r.a.createElement("div", {
2455 className: "BonusWindow__content"
2456 }, r.a.createElement("div", {
2457 className: "BonusWindow__title"
2458 }, i.name), r.a.createElement("div", {
2459 className: "BonusWindow__speed"
2460 }, "\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c: +", c, "/\u0441\u043a\u0440\u043e\u043b\u043b"), l && r.a.createElement("div", {
2461 className: "BonusWindow__description"
2462 }, "\u0415\u0449\u0435 \u043d\u0435 \u043a\u0443\u043f\u043b\u0435\u043d"), i.current_count > 0 && r.a.createElement("div", {
2463 className: "BonusWindow__description"
2464 }, "\u0423\u0436\u0435 \u043a\u0443\u043f\u043b\u0435\u043d"), i.earned_filter > a.earned_balance && r.a.createElement("div", {
2465 className: "BonusWindow__limit"
2466 }, "\u0411\u043e\u043d\u0443\u0441 \u0441\u0442\u0430\u043d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d, \u043a\u043e\u0433\u0434\u0430 \u0442\u044b \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0448\u044c ", r.a.createElement("br", null), " ", S.formatNumber(i.earned_filter / 1e3), " ", S.getEmojiPic("toilet", 100), " \u0437\u0430 \u0432\u0441\u0451 \u0432\u0440\u0435\u043c\u044f \u0438\u0433\u0440\u044b"), l && r.a.createElement("div", {
2467 className: "BonusWindow__button"
2468 }, r.a.createElement(O, {
2469 stretched: !0,
2470 color: "primary",
2471 disabled: a.balance < i.cost,
2472 onClick: function() {
2473 return e.buyBonus(i.type_id)
2474 }
2475 }, s, " ", S.getEmojiPic("toilet", 36)))))
2476 }
2477 }]),
2478 a
2479 }(r.a.Component))
2480 , Je = Object(p.c)((function(e) {
2481 return {
2482 app: e.app,
2483 user: e.user,
2484 bonuses: e.bonuses
2485 }
2486 }
2487 ), {})(Ye)
2488 , Xe = (a(206),
2489 function(e) {
2490 Object(d.a)(a, e);
2491 var t = Object(u.a)(a);
2492 function a() {
2493 var e;
2494 Object(l.a)(this, a);
2495 for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++)
2496 r[i] = arguments[i];
2497 return (e = t.call.apply(t, [this].concat(r))).shareStory = function() {
2498 window.history.back();
2499 var t = v.a.getStartParams()
2500 , a = "desktop_web" !== t.platform;
2501 v.a.send("VKWebAppShowStoryBox", {
2502 background_type: a ? "none" : "image",
2503 url: a ? null : S.getImageLink("default_story"),
2504 stickers: [{
2505 sticker_type: "renderable",
2506 sticker: {
2507 content_type: "image",
2508 can_delete: !1,
2509 url: S.getImageLink("story_sticker"),
2510 transform: {
2511 relation_width: .2
2512 },
2513 clickable_zones: [{
2514 action_type: "app",
2515 action: {
2516 app_id: t.appId,
2517 app_context: "open"
2518 }
2519 }]
2520 }
2521 }]
2522 }).then((function() {
2523 j.sendEvent("achievements:trigger", {
2524 type: "story_share"
2525 }),
2526 T()("reachGoal", "share:story")
2527 }
2528 )).catch((function(t) {
2529 4 !== t.error_data.error_code && e.props.addToast("\u041e\u0448\u0438\u0431\u043a\u0430", "\u0412\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u0439 :(", "\u041e\u043a\u0435\u0439", "error")
2530 }
2531 ))
2532 }
2533 ,
2534 e.shareWall = function() {
2535 window.history.back();
2536 var t = v.a.getStartParams();
2537 v.a.send("VKWebAppShare", {
2538 link: "https://vk.com/app".concat(t.appId, "#ref=").concat(t.userId)
2539 }).then((function() {
2540 j.sendEvent("achievements:trigger", {
2541 type: "wall_share"
2542 }),
2543 T()("reachGoal", "share:wall")
2544 }
2545 )).catch((function(t) {
2546 4 !== t.error_data.error_code && e.props.addToast("\u041e\u0448\u0438\u0431\u043a\u0430", "\u0412\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0441\u0441\u044b\u043b\u043e\u043a :(", "\u041e\u043a\u0435\u0439", "error")
2547 }
2548 ))
2549 }
2550 ,
2551 e
2552 }
2553 return Object(m.a)(a, [{
2554 key: "componentDidMount",
2555 value: function() {
2556 T()("reachGoal", "open_window:share")
2557 }
2558 }, {
2559 key: "render",
2560 value: function() {
2561 var e = v.a.getStartParams().platform;
2562 return r.a.createElement("div", {
2563 className: "ShareWindow"
2564 }, r.a.createElement("div", {
2565 className: "ShareWindow__content"
2566 }, r.a.createElement("div", {
2567 className: "ShareWindow__title"
2568 }, "\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438"), r.a.createElement("div", {
2569 className: "ShareWindow__buttons"
2570 }, r.a.createElement(O, {
2571 color: "primary",
2572 stretched: !0,
2573 onClick: this.shareStory
2574 }, "\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0441\u043e \u0441\u0442\u0438\u043a\u0435\u0440\u043e\u043c"), r.a.createElement(O, {
2575 color: "primary",
2576 stretched: !0,
2577 onClick: this.shareWall
2578 }, "desktop_web" === e ? "\u0417\u0430\u043f\u0438\u0441\u044c \u043d\u0430 \u0441\u0442\u0435\u043d\u0435" : "\u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430 \u0441\u0442\u0435\u043d\u0435"))))
2579 }
2580 }]),
2581 a
2582 }(r.a.Component))
2583 , Qe = {
2584 addToast: Q
2585 }
2586 , Ze = Object(p.c)((function(e) {
2587 return {
2588 app: e.app,
2589 user: e.user,
2590 bonuses: e.bonuses
2591 }
2592 }
2593 ), Qe)(Xe)
2594 , $e = a(31)
2595 , et = a.n($e)
2596 , tt = a(38)
2597 , at = (a(208),
2598 a(209),
2599 function(e) {
2600 Object(d.a)(a, e);
2601 var t = Object(u.a)(a);
2602 function a() {
2603 var e;
2604 Object(l.a)(this, a);
2605 for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++)
2606 r[i] = arguments[i];
2607 return (e = t.call.apply(t, [this].concat(r))).onProfileClick = function() {
2608 e.props.onClick && e.props.onClick()
2609 }
2610 ,
2611 e.onSubscriptionClick = function(t) {
2612 t.stopPropagation(),
2613 window.history.back(),
2614 setTimeout((function() {
2615 return e.props.setActiveModal("subscriptions")
2616 }
2617 ), 250)
2618 }
2619 ,
2620 e
2621 }
2622 return Object(m.a)(a, [{
2623 key: "render",
2624 value: function() {
2625 var e = this.props
2626 , t = e.type
2627 , a = e.title
2628 , i = e.description
2629 , o = e.fallbackImage
2630 , s = e.showSubscriptionInfo
2631 , c = e.profile
2632 , l = 74
2633 , m = 28;
2634 "small" === t && (l = 52,
2635 m = 22);
2636 var d = c.visual_color_id > 0 || c.visual_emoji_id
2637 , u = S.getColorValue(c.visual_color_id)
2638 , p = r.a.createElement(n.Fragment, null, S.formatMainBalance(c.balance / 1e3, c.balance > 5e4 ? 0 : 3), " ", S.getEmojiPic("toilet", 36))
2639 , _ = L()({
2640 ProfilePreview__profile: !0,
2641 "ProfilePreview__profile--small": "small" === t
2642 });
2643 return r.a.createElement("div", {
2644 className: "ProfilePreview"
2645 }, r.a.createElement("div", {
2646 className: _,
2647 onClick: this.onProfileClick
2648 }, r.a.createElement(me, {
2649 profile: c,
2650 imageSize: l,
2651 emojiSize: m,
2652 fallbackImage: o
2653 }), r.a.createElement("div", {
2654 className: "ProfilePreview__profile-data"
2655 }, r.a.createElement("div", {
2656 className: "ProfilePreview__profile-title",
2657 style: {
2658 color: u
2659 }
2660 }, a || "".concat(c.first_name, " ").concat(c.last_name)), r.a.createElement("div", {
2661 className: "ProfilePreview__profile-description"
2662 }, i || p), d > 0 && s && r.a.createElement("div", {
2663 className: "ProfilePreview__profile-subscription",
2664 style: {
2665 color: u
2666 },
2667 onClick: this.onSubscriptionClick
2668 }, "\u0418\u043c\u0435\u0435\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 ", r.a.createElement("span", null, "VK Donut")))))
2669 }
2670 }]),
2671 a
2672 }(r.a.Component));
2673 at.defaultProps = {
2674 type: "default",
2675 title: "",
2676 description: "",
2677 fallbackImage: "",
2678 showSubscriptionInfo: !1,
2679 profile: ce,
2680 onClick: null
2681 };
2682 var nt = {
2683 setActiveModal: ee
2684 }
2685 , rt = Object(p.c)((function(e) {
2686 return {
2687 user: e.user
2688 }
2689 }
2690 ), nt)(at)
2691 , it = (a(210),
2692 function(e) {
2693 Object(d.a)(a, e);
2694 var t = Object(u.a)(a);
2695 function a() {
2696 return Object(l.a)(this, a),
2697 t.apply(this, arguments)
2698 }
2699 return Object(m.a)(a, [{
2700 key: "render",
2701 value: function() {
2702 return r.a.createElement("div", {
2703 className: "FallbackContainer"
2704 }, r.a.createElement("div", {
2705 className: "FallbackContainer__loader"
2706 }, r.a.createElement("div", null), r.a.createElement("div", null)))
2707 }
2708 }]),
2709 a
2710 }(r.a.Component))
2711 , ot = function(e) {
2712 Object(d.a)(a, e);
2713 var t = Object(u.a)(a);
2714 function a() {
2715 var e;
2716 Object(l.a)(this, a);
2717 for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++)
2718 r[i] = arguments[i];
2719 return (e = t.call.apply(t, [this].concat(r))).loadProfileData = Object(tt.a)(et.a.mark((function t() {
2720 var a;
2721 return et.a.wrap((function(t) {
2722 for (; ; )
2723 switch (t.prev = t.next) {
2724 case 0:
2725 a = e.props.app.profileWindow,
2726 S.requestProfilesToCache([a.params.user_id]);
2727 case 2:
2728 case "end":
2729 return t.stop()
2730 }
2731 }
2732 ), t)
2733 }
2734 ))),
2735 e
2736 }
2737 return Object(m.a)(a, [{
2738 key: "componentDidMount",
2739 value: function() {
2740 var e = this.props.app.profileWindow;
2741 this.loadProfileData().then(),
2742 S.requestUsersToCache([e.params.user_id]),
2743 T()("reachGoal", "open_window:profile")
2744 }
2745 }, {
2746 key: "render",
2747 value: function() {
2748 var e = this
2749 , t = this.props.app
2750 , a = this.props.user.object
2751 , n = t.profileWindow
2752 , i = this.props.app.users
2753 , o = this.props.app.profiles
2754 , s = S.findUser(i, n.params.user_id)
2755 , c = S.findProfile(o, n.params.user_id);
2756 if (!("id"in c) || !("user_id"in s))
2757 return r.a.createElement("div", {
2758 className: "ProfileWindow"
2759 }, r.a.createElement(it, null));
2760 var l = S.formatMainBalance(s.improvements_sum / 1e3, s.improvements_sum > 25e4 ? 0 : 3)
2761 , m = S.formatMainBalance((s.bonuses_sum + 1) / 1e3, s.bonuses_sum > 5e4 ? 0 : 3);
2762 return r.a.createElement("div", {
2763 className: "ProfileWindow"
2764 }, r.a.createElement(rt, {
2765 type: "default",
2766 showSubscriptionInfo: !0,
2767 profile: s,
2768 onClick: function() {
2769 return S.openLink("https://vk.com/id" + n.params.user_id)
2770 }
2771 }), r.a.createElement("div", {
2772 className: "ProfileWindow__stats"
2773 }, r.a.createElement("div", {
2774 className: "ProfileWindow__stats-item"
2775 }, "+", l, "/\u0441\u0435\u043a"), r.a.createElement("div", {
2776 className: "ProfileWindow__stats-item"
2777 }, "+", m, "/\u0441\u043a\u0440\u043e\u043b\u043b")), r.a.createElement("div", {
2778 className: "ProfileWindow__buttons"
2779 }, s.user_id !== a.user_id && r.a.createElement(O, {
2780 stretched: !0,
2781 color: "primary",
2782 disabled: !1,
2783 onClick: function() {
2784 e.props.setActiveWindow("transfer", {
2785 peer_id: c.id,
2786 params: {}
2787 })
2788 }
2789 }, "\u041f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438"), s.is_steal_available && r.a.createElement(O, {
2790 stretched: !0,
2791 color: "negative",
2792 disabled: !1,
2793 onClick: function() {
2794 j.sendEvent("steal", {
2795 user_id: s.user_id
2796 }),
2797 e.props.hideActiveWindow()
2798 }
2799 }, "\u0423\u043a\u0440\u0430\u0441\u0442\u044c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c")))
2800 }
2801 }]),
2802 a
2803 }(r.a.Component)
2804 , st = {
2805 addCacheProfiles: X,
2806 setActiveWindow: te,
2807 hideActiveWindow: ne,
2808 setWindowParam: ae
2809 }
2810 , ct = Object(p.c)((function(e) {
2811 return {
2812 app: e.app,
2813 user: e.user,
2814 items: e.items,
2815 disinfectants: e.disinfectants
2816 }
2817 }
2818 ), st)(ot)
2819 , lt = (a(211),
2820 a(27))
2821 , mt = a.n(lt)
2822 , dt = function(e) {
2823 Object(d.a)(a, e);
2824 var t = Object(u.a)(a);
2825 function a(e) {
2826 var n;
2827 Object(l.a)(this, a),
2828 (n = t.call(this, e)).onObjectSelect = function(e) {
2829 n.setState({
2830 selected_object: e
2831 })
2832 }
2833 ,
2834 n.getSelectedObject = function() {
2835 var e = n.getObjects();
2836 return e[n.state.selected_object] || e[0] || {}
2837 }
2838 ,
2839 n.getObjects = function() {
2840 var e = n.props.user.object
2841 , t = n.props.items.items
2842 , a = n.props.disinfectants.items
2843 , r = [];
2844 return r.push({
2845 icon: "toilet",
2846 name: "\u0420\u0443\u043b\u043e\u043d\u044b",
2847 count: e.balance,
2848 object_type: "balance",
2849 object_type_id: 0
2850 }),
2851 a.forEach((function(e) {
2852 r.push({
2853 icon: e.icon,
2854 name: e.name,
2855 count: e.current_count,
2856 object_type: "disinfectants",
2857 object_type_id: e.type_id
2858 })
2859 }
2860 )),
2861 t.forEach((function(e) {
2862 r.push({
2863 icon: e.icon,
2864 name: e.name,
2865 count: e.current_count,
2866 object_type: "items",
2867 object_type_id: e.type_id
2868 })
2869 }
2870 )),
2871 r
2872 }
2873 ,
2874 n.onAmountInput = function(e) {
2875 var t = e.split(",").join(".")
2876 , a = n.getSelectedObject();
2877 t.length >= 14 || n.setState({
2878 amount: "" === e ? "" : "balance" === a.object_type ? S.roundFloat(t) : S.roundInt(t)
2879 })
2880 }
2881 ,
2882 n.submitTransfer = function() {
2883 n.props.setWindowParam("transfer", "fetching", !0);
2884 var e = n.getSelectedObject()
2885 , t = "balance" === e.object_type ? 1e3 * n.state.amount : n.state.amount;
2886 j.sendEvent("transfer", [n.peer_id, S.roundInt(t), e.object_type, e.object_type_id, n.state.payload])
2887 }
2888 ,
2889 n.state = {
2890 amount: "",
2891 fetching: !1,
2892 selected_object: 0,
2893 locked: !1,
2894 payload: 0
2895 };
2896 var r = n.props.app.transferWindow;
2897 return n.peer_id = r.params.peer_id,
2898 n.transferParams = r.params.params,
2899 n.isProfileTransfer = n.peer_id > 0,
2900 n.isMerchantTransfer = n.peer_id < 0,
2901 n
2902 }
2903 return Object(m.a)(a, [{
2904 key: "componentDidMount",
2905 value: function() {
2906 if (this.isProfileTransfer ? S.requestProfilesToCache([this.peer_id]) : this.isMerchantTransfer && j.sendEvent("merchant:info", {
2907 merchant_id: Math.abs(this.peer_id)
2908 }),
2909 this.isMerchantTransfer) {
2910 var e = {};
2911 this.transferParams.amount && (e.amount = this.transferParams.amount / 1e3),
2912 this.transferParams.payload && (e.payload = this.transferParams.payload),
2913 this.transferParams.locked && (e.locked = this.transferParams.locked),
2914 this.setState(e)
2915 }
2916 T()("reachGoal", "open_window:transfer")
2917 }
2918 }, {
2919 key: "render",
2920 value: function() {
2921 var e = this
2922 , t = this.props.app
2923 , a = this.props.app.users
2924 , n = this.props.app.profiles
2925 , i = t.transferWindow
2926 , o = function(e) {
2927 return r.a.createElement("div", {
2928 className: "TransferWindow TransferWindow--error"
2929 }, r.a.createElement("div", {
2930 className: "TransferWindow__result"
2931 }, r.a.createElement("div", {
2932 className: "TransferWindow__result-title"
2933 }, "\u041e\u0448\u0438\u0431\u043a\u0430"), r.a.createElement("div", {
2934 className: "TransferWindow__result-description"
2935 }, e)))
2936 };
2937 if (!this.isProfileTransfer && !this.isMerchantTransfer)
2938 return o("\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u0435");
2939 var s = this.isProfileTransfer ? S.findUser(a, this.peer_id) : {}
2940 , l = this.isProfileTransfer ? S.findProfile(n, this.peer_id) : {};
2941 if (this.isProfileTransfer && !l.id)
2942 return o("\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0435");
2943 if (this.isMerchantTransfer && (!i.merchant || !i.merchant.merchant_id))
2944 return o("\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043c\u0435\u0440\u0447\u0430\u043d\u0442\u0435");
2945 var m = {
2946 avatar: "",
2947 name: "",
2948 description: ""
2949 };
2950 this.isProfileTransfer ? (m.avatar = l.photo_200 || l.photo_100,
2951 m.name = l.first_name_dat,
2952 m.description = "@".concat(l.domain) || !1) : this.isMerchantTransfer && (m.avatar = i.merchant.avatar || mt.a,
2953 m.name = "\u0432 ".concat(i.merchant.name ? '"'.concat(i.merchant.name, '"') : "\u043c\u0430\u0433\u0430\u0437\u0438\u043d"),
2954 m.description = "#" + i.merchant.merchant_id);
2955 var d = this.getObjects()
2956 , u = this.getSelectedObject()
2957 , p = r.a.createElement("div", {
2958 className: "TransferWindow__profile",
2959 onClick: function() {
2960 e.isProfileTransfer && S.openLink("https://vk.com/id" + l.id),
2961 e.isMerchantTransfer && S.openLink("https://vk.com/club" + i.merchant.group_id)
2962 }
2963 }, r.a.createElement("div", {
2964 className: "TransferWindow__profile-avatar"
2965 }, r.a.createElement("img", {
2966 alt: "",
2967 referrerPolicy: "no-referrer",
2968 src: m.avatar,
2969 onError: function(e) {
2970 e.target.src = mt.a
2971 }
2972 })), r.a.createElement("div", {
2973 className: "TransferWindow__profile-data"
2974 }, r.a.createElement("div", {
2975 className: "TransferWindow__profile-name"
2976 }, "\u041f\u0435\u0440\u0435\u0432\u043e\u0434 ", m.name), r.a.createElement("div", {
2977 className: "TransferWindow__profile-domain"
2978 }, m.description)));
2979 if (this.isProfileTransfer && (p = r.a.createElement(rt, {
2980 type: "default",
2981 profile: Object(c.a)({}, l, {}, s),
2982 title: "\u041f\u0435\u0440\u0435\u0432\u043e\u0434 ".concat(m.name),
2983 description: m.description
2984 })),
2985 i.is_finished) {
2986 var _ = L()({
2987 TransferWindow: !0,
2988 "TransferWindow--error": !i.is_success
2989 })
2990 , v = i.result.transfer;
2991 return r.a.createElement("div", {
2992 className: _
2993 }, p, r.a.createElement("div", {
2994 className: "TransferWindow__result"
2995 }, r.a.createElement("div", {
2996 className: "TransferWindow__result-title"
2997 }, i.is_success ? "\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d" : i.result), r.a.createElement("div", {
2998 className: "TransferWindow__result-description"
2999 }, i.is_success ? r.a.createElement("span", null, "id: ", v.transfer_id, ", eid: ", v.external_id, ", t: ", v.create_date) : r.a.createElement("span", null, "\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d")), r.a.createElement("div", {
3000 className: "TransferWindow__result-button"
3001 }, r.a.createElement(O, {
3002 color: i.is_success ? "primary" : "negative",
3003 stretched: !0,
3004 onClick: function() {
3005 return window.history.back()
3006 }
3007 }, "\u0417\u0430\u043a\u0440\u044b\u0442\u044c"))))
3008 }
3009 return r.a.createElement("div", {
3010 className: "TransferWindow"
3011 }, p, this.isProfileTransfer && s.can_be_dishonest && r.a.createElement("div", {
3012 className: "TransferWindow__warning"
3013 }, "\u0411\u0443\u0434\u044c\u0442\u0435 \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u044b \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u044d\u0442\u043e\u043c\u0443 \u0438\u0433\u0440\u043e\u043a\u0443, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043d\u0430 \u043d\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0436\u0430\u043b\u043e\u0431"), r.a.createElement("div", {
3014 className: "TransferWindow__objects"
3015 }, r.a.createElement(C.d, {
3016 slideWidth: "100%",
3017 bullets: "dark",
3018 align: "center",
3019 style: {
3020 height: 110
3021 },
3022 onChange: this.onObjectSelect
3023 }, d.map((function(e) {
3024 return r.a.createElement("div", {
3025 className: "TransferWindow__object-wrapper",
3026 key: [e.object_type, e.object_type_id].join(" ")
3027 }, r.a.createElement("div", {
3028 className: "TransferWindow__object"
3029 }, r.a.createElement("div", {
3030 className: "TransferWindow__object-icon"
3031 }, S.getEmojiPic(e.icon, 100)), r.a.createElement("div", {
3032 className: "TransferWindow__object-data"
3033 }, r.a.createElement("div", {
3034 className: "TransferWindow__object-name"
3035 }, e.name), r.a.createElement("div", {
3036 className: "TransferWindow__object-info"
3037 }, e.count > 0 ? "balance" === e.object_type ? S.formatMainBalance(e.count / 1e3, 3) : S.formatNumber(e.count) : "\u041d\u0435\u0442", "balance" === e.object_type ? " \u043d\u0430 \u0431\u0430\u043b\u0430\u043d\u0441\u0435" : " \u0432 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u0435"))))
3038 }
3039 )))), r.a.createElement("div", {
3040 className: "TransferWindow__input"
3041 }, r.a.createElement("input", {
3042 min: "0",
3043 placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e",
3044 disabled: this.state.locked,
3045 readOnly: this.state.locked,
3046 value: this.state.amount,
3047 type: "number",
3048 inputMode: "decimal",
3049 onChange: function(t) {
3050 return e.onAmountInput(t.target.value)
3051 }
3052 })), r.a.createElement("div", {
3053 className: "TransferWindow__button"
3054 }, r.a.createElement(O, {
3055 stretched: !0,
3056 color: "primary",
3057 disabled: i.fetching || ("balance" === u.object_type ? u.count / 1e3 : u.count) <= 0 || this.state.amount <= 0 || this.state.amount > ("balance" === u.object_type ? u.count / 1e3 : u.count),
3058 onClick: function() {
3059 return e.submitTransfer()
3060 }
3061 }, "\u041f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438")))
3062 }
3063 }]),
3064 a
3065 }(r.a.Component)
3066 , ut = {
3067 setWindowParam: ae
3068 }
3069 , pt = Object(p.c)((function(e) {
3070 return {
3071 app: e.app,
3072 user: e.user,
3073 items: e.items,
3074 disinfectants: e.disinfectants
3075 }
3076 }
3077 ), ut)(dt)
3078 , _t = (a(212),
3079 function(e) {
3080 Object(d.a)(a, e);
3081 var t = Object(u.a)(a);
3082 function a() {
3083 var e;
3084 Object(l.a)(this, a);
3085 for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++)
3086 r[i] = arguments[i];
3087 return (e = t.call.apply(t, [this].concat(r))).submitCreateMerchant = function() {
3088 e.props.setWindowParam("merchant", "fetching", !0),
3089 j.sendEvent("merchant_create")
3090 }
3091 ,
3092 e
3093 }
3094 return Object(m.a)(a, [{
3095 key: "componentDidMount",
3096 value: function() {
3097 T()("reachGoal", "open_window:merchant")
3098 }
3099 }, {
3100 key: "render",
3101 value: function() {
3102 var e = this
3103 , t = this.props.app.merchantWindow;
3104 if (t.is_finished) {
3105 var a = L()({
3106 MerchantWindow: !0,
3107 "MerchantWindow--error": !t.is_success
3108 });
3109 return r.a.createElement("div", {
3110 className: a
3111 }, r.a.createElement("div", {
3112 className: "MerchantWindow__result"
3113 }, r.a.createElement("div", {
3114 className: "MerchantWindow__result-title"
3115 }, t.is_success ? t.result.was_created ? "\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d" : "\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d" : t.result), r.a.createElement("div", {
3116 className: "MerchantWindow__result-description"
3117 }, t.is_success ? r.a.createElement("div", {
3118 className: "MerchantWindow__rows"
3119 }, r.a.createElement("div", {
3120 className: "MerchantWindow__row"
3121 }, r.a.createElement("div", {
3122 className: "MerchantWindow__row-title"
3123 }, "merchant_id"), r.a.createElement("div", {
3124 className: "MerchantWindow__input"
3125 }, r.a.createElement("input", {
3126 value: t.result.merchant_id
3127 }))), r.a.createElement("div", {
3128 className: "MerchantWindow__row"
3129 }, r.a.createElement("div", {
3130 className: "MerchantWindow__row-title"
3131 }, "access_token"), r.a.createElement("div", {
3132 className: "MerchantWindow__input"
3133 }, r.a.createElement("input", {
3134 value: t.result.access_token
3135 })))) : r.a.createElement("span", null, "\u041c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u043d")), r.a.createElement("div", {
3136 className: "MerchantWindow__result-button"
3137 }, r.a.createElement(O, {
3138 color: t.is_success ? "primary" : "negative",
3139 stretched: !0,
3140 onClick: function() {
3141 return window.history.back()
3142 }
3143 }, "\u0417\u0430\u043a\u0440\u044b\u0442\u044c"))))
3144 }
3145 return r.a.createElement("div", {
3146 className: "MerchantWindow"
3147 }, r.a.createElement("div", {
3148 className: "MerchantWindow__title"
3149 }, "\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430"), r.a.createElement("div", {
3150 className: "MerchantWindow__text"
3151 }, "\u0412 \u044d\u0442\u043e\u043c \u043e\u043a\u043d\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a API. ", r.a.createElement("br", null), "\u0415\u0441\u043b\u0438 \u0432\u044b \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438 \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u0440\u0430\u043d\u0435\u0435, \u0442\u043e \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043d\u043e\u0432\u044b\u0439 access_token."), r.a.createElement("div", {
3152 className: "MerchantWindow__button"
3153 }, r.a.createElement(O, {
3154 stretched: !0,
3155 color: "primary",
3156 disabled: t.fetching,
3157 onClick: function() {
3158 return e.submitCreateMerchant()
3159 }
3160 }, "\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u0430\u0433\u0430\u0437\u0438\u043d")))
3161 }
3162 }]),
3163 a
3164 }(r.a.Component))
3165 , vt = {
3166 setWindowParam: ae
3167 }
3168 , ft = Object(p.c)((function(e) {
3169 return {
3170 app: e.app,
3171 user: e.user,
3172 items: e.items,
3173 disinfectants: e.disinfectants
3174 }
3175 }
3176 ), vt)(_t)
3177 , ht = (a(213),
3178 function(e) {
3179 Object(d.a)(a, e);
3180 var t = Object(u.a)(a);
3181 function a() {
3182 var e;
3183 Object(l.a)(this, a);
3184 for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++)
3185 r[i] = arguments[i];
3186 return (e = t.call.apply(t, [this].concat(r))).buyImprovement = function(e) {
3187 j.sendEvent("improvements:buy", {
3188 type_id: e
3189 })
3190 }
3191 ,
3192 e
3193 }
3194 return Object(m.a)(a, [{
3195 key: "componentDidMount",
3196 value: function() {
3197 T()("reachGoal", "open_window:improvement")
3198 }
3199 }, {
3200 key: "render",
3201 value: function() {
3202 var e = this
3203 , t = this.props.app
3204 , a = this.props.user.object
3205 , n = t.improvementWindow.params
3206 , i = this.props.improvements.items.find((function(e) {
3207 return n.type_id === e.type_id
3208 }
3209 ));
3210 if (!i)
3211 return r.a.createElement("div", {
3212 className: "ImprovementWindow"
3213 }, "\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e");
3214 var o = {
3215 backgroundImage: "url('".concat(S.getEmojiLink(i.icon, 200), "')")
3216 }
3217 , s = S.formatNumber(i.current_cost / 1e3)
3218 , c = S.formatNumber(i.speed / 1e3)
3219 , l = S.roundFloat(i.speed * i.current_count / 1e3, !0);
3220 return r.a.createElement("div", {
3221 className: "ImprovementWindow"
3222 }, r.a.createElement("div", {
3223 className: "ImprovementWindow__bg",
3224 style: o
3225 }), r.a.createElement("div", {
3226 className: "ImprovementWindow__content"
3227 }, r.a.createElement("div", {
3228 className: "ImprovementWindow__title"
3229 }, i.name), r.a.createElement("div", {
3230 className: "ImprovementWindow__speed"
3231 }, "\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c: +", c, "/\u0441\u0435\u043a"), r.a.createElement("div", {
3232 className: "ImprovementWindow__description"
3233 }, "\u0423 \u0442\u0435\u0431\u044f \u0435\u0441\u0442\u044c: ", i.current_count, " ", i.current_count > 0 ? "(+".concat(l, "/\u0441\u0435\u043a)") : "\u0448\u0442."), r.a.createElement("div", {
3234 className: "ImprovementWindow__quote"
3235 }, "\xab", i.description, "\xbb"), r.a.createElement("div", {
3236 className: "ImprovementWindow__button"
3237 }, r.a.createElement(O, {
3238 stretched: !0,
3239 color: "primary",
3240 disabled: a.balance < i.current_cost,
3241 onClick: function() {
3242 return e.buyImprovement(i.type_id)
3243 }
3244 }, s, " ", S.getEmojiPic("toilet", 36)))))
3245 }
3246 }]),
3247 a
3248 }(r.a.Component))
3249 , bt = Object(p.c)((function(e) {
3250 return {
3251 app: e.app,
3252 user: e.user,
3253 improvements: e.improvements
3254 }
3255 }
3256 ), {})(ht)
3257 , Et = (a(214),
3258 function(e) {
3259 Object(d.a)(a, e);
3260 var t = Object(u.a)(a);
3261 function a() {
3262 var e;
3263 Object(l.a)(this, a);
3264 for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++)
3265 r[i] = arguments[i];
3266 return (e = t.call.apply(t, [this].concat(r))).onColorUpdate = function(e) {
3267 j.sendEvent("visual:update", {
3268 field: "color",
3269 value: e
3270 })
3271 }
3272 ,
3273 e.onEmojiUpdate = function(e) {
3274 j.sendEvent("visual:update", {
3275 field: "emoji",
3276 value: e
3277 })
3278 }
3279 ,
3280 e
3281 }
3282 return Object(m.a)(a, [{
3283 key: "componentDidMount",
3284 value: function() {
3285 T()("reachGoal", "open_window:customization")
3286 }
3287 }, {
3288 key: "render",
3289 value: function() {
3290 var e = this
3291 , t = this.props.user.object
3292 , a = this.props.user.subscription
3293 , n = S.getCustomizableColors()
3294 , i = S.getCustomizableEmojis()
3295 , o = t.visual_color_id || 0
3296 , s = t.visual_emoji_id || 0;
3297 return !a.is_active || a.level < 2 ? r.a.createElement("div", {
3298 className: "CustomizationWindow"
3299 }, r.a.createElement("div", {
3300 className: "CustomizationWindow__content"
3301 }, r.a.createElement("div", {
3302 className: "CustomizationWindow__title"
3303 }, "\u041a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044f"), r.a.createElement("div", {
3304 className: "CustomizationWindow__description"
3305 }, "\u0423\u043f\u0441, \u044d\u0442\u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u0432 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 VK Donut 2-\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f"))) : r.a.createElement("div", {
3306 className: "CustomizationWindow"
3307 }, r.a.createElement("div", {
3308 className: "CustomizationWindow__content"
3309 }, r.a.createElement("div", {
3310 className: "CustomizationWindow__title"
3311 }, "\u041a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044f"), r.a.createElement("div", {
3312 className: "CustomizationWindow__preview"
3313 }, r.a.createElement(rt, {
3314 type: "default",
3315 profile: t
3316 })), r.a.createElement("div", {
3317 className: "CustomizationWindow__description"
3318 }, "\u0422\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0432\u043e\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0432 \u0438\u0433\u0440\u0435"), r.a.createElement("div", {
3319 className: "CustomizationWindow__settings"
3320 }, r.a.createElement("div", {
3321 className: "CustomizationWindow__settings-row"
3322 }, r.a.createElement("div", {
3323 className: "CustomizationWindow__settings-row-label"
3324 }, "\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0446\u0432\u0435\u0442"), r.a.createElement("div", {
3325 className: "CustomizationWindow__settings-row-data"
3326 }, r.a.createElement("div", {
3327 className: "CustomizationWindow__settings-colors"
3328 }, n.map((function(t) {
3329 return r.a.createElement("div", {
3330 className: L()({
3331 "CustomizationWindow__settings-color": !0,
3332 "CustomizationWindow__settings-color--active": t.color_id === o
3333 }),
3334 key: t.color_id,
3335 style: {
3336 backgroundColor: 0 === t.color_id ? "#D7D7D7" : t.color
3337 },
3338 onClick: function() {
3339 return e.onColorUpdate(t.color_id)
3340 }
3341 })
3342 }
3343 ))))), r.a.createElement("div", {
3344 className: "CustomizationWindow__settings-row"
3345 }, r.a.createElement("div", {
3346 className: "CustomizationWindow__settings-row-label"
3347 }, "\u042d\u043c\u043e\u0434\u0437\u0438"), r.a.createElement("div", {
3348 className: "CustomizationWindow__settings-row-data"
3349 }, r.a.createElement("div", {
3350 className: "CustomizationWindow__settings-emojis"
3351 }, r.a.createElement(C.e, null, i.map((function(t) {
3352 return r.a.createElement("div", {
3353 className: "CustomizationWindow__settings-emoji-wrapper",
3354 key: t.emoji_id
3355 }, r.a.createElement("div", {
3356 className: L()({
3357 "CustomizationWindow__settings-emoji": !0,
3358 "CustomizationWindow__settings-emoji--active": t.emoji_id === s
3359 })
3360 }, r.a.createElement("img", {
3361 alt: "",
3362 src: S.getEmojiLink(t.emoji, 160),
3363 onClick: function() {
3364 return e.onEmojiUpdate(t.emoji_id)
3365 }
3366 })))
3367 }
3368 ))))))), r.a.createElement("div", {
3369 className: "CustomizationWindow__footer"
3370 }, r.a.createElement(O, {
3371 stretched: !0,
3372 color: "primary",
3373 onClick: function() {
3374 return window.history.back()
3375 }
3376 }, "\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c"))))
3377 }
3378 }]),
3379 a
3380 }(r.a.Component))
3381 , gt = {
3382 addToast: Q
3383 }
3384 , yt = Object(p.c)((function(e) {
3385 return {
3386 user: e.user
3387 }
3388 }
3389 ), gt)(Et)
3390 , kt = function(e) {
3391 Object(d.a)(a, e);
3392 var t = Object(u.a)(a);
3393 function a() {
3394 var e;
3395 Object(l.a)(this, a);
3396 for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++)
3397 r[i] = arguments[i];
3398 return (e = t.call.apply(t, [this].concat(r))).onBackdropClick = function() {
3399 window.history.back()
3400 }
3401 ,
3402 e
3403 }
3404 return Object(m.a)(a, [{
3405 key: "renderWindow",
3406 value: function(e, t) {
3407 if (this.props.app.activeWindow === e)
3408 return t
3409 }
3410 }, {
3411 key: "render",
3412 value: function() {
3413 var e = this
3414 , t = this.props.app
3415 , a = L()({
3416 App__backdrop: !0,
3417 "App__backdrop--active": t.toasts.length > 0 || null !== t.activeWindow
3418 })
3419 , n = L()({
3420 App: !0,
3421 "App--activeModal": null !== t.activeModal
3422 });
3423 return r.a.createElement("div", {
3424 className: n
3425 }, r.a.createElement("div", {
3426 className: "App__container"
3427 }, this.props.children), r.a.createElement("div", {
3428 className: a,
3429 onClick: function() {
3430 return e.onBackdropClick()
3431 }
3432 }), r.a.createElement("div", {
3433 className: "App__wrapper"
3434 }, r.a.createElement(qe, null), null !== t.activeWindow && r.a.createElement("div", {
3435 className: "App__window"
3436 }, r.a.createElement("div", {
3437 className: "App__window-container"
3438 }, this.renderWindow("bonus", r.a.createElement(Je, null)), this.renderWindow("share", r.a.createElement(Ze, null)), this.renderWindow("profile", r.a.createElement(ct, null)), this.renderWindow("transfer", r.a.createElement(pt, null)), this.renderWindow("merchant", r.a.createElement(ft, null)), this.renderWindow("improvement", r.a.createElement(bt, null)), this.renderWindow("customization", r.a.createElement(yt, null))))))
3439 }
3440 }]),
3441 a
3442 }(r.a.Component)
3443 , Tt = Object(p.c)((function(e) {
3444 return {
3445 app: e.app
3446 }
3447 }
3448 ), {})(kt)
3449 , Nt = (a(215),
3450 function(e) {
3451 Object(d.a)(a, e);
3452 var t = Object(u.a)(a);
3453 function a() {
3454 return Object(l.a)(this, a),
3455 t.apply(this, arguments)
3456 }
3457 return Object(m.a)(a, [{
3458 key: "render",
3459 value: function() {
3460 var e = this.props.app.error;
3461 return r.a.createElement("div", {
3462 className: "Error"
3463 }, r.a.createElement("div", {
3464 className: "Error__container"
3465 }, r.a.createElement("div", {
3466 className: "Error__container-message"
3467 }, e.description), 4 === e.code && r.a.createElement("div", {
3468 className: "Error__container-info",
3469 onClick: function() {
3470 return S.openLink("https://vk.me/paper_scroll")
3471 }
3472 }, '\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u044c\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 "\u0411\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430" \u0432 \u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 ', r.a.createElement("b", null, "@paper_scroll"), "."), r.a.createElement("div", {
3473 className: "Error__container-button"
3474 }, 10 !== e.code && r.a.createElement(O, {
3475 onClick: function() {
3476 return window.location.reload(!0)
3477 }
3478 }, "\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c")), r.a.createElement("div", {
3479 className: "Error__container-footer"
3480 }, r.a.createElement("div", {
3481 className: "Error__footer-mention"
3482 }, r.a.createElement("a", {
3483 href: "https://vk.com/paper_scroll",
3484 target: "_blank",
3485 rel: "noopener noreferrer"
3486 }, "@paper_scroll")), r.a.createElement("div", {
3487 className: "Error__footer-description"
3488 }, "#", e.code, " - ", e.message))))
3489 }
3490 }]),
3491 a
3492 }(r.a.Component))
3493 , wt = Object(p.c)((function(e) {
3494 return {
3495 app: e.app,
3496 user: e.user
3497 }
3498 }
3499 ), {})(Nt)
3500 , jt = (a(216),
3501 function(e) {
3502 Object(d.a)(a, e);
3503 var t = Object(u.a)(a);
3504 function a() {
3505 var e;
3506 Object(l.a)(this, a);
3507 for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++)
3508 r[i] = arguments[i];
3509 return (e = t.call.apply(t, [this].concat(r))).getTabCx = function(t) {
3510 var a = e.props.app
3511 , n = e.props.user.object;
3512 return L()({
3513 "NavBar__container-button": !0,
3514 "NavBar__container-button--infected": n.is_infected,
3515 "NavBar__container-button--active": a.openedTab === t
3516 })
3517 }
3518 ,
3519 e.openTab = function(t) {
3520 e.props.setActiveTab(t)
3521 }
3522 ,
3523 e
3524 }
3525 return Object(m.a)(a, [{
3526 key: "render",
3527 value: function() {
3528 var e = this
3529 , t = this.props.app
3530 , a = this.props.user.object
3531 , n = y.a.parse(window.location.search)
3532 , i = L()({
3533 NavBar__layout: !0,
3534 "NavBar__layout--ios": "mobile_iphone" === n.vk_platform,
3535 "NavBar__layout--hidden": null !== t.activeModal
3536 });
3537 return a.is_onboard_completed ? r.a.createElement("div", {
3538 className: i
3539 }, r.a.createElement("div", {
3540 className: "NavBar__container"
3541 }, r.a.createElement("div", {
3542 className: this.getTabCx("main"),
3543 onClick: function() {
3544 return e.openTab("main")
3545 }
3546 }, r.a.createElement("span", {
3547 className: "NavBar__icon-game"
3548 })), r.a.createElement("div", {
3549 className: this.getTabCx("information"),
3550 onClick: function() {
3551 return e.openTab("information")
3552 }
3553 }, r.a.createElement("span", {
3554 className: "NavBar__icon-stats"
3555 })), r.a.createElement("div", {
3556 className: this.getTabCx("profile"),
3557 onClick: function() {
3558 return e.openTab("profile")
3559 }
3560 }, r.a.createElement("span", {
3561 className: "NavBar__icon-profile"
3562 }), t.config.broadcast_id && r.a.createElement("div", {
3563 className: "NavBar__button-badge"
3564 }, "LIVE")))) : null
3565 }
3566 }]),
3567 a
3568 }(r.a.Component))
3569 , At = {
3570 setActiveTab: q
3571 }
3572 , St = Object(p.c)((function(e) {
3573 return {
3574 user: e.user,
3575 app: e.app
3576 }
3577 }
3578 ), At)(jt)
3579 , Pt = (a(217),
3580 function(e) {
3581 Object(d.a)(a, e);
3582 var t = Object(u.a)(a);
3583 function a(e) {
3584 var i;
3585 return Object(l.a)(this, a),
3586 (i = t.call(this, e)).openTab = function(e) {
3587 "friends" === e && i.loadFriendsList().then((function() {}
3588 )),
3589 i.setState({
3590 activeTab: e
3591 }),
3592 T()("reachGoal", "open_tab:rating:".concat(e))
3593 }
3594 ,
3595 i.loadFriendsList = Object(tt.a)(et.a.mark((function e() {
3596 var t, a;
3597 return et.a.wrap((function(e) {
3598 for (; ; )
3599 switch (e.prev = e.next) {
3600 case 0:
3601 return e.prev = 0,
3602 e.next = 3,
3603 S.loadUserFriends();
3604 case 3:
3605 t = e.sent,
3606 i.props.addCacheProfiles(t),
3607 a = S.arrayColumns(t, "id"),
3608 i.props.setUserFriends(a),
3609 S.requestUsersToCacheIfNecessary(i.props.app.users, a),
3610 e.next = 13;
3611 break;
3612 case 10:
3613 e.prev = 10,
3614 e.t0 = e.catch(0),
3615 console.log("ratingPanel", e.t0);
3616 case 13:
3617 case "end":
3618 return e.stop()
3619 }
3620 }
3621 ), e, null, [[0, 10]])
3622 }
3623 ))),
3624 i.renderMainRating = function() {
3625 var e = i.props.ratings.users;
3626 return r.a.createElement("div", {
3627 className: "RatingPanel__rows"
3628 }, e.items.map((function(e, t) {
3629 return r.a.createElement("div", {
3630 key: e.user_id,
3631 className: "RatingPanel__row",
3632 onClick: function() {
3633 return i.props.setActiveWindow("profile", {
3634 user_id: e.user_id,
3635 balance: e.balance
3636 })
3637 }
3638 }, r.a.createElement("div", {
3639 className: "RatingPanel__row-place"
3640 }, t + 1), r.a.createElement(rt, {
3641 type: "small",
3642 profile: e
3643 }))
3644 }
3645 )))
3646 }
3647 ,
3648 i.renderFriendsRating = function() {
3649 var e = []
3650 , t = Object(s.a)(i.props.app.friends)
3651 , a = i.props.user.object
3652 , n = i.props.app.users;
3653 return 0 === t.length ? r.a.createElement("div", {
3654 className: "RatingPanel__rows"
3655 }, r.a.createElement("div", {
3656 className: "RatingPanel__rows-placeholder"
3657 }, "\u0421\u043f\u0438\u0441\u043e\u043a \u0434\u0440\u0443\u0437\u0435\u0439 \u043f\u0443\u0441\u0442")) : (t.forEach((function(t) {
3658 var a = S.findUser(n, t);
3659 e.push({
3660 id: t,
3661 balance: a.balance || 0
3662 })
3663 }
3664 )),
3665 e.push({
3666 id: a.user_id,
3667 balance: a.balance
3668 }),
3669 e = e.sort((function(e, t) {
3670 return t.balance - e.balance
3671 }
3672 )),
3673 r.a.createElement("div", {
3674 className: "RatingPanel__rows"
3675 }, e.map((function(e, t) {
3676 var o = S.findUser(n, e.id);
3677 return a.user_id === e.id && (o = a),
3678 "user_id"in o ? r.a.createElement("div", {
3679 key: e.id,
3680 className: "RatingPanel__row",
3681 onClick: function() {
3682 return i.props.setActiveWindow("profile", {
3683 user_id: e.id,
3684 balance: e.balance
3685 })
3686 }
3687 }, r.a.createElement("div", {
3688 className: "RatingPanel__row-place"
3689 }, t + 1), r.a.createElement(rt, {
3690 type: "small",
3691 profile: a.user_id === e.id ? a : o
3692 })) : null
3693 }
3694 ))))
3695 }
3696 ,
3697 i.renderDonsRating = function() {
3698 var e = i.props.ratings.dons
3699 , t = i.props.user.subscription
3700 , a = null;
3701 return S.isFuckingIOS() || (a = r.a.createElement("div", {
3702 className: "RatingPanel__info"
3703 }, r.a.createElement(O, {
3704 stretched: !0,
3705 color: t.is_active ? "gray" : "primary",
3706 onClick: function() {
3707 return i.props.setActiveModal("subscriptions")
3708 }
3709 }, t.is_active ? "\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u043e\u0439" : "\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e VK Donut"))),
3710 r.a.createElement(n.Fragment, null, r.a.createElement("div", {
3711 className: "RatingPanel__rows"
3712 }, e.items.map((function(t, a) {
3713 var n = e.profiles.find((function(e) {
3714 return e.user_id === t.user_id
3715 }
3716 ));
3717 return n ? r.a.createElement("div", {
3718 key: n.user_id,
3719 className: "RatingPanel__row",
3720 onClick: function() {
3721 return i.props.setActiveWindow("profile", {
3722 user_id: n.user_id,
3723 balance: n.balance
3724 })
3725 }
3726 }, r.a.createElement("div", {
3727 className: "RatingPanel__row-place"
3728 }, a + 1), r.a.createElement(rt, {
3729 type: "small",
3730 profile: n,
3731 description: "".concat(S.formatMainBalance(t.amount, 2), " \u20bd")
3732 })) : null
3733 }
3734 )), a))
3735 }
3736 ,
3737 i.renderGroupsRating = function() {
3738 var e = i.props.ratings.groups;
3739 return r.a.createElement("div", {
3740 className: "RatingPanel__rows"
3741 }, e.items.map((function(e, t) {
3742 return r.a.createElement("div", {
3743 className: "RatingPanel__row",
3744 key: e.group_id,
3745 onClick: function() {
3746 return S.openLink("https://vk.com/club" + e.group_id)
3747 }
3748 }, r.a.createElement("div", {
3749 className: "RatingPanel__row-place"
3750 }, t + 1), r.a.createElement("div", {
3751 className: "RatingPanel__row-avatar"
3752 }, r.a.createElement("img", {
3753 src: e.avatar,
3754 alt: ""
3755 })), r.a.createElement("div", {
3756 className: "RatingPanel__row-data"
3757 }, r.a.createElement("div", {
3758 className: "RatingPanel__row-data-title"
3759 }, e.name), r.a.createElement("div", {
3760 className: "RatingPanel__row-data-value"
3761 }, S.formatMainBalance(e.balance / 1e3, 3), " ", S.getEmojiPic("toilet", 36))))
3762 }
3763 )))
3764 }
3765 ,
3766 i.renderMerchantsRating = function() {
3767 var e = i.props.ratings.merchants;
3768 return r.a.createElement("div", {
3769 className: "RatingPanel__rows"
3770 }, e.items.map((function(e, t) {
3771 var a = e.avatar || mt.a
3772 , n = e.name || "\u041c\u0430\u0433\u0430\u0437\u0438\u043d #".concat(e.merchant_id);
3773 return r.a.createElement("div", {
3774 key: e.merchant_id,
3775 className: "RatingPanel__row",
3776 onClick: function() {
3777 e.group_id ? S.openLink("https://vk.com/club" + e.group_id) : i.props.setSnackbar("error", "\u0412\u043b\u0430\u0434\u0435\u043b\u0435\u0446 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043b \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0441\u0432\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e")
3778 }
3779 }, r.a.createElement("div", {
3780 className: "RatingPanel__row-place"
3781 }, t + 1), r.a.createElement("div", {
3782 className: "RatingPanel__row-avatar"
3783 }, r.a.createElement("img", {
3784 alt: "",
3785 referrerPolicy: "no-referrer",
3786 src: a,
3787 onError: function(e) {
3788 e.target.src = mt.a
3789 }
3790 })), r.a.createElement("div", {
3791 className: "RatingPanel__row-data"
3792 }, r.a.createElement("div", {
3793 className: "RatingPanel__row-data-title"
3794 }, n), r.a.createElement("div", {
3795 className: "RatingPanel__row-data-value"
3796 }, S.formatMainBalance(e.balance / 1e3, 3), " ", S.getEmojiPic("toilet", 36))))
3797 }
3798 )))
3799 }
3800 ,
3801 i.tabs = [{
3802 name: "\u041e\u0431\u0449\u0438\u0439",
3803 type: "main"
3804 }, {
3805 name: "\u0414\u0440\u0443\u0437\u044c\u044f",
3806 type: "friends"
3807 }, {
3808 name: "\u0414\u043e\u043d\u044b",
3809 type: "dons"
3810 }, {
3811 name: "\u0421\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430",
3812 type: "groups"
3813 }, {
3814 name: "\u041c\u0430\u0433\u0430\u0437\u0438\u043d\u044b",
3815 type: "merchants"
3816 }],
3817 i.state = {
3818 activeTab: "main"
3819 },
3820 i
3821 }
3822 return Object(m.a)(a, [{
3823 key: "componentDidMount",
3824 value: function() {
3825 T()("reachGoal", "open_tab:rating"),
3826 setTimeout((function() {
3827 return j.sendEvent("ratings:update")
3828 }
3829 ), 300),
3830 this.updateInverval = setInterval((function() {
3831 j.sendEvent("ratings:update")
3832 }
3833 ), 4e3 + S.rand(100, 3e3))
3834 }
3835 }, {
3836 key: "componentWillUnmount",
3837 value: function() {
3838 clearInterval(this.updateInverval)
3839 }
3840 }, {
3841 key: "render",
3842 value: function() {
3843 var e = this
3844 , t = this.props.user.object
3845 , a = this.props.group.object
3846 , n = this.props.ratings
3847 , i = n.users.items.findIndex((function(e) {
3848 return e.user_id === t.user_id
3849 }
3850 ))
3851 , o = n.groups.items.findIndex((function(e) {
3852 return a && a.group_id && e.group_id === a.group_id
3853 }
3854 ));
3855 return r.a.createElement("div", {
3856 className: "RatingPanel StyledGameWindow"
3857 }, r.a.createElement("div", {
3858 className: "RatingPanel__tabs"
3859 }, r.a.createElement(C.e, null, this.tabs.map((function(t) {
3860 return r.a.createElement("div", {
3861 className: "RatingPanel__tab-wrapper",
3862 key: t.type
3863 }, r.a.createElement("div", {
3864 children: t.name,
3865 onClick: function() {
3866 return e.openTab(t.type)
3867 },
3868 className: L()({
3869 RatingPanel__tab: !0,
3870 "RatingPanel__tab--active": e.state.activeTab === t.type
3871 })
3872 }))
3873 }
3874 )))), r.a.createElement("div", {
3875 className: "RatingPanel__content"
3876 }, "main" === this.state.activeTab && this.renderMainRating(), "friends" === this.state.activeTab && this.renderFriendsRating(), "groups" === this.state.activeTab && this.renderGroupsRating(), "merchants" === this.state.activeTab && this.renderMerchantsRating(), "dons" === this.state.activeTab && this.renderDonsRating()), "main" === this.state.activeTab && null !== n.users.current_place && r.a.createElement("div", {
3877 className: "RatingPanel__profile"
3878 }, r.a.createElement("div", {
3879 className: "RatingPanel__profile-container"
3880 }, r.a.createElement("div", {
3881 className: "RatingPanel__profile-place"
3882 }, "~", i > 0 ? i + 1 : n.users.current_place), r.a.createElement("div", {
3883 className: "RatingPanel__profile-avatar"
3884 }, r.a.createElement("img", {
3885 src: t.avatar || t.avatar_max,
3886 alt: ""
3887 })), r.a.createElement("div", {
3888 className: "RatingPanel__profile-data"
3889 }, r.a.createElement("div", {
3890 className: "RatingPanel__profile-name"
3891 }, t.first_name, " ", t.last_name), r.a.createElement("div", {
3892 className: "RatingPanel__profile-value"
3893 }, S.formatMainBalance(t.balance / 1e3, 3), " ", S.getEmojiPic("toilet", 36))))), "groups" === this.state.activeTab && null !== n.groups.current_place && r.a.createElement("div", {
3894 className: "RatingPanel__profile"
3895 }, r.a.createElement("div", {
3896 className: "RatingPanel__profile-container"
3897 }, r.a.createElement("div", {
3898 className: "RatingPanel__profile-place"
3899 }, "~", o > 0 ? o + 1 : n.groups.current_place), r.a.createElement("div", {
3900 className: "RatingPanel__profile-avatar"
3901 }, r.a.createElement("img", {
3902 src: a.avatar || a.avatar_max,
3903 alt: ""
3904 })), r.a.createElement("div", {
3905 className: "RatingPanel__profile-data"
3906 }, r.a.createElement("div", {
3907 className: "RatingPanel__profile-name"
3908 }, a.name), r.a.createElement("div", {
3909 className: "RatingPanel__profile-value"
3910 }, S.formatMainBalance(a.balance / 1e3, 3), " ", S.getEmojiPic("toilet", 36))))))
3911 }
3912 }]),
3913 a
3914 }(r.a.Component))
3915 , Lt = {
3916 setActiveWindow: te,
3917 setActiveModal: ee,
3918 setUserFriends: J,
3919 addCacheProfiles: X,
3920 setSnackbar: Z
3921 }
3922 , Ot = Object(p.c)((function(e) {
3923 return {
3924 app: e.app,
3925 user: e.user,
3926 group: e.group,
3927 ratings: e.ratings
3928 }
3929 }
3930 ), Lt)(Pt)
3931 , Ct = (a(218),
3932 a(85))
3933 , It = a.n(Ct)
3934 , Mt = function(e) {
3935 Object(d.a)(a, e);
3936 var t = Object(u.a)(a);
3937 function a(e) {
3938 var n;
3939 return Object(l.a)(this, a),
3940 (n = t.call(this, e)).shareLink = function() {
3941 var e = v.a.getStartParams()
3942 , t = "https://vk.com/app".concat(e.appId, "#t=").concat(e.userId);
3943 v.a.supports("VKWebAppCopyText") ? v.a.send("VKWebAppCopyText", {
3944 text: t
3945 }).then((function() {
3946 n.props.setSnackbar("success", "\u0421\u0441\u044b\u043b\u043a\u0430 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430")
3947 }
3948 )).catch((function(e) {
3949 console.log("shareLink", e)
3950 }
3951 )) : "desktop_web" === e.platform ? v.a.send("VKWebAppShowWallPostBox", {
3952 link_button: "open_url",
3953 link_image: "https://pp.userapi.com/cOce1YivlB304fwEe8APBf_lV_Q6JqXvSucRog/j5LMQrymQs4.jpg",
3954 link_title: "Paper Scroll",
3955 message: "\u041e\u0442\u043f\u0440\u0430\u0432\u044c \u043c\u043d\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0432 #PaperScroll",
3956 attachments: t
3957 }).then((function() {
3958 n.props.setSnackbar("success", "\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430")
3959 }
3960 )).catch((function(e) {
3961 console.log("shareLink", e)
3962 }
3963 )) : v.a.send("VKWebAppShare", {
3964 link: t
3965 }).then((function() {
3966 n.props.setSnackbar("success", "\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430")
3967 }
3968 )).catch((function(e) {
3969 console.log("shareLink", e)
3970 }
3971 ))
3972 }
3973 ,
3974 n.openWindow = function(e) {
3975 n.props.setActiveWindow("transfer", {
3976 peer_id: e.id,
3977 params: {}
3978 })
3979 }
3980 ,
3981 n.onSearch = function(e) {
3982 n.setState({
3983 search: e
3984 })
3985 }
3986 ,
3987 n.loadFriendsList = function() {
3988 S.loadUserFriends().then((function(e) {
3989 n.props.addCacheProfiles(e);
3990 var t = S.arrayColumns(e, "id");
3991 n.props.setUserFriends(t),
3992 S.requestUsersToCacheIfNecessary(n.props.app.users, t)
3993 }
3994 )).catch((function(e) {
3995 console.error("transferPanel", e.code, e.type),
3996 console.error("transferPanel", e.toString()),
3997 1 === e.code && setTimeout((function() {
3998 return n.loadFriendsList()
3999 }
4000 ), 1e3)
4001 }
4002 ))
4003 }
4004 ,
4005 n.getUserIdsList = function() {
4006 return n.state.is_cached_search ? n.props.app.lastProfiles.map((function(e) {
4007 return e.id
4008 }
4009 )) : Object(s.a)(n.state.user_ids)
4010 }
4011 ,
4012 n.state = {
4013 search: "",
4014 is_cached_search: !1,
4015 user_ids: []
4016 },
4017 n.loadFriendsList(),
4018 n.lastSearch = "",
4019 n.updateInverval = null,
4020 n
4021 }
4022 return Object(m.a)(a, [{
4023 key: "componentDidMount",
4024 value: function() {
4025 var e = this;
4026 T()("reachGoal", "open_tab:transfer"),
4027 this.updateInverval = setInterval(Object(tt.a)(et.a.mark((function t() {
4028 var a, n, r, i;
4029 return et.a.wrap((function(t) {
4030 for (; ; )
4031 switch (t.prev = t.next) {
4032 case 0:
4033 if (e.state.search === e.lastSearch) {
4034 t.next = 19;
4035 break
4036 }
4037 if (e.lastSearch = e.state.search,
4038 a = e.state.search.toLowerCase(),
4039 n = e.state.search.toLowerCase(),
4040 a.includes("vk.com/") && (a = a.substr(a.indexOf("vk.com/") + 7)).startsWith("id") && (a = a.substr(2)),
4041 a.startsWith("@") && (a = a.substr(1)),
4042 r = [],
4043 !(parseInt(a) > 0 || n.includes("vk.com/") || n.startsWith("@"))) {
4044 t.next = 12;
4045 break
4046 }
4047 S.requestProfilesToCache([a]),
4048 e.setState({
4049 user_ids: [],
4050 is_cached_search: !0
4051 }),
4052 t.next = 19;
4053 break;
4054 case 12:
4055 return t.next = 14,
4056 S.searchUsers(a);
4057 case 14:
4058 r = t.sent,
4059 e.props.addCacheProfiles(r),
4060 i = S.arrayColumns(r, "id"),
4061 e.setState({
4062 user_ids: i,
4063 is_cached_search: !1
4064 }),
4065 S.requestUsersToCacheIfNecessary(e.props.app.users, i);
4066 case 19:
4067 case "end":
4068 return t.stop()
4069 }
4070 }
4071 ), t)
4072 }
4073 ))), 450)
4074 }
4075 }, {
4076 key: "componentWillUnmount",
4077 value: function() {
4078 clearInterval(this.updateInverval)
4079 }
4080 }, {
4081 key: "render",
4082 value: function() {
4083 var e = this
4084 , t = this.state.search
4085 , a = this.props.app.friends
4086 , n = this.props.app.users
4087 , i = this.props.app.profiles
4088 , o = "" === t ? Object(s.a)(a) : this.getUserIdsList();
4089 o = (o = o.map((function(e) {
4090 return {
4091 user_id: e,
4092 balance: S.findUser(n, e).balance || 0
4093 }
4094 }
4095 ))).sort((function(e, t) {
4096 return t.balance - e.balance
4097 }
4098 ));
4099 var c = "mobile_iphone" === v.a.getStartParams().platform && null !== this.props.app.activeWindow;
4100 return r.a.createElement("div", {
4101 className: "TransferPanel StyledGameWindow"
4102 }, r.a.createElement("div", {
4103 className: "TransferPanel__search"
4104 }, r.a.createElement("input", {
4105 placeholder: "\u041f\u043e\u0438\u0441\u043a...",
4106 maxLength: 200,
4107 disabled: c,
4108 readOnly: c,
4109 value: this.state.search,
4110 onChange: function(t) {
4111 return e.onSearch(t.target.value)
4112 }
4113 }), r.a.createElement("img", {
4114 src: It.a,
4115 alt: "",
4116 onClick: function() {
4117 return e.shareLink()
4118 }
4119 })), r.a.createElement("div", {
4120 className: "TransferPanel__list"
4121 }, o.map((function(t) {
4122 var a = S.findProfile(i, t.user_id);
4123 return r.a.createElement("div", {
4124 className: "TransferPanel__row",
4125 key: t.user_id,
4126 onClick: function() {
4127 return e.openWindow(a)
4128 }
4129 }, r.a.createElement("div", {
4130 className: "TransferPanel__row-avatar"
4131 }, r.a.createElement("img", {
4132 src: a.photo_100 || a.photo_200 || a.photo_50,
4133 alt: ""
4134 })), r.a.createElement("div", {
4135 className: "TransferPanel__row-data"
4136 }, r.a.createElement("div", {
4137 className: "TransferPanel__row-data-title"
4138 }, a.first_name, " ", a.last_name), t.balance > 0 && r.a.createElement("div", {
4139 className: "TransferPanel__row-data-value"
4140 }, S.formatMainBalance(t.balance / 1e3, 3), " ", S.getEmojiPic("toilet", 36))))
4141 }
4142 )), 0 === o.length && r.a.createElement("div", {
4143 className: "TransferPanel__list-placeholder"
4144 }, "\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b")))
4145 }
4146 }]),
4147 a
4148 }(r.a.Component)
4149 , Wt = {
4150 setUserFriends: J,
4151 addCacheProfiles: X,
4152 setActiveWindow: te,
4153 setSnackbar: Z,
4154 deleteSnackbar: $
4155 }
4156 , Dt = Object(p.c)((function(e) {
4157 return {
4158 app: e.app,
4159 user: e.user,
4160 improvements: e.improvements
4161 }
4162 }
4163 ), Wt)(Mt)
4164 , Bt = (a(219),
4165 a(86))
4166 , Rt = a.n(Bt)
4167 , xt = a(87)
4168 , Vt = a.n(xt)
4169 , Ut = function(e) {
4170 Object(d.a)(a, e);
4171 var t = Object(u.a)(a);
4172 function a() {
4173 var e;
4174 Object(l.a)(this, a);
4175 for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++)
4176 i[o] = arguments[o];
4177 return (e = t.call.apply(t, [this].concat(i))).getObjectImage = function(t, a) {
4178 var n = e.props.items.items
4179 , r = e.props.disinfectants.items
4180 , i = "";
4181 if ("balance" === t)
4182 i = "toilet";
4183 else if ("disinfectants" === t) {
4184 var o = r.find((function(e) {
4185 return e.type_id === a
4186 }
4187 ));
4188 o && (i = o.icon)
4189 } else if ("items" === t) {
4190 var s = n.find((function(e) {
4191 return e.type_id === a
4192 }
4193 ));
4194 s && (i = s.icon)
4195 }
4196 return S.getEmojiPic(i, 100)
4197 }
4198 ,
4199 e.printRowDataValue = function(t) {
4200 var a = "transfer" === t.type && !t.is_initiator || "steal" === t.type && t.is_initiator || "achievement" === t.type || "purchase" === t.type || "ad_gift" === t.type || "subscription_gift" === t.type
4201 , n = "transfer" === t.type && t.is_initiator || "steal" === t.type && !t.is_initiator || "loss" === t.type
4202 , i = L()({
4203 "HistoryPanel__row-data-value": !0,
4204 "HistoryPanel__row-data-value--positive": a,
4205 "HistoryPanel__row-data-value--negative": n
4206 })
4207 , o = "balance" === t.object_type ? S.formatNumber(t.amount / 1e3) : S.formatMainBalance(t.amount, 0);
4208 return r.a.createElement("div", {
4209 className: i
4210 }, a && "+", " ", n && "-", " ", o, " ", e.getObjectImage(t.object_type, t.object_type_id))
4211 }
4212 ,
4213 e.getTransfersPeers = function() {
4214 var t = e.props.transfers.items
4215 , a = [];
4216 return t.forEach((function(e) {
4217 e.peer_id && e.peer_id > 0 && !a.includes(e.peer_id) && a.push(e.peer_id)
4218 }
4219 )),
4220 a
4221 }
4222 ,
4223 e
4224 }
4225 return Object(m.a)(a, [{
4226 key: "componentDidMount",
4227 value: function() {
4228 T()("reachGoal", "open_tab:history");
4229 var e = this.getTransfersPeers();
4230 e.length > 0 && S.requestProfilesToCache(e)
4231 }
4232 }, {
4233 key: "componentDidUpdate",
4234 value: function(e, t, a) {
4235 var n = S.arrayColumns(this.props.app.profiles, "id")
4236 , r = this.getTransfersPeers()
4237 , i = [];
4238 r.forEach((function(e) {
4239 n.includes(e) || i.push(e)
4240 }
4241 )),
4242 i.length > 0 && setTimeout((function() {
4243 return S.requestProfilesToCache(i)
4244 }
4245 ), 1)
4246 }
4247 }, {
4248 key: "render",
4249 value: function() {
4250 var e = this
4251 , t = this.props.app.profiles
4252 , a = this.props.transfers.items;
4253 return r.a.createElement("div", {
4254 className: "HistoryPanel StyledGameWindow"
4255 }, r.a.createElement("div", {
4256 className: "HistoryPanel__list"
4257 }, a.map((function(a) {
4258 var n = a.peer_id && a.peer_id > 0
4259 , i = a.peer_id && a.peer_id < 0 && a.peer && a.peer.merchant_id
4260 , o = n ? S.findProfile(t, a.peer_id) : {};
4261 if (n && !o.id)
4262 return null;
4263 return r.a.createElement("div", {
4264 className: "HistoryPanel__row",
4265 key: a.transfer_id,
4266 onClick: function() {
4267 n && S.openLink("https://vk.com/id" + a.peer_id),
4268 i && a.peer.group_id && S.openLink("https://vk.com/club" + a.peer.group_id)
4269 }
4270 }, r.a.createElement("div", {
4271 className: "HistoryPanel__row-avatar"
4272 }, r.a.createElement("img", {
4273 alt: "",
4274 referrerPolicy: "no-referrer",
4275 src: "achievement" === a.type ? Rt.a : "purchase" === a.type ? mt.a : "loss" === a.type ? S.getEmojiLink("virus", 160) : "ad_gift" === a.type ? z.a : "subscription_gift" === a.type ? Vt.a : n ? o.photo_100 || o.photo_200 || o.photo_50 : i ? a.peer.avatar ? a.peer.avatar : mt.a : void 0,
4276 onError: function(e) {
4277 e.target.src = mt.a
4278 }
4279 })), "transfer" === a.type && r.a.createElement("div", {
4280 className: "HistoryPanel__row-data"
4281 }, r.a.createElement("div", {
4282 className: "HistoryPanel__row-data-title"
4283 }, n && (a.is_initiator ? "\u041f\u0435\u0440\u0435\u0432\u043e\u0434 ".concat(o.first_name_dat || "") : "\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u043e\u0442 ".concat(o.first_name_gen || "")), i && (a.is_initiator ? "\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u0432 ".concat(a.peer.name ? '"'.concat(a.peer.name, '"') : "\u043c\u0430\u0433\u0430\u0437\u0438\u043d") : "\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u043e\u0442 ".concat(a.peer.name ? '"'.concat(a.peer.name, '"') : "\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430"))), e.printRowDataValue(a)), "steal" === a.type && r.a.createElement("div", {
4284 className: "HistoryPanel__row-data"
4285 }, r.a.createElement("div", {
4286 className: "HistoryPanel__row-data-title"
4287 }, a.is_initiator ? "\u041a\u0440\u0430\u0436\u0430 \u0443 ".concat(o.first_name_gen) : "".concat(o.first_name, " \u0443\u043a\u0440\u0430\u043b \u0443 \u0432\u0430\u0441")), e.printRowDataValue(a)), "achievement" === a.type && r.a.createElement("div", {
4288 className: "HistoryPanel__row-data"
4289 }, r.a.createElement("div", {
4290 className: "HistoryPanel__row-data-title"
4291 }, "\u0411\u043e\u043d\u0443\u0441 \u0437\u0430 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435"), e.printRowDataValue(a)), "purchase" === a.type && r.a.createElement("div", {
4292 className: "HistoryPanel__row-data"
4293 }, r.a.createElement("div", {
4294 className: "HistoryPanel__row-data-title"
4295 }, "\u041f\u043e\u043a\u0443\u043f\u043a\u0430 \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435 Paper Scroll"), e.printRowDataValue(a)), "loss" === a.type && r.a.createElement("div", {
4296 className: "HistoryPanel__row-data"
4297 }, r.a.createElement("div", {
4298 className: "HistoryPanel__row-data-title"
4299 }, "\u041f\u043e\u0442\u0435\u0440\u044f \u043e\u0442 \u0437\u0430\u0440\u0430\u0436\u0435\u043d\u0438\u044f"), e.printRowDataValue(a)), "ad_gift" === a.type && r.a.createElement("div", {
4300 className: "HistoryPanel__row-data"
4301 }, r.a.createElement("div", {
4302 className: "HistoryPanel__row-data-title"
4303 }, "\u041f\u043e\u0434\u0430\u0440\u043e\u043a \u0437\u0430 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0440\u0435\u043a\u043b\u0430\u043c\u044b"), e.printRowDataValue(a)), "subscription_gift" === a.type && r.a.createElement("div", {
4304 className: "HistoryPanel__row-data"
4305 }, r.a.createElement("div", {
4306 className: "HistoryPanel__row-data-title"
4307 }, "\u0415\u0436\u0435\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u043e\u043d\u0443\u0441 VK Donut"), e.printRowDataValue(a)), r.a.createElement("div", {
4308 className: "HistoryPanel__row-date"
4309 }, i ? r.a.createElement("span", null, "m ", a.peer.merchant_id, ", eid ", a.external_id) : null, S.getLocalTime(a.create_date)))
4310 }
4311 )), 0 === a.length && r.a.createElement("div", {
4312 className: "HistoryPanel__placeholder"
4313 }, "\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u0432 \u043f\u0443\u0441\u0442")))
4314 }
4315 }]),
4316 a
4317 }(r.a.Component)
4318 , Ft = {
4319 addCacheProfiles: X
4320 }
4321 , Ht = Object(p.c)((function(e) {
4322 return {
4323 app: e.app,
4324 items: e.items,
4325 disinfectants: e.disinfectants,
4326 transfers: e.transfers
4327 }
4328 }
4329 ), Ft)(Ut)
4330 , Gt = (a(220),
4331 function(e) {
4332 Object(d.a)(a, e);
4333 var t = Object(u.a)(a);
4334 function a(e) {
4335 var n;
4336 return Object(l.a)(this, a),
4337 (n = t.call(this, e)).buyDisinfectant = function(e) {
4338 j.sendEvent("disinfectants:buy", {
4339 type_id: e.type_id
4340 })
4341 }
4342 ,
4343 n.buyItem = function(e) {
4344 j.sendEvent("items:buy", {
4345 type_id: e.type_id
4346 })
4347 }
4348 ,
4349 n.state = {
4350 promoBanner: null
4351 },
4352 n
4353 }
4354 return Object(m.a)(a, [{
4355 key: "componentDidMount",
4356 value: function() {
4357 var e = this;
4358 T()("reachGoal", "open_tab:shop"),
4359 v.a.send("VKWebAppGetAds", {}).then((function(t) {
4360 e.setState({
4361 promoBanner: t
4362 }),
4363 T()("reachGoal", "ad_banner:show")
4364 }
4365 )).catch((function() {}
4366 ))
4367 }
4368 }, {
4369 key: "render",
4370 value: function() {
4371 var e = this
4372 , t = this.props.user.object
4373 , a = this.props.items.items
4374 , n = this.props.disinfectants.items
4375 , i = this.state.promoBanner;
4376 return r.a.createElement("div", {
4377 className: "ShopPanel StyledGameWindow"
4378 }, r.a.createElement("div", {
4379 className: "ShopPanel__list"
4380 }, n.map((function(a) {
4381 var n = S.formatNumber(a.cost / 1e3);
4382 a.cost >= 1e9 && (n = a.cost / 1e3 / 1e6 + " \u043c\u043b\u043d");
4383 var i = S.roundInt(a.life_time / 60 / 60)
4384 , o = S.declOfNum(i, ["\u0447\u0430\u0441", "\u0447\u0430\u0441\u0430", "\u0447\u0430\u0441\u043e\u0432"]);
4385 return r.a.createElement("div", {
4386 className: "ShopPanel__row",
4387 key: ["disinfectant", a.type_id].join("_")
4388 }, r.a.createElement("div", {
4389 className: "ShopPanel__row-menu"
4390 }, r.a.createElement("div", {
4391 className: "ShopPanel__row-menu-image"
4392 }, S.getEmojiPic(a.icon, 100)), r.a.createElement("div", {
4393 className: "ShopPanel__row-menu-button"
4394 }, r.a.createElement(O, {
4395 stretched: !0,
4396 color: "primary",
4397 disabled: t.balance < a.cost,
4398 onClick: function() {
4399 return e.buyDisinfectant(a)
4400 }
4401 }, n, " ", S.getEmojiPic("toilet", 36)))), r.a.createElement("div", {
4402 className: "ShopPanel__row-data"
4403 }, r.a.createElement("div", {
4404 className: "ShopPanel__row-data-title"
4405 }, a.name), r.a.createElement("div", {
4406 className: "ShopPanel__row-data-count"
4407 }, a.current_count, " \u0432 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u0435"), r.a.createElement("div", {
4408 className: "ShopPanel__row-data-description"
4409 }, "infection" === a.protection && "\u0421\u043d\u0438\u0436\u0430\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430 ".concat(a.chance_reduction, "%"), "steal" === a.protection && "\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043a\u0440\u0430\u0436 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0438\u0433\u0440\u043e\u043a\u0430\u043c\u0438 \u043f\u0440\u0438 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0438 \u0432 \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0435", r.a.createElement("br", null), "\u0414\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 ", i, " ", o)))
4410 }
4411 )), a.map((function(a) {
4412 var n = S.formatNumber(a.cost / 1e3);
4413 return r.a.createElement("div", {
4414 className: "ShopPanel__row",
4415 key: ["item", a.type_id].join("_")
4416 }, r.a.createElement("div", {
4417 className: "ShopPanel__row-menu"
4418 }, r.a.createElement("div", {
4419 className: "ShopPanel__row-menu-image"
4420 }, S.getEmojiPic(a.icon, 100)), r.a.createElement("div", {
4421 className: "ShopPanel__row-menu-button"
4422 }, r.a.createElement(O, {
4423 stretched: !0,
4424 color: "primary",
4425 disabled: t.balance < a.cost,
4426 onClick: function() {
4427 return e.buyItem(a)
4428 }
4429 }, n, " ", S.getEmojiPic("toilet", 36)))), r.a.createElement("div", {
4430 className: "ShopPanel__row-data"
4431 }, r.a.createElement("div", {
4432 className: "ShopPanel__row-data-title"
4433 }, a.name), r.a.createElement("div", {
4434 className: "ShopPanel__row-data-count"
4435 }, a.current_count, " \u0432 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u0435"), r.a.createElement("div", {
4436 className: "ShopPanel__row-data-description"
4437 }, a.description)))
4438 }
4439 ))), !!i && r.a.createElement("div", {
4440 className: "ShopPanel__ads"
4441 }, r.a.createElement(C.l, {
4442 bannerData: i,
4443 onClose: function() {
4444 e.setState({
4445 promoBanner: null
4446 })
4447 }
4448 })))
4449 }
4450 }]),
4451 a
4452 }(r.a.Component))
4453 , Kt = Object(p.c)((function(e) {
4454 return {
4455 app: e.app,
4456 user: e.user,
4457 items: e.items,
4458 disinfectants: e.disinfectants
4459 }
4460 }
4461 ), {})(Gt)
4462 , zt = (a(221),
4463 a(88))
4464 , qt = a.n(zt)
4465 , Yt = function(e) {
4466 return {
4467 type: "SET_OPENED_ACHIEVEMENTS_CATEGORY",
4468 id: e
4469 }
4470 }
4471 , Jt = (a(222),
4472 function(e) {
4473 Object(d.a)(a, e);
4474 var t = Object(u.a)(a);
4475 function a() {
4476 return Object(l.a)(this, a),
4477 t.apply(this, arguments)
4478 }
4479 return Object(m.a)(a, [{
4480 key: "render",
4481 value: function() {
4482 var e = this.props.achievement;
4483 return r.a.createElement("div", {
4484 className: "AchievementStoryTemplate--wrapper"
4485 }, r.a.createElement("div", {
4486 className: "AchievementStoryTemplate",
4487 id: "AchievementStoryTemplate"
4488 }, r.a.createElement("div", {
4489 className: "AchievementStoryTemplate__content"
4490 }, r.a.createElement("div", {
4491 className: "AchievementStoryTemplate__titles"
4492 }, r.a.createElement("div", {
4493 className: "AchievementStoryTemplate__title"
4494 }, e.name.toUpperCase()), r.a.createElement("div", {
4495 className: "AchievementStoryTemplate__title"
4496 }, e.name.toUpperCase()), r.a.createElement("div", {
4497 className: "AchievementStoryTemplate__title"
4498 }, e.name.toUpperCase())), r.a.createElement("div", {
4499 className: "AchievementStoryTemplate__description"
4500 }, e.description.toUpperCase()), e.owners_proportion < 45 && r.a.createElement("div", {
4501 className: "AchievementStoryTemplate__proportion"
4502 }, "\u0420\u0435\u0434\u043a\u0430\u044f \u0430\u0447\u0438\u0432\u043a\u0430:", r.a.createElement("br", null), "\u0435\u0441\u0442\u044c \u0443 \u043c\u0435\u043d\u044f \u0438 ", e.owners_proportion, "% \u0438\u0433\u0440\u043e\u043a\u043e\u0432"))))
4503 }
4504 }]),
4505 a
4506 }(r.a.Component))
4507 , Xt = Object(p.c)((function(e) {
4508 return {
4509 app: e.app,
4510 user: e.user,
4511 achievements: e.achievements
4512 }
4513 }
4514 ), {})(Jt)
4515 , Qt = function(e) {
4516 Object(d.a)(a, e);
4517 var t = Object(u.a)(a);
4518 function a(e) {
4519 var n;
4520 return Object(l.a)(this, a),
4521 (n = t.call(this, e)).onAchievementClick = function(e) {
4522 if (null !== n.state.renderingAchievement)
4523 return 0;
4524 if (n.state.tooltipClosed || n.setState({
4525 tooltipClosed: !0
4526 }),
4527 !e.was_received)
4528 return n.props.setSnackbar("error", "\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0441\u0442\u0430\u043d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f"),
4529 0;
4530 n.setState({
4531 renderingAchievement: e
4532 });
4533 var t = v.a.getStartParams();
4534 setTimeout((function() {
4535 qt()(document.querySelectorAll("#AchievementStoryTemplate")[0], {
4536 imageTimeout: 1500,
4537 useCORS: !0
4538 }).then((function(e) {
4539 var a = {
4540 background_type: "image",
4541 blob: e.toDataURL(),
4542 locked: !0,
4543 attachment: {
4544 text: "open",
4545 type: "url",
4546 url: "https://vk.com/app" + t.appId + "#ref=" + t.userId
4547 },
4548 stickers: [{
4549 sticker_type: "renderable",
4550 sticker: {
4551 content_type: "image",
4552 can_delete: !0,
4553 url: S.getImageLink("story_sticker"),
4554 transform: {
4555 gravity: "center_bottom",
4556 translation_y: -.05,
4557 relation_width: .35
4558 },
4559 clickable_zones: [{
4560 action_type: "app",
4561 action: {
4562 app_id: t.appId,
4563 app_context: "open"
4564 }
4565 }]
4566 }
4567 }]
4568 };
4569 v.a.send("VKWebAppShowStoryBox", a).then((function() {
4570 n.setState({
4571 renderingAchievement: null
4572 })
4573 }
4574 )).catch((function(e) {
4575 n.setState({
4576 renderingAchievement: null
4577 }),
4578 4 !== e.error_data.error_code && (console.log(e),
4579 n.props.addToast("\u041e\u0448\u0438\u0431\u043a\u0430", "\u0412\u0430\u0448\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u0439 :(", "\u041e\u043a\u0435\u0439", "error"))
4580 }
4581 ))
4582 }
4583 )).catch((function(e) {
4584 n.setState({
4585 renderingAchievement: null
4586 }),
4587 console.log(e),
4588 n.props.addToast("\u041e\u0448\u0438\u0431\u043a\u0430", "\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u044e :(", "\u041e\u043a\u0435\u0439", "error")
4589 }
4590 ))
4591 }
4592 ), 500)
4593 }
4594 ,
4595 n.onTooltipClose = function() {
4596 n.setState({
4597 tooltipClosed: !0
4598 }),
4599 j.sendEvent("event:trigger", {
4600 type: "achievement_tooltip_hide"
4601 })
4602 }
4603 ,
4604 j.sendEvent("achievements:category", {
4605 category_id: e.achievements.openedCategoryId
4606 }),
4607 n.state = {
4608 tooltipClosed: !0,
4609 renderingAchievement: null
4610 },
4611 n
4612 }
4613 return Object(m.a)(a, [{
4614 key: "componentDidMount",
4615 value: function() {
4616 T()("reachGoal", "open_tab:achievements_category"),
4617 !1 === this.props.user.object.achievement_tooltip_used && this.setState({
4618 tooltipClosed: !1
4619 })
4620 }
4621 }, {
4622 key: "render",
4623 value: function() {
4624 var e = this
4625 , t = this.props.achievements
4626 , a = t.openedCategoryId
4627 , n = t.openedCategoryAchievements
4628 , i = t.categories.find((function(e) {
4629 return e.category_id === a
4630 }
4631 ))
4632 , o = i.undisclosed_achievements_count
4633 , s = i.received_achievements_count
4634 , c = i.achievements_count;
4635 return r.a.createElement("div", {
4636 className: "AchievementPanel StyledGameWindow"
4637 }, r.a.createElement("div", {
4638 className: "AchievementPanel__counter"
4639 }, s, " \u0438\u0437 ", c, " \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439"), r.a.createElement("div", {
4640 className: "AchievementPanel__list"
4641 }, n.map((function(t, a) {
4642 var n = L()({
4643 AchievementPanel__row: !0,
4644 "AchievementPanel__row--active": t.was_received
4645 })
4646 , i = r.a.createElement("div", {
4647 className: n,
4648 key: t.type_id,
4649 onClick: function() {
4650 return e.onAchievementClick(t)
4651 }
4652 }, r.a.createElement("div", {
4653 className: "AchievementPanel__row-bg",
4654 style: {
4655 backgroundImage: "url(".concat(S.getAchievementEmojiLink(t.icon, 160), ")")
4656 }
4657 }), r.a.createElement("div", {
4658 className: "AchievementPanel__row-data"
4659 }, r.a.createElement("div", {
4660 className: "AchievementPanel__row-title"
4661 }, t.name), r.a.createElement("div", {
4662 className: "AchievementPanel__row-description"
4663 }, t.description), !0 === t.was_received && r.a.createElement("div", {
4664 className: "AchievementPanel__row-percent"
4665 }, "\u042d\u0442\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435 \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u0443 ", t.owners_proportion, "% \u0438\u0433\u0440\u043e\u043a\u043e\u0432")));
4666 return 0 !== a || e.state.tooltipClosed ? null !== e.state.renderingAchievement && e.state.renderingAchievement.type_id === t.type_id ? r.a.createElement("div", {
4667 className: n,
4668 key: t.type_id
4669 }, r.a.createElement("div", {
4670 className: "AchievementPanel__row-data"
4671 }, r.a.createElement("div", {
4672 className: "AchievementPanel__row-description"
4673 }, "\u041f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432\u0430\u0448\u0443 \u0438\u0441\u0442\u043e\u0440\u0438\u044e..."))) : i : r.a.createElement(C.o, {
4674 offsetX: 10,
4675 offsetY: 10,
4676 key: t.type_id,
4677 onClose: e.onTooltipClose,
4678 isShown: !e.state.tooltipClosed,
4679 text: "\u041a\u043b\u0438\u043a\u043d\u0438 \u043f\u043e \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u044e"
4680 }, i)
4681 }
4682 ))), o > 0 && r.a.createElement("div", {
4683 className: "AchievementPanel__description"
4684 }, "\u0418 \u0435\u0449\u0435 ", o, " ", S.declOfNum(o, ["\u0441\u043a\u0440\u044b\u0442\u043e\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435", "\u0441\u043a\u0440\u044b\u0442\u044b\u0445 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f", "\u0441\u043a\u0440\u044b\u0442\u044b\u0445 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439"])), null !== this.state.renderingAchievement && r.a.createElement(Xt, {
4685 achievement: this.state.renderingAchievement
4686 }))
4687 }
4688 }]),
4689 a
4690 }(r.a.Component)
4691 , Zt = {
4692 addToast: Q,
4693 setSnackbar: Z,
4694 setActivePanel: Y,
4695 setOpenedAchievementsCategory: Yt
4696 }
4697 , $t = Object(p.c)((function(e) {
4698 return {
4699 app: e.app,
4700 user: e.user,
4701 achievements: e.achievements
4702 }
4703 }
4704 ), Zt)(Qt)
4705 , ea = (a(223),
4706 function(e) {
4707 Object(d.a)(a, e);
4708 var t = Object(u.a)(a);
4709 function a() {
4710 var e;
4711 Object(l.a)(this, a);
4712 for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++)
4713 r[i] = arguments[i];
4714 return (e = t.call.apply(t, [this].concat(r))).openCategory = function(t) {
4715 e.props.setOpenedAchievementsCategory(t),
4716 e.props.setActivePanel("information", "achievement")
4717 }
4718 ,
4719 e
4720 }
4721 return Object(m.a)(a, [{
4722 key: "componentDidMount",
4723 value: function() {
4724 T()("reachGoal", "open_tab:achievements_categories")
4725 }
4726 }, {
4727 key: "render",
4728 value: function() {
4729 var e = this
4730 , t = this.props.achievements.categories
4731 , a = 0
4732 , n = 0;
4733 return t.forEach((function(e) {
4734 a += e.received_achievements_count,
4735 n += e.achievements_count
4736 }
4737 )),
4738 r.a.createElement("div", {
4739 className: "AchievementsCategoriesPanel StyledGameWindow"
4740 }, r.a.createElement("div", {
4741 className: "AchievementsCategoriesPanel__counter"
4742 }, a, " \u0438\u0437 ", n, " \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0439"), r.a.createElement("div", {
4743 className: "AchievementsCategoriesPanel__list"
4744 }, t.map((function(t) {
4745 var a = L()({
4746 AchievementsCategoriesPanel__row: !0,
4747 "AchievementsCategoriesPanel__row--active": t.received_achievements_count > 0
4748 });
4749 return r.a.createElement("div", {
4750 className: a,
4751 key: t.category_id,
4752 onClick: function() {
4753 return e.openCategory(t.category_id)
4754 }
4755 }, r.a.createElement("div", {
4756 className: "AchievementsCategoriesPanel__row-bg",
4757 style: {
4758 backgroundImage: "url(".concat(S.getEmojiLink(t.icon, 160), ")")
4759 }
4760 }), r.a.createElement("div", {
4761 className: "AchievementsCategoriesPanel__row-title"
4762 }, t.name), r.a.createElement("div", {
4763 className: "AchievementsCategoriesPanel__row-counter"
4764 }, t.received_achievements_count, "/", t.achievements_count))
4765 }
4766 ))))
4767 }
4768 }]),
4769 a
4770 }(r.a.Component))
4771 , ta = {
4772 setActivePanel: Y,
4773 setOpenedAchievementsCategory: Yt
4774 }
4775 , aa = Object(p.c)((function(e) {
4776 return {
4777 app: e.app,
4778 user: e.user,
4779 achievements: e.achievements
4780 }
4781 }
4782 ), ta)(ea)
4783 , na = (a(224),
4784 function(e) {
4785 Object(d.a)(a, e);
4786 var t = Object(u.a)(a);
4787 function a(e) {
4788 var n;
4789 Object(l.a)(this, a),
4790 n = t.call(this, e);
4791 var r = S.shuffleArray(Object(s.a)(e.games.items));
4792 return n.games = r.sort((function(e, t) {
4793 return t.order - e.order
4794 }
4795 )),
4796 n
4797 }
4798 return Object(m.a)(a, [{
4799 key: "componentDidMount",
4800 value: function() {
4801 T()("reachGoal", "open_modal:games")
4802 }
4803 }, {
4804 key: "render",
4805 value: function() {
4806 return r.a.createElement("div", {
4807 className: "GamesModal"
4808 }, r.a.createElement("div", {
4809 className: "GamesModal__list"
4810 }, this.games.map((function(e) {
4811 return r.a.createElement("div", {
4812 className: "GamesModal__item",
4813 key: e.game_id
4814 }, r.a.createElement("div", {
4815 className: "GamesModal__item-avatar",
4816 onClick: function() {
4817 return S.openLink(e.url)
4818 }
4819 }, r.a.createElement("img", {
4820 alt: "",
4821 referrerPolicy: "no-referrer",
4822 src: e.image,
4823 onError: function(e) {
4824 e.target.src = mt.a
4825 }
4826 })), r.a.createElement("div", {
4827 className: "GamesModal__item-content"
4828 }, r.a.createElement("div", {
4829 className: "GamesModal__item-content-title"
4830 }, e.name), r.a.createElement("div", {
4831 className: "GamesModal__item-content-text"
4832 }, e.description), r.a.createElement("div", {
4833 className: "GamesModal__item-content-button"
4834 }, r.a.createElement(O, {
4835 onClick: function() {
4836 return S.openLink(e.url)
4837 }
4838 }, "\u0418\u0433\u0440\u0430\u0442\u044c"))))
4839 }
4840 ))), r.a.createElement("div", {
4841 className: "GamesModal__footer"
4842 }, r.a.createElement("div", {
4843 className: "GamesModal__footer-text",
4844 onClick: function() {
4845 return S.openLink("https://vk.com/wall-194441652_6640")
4846 }
4847 }, "\u041a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441\u0432\u043e\u044e \u0438\u0433\u0440\u0443?")))
4848 }
4849 }]),
4850 a
4851 }(r.a.Component))
4852 , ra = Object(p.c)((function(e) {
4853 return {
4854 games: e.games
4855 }
4856 }
4857 ), {})(na)
4858 , ia = (a(225),
4859 function(e) {
4860 Object(d.a)(a, e);
4861 var t = Object(u.a)(a);
4862 function a() {
4863 var e;
4864 Object(l.a)(this, a);
4865 for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++)
4866 r[i] = arguments[i];
4867 return (e = t.call.apply(t, [this].concat(r))).openWindow = function(t) {
4868 e.props.setActiveWindow("bonus", {
4869 type_id: t
4870 })
4871 }
4872 ,
4873 e.buyBonus = function(e) {
4874 j.sendEvent("bonuses:buy", {
4875 type_id: e
4876 })
4877 }
4878 ,
4879 e
4880 }
4881 return Object(m.a)(a, [{
4882 key: "componentDidMount",
4883 value: function() {
4884 T()("reachGoal", "open_modal:bonuses")
4885 }
4886 }, {
4887 key: "render",
4888 value: function() {
4889 var e = this
4890 , t = this.props.user.object
4891 , a = this.props.bonuses.items;
4892 return r.a.createElement("div", {
4893 className: "BonusesModal"
4894 }, a.map((function(a) {
4895 var n = S.formatNumber(a.cost / 1e3)
4896 , i = S.formatNumber(a.speed / 1e3)
4897 , o = 0 === a.current_count && a.earned_filter <= t.earned_balance;
4898 return r.a.createElement("div", {
4899 className: "BonusesModal__item",
4900 key: a.type_id
4901 }, r.a.createElement("div", {
4902 className: "BonusesModal__item-avatar",
4903 onClick: function() {
4904 return e.openWindow(a.type_id)
4905 }
4906 }, S.getEmojiPic(a.icon, 160)), r.a.createElement("div", {
4907 className: "BonusesModal__item-content"
4908 }, r.a.createElement("div", {
4909 className: "BonusesModal__item-content-row"
4910 }, r.a.createElement("div", {
4911 className: "BonusesModal__item-content-title"
4912 }, a.name), r.a.createElement("div", {
4913 className: "BonusesModal__item-content-speed"
4914 }, "+", i, "/\u0441\u043a\u0440\u043e\u043b\u043b")), r.a.createElement("div", {
4915 className: "BonusesModal__item-content-row"
4916 }, o && r.a.createElement(O, {
4917 disabled: t.balance < a.cost,
4918 onClick: function() {
4919 return e.buyBonus(a.type_id)
4920 }
4921 }, n, " ", S.getEmojiPic("toilet", 36)), a.current_count > 0 && r.a.createElement("div", {
4922 className: "BonusesModal__item-content-row-text"
4923 }, "\u0423\u0436\u0435 \u043a\u0443\u043f\u043b\u0435\u043d"), a.earned_filter > t.earned_balance && r.a.createElement("div", {
4924 className: "BonusesModal__item-content-row-text"
4925 }, "\u0411\u043e\u043d\u0443\u0441 \u0441\u0442\u0430\u043d\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d, \u043a\u043e\u0433\u0434\u0430 \u0442\u044b \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0448\u044c ", S.formatNumber(a.earned_filter / 1e3), " ", S.getEmojiPic("toilet", 100), " \u0437\u0430 \u0432\u0441\u0451 \u0432\u0440\u0435\u043c\u044f \u0438\u0433\u0440\u044b"))))
4926 }
4927 )))
4928 }
4929 }]),
4930 a
4931 }(r.a.Component))
4932 , oa = {
4933 setActiveWindow: te
4934 }
4935 , sa = Object(p.c)((function(e) {
4936 return {
4937 app: e.app,
4938 user: e.user,
4939 bonuses: e.bonuses
4940 }
4941 }
4942 ), oa)(ia)
4943 , ca = (a(226),
4944 function(e) {
4945 Object(d.a)(a, e);
4946 var t = Object(u.a)(a);
4947 function a() {
4948 var e;
4949 Object(l.a)(this, a);
4950 for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++)
4951 r[i] = arguments[i];
4952 return (e = t.call.apply(t, [this].concat(r))).openWindow = function(t) {
4953 e.props.setActiveWindow("improvement", {
4954 type_id: t
4955 })
4956 }
4957 ,
4958 e.buyImprovement = function(e) {
4959 j.sendEvent("improvements:buy", {
4960 type_id: e
4961 })
4962 }
4963 ,
4964 e
4965 }
4966 return Object(m.a)(a, [{
4967 key: "componentDidMount",
4968 value: function() {
4969 T()("reachGoal", "open_modal:improvements")
4970 }
4971 }, {
4972 key: "render",
4973 value: function() {
4974 var e = this
4975 , t = this.props.user.object
4976 , a = this.props.improvements.items;
4977 return r.a.createElement("div", {
4978 className: "ImprovementsModal"
4979 }, a.map((function(a) {
4980 var n = S.formatNumber(a.current_cost / 1e3)
4981 , i = S.formatNumber(a.speed / 1e3);
4982 return r.a.createElement("div", {
4983 className: "ImprovementsModal__item",
4984 key: a.type_id
4985 }, r.a.createElement("div", {
4986 className: "ImprovementsModal__item-avatar",
4987 onClick: function() {
4988 return e.openWindow(a.type_id)
4989 }
4990 }, S.getEmojiPic(a.icon, 160)), r.a.createElement("div", {
4991 className: "ImprovementsModal__item-content"
4992 }, r.a.createElement("div", {
4993 className: "ImprovementsModal__item-content-row"
4994 }, r.a.createElement("div", {
4995 className: "ImprovementsModal__item-content-title"
4996 }, a.name), r.a.createElement("div", {
4997 className: "ImprovementsModal__item-content-speed"
4998 }, "+", i, "/\u0441\u0435\u043a")), r.a.createElement("div", {
4999 className: "ImprovementsModal__item-content-row"
5000 }, r.a.createElement(O, {
5001 disabled: t.balance < a.current_cost,
5002 onClick: function() {
5003 return e.buyImprovement(a.type_id)
5004 }
5005 }, n, " ", S.getEmojiPic("toilet", 36)), r.a.createElement("div", {
5006 className: "ImprovementsModal__item-content-count"
5007 }, a.current_count > 0 && "x".concat(a.current_count)))))
5008 }
5009 )))
5010 }
5011 }]),
5012 a
5013 }(r.a.Component))
5014 , la = {
5015 setActiveWindow: te
5016 }
5017 , ma = Object(p.c)((function(e) {
5018 return {
5019 app: e.app,
5020 user: e.user,
5021 improvements: e.improvements
5022 }
5023 }
5024 ), la)(ca)
5025 , da = a(89)
5026 , ua = a.n(da)
5027 , pa = (a(227),
5028 function(e) {
5029 Object(d.a)(a, e);
5030 var t = Object(u.a)(a);
5031 function a() {
5032 var e;
5033 Object(l.a)(this, a);
5034 for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++)
5035 r[i] = arguments[i];
5036 return (e = t.call.apply(t, [this].concat(r))).openManageLink = function() {
5037 S.openLink("https://vk.com/settings?act=payments§ion=subscriptions")
5038 }
5039 ,
5040 e.openSubscriptionLink = function() {
5041 S.isFuckingIOS() || S.openLink("https://vk.com/paper_scroll?w=donut_payment-194441652")
5042 }
5043 ,
5044 e
5045 }
5046 return Object(m.a)(a, [{
5047 key: "componentDidMount",
5048 value: function() {
5049 T()("reachGoal", "open_modal:subscriptions")
5050 }
5051 }, {
5052 key: "render",
5053 value: function() {
5054 var e = this
5055 , t = this.props.user.subscription;
5056 return r.a.createElement("div", {
5057 className: "SubscriptionsModal"
5058 }, !S.isFuckingIOS() && r.a.createElement("div", {
5059 className: "SubscriptionsModal__description"
5060 }, "\u041e\u0444\u043e\u0440\u043c\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 VK Donut, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0430\u0441 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0440\u0443\u0442\u044b\u0435 \u043f\u043b\u044e\u0448\u043a\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438!"), r.a.createElement("div", {
5061 className: "SubscriptionsModal__items"
5062 }, [{
5063 level: 1,
5064 amount: 50,
5065 description: {
5066 title: "\u041d\u0430 \u0432\u0440\u0435\u043c\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435:",
5067 items: ["\u0415\u0436\u0435\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u043e\u043d\u0443\u0441: 10 \u043c\u043b\u043d \u0440\u0443\u043b\u043e\u043d\u043e\u0432, 2 \u043c\u0430\u0441\u043a\u0438 \u0438 2 \u0430\u043d\u0442\u0438\u0441\u0435\u043f\u0442\u0438\u043a\u0430", "\u041c\u0435\u043d\u044c\u0448\u0435 \u0448\u0430\u043d\u0441 \u0437\u0430\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430 10%", "\u041c\u0435\u0441\u0442\u043e \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u0439\u0442\u0438\u043d\u0433\u0435 \u0434\u043e\u043d\u043e\u0432 \u0432 \u0438\u0433\u0440\u0435", "\u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0447\u0430\u0442\u0443 \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0438\u0433\u0440\u044b"]
5068 }
5069 }, {
5070 level: 2,
5071 amount: 100,
5072 description: {
5073 title: "\u041d\u0430 \u0432\u0440\u0435\u043c\u044f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435:",
5074 items: ["\u0412\u0441\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 1-\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f", "\u0411\u043e\u043b\u044c\u0448\u0435 \u0441\u0440\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0437\u0430\u0449\u0438\u0442\u044b \u043d\u0430 50%", "\u0411\u043e\u043b\u044c\u0448\u0435 \u0431\u043e\u043d\u0443\u0441 \u0437\u0430 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0440\u0435\u043a\u043b\u0430\u043c\u044b \u043d\u0430 20%", "\u041c\u0435\u043d\u044c\u0448\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0430\u0436\u0438 \u043d\u0430 10%", "\u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0432 \u0438\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u0435: \u0434\u043e 50 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430", "\u041a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0432 \u0438\u0433\u0440\u0435: \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u044d\u043c\u043e\u0434\u0437\u0438 \u0438 \u0446\u0432\u0435\u0442\u0430"]
5075 }
5076 }].map((function(a) {
5077 var n = t.is_active && a.level === t.level
5078 , i = L()({
5079 SubscriptionsModal__item: !0,
5080 "SubscriptionsModal__item--active": n
5081 });
5082 return r.a.createElement("div", {
5083 className: i,
5084 key: a.level,
5085 onClick: e.openSubscriptionLink
5086 }, r.a.createElement("div", {
5087 className: "SubscriptionsModal__item-title"
5088 }, a.level, "-\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c"), r.a.createElement("div", {
5089 className: "SubscriptionsModal__item-amount"
5090 }, "\u043e\u0442 ", a.amount, " \u0440\u0443\u0431\u043b\u0435\u0439"), n && r.a.createElement("div", {
5091 className: "SubscriptionsModal__item-description"
5092 }, "\u0422\u0432\u043e\u0439 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438!"), r.a.createElement("div", {
5093 className: "SubscriptionsModal__item-info"
5094 }, r.a.createElement("ul", null, a.description.items.map((function(e, t) {
5095 return r.a.createElement("li", {
5096 key: t
5097 }, S.escapeNewLineToBeak(e))
5098 }
5099 )))))
5100 }
5101 ))), t.is_active ? r.a.createElement("div", {
5102 className: "SubscriptionsModal__footer"
5103 }, !S.isFuckingIOS() && r.a.createElement(O, {
5104 stretched: !0,
5105 color: "primary",
5106 onClick: this.openManageLink
5107 }, "\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u043e\u0439"), r.a.createElement(O, {
5108 stretched: !0,
5109 color: "primary",
5110 onClick: function() {
5111 window.history.back(),
5112 setTimeout((function() {
5113 return e.props.setActiveWindow("customization")
5114 }
5115 ), 250)
5116 }
5117 }, "\u041a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044f")) : r.a.createElement("div", {
5118 className: "SubscriptionsModal__footer"
5119 }, !S.isFuckingIOS() && r.a.createElement(O, {
5120 stretched: !0,
5121 color: "primary",
5122 onClick: this.openSubscriptionLink
5123 }, "\u041e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443")))
5124 }
5125 }]),
5126 a
5127 }(r.a.Component))
5128 , _a = {
5129 setActiveWindow: te
5130 }
5131 , va = Object(C.r)(Object(p.c)((function(e) {
5132 return {
5133 user: e.user
5134 }
5135 }
5136 ), _a)(pa))
5137 , fa = (a(228),
5138 a(229),
5139 a(230),
5140 a(231),
5141 {
5142 initWebApp: function() {
5143 return {
5144 type: "INIT_WEB_APP"
5145 }
5146 },
5147 initVkSdk: function() {
5148 return {
5149 type: "INIT_VK_SDK"
5150 }
5151 },
5152 setSocketFetchingState: function(e) {
5153 return {
5154 type: "SET_SOCKET_STATE",
5155 state: e
5156 }
5157 },
5158 setActiveTab: q,
5159 setActivePanel: Y,
5160 setActiveWindow: te,
5161 hideActiveWindow: ne,
5162 setWindowParam: ae,
5163 setActiveModal: ee,
5164 hideActiveModal: function() {
5165 return {
5166 type: "HIDE_ACTIVE_MODAL"
5167 }
5168 },
5169 addToast: Q,
5170 deleteToast: function(e) {
5171 return {
5172 type: "DELETE_TOAST",
5173 index: e
5174 }
5175 },
5176 addCacheUsers: function(e) {
5177 return {
5178 type: "ADD_CACHE_USERS",
5179 data: e
5180 }
5181 },
5182 addCacheProfiles: X,
5183 setSnackbar: Z,
5184 deleteSnackbar: $,
5185 handleTransferWindowEvent: function(e, t) {
5186 return {
5187 type: "HANDLE_TRANSFER_WINDOW_EVENT",
5188 event: e,
5189 params: t
5190 }
5191 },
5192 handleMerchantWindowEvent: function(e, t) {
5193 return {
5194 type: "HANDLE_MERCHANT_WINDOW_EVENT",
5195 event: e,
5196 params: t
5197 }
5198 },
5199 handleTabSwipeBack: function() {
5200 return {
5201 type: "HANDLE_TAB_SWIPE_BACK"
5202 }
5203 },
5204 handleAppError: function(e, t, a) {
5205 return {
5206 type: "HANDLE_APP_ERROR",
5207 code: e,
5208 message: t,
5209 description: a
5210 }
5211 },
5212 setConfigInitialData: function(e) {
5213 return {
5214 type: "SET_CONFIG_INITIAL_DATA",
5215 data: e
5216 }
5217 },
5218 setParamsInitialData: function(e) {
5219 return {
5220 type: "SET_PARAMS_INITIAL_DATA",
5221 data: e
5222 }
5223 },
5224 setUserInitialData: function(e) {
5225 return {
5226 type: "SET_USER_INITIAL_DATA",
5227 object: e
5228 }
5229 },
5230 setProfileInitialData: function(e) {
5231 return {
5232 type: "SET_PROFILE_INITIAL_DATA",
5233 profile: e
5234 }
5235 },
5236 updateUserProperty: function(e, t, a) {
5237 return {
5238 type: "UPDATE_USER_PROPERTY",
5239 property: e,
5240 action: t,
5241 value: a
5242 }
5243 },
5244 setOnboardInitialData: function(e) {
5245 return {
5246 type: "SET_ONBOARD_INITIAL_DATA",
5247 object: e
5248 }
5249 },
5250 setSubscriptionInitialData: function(e) {
5251 return {
5252 type: "SET_SUBSCRIPTION_INITIAL_DATA",
5253 object: e
5254 }
5255 },
5256 tickImprovementsUpdate: function() {
5257 return {
5258 type: "TICK_IMPROVEMENTS_UPDATE"
5259 }
5260 },
5261 setGroupInitialData: function(e) {
5262 return {
5263 type: "SET_GROUP_INITIAL_DATA",
5264 object: e
5265 }
5266 },
5267 setItemsInitialData: function(e) {
5268 return {
5269 type: "SET_ITEMS_INITIAL_DATA",
5270 data: e
5271 }
5272 },
5273 setGamesInitialData: function(e) {
5274 return {
5275 type: "SET_GAMES_INITIAL_DATA",
5276 data: e
5277 }
5278 },
5279 setBonusesInitialData: function(e) {
5280 return {
5281 type: "SET_BONUSES_INITIAL_DATA",
5282 data: e
5283 }
5284 },
5285 setRatingsInitialData: function(e) {
5286 return {
5287 type: "SET_RATINGS_INITIAL_DATA",
5288 data: e
5289 }
5290 },
5291 setImprovementsInitialData: function(e) {
5292 return {
5293 type: "SET_IMPROVEMENTS_INITIAL_DATA",
5294 data: e
5295 }
5296 },
5297 setDisinfectantsInitialData: function(e) {
5298 return {
5299 type: "SET_DISINFECTANTS_INITIAL_DATA",
5300 data: e
5301 }
5302 },
5303 addNewTransfer: function(e) {
5304 return {
5305 type: "ADD_NEW_TRANSFER",
5306 data: e
5307 }
5308 },
5309 setTransfersInitialData: function(e) {
5310 return {
5311 type: "SET_TRANSFERS_INITIAL_DATA",
5312 data: e
5313 }
5314 },
5315 setAchievementsInitialData: function(e) {
5316 return {
5317 type: "SET_ACHIEVEMENTS_INITIAL_DATA",
5318 data: e
5319 }
5320 },
5321 setAchievementCategoryData: function(e, t) {
5322 return {
5323 type: "SET_ACHIEVEMENT_CATEGORY_DATA",
5324 category_id: e,
5325 data: t
5326 }
5327 },
5328 setOpenedAchievementsCategory: Yt
5329 })
5330 , ha = function(e) {
5331 Object(d.a)(a, e);
5332 var t = Object(u.a)(a);
5333 function a(e) {
5334 var n;
5335 return Object(l.a)(this, a),
5336 (n = t.call(this, e)).updateLastActivityTime = function() {
5337 S.randEvent(40) && (n.lastActivityTime = (new Date).getTime())
5338 }
5339 ,
5340 n.initWebSocket = function() {
5341 Object.assign(WebSocket.prototype, {
5342 doNotReconnect: !1,
5343 tickInterval: null,
5344 uuid: null,
5345 log: function() {
5346 for (var e, t = arguments.length, a = new Array(t), n = 0; n < t; n++)
5347 a[n] = arguments[n];
5348 (e = console).log.apply(e, [this.uuid].concat(a))
5349 },
5350 sendEvent: function(e) {
5351 var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}
5352 , a = [e];
5353 Object.keys(t).length > 0 && a.push(t),
5354 this.send(JSON.stringify(a))
5355 },
5356 sendBuffer: function() {
5357 var e = Array.from(arguments[0])
5358 , t = new Int32Array(e);
5359 this.send(t)
5360 }
5361 });
5362 var e = y.a.parse(window.location.search.substr(1));
5363 n.socket = new WebSocket("wss://".concat(E.api_domain, "/socket?") + y.a.encode(Object(c.a)({}, e, {
5364 hashParams: JSON.stringify(n.hashParams)
5365 }))),
5366 n.socket.uuid = S.generateUuid().substr(0, 7),
5367 n.socket.onopen = function() {
5368 n.socket.log("ws connected"),
5369 n.props.setSocketFetchingState(!1),
5370 n.socket.tickInterval = setInterval((function() {
5371 n.props.tickImprovementsUpdate()
5372 }
5373 ), 1e3)
5374 }
5375 ,
5376 n.socket.onclose = function() {
5377 n.socket.log("ws closed"),
5378 n.props.setSocketFetchingState(!0),
5379 clearInterval(n.socket.tickInterval)
5380 }
5381 ,
5382 n.socket.onerror = function() {
5383 n.socket.log("ws error"),
5384 n.props.setSocketFetchingState(!0)
5385 }
5386 ,
5387 n.socket.onmessage = function(e) {
5388 var t = JSON.parse(e.data)
5389 , a = t[0] || ""
5390 , r = t[1] || {};
5391 "ping" === a ? n.socket.readyState === n.socket.OPEN && n.socket.sendEvent("pong") : "reconnect" === a || ("error" === a ? n.props.handleAppError(r.code, r.message, r.description) : "notify" === a ? n.props.setSnackbar(r.category, r.message) : "toast" === a ? n.props.addToast(r.title, S.escapeNewLineToBeak(r.message), r.button, r.category || "primary") : n.onSocketMessage(a, r))
5392 }
5393 ,
5394 window.socket = n.socket
5395 }
5396 ,
5397 n.onSwipeBack = function() {
5398 window.history.back()
5399 }
5400 ,
5401 n.onSwipeBackStart = function() {
5402 S.disableTouchMove(),
5403 setTimeout((function() {
5404 document.querySelector(".View--swiping-back") && (console.log("onSwipeBackStart fix"),
5405 window.history.back())
5406 }
5407 ), 800)
5408 }
5409 ,
5410 n.onTransition = function() {
5411 S.enableTouchMove()
5412 }
5413 ,
5414 n.handleOpenParams = function() {
5415 var e = n.props.user.object;
5416 if (n.hashParams.hasOwnProperty("t") && !0 !== n.hashParams.transferHandled) {
5417 if (n.hashParams.transferHandled = !0,
5418 !e.is_onboard_completed)
5419 return 0;
5420 var t = n.hashParams.t.split("_")
5421 , a = [t[0] || 0];
5422 S.requestProfilesToCache(a),
5423 setTimeout((function() {
5424 n.props.setActiveWindow("transfer", {
5425 peer_id: S.roundInt(t[0]),
5426 params: {}
5427 })
5428 }
5429 ), 500)
5430 } else if (n.hashParamsStr.startsWith("m") && !0 !== n.hashParams.merchantHandled) {
5431 if (n.hashParams.merchantHandled = !0,
5432 !e.is_onboard_completed)
5433 return 0;
5434 var r = n.hashParamsStr.substr(1).split("_");
5435 if (r.length < 1)
5436 return 0;
5437 var i = {
5438 merchant_id: S.roundInt(r[0]) || 0,
5439 amount: S.roundInt(r[1]) || "",
5440 payload: S.roundInt(r[2]) || 0,
5441 locked: !(!r[3] || "1" !== r[3])
5442 };
5443 setTimeout((function() {
5444 n.props.setActiveWindow("transfer", {
5445 peer_id: -i.merchant_id,
5446 params: i
5447 })
5448 }
5449 ), 300)
5450 } else if (n.hashParams.hasOwnProperty("create_merchant")) {
5451 if (!e.is_onboard_completed)
5452 return 0;
5453 setTimeout((function() {
5454 return n.props.setActiveWindow("merchant", {})
5455 }
5456 ), 500)
5457 } else if (n.hashParams.hasOwnProperty("subscriptions")) {
5458 if (!e.is_onboard_completed)
5459 return 0;
5460 setTimeout((function() {
5461 return n.props.setActiveModal("subscriptions")
5462 }
5463 ), 500)
5464 } else if (n.hashParams.hasOwnProperty("customization")) {
5465 if (!e.is_onboard_completed)
5466 return 0;
5467 setTimeout((function() {
5468 return n.props.setActiveWindow("customization")
5469 }
5470 ), 500)
5471 } else if (e.is_onboard_completed) {
5472 var o = n.props.user.object
5473 , s = n.props.user.subscription;
5474 o.offline_died ? n.props.addToast("\u041f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043e", S.escapeNewLineToBeak("\u0412\u0438\u0440\u0443\u0441 \u043d\u0435 \u0434\u0440\u0435\u043c\u043b\u0435\u0442 \u0438 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0441\u0442\u0438\u0447\u044c \u0432 \u0441\u0430\u043c\u044b\u0439 \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u044d\u043f\u0438\u0434\u0435\u043c\u0438\u044f \u0434\u043e\u0431\u0440\u0430\u043b\u0430\u0441\u044c \u0438 \u0434\u043e \u0432\u0430\u0441.\n\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0432\u044b \u043d\u0435 \u0443\u0441\u043f\u0435\u043b\u0438 \u0438\u0437\u043b\u0435\u0447\u0438\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 24 \u0447\u0430\u0441\u043e\u0432 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u0440\u0430\u0436\u0435\u043d\u0438\u044f.\n\n\u0412\u0430\u0448 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441 \u043e\u0431\u043d\u0443\u043b\u0451\u043d. \u0423 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0447\u0430\u0442\u044c \u0432\u0441\u0451 \u0437\u0430\u043d\u043e\u0432\u043e \u0438 \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u044b\u043c."), "\u041e\u043a\u0435\u0439", "error", (function() {
5475 j.sendEvent("event:trigger", {
5476 type: "offline_died_reset"
5477 })
5478 }
5479 )) : !o.event_informed && !s.is_active && !S.isFuckingIOS() && o.earned_balance > 1e3 && (j.sendEvent("event:trigger", {
5480 type: "event_informed_approve"
5481 }),
5482 n.props.addToast("\u042d\u043b\u0438\u0442\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e", S.escapeNewLineToBeak("\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 VK Donut, \u043e\u0444\u043e\u0440\u043c\u0438\u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0430\u0441 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u0440\u0443\u0442\u044b\u0435 \u043f\u043b\u044e\u0448\u043a\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438!\n\n\u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445: e\u0436\u0435\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u043e\u043d\u0443\u0441, \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u0440\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0437\u0430\u0449\u0438\u0442\u044b \u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0432 \u0438\u0433\u0440\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0446\u0432\u0435\u0442\u043e\u0432 \u0438 \u044d\u043c\u043e\u0434\u0437\u0438."), "\u0423\u0437\u043d\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435", "primary", (function() {
5483 j.sendEvent("event:trigger", {
5484 type: "event_informed_approve"
5485 }),
5486 setTimeout((function() {
5487 return n.props.setActiveModal("subscriptions")
5488 }
5489 ), 300)
5490 }
5491 )))
5492 }
5493 }
5494 ,
5495 n.handleHashParams(),
5496 n.initWebSocket(),
5497 v.a.init().then((function() {}
5498 )),
5499 v.a.getUserInfo().then((function(e) {
5500 n.props.initVkSdk(),
5501 n.props.setProfileInitialData(e)
5502 }
5503 )),
5504 v.a.setViewSettings("dark", "#ffffff").catch((function() {}
5505 )),
5506 v.a.subscribe("VKWebAppViewRestore", (function() {
5507 n.socket.doNotReconnect = !1,
5508 console.log("VKWebAppViewRestore"),
5509 v.a.setViewSettings("dark", "#ffffff").catch((function() {}
5510 ))
5511 }
5512 )),
5513 v.a.subscribe("VKWebAppViewHide", (function() {
5514 "mobile_iphone" !== v.a.getStartParams().platform && (n.socket.doNotReconnect = !0,
5515 n.socket.close()),
5516 console.log("VKWebAppViewHide")
5517 }
5518 )),
5519 window.deleteSnackbar = n.props.deleteSnackbar,
5520 v.a.addLogCallback((function(e) {
5521 console.log("sdk", e)
5522 }
5523 )),
5524 setTimeout((function() {
5525 var e = n.props.user.object;
5526 e.is_onboard_completed && e.balance >= 13e3 && S.randEvent(50) && v.a.send("VKWebAppJoinGroup", {
5527 group_id: 194441652
5528 }).then((function() {}
5529 )).catch((function() {}
5530 ))
5531 }
5532 ), 700),
5533 setTimeout((function() {
5534 return n.checkConnectionState()
5535 }
5536 ), 3e3),
5537 n
5538 }
5539 return Object(m.a)(a, [{
5540 key: "checkConnectionState",
5541 value: function() {
5542 var e = this
5543 , t = this.props.app;
5544 this.socket.readyState !== WebSocket.OPEN && this.socket.log("check state", this.socket.readyState, !t.error.catched, !this.socket.doNotReconnect),
5545 this.socket.readyState !== WebSocket.CLOSED || t.error.catched || this.socket.doNotReconnect || (this.props.setSocketFetchingState(!0),
5546 this.initWebSocket()),
5547 setTimeout((function() {
5548 return e.checkConnectionState()
5549 }
5550 ), S.rand(800, 1500))
5551 }
5552 }, {
5553 key: "handleHashParams",
5554 value: function() {
5555 this.hashParams = Object(c.a)({}, y.a.parse(window.location.hash.substr(2))),
5556 this.hashParamsStr = window.location.hash.substr(2),
5557 Object.keys(this.hashParams).length > 0 && (this.props.setParamsInitialData(this.hashParams),
5558 window.location.hash = "");
5559 var e = y.a.parse(window.location.search.substr(1));
5560 if (this.hashParams.hasOwnProperty("debug") || [565398579, 207657990, 100772411].includes(parseInt(e.vk_user_id))) {
5561 this.hashParams.debug = !0;
5562 var t = document.createElement("script");
5563 t.src = "./eruda.min.js",
5564 document.body.appendChild(t),
5565 t.onload = function() {
5566 var e = document.createElement("script");
5567 e.innerHTML = "eruda.init();",
5568 document.body.appendChild(e)
5569 }
5570 }
5571 }
5572 }, {
5573 key: "componentDidMount",
5574 value: function() {
5575 var e = this;
5576 window.addEventListener("popstate", (function() {
5577 var t = e.props.app;
5578 if (t.activeWindow)
5579 e.props.hideActiveWindow();
5580 else if (t.activeModal)
5581 e.props.hideActiveModal();
5582 else if (t.toasts.length > 0)
5583 e.props.deleteToast(0);
5584 else {
5585 var a = t.openedTab + "Tab";
5586 Object(s.a)(t[a].history).length >= 2 && e.props.handleTabSwipeBack()
5587 }
5588 }
5589 )),
5590 this.updateLastActivityTime(),
5591 this.activityChecker = setInterval((function() {
5592 ((new Date).getTime() - e.lastActivityTime) / 1e3 > 2700 && (e.props.handleAppError(0, "Disconnect", "\u0412\u044b \u0431\u044b\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0438\u0437-\u0437\u0430 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438"),
5593 e.socket.close(),
5594 clearInterval(e.activityChecker))
5595 }
5596 ), 5e3),
5597 document.body.addEventListener("mousemove", this.updateLastActivityTime),
5598 document.body.addEventListener("touchmove", this.updateLastActivityTime),
5599 document.body.addEventListener("keydown", this.updateLastActivityTime),
5600 document.body.addEventListener("scroll", this.updateLastActivityTime)
5601 }
5602 }, {
5603 key: "componentWillUnmount",
5604 value: function() {
5605 clearInterval(this.activityChecker),
5606 document.body.removeEventListener("mousemove", this.updateLastActivityTime),
5607 document.body.addEventListener("touchmove", this.updateLastActivityTime),
5608 document.body.removeEventListener("keydown", this.updateLastActivityTime),
5609 document.body.removeEventListener("scroll", this.updateLastActivityTime)
5610 }
5611 }, {
5612 key: "componentDidCatch",
5613 value: function(e, t) {
5614 console.log("ComponentError", e, t)
5615 }
5616 }, {
5617 key: "onSocketMessage",
5618 value: function(e, t) {
5619 var a = this
5620 , n = this.props.app;
5621 "init" === e ? (this.socket.doNotReconnect = !1,
5622 this.props.initWebApp(),
5623 t.user.is_onboard_completed || this.props.setActiveTab("onboard"),
5624 this.props.setUserInitialData(t.user),
5625 this.props.setGroupInitialData(t.group),
5626 this.props.setConfigInitialData(t.config),
5627 this.props.setBonusesInitialData(t.bonuses),
5628 this.props.setImprovementsInitialData(t.improvements),
5629 t.items && this.props.setItemsInitialData(t.items),
5630 t.disinfectants && this.props.setDisinfectantsInitialData(t.disinfectants),
5631 setTimeout((function() {
5632 return a.handleOpenParams()
5633 }
5634 ), 500),
5635 setTimeout((function() {
5636 return j.sendEvent("ratings:update")
5637 }
5638 ), 400)) : "init:extended" === e ? (this.props.setTransfersInitialData(t.transfers),
5639 this.props.setAchievementsInitialData(t.achievements),
5640 t.games && this.props.setGamesInitialData(t.games),
5641 t.items && this.props.setItemsInitialData(t.items),
5642 t.disinfectants && this.props.setDisinfectantsInitialData(t.disinfectants),
5643 t.subscription && this.props.setSubscriptionInitialData(t.subscription)) : "onboard" === e ? this.props.setOnboardInitialData(t) : "user:update" === e ? this.props.updateUserProperty(t[0], t[1], t[2]) : "ratings:update" === e ? this.props.setRatingsInitialData(t.ratings) : "users:info" === e ? this.props.addCacheUsers(t.users) : "profiles:proxy" === e ? (this.props.addCacheProfiles(t.profiles),
5644 S.requestUsersToCacheIfNecessary(this.props.app.users, t.profiles.map((function(e) {
5645 return e.id
5646 }
5647 )))) : "merchant:info" === e ? t.merchant.merchant_id === Math.abs(n.transferWindow.params.peer_id) && this.props.setWindowParam("transfer", "merchant", t.merchant) : "transfer:new" === e ? (this.props.addNewTransfer(t.transfer),
5648 t.transfer.peer_id && t.transfer.peer_id > 0 && S.requestProfilesToCache([t.transfer.peer_id])) : "transfer:error" === e ? this.props.handleTransferWindowEvent("transfer:error", t) : "transfer:success" === e ? (this.props.handleTransferWindowEvent("transfer:success", t),
5649 this.props.addNewTransfer(t.transfer)) : "user:sync" === e ? this.props.setUserInitialData(t) : "items:sync" === e ? this.props.setItemsInitialData(t) : "bonuses:sync" === e ? this.props.setBonusesInitialData(t) : "improvements:sync" === e ? this.props.setImprovementsInitialData(t) : "disinfectants:sync" === e ? this.props.setDisinfectantsInitialData(t) : "achievements:sync" === e ? this.props.setAchievementsInitialData(t) : "subscription:sync" === e ? this.props.setSubscriptionInitialData(t) : "achievements:new" === e ? this.props.setSnackbar("special", "\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043d\u043e\u0432\u043e\u0435 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435!", "\u041e\u0442\u043a\u0440\u044b\u0442\u044c", (function() {
5650 a.props.setActiveTab("information"),
5651 a.props.setOpenedAchievementsCategory(t.category_id),
5652 a.props.setActivePanel("information", "achievement")
5653 }
5654 )) : "achievements:category" === e ? this.props.setAchievementCategoryData(t.category_id, t.achievements) : "merchant_create:error" === e ? this.props.handleMerchantWindowEvent("merchant_create:error", t) : "merchant_create:success" === e && this.props.handleMerchantWindowEvent("merchant_create:success", t)
5655 }
5656 }, {
5657 key: "render",
5658 value: function() {
5659 var e = this.props.app;
5660 if (e.fetching || e.sdkFetching)
5661 return r.a.createElement(it, null);
5662 if (e.error.catched)
5663 return r.a.createElement(wt, null);
5664 var t = function(e, t, a) {
5665 return r.a.createElement(C.f, {
5666 id: e,
5667 header: r.a.createElement(C.g, {
5668 children: t,
5669 right: r.a.createElement(C.k, {
5670 onClick: function() {
5671 return window.history.back()
5672 }
5673 }, r.a.createElement("img", {
5674 src: Ke.a,
5675 alt: ""
5676 }))
5677 }),
5678 dynamicContentHeight: !0
5679 }, a)
5680 }
5681 , a = function(a, n, i) {
5682 return r.a.createElement(C.i, {
5683 id: a
5684 }, null !== n ? r.a.createElement(C.j, {
5685 className: "PanelHeader__in--bordered",
5686 onClick: function() {
5687 return window.history.back()
5688 },
5689 left: r.a.createElement("img", {
5690 src: ua.a,
5691 alt: ""
5692 })
5693 }, n) : r.a.createElement(C.j, null), i, e.activeSnackbar, r.a.createElement(C.h, {
5694 activeModal: e.activeModal,
5695 onClose: function() {
5696 return window.history.back()
5697 }
5698 }, t("games", "\u0418\u0433\u0440\u044b", r.a.createElement(ra, null)), t("bonuses", "\u0411\u043e\u043d\u0443\u0441\u044b", r.a.createElement(sa, null)), t("improvements", "\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f", r.a.createElement(ma, null)), t("subscriptions", "\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 VK Donut", r.a.createElement(va, null))))
5699 };
5700 return r.a.createElement(C.b, {
5701 isWebView: !0
5702 }, r.a.createElement(k.YMInitializer, {
5703 accounts: [62120899]
5704 }), r.a.createElement(Tt, null, r.a.createElement(C.c, {
5705 activeStory: e.openedTab,
5706 tabbar: r.a.createElement(St, null)
5707 }, r.a.createElement(C.q, {
5708 id: "onboard",
5709 history: e.onboardTab.history,
5710 activePanel: e.onboardTab.activePanel,
5711 onSwipeBack: this.onSwipeBack,
5712 onSwipeBackStart: this.onSwipeBackStart,
5713 onTransition: this.onTransition
5714 }, a("main", null, r.a.createElement(He, null))), r.a.createElement(C.q, {
5715 id: "main",
5716 history: e.mainTab.history,
5717 activePanel: e.mainTab.activePanel,
5718 onSwipeBack: this.onSwipeBack,
5719 onSwipeBackStart: this.onSwipeBackStart,
5720 onTransition: this.onTransition
5721 }, a("main", null, r.a.createElement(oe, null)), a("rating", "\u0420\u0435\u0439\u0442\u0438\u043d\u0433", r.a.createElement(Ot, null)), a("transfer", "\u041f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438", r.a.createElement(Dt, null)), a("history", "\u0418\u0441\u0442\u043e\u0440\u0438\u044f", r.a.createElement(Ht, null)), a("shop", "\u041c\u0430\u0433\u0430\u0437\u0438\u043d", r.a.createElement(Kt, null))), r.a.createElement(C.q, {
5722 id: "information",
5723 history: e.informationTab.history,
5724 activePanel: e.informationTab.activePanel,
5725 onSwipeBack: this.onSwipeBack,
5726 onSwipeBackStart: this.onSwipeBackStart,
5727 onTransition: this.onTransition
5728 }, a("main", null, r.a.createElement(Me, null)), a("shop", "\u041c\u0430\u0433\u0430\u0437\u0438\u043d", r.a.createElement(Kt, null)), a("achievements", "\u0414\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f", r.a.createElement(aa, null)), a("achievement", "\u0414\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f", r.a.createElement($t, null))), r.a.createElement(C.q, {
5729 id: "profile",
5730 history: e.profileTab.history,
5731 activePanel: e.profileTab.activePanel,
5732 onSwipeBack: this.onSwipeBack,
5733 onSwipeBackStart: this.onSwipeBackStart,
5734 onTransition: this.onTransition
5735 }, a("main", null, r.a.createElement(he, null))))))
5736 }
5737 }]),
5738 a
5739 }(r.a.Component)
5740 , ba = Object(p.c)((function(e) {
5741 return {
5742 app: e.app,
5743 user: e.user,
5744 bonuses: e.bonuses,
5745 improvements: e.improvements,
5746 items: e.items,
5747 disinfectants: e.disinfectants
5748 }
5749 }
5750 ), fa)(ha)
5751 , Ea = a(32)
5752 , ga = a(95)
5753 , ya = a(90)
5754 , ka = a.n(ya)
5755 , Ta = a(91)
5756 , Na = a.n(Ta)
5757 , wa = a(92)
5758 , ja = a.n(wa)
5759 , Aa = {
5760 fetching: !0,
5761 sdkFetching: !0,
5762 socketFetching: !0,
5763 toasts: [],
5764 config: {
5765 app_id: 0,
5766 group_id: 0,
5767 merchant_id: 0,
5768 merchant_exchange_payload: 0,
5769 broadcast_id: ""
5770 },
5771 params: {},
5772 friends: [],
5773 profiles: [],
5774 lastProfiles: [],
5775 users: [],
5776 error: {
5777 catched: !1,
5778 code: 0,
5779 message: "",
5780 description: ""
5781 },
5782 openedTab: "main",
5783 activeSnackbar: null,
5784 activeModal: null,
5785 activeWindow: null,
5786 mainTab: {
5787 activePanel: "main",
5788 history: ["main"]
5789 },
5790 informationTab: {
5791 activePanel: "main",
5792 history: ["main"]
5793 },
5794 profileTab: {
5795 activePanel: "main",
5796 history: ["main"]
5797 },
5798 onboardTab: {
5799 activePanel: "main",
5800 history: ["main"]
5801 },
5802 improvementWindow: {
5803 params: {}
5804 },
5805 bonusWindow: {
5806 params: {}
5807 },
5808 shareWindow: {
5809 params: {}
5810 },
5811 transferWindow: {
5812 fetching: !1,
5813 is_finished: !1,
5814 is_success: !0,
5815 result: {},
5816 params: {},
5817 merchant: {}
5818 },
5819 merchantWindow: {
5820 fetching: !1,
5821 is_finished: !1,
5822 is_success: !0,
5823 result: {}
5824 },
5825 profileWindow: {
5826 params: {},
5827 user: {}
5828 },
5829 customizationWindow: {}
5830 }
5831 , Sa = function() {
5832 window.history.pushState(null, null, window.location.href)
5833 };
5834 function Pa() {
5835 var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Aa
5836 , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
5837 if ("INIT_WEB_APP" === t.type)
5838 return e.fetching = !1,
5839 Object(c.a)({}, e);
5840 if ("INIT_VK_SDK" === t.type)
5841 return e.sdkFetching = !1,
5842 Object(c.a)({}, e);
5843 if ("SET_SOCKET_STATE" === t.type)
5844 return e.socketFetching = t.state,
5845 Object(c.a)({}, e);
5846 if ("SET_ACTIVE_TAB" === t.type) {
5847 if (t.tab === e.openedTab) {
5848 var a = e.openedTab + "Tab"
5849 , n = Object(s.a)(e[a].history);
5850 if (n.length >= 2) {
5851 n.pop();
5852 var i = n[n.length - 1];
5853 "main" === i && v.a.send("VKWebAppDisableSwipeBack").then((function() {}
5854 )),
5855 e[a].history = n,
5856 e[a].activePanel = i
5857 }
5858 } else
5859 null !== e.activeSnackbar && (e.activeSnackbar = null),
5860 e.openedTab = t.tab;
5861 return Object(c.a)({}, e)
5862 }
5863 if ("SET_ACTIVE_PANEL" === t.type) {
5864 var o = t.tab + "Tab"
5865 , l = Object(s.a)(e[o].history);
5866 return l.push(t.panel),
5867 "main" === e[o].activePanel && v.a.send("VKWebAppEnableSwipeBack").then((function() {}
5868 )),
5869 null !== e.activeSnackbar && (e.activeSnackbar = null),
5870 e[o].history = l,
5871 e[o].activePanel = t.panel,
5872 Sa(),
5873 Object(c.a)({}, e)
5874 }
5875 if ("CLEAR_TAB_HISTORY" === t.type) {
5876 var m = t.tab + "Tab";
5877 return e[m].history = ["main"],
5878 Object(c.a)({}, e)
5879 }
5880 if ("HANDLE_TAB_SWIPE_BACK" === t.type) {
5881 var d = e.openedTab + "Tab"
5882 , u = Object(s.a)(e[d].history);
5883 if (u.length >= 2) {
5884 u.pop();
5885 var p = u[u.length - 1];
5886 return "main" === p && v.a.send("VKWebAppDisableSwipeBack").then((function() {}
5887 )),
5888 e[d].history = u,
5889 e[d].activePanel = p,
5890 Object(c.a)({}, e)
5891 }
5892 } else {
5893 if ("HANDLE_APP_ERROR" === t.type)
5894 return e.fetching = !1,
5895 e.error.catched = !0,
5896 e.error.code = t.code,
5897 e.error.message = t.message,
5898 e.error.description = t.description,
5899 Object(c.a)({}, e);
5900 if ("SET_CONFIG_INITIAL_DATA" === t.type)
5901 return e.config = t.data,
5902 Object(c.a)({}, e);
5903 if ("SET_PARAMS_INITIAL_DATA" === t.type)
5904 return e.params = t.data,
5905 Object(c.a)({}, e);
5906 if ("SET_USER_FRIENDS" === t.type)
5907 return e.friends = t.data,
5908 Object(c.a)({}, e);
5909 if ("ADD_CACHE_USERS" === t.type) {
5910 var _, f = Object(N.a)(t.data);
5911 try {
5912 var h = function() {
5913 var t = _.value
5914 , a = e.users.findIndex((function(e) {
5915 return e.user_id === t.user_id
5916 }
5917 ));
5918 -1 !== a && e.users.splice(a, 1),
5919 e.users.push(t)
5920 };
5921 for (f.s(); !(_ = f.n()).done; )
5922 h()
5923 } catch (j) {
5924 f.e(j)
5925 } finally {
5926 f.f()
5927 }
5928 return Object(c.a)({}, e)
5929 }
5930 if ("ADD_CACHE_PROFILES" === t.type) {
5931 e.lastProfiles = t.data;
5932 var b, E = Object(N.a)(t.data);
5933 try {
5934 var g = function() {
5935 var t = b.value;
5936 e.profiles.find((function(e) {
5937 return t.id === e.id
5938 }
5939 )) || e.profiles.push(t)
5940 };
5941 for (E.s(); !(b = E.n()).done; )
5942 g()
5943 } catch (j) {
5944 E.e(j)
5945 } finally {
5946 E.f()
5947 }
5948 return Object(c.a)({}, e)
5949 }
5950 if ("ADD_TOAST" === t.type)
5951 return e.toasts.push({
5952 id: S.generateUuid(),
5953 title: t.title,
5954 message: t.message,
5955 button: t.button,
5956 category: t.category,
5957 buttonCallback: t.buttonCallback
5958 }),
5959 Sa(),
5960 Object(c.a)({}, e);
5961 if ("DELETE_TOAST" === t.type)
5962 return e.toasts.splice(t.index, 1),
5963 Object(c.a)({}, e);
5964 if ("SET_SNACKBAR" === t.type) {
5965 var y = ka.a;
5966 return "error" === t.category ? y = Na.a : "special" === t.category && (y = ja.a),
5967 e.activeSnackbar = r.a.createElement(C.m, {
5968 layout: "vertical",
5969 before: r.a.createElement("img", {
5970 src: y,
5971 alt: ""
5972 }),
5973 action: t.button,
5974 onActionClick: function() {
5975 t.onClick && t.onClick()
5976 },
5977 onClose: function() {
5978 window.deleteSnackbar && window.deleteSnackbar()
5979 }
5980 }, t.message),
5981 Object(c.a)({}, e)
5982 }
5983 if ("DELETE_SNACKBAR" === t.type)
5984 return e.activeSnackbar = null,
5985 Object(c.a)({}, e);
5986 if ("SET_ACTIVE_MODAL" === t.type)
5987 return e.activeModal = t.id,
5988 Sa(),
5989 Object(c.a)({}, e);
5990 if ("HIDE_ACTIVE_MODAL" === t.type)
5991 return e.activeModal = null,
5992 Object(c.a)({}, e);
5993 if ("SET_ACTIVE_WINDOW" === t.type) {
5994 var k = t.id + "Window";
5995 return e.activeWindow = t.id,
5996 e[k].params = Object(c.a)({}, t.params),
5997 "transfer" === t.id ? (e[k].fetching = !1,
5998 e[k].is_finished = !1,
5999 e[k].is_success = !0) : "profile" === t.id && (e[k].user = {}),
6000 Sa(),
6001 Object(c.a)({}, e)
6002 }
6003 if ("SET_WINDOW_PARAM" === t.type) {
6004 var T = t.id + "Window";
6005 return e[T][t.param] = t.value,
6006 Object(c.a)({}, e)
6007 }
6008 if ("HIDE_ACTIVE_WINDOW" === t.type) {
6009 var w = e.activeWindow + "Window";
6010 return e.activeWindow = null,
6011 e[w].params = {},
6012 Object(c.a)({}, e)
6013 }
6014 if ("HANDLE_TRANSFER_WINDOW_EVENT" === t.type)
6015 return "transfer:success" === t.event ? (e.transferWindow.fetching = !1,
6016 e.transferWindow.is_finished = !0,
6017 e.transferWindow.is_success = !0,
6018 e.transferWindow.result = t.params) : "transfer:error" === t.event && (e.transferWindow.fetching = !1,
6019 e.transferWindow.is_finished = !0,
6020 e.transferWindow.is_success = !1,
6021 e.transferWindow.result = t.params),
6022 Object(c.a)({}, e);
6023 if ("HANDLE_MERCHANT_WINDOW_EVENT" === t.type)
6024 return "merchant_create:success" === t.event ? (e.merchantWindow.fetching = !1,
6025 e.merchantWindow.is_finished = !0,
6026 e.merchantWindow.is_success = !0,
6027 e.merchantWindow.result = t.params) : "merchant_create:error" === t.event && (e.merchantWindow.fetching = !1,
6028 e.merchantWindow.is_finished = !0,
6029 e.merchantWindow.is_success = !1,
6030 e.merchantWindow.result = t.params),
6031 Object(c.a)({}, e)
6032 }
6033 return e
6034 }
6035 var La = {
6036 object: {
6037 user_id: 1,
6038 first_name: "",
6039 last_name: "",
6040 avatar: "",
6041 avatar_max: "",
6042 balance: 0,
6043 earned_balance: 0,
6044 vkcoin_balance: 0,
6045 bonuses_sum: 0,
6046 improvements_sum: 0,
6047 is_onboard_completed: !0,
6048 is_extended_animation_disabled: !1,
6049 is_infected: !1,
6050 last_infection_date: !1,
6051 can_be_infected: !1,
6052 offline_died: !1,
6053 event_informed: !1,
6054 achievement_tooltip_used: !1,
6055 referer_id: 1,
6056 infections_count: 0,
6057 recoveries_count: 0,
6058 salvations_count: 0,
6059 infected_count: 0,
6060 are_notifications_enabled: !1,
6061 visual_color_id: 0,
6062 visual_emoji_id: 0
6063 },
6064 profile: {
6065 id: 0,
6066 sex: 0,
6067 timezone: 3
6068 },
6069 onboard: {
6070 referer: {
6071 user_id: 0,
6072 first_name: "",
6073 last_name: "",
6074 avatar: "",
6075 avatar_max: "",
6076 is_infected: !1
6077 }
6078 },
6079 subscription: {
6080 is_active: !1,
6081 amount: 0,
6082 level: 0,
6083 create_date: 0,
6084 last_gift_date: 0
6085 }
6086 };
6087 function Oa() {
6088 var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : La
6089 , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
6090 if ("SET_USER_INITIAL_DATA" === t.type)
6091 return e.object = t.object,
6092 Object(c.a)({}, e);
6093 if ("SET_PROFILE_INITIAL_DATA" === t.type)
6094 return e.profile = t.profile,
6095 Object(c.a)({}, e);
6096 if ("SET_ONBOARD_INITIAL_DATA" === t.type)
6097 return e.onboard = t.object,
6098 Object(c.a)({}, e);
6099 if ("SET_SUBSCRIPTION_INITIAL_DATA" === t.type)
6100 return e.subscription = t.object,
6101 Object(c.a)({}, e);
6102 if ("SET_USER_DATA" === t.type)
6103 return e.object[t.key] = t.value,
6104 Object(c.a)({}, e);
6105 if ("UPDATE_USER_PROPERTY" === t.type) {
6106 var a = e.object[t.property];
6107 return "incr" === t.action ? a += t.value : "decr" === t.action ? a -= t.value : a = t.value,
6108 e.object[t.property] = a,
6109 Object(c.a)({}, e)
6110 }
6111 return "TICK_USER_SCROLL" === t.type ? (e.object.balance += e.object.bonuses_sum + 1,
6112 e.object.earned_balance += e.object.bonuses_sum + 1,
6113 Object(c.a)({}, e)) : "TICK_IMPROVEMENTS_UPDATE" === t.type ? (e.object.balance += e.object.improvements_sum,
6114 e.object.earned_balance += e.object.improvements_sum,
6115 Object(c.a)({}, e)) : e
6116 }
6117 var Ca = {
6118 object: {
6119 group_id: 0,
6120 name: "",
6121 avatar: "",
6122 avatar_max: "",
6123 balance: ""
6124 }
6125 };
6126 function Ia() {
6127 var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Ca
6128 , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
6129 return "SET_GROUP_INITIAL_DATA" === t.type ? (e.object = t.object,
6130 Object(c.a)({}, e)) : e
6131 }
6132 var Ma = {
6133 items: []
6134 };
6135 function Wa() {
6136 var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Ma
6137 , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
6138 return "SET_GAMES_INITIAL_DATA" === t.type ? (e.items = t.data,
6139 Object(c.a)({}, e)) : e
6140 }
6141 var Da = {
6142 items: []
6143 };
6144 function Ba() {
6145 var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Da
6146 , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
6147 return "SET_ITEMS_INITIAL_DATA" === t.type ? (e.items = t.data,
6148 Object(c.a)({}, e)) : e
6149 }
6150 var Ra = {
6151 items: []
6152 };
6153 function xa() {
6154 var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Ra
6155 , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
6156 return "SET_BONUSES_INITIAL_DATA" === t.type ? (e.items = t.data,
6157 Object(c.a)({}, e)) : e
6158 }
6159 var Va = {
6160 users: {
6161 current_place: null,
6162 items: []
6163 },
6164 groups: {
6165 current_place: null,
6166 items: []
6167 },
6168 merchants: {
6169 current_place: null,
6170 items: []
6171 },
6172 dons: {
6173 current_place: null,
6174 items: [],
6175 profiles: []
6176 }
6177 };
6178 function Ua() {
6179 var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Va
6180 , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
6181 return "SET_RATINGS_INITIAL_DATA" === t.type ? (e.users = t.data.users,
6182 e.groups = t.data.groups,
6183 e.merchants = t.data.merchants,
6184 e.dons = t.data.dons,
6185 Object(c.a)({}, e)) : e
6186 }
6187 var Fa = {
6188 items: []
6189 };
6190 function Ha() {
6191 var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Fa
6192 , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
6193 return "ADD_NEW_TRANSFER" === t.type ? (e.items = [t.data].concat(Object(s.a)(e.items)),
6194 Object(c.a)({}, e)) : "SET_TRANSFERS_INITIAL_DATA" === t.type ? (e.items = t.data,
6195 Object(c.a)({}, e)) : e
6196 }
6197 var Ga = {
6198 items: []
6199 };
6200 function Ka() {
6201 var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Ga
6202 , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
6203 return "SET_IMPROVEMENTS_INITIAL_DATA" === t.type ? (e.items = t.data,
6204 Object(c.a)({}, e)) : e
6205 }
6206 var za = {
6207 items: []
6208 };
6209 function qa() {
6210 var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : za
6211 , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
6212 return "SET_DISINFECTANTS_INITIAL_DATA" === t.type ? (e.items = t.data,
6213 Object(c.a)({}, e)) : e
6214 }
6215 var Ya = {
6216 categories: [],
6217 openedCategoryId: null,
6218 openedCategoryAchievements: []
6219 };
6220 function Ja() {
6221 var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Ya
6222 , t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
6223 if ("SET_ACHIEVEMENTS_INITIAL_DATA" === t.type)
6224 return e.categories = t.data,
6225 Object(c.a)({}, e);
6226 if ("SET_ACHIEVEMENT_CATEGORY_DATA" === t.type) {
6227 if (e.openedCategoryId === t.category_id)
6228 return e.openedCategoryAchievements = t.data,
6229 Object(c.a)({}, e)
6230 } else if ("SET_OPENED_ACHIEVEMENTS_CATEGORY" === t.type)
6231 return e.openedCategoryId = t.id,
6232 Object(c.a)({}, e);
6233 return e
6234 }
6235 var Xa = function(e) {
6236 return Object(Ea.combineReducers)({
6237 router: Object(ga.a)(e),
6238 app: Pa,
6239 user: Oa,
6240 group: Ia,
6241 games: Wa,
6242 items: Ba,
6243 bonuses: xa,
6244 ratings: Ua,
6245 transfers: Ha,
6246 improvements: Ka,
6247 disinfectants: qa,
6248 achievements: Ja
6249 })
6250 }
6251 , Qa = a(24)
6252 , Za = (a(233),
6253 a(94))
6254 , $a = Object(Qa.a)()
6255 , en = Object(Ea.applyMiddleware)((function(e) {
6256 return function(e) {
6257 return function(t) {
6258 return e(t)
6259 }
6260 }
6261 }
6262 ))
6263 , tn = Object(Ea.createStore)(Xa($a), en);
6264 o.a.render(r.a.createElement(p.a, {
6265 store: tn
6266 }, r.a.createElement(Za.a, {
6267 basename: "/"
6268 }, r.a.createElement(ba, null))), document.getElementById("root")),
6269 "serviceWorker"in navigator && navigator.serviceWorker.ready.then((function(e) {
6270 e.unregister()
6271 }
6272 ))
6273}
6274]), [[155, 1, 2]]]);
6275