PageSourceSearch

https://memogames.com.ua/wp-content/themes/memo-theme/build/js/main.bundle.js?ver=1.3.5

js memogames.com.ua collected 2026-10-06 18:43:38 UTC 19,866 bytes, 1 lines download raw bytes

1!function(){"use strict";var e=function(){var e=document.querySelectorAll(".range-input input"),t=document.querySelectorAll(".price-input input"),n=document.querySelector(".slider .progress"),o=50;if(n){var a=function(t,o){var a=parseInt(e[0].max);n.style.left=t/a*100+"%",n.style.right=100-o/a*100+"%"};t.forEach(function(n,i){n.addEventListener("input",function(){var n=parseInt(t[0].value),c=parseInt(t[1].value),r=parseInt(t[0].min),l=parseInt(t[1].max);0===i&&n>l-o&&(n=l-o),1===i&&c>l&&(c=l),n<r&&(n=r),c<r&&(c=r),c-n<o&&(0===i?(n=c-o)<r&&(n=r):(c=n+o)>l&&(c=l)),t[0].value=n,t[1].value=c,e[0].value=n,e[1].value=c,a(n,c)}),n.addEventListener("keypress",function(e){/[0-9]/.test(e.key)||e.preventDefault()})}),e.forEach(function(n,i){n.addEventListener("input",function(){var n=parseInt(e[0].value),c=parseInt(e[1].value);c-n<o&&(0===i?(e[0].value=c-o,n=c-o):(e[1].value=n+o,c=n+o)),t[0].value=n,t[1].value=c,a(n,c)})}),a(e[0].value,e[1].value)}},t=function(){var e=document.querySelectorAll(".s-text");e.length>0&&e.forEach(function(e){var t=e.querySelector(".s-text_content"),n=e.querySelector(".s-text_max"),o=e.querySelector(".s-text_more"),a=e.querySelector(".s-text_hide");t&&n&&t.offsetHeight>480?n.classList.add("close"):null==a||a.classList.add("hide"),null==o||o.addEventListener("click",function(){if(n.classList.contains("close")){n.classList.remove("close"),n.style.maxHeight="none";var e=n.scrollHeight;n.style.maxHeight="480px",requestAnimationFrame(function(){n.style.maxHeight=e+"px"})}}),null==a||a.addEventListener("click",function(){n.style.maxHeight=n.scrollHeight+"px",requestAnimationFrame(function(){n.style.maxHeight="480px",n.classList.add("close")})})})};function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}var a=function(){var e;document.querySelectorAll(".product-filter-select").forEach(function(e){var t;e.style.display="none";var o=document.createElement("div");o.className="custom-select";var a=document.createElement("div");a.className="custom-select__selected",a.textContent=(null===(t=e.options[e.selectedIndex])||void 0===t?void 0:t.text)||e.options[0].text,o.appendChild(a);var i=document.createElement("div");i.className="custom-select__options",n(e.options).forEach(function(t){var c=document.createElement("div");c.className="custom-select__option",c.textContent=t.text,c.dataset.value=t.value,t.selected&&c.classList.add("active"),c.addEventListener("click",function(){a.textContent=t.text,e.value=t.value,n(e.options).forEach(function(e){return e.selected=e.value===t.value}),i.querySelectorAll(".custom-select__option").forEach(function(e){return e.classList.remove("active")}),c.classList.add("active"),o.classList.remove("open")}),i.appendChild(c)}),o.appendChild(i),e.parentNode.insertBefore(o,e.nextSibling),a.addEventListener("click",function(e){e.stopPropagation(),document.querySelectorAll(".custom-select.open").forEach(function(e){return e!==o&&e.classList.remove("open")}),o.classList.toggle("open")})}),document.addEventListener("click",function(){document.querySelectorAll(".custom-select.open").forEach(function(e){return e.classList.remove("open")})}),null==(e=document.querySelector(".rating.edit"))||e.addEventListener("change",function(t){"rating"===t.target.name&&(e.dataset.rating=t.target.value)})},i=function(){var e=document.querySelector("#wcpr_comment_form");if(e){var t;window.alert=function(){};var n=function(e){return/^[a-zA-Z0-9._%+-]{1,64}@[a-zA-Z0-9-]+\.[a-zA-Z]{2,}$/.test(e)},o=function(e,t,o){var a,i=null==e||null===(a=e.value)||void 0===a?void 0:a.trim(),c=!i||0===i.length,r="email"===e.type&&!n(i);c?(e.classList.add("empty"),t.push(o)):e.classList.remove("empty"),"email"===e.type&&(r?(e.classList.add("wrong-mail"),t.includes(o)||t.pu
1sh(o)):e.classList.remove("wrong-mail")),e.addEventListener("input",function(){var t=e.value.trim();0===t.length?e.classList.add("empty"):e.classList.remove("empty"),"email"===e.type&&(n(t)?e.classList.remove("wrong-mail"):e.classList.add("wrong-mail"))},{once:!0})},a=function(n,o){var a;clearTimeout(t);var c=document.createElement("div");c.classList.add("error-image"),c.innerHTML='Файл "'.concat(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;if(e.length<=t)return e;var n=e.lastIndexOf("."),o=-1!==n?e.slice(n):"";return(-1!==n?e.slice(0,n):e).slice(0,t-o.length-3)+"..."+o}(n.name),'" перевищує ').concat(i(o)),null===(a=e.querySelector(".wcpr-comment-form-images"))||void 0===a||a.appendChild(c),t=setTimeout(function(){c&&c.remove()},4e3)},i=function(e){return e>=1048576?Math.round(e/1048576)+" MB":e>=1024?Math.round(e/1024)+" KB":e+" B"};e.querySelector('input[type="submit"]').addEventListener("click",function(t){var n=e.querySelector("#comment"),a=e.querySelector("#author"),i=e.querySelector("#email"),c=[];o(n,c,"comment"),o(a,c,"author"),o(i,c,"email"),0===c.length&&e.classList.add("sending")});var c=null==e?void 0:e.querySelector(".wcpr_image_upload");if(c){var r=2097152;c.addEventListener("change",function(){for(var t=c.files,n=0;n<t.length;n++){var o=t[n];if(o.size>r){a(o,r),c.value="";break}null!==e.querySelector(".error-image")&&e.querySelector(".error-image").remove()}})}}};var c=function(){var e=document.querySelectorAll(".viewBox"),t=window.innerHeight,n=0,o=function(){var o=n>window.scrollY?"up":"down";n=window.scrollY,e.forEach(function(e,n){e.viewName=e.viewName||"";var a=e.getBoundingClientRect(),i=a.top+5,c=a.bottom-5;"down"===o?i>0&&i<t?(e.viewName="inview-bottom","true"===e.dataset.static?e.classList.add("animated"):e.classList.add("in-view")):i<0&&c<0&&(e.viewName="outview-top",e.classList.contains("in-view")&&e.classList.remove("in-view")):i>t?(e.viewName="outview-bottom",e.classList.contains("in-view")&&e.classList.remove("in-view")):i<0&&c>0&&(e.viewName="inview-top","true"===e.dataset.static?e.classList.add("animated"):e.classList.add("in-view")),e.setAttribute("data-view",e.viewName)})};o(),window.addEventListener("scroll",o)},r=function(){var e,t;e=document.querySelector(".discount-label_close"),t=document.querySelector(".discount-label_trigger"),e&&(e.addEventListener("click",function(){t.classList.add("modal-active")}),setTimeout(function(){t.classList.remove("modal-active")},3e3));var n=document.querySelector(".promocode_filelds .field-input");if(n){var o=document.querySelector(".promocode_filelds .button");o.classList.add("disabled"),n.addEventListener("input",function(){n.value.trim().length>2?o.classList.remove("disabled"):o.classList.add("disabled")})}document.querySelector(".promocode_trigger")&&document.querySelector(".promocode_trigger").addEventListener("click",function(){document.querySelector(".promocode").classList.toggle("open")})},l=function(){document.querySelectorAll(".share").length>0&&document.querySelectorAll(".share").forEach(function(e){e.addEventListener("click",function(e){var t=this;e.preventDefault();var n=this.getAttribute("data-link");n&&navigator.clipboard.writeText(n).then(function(){t.classList.add("active"),setTimeout(function(){return t.classList.remove("active")},3e3)}).catch(function(e){t.classList.add("error"),setTimeout(function(){return t.classList.remove("error")},3e3)})})}),function(){var e=document.querySelector(".product-single_order"),t=document.querySelector(".product-single_order-fixed");function n(){e&&t&&(e.getBoundingClientRect().bottom<=0?t.classList.add("visible"):t.classList.remove("visible"))}window.addEventListener("scroll",n),window.addEventListener("load",n),window.addEventListener("resize",n)}()},s=function(){window.addEventListener("scroll",function(){var e=document.querySelector(".parallax-container");if(e){var t=document.querySelector(".parallax-img"),n=e.getBoundingClientRect(),o=window.innerHeight,a=1+.2*Math.min(Math.max((o-n.top)/(o+n.height),0),1);t.style.transform="scale(".concat(a,")")}})},d=function(){window.addEventListener("scroll",function(){var e=document.querySelector(".s-hero_title");e&&(window.scrollY>0?e.classList.add("animated"):e.classList.remove("animated"))})},u=function(){var n,o;(n=function(){var e=.01*window.innerHeight;document.documentElement.style.setProperty("--vh","".concat(e,"px"))})(),window.addEventListener("resize",n),t(),c(),e(),i(),0!==(o=document.querySelectorAll('.field-item.field-input-file input[type="file"]')).length&&o.forEach(function(e){e.addEventListener("change",function(){var t=e.closest(".field-item.field-input-file").nextElementSibling;t&&t.classList.contains("field-item__selected")&&(t.innerHTML="",Array.from(e.files).forEac
1h(function(n){var o=document.createElement("div");o.className="field-input-file_item";var a=document.createElement("div");a.className="field-input-file_preview";var i=document.createElement("div");i.className="field-input-file_name",i.textContent=n.name;var c=document.createElement("div");if(c.className="field-input-file_remove",c.title="Видалити",n.type.startsWith("image/")){var r=new FileReader;r.onload=function(e){var t=document.createElement("img");t.src=e.target.result,t.alt=n.name,a.appendChild(t)},r.readAsDataURL(n)}else i.textContent="Невірний формат. Оберіть зображення.";c.addEventListener("click",function(){o.remove(),0===t.children.length&&(e.value="")}),o.appendChild(a),o.appendChild(i),o.appendChild(c),t.appendChild(o)}))})}),l(),s(),d(),r(),a()},m=function(){var e=document.querySelector(".header");if(e){var t=document.querySelector(".header_search"),n=document.getElementById("header_search-trigger"),o=document.querySelector(".header_search__clear"),a=document.querySelector(".header_search__input"),i=document.querySelector(".header_btn-burger"),c=document.querySelector(".header_menu"),r=document.querySelectorAll(".menu-item-has-children");null==n||n.addEventListener("click",function(e){e.stopPropagation(),t.classList.toggle("open"),this.classList.toggle("active"),a.classList.remove("focus")}),document.addEventListener("click",function(e){t.contains(e.target)||n.contains(e.target)||(t.classList.remove("open"),n.classList.remove("active"))}),null==i||i.addEventListener("click",function(){this.classList.toggle("active"),c.classList.toggle("open"),document.querySelector("body").classList.toggle("not-scroll")}),null==o||o.addEventListener("click",function(){a.value="",a.classList.remove("focus")}),null==r||r.forEach(function(e){e.addEventListener("click",function(){e.classList.toggle("active")})})}var l=document.querySelector(".cart-modal_btn__trigger");document.documentElement;if(l){var s=document.querySelector(".cart-modal_btn .modal_close"),d=document.getElementById("cart"),u=document.querySelector("body");s.addEventListener("click",function(){d.classList.remove("open"),l.classList.remove("modal-active"),u.classList.remove("not-scroll")})}},v=function(){var e=document.querySelectorAll(".select");e.length&&e.forEach(function(e){var t=e.querySelector(".select_title"),n=(e.querySelector(".select_dropdown"),e.querySelectorAll(".select_list__item")),o=e.classList.contains("select--multiple");if(t){var a=t.querySelector(".select_title__text"),i=a?a.textContent.trim():"";t.addEventListener("click",function(t){t.target.classList.contains("select_title__remove")||e.classList.toggle("open")});var c=function(){return!!t.querySelector(".select_title__text[data-value]")},r=function(){if(!c()){t.innerHTML="";var n=document.createElement("div");n.className="select_title__text",n.textContent=i||"Оберіть товар",t.appendChild(n),e.classList.remove("selected")}};n.forEach(function(n){var a=n.querySelector("input"),c=n.querySelector(".select_list__item-text");if(a&&c){var l=a.value,s=c.textContent.trim();a.addEventListener("change",function(n){if(o)if(a.checked)if((u=t.querySelector(".select_title__text"))&&!u.hasAttribute("data-value")&&u.textContent.trim()===i&&u.remove(),t.querySelector('.select_title__text[data-value="'.concat(CSS.escape(l),'"]')));else{var c=document.createElement("div");c.className="select_title__text",c.setAttribute("data-value",l),c.innerHTML="".concat(s,'<span class="select_title__remove"></span>'),t.appendChild(c),e.classList.add("selected"),c.querySelector(".select_title__remove").addEventListener("click",function(t){t.stopPropagation();var n=e.querySelector('input[name="'.concat(a.name,'"][value="').concat(CSS.escape(l),'"]'));n&&(n.checked=!1),c.remove(),r()})}else{var d=t.querySelector('.select_title__text[data-value="'.concat(CSS.escape(l),'"]'));d&&d.remove(),r()}else t.innerHTML='<div class="select_title__text">'.concat(s,"</div>"),e.classList.remove("open"),e.classList.add("selected"),a.checked=!0;var u}),a.checked&&a.dispatchEvent(new Event("change",{bubbles:!0}))}}),document.addEventListener("click",function(t){e.contains(t.target)||e.classList.remove("open")}),c()||r()}})},f=function(){var e=document.querySelectorAll(".faq");e&&e.forEach(function(t){t.querySelector(".faq_title");var n=t.querySelector(".faq_content");t.addEventListener("click",function(){e.forEach(function(e){e!==t&&(e.classList.remove("active"),e.querySelector(".faq_content").style.height="0")}),t.classList.toggle("active"),n.style.height=t.classList.contains("active")?n.scrollHeight+"px":"0"}),window.addEventListener("resize",function(){t.classList.contains("active")&&(n.style.height=n.scrollHeight+"px")})})},p=function(){var e=document.querySelectorAll(".tabs-wrapper");e.length>0&&e.forEach(function(e){var t=e.querySelectorAll(".tab"),n=e.querySelectorAll(".tab-item");
1n.forEach(function(e,t){0===t?(e.style.display="block",setTimeout(function(){e.classList.contains("preload")&&e.classList.remove("preload")},500)):e.style.display="none"}),t.forEach(function(e,o){e.addEventListener("click",function(a){a.preventDefault(),t.forEach(function(e){return e.classList.remove("active")}),e.classList.add("active"),n.forEach(function(e){return e.style.display="none"}),n[o]&&(n[o].style.display="block",n[o].classList.add("preload"),setTimeout(function(){n[o].classList.remove("preload")},500))}),0===o&&e.classList.add("active")})})};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,L(o.key),o)}}function L(e){var t=function(e,t){if("object"!=y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=y(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==y(t)?t:t+""}var g=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modalButtonMap=new WeakMap,this.handleOpenModal=this.handleOpenModal.bind(this),this.handleCloseModal=this.handleCloseModal.bind(this),this.handleEscapeClose=this.handleEscapeClose.bind(this),this.eventsSubscribe(),this.isMouseDownOnModal=!1},t=[{key:"eventsSubscribe",value:function(){var e=this;document.addEventListener("click",this.handleOpenModal),document.addEventListener("click",this.handleCloseModal),document.addEventListener("keydown",this.handleEscapeClose),document.addEventListener("mousedown",function(t){var n=t.target.closest(".modal");e.isMouseDownOnModal=n&&t.target===n})}},{key:"eventsUnsubscribe",value:function(){document.removeEventListener("click",this.handleOpenModal),document.removeEventListener("click",this.handleCloseModal),document.removeEventListener("keydown",this.handleEscapeClose)}},{key:"handleOpenModal",value:function(e){var t=e.target.closest(".button-modal");if(t){var n=t.dataset.target,o=document.getElementById(n);o&&(o.classList.add("open"),document.body.classList.add("not-scroll"),t.classList.add("modal-active"),this.modalButtonMap.set(o,t))}}},{key:"handleCloseModal",value:function(e){var t=e.target.closest(".modal_close");if(t){var n=t.closest(".modal");n&&this.closeModal(n)}else{var o=e.target.closest(".modal");o&&e.target===o&&this.isMouseDownOnModal&&this.closeModal(o)}}},{key:"handleEscapeClose",value:function(e){var t,n=this;"Escape"===e.key&&(null===(t=document.querySelectorAll(".modal.open"))||void 0===t||t.forEach(function(e){n.closeModal(e)}))}},{key:"closeModal",value:function(e){e.classList.remove("open"),document.querySelector(".modal.open")||document.body.classList.remove("not-scroll");var t=this.modalButtonMap.get(e);t&&(t.classList.remove("modal-active"),this.modalButtonMap.delete(e))}}],t&&h(e.prototype,t),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}(),E=function(){var e=document.querySelectorAll(".field-input, .input-text, .header_search__input, .comment-form-comment textarea");e.length&&e.forEach(function(e){var t=function(){""!==e.value.trim()?e.classList.add("focus"):e.classList.remove("focus")};e.addEventListener("input",t),t()}),document.querySelectorAll(".password-input").forEach(function(e){var t=e.querySelector('input[type="password"], input[type="text"]'),n=e.querySelector(".show-password-input");n.addEventListener("click",function(e){e.preventDefault();var o="password"===t.type;t.type=o?"text":"password",n.classList.toggle("active",o)})})},S=function(){var e,t=document.querySelector(".cookie-mess");if(t){var n=document.getElementById("accept-cookie"),o=document.querySelector(".cookie-mess_close");
1!(e=localStorage.getItem("cookieAcceptedAt"))||(new Date-new Date(e))/864e5>30?t.style.display="block":t.style.display="none",n.addEventListener("click",function(){localStorage.setItem("cookieAcceptedAt",(new Date).toISOString()),t.style.display="none"}),o.addEventListener("click",function(){t.style.display="none"})}},_=function(){var e=document.getElementById("discount-progress");if(e){parseFloat(getComputedStyle(e).getPropertyValue("--progres"));!function(){var e=document.querySelector(".discount_progress");if(e){var t=Number(e.dataset.max);e.querySelectorAll(".discount_progress_item[data-value]").forEach(function(e){var n=Number(e.dataset.value),o=Math.min(n/t*100,100);e.style.left="".concat(o,"%")})}}()}},q=function(){var e=document.querySelector(".mob-actions--filter"),t=document.querySelector(".mob-actions--sort"),n=document.querySelector(".catalog_aside"),o=document.querySelector(".catalog_sort"),a=document.querySelector(".catalog_sort .select_list"),i=document.querySelector(".catalog_sort .select_title__text");e&&n&&(e.addEventListener("click",function(){n.classList.add("active")}),n.addEventListener("click",function(e){e.target===n&&n.classList.remove("active")})),t&&o&&(t.addEventListener("click",function(e){e.stopPropagation(),o.classList.add("mob-open")}),o.addEventListener("click",function(e){e.target===o&&o.classList.remove("mob-open")})),o&&a&&i&&a.addEventListener("click",function(e){var t=e.target.closest(".select_list__item-text");t&&(i.textContent=t.innerText.trim(),o.classList.remove("open"),o.classList.remove("mob-open"),o.classList.add("selected"))})},w=function(){new g,m(),v(),f(),p(),E(),S(),_(),q()};document.addEventListener("DOMContentLoaded",function(){u(),w()})}();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.