PageSourceSearch

https://localheroesstore.com/site/js/chunks/prod/318.3dccb38b17c45b9f91fa.js

js localheroesstore.com collected 2026-10-03 19:45:19 UTC 8,718 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunklocalheroes=self.webpackChunklocalheroes||[]).push([[318],{8318:function(e,t,r){r.r(t),r.d(t,{getReviewsPopup:function(){return c},openReviewAddPopup:function(){return n},openReviewPopup:function(){return a},openReviewsPopup:function(){return p},scrollToReviews:function(){return L},showMoreReviews:function(){return w},showRateStars:function(){return s},submitReviewForm:function(){return d}});var o=r(7622);const n=()=>{document.querySelector(".popup--review-add")&&((0,o.xq)(".popup--review-add"),v(),m())};let i=0;const c=(e=1)=>{let t=document.querySelector(".product__wishlist").dataset.productId,r=document.querySelector(".review__more__progress-bar"),o=document.querySelector(".review__more-loaded-count");i=r.value,fetch(`/products/${t}/reviews/comments.json?page=${e}`).then(e=>e.json()).then(t=>{const n=t.data.items;if(0==n.length)return;if(1===e){const e=document.querySelector(".review__comment--newest"),t=n.findIndex(e=>""!==e.comment.trim());e.innerHTML=u(n,t)}const c=document.querySelector(".popup--review .review__comments__container");if(!c)return;let s="";for(let e=0;e<=n.length;e++)n[e]&&(s+=u(n,e));c.innerHTML+=s;const d=t.data.pagination;if(i+=d.count,r.value=i,o.innerHTML=i.toString(),d.page===d.pages){return void document.querySelector(".review__more__btn").remove()}})},u=(e,t)=>{let r="";if(!e[t])return r;r+=`<div class="review__comment">\n            <div class="review__comment__text">\n           <p class="review__comment__text__author">${e[t].user_name}</p>\n           <p class="review__comment__text__content">${e[t].comment}</p>\n           </div>\n           <div class="review__comment__rate">`;let o="";for(let r=0;r<e[t].rate;r++)o+='<svg width="30" height="27" viewBox="0 0 30 27" xmlns="http://www.w3.org/2000/svg">\n                        <path d="M15.0003 0.272705L19.4144 8.82272L29.2858 10.1942L22.1428 16.849L23.829 26.2467L15.0003 21.81L6.17118 26.2467L7.85735 16.849L0.714355 10.1942L10.5858 8.82272L15.0003 0.272705Z" />\n                    </svg>';for(let r=0;r<5-e[t].rate;r++)o+='<svg width="30" height="27" viewBox="0 0 30 27" xmlns="http://www.w3.org/2000/svg" fill="#E0DDDD">\n                        <path d="M15.0003 0.272705L19.4144 8.82272L29.2858 10.1942L22.1428 16.849L23.829 26.2467L15.0003 21.81L6.17118 26.2467L7.85735 16.849L0.714355 10.1942L10.5858 8.82272L15.0003 0.272705Z" />\n                    </svg>';return r+=o,r+="</div></div>",r},s=(e,t)=>{const r=document.querySelector(t),o=document.querySelector(e);if(!o||!r)return;let n=Number(Number(o.innerHTML).toFixed(1)),i="";if("5"==Number(o.innerHTML).toFixed(1).slice(-1)&&5!=o.innerHTML){n-=.5;for(let e=0;e<Number(n.toFixed(0));e++)i+='<svg width="30" height="27" viewBox="0 0 30 27" xmlns="http://www.w3.org/2000/svg">\n                                            <path d="M15.0003 0.272705L19.4144 8.82272L29.2858 10.1942L22.1428 16.849L23.829 26.2467L15.0003 21.81L6.17118 26.2467L7.85735 16.849L0.714355 10.1942L10.5858 8.82272L15.0003 0.272705Z" />\n                                        </svg>';if(i+='<svg width="30" height="27" viewBox="0 0 30 27" xmlns="http://www.w3.org/2000/svg">\n                                <defs>\n                                    <linearGradient id="starGradient">\n                                      <stop offset="50%" stop-color="black" />\n                                      <stop offset="50%" stop-color="#E0DDDD" />\n                                    </linearGradient>\n                                </defs>\n                                <path fill="url(\'#starGradient\')" d="M15.0003 0.272705L19.4144 8.82272L29.2858 10.1942L22.1428 16.849L23.829 26.2467L15.0003 21.81L6.17118 26.2467L7.85735 16.849L0.714355 10.1942L10.5858 8.82272L15.0003 0.272705Z" />\n                            </svg>',n<4)for(let e=1;e<5-Number(n.toFixed(0));e++)i+='<svg width="30" height="27" viewBox="0 0 30 27" xmlns="http://www.w3.org/2000/svg" fill="#E0DDDD">\n                                            <path d="M15.0003 0.272705L19.4144 8.82272L29.2858 10.1942L22.1428 16.849L23.829 26.2467L15.0003 21.81L6.17118 26.2467L7.85735 16.849L0.714355 10.
11942L10.5858 8.82272L15.0003 0.272705Z" />\n                                        </svg>';const e=document.createElement("span");return r.insertBefore(e,o),void(e.innerHTML=i)}for(let e=0;e<Number(n.toFixed(0));e++)i+='<svg width="30" height="27" viewBox="0 0 30 27" xmlns="http://www.w3.org/2000/svg">\n                                            <path d="M15.0003 0.272705L19.4144 8.82272L29.2858 10.1942L22.1428 16.849L23.829 26.2467L15.0003 21.81L6.17118 26.2467L7.85735 16.849L0.714355 10.1942L10.5858 8.82272L15.0003 0.272705Z" />\n                                        </svg>';for(let e=0;e<5-Number(n.toFixed(0));e++)i+='<svg width="30" height="27" viewBox="0 0 30 27" xmlns="http://www.w3.org/2000/svg" fill="#E0DDDD">\n                                            <path d="M15.0003 0.272705L19.4144 8.82272L29.2858 10.1942L22.1428 16.849L23.829 26.2467L15.0003 21.81L6.17118 26.2467L7.85735 16.849L0.714355 10.1942L10.5858 8.82272L15.0003 0.272705Z" />\n                                        </svg>';const c=document.createElement("span");r.insertBefore(c,o),c.innerHTML=i},d=()=>{let e=document.querySelector(".review__form");e&&e.addEventListener("submit",e=>{e.preventDefault();const t=new URLSearchParams(window.location.search).get("review_token");let r,n=document.querySelector(".popup--review .popup__product-info");n&&(r=n.dataset.productId);let i=document.querySelector('input[name="rate"]:checked').value,c=document.querySelector(".review__form__text").value;const u=new URLSearchParams(window.location.search);let s={variant_id:u.get("variant_id"),product_id:r,order_id:u.get("order_id"),review_token:t,comment:c,rate:i,reasons:[]};fetch("/products/"+r+"/reviews/comments.json",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}).then(e=>e.json()).then(e=>{const t=document.querySelector(".popup--review.active"),r=document.querySelector(".popup--review--error"),n=document.querySelector(".popup--review--success");t&&r&&n&&((0,o.xq)(".popup--review-add"),"OK"===e.status?(0,o.xq)(".popup--review--success"):(0,o.xq)(".popup--review--error"))})})},p=()=>{const e=document.querySelector(".review__more"),t=document.querySelector(".popup--review");e&&t&&e.addEventListener("click",()=>{(0,o.xq)(".popup--review")})},a=e=>{const t=document.querySelectorAll(e);if(0===t.length)return;const r=[];[...t].map(e=>{e.addEventListener("click",t=>{const n=e.dataset.itemId;n&&((0,o.xq)(`.popup--review-${n}`),v(),m(),r.includes(n)||(l(n),r.push(n)))})}),(0,o.fs)()},l=e=>{let t=document.querySelector(`.review__form--${e}`);t&&t.addEventListener("submit",r=>{r.preventDefault();let n=t.querySelector(".popup__product-info"),i=n.dataset.variantId,c=n.dataset.productId,u=n.dataset.orderId,s=t.querySelector('input[name="rate"]:checked').value,d=t.querySelector(".review__form__text").value,p=document.querySelector(`.order__product-review[data-item-id="${e}"]`),a={variant_id:i,product_id:c,order_id:u,comment:d,rate:s,reasons:[]};fetch("/api/reviews/"+c+"/comments.json",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then(e=>e.json()).then(t=>{var r;const n=document.querySelector(".popup--review.active"),i=document.querySelector(".popup--review--error"),c=document.querySelector(".popup--review--success");n&&i&&c&&((0,o.xq)(`.popup--review-${e}`),"OK"===t.status?(p.setAttribute("disabled","true"),p.innerHTML=null!==(r=p.dataset.addedText)&&void 0!==r?r:"",(0,o.xq)(".popup--review--success")):(0,o.xq)(".popup--review--error"))})})},v=()=>{let e=document.querySelectorAll('.popup.active input[name="rate"]');const t=document.querySelector(".popup.active .rating__checked");e.forEach(e=>{e.addEventListener("change",function(){let e=document.querySelector('.popup.active input[name="rate"]:checked');t.innerText=e.value+"/5"})})},m=()=>{const e=document.querySelector(".popup.active .review__form__text"),t=document.querySelector(".popup.active .review__form__text__limit");e&&t&&e.addEventListener("input",e=>{t.innerText=e.target.value.length+"/200"})},w=e=>{const t=document.querySelector(e);let r=document.querySelector(".product__wishlist");if(!t||!r)return;let o=2;t.addEventListener("click",()=>{c(o),o++})},L=(e,t)=>{const r=document.querySelector(e),o=document.querySelector(t);if(!r||!o)return;const n=o.querySelector(".collapse"),i=o.querySelector(".collapse__title");r.addEventListener("click",()=>{const e=o.getBoundingClientRect().top;n.classList.add("collapse--show"),i.setAttribute("aria-expanded","true"),window.scrollTo({top:e,behavior:"smooth"})})}}}]);

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.