PageSourceSearch

https://pareto.com.ua/wp-content/plugins/expert-review/assets/public/js/scripts.min.js

js pareto.com.ua collected 2026-10-08 00:36:16 UTC 10,071 bytes, 1 lines download raw bytes

1jQuery(function(c){"use strict";var u={STORAGE_KEY:"expert_review_likes:"+function(e){var t,i,a,n,r,s,o,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=0,d="";for(;t=e.charCodeAt(l++),i=e.charCodeAt(l++),a=e.charCodeAt(l++),n=(o=t<<16|i<<8|a)>>12&63,r=o>>6&63,s=63&o,d+=p.charAt(o>>18&63)+p.charAt(n)+p.charAt(r)+p.charAt(s),l<e.length;);switch(e.length%3){case 1:d=d.slice(0,-2)+"==";break;case 2:d=d.slice(0,-1)+"="}return d}(window.location.origin),_items:[],init:function(){var e={items:[]};return"undefined"!=typeof localStorage&&(e=localStorage.getItem(this.STORAGE_KEY))&&(e=JSON.parse(e),this._items=e.items),this},store:function(){if("undefined"!=typeof localStorage){var e={items:this._items};localStorage.setItem(this.STORAGE_KEY,JSON.stringify(e))}return this},like:function(e,t){return this._act(e,"like",t),this},dislike:function(e,t){return this._act(e,"dislike",t),this},remove:function(e,t){return this._act(e,"remove",t),this},_act:function(t,e,i){i=i||"posts";var a=this._items.filter(function(e){return e.hasOwnProperty("e")&&e.e!==i||e.id!==t});"remove"!==e&&a.push({id:t,a:e,e:i}),this._items=a},isLiked:function(e,t){return this._check(e,"like",t)},isDisliked:function(e,t){return this._check(e,"dislike",t)},_check:function(t,e,i){i=i||"posts";var a=this._items.filter(function(e){return e.hasOwnProperty("e")?e.e===i&&e.id===t:"posts"===i&&e.id===t});return!!a.length&&a[0].a===e}};function v(e){return 1e6<e?(e/1e6).toFixed(1)+"&nbsp;m.":1e5<e?(e/1e3).toFixed(0)+"&nbsp;k.":1e3<e?(e/1e3).toFixed(1)+"&nbsp;k.":e}u.init(),c(".js-expert-review-likes-button").each(function(){var e=c(this),t=e.parents(".js-expert-review-likes-button-container"),i=e.parent().data(),a=t.data("entity_type"),n=null;"posts"===(a=a||"posts")?i.hasOwnProperty("name")?n=i.name:i.hasOwnProperty("post_id")&&(n=i.post_id):"comments"===a&&(n=t.data("comment_id")),n&&("like"===e.data("type")||"toggle"===e.data("type")?e.addClass(u.isLiked(n,a)?"voted":""):"dislike"===e.data("type")&&e.addClass(u.isDisliked(n,a)?"voted":""))}),c(document).on("click",".js-expert-review-likes-button",function(e){e.preventDefault();var t=c(this),i=t.parents(".js-expert-review-likes-button-container"),n=i.data("entity_type");n=n||"posts";var r=null,s=t.data("type"),o="toggle"===s?"like":s,a=t.parent().data(),p=!1;if((!t.hasClass("voted")||"toggle"===s)&&("posts"===n?a.hasOwnProperty("name")?(r=a.name,p=!0):a.hasOwnProperty("post_id")&&(r=a.post_id):"comments"===n&&(r=i.data("comment_id")),r)){var l=!0;if("toggle"===s)u.isLiked(r,n)?l=!(o="dislike"):u.isDisliked(r,n)&&(l=!(o="like"));else if("like"===s){if(u.isLiked(r,n))return;l=!u.isDisliked(r,n)}else if("dislike"===t.data("type")){if(u.isDisliked(r,n))return;l=!u.isLiked(r,n)}var d={action:"expert_review_save_like",nonce:expert_review_ajax.nonce,is_named:p?1:0,entity:n,id:r,type:o,is_new:l?1:0};c.ajax({url:expert_review_ajax.url,type:"post",data:d,beforeSend:function(){t.addClass("loading"),t.prop("disabled",!0)}}).done(function(a){if(a.success){var e=p?'.js-expert-review-likes-button-container[data-name="'+r+'"]':'.js-expert-review-likes-button-container[data-post_id="'+r+'"]';"comments"===n&&(e='.js-expert-review-likes-button-container[data-comment_id="'+r+'"]'),c(document).find(e).each(function(){var e=c(this),t=e.find(".js-expert-review-likes-count"),i=e.find(".js-expert-review-dislikes-count");t.html(v(a.data.likes)),i.html(v(a.data.dislikes)),e.find(".js-expert-review-likes-button").removeClass("voted"),"toggle"===s&&"dislike"===o||e.find('.js-expert-review-likes-button[data-type="'+s+'"]').addClass("voted")}),"like"===s?u.like(r,n):"dislike"===s?u.dislike(r,n):"like"===o?u.like(r,n):u.remove(r,n),u.store(),p&&(c(document).find('.js-expert-review-like-rate[data-name="'+r+'"]').text(a.data.rate),c(document).find('.js-expert-review-like-activity[data-name="'+r+'"]').text(a.data.activity))}else console.log(a)}).always(function(){t.removeClass("loading"),t.prop("disabled",!1)})}})}),jQuery(function(o){"use strict";var p=new function(){var e="expert_review_polls_v1:"+function(e){var t,i,a,n,r,s,o,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/=",l=0,d="";for(;t=e.charCodeAt(l++),i=e.charCodeAt(l++),a=e.charCodeAt(l++),n=(o=t<<16|i<<8|a)>>12&63,r=o>>6&63,s=63&o,d+=p.charAt(o>>18&63)+p.charAt(n)+p.charAt(r)+p.charAt(s),l<e.length;);switch(e.length%3){case 1:d=d.slice(0,-2)+"==";break;case 2:d=d.slice(0,-1)+"="}return d}(window.location.origin),i={votes:{},reset:0};if("undefined"!=typeof localStorage){var t=localStorage.getItem(e);t&&(i=JSON.parse(t))}return{vote:function(e,t){i.votes[e]={a:t,t:Date.now()/1e3|0},a()},getAnswer:function(e){return i.votes.hasOwnProperty(e)?i.votes[e]:null},reset:function(e){if(e&&(!i.reset||i.reset<e)){for(var t in i.reset=e,i.votes)i.votes[t].t<e&&delete i.votes[t];a()}}};function a(){"undefined"!=typeof localStorage&&localStorage.setItem(e,JSON.stringify(i))}};o(".js-expert-review-poll").each(function(){var e=o(this),t=e.data("id"),i=p.getAnswer(t);i&&(e.addClass("voted"),e.find('.js-expert-review-poll-item[data-id="'+i.a+'"]').addClass("voted")),e.data("can_vote")||e.addClass("voted")}),o(".js-expert-review-poll-item").on("click",function(e){e.preventDefault();var t=o(this),i=t.parents(".js-expert-review-poll"),a=o('<div class="expert-review-poll__loader"><span></span></div>').clone();if(i.data("can_vote")){if(i.hasClass("voted"))return!1;var n=i.data("id"),r=t.data("id"),s={action:"expert_review_save_poll_vote",nonce:expert_review_ajax.nonce,question:n,answer:r};o.ajax({url:expert_review_ajax.url,type:"post",data:s,beforeSend:function(){i.append(a),t.prop("disabled",!0)}}).done(function(e){var t,s;e.success||console.log(e),o('.js-expert-review-poll[data-id="'+n+'"]').each(function(){var e=o(this);e.addClass("voted"),e.find('.js-expert-review-poll-item[data-id="'+r+'"]').addClass("voted")}),p.vote(n,r),t=n,s=e.data,o('.js-expert-review-poll[data-id="'+t+'"]').each(function(){var e=o(this),t=s.total;for(var i in s.votes){var a=e.find('.js-expert-review-poll-item[data-id="'+i+'"]');if(a.length){var n=Math.round(s.votes[i]/(t||s.votes[i])*100);a.find(".js-expert-review-poll-item-num").text(n+"%"),a.find(".js-expert-review-poll-item-progress").css("width",n+"%")}}var r=e.find(".js-expert-review-poll-count");r.length&&r.text(t)})}).always(function(){a.remove(),t.prop("disabled",!1)})}})}),jQuery(function(l){var d,a=expert_review_ajax.i18n,c=l('<div class="expert-review-popup__loader"><span></span></div>');l(document).on("click",".js-expert-review-button",function(e){e.preventDefault();var t,i=l(this).data("settings");switch(i.type){case"popup":!function(e){if("function"==typeof expert_review_question_popup)return l("body").append(expert_review_question_popup(a));var t=e.use_phone?"        <label>"+a.question_popup_phone+': <input type="text" name="_p" class="required"></label>':"        <label>"+a.question_popup_email+': <input type="email" name="_a" class="required"></label>',i='<div class="expert-review-popup-holder js-expert-review-popup"><div class="expert-review-popup">    <span class="expert-review-popup__close js-expert-review-close-mark">&times;</span>    <div class="expert-review-popup__content">        <form>        <label>'+a.question_popup_name+': <input type="text" name="name" class="required"></label>'+t+'        <input type="hidden" name="email">        <label>'+a.question_popup_question+': <textarea name="text" class="required"></textarea></label>        <button type="submit">'+a.question_popup_submit+'</button>        <span class="expert-review-popup__cancel js-expert-review-cancel">'+a.question_popup_cancel+"</span>        </form>    </div></div></div>";l("body").append(i)}(i);break;case"comments":(t=l("#comments")).length&&l("html, body").animate({scrollTop:t.offset().top},200);break;case"link":e.ctrlKey?l('<a href="'+i.link+'" target="_blank"></a>')[0].click():document.location=i.link}}),l(document).on("click",'.js-expert-review-popup button[type="submit"]',function(e){e.preventDefault();var t=l(this),i=t.parents(".js-expert-review-popup"),a=i.find("form"),n=c.clone();if(function(e){e.find(".js-expert-review-validation-message").remove();var t=!0;e.find("input.required, textarea.required").each(function(){var e=l(this);e.val().trim()||(t=!1,e.parents("label").append('<p class="js-expert-review-validation-message validation-failed">Поле не может быть пустым</p>'))}),clearTimeout(d),t||(d=setTimeout(function(){e.find(".js-expert-review-validation-message").hide(150,function(){l(this).remove()})},5e3));return t}(a)){var r,s,o,p=(r=i.find("form"),s=r.serializeArray(),o={},l.map(s,function(e,t){o[e.name]=e.value}),o);l.ajax({url:expert_review_ajax.url,type:"post",data:{action:"expert_review_submit_question",nonce:expert_review_ajax.nonce,data:p},beforeSend:function(){t.prop("disabled",!0),i.find(".expert-review-popup").append(n)}}).done(function(e){e.success?(i.find("form").prepend('<p class="success-message">Вопрос успешно отправлен</p>'),setTimeout(function(){i.remove()},3e3),document.dispatchEvent(new CustomEvent("expert_review_question:submit",{detail:{request:p,response:e}}))):e.data&&e.data.message&&(i.find("form").prepend('<p class="fail-message">'+e.data.message+"</p>"),setTimeout(function(){i.find(".fail-message").remove()},5e3))}).always(function(){t.prop("disabled",!1),n.remove()})}}),l(document).on("click",".js-expert-review-cancel, .js-expert-review-close-mark",function(e){e.preventDefault(),l(this).parents(".js-expert-review-popup").remove()}
1),l(document).keyup(function(e){27===e.keyCode&&l(".js-expert-review-close-mark").trigger("click")}),l("body").on("click",function(e){var t=l(e.target);t.is(".js-expert-review-popup")&&!t.find().is(".js-expert-review-popup")&&l(".js-expert-review-close-mark").trigger("click")}),l(".js-expert-review-faq-item-question").on("click",function(){var e=l(this).parent();e.hasClass("expand")?e.removeClass("expand"):e.addClass("expand"),l(this).parent().find(".js-expert-review-faq-item-answer").slideToggle()})});

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.