//! Likely 2.0 by Ilya Birman, ilyabirman.net //! Rewritten sans jQuery by Evgeny Steblinsky, volter9.github.io //! Inspired by Social Likes by Artem Sapegin, http://sapegin.me !function t(e,i,n){function o(s,c){if(!i[s]){if(!e[s]){var u="function"==typeof require&&require;if(!c&&u)return u(s,!0);if(r)return r(s,!0);throw new Error("Cannot find module '"+s+"'")}var a=i[s]={exports:{}};e[s][0].call(a.exports,function(t){var i=e[s][1][t];return o(i?i:t)},a,a.exports,t,e,i,n)}return i[s].exports}for(var r="function"==typeof require&&require,s=0;s{content}',linkHTML='',i.prototype={init:function(){this.detectService(),this.detectParams(),this.initHtml(),setTimeout(this.initCounter.bind(this),0)},update:function(t){var e="."+r.prefix+"counter";counters=c.findAll(e,this.widget),s.extend(this.options,s.merge({forceUpdate:!1},t)),s.toArray(counters).forEach(function(t){t.parentNode.removeChild(t)}),this.initCounter()},detectService:function(){var t=this.widget.dataset.service;if(!t){for(var e=this.widget.className.split(" "),i=0;ie.height&&(n=Math.round(screen.height/3-e.height/2));var o=window.open(t,"sl_"+this.service,s.template(u,{height:e.height,width:e.width,left:i,top:n}));return o?void this.watchWindow(o):location.href=t},watchWindow:function(t){if(t){var e=function(){t.closed&&clearInterval(i)};t.focus();var i=setInterval(e.bind(this),this.options.popupCheckInterval)}}},e.exports=i},{"./config":2,"./dom":3,"./promises":7,"./services":8,"./utils":10}],2:[function(t,e){e.exports={name:"likely",prefix:"likely__",secure:"https:"===window.location.protocol,protocol:"https:"===window.location.protocol?"https:":"http:"}},{}],3:[function(t,e){function i(t){return''}function n(t){return u.innerHTML=t,u.children[0]}function o(t){var e=document.createElement("script");e.type="text/javascript",e.src=t,document.head.appendChild(e),document.head.removeChild(e)}function r(t,e){var i="random_fun_"+Date.now()+"_"+ ++a;t=t.replace(/callback=(\?)/,"callback="+encodeURIComponent(i)),window[i]=e,o(t)}function s(t,e){return e=e||document,e.querySelector(t)}function c(t,e){return e=e||document,e.querySelectorAll(t)}var u=document.createElement("div"),a=0;e.exports={createNode:n,getScript:o,wrapSVG:i,getJSON:r,find:s,findAll:c}},{}],4:[function(t,e){var i=function(t){t.on=function(t,e){this._events||(this._events={}),this._events[t]||(this._events[t]=[]),this._events[t].push(e)},t.emit=function(t){if(this._events&&this._events[t]){var e=Array.prototype.slice.call(arguments).slice(1);this._events[t].forEach(function(t){t&&t.apply(t,e)})}}};e.exports=i},{}],5:[function(t){"use strict";var e=t("./widget"),i=t("./config"),n=t("./utils"),o=t("./dom");window.socialLikes=function(t,o){o=o||{};var r=t[i.name];r?r.update(o):t[i.name]=new e(t,n.merge({},socialLikes.defaults,o,n.bools(t)))},window.socialLikes.defaults={popupCheckInterval:150,counters:!0,timeout:1e3,zeroes:!1,title:document.title,wait:500,url:window.location.href.replace(window.location.hash,"")},window.addEventListener("load",function(){var t=o.findAll("."+i.name);n.toArray(t).forEach(socialLikes)})},{"./config":2,"./dom":3,"./utils":10,"./widget":11}],6:[function(t,e){var i=t("./events"),n=function(){};n.prototype={always:function(t){this.on("rejected",t),this.on("accepted",t)},fail:function(t){this.on("rejected",t)},done:function(t){this.on("accepted",t)},reject:function(){this.emit("rejected")},resolve:function(t){this.emit("accepted",t)}},i(n.prototype),n.make=function(){return new n},e.exports=n},{"./events":4}],7:[function(t,e){var i=t("./services"),n=t("./promise"),o=t("./utils"),r=t("./dom"),s={promises:{},fetch:function(t,e,r){this.promises[t]||(this.promises[t]={});var s=this.promises[t];if(!r.forceUpdate&&s[e])return s[e];var r=o.merge(i[t],r),s=n.make(),c=r.counterUrl&&o.makeUrl(r.counterUrl,{url:e});return c&&"function"==typeof r.counter?r.counter(c,s,e):r.counterUrl?this.getJSON(c,s,r):s.reject(),s[e]=s},getJSON:function(t,e,i){r.getJSON(t,function(t){try{"function"==typeof i.convertNumber&&(t=i.convertNumber(t)),e.resolve(t)}catch(n){e.reject()}})}};e.exports=s},{"./dom":3,"./promise":6,"./services":8,"./utils":10}],8:[function(t,e){var i=t("./config"),n=t("./utils"),o=t("./dom"),r=function(t){"string"==typeof t&&(t=t.replace(/\D/g,""));var e=n.getStackURL(),i=n.getURL(e),o=e.match(/gid=(\d+)/).pop();s.gplus._[o+"_"+i].resolve(parseInt(t,10))},s={facebook:{counterUrl:"https://graph.facebook.com/fql?q=SELECT+total_count+FROM+link_stat+WHERE+url%3D%22{url}%22&callback=?",convertNumber:function(t){return t.data[0].total_count},popupUrl:"https://www.facebook.com/sharer/sharer.php?u={url}",popupWidth:600,popupHeight:500},twitter:{counterUrl:"https://cdn.api.twitter.com/1/urls/count.json?url={url}&callback=?",convertNumber:function(t){return t.count},popupUrl:"https://twitter.com/intent/tweet?url={url}&text={title}",popupWidth:600,popupHeight:450,click:function(){return/[\.\?:\-–—]\s*$/.test(this.options.title)||(this.options.title+=":"),!0}},vkontakte:{counterUrl:"https://vk.com/share.php?act=count&url={url}&index={index}",counter:function(t,e){var i=s.vkontakte;void 0==i._&&(i._=[],window.VK=window.VK||{},window.VK.Share={},window.VK.Share.count=function(t,e){i._[t].resolve(e)}),i._.push(e),o.getScript(n.makeUrl(t,{index:i._.length-1}))},popupUrl:i.protocol+"//vk.com/share.php?url={url}&title={title}",popupWidth:550,popupHeight:330},gplus:{gid:0,counterUrl:i.secure?void 0:"http://share.yandex.ru/gpp.xml?gid={gid}&url={url}",counter:function(t,e,i){var c=s.gplus,u=++c.gid;void 0==c._&&(c._={},window.services||(window.services={}),window.services.gplus={},window.services.gplus.cb=r),c._[u+"_"+i]=e,o.getScript(n.makeUrl(t,{gid:u}))},popupUrl:"https://plus.google.com/share?url={url}",popupWidth:700,popupHeight:500},pinterest:{counterUrl:i.protocol+"//api.pinterest.com/v1/urls/count.json?url={url}&callback=?",convertNumber:function(t){return t.count},popupUrl:i.protocol+"//pinterest.com/pin/create/button/?url={url}&description={title}",popupWidth:630,popupHeight:270},odnoklassniki:{counterUrl:i.secure?void 0:"http://connect.ok.ru/dk?st.cmd=extLike&ref={url}&uid={index}",counter:function(t,e){var i=s.odnoklassniki;void 0==i._&&(i._=[],window.ODKL=window.ODKL||{},window.ODKL.updateCount=function(t,e){i._[t].resolve(e)}),i._.push(e),o.getScript(n.makeUrl(t,{index:i._.length-1}))},popupUrl:"http://connect.ok.ru/dk?st.cmd=WidgetSharePreview&service=odnoklassniki&st.shareUrl={url}",popupWidth:640,popupHeight:400}},c=t("./svg");for(var u in s)s[u].svgi=c[u];e.exports=s},{"./config":2,"./dom":3,"./svg":9,"./utils":10}],9:[function(t,e){e.exports={facebook:"13 0H3C1 0 0 1 0 3v10c0 2 1 3 3 3h5V9H6V7h2V5c0-2 2-2 2-2h3v2h-3v2h3l-.5 2H10v7h3c2 0 3-1 3-3V3c0-2-1-3-3-3",twitter:"15.96 3.42c-.04.153-.144.31-.237.414l-.118.058v.118l-.59.532-.237.295c-.05.036-.398.21-.413.237V6.49h-.06v.473h-.058v.294h-.058v.296h-.06v.235h-.06v.237h-.058c-.1.355-.197.71-.295 1.064h-.06v.116h-.06c-.02.1-.04.197-.058.296h-.06c-.04.118-.08.237-.118.355h-.06c-.038.118-.078.236-.117.353l-.118.06-.06.235-.117.06v.116l-.118.06v.12h-.06c-.02.057-.038.117-.058.175l-.118.06v.117c-.06.04-.118.08-.177.118v.118l-.237.177v.118l-.59.53-.532.592h-.117c-.06.078-.118.156-.177.236l-.177.06-.06.117h-.118l-.06.118-.176.06v.058h-.118l-.06.118-.353.12-.06.117c-.078.02-.156.04-.235.058v.06c-.118.038-.236.078-.354.118v.058H8.76v.06h-.12v.06h-.176v.058h-.118v.06H8.17v.058H7.99v.06l-.413.058v.06h-.237c-.667.22-1.455.293-2.36.293h-.886v-.058h-.53v-.06H3.27v-.06h-.295v-.06H2.68v-.057h-.177v-.06h-.236v-.058H2.09v-.06h-.177v-.058h-.177v-.06H1.56v-.058h-.12v-.06l-.294-.06v-.057c-.118-.04-.236-.08-.355-.118v-.06H.674v-.058H.555v-.06H.437v-.058H.32l-.06-.12H.142v-.058c-.13-.08-.083.026-.177-.118H1.56v-.06c.294-.04.59-.077.884-.117v-.06h.177v-.058h.237v-.06h.118v-.06h.177v-.057h.118v-.06h.177v-.058l.236-.06v-.058l.236-.06c.02-.038.04-.078.058-.117l.237-.06c.02-.04.04-.077.058-.117h.118l.06-.118h.118c.036-.025.047-.078.118-.118V12.1c-1.02-.08-1.84-.54-2.303-1.183-.08-.058-.157-.118-.236-.176v-.117l-.118-.06v-.117c-.115-.202-.268-.355-.296-.65.453.004.987.008 1.354-.06v-.06c-.254-.008-.47-.08-.65-.175v-.058H2.32v-.06c-.08-.02-.157-.04-.236-.058l-.06-.118h-.117l-.118-.178h-.12c-.077-.098-.156-.196-.235-.294l-.118-.06v-.117l-.177-.12c-.35-.502-.6-1.15-.59-2.006h.06c.204.234.948.377 1.357.415v-.06c-.257-.118-.676-.54-.827-.768V5.9l-.118-.06c-.04-.117-.08-.236-.118-.354h-.06v-.118H.787c-.04-.196-.08-.394-.118-.59-.06-.19-.206-.697-.118-1.005h.06V3.36h.058v-.177h.06v-.177h.057V2.83h.06c.04-.118.078-.236.117-.355h.118v.06c.12.097.237.196.355.295v.118l.118.058c.08.098.157.197.236.295l.176.06.354.413h.118l.177.236h.118l.06.117h.117c.04.06.08.118.118.177h.118l.06.118.235.06.06.117.356.12.06.117.53.176v.06h.118v.058l.236.06v.06c.118.02.236.04.355.058v.06h.177v.058h.177v.06h.176v.058h.236v.06l.472.057v.06l1.417.18v-.237c-.1-.112-.058-.442-.057-.65 0-.573.15-.99.354-1.358v-.117l.118-.06.06-.235.176-.118v-.118c.14-.118.276-.236.414-.355l.06-.117h.117l.12-.177.235-.06.06-.117h.117v-.058H9.7v-.058h.177v-.06h.177v-.058h.177v-.06h.296v-.058h1.063v.058h.294v.06h.177v.058h.178v.06h.177v.058h.118v.06h.118l.06.117c.08.018.158.038.236.058.04.06.08.118.118.177h.118l.06.117c.142.133.193.163.472.178.136-.12.283-.05.472-.118v-.06h.177v-.058h.177v-.06l.236-.058v-.06h.177l.59-.352v.176h-.058l-.06.295h-.058v.117h-.06v.118l-.117.06v.118l-.177.118v.117l-.118.06-.354.412h-.117l-.177.236h.06c.13-.112.402-.053.59-.117l1.063-.353",vkontakte:"13 0H3C1 0 0 1 0 3v10c0 2 1 3 3 3h10c2 0 3-1 3-3V3c0-2-1-3-3-3zm.452 11.394l-1.603.022s-.345.068-.8-.243c-.598-.41-1.164-1.48-1.604-1.342-.446.144-.432 1.106-.432 1.106s.003.206-.1.315c-.11.12-.326.144-.326.144H7.87s-1.582.095-2.975-1.356c-1.52-1.583-2.862-4.723-2.862-4.723s-.078-.206.006-.305c.094-.112.35-.12.35-.12l1.716-.01s.162.026.277.11c.095.07.15.202.15.202s.276.7.643 1.335c.716 1.238 1.05 1.508 1.293 1.376.353-.193.247-1.75.247-1.75s.006-.565-.178-.817c-.145-.194-.415-.25-.534-.267-.096-.014.062-.238.267-.338.31-.15.853-.16 1.497-.153.502.004.646.035.842.083.59.143.39.694.39 2.016 0 .422-.075 1.018.23 1.215.13.085.453.013 1.256-1.352.38-.647.666-1.407.666-1.407s.062-.136.16-.194c.098-.06.232-.04.232-.04l1.804-.012s.542-.065.63.18c.092.257-.203.857-.94 1.84-1.21 1.612-1.345 1.46-.34 2.394.96.89 1.16 1.325 1.192 1.38.4.66-.44.71-.44.71",gplus:"8,6.5v3h4.291c-0.526,2.01-2.093,3.476-4.315,3.476C5.228,12.976,3,10.748,3,8c0-2.748,2.228-4.976,4.976-4.976c1.442,0,2.606,0.623,3.397,1.603L13.52,2.48C12.192,0.955,10.276,0,8,0C3.582,0,0,3.582,0,8s3.582,8,8,8s7.5-3.582,7.5-8V6.5H8",pinterest:"7.99 0c-4.417 0-8 3.582-8 8 0 3.39 2.11 6.284 5.086 7.45-.07-.633-.133-1.604.028-2.295.145-.624.938-3.977.938-3.977s-.24-.48-.24-1.188c0-1.112.645-1.943 1.448-1.943.683 0 1.012.512 1.012 1.127 0 .686-.437 1.713-.663 2.664-.19.796.398 1.446 1.184 1.446 1.422 0 2.515-1.5 2.515-3.664 0-1.915-1.377-3.255-3.343-3.255-2.276 0-3.612 1.707-3.612 3.472 0 .688.265 1.425.595 1.826.065.08.075.15.055.23-.06.252-.195.796-.222.907-.035.146-.116.177-.268.107-1-.465-1.624-1.926-1.624-3.1 0-2.523 1.835-4.84 5.287-4.84 2.775 0 4.932 1.977 4.932 4.62 0 2.757-1.74 4.976-4.152 4.976-.81 0-1.573-.42-1.834-.92l-.498 1.903c-.18.695-.668 1.566-.994 2.097.75.232 1.544.357 2.37.357 4.417 0 8-3.582 8-8s-3.583-8-8-8",odnoklassniki:"8 6.107c.888 0 1.607-.72 1.607-1.607 0-.888-.72-1.607-1.607-1.607s-1.607.72-1.607 1.607c0 .888.72 1.607 1.607 1.607zM13 0H3C1 0 0 1 0 3v10c0 2 1 3 3 3h10c2 0 3-1 3-3V3c0-2-1-3-3-3zM8 .75c2.07 0 3.75 1.68 3.75 3.75 0 2.07-1.68 3.75-3.75 3.75S4.25 6.57 4.25 4.5C4.25 2.43 5.93.75 8 .75zm3.826 12.634c.42.42.42 1.097 0 1.515-.21.208-.483.313-.758.313-.274 0-.548-.105-.758-.314L8 12.59 5.69 14.9c-.42.418-1.098.418-1.516 0s-.42-1.098 0-1.516L6.357 11.2c-1.303-.386-2.288-1.073-2.337-1.11-.473-.354-.57-1.025-.214-1.5.354-.47 1.022-.567 1.496-.216.03.022 1.4.946 2.698.946 1.31 0 2.682-.934 2.693-.943.474-.355 1.146-.258 1.5.213.355.474.26 1.146-.214 1.5-.05.036-1.035.723-2.338 1.11l2.184 2.184"}},{}],10:[function(t,e){function i(t){return Array.prototype.slice.call(t)}function n(){for(var t={},e=0;e