Advertisement
Guest User

Untitled

a guest
Nov 8th, 2019
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. v
  2. var URL_ROOT = "https://phazza.com/";
  3. var URL_CLIENT_RES = "https://phazza.com/client/res/";
  4. var URL_VERSION = "https://phazza.com/";
  5. var URL_VERSION_RES = "https://phazza.com/client/ver-user/res/";
  6. var browser, d = document,
  7.     de = document.documentElement,
  8.     UNDEF = "undefined",
  9.     NOT_EXISTS = -2147483647,
  10.     EXISTS = -2147483646,
  11.     WRONG_FILE_EXTENTION = -2147483640,
  12.     EMAIL_REG_EXP = "[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})",
  13.     page, page_cpanel, mobile, E = 1E-5,
  14.     Strings = {
  15.         EMPTY: "",
  16.         TRUE: "t",
  17.         FALSE: "f",
  18.         OK: "0",
  19.         ERROR: "1",
  20.         NOT_EXISTS: "-2147483647"
  21.     },
  22.     Browsers = {
  23.         FIREFOX: "Firefox",
  24.         OPERA: "Opera",
  25.         CHROME: "Chrome",
  26.         SAFARI: "Safari",
  27.         IE: "IE",
  28.         EDGE: "EDGE"
  29.     },
  30.     Results = {
  31.         OK: 0,
  32.         ERROR: 1
  33.     },
  34.     Colors = {
  35.         WHITE: "#fff",
  36.         LIGHT_RED: "#ffd7d7",
  37.         RED: "#f00",
  38.         BLACK: "#000",
  39.         GRAY128: "#808080",
  40.         GRAY230: "#e6e6e6",
  41.         GRAY242: "#f2f2f2",
  42.         TRANSPARENT: "rgba(0, 0, 0, 0)"
  43.     },
  44.     ScreenMetrics = {
  45.         width: NOT_EXISTS,
  46.         height: NOT_EXISTS,
  47.         mobile_limit: 768,
  48.         scale: 1
  49.     },
  50.     months = "January February March April May June July August September Octomber November December".split(" ");
  51.  
  52. function getElementById(a) {
  53.     a = d.getElementById(a);
  54.     a.removeAttribute("id");
  55.     return a
  56. }
  57.  
  58. function getElementByIdSafe(a) {
  59.     a = d.getElementById(a);
  60.     null !== a && a.removeAttribute("id");
  61.     return a
  62. }
  63.  
  64. function getScreenX(a) {
  65.     return a.getBoundingClientRect().left
  66. }
  67.  
  68. function getScreenY(a) {
  69.     return a.getBoundingClientRect().top
  70. }
  71.  
  72. function getX(a) {
  73.     for (var b = 0; a;) b += a.offsetLeft, a = a.offsetParent;
  74.     return b
  75. }
  76.  
  77. function getY(a) {
  78.     for (var b = 0; a;) b += a.offsetTop, a = a.offsetParent;
  79.     return b
  80. }
  81.  
  82. function getScrollTop() {
  83.     return (window.pageYOffset || de.scrollTop) - (de.clientTop || 0)
  84. }
  85.  
  86. function setScrollTop(a) {
  87.     de.scrollTop = d.body.scrollTop = a
  88. }
  89.  
  90. function getScrollLeft() {
  91.     return (window.pageXOffset || de.scrollLeft) - (de.clientLeft || 0)
  92. }
  93.  
  94. function checkBrowser() {
  95.     browser_version = "";
  96.     var a = navigator.userAgent;
  97.     if (0 <= a.indexOf("Edge")) browser = Browsers.EDGE;
  98.     else if (0 <= a.indexOf("Firefox")) browser = Browsers.FIREFOX;
  99.     else if (0 <= a.indexOf("OPR")) browser = Browsers.OPERA;
  100.     else if (0 <= a.indexOf("hrome")) browser = Browsers.CHROME;
  101.     else if (0 <= a.indexOf("afari")) browser = Browsers.SAFARI;
  102.     else {
  103.         var b = "";
  104.         0 <= a.indexOf("MSIE") ? b = a.indexOf("MSIE") + 4 : 0 <= a.indexOf(".NET") && (b = a.indexOf("rv:") + 3);
  105.         if (b !== Strings.EMPTY) {
  106.             for (browser = Browsers.IE;
  107.                 " " === a.charAt(b);) ++b;
  108.             do browser_version += a.charAt(b++); while ("0" <= a.charAt(b) && "9" >= a.charAt(b))
  109.         }
  110.     }
  111. }
  112.  
  113. function makeHTML5ElemetsForIE() {
  114.     document.createElement("article");
  115.     document.createElement("footer");
  116.     document.createElement("header");
  117.     document.createElement("main");
  118.     document.createElement("menu");
  119.     document.createElement("menuitem");
  120.     document.createElement("nav");
  121.     document.createElement("section");
  122.     document.createElement("canvas")
  123. }
  124.  
  125. function isCurrentPage(a) {
  126.     var b = "/" !== d.URL[d.URL.length - 1] ? d.URL + "/" : d.URL;
  127.     "/" !== a[a.length - 1] && (a += "/");
  128.     return -1 !== b.indexOf(a)
  129. }
  130.  
  131. function getChildByClassName(a, b) {
  132.     for (var c, e = a.childNodes, f = e.length - 1; 0 <= f; --f)
  133.         if (c = e[f].className, null !== c && "undefined" !== typeof c) {
  134.             c = c.split(" ");
  135.             for (var g = c.length - 1; 0 <= g; --g)
  136.                 if (c[g] === b) return e[f]
  137.         } return null
  138. }
  139.  
  140. function getChildrenHeight(a) {
  141.     a = a.childNodes;
  142.     for (var b = 0, c = a.length - 1; 0 <= c; --c) typeof a[c].offsetHeight !== UNDEF && (b += a[c].offsetHeight);
  143.     return b
  144. }
  145.  
  146. function dim(a, b) {
  147.     var c = d.getElementById("dim");
  148.     null === c && (c = d.createElement("div"), c.id = "dim", c.setAttribute("v", "0"), d.body.appendChild(c));
  149.     c.style.opacity = 1;
  150.     c.setAttribute("v", parseInt(c.getAttribute("v")) + 1);
  151.     typeof b !== UNDEF && (c.style.zIndex = b - 1);
  152.     requestAnimationFrame(function() {
  153.         c.style.backgroundColor = "rgba(0, 0, 0, 0.6)"
  154.     }, 0);
  155.     typeof a !== UNDEF && null !== a && (c.onclick = function() {
  156.         PopupWindow.hide(a)
  157.     })
  158. }
  159.  
  160. function undim() {
  161.     var a = d.getElementById("dim");
  162.     if (null !== a) {
  163.         var b = parseInt(a.getAttribute("v")) - 1;
  164.         0 > b && (b = 0);
  165.         a.setAttribute("v", b);
  166.         a.style.zIndex = 2048;
  167.         "0" === a.getAttribute("v") && (a.addEventListener("transitionend", function() {
  168.             "0" === a.getAttribute("v") && null !== a.parentNode && d.body.removeChild(a)
  169.         }), a.style.opacity = 0)
  170.     }
  171. }
  172.  
  173. function disableActions() {
  174.     var a, b = d.getElementById("disable_actions");
  175.     null === b && (b = d.createElement("div"), b.onclick = function(a) {
  176.         a.stopPropagation()
  177.     }, b.id = "disable_actions", d.body.appendChild(b), a = d.createElement("span"), a.id = "disable_label", a.className = "Purple", a.innerHTML = "Working...", d.body.appendChild(a), requestAnimationFrame(function() {
  178.         b.style.backgroundColor = "rgba(0, 0, 0, 0.1)";
  179.         a.style.transform = "translateY(0)"
  180.     }))
  181. }
  182.  
  183. function enableActions() {
  184.     var a = d.getElementById("disable_label"),
  185.         b = d.getElementById("disable_actions");
  186.     null !== b && (requestAnimationFrame(function() {
  187.         b.style.opacity = 0;
  188.         a.style.transform = "translateY(-32px)"
  189.     }), setTimeout(function() {
  190.         null !== b.parentNode && d.body.removeChild(b);
  191.         null !== a.parentNode && d.body.removeChild(a)
  192.     }, 250))
  193. }
  194.  
  195. function addClassArray(a, b) {
  196.     for (var c = a.length; 0 < c--;) addClass(a[c], b)
  197. }
  198.  
  199. function addClass(a, b) {
  200.     if (!1 === hasClass(a, b)) {
  201.         var c = a.getAttribute("class");
  202.         null === c && (c = Strings.EMPTY);
  203.         a.setAttribute("class", c + " " + b)
  204.     }
  205. }
  206.  
  207. function removeClassArray(a, b) {
  208.     for (var c = a.length; 0 < c--;) removeClass(a[c], b)
  209. }
  210.  
  211. function removeClass(a, b) {
  212.     var c = a.getAttribute("class");
  213.     if (null !== c) {
  214.         for (var e = 0, c = c.split(" "), f = b.split(" "), g = c.length; 0 < g--;)
  215.             for (var h = f.length; 0 < h--;)
  216.                 if (c[g] === f[h]) {
  217.                     ++e;
  218.                     c[g] = Strings.EMPTY;
  219.                     break
  220.                 } if (0 !== e) {
  221.             f = Array(c.length - e);
  222.             for (g = e = 0; g < c.length; ++g) c[g] !== Strings.EMPTY && (f[e++] = c[g]);
  223.             a.setAttribute("class", f.join(" "))
  224.         }
  225.     }
  226. }
  227.  
  228. function hasClass(a, b) {
  229.     var c = a.getAttribute("class");
  230.     if (null === c) return !1;
  231.     for (var c = c.split(" "), e = c.length; 0 < e--;)
  232.         if (c[e] === b) return !0;
  233.     return !1
  234. }
  235.  
  236. function checkForCorrectField(a, b, c) {
  237.     var e = a.value;
  238.     !0 !== c && (e = e.trim());
  239.     a.blur();
  240.     a.oninput = function() {
  241.         a.style.backgroundColor = typeof b === UNDEF ? Colors.GRAY242 : b
  242.     };
  243.     if (e === Strings.EMPTY) return a.style.backgroundColor = Colors.LIGHT_RED, null;
  244.     a.style.backgroundColor = typeof b === UNDEF ? Colors.GRAY242 : b;
  245.     return e
  246. }
  247.  
  248. function checkForCorrectEmail(a, b) {
  249.     var c, e;
  250.     a.blur();
  251.     a.oninput = function() {
  252.         a.style.backgroundColor = typeof b === UNDEF ? Colors.GRAY242 : b
  253.     };
  254.     c = a.value.trim();
  255.     e = c.match(EMAIL_REG_EXP);
  256.     if (c === Strings.EMPTY || null === e) return a.style.backgroundColor = Colors.LIGHT_RED, null;
  257.     a.style.backgroundColor = typeof b === UNDEF ? Colors.GRAY242 : b;
  258.     return c
  259. }
  260.  
  261. function checkForCorrectPass(a, b, c) {
  262.     var e, f;
  263.     e = checkForCorrectField(a, c, !0);
  264.     f = checkForCorrectField(b, c, !0);
  265.     if (e !== f || null === e) return a.style.backgroundColor = b.style.backgroundColor = Colors.LIGHT_RED, null;
  266.     a.style.backgroundColor = b.style.backgroundColor = typeof c === UNDEF ? Colors.GRAY128 : c;
  267.     return e
  268. }
  269.  
  270. function filterPhone(a) {
  271.     if (isSystemKey(a)) return !0;
  272.     a = String.fromCharCode(a.which);
  273.     return "+" === a ? this.value === Strings.EMPTY : "0" <= a && "9" >= a || " " === a
  274. }
  275.  
  276. function filterNumber(a) {
  277.     if (isSystemKey(a)) return !0;
  278.     a = String.fromCharCode(a.which);
  279.     return "+" === a || "-" === a ? this.value === Strings.EMPTY : "0" <= a && "9" >= a
  280. }
  281.  
  282. function filterFloat(a) {
  283.     if (isSystemKey(a)) return !0;
  284.     a = String.fromCharCode(a.which);
  285.     return "+" === a || "-" === a ? this.value === Strings.EMPTY : "0" <= a && "9" >= a ? !0 : "." === a ? -1 === this.value.indexOf(".") : !1
  286. }
  287.  
  288. function filterNumberUnsigned(a) {
  289.     var b = String.fromCharCode(a.which);
  290.     return isSystemKey(a) ? !0 : "0" <= b && "9" >= b
  291. }
  292.  
  293. function isSystemKey(a) {
  294.     return 8 === a.keyCode || 46 === a.keyCode || 35 <= a.keyCode && 40 >= a.keyCode ? !0 : 0 === a.which
  295. }
  296.  
  297. function getCookieValue(a) {
  298.     for (var b, c = document.cookie.split(";"), e = c.length - 1; 0 <= e; --e)
  299.         if (b = c[e].split("="), b[0].trim() === a) return b[1];
  300.     return Strings.EMPTY
  301. }
  302.  
  303. function deleteCookie(a) {
  304.     var b = new Date;
  305.     b.setFullYear(b.getFullYear() - 10);
  306.     d.cookie = a + "=1; expires=" + b.toGMTString() + "; path=/"
  307. }
  308.  
  309. function setSelectValue(a, b) {
  310.     for (var c = a.options.length - 1; 0 <= c; --c)
  311.         if (a.options[c].value == b) {
  312.             a.selectedIndex = c;
  313.             break
  314.         }
  315. }
  316.  
  317. function stopPropagation(a) {
  318.     a.stopPropagation()
  319. }
  320.  
  321. function l() {
  322.     console.log.apply(this, arguments)
  323. }
  324. String.prototype.replaceAllChar = function(a, b) {
  325.     for (var c = -1, e = "", f = this.length, g = 0; g < f; ++g) this[g] === a && (e += this.substring(c + 1, g) + b, c = g);
  326.     return e += this.substring(c + 1)
  327. };
  328. String.prototype.replaceAll = function(a, b, c) {
  329.     var e;
  330.     c = typeof c === UNDEF ? 0 : c;
  331.     var f, g = a.length;
  332.     for (e = this.substring(0, c);;) {
  333.         f = this.indexOf(a, c);
  334.         if (-1 === f) {
  335.             e += this.substring(c);
  336.             break
  337.         }
  338.         e += this.substring(c, f) + b;
  339.         c = f + g
  340.     }
  341.     return e
  342. };
  343. String.prototype.replaceAt = function(a, b) {
  344.     return this.substring(0, a) + b + this.substring(a + b.length)
  345. };
  346. Date.prototype.formatCalendarDate = function() {
  347.     return this.getDate().formatSpace(2) + "." + (this.getMonth() + 1).formatSpace(2) + "." + this.getFullYear()
  348. };
  349. Date.prototype.formatCalendarTime = function() {
  350.     return this.getHours().formatSpace(2) + ":" + this.getMinutes().formatSpace(2)
  351. };
  352. Date.prototype.equalsCalendarDate = function(a) {
  353.     a = "number" === typeof a ? new Date(a) : a;
  354.     return this.getDate() === a.getDate() && this.getMonth() === a.getMonth() && this.getFullYear() === a.getFullYear()
  355. };
  356. Date.prototype.clearTime = function() {
  357.     this.setHours(0);
  358.     this.setMinutes(0);
  359.     this.setSeconds(0);
  360.     this.setMilliseconds(0)
  361. };
  362. Date.prototype.clear = function() {
  363.     this.clearTime();
  364.     this.setYear(1970);
  365.     this.setMonth(0);
  366.     this.setDate(1)
  367. };
  368. Array.prototype.removeElement = function(a) {
  369.     for (var b = this.length; 0 < b--;)
  370.         if (this[b] === a) {
  371.             this.splice(b, 1);
  372.             break
  373.         }
  374. };
  375.  
  376. function Ajax(b) {
  377.     var a = this;
  378.     a.GET = "GET";
  379.     a.POST = "POST";
  380.     a.ajax = new XMLHttpRequest;
  381.     a.ajax.onreadystatechange = function() {
  382.         a.listener()
  383.     };
  384.     a.ajax.onprogress = function() {
  385.         a.onprogresslistener()
  386.     };
  387.     a.background = typeof b === UNDEF ? !1 : b;
  388.     a.method = Strings.EMPTY;
  389.     a.url = Strings.EMPTY;
  390.     a.async = null;
  391.     a.headers = [];
  392.     a.request_query_builder = new a.RequestQueryBuilder;
  393.     a.onreadystatechange = null;
  394.     a.onprogress = null;
  395.     a.onerror = null;
  396.     a.onwipe = null;
  397.     a.responseText = null;
  398.     a.readyState = NOT_EXISTS;
  399.     a.status = NOT_EXISTS;
  400.     a.wiped = !1
  401. }
  402. Ajax.prototype.open = function(b, a, c) {
  403.     this.method = b;
  404.     this.url = a;
  405.     this.async = typeof c === UNDEF ? !0 : c;
  406.     this.method === this.POST && this.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
  407. };
  408. Ajax.prototype.setRequestHeader = function(b, a) {
  409.     this.headers.push(new this.Header(b, a))
  410. };
  411. Ajax.prototype.addParam = function(b, a) {
  412.     this.request_query_builder.add(b, a)
  413. };
  414. Ajax.prototype.getResponseHeader = function(b) {
  415.     return this.ajax.getResponseHeader(b)
  416. };
  417. Ajax.prototype.send = function() {
  418.     var b;
  419.     !1 === this.background && disableActions();
  420.     this.ajax.open(this.method, this.url + (this.method === this.GET ? "?" + this.request_query_builder.build() : Strings.EMPTY), this.async);
  421.     for (var a = this.headers.length - 1; 0 <= a; --a) b = this.headers[a], this.ajax.setRequestHeader(b.name, b.value);
  422.     this.ajax.send(this.method === this.POST ? this.request_query_builder.build() : Strings.EMPTY)
  423. };
  424. Ajax.prototype.listener = function() {
  425.     if (!0 === this.wiped) {
  426.         if (null !== this.onwipe) this.onwipe()
  427.     } else if (this.readyState = this.ajax.readyState, this.status = this.ajax.status, 4 === this.ajax.readyState)
  428.         if (!1 === this.background && enableActions(), 200 !== this.ajax.status) {
  429.             if (null !== this.onerror) this.onerror(this.status);
  430.             Alert.show("There is connection problem, please reload the page", function() {
  431.                 window.location.reload()
  432.             })
  433.         } else if (this.responseText = this.ajax.responseText, null !== this.onreadystatechange) this.onreadystatechange()
  434. };
  435. Ajax.prototype.onprogresslistener = function(b) {
  436.     if (null !== this.onprogress) this.onprogress(b)
  437. };
  438. Ajax.prototype.Header = function(b, a) {
  439.     this.name = b;
  440.     this.value = a
  441. };
  442. Ajax.prototype.RequestQueryBuilder = function() {
  443.     var b = this;
  444.     this.params = [];
  445.     this.add = function(a, c) {
  446.         b.params.push(a + "=" + encodeURIComponent(c))
  447.     };
  448.     this.build = function() {
  449.         return b.params.join("&")
  450.     }
  451. };
  452. Ajax.prototype.wipe = function() {
  453.     this.wiped = !0;
  454.     !1 === this.background && enableActions()
  455. };
  456. var Alert = {
  457.     object: null,
  458.     Class: function() {
  459.         var a = this;
  460.         a.root_view = null;
  461.         a.alert_view;
  462.         a.msg;
  463.         a.positive;
  464.         a.negative;
  465.         a.neutral;
  466.         a.positiveListener;
  467.         a.negativeListener;
  468.         a.neutralListener;
  469.         a.content = function() {
  470.             a.initViews();
  471.             return a.root_view
  472.         };
  473.         a.initViews = function() {
  474.             if (null === a.root_view) {
  475.                 var b;
  476.                 a.root_view = d.createElement("div");
  477.                 a.root_view.className = "AlertWrapper Table";
  478.                 a.root_view.innerHTML = '<div class="Tablet Cell"><div class="Alert ShadowDark"></div></div>';
  479.                 a.alert_view = a.root_view.childNodes[0].childNodes[0];
  480.                 a.msg = d.createElement("div");
  481.                 a.msg.className = "Msg ScrollView";
  482.                 a.alert_view.appendChild(a.msg);
  483.                 a.positive = d.createElement("div");
  484.                 a.positive.className = "TextButton Cursor";
  485.                 a.positive.setAttribute("hl", "GrayHL");
  486.                 a.positive.onclick = a.positiveCallback;
  487.                 a.alert_view.appendChild(a.positive);
  488.                 a.negative = d.createElement("div");
  489.                 a.negative.className = "TextButton Cursor MagentaBg MagentaBgHL";
  490.                 a.negative.style.marginLeft = "16px";
  491.                 a.negative.setAttribute("hl", "GrayHL");
  492.                 a.negative.onclick = a.negativeCallback;
  493.                 a.alert_view.appendChild(a.negative);
  494.                 a.neutral = d.createElement("div");
  495.                 a.neutral.className = "TextButton FLeft Cursor";
  496.                 a.neutral.setAttribute("hl", "GrayHL");
  497.                 a.neutral.onclick = a.neutralCallback;
  498.                 a.alert_view.appendChild(a.neutral);
  499.                 b = d.createElement("div");
  500.                 b.className = "Cleaner";
  501.                 a.alert_view.appendChild(b);
  502.                 a.hide()
  503.             }
  504.         };
  505.         a.setPositiveLabel = function(b) {
  506.             a.positive.innerHTML = b;
  507.             a.positive.style.display = "inline-block"
  508.         };
  509.         a.setNegativeLabel = function(b) {
  510.             a.negative.innerHTML = b;
  511.             a.negative.style.display = "inline-block"
  512.         };
  513.         a.setNeutralLabel = function(b) {
  514.             a.neutral.innerHTML =
  515.                 b;
  516.             a.neutral.style.display = "inline-block"
  517.         };
  518.         a.setMsg = function(b) {
  519.             a.msg.innerHTML = b
  520.         };
  521.         a.show = function() {
  522.             a.isShown() || (dim(null, 4098), a.root_view.style.opacity = 0, a.root_view.style.display = "table", a.layout(), requestAnimationFrame(function() {
  523.                 a.root_view.style.opacity = 1
  524.             }))
  525.         };
  526.         a.hide = function() {
  527.             undim();
  528.             a.root_view.style.display = "none";
  529.             a.alert_view.className = "Alert";
  530.             a.msg.style.maxHeight = "none";
  531.             a.positiveListener = a.negativeListener = a.neutralListener = null;
  532.             a.positive.style.display = a.negative.style.display = a.neutral.style.display =
  533.                 "none"
  534.         };
  535.         a.isShown = function() {
  536.             return "none" !== a.root_view.style.display
  537.         };
  538.         a.requestLayout = function() {
  539.             a.isShown() && requestAnimationFrame(a.layout)
  540.         };
  541.         a.layout = function() {
  542.             a.root_view.style.width = ScreenMetrics.width + "px";
  543.             a.root_view.style.height = ScreenMetrics.height + "px";
  544.             a.root_view.style.transform = "translate(0px, " + getScrollTop() + "px)"
  545.         };
  546.         a.positiveCallback = function(b) {
  547.             null !== a.positiveListener && a.positiveListener(b);
  548.             a.hide()
  549.         };
  550.         a.negativeCallback = function(b) {
  551.             null !== a.negativeListener && a.negativeListener(b);
  552.             a.hide()
  553.         };
  554.         a.neutralCallback = function(b) {
  555.             null !== a.neutralListener && a.neutralListener(b);
  556.             a.hide()
  557.         }
  558.     },
  559.     init: function() {
  560.         Alert.object = new Alert.Class;
  561.         d.body.appendChild(Alert.object.content());
  562.         d.body.addEventListener("keyup", function(a) {
  563.             27 === a.keyCode && Alert.object.isShown() && Alert.object.hide()
  564.         })
  565.     },
  566.     setPositiveLabel: function(a) {
  567.         Alert.object.setPositiveLabel(a)
  568.     },
  569.     setNegativeLabel: function(a) {
  570.         Alert.object.setNegativeLabel(a)
  571.     },
  572.     setNeutralLabel: function(a) {
  573.         Alert.object.setNeutralLabel(a)
  574.     },
  575.     setPositiveListener: function(a) {
  576.         Alert.object.positiveListener =
  577.             a
  578.     },
  579.     setNegativeListener: function(a) {
  580.         Alert.object.negativeListener = a
  581.     },
  582.     setNeutralListener: function(a) {
  583.         Alert.object.neutralListener = a
  584.     },
  585.     setMsg: function(a) {
  586.         Alert.object.setMsg(a)
  587.     },
  588.     show: function(a, b, c) {
  589.         void 0 !== a && (Alert.object.setMsg(a), Alert.object.setPositiveLabel("OK"), void 0 !== b && (Alert.object.positiveListener = b), void 0 !== c && (Alert.object.setPositiveLabel("Yes"), Alert.object.setNegativeLabel("No"), Alert.object.negativeListener = c));
  590.         Alert.object.show()
  591.     },
  592.     hide: function() {
  593.         Alert.object.hide()
  594.     },
  595.     requestLayout: function() {
  596.         Alert.object.requestLayout()
  597.     }
  598. };
  599.  
  600. function onBeforeLoad() {
  601.     ScreenMetrics.width = de.clientWidth;
  602.     ScreenMetrics.height = de.clientHeight;
  603.     Ripple.init();
  604.     Alert.init();
  605.     typeof PopupWindow !== UNDEF && PopupWindow.init();
  606.     if (void 0 !== General.onBeforeLoad) General.onBeforeLoad();
  607.     if (typeof GeneralVersion !== UNDEF && void 0 !== GeneralVersion.onBeforeLoad) GeneralVersion.onBeforeLoad();
  608.     if (void 0 !== page && void 0 !== page.onBeforeLoad) page.onBeforeLoad();
  609.     if (void 0 !== page_cpanel && void 0 !== page_cpanel.onBeforeLoad) page_cpanel.onBeforeLoad()
  610. }
  611.  
  612. function onLoad() {
  613.     if (void 0 !== General.onLoad) General.onLoad();
  614.     if (typeof GeneralVersion !== UNDEF && void 0 !== GeneralVersion.onLoad) GeneralVersion.onLoad();
  615.     if (void 0 !== page && void 0 !== page.onLoad) page.onLoad();
  616.     if (void 0 !== page_cpanel && void 0 !== page_cpanel.onLoad) page_cpanel.onLoad()
  617. }
  618.  
  619. function onResize() {
  620.     if (ScreenMetrics.width !== de.clientWidth || ScreenMetrics.height !== de.clientHeight) {
  621.         var a, b;
  622.         a = ScreenMetrics.width;
  623.         b = ScreenMetrics.height;
  624.         ScreenMetrics.width = de.clientWidth;
  625.         ScreenMetrics.height = de.clientHeight;
  626.         typeof PopupWindow !== UNDEF && PopupWindow.requestLayout();
  627.         Alert.requestLayout();
  628.         if (a !== ScreenMetrics.width) {
  629.             if (void 0 !== General.onResizeW) General.onResizeW();
  630.             if (typeof GeneralVersion !== UNDEF && void 0 !== GeneralVersion.onResizeW) GeneralVersion.onResizeW();
  631.             if (void 0 !== page && void 0 !==
  632.                 page.onResizeW) page.onResizeW();
  633.             if (void 0 !== page_cpanel && void 0 !== page_cpanel.onResizeW) page_cpanel.onResizeW()
  634.         }
  635.         if (b !== ScreenMetrics.height) {
  636.             if (void 0 !== General.onResizeH) General.onResizeH();
  637.             if (typeof GeneralVersion !== UNDEF && void 0 !== GeneralVersion.onResizeH) GeneralVersion.onResizeH();
  638.             if (void 0 !== page && void 0 !== page.onResizeH) page.onResizeH();
  639.             if (void 0 !== page_cpanel && void 0 !== page_cpanel.onResizeH) page_cpanel.onResizeH()
  640.         }
  641.         if (void 0 !== General.onResize) General.onResize();
  642.         if (typeof GeneralVersion !== UNDEF &&
  643.             void 0 !== GeneralVersion.onResize) GeneralVersion.onResize();
  644.         if (void 0 !== page && void 0 !== page.onResize) page.onResize();
  645.         if (void 0 !== page_cpanel && void 0 !== page_cpanel.onResize) page_cpanel.onResize();
  646.         requestAnimationFrame(onResize)
  647.     }
  648. }
  649.  
  650. function onScroll() {
  651.     Alert.requestLayout();
  652.     if (void 0 !== General.onScroll) General.onScroll();
  653.     if (typeof GeneralVersion !== UNDEF && void 0 !== GeneralVersion.onScroll) GeneralVersion.onScroll();
  654.     if (void 0 !== page && void 0 !== page.onScroll) page.onScroll();
  655.     if (void 0 !== page_cpanel && void 0 !== page_cpanel.onScroll) page_cpanel.onScroll()
  656. }
  657.  
  658. function onBeforeUnload() {
  659.     if (void 0 !== page && void 0 !== page.onBeforeUnload) page.onBeforeUnload()
  660. };
  661. var Ripple = {
  662.     init: function() {
  663.         for (var a = d.getElementsByClassName("Ripple"), b = a.length - 1; 0 <= b; --b) null === a[b].getAttribute("init_r") && (a[b].setAttribute("init_r", Strings.TRUE), Ripple.add(a[b]))
  664.     },
  665.     add: function(a) {
  666.         a.addEventListener("mousedown", Ripple.createOnMouseDown(a))
  667.     },
  668.     createOnMouseDown: function(a) {
  669.         return function(b) {
  670.             if (0 === b.button) {
  671.                 var c = {
  672.                     valid: !0
  673.                 };
  674.                 getScreenX(a);
  675.                 getScreenY(a);
  676.                 var e = a.offsetWidth > a.offsetHeight ? a.offsetWidth << 1 : a.offsetHeight << 1;
  677.                 c.node = d.createElement("div");
  678.                 c.node.className = "RippleNode";
  679.                 null !== a.getAttribute("color") && (c.node.style.backgroundColor = a.getAttribute("color"));
  680.                 c.node.style.left = b.clientX - getScreenX(a) - (e >> 1) + "px";
  681.                 c.node.style.top = b.clientY - getScreenY(a) - (e >> 1) + "px";
  682.                 c.node.style.width = e + "px";
  683.                 c.node.style.height = e + "px";
  684.                 a.insertBefore(c.node, a.firstChild);
  685.                 requestAnimationFrame(function() {
  686.                     c.node.className += " SlowTransform"
  687.                 });
  688.                 b = Ripple.createOnMouseUp(a, c);
  689.                 a.addEventListener("mouseup", b);
  690.                 a.addEventListener("mouseout", b)
  691.             }
  692.         }
  693.     },
  694.     createOnMouseUp: function(a, b) {
  695.         var c = function(e) {
  696.             !1 !==
  697.                 b.value && (b.value = !1, b.node.className += " FastTransform", setTimeout(function() {
  698.                     requestAnimationFrame(function() {
  699.                         b.node.style.opacity = 0;
  700.                         setTimeout(function() {
  701.                             a.removeChild(b.node)
  702.                         }, 250)
  703.                     })
  704.                 }, 250), a.removeEventListener("mouseup", c), a.removeEventListener("mouse", c))
  705.         };
  706.         return c
  707.     }
  708. };
  709. var General = {
  710.         scale_factor: 1,
  711.         ajax_reload: !1,
  712.         onBeforeLoad: function() {
  713.             General.invalidateZoom();
  714.             General.initHover();
  715.             General.Tooltips.init();
  716.             General.ajax_reload = typeof GeneralVersion !== UNDEF && typeof GeneralVersion.AjaxReload !== UNDEF;
  717.             if (!0 === General.ajax_reload) GeneralVersion.AjaxReload.onBeforeLoad()
  718.         },
  719.         onResize: function() {},
  720.         onResizeW: function() {
  721.             General.invalidateZoom()
  722.         },
  723.         onResizeH: function() {
  724.             if (!0 === General.ajax_reload) GeneralVersion.AjaxReload.onResizeH()
  725.         },
  726.         onLoad: function() {
  727.             General.invalidateZoom();
  728.             General.isLegacy() &&
  729.                 Alert.show("\u0418\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u0441\u0442\u0430\u0440 \u0443\u0435\u0431 \u0431\u0440\u0430\u0443\u0437\u044a\u0440. \u0417\u0430 \u0434\u0430 \u043c\u043e\u0436\u0435 \u0434\u0430 \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u043f\u044a\u043b\u043d\u0430\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043d\u043e\u0441\u0442 \u043d\u0430 \u0441\u0430\u0439\u0442\u0430, \u043c\u043e\u043b\u044f \u0438\u0437\u043f\u043e\u043b\u0437\u0432\u0430\u0442\u0435 \u043f\u043e - \u043d\u043e\u0432 \u0431\u0440\u0430\u0443\u0437\u044a\u0440");
  730.             if (!0 === General.ajax_reload) GeneralVersion.AjaxReload.onLoad()
  731.         },
  732.         isLegacy: function() {
  733.             return browser === Browsers.IE && 9 > browser_version
  734.         },
  735.         initHover: function() {
  736.             if (0 !== navigator.maxTouchPoints && 0 !== navigator.msMaxTouchPoints) {
  737.                 var a = !1,
  738.                     b = function() {
  739.                         a = !1
  740.                     };
  741.                 de.addEventListener("mousemove", function(b) {
  742.                     !0 !== a && removeClass(de, "Touchable")
  743.                 }, !0);
  744.                 de.addEventListener("touchstart", function(c) {
  745.                     a = !0;
  746.                     addClass(de, "Touchable");
  747.                     setTimeout(b, 200)
  748.                 }, !0)
  749.             }
  750.         },
  751.         invalidateZoom: function() {
  752.             mobile = window.innerWidth < ScreenMetrics.mobile_limit;
  753.             General.scale_factor = 1;
  754.             General.invalidateIFrameZoom()
  755.         },
  756.         invalidateIFrameZoom: function() {
  757.             for (var a, b = d.getElementsByTagName("iframe"), c = b.length; 0 < c--;) a = b[c].parentNode.parentNode.parentNode.offsetWidth, a /= b[c].parentNode.parentNode.offsetWidth, browser !== Browsers.FIREFOX ? (b[c].style.zoom = 1 / (General.scale_factor * a), b[c].style.transform = "scale(" + General.scale_factor * a + ")", b[c].style.width = parseInt(b[c].getAttribute("width")) * a + "px", b[c].style.height = parseInt(b[c].getAttribute("height")) * a + "px") : b[c].style.transform =
  758.                 "scale(" + a + ")"
  759.         },
  760.         positionFooter: function() {
  761.             var a = d.getElementsByTagName("footer");
  762.             if (0 !== a.length) {
  763.                 a = a[0];
  764.                 a.style.bottom = "0";
  765.                 var b = getScreenY(a) + a.offsetHeight - ScreenMetrics.height;
  766.                 if (!(0 <= b)) {
  767.                     var c = 1 / General.scale_factor;
  768.                     a.style.bottom = b * c - a.offsetHeight * (1 - General.scale_factor) * c + "px"
  769.                 }
  770.             }
  771.         },
  772.         Tooltips: {
  773.             OFFSET: 4,
  774.             init: function() {
  775.                 for (var a = d.body.querySelectorAll("*[tooltip]:not([init_t])"), b = a.length; 0 < b--;) General.Tooltips.addListeners(a[b]), a[b].setAttribute("init_t", Strings.EMPTY)
  776.             },
  777.             addListeners: function(a) {
  778.                 var b = !1,
  779.                     c = null,
  780.                     e = d.createElement("div");
  781.                 e.innerHTML = "<span></span>" + a.getAttribute("tooltip");
  782.                 e.className = "Tooltip";
  783.                 a.addEventListener("mouseover", function(a) {
  784.                     b = !0;
  785.                     null !== c && (clearTimeout(c), c = null);
  786.                     if (null === e.parentNode) {
  787.                         d.body.appendChild(e);
  788.                         var h = getScreenX(this) + getScrollLeft();
  789.                         a = getScreenY(this) + getScrollTop();
  790.                         var h = h + .5 * (this.getBoundingClientRect().width - e.offsetWidth),
  791.                             g = a - (e.offsetHeight + 8 + General.Tooltips.OFFSET);
  792.                         0 > g ? (g = a + this.getBoundingClientRect().height + 12, addClass(e, "Bottom")) : removeClass(e,
  793.                             "Bottom");
  794.                         0 > h ? (e.childNodes[0].style.transform = "translateX(" + (h - General.Tooltips.OFFSET) + "px)", h = General.Tooltips.OFFSET) : e.childNodes[0].style.transform = "translateX(0)";
  795.                         a = h + e.offsetWidth + General.Tooltips.OFFSET - ScreenMetrics.width;
  796.                         0 < a ? (h -= a, e.childNodes[0].style.transform = "translateX(" + a + "px)") : e.childNodes[0].style.transform = "translateX(0)";
  797.                         e.style.transform = "translate(" + h + "px, " + g + "px)"
  798.                     }
  799.                     requestAnimationFrame(function() {
  800.                         addClass(e, "Visible")
  801.                     })
  802.                 });
  803.                 a.addEventListener("mouseout", function() {
  804.                     b = !1;
  805.                     removeClass(e,
  806.                         "Visible");
  807.                     c = setTimeout(function() {
  808.                         !0 !== b && e.parentNode.removeChild(e)
  809.                     }, 300)
  810.                 })
  811.             }
  812.         }
  813.     },
  814.     AjaxReload = {
  815.         request_map: {},
  816.         animation: 0,
  817.         ajax: null,
  818.         onBeforeLoad: function() {
  819.             AjaxReload.initContent();
  820.             AjaxReload.invalidateHeaderBlack();
  821.             AjaxReload.invalidateLinks();
  822.             window.onpopstate = AjaxReload.onPopState
  823.         },
  824.         onLoad: function() {
  825.             AjaxReload.invalidateHeaderBlack()
  826.         },
  827.         onResizeH: function() {
  828.             AjaxReload.invalidateHeaderBlack()
  829.         },
  830.         onPopState: function(a) {
  831.             l(a);
  832.             AjaxReload.followLink(a, a.state)
  833.         },
  834.         initContent: function() {
  835.             AjaxReload.styles_n =
  836.                 getElementById("styles");
  837.             AjaxReload.script_header_n = getElementById("script_header");
  838.             AjaxReload.script_init_n = getElementById("script_init");
  839.             AjaxReload.content_n = getElementById("content");
  840.             AjaxReload.meta_title = getElementById("meta_title");
  841.             AjaxReload.meta_desc = getElementById("meta_desc")
  842.         },
  843.         invalidateHeaderBlack: function() {
  844.             var a = d.getElementById("header_black");
  845.             if (null !== a) {
  846.                 var b = 0 === a.childNodes.length ? null : a.childNodes[0],
  847.                     c = typeof page === UNDEF || !0 !== page.large_header;
  848.                 a.style.height = .65 * ScreenMetrics.height +
  849.                     "px";
  850.                 ++AjaxReload.animation;
  851.                 setTimeout(function() {
  852.                     --AjaxReload.animation;
  853.                     onResize()
  854.                 }, 250);
  855.                 null === b && (b = d.createElement("img"), b.src = URL_ROOT + "wall.jpg", b.style.opacity = 0, b.onload = function() {
  856.                     b.removeAttribute("style")
  857.                 }, a.appendChild(b));
  858.                 a.className = c ? "Small" : Strings.TRUE
  859.             }
  860.         },
  861.         invalidateLinks: function() {
  862.             var a = [],
  863.                 b = d.getElementsByTagName("a"),
  864.                 c = d.URL,
  865.                 e = null;
  866.             "/" !== c[c.length - 1] && (c += "/");
  867.             location.pathname === URL_ROOT && (c = Strings.EMPTY, typeof PagesUser !== UNDEF && (c = PagesUser.HOME), typeof PagesProjectToday !==
  868.                 UNDEF && (c = PagesProjectToday.HOME), c = location.origin + c);
  869.             for (var f = b.length; 0 < f--;) d.URL === b[f].href && (e = b[f]), null !== b[f].getAttribute("header") && (a.push(b[f]), b[f].className = b[f].className.replace(" Magenta", Strings.EMPTY)), b[f].getAttribute("done") !== Strings.TRUE && null === b[f].getAttribute("target") && (b[f].setAttribute("done", Strings.TRUE), b[f].addEventListener("click", AjaxReload.followLink));
  870.             if (0 !== a.length) {
  871.                 for (f = a.length; 0 < f--;)
  872.                     if (0 === c.indexOf(a[f].href)) {
  873.                         e = a[f];
  874.                         break
  875.                     } null !== e && (e.className +=
  876.                     " Magenta")
  877.             }
  878.         },
  879.         followLink: function(a, b, c) {
  880.             null !== a && a.preventDefault();
  881.             null !== AjaxReload.ajax && AjaxReload.ajax.wipe();
  882.             var e = typeof b === UNDEF ? this.href : null === b ? URL_VERSION : b,
  883.                 f = AjaxReload.ajax = new Ajax(!0);
  884.             AjaxReload.request_map[e] = null;
  885.             f.open(f.GET, e, !0);
  886.             f.onreadystatechange = function() {
  887.                 if (typeof AjaxReload.request_map[e] !== UNDEF) {
  888.                     var a, g, q, r, k, t, n, p = d.getElementById("header_black");
  889.                     delete AjaxReload.request_map[e];
  890.                     a = d.createElement("section");
  891.                     a.className = "AjaxReloadFrame";
  892.                     a.innerHTML = f.responseText.replace(decodeURIComponent("%3C!DOCTYPE%20html%3E"),
  893.                         Strings.EMPTY).replace(decodeURIComponent("%3Cbody"), "<section id='body'").replace(decodeURIComponent("%3C%2Fbody%3E"), "</section>").replaceAll(decodeURIComponent("html%3E"), "section>").replaceAll(decodeURIComponent("head%3E"), "section>");
  894.                     d.body.appendChild(a);
  895.                     g = getElementById("styles");
  896.                     q = getElementById("script_header");
  897.                     r = getElementById("script_init");
  898.                     k = getElementById("content");
  899.                     n = getElementById("body").className;
  900.                     typeof n === UNDEF && (n = Strings.EMPTY);
  901.                     AjaxReload.meta_title.innerHTML = getElementById("meta_title").innerHTML;
  902.                     AjaxReload.meta_desc.content = getElementById("meta_desc").content;
  903.                     typeof b !== UNDEF && !0 !== c || window.history.pushState(e, AjaxReload.meta_title.innerHTML, e);
  904.                     t = typeof d.body.className === UNDEF ? Strings.EMPTY : d.body.className;
  905.                     d.body.className = t + " " + n;
  906.                     null !== g && (g.parentNode.removeChild(g), AjaxReload.styles_n.parentNode.insertBefore(g, AjaxReload.styles_n));
  907.                     page = void 0;
  908.                     null !== q && eval(q.innerHTML);
  909.                     null !== r && eval(r.innerHTML);
  910.                     var m = AjaxReload.content_n.parentNode,
  911.                         v = k.offsetHeight;
  912.                     m.style.height = AjaxReload.content_n.offsetHeight +
  913.                         "px";
  914.                     m.style.transitionProperty = "height";
  915.                     k.className = AjaxReload.content_n.className += " OnTheFly";
  916.                     k.style.opacity = 0;
  917.                     k.parentNode.removeChild(k);
  918.                     m.appendChild(k);
  919.                     a.parentNode.removeChild(a);
  920.                     AjaxReload.invalidateLinks();
  921.                     if (typeof page !== UNDEF && typeof page.onBeforeLoad !== UNDEF) page.onBeforeLoad();
  922.                     var u = function() {
  923.                         AjaxReload.content_n.removeEventListener("transitionend", u);
  924.                         null !== p && (p.style.transitionProperty = "none");
  925.                         m.removeChild(AjaxReload.content_n);
  926.                         m.style.transitionProperty = "none";
  927.                         m.style.height =
  928.                             "auto";
  929.                         AjaxReload.content_n = k;
  930.                         AjaxReload.content_n.className = AjaxReload.content_n.className.replace(" OnTheFly", Strings.EMPTY);
  931.                         AjaxReload.styles_n.parentNode.removeChild(AjaxReload.styles_n);
  932.                         AjaxReload.styles_n = g;
  933.                         d.body.className = d.body.className.replace(t, Strings.EMPTY);
  934.                         if (typeof page !== UNDEF && typeof page.onLoad !== UNDEF) page.onLoad();
  935.                         --AjaxReload.animation;
  936.                         onResize();
  937.                         if (d.location.hash !== Strings.EMPTY) {
  938.                             var a = d.body.querySelector(d.location.hash);
  939.                             null !== a && setScrollTop(getY(a))
  940.                         }
  941.                     };
  942.                     setTimeout(function() {
  943.                         requestAnimationFrame(function() {
  944.                             AjaxReload.content_n.addEventListener("transitionend",
  945.                                 u);
  946.                             null !== p && (p.style.transitionProperty = "height");
  947.                             AjaxReload.invalidateHeaderBlack();
  948.                             m.style.height = v + "px";
  949.                             k.style.opacity = 1;
  950.                             AjaxReload.content_n.style.opacity = 0;
  951.                             ++AjaxReload.animation
  952.                         })
  953.                     }, 0)
  954.                 }
  955.             };
  956.             f.send()
  957.         }
  958.     };
  959. var GeneralVersion = {
  960.     AjaxReload: AjaxReload,
  961.     onBeforeLoad: function() {
  962.         GeneralVersion.Header.init()
  963.     },
  964.     onResize: function() {
  965.         GeneralVersion.Header.onResize()
  966.     },
  967.     onScroll: function() {
  968.         GeneralVersion.Header.onScroll()
  969.     },
  970.     Header: {
  971.         init: function() {
  972.             GeneralVersion.Header.initScroll();
  973.             GeneralVersion.Header.initVimeoPlayer()
  974.         },
  975.         onResize: function() {
  976.             GeneralVersion.Header.invalidateVimeoPlayer()
  977.         },
  978.         onScroll: function() {
  979.             var a = d.body.querySelector("header");
  980.             a.style.position = "relative";
  981.             0 > getScreenY(a) && (a.style.position = "fixed")
  982.         },
  983.         initScroll: function() {
  984.             var a = getElementById("header_viewer"),
  985.                 e, b, c = NOT_EXISTS,
  986.                 f = NOT_EXISTS,
  987.                 h = function() {
  988.                     c === NOT_EXISTS && 0 !== b && (a.scrollLeft -= e * b, b--, requestAnimationFrame(h))
  989.                 };
  990.             getElementById("menu_trigger").addEventListener("click", function() {
  991.                 hasClass(this.parentNode, "Active") ? removeClass(this.parentNode, "Active") : addClass(this.parentNode, "Active")
  992.             });
  993.             a.addEventListener("touchstart", function(a) {
  994.                 c = a.touches[0].clientX;
  995.                 f = a.touches[0].clientY
  996.             });
  997.             a.addEventListener("touchmove", function(b) {
  998.                 if (c !== NOT_EXISTS) {
  999.                     var g =
  1000.                         b.touches[0].clientX - c;
  1001.                     if (Math.abs(b.touches[0].clientY - f) > Math.abs(g)) return;
  1002.                     e = 0 > g ? -1 : 1;
  1003.                     a.scrollLeft -= g
  1004.                 }
  1005.                 c = b.touches[0].clientX;
  1006.                 f = b.touches[0].clientY
  1007.             });
  1008.             a.addEventListener("touchend", function() {
  1009.                 c = NOT_EXISTS;
  1010.                 b = 10;
  1011.                 requestAnimationFrame(h)
  1012.             })
  1013.         },
  1014.         initVimeoPlayer: function() {
  1015.             var a = d.body.querySelector(".VideoContainer iframe");
  1016.             if (null !== a) {
  1017.                 var e = d.body.querySelector(".LandingContainer"),
  1018.                     b = e.querySelector(".DataWrapper"),
  1019.                     c = d.createElement("script");
  1020.                 c.async = !0;
  1021.                 c.src = "https://player.vimeo.com/api/player.js";
  1022.                 c.addEventListener("load", function() {
  1023.                     var c = new Vimeo.Player(a);
  1024.                     c.on("play", function() {
  1025.                         addClass(e, "Play");
  1026.                         b.style.transform = "translateX(128px)"
  1027.                     });
  1028.                     c.on("pause", function() {
  1029.                         removeClass(e, "Play");
  1030.                         b.style.transitionDuration = "0s";
  1031.                         b.style.transform = "translateX(-128px)";
  1032.                         b.style.opacity = "0";
  1033.                         requestAnimationFrame(function() {
  1034.                             requestAnimationFrame(function() {
  1035.                                 b.style.transitionDuration = "0.25s";
  1036.                                 b.style.transform = "translateX(0px)";
  1037.                                 b.style.opacity = "1"
  1038.                             })
  1039.                         })
  1040.                     })
  1041.                 });
  1042.                 d.head.appendChild(c);
  1043.                 GeneralVersion.Header.invalidateVimeoPlayer()
  1044.             }
  1045.         },
  1046.         invalidateVimeoPlayer: function() {
  1047.             var a = d.body.querySelector(".LandingContainer .VideoContainer");
  1048.             if (null !== a) {
  1049.                 var e = a.parentNode,
  1050.                     b = e.offsetHeight,
  1051.                     c = b / 9 * 16;
  1052.                 c > e.offsetWidth && (c = e.offsetWidth, b = c / 16 * 9);
  1053.                 a.style.width = c + "px";
  1054.                 a.style.height = b + "px"
  1055.             }
  1056.         }
  1057.     }
  1058. };
  1059. var Params = {
  1060.     ACTION: "ac",
  1061.     ID: "id",
  1062.     NAME: "nm",
  1063.     PASS: "ps",
  1064.     EMAIL: "eml",
  1065.     SUBJECT: "sbj",
  1066.     MSG: "msg",
  1067.     CAPTCHA: "cpt",
  1068.     JSON: "json",
  1069.     TIMESTAMP: "ts",
  1070.     URL: "url",
  1071.     DAY_OF_YEAR: "doy",
  1072.     STATUS: "sts",
  1073.     HEADLINE: "hl",
  1074.     SEARCH_PHRASE: "sp",
  1075.     BODY: "bd",
  1076.     INDEX: "ind",
  1077.     ITEM_ID: "iid",
  1078.     TITLE: "ttl",
  1079.     AUTHOR: "author",
  1080.     DESC: "desc",
  1081.     CREATED_TS: "crt_ts",
  1082.     TYPE: "tp",
  1083.     PRICE: "prc",
  1084.     ITEM_PRICE: "prc",
  1085.     VISUAL_FACTOR: "vf",
  1086.     SEQ_COVER_IMG: "seq_c_img",
  1087.     SEQ_VIDEO: "seq_v",
  1088.     SEQ_ITEM_IMG: "seq_item_img",
  1089.     WIDTH: "w",
  1090.     HEIGHT: "h",
  1091.     ITEMS: "items",
  1092.     REMOVED_ITEMS: "rem_items",
  1093.     ARTICLE_IMG: "art_img",
  1094.     VALUE: "vl",
  1095.     POSITION: "pos",
  1096.     DOWNLOADABLE: "dld",
  1097.     ITEM_DOWNLOADABLE: "idld",
  1098. };
  1099. var PagesUser = {
  1100.     HOME: "https://phazza.com/home/",
  1101.     PROJECTS: "https://phazza.com/projects/",
  1102.     SESSION_IMAGE: "SESSION_IMAGE",
  1103.     SESSION_VIDEO: "SESSION_VIDEO",
  1104.     STORE: "#",
  1105.     ABOUT_US: "https://phazza.com/about-us",
  1106.     SEND_MESSAGE: "https://phazza.com/about-us/#send-message",
  1107. };
  1108. var PagesProjectToday = {
  1109.     HOME: "https://phazza.com/dazz/",
  1110.     HOME_NO_ENTRY: "https://phazza.com/dazz/no-entry/",
  1111.     NOT_FOUND: "https://phazza.com/not-found/",
  1112.     ENTRY_STILL_IMAGE: "https://phazza.com/dazz/entry-still-image/",
  1113.     ENTRY_SEQUENCE: "https://phazza.com/dazz/entry-sequence/",
  1114.     ENTRY_THUMBNAIL: "https://phazza.com/dazz/entry-thumbnail/",
  1115. };
  1116. Controllers = {
  1117.     CONTACTS: "https://phazza.com/exec/ContactsController/",
  1118.     ENTRY: "https://phazza.com/exec/EntryController/",
  1119.     SEQUENCE: "https://phazza.com/exec/SequenceController/",
  1120.     ARTICLE: "https://phazza.com/exec/ArticleController/",
  1121.     SALES: "https://phazza.com/exec/SalesController/",
  1122. };
  1123. var ActionsContacts = {
  1124.     SEND_INQUERY: "a",
  1125. };
  1126. checkBrowser();
  1127. if (browser === Browsers.IE && browser_version < 9)
  1128.     makeHTML5ElemetsForIE();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement