var mcp = {"url":"https://www.cryptohopper.com/widgets","ajax_url":"https://www.cryptohopper.com/widgets/widgets/ajax","numformat":"US"}; this.depp||function(f,u){depp=function(){function a(l,d){var q=function t(n,v){v=v||[];var x=[],z=[];return n.forEach(function(A){if(0 <=v.indexOf(A))throw Error( "Depp Error: Circular reference");if(!(A in b))return x.push( "#"+A);b[A].forEach(function(B){if( "#"==B[0]){var y=v.slice();y.push(A);y=t([B.slice(1)],y);x=x.concat(y[0]);z=z.concat(y[1])}else z.push(B)})}),[x,z]}(l);q[0].length?c(q[0],function(){a(l,d)}):d(q[1])}function c(l,d){var q,w,n=l.length,v=n;if(0==n)return d();for(q=function(t,x){if(x)return d(t); --v||d()};n--;)(w=l[n])in h?q(w,h[w]):(m[w]=m[w]||[]).push(q)}function g(l,d){var q=m[l];if(h[l]=d,q)for(;q.length;)q[0](l,d),q.splice(0,1)}var e={},k=function(){},b={},m={},h={},r={},p={};return e.define=function(l){var d;for(d in l){if(d in b)throw Error( "Depp Error: Bundle already defined");var q=l[d];b[d]=q.push?q:[q];g( "#"+d)}},e.config=function(l){for(var d in l)p[d]=l[d]},e.require=function(l,d,q){a(l=l.push?l:[l],function(w){c(w,function(n){n?(q||k)(n):(d||k)()});w.forEach(function(n){var v, t,x,z,A;n in r||(r[n]=!0,x=document,z=p.before||k,A=n.replace(/^(css|img)!/, ""),/(^css!|\.css$)/.test(n)?(v=!0,(t=x.createElement( "link")).rel="stylesheet" ,t.href=A):/(^img!|\.(png|gif|jpg|svg)$)/.test(n)?(t=x.createElement( "img")).src=A:((t=x.createElement( "script")).src=n,t.async=!1),t.onload=t.onerror=t.onbeforeload=function(B){var y=B.type[0];if(v&& "hideFocus"in t)try{t.sheet.cssText.length||(y="e" )}catch(C){18!=C.code&&(y="e" )}if( "b"==y){if(!B.defaultPrevented)return;y="e" }g(n, "e"==y)},z(n,t), x.head.appendChild(t))})})},e.done=function(l){b[l]=[];g( "#"+l)},e.isDefined=function(l){return l in b},e.reset=function(){b={};m={};h={};r={};p={}},e}();(u=f.createEvent( "HTMLEvents")).initEvent?u.initEvent( "depp-load",!1,!1):u=new Event( "depp-load");f.dispatchEvent(u)}(document);function addCommas(f){var u="US"===mcp.numformat? ".": ",",a="US"===mcp.numformat? ",": ".",c=(f+ "").split( ".");f=c[0];u=1.2126*(u>>16&255)+.7152*(u>>8&255)+.0722*(u>>0&255)&&f.addClass("invert-act")} function realtimeUpdate(){var f=jQuery('[data-realtime="on"]');if("undefined"===typeof window.socket&&0 c?8:6;jQuery(this).find("span").html(addCommas(c.toFixed(g)));a>parseFloat(jQuery(this).attr("data-price"))&&jQuery(this).animateCss("liveup");a =g&&c <=g?!0:!1};jQuery.fn.drawChart=function(){var a=jQuery(this); depp.require( "chartjs",function(){var c=a.data( "rate")?a.data( "rate"):1,g=a.data( "fiat")?a.data( "fiat"): "$",e=a.data( "color"),k=parseInt(a.data( "gradient")),b=parseInt(a.data( "border")),m=parseFloat(a.data( "opacity")),h=a.data( "points").split( ",").slice(0,24);h=h.map(function(p){p=parseFloat(p)*c;return p.toFixed(1<=p?2:1E-6>p?8:6)});r=r?r:e;if(0===k)var r="rgba("+e+","+m+")";else r=a[0].getContext("2d").createLinearGradient(0,0,0,k),r.addColorStop(0,"rgba("+e+",0.3)"),r.addColorStop(1,"rgba("+e+ ",0)");e={labels:h,datasets:[{data:h,fill:!0,backgroundColor:r,borderColor:"rgb("+e+")",pointBorderColor:"rgb("+e+")",lineTension:.25,pointRadius:0,borderWidth:b}]};new Chart(a[0].getContext("2d"),{type:"line",data:e,options:{animation:{duration:500},legend:{display:!1},scales:{xAxes:[{display:!1}],yAxes:[{display:!1}]},tooltips:{mode:"index",intersect:!1,displayColors:!1,callbacks:{label:function(p,l){return g+" "+addCommas(parseFloat(p.xLabel))},title:function(p,l){return!1}}},hover:{mode:"nearest", intersect:!0},maintainAspectRatio:!1}})})};jQuery.fn.mcwAccordion=function(){this.find(".mcw-list-item:eq(0)").addClass("active").find(".mcw-list-body").slideDown();this.find(".mcw-list-header").click(function(){jQuery(this).parents(".mcw-list").find(".mcw-list-item").not(jQuery(this).parent()).removeClass("active").find(".mcw-list-body").slideUp();jQuery(this).parent().toggleClass("active");jQuery(this).next(".mcw-list-body").slideToggle()})};jQuery(document).on("mcw",".mcw-table",function(){var a= jQuery(this),c=a.find(".mcw-datatable");depp.require("datatable",function(){jQuery.fn.dataTableExt.oPagination.info_buttons={fnInit:function(b,m,h){var r=b._iDisplayStart+1+" - "+b.fnDisplayEnd()+" of "+b.fnRecordsDisplay(),p=document.createElement("span"),l=document.createElement("span"),d=document.createElement("span");p.appendChild(document.createTextNode(b.oLanguage.oPaginate.sPrevious));d.appendChild(document.createTextNode(b.oLanguage.oPaginate.sNext));l.appendChild(document.createTextNode(r)); p.className="paginate_button previous";d.className="paginate_button next";l.className="paginate_button info";m.appendChild(p);m.appendChild(l);m.appendChild(d);jQuery(p).click(function(){b.oApi._fnPageChange(b,"previous");h(b)});jQuery(d).click(function(){b.oApi._fnPageChange(b,"next");h(b)});jQuery(p).bind("selectstart",function(){return!1});jQuery(d).bind("selectstart",function(){return!1})},fnUpdate:function(b,m){if(b.aanFeatures.p)for(var h=b.aanFeatures.p,r=0,p=h.length;r ',r=p.link?r+( '
'+h+ '
'+p.symbol+ "
"):r+( '
'+h+ '
'+p.symbol+ "
"),r+ "";case "price_usd":r=parseFloat(p.currate*h);l=1<=r?2:1E-6>r?8:6;var d=p.name.split(" ").join("-"); d=d.toLowerCase();return' '+p.cryptofiat+" "+addCommas(r.toFixed(l))+"";case "price_btc":return"\u0243 "+h;case "market_cap_usd":return h*=p.currate,p.cryptofiat+" "+commarize(h,p.priceformat);case "volume_usd_24h":return h*=p.currate,h=commarize(h,p.priceformat),p.cryptofiat+" "+h;case "available_supply":return commarize(h,p.priceformat);case "percent_change_24h":return''+h+"%"; case "weekly":return'
';default:return h}}})});var k=c.DataTable({destroy:!0,bDestroy:!0,dom:'r < "loader"> < "datatable-scroll"t> < "loader"> < "dataTables-footer"lp> < "clear">',order:[],scrollCollapse:!0,pagingType:"info_buttons",responsive:{details:{type:480>a.width()?"column":"inline",target:"tr"}}, pageLength:parseInt(c.data("length")),lengthMenu:[parseInt(c.data("length")),10,25,50,100].sort(function(b,m){return b-m}).filter(function(b,m,h){return h.indexOf(b)===m}),columns:g,processing:!0,serverSide:!0,deferLoading:parseInt(c.data("total")),columnDefs:[{targets:"col-name",className:"ctrl text-left all"},{targets:"col-rank",className:"text-left min-tablet-p",width:"20px"},{targets:"col-price_usd",className:"all"},{targets:"col-weekly",width:"190px","max-width":"190px",className:"chart-wrapper"}], drawCallback:function(b){c.find("canvas").each(function(){jQuery(this).drawChart()});b=c.parents(".cryptoboxes").data("realtime");"undefined"!==typeof window.socket&&"on"===b&&window.socket.addEventListener("message",function(m){var h=JSON.parse(m.data);c.find('[data-live-price="'+h.base+'"]').each(function(){jQuery(this).realTime(h)})});jQuery(".mcw-table.dark").each(function(){jQuery(this).invertable()})},ajax:{url:mcp.ajax_url,data:{action:"mcw_table",dynamic:a.attr("data-dynamic"),mcw_id:a.attr("id").split("-")[1]}}, language:{processing:"",lengthMenu:"Coins per page: _MENU_"}});k.on("responsive-resize",function(b,m,h){var r=h[0]?0:1;c.find("tr td").removeClass("ctrl");c.find("tbody tr").each(function(){jQuery(this).find("td").eq(r).addClass("ctrl")});c.removeClass("dtr-column dtr-inline");c.addClass(["dtr-inline","dtr-column"][r])});k.on("processing.dt",function(b,m,h){h?(b=a.find("thead").inView()?0:1,a.find(".loader").eq(b).show()):a.find(".loader").hide()});k.on("responsive-display",function(b){jQuery(b.currentTarget).find("td.child canvas").parent().addClass("chart-wrapper"); jQuery(b.currentTarget).find("td.child canvas").each(function(){jQuery(this).drawChart()})})})});jQuery(document).on("mcw",".mcw-chart",function(){var a=jQuery(this);depp.require(["echarts","visibilitychanged"],function(){function c(d){b.period=d;k.title.subtext=r[b.period];e()}function g(d){b.coin="MIOTA"==b.coin?"IOT":b.coin;var q="https://min-api.cryptocompare.com/data/"+("day"===b.period||"week"===b.period?"histohour":"histoday");q+="?fsym="+b.coin+"&tsym="+b.currency;q+="&limit="+h[b.period]+ "&aggregate=1&extraParams=massivecrypto";var w="mcw-"+b.coin.toLowerCase()+"-"+b.currency.toLowerCase()+"-"+b.period;if(null===sessionStorage.getItem(w)||""==sessionStorage.getItem(w))jQuery.get(q,function(n){sessionStorage.setItem(w,JSON.stringify(n));return d(n)},"json");else return q=JSON.parse(sessionStorage.getItem(w)),d(q)}function e(){l.showLoading("default",{text:"",color:m.titleColor,maskColor:m.backgroundColor});g(function(d){var q=[],w=[],n=[];for(i=0;i x?"0"+x:x)+" "+z}else t=p[v.getMonth()]+" "+v.getDate();v=t;t="chart"==b.type?d.Data[i].close:[d.Data[i].close,d.Data[i].open,d.Data[i].low,d.Data[i].high];q.push(v);w.push(t);n.push(d.Data[i].volumefrom)}k.xAxis[0].data=q;k.series[0].data=w;"candlestick"==b.type&&(d=Math.round(h[b.period]/60*10),q="candlestick"==b.type&&10 "+(d[0].marker+ ' Price: '+b.symbol+addCommas(d[0].value)),q+="" ):(q=q+ "
"+(d[0].marker+ ' H: '+b.symbol+addCommas(d[0].value[4])+ ""),q+=' L: ' + b.symbol+addCommas(d[0].value[3])+ "",q=q+ "
"+(d[0].marker+ ' O: '+b.symbol+addCommas(d[0].value[2])+ ""),q+=' C: ' +b.symbol+addCommas(d[0].value[1])+ "",q=q+ "
"+(d[1].marker+ ' V: '+addCommas(d[1].value)+ " "+b.coin));return q}},dataZoom:{show:!1,realtime:!0,start:0,end:100},toolbox:{show:!0,itemSize:22,left:320n?8:6)))}function g(){var n=m[0].selectize.options[m.val()].val,v=h[0].selectize.options[h.val()].val,t="US"===mcp.numformat?parseFloat(p.val().replace(/,/g,"")):parseFloat(p.val().replace(/\./g,""));n="crypto"===e&&"crypto"===k?t?v/n*t:"":"fiat"===e&&"fiat"===k?t?n/v*t:"":"fiat"===e&&"crypto"===k?t?t*n*v:"":t?1/v*t/n:"";n=parseFloat(n);r.val(addCommas(n.toFixed(1 <=n?2:1E-6>n?8:6)))}a.find("select").selectize({onInitialize:function(){var n=this;this.revertSettings.$children.each(function(){jQuery.extend(n.options[this.value], jQuery(this).data())});n.$dropdown.addClass("mcw-conv-style")},dropdownParent:"body"});a.find(".mcw-convert-swap").click(function(){a.find(".mcw-form-group").eq(0).toggleClass("mcw-form-group-swap")});var e=a.attr("data-from"),k=a.attr("data-to"),b="true"==a.attr("data-auto"),m=a.find("select").first(),h=a.find("select").last(),r=a.find("input.mcw-field").first(),p=a.find("input.mcw-field").last(),l="down",d=a.closest(".cryptoboxes").data("fiat"),q=a.closest(".cryptoboxes").data("crypto"),w="fiat"== e?d:"";d="crypto"==e?"fiat"==k?d:"bitcoin"==m[0].value?"ethereum":"":"fiat"==k?"USD"==d?"EUR":"USD":""!=q?q:"";""!=w&&m[0].selectize.setValue(w);""!=d&&h[0].selectize.setValue(d);r.val(1);c();b?(r.on("input",function(){c()}),p.on("input",function(){g()}),m.change(function(){g();l="up"}),h.change(function(){c();l="down"})):(r.on("input",function(){l="down"}),p.on("input",function(){l="up"}),a.find(".mcw-button").click(function(n){n.preventDefault();"down"==l?c():g()}))})});jQuery(document).on("mcw", ".mcw-card-7",function(){var a=jQuery(this);depp.require("bounty",function(){var c=a.find(".mcw-price"),g=1,e=c.text(),k=1 <=parseFloat(c.attr( "data-price"))?2:1E-6>parseFloat(c.attr("data-price"))?8:6;bounty["default"]({el:c[0],initialValue:e,value:e});window.socket.addEventListener("message",function(b){b=JSON.parse(b.data);if(c.data("live")==b.base&&b.priceUsd!==parseFloat(c.attr("data-price"))){var m=c.attr("data-symbol")+addCommas(parseFloat(b.priceUsd*g).toFixed(k));bounty["default"]({el:c[0], initialValue:e,value:m});e=m;c.attr("data-price",b.priceUsd)}});a.find(".mcw-toggle-switch").click(function(){g=jQuery(this).data("rate");a.find(".mcw-toggle-switch").removeClass("active");jQuery(this).addClass("active");var b=jQuery(this).data("symbol")+addCommas(parseFloat(c.attr("data-price")*g).toFixed(k));bounty["default"]({el:c[0],initialValue:e,value:b});e=b;c.attr("data-symbol",jQuery(this).data("symbol"))})})});jQuery(document).on("mcw",".mcw-box",function(){var a=jQuery(this);a.find("canvas").each(function(){jQuery(this).drawChart()}); a.find(".chart-offset").show();if(a.hasClass("mcw-box-2")){var c=a.find(".mcw-crypto-convert"),g=a.find(".mcw-fiat-convert");a.find("select").change(function(){var e=parseFloat(c.val())*parseFloat(g.val());e=e.toFixed(1 <=e?2:1E-6>e?8:6);a.find(".mcw-price").html(e);e=g.find(":selected").data("prefix");a.find(".mcw-price-symbol").html(e);e=c.find(":selected").data("change");a.find(".mcw-list-change").html(Math.abs(e)+"%");0 <=e?a.find( ".mcw-list-change").toggleClass( "down up"):a.find( ".mcw-list-change").toggleClass( "up down")})}}); jQuery(document).on( "mcw", ".mcw-list",function(){var a=jQuery(this);a.find( "canvas").each(function(){jQuery(this).drawChart()});a.hasClass( "mcw-list-2")&&a.mcwAccordion()});jQuery(document).on( "mcw", ".mcw-multi-tabs",function(){var a=jQuery(this),c=a.find( ".mcw-tab"),g=a.find( ".mcw-tab-content");c.click(function(){var e=jQuery(this).index();c.removeClass( "active");jQuery(this).addClass( "active");g.not( ":eq("+e+ ")").removeClass( "active");g.eq(e).addClass( "active")})});jQuery.fn.multiply=function(a){for(var c=t his.clone(),g=1;g');.5b&&(m+=(100-b)/10*8*k);g.css("animation-duration",e*m/1E3+"s");c.css("visibility","visible");c.hasClass("mcw-header")&&jQuery("body, .navbar-vertical").css("padding-top", c.height()+"px")})});jQuery(".mcw-tr").each(function(){jQuery(this).trigger("mcw")});Array.prototype.unique=function(){return this.filter(function(a,c,g){return g.indexOf(a)===c})};var f=[],u=[];jQuery(".cryptohopper-web-widget").each(function(){f.push(jQuery(this).data("id"));var a=createPostData(this);u.push(a)});0