PageSourceSearch

https://medcanal.ru/wp-content/plugins/expert-review/assets/public/js/scripts.min.js

js medcanal.ru collected 2026-10-08 03:29:05 UTC 10,443 bytes, 1 lines download raw bytes

1jQuery(function(c){"use strict";var u={STORAGE_KEY:"expert_review_likes:"+function(e){var t,i,a,r,n,s,o,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=0,d="";for(;t=e.charCodeAt(l++),i=e.charCodeAt(l++),a=e.charCodeAt(l++),r=(o=t<<16|i<<8|a)>>12&63,n=o>>6&63,s=63&o,d+=p.charAt(o>>18&63)+p.charAt(r)+p.charAt(n)+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"),r=null;"posts"===(a=a||"posts")?i.hasOwnProperty("name")?r=i.name:i.hasOwnProperty("post_id")&&(r=i.post_id):"comments"===a&&(r=t.data("comment_id")),r&&("like"===e.data("type")||"toggle"===e.data("type")?e.addClass(u.isLiked(r,a)?"voted":""):"dislike"===e.data("type")&&e.addClass(u.isDisliked(r,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"),r=i.data("entity_type");r=r||"posts";var n=null,s=t.data("type"),o="toggle"===s?"like":s,a=t.parent().data(),p=!1;if((!t.hasClass("voted")||"toggle"===s)&&("posts"===r?a.hasOwnProperty("name")?(n=a.name,p=!0):a.hasOwnProperty("post_id")&&(n=a.post_id):"comments"===r&&(n=i.data("comment_id")),n)){var l=!0;if("toggle"===s)u.isLiked(n,r)?l=!(o="dislike"):u.isDisliked(n,r)&&(l=!(o="like"));else if("like"===s){if(u.isLiked(n,r))return;l=!u.isDisliked(n,r)}else if("dislike"===s){if(u.isDisliked(n,r))return;l=!u.isLiked(n,r)}var d={action:"expert_review_save_like",nonce:expert_review_ajax.nonce,is_named:p?1:0,entity:r,id:n,type:s,click_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="'+n+'"]':'.js-expert-review-likes-button-container[data-post_id="'+n+'"]';"comments"===r&&(e='.js-expert-review-likes-button-container[data-comment_id="'+n+'"]'),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"),"dislike"!==o?e.find('.js-expert-review-likes-button[data-type!="dislike"]').addClass("voted"):"toggle"!==s&&e.find('.js-expert-review-likes-button[data-type="dislike"]').addClass("voted")}),"like"===s?u.like(n,r):"dislike"===s?u.dislike(n,r):"like"===o?u.like(n,r):u.remove(n,r),u.store(),p&&(c(document).find('.js-expert-review-like-rate[data-name="'+n+'"]').text(a.data.rate),c(document).find('.js-expert-review-like-activity[data-name="'+n+'"]').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,r,n,s,o,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/=",l=0,d="";for(;t=e.charCodeAt(l++),i=e.charCodeAt(l++),a=e.charCodeAt(l++),r=(o=t<<16|i<<8|a)>>12&63,n=o>>6&63,s=63&o,d+=p.charAt(o>>18&63)+p.charAt(r)+p.charAt(n)+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 r=i.data("id"),n=t.data("id"),s={action:"expert_review_save_poll_vote",nonce:expert_review_ajax.nonce,question:r,answer:n};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="'+r+'"]').each(function(){var e=o(this);e.addClass("voted"),e.find('.js-expert-review-poll-item[data-id="'+n+'"]').addClass("voted")}),p.vote(r,n),t=r,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 r=Math.round(s.votes[i]/(t||s.votes[i])*100);a.find(".js-expert-review-poll-item-num").text(r+"%"),a.find(".js-expert-review-poll-item-progress").css("width",r+"%")}}var n=e.find(".js-expert-review-poll-count");n.length&&n.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=l(this).data("settings");switch(t.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)}(t);break;case"comments":!function(){if("function"==typeof expert_review_scroll_to_comments)return expert_review_scroll_to_comments();var e="#comments";expert_review_ajax.comment_to_scroll_selector&&(e=expert_review_ajax.comment_to_scroll_selector);var t=l(e);t.length&&l("html, body").animate({scrollTop:t.offset().top},200)}();break;case"link":e.ctrlKey||parseInt(expert_review_ajax.ask_question_link_new_tab)?l('<a href="'+t.link+'" target="_blank" rel="noopener"></a>')[0].click():document.location=t.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"),r=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 n,s,o,p=(n=i.find("form"),s=n.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(r)}}).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),r.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.