Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@codersrank/skills-chart

Package Overview
Dependencies
Maintainers
5
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codersrank/skills-chart - npm Package Compare versions

Comparing version 0.9.18 to 0.9.19

2

cjs/shared/fetch-data.js

@@ -11,3 +11,3 @@ "use strict";

var endpoint = "https://api.codersrank.io/v2/users/" + (username || id) + "/tech_score_history";
if (id) endpoint += '?id=true';
if (id) endpoint += '?get_by=id';
return fetch(endpoint, {

@@ -14,0 +14,0 @@ method: 'GET',

/**
* Codersrank Activity Widget 0.9.18
* Codersrank Activity Widget 0.9.19
* undefined

@@ -155,3 +155,3 @@ * https://github.com/codersrank-org/skills-chart-widget#readme

var endpoint = "https://api.codersrank.io/v2/users/" + (username || id) + "/tech_score_history";
if (id) endpoint += '?id=true';
if (id) endpoint += '?get_by=id';
return fetch(endpoint, {

@@ -158,0 +158,0 @@ method: 'GET',

/**
* Codersrank Activity Widget 0.9.18
* Codersrank Activity Widget 0.9.19
* undefined

@@ -13,3 +13,3 @@ * https://github.com/codersrank-org/skills-chart-widget#readme

!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function i(t,e,n){return(i=a()?Reflect.construct:function(t,e,n){var a=[null];a.push.apply(a,e);var i=new(Function.bind.apply(t,a));return n&&r(i,n.prototype),i}).apply(null,arguments)}function s(t){var e="function"==typeof Map?new Map:void 0;return(s=function(t){if(null===t||(a=t,-1===Function.toString.call(a).indexOf("[native code]")))return t;var a;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,s)}function s(){return i(t,arguments,n(this).constructor)}return s.prototype=Object.create(t.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),r(s,t)})(t)}function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var l={},c=function(t){var e=void 0===t?{}:t,n=e.data,r=e.svgWidth,a=e.svgHeight,i=e.legend,s=e.labels,o=e.preloader,l=e.branding,c=e.hiddenDatasets,d=e.highlightedDatasetLabel,h=e.visibleLabels,u=e.currentIndex,f=e.formatLabel,p=n.datasets,g=n.labels,b=function(){var t=function(){var t=[];return p.filter((function(t){return!c.includes(t.label)})).forEach((function(e){e.values.forEach((function(e,n){t[n]||(t[n]=0),t[n]+=e}))})),t}(),e=[];if(!p.length)return e;var n=p[0].values.map((function(){return 0})),i=Math.max.apply(Math,t);return p.filter((function(t){return!c.includes(t.label)})).forEach((function(t){var s=t.label,o=t.values,l=t.color,c=o.map((function(t,e){n[e]+=t;var s=n[e];return e/(o.length-1)*r+" "+(a-s/i*a)}));c.push(r+" "+a+" 0 "+a),e.push({label:s,points:c.join(" "),color:l})})),e.reverse()}(),v=function(){var t=[];if(!p.length)return t;var e=p[0].values;return e.forEach((function(n,a){var i=a/(e.length-1)*r;t.push(i)})),t}();return'\n <div class="codersrank-skills-chart">\n <div class="codersrank-skills-chart-svg">\n <svg\n xmlns="http://www.w3.org/2000/svg"\n width="'+r+'"\n height="'+a+'"\n viewBox="0 0 '+r+" "+a+'"\n preserveAspectRatio="none"\n >\n '+b.map((function(t){return'\n <polygon\n fill="'+t.color+'"\n fillRule="evenodd"\n points="'+t.points+'"\n data-label="'+t.label+'"\n class="'+(d&&d!==t.label?"codersrank-skills-chart-hidden":"")+'"\n />\n '})).join("")+"\n "+v.map((function(t,e){return'\n <line\n data-index="'+e+'"\n fill="#000"\n x1="'+t+'"\n y1="0"\n x2="'+t+'"\n y2="'+a+'"\n class="'+(u===e?"codersrank-skills-chart-current-line":"")+'"\n />\n '})).join("")+"\n </svg>\n "+(o?'\n <div class="codersrank-skills-chart-preloader"></div>\n ':"")+"\n </div>\n "+(s?'\n <div class="codersrank-skills-chart-axis">\n '+g.map((function(t){return"\n <span>\n "+(h.includes(t)?"\n <span>"+f(t)+"</span>\n ":"")+"\n </span>\n "})).join("")+"\n </div>\n ":"")+"\n "+(i?'\n <div class="codersrank-skills-chart-legend">\n '+p.map((function(t){return'\n <button\n data-label="'+t.label+'"\n class="codersrank-skills-chart-legend-button '+(c.includes(t.label)?"codersrank-skills-chart-legend-button-hidden":"")+'"\n type="button"\n >\n <span style="background-color: '+t.color+'"></span>\n '+t.label+"\n </button>\n "})).join("")+"\n </div>\n ":"")+"\n "+(l?'\n <div class="codersrank-skills-chart-branding">\n <a href="https://codersrank.io" target="_blank" rel="noopener noreferrer">\n <span>Powered by </span>\n <svg xmlns="http://www.w3.org/2000/svg" width="258" height="39" viewBox="0 0 258 39"><path fill="#19223C" d="M71.358 27.687A8.076 8.076 0 0 1 69 21.999c0-2.122.846-4.162 2.358-5.687a8.022 8.022 0 0 1 2.664-1.688 8.175 8.175 0 0 1 3.126-.543 8.298 8.298 0 0 1 4.723 1.339 7.155 7.155 0 0 1 2.895 3.791H80.12a3 3 0 0 0-1.182-1.283 3.106 3.106 0 0 0-1.713-.427 4.128 4.128 0 0 0-1.694.264 4.046 4.046 0 0 0-1.43.926 5.197 5.197 0 0 0-1.133 3.234c0 1.17.399 2.309 1.134 3.234.403.405.89.72 1.43.926a4.128 4.128 0 0 0 1.693.264c.586.039 1.17-.087 1.684-.364a3.01 3.01 0 0 0 1.211-1.198h4.571a7.156 7.156 0 0 1-2.895 3.792 8.298 8.298 0 0 1-4.723 1.338 8.173 8.173 0 0 1-3.085-.557 8.02 8.02 0 0 1-2.629-1.673zM88.652 27.687a8.076 8.076 0 0 1-2.359-5.688c0-2.122.846-4.162 2.359-5.687a8.57 8.57 0 0 1 5.79-2.238c2.15 0 4.221.8 5.79 2.238a8.076 8.076 0 0 1 2.358 5.687 8.076 8.076 0 0 1-2.359 5.688 8.491 8.491 0 0 1-5.79 2.266 8.491 8.491 0 0 1-5.79-2.266zm8.837-2.454A5.197 5.197 0 0 0 98.623 22c0-1.17-.4-2.308-1.134-3.234a4.398 4.398 0 0 0-3.048-1.219c-1.14 0-2.234.438-3.047 1.22a5.197 5.197 0 0 0-1.134 3.233c0 1.171.399 2.309 1.134 3.234a4.398 4.398 0 0 0 3.047 1.219c1.14 0 2.235-.438 3.048-1.219zM110.592 14.304a9.126 9.126 0 0 1 6.247 2.156 7.73 7.73 0 0 1 1.8 2.546 7.573 7.573 0 0 1 0 6.06 7.73 7.73 0 0 1-1.8 2.546 9.049 9.049 0 0 1-6.247 2.156h-5.561V14.304h5.561zm-1.752 12.64h1.752a4.596 4.596 0 0 0 1.903-.295 4.504 4.504 0 0 0 1.602-1.044 4.909 4.909 0 0 0 1.295-3.569 4.909 4.909 0 0 0-1.295-3.568 4.504 4.504 0 0 0-1.602-1.044 4.595 4.595 0 0 0-1.903-.294h-1.752v9.813zM131.313 14.23v2.9h-5.714v3.345h5.104v2.9H125.6v3.568h5.714v2.9h-9.599V14.23zM138.55 23.746v6.022h-3.885V14.304h6.247a6.19 6.19 0 0 1 4.266 1.413c.486.418.874.933 1.137 1.51.263.578.395 1.204.387 1.836a4.752 4.752 0 0 1-.838 2.602 4.578 4.578 0 0 1-2.743 1.784l3.885 6.32h-4.418l-3.58-6.023h-.458zm0-6.616v3.717h2.362c.253.01.505-.03.742-.12.236-.09.45-.226.63-.4.175-.178.312-.388.404-.617.091-.23.135-.475.128-.722a1.819 1.819 0 0 0-.128-.721 1.854 1.854 0 0 0-.405-.617 1.833 1.833 0 0 0-.63-.4 1.87 1.87 0 0 0-.741-.12h-2.362zM155.158 17.055a1.86 1.86 0 0 0-1.22.372c-.159.138-.284.311-.363.505-.08.193-.111.402-.093.61a1.528 1.528 0 0 0 .457 1.115c.32.31.712.539 1.143.67l1.523.445 1.676.52 1.524.744c.487.317.881.753 1.143 1.264.31.6.466 1.262.457 1.933a4.227 4.227 0 0 1-.45 1.859 4.333 4.333 0 0 1-1.226 1.487 6.424 6.424 0 0 1-4.343 1.412 6.899 6.899 0 0 1-4.342-1.263 4.331 4.331 0 0 1-1.278-1.588 4.223 4.223 0 0 1-.398-1.981h4.114c-.012.253.032.507.128.742.097.236.244.449.431.625a1.87 1.87 0 0 0 1.421.492c.475.02.94-.14 1.296-.447a1.382 1.382 0 0 0 .457-1.115 1.455 1.455 0 0 0-.457-1.115 2.986 2.986 0 0 0-1.143-.669l-1.524-.446-1.676-.52-1.523-.744a3.148 3.148 0 0 1-1.143-1.264 4 4 0 0 1-.305-1.859 4.15 4.15 0 0 1 .407-1.944 4.258 4.258 0 0 1 1.27-1.55 6.582 6.582 0 0 1 4.19-1.338 6.982 6.982 0 0 1 4.113 1.115 4.33 4.33 0 0 1 1.278 1.588c.292.62.428 1.299.398 1.98h-4.19a2.056 2.056 0 0 0-.533-1.263 1.611 1.611 0 0 0-1.22-.372zM168.261 23.746v6.022h-3.885V14.304h6.247a6.19 6.19 0 0 1 4.266 1.413c.486.418.874.933 1.137 1.51.263.578.395 1.204.387 1.836a4.752 4.752 0 0 1-.838 2.602 4.578 4.578 0 0 1-2.743 1.784l3.885 6.32H172.3l-3.58-6.023h-.458zm0-6.616v3.717h2.362c.253.01.505-.03.742-.12.236-.09.45-.226.63-.4.175-.178.312-.388.404-.617.091-.23.135-.475.128-.722a1.819 1.819 0 0 0-.128-.721 1.854 1.854 0 0 0-.405-.617 1.833 1.833 0 0 0-.63-.4 1.87 1.87 0 0 0-.741-.12h-2.362zM189.592 29.768l-.914-2.602h-5.714l-.914 2.602h-4.114l5.485-15.538h4.723l5.485 15.538h-4.037zm-5.638-5.501h3.733l-1.828-5.428-1.905 5.428zM205.972 14.23h3.885v15.538h-3.885l-6.476-9.813v9.813h-3.885V14.23h3.885l6.476 9.814zM217.093 29.768h-3.885V14.304h3.885v6.766l5.257-6.766h5.104l-6.552 7.732 6.552 7.732h-4.952l-5.333-6.84zM232.863 27.761a1.98 1.98 0 0 1-.5 1.253 2.07 2.07 0 0 1-1.197.664 2.1 2.1 0 0 1-1.359-.222 2.024 2.024 0 0 1-.91-1.01 1.962 1.962 0 0 1-.054-1.342c.141-.44.433-.82.827-1.076a2.096 2.096 0 0 1 2.583.246c.201.194.359.426.464.682.105.256.154.53.146.805z"></path> <path fill="#67a4ac" d="M235.301 29.768V14.304h3.885v15.464zM244.062 27.687a8.076 8.076 0 0 1-2.358-5.688c0-2.122.846-4.162 2.358-5.687a8.57 8.57 0 0 1 5.79-2.238c2.151 0 4.222.8 5.79 2.238A8.076 8.076 0 0 1 258 21.999a8.076 8.076 0 0 1-2.358 5.688 8.491 8.491 0 0 1-5.79 2.266 8.491 8.491 0 0 1-5.79-2.266zm8.837-2.454A5.197 5.197 0 0 0 254.033 22c0-1.17-.399-2.308-1.134-3.234a4.398 4.398 0 0 0-3.047-1.219c-1.14 0-2.235.438-3.047 1.22a5.197 5.197 0 0 0-1.134 3.233c0 1.171.399 2.309 1.134 3.234a4.398 4.398 0 0 0 3.047 1.219c1.14 0 2.235-.438 3.047-1.219z"></path> <path d="M33.25.054L2.147 19.634C.682 20.52-.034 21.512.001 22.611v2.98c.035 1.1.768 2.075 2.2 2.926l15.393 8.885a.726.726 0 0 0 1.047-.373l3.456-8.352-7.33-4.15a1.317 1.317 0 0 1-.514-.477 1.346 1.346 0 0 1 .461-1.864l13.457-8.247L33.72.427a.324.324 0 0 0-.103-.36.31.31 0 0 0-.369-.013z" fill="#19223c"></path> <path d="M58.8 10.961L43.618 1.757a.726.726 0 0 0-1.047.32l-3.56 8.352 7.225 4.31c.208.113.381.282.502.488a1.347 1.347 0 0 1 0 1.363 1.318 1.318 0 0 1-.502.49l-13.561 7.98-5.76 13.407a.323.323 0 0 0 .026.452.312.312 0 0 0 .445-.026l9.949-6.012 3.927 5.64a.947.947 0 0 0 .785.425h9.425a.932.932 0 0 0 .832-.506.97.97 0 0 0-.047-.984l-6.388-9.79 12.933-7.82c1.466-.887 2.199-1.88 2.199-2.98V13.94c0-1.1-.733-2.092-2.2-2.979z" fill="#67a4ac"></path></svg>\n </a>\n </div>\n ':"")+"\n </div>\n "},d={"1C Enterprise":"#814CCC",ABAP:"#E8274B",ActionScript:"#882B0F",Ada:"#02f88c",Agda:"#315665","AGS Script":"#B9D9FF",Alloy:"#64C800",AMPL:"#E6EFBB",AngelScript:"#C7D7DC",ANTLR:"#9DC3FF","API Blueprint":"#2ACCA8",APL:"#5A8164",AppleScript:"#101F1F",Arc:"#aa2afe",ASP:"#6a40fd",AspectJ:"#a957b0",Assembly:"#6E4C13",Asymptote:"#4a0c0c",ATS:"#1ac620",AutoHotkey:"#6594b9",AutoIt:"#1C3552",Ballerina:"#FF5000",Batchfile:"#C1F12E",BlitzMax:"#cd6400",Boo:"#d4bec1",Brainfuck:"#2F2530",C:"#555555","C#":"#178600","C++":"#f34b7d",Ceylon:"#dfa535",Chapel:"#8dc63f",Cirru:"#ccccff",Clarion:"#db901e",Clean:"#3F85AF",Click:"#E4E6F3",Clojure:"#db5855",CoffeeScript:"#244776",ColdFusion:"#ed2cd6","Common Lisp":"#3fb68b","Common Workflow Language":"#B5314C","Component Pascal":"#B0CE4E",Crystal:"#000100",CSS:"#563d7c",Cuda:"#3A4E3A",D:"#ba595e",Dart:"#00B4AB",DataWeave:"#003a52",DM:"#447265",Dockerfile:"#384d54",Dogescript:"#cca760",Dylan:"#6c616e",E:"#ccce35",eC:"#913960",ECL:"#8a1267",Eiffel:"#946d57",Elixir:"#6e4a7e",Elm:"#60B5CC","Emacs Lisp":"#c065db",EmberScript:"#FFF4F3",EQ:"#a78649",Erlang:"#B83998","F#":"#b845fc","F*":"#572e30",Factor:"#636746",Fancy:"#7b9db4",Fantom:"#14253c",FLUX:"#88ccff",Forth:"#341708",Fortran:"#4d41b1",FreeMarker:"#0050b2",Frege:"#00cafe","Game Maker Language":"#71b417",GDScript:"#355570",Genie:"#fb855d",Gherkin:"#5B2063",Glyph:"#c1ac7f",Gnuplot:"#f0a9f0",Go:"#00ADD8",Golo:"#88562A",Gosu:"#82937f","Grammatical Framework":"#79aa7a",Groovy:"#e69f56",Hack:"#878787",Harbour:"#0e60e3",Haskell:"#5e5086",Haxe:"#df7900",HiveQL:"#dce200",HTML:"#e34c26",Hy:"#7790B2",IDL:"#a3522f",Idris:"#b30000",Io:"#a9188d",Ioke:"#078193",Isabelle:"#FEFE00",J:"#9EEDFF",Java:"#b07219",JavaScript:"#f1e05a",Jolie:"#843179",JSONiq:"#40d47e",Jsonnet:"#0064bd",Julia:"#a270ba","Jupyter Notebook":"#DA5B0B",Kotlin:"#F18E33",KRL:"#28430A",Lasso:"#999999",Lex:"#DBCA00",LFE:"#4C3023",LiveScript:"#499886",LLVM:"#185619",LOLCODE:"#cc9900",LookML:"#652B81",LSL:"#3d9970",Lua:"#000080",Makefile:"#427819",Mask:"#f97732",MATLAB:"#e16737",Max:"#c4a79c",MAXScript:"#00a6a6",mcfunction:"#E22837",Mercury:"#ff2b2b",Meson:"#007800",Metal:"#8f14e9",Mirah:"#c7a938","Modula-3":"#223388",MQL4:"#62A8D6",MQL5:"#4A76B8",MTML:"#b7e1f4",NCL:"#28431f",Nearley:"#990000",Nemerle:"#3d3c6e",nesC:"#94B0C7",NetLinx:"#0aa0ff","NetLinx+ERB":"#747faa",NetLogo:"#ff6375",NewLisp:"#87AED7",Nextflow:"#3ac486",Nim:"#37775b",Nit:"#009917",Nix:"#7e7eff",Nu:"#c9df40","Objective-C":"#438eff","Objective-C++":"#6866fb","Objective-J":"#ff0c5a",OCaml:"#3be133",Omgrofl:"#cabbff",ooc:"#b0b77e",Opal:"#f7ede0",Oxygene:"#cdd0e3",Oz:"#fab738",P4:"#7055b5",Pan:"#cc0000",Papyrus:"#6600cc",Parrot:"#f3ca0a",Pascal:"#E3F171",Pawn:"#dbb284",Pep8:"#C76F5B",Perl:"#0298c3","Perl 6":"#0000fb",PHP:"#4F5D95",PigLatin:"#fcd7de",Pike:"#005390",PLSQL:"#dad8d8",PogoScript:"#d80074",PostScript:"#da291c",PowerBuilder:"#8f0f8d",PowerShell:"#012456",Processing:"#0096D8",Prolog:"#74283c","Propeller Spin":"#7fa2a7",Puppet:"#302B6D",PureBasic:"#5a6986",PureScript:"#1D222D",Python:"#3572A5",q:"#0040cd",QML:"#44a51c",Quake:"#882233",R:"#198CE7",Racket:"#3c5caa",Ragel:"#9d5200",RAML:"#77d9fb",Rascal:"#fffaa0",Rebol:"#358a5b",Red:"#f50000","Ren'Py":"#ff7f7f",Ring:"#2D54CB",Roff:"#ecdebe",Rouge:"#cc0088",Ruby:"#701516",RUNOFF:"#665a4e",Rust:"#dea584",SaltStack:"#646464",SAS:"#B34936",Scala:"#c22d40",Scheme:"#1e4aec",sed:"#64b970",Self:"#0579aa",Shell:"#89e051",Shen:"#120F14",Slash:"#007eff",Slice:"#003fa2",Smalltalk:"#596706",Solidity:"#AA6746",SourcePawn:"#5c7611",SQF:"#3F3F3F",Squirrel:"#800000","SRecode Template":"#348a34",Stan:"#b2011d","Standard ML":"#dc566d",SuperCollider:"#46390b",Swift:"#ffac45",SystemVerilog:"#DAE1C2",Tcl:"#e4cc98",Terra:"#00004c",TeX:"#3D6117","TI Program":"#A0AA87",Turing:"#cf142b",TypeScript:"#2b7489",UnrealScript:"#a54c4d",Vala:"#fbe5cd",VCL:"#148AA8",Verilog:"#b2b7f8",VHDL:"#adb2cb","Vim script":"#199f4b","Visual Basic":"#945db7",Volt:"#1F1F1F",Vue:"#2c3e50",wdl:"#42f1f4",WebAssembly:"#04133b",wisp:"#7582D1",X10:"#4B6BEF",xBase:"#403a40",XC:"#99DA07",XQuery:"#5232e7",XSLT:"#EB8CEB",Yacc:"#4B6C4B",YARA:"#220000",YASnippet:"#32AB90",ZAP:"#0d665e",Zephir:"#118f9e",Zig:"#ec915c",ZIL:"#dc75e5",Other:"#bbb"},h={"#76CA61":"#fff","#24565A":"#fff","#FDD835":"#000","#50B0BA":"#fff","#FF5858":"#fff","#B0753F":"#fff","#25CDEB":"#000","#387EED":"#fff","#ED3DC6":"#fff","#512DA8":"#fff"};var u=function(t){return d[t]?d[t]:function(t,e){void 0===t&&(t=""),void 0===e&&(e=!0);var n,r,a=(n=function(t){for(var e=0,n=0;n<t.length;n+=1)e=t.charCodeAt(n)+((e<<5)-e);return e}(t),r=(16777215&n).toString(16).toUpperCase(),"00000".substring(0,6-r.length)+r);if(!e)return("#"+a).toLowerCase();var i=parseInt(a,16),s=Object.keys(h).map((function(t){return parseInt(t.replace("#",""),16)})).reduce((function(t,e){return Math.abs(e-i)<Math.abs(t-i)?e:t})).toString(16);return["#"+s,h["#"+s.toUpperCase()]]}(t,!1)},f=function(t){return Math.round(t)},p="codersrank-skills-chart",g=function(n){var r,a;function i(){var t;return(t=n.call(this)||this).tempDiv=document.createElement("div"),t.shadowEl=t.attachShadow({mode:"closed"}),t.stylesEl=document.createElement("style"),t.stylesEl.textContent=":host{--font-family:Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif;--svg-width:100%;--svg-height:auto;--axis-bg-color:rgba(0, 0, 0, 0.35);--hidden-area-color:#ddd;--label-text-color:inherit;--label-font-size:10px;--label-font-weight:500;--label-white-space:nowrap;--legend-text-color:inherit;--legend-disabled-text-color:#ccc;--legend-font-size:14px;--preloader-color:#72a0a8;--tooltip-font-size:12px;--tooltip-total-font-size:16px;--tooltip-total-font-weight:bold;--other-skills-area-color:#bbb;--chart-bg-color:transparent;--chart-border-radius:0px;--branding-text-color:inherit;width:100%;display:block;position:relative;box-sizing:border-box}.codersrank-skills-chart{font-family:var(--font-family);position:relative}.codersrank-skills-chart-preloader{position:absolute;left:50%;top:50%;width:32px;height:32px;margin:-16px 0 0 -16px;border:3px solid var(--preloader-color);border-left-color:transparent;border-bottom-color:transparent;border-radius:50%;box-sizing:border-box;-webkit-animation:preloader 1s infinite linear;animation:preloader 1s infinite linear}.codersrank-skills-chart-svg{position:relative}.codersrank-skills-chart svg{width:var(--svg-width);height:var(--svg-height);display:block;background-color:var(--chart-bg-color);border-radius:var(--chart-border-radius)}.codersrank-skills-chart polygon{transition-duration:150ms}.codersrank-skills-chart-current-line{stroke:rgba(0,0,0,.25);stroke-width:1px}.codersrank-skills-chart-hidden{fill:var(--hidden-area-color)!important}.codersrank-skills-chart-axis{margin-bottom:36px;height:1px;background:var(--axis-bg-color);color:inherit;display:flex;font-size:var(--label-font-size);font-weight:var(--label-font-weight);justify-content:space-between;line-height:1;color:var(--label-text-color)}.codersrank-skills-chart-axis>span{padding-top:10px;width:0;display:flex;align-items:flex-start;justify-content:center;white-space:var(--label-white-space)}.codersrank-skills-chart-axis>span:first-child{justify-content:flex-start}.codersrank-skills-chart-axis>span:last-child{justify-content:flex-end}.codersrank-skills-chart-tooltip{pointer-events:none;text-align:left;line-height:1.4;position:absolute;background:#000;border-radius:4px;color:#fff;font-family:var(--font-family);padding:8px;font-size:var(--tooltip-font-size);white-space:nowrap;pointer-events:none;top:50%;transform:translateX(-100%) translateY(-50%);margin-left:-10px}.codersrank-skills-chart-tooltip-right{margin-left:10px;transform:translateY(-50%)}.codersrank-skills-chart-tooltip-label{color:rgba(255,255,255,.75)}.codersrank-skills-chart-tooltip-total{font-size:var(--tooltip-total-font-size);font-weight:var(--tooltip-total-font-weight)}.codersrank-skills-chart-tooltip-list{list-style:none;margin:0;padding:0}.codersrank-skills-chart-tooltip-list span{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:4px}.codersrank-skills-chart-legend{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;font-size:var(--legend-font-size);width:100%;color:var(--legend-text-color);margin-top:36px}.codersrank-skills-chart-legend-button{color:inherit;width:auto;-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;background-color:transparent;border-radius:0;border:none;outline:0!important;cursor:pointer;font-family:inherit;font-size:inherit;box-shadow:none!important;display:flex;align-items:center;font-weight:500;transition-duration:.2s;padding:4px 8px}.codersrank-skills-chart-legend-button span{transition-duration:.2s;width:14px;height:14px;margin-right:4px;border-radius:50%}.codersrank-skills-chart-legend-button-hidden{color:var(--legend-disabled-text-color)}.codersrank-skills-chart-legend-button-hidden span{background-color:var(--legend-disabled-text-color)!important}.codersrank-skills-chart-branding{font-size:12px;color:var(--branding-text-color);position:absolute;left:0;top:0}.codersrank-skills-chart-branding a{opacity:.5;display:flex;align-items:center;color:inherit;text-decoration:none;transition-duration:.2s;position:relative;z-index:1;transform:translate3d(0,0,0)}.codersrank-skills-chart-branding a:hover{opacity:1}.codersrank-skills-chart-branding span{margin-right:4px}.codersrank-skills-chart-branding svg{height:16px;width:auto}@-webkit-keyframes preloader{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes preloader{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}",t.shadowEl.appendChild(t.stylesEl),t.onMouseEnter=t.onMouseEnter.bind(o(t)),t.onMouseLeave=t.onMouseLeave.bind(o(t)),t.onClick=t.onClick.bind(o(t)),t.formatLabel=t.formatLabel.bind(o(t)),t.onSVGMouseEnter=t.onSVGMouseEnter.bind(o(t)),t.onSVGMouseMove=t.onSVGMouseMove.bind(o(t)),t.onSVGMouseLeave=t.onSVGMouseLeave.bind(o(t)),t.linesOffsets=[],t.currentIndex=null,t.activeSkillsSet=!1,t.hiddenDatasets=[],t.highlightedDatasetLabel=null,t.highlightedDatasetTimeout=null,t.mounted=!1,t.state=0,t.data={labels:[],datasets:[]},t}a=n,(r=i).prototype=Object.create(a.prototype),r.prototype.constructor=r,r.__proto__=a;var s,d,h,p=i.prototype;return p.getHighestScore=function(t){var e=0,n=null;return t.forEach((function(t){var r=0;t.languages.forEach((function(t){r+=t.score})),r>e&&(e=r,n=t.date)})),{score:e,date:n}},p.emitData=function(t){void 0===t&&(t={});var e=t.scores||{},n=new CustomEvent("data",{detail:{scores:e,highest:this.getHighestScore(e)}});this.dispatchEvent(n)},p.emitError=function(t){var e=new CustomEvent("error",{detail:t});this.dispatchEvent(e)},p.formatLabel=function(t){return t?Intl.DateTimeFormat("en",{year:"numeric",month:"short"}).format(new Date(t)):""},p.render=function(){var t=this.username,n=this.id,r=this.mounted,a=this.state,i=this.shadowEl,s=this.data,o=this.svgWidth,l=this.svgHeight,d=this.legend,h=this.labels,u=this.branding,f=this.hiddenDatasets,p=this.highlightedDatasetLabel,g=this.visibleLabels,b=this.currentIndex,v=this.formatLabel,k=this.tempDiv,m={data:s,svgWidth:o,svgHeight:l,legend:d,labels:h,branding:u,hiddenDatasets:f,highlightedDatasetLabel:p,visibleLabels:g,currentIndex:b,formatLabel:v};if(this.detachSVGEvents(),(t||n)&&r){3===a?k.innerHTML=c(m):2===a?k.innerHTML="":0!==a&&1!==a||(k.innerHTML=function(t){return c(e({},t,{preloader:!0,data:{labels:[],datasets:[]}}))}(m));var y=i.querySelector(".codersrank-skills-chart");y&&y.parentNode.removeChild(y),(y=k.querySelector(".codersrank-skills-chart"))&&(this.widgetEl=y,i.appendChild(y),this.attachSVGEvents())}},p.loadAndRender=function(){var t=this,e=this.username,n=this.id;this.state=1,this.render(),function(t,e){if(t&&l[t])return Promise.resolve(l[t]);if(e&&l[e])return Promise.resolve(l[e]);var n="https://api.codersrank.io/v2/users/"+(t||e)+"/tech_score_history";return e&&(n+="?id=true"),fetch(n,{method:"GET",headers:{"Content-Type":"application/json"}}).then((function(t){return t.json()})).then((function(n){return n&&400===n.code?Promise.reject(n):(e?l[e]=n:l[t]=n,n)})).catch((function(t){return Promise.reject(t)}))}(e,n).then((function(e){t.emitData(e),t.data=function(t,e,n){void 0===t&&(t=[]),void 0===e&&(e=[]),void 0===n&&(n=!1);var r=[].concat(t),a=[];r.forEach((function(t){t.languages.forEach((function(t){e.length>0&&!e.map((function(t){return t.toLowerCase()})).includes(t.language.toLowerCase())||a.includes(t.language)||a.push(t.language)}))}));var i,s=r.map((function(t){return t.date})),o=a.map((function(t){var e=[];return r.forEach((function(n){var r=n.languages.filter((function(e){return e.language===t}))[0];e.push(r?r.score:0)})),{label:t,color:u(t),values:e}}));if(n){var l=[];r.forEach((function(t){var e=0;t.languages.forEach((function(t){a.includes(t.language)||(e+=t.score)})),l.push(e)})),i={label:"Other",color:"var(--other-skills-area-color)",values:l}}return o.sort((function(t,e){return t.label>e.label?1:-1})),i&&o.push(i),{labels:s,datasets:o}}(e.scores,t.displaySkills,t.showOtherSkills),t.activeSkills&&t.activeSkills.length&&!t.activeSkillsSet&&(t.hiddenDatasets=t.data.datasets.map((function(t){return t.label})).filter((function(e){return t.activeSkills.indexOf(e)<0})),t.activeSkillsSet=!0),t.state=3,t.render()})).catch((function(e){t.emitError(e),t.state=2,t.render()}))},p.tooltipText=function(){var t=this,e=this.currentIndex,n=this.data,r=n.datasets,a=n.labels;if(null===e)return"";var i=0,s=r.filter((function(n){return!t.hiddenDatasets.includes(n.label)&&n.values[e]})).map((function(t){return{color:t.color,label:t.label,value:t.values[e]}}));return s.forEach((function(t){i+=t.value})),'\n <div class="codersrank-skills-chart-tooltip-label">'+this.formatLabel(a[e])+'</div>\n <div class="codersrank-skills-chart-tooltip-total">'+(f(i)+" exp. points")+"</div>\n "+(s.length>0?'\n <ul class="codersrank-skills-chart-tooltip-list">\n '+s.map((function(t){var e=t.label,n=t.color,r=t.value;return'\n <li><span style="background-color: '+n+';"></span>'+(e+": "+f(r))+"</li>\n "})).join("")+"\n </ul>":"")+"\n "},p.showTooltip=function(){var t=this;if(this.tooltip)if(this.data.datasets.filter((function(e){return!t.hiddenDatasets.includes(e.label)})).length){var e=this.shadowEl.querySelector(".codersrank-skills-chart-current-line");e&&e.classList.remove("codersrank-skills-chart-current-line");var n=this.shadowEl.querySelector('line[data-index="'+this.currentIndex+'"]');if(n){n.classList.add("codersrank-skills-chart-current-line");var r=this.widgetEl.querySelector(".codersrank-skills-chart-tooltip");r?r.innerHTML=this.tooltipText():(this.tempDiv.innerHTML='\n <div class="codersrank-skills-chart-tooltip">\n '+this.tooltipText()+"\n </div>\n ",r=this.tempDiv.querySelector(".codersrank-skills-chart-tooltip"),this.widgetEl.querySelector(".codersrank-skills-chart-svg").appendChild(r));var a=this.widgetEl.getBoundingClientRect(),i=n.getBoundingClientRect().left-a.left;i<180?r.classList.add("codersrank-skills-chart-tooltip-right"):r.classList.remove("codersrank-skills-chart-tooltip-right"),r.style.left=i+"px"}}else this.hideTooltip()},p.hideTooltip=function(){if(this.tooltip){var t=this.shadowEl.querySelector(".codersrank-skills-chart-current-line");t&&t.classList.remove("codersrank-skills-chart-current-line");var e=this.shadowEl.querySelector(".codersrank-skills-chart-tooltip");e&&this.widgetEl.querySelector(".codersrank-skills-chart-svg").removeChild(e)}},p.toggleDataset=function(t){this.highlightedDatasetLabel=null,this.hiddenDatasets.includes(t)?this.hiddenDatasets.splice(this.hiddenDatasets.indexOf(t),1):(this.hiddenDatasets.push(t),this.highlightedDatasetLabel=null),this.render()},p.onClick=function(t){var e;if("BUTTON"===t.target.tagName?e=t.target:t.target.parentNode&&"BUTTON"===t.target.parentNode.tagName&&(e=t.target.parentNode),e){var n=e.getAttribute("data-label");this.toggleDataset(n)}},p.onMouseEnter=function(t){var e,n=this;if(this.widgetEl&&("BUTTON"===t.target.tagName&&(e=t.target),e)){var r=e.getAttribute("data-label");if(r){var a=this.widgetEl.querySelector('polygon[data-label="'+r+'"]');a&&(clearTimeout(this.highlightedDatasetTimeout),this.highlightedDatasetTimeout=setTimeout((function(){n.highlightedDatasetLabel=r;for(var t=n.widgetEl.querySelectorAll("polygon"),e=0;e<t.length;e+=1)t[e].classList.add("codersrank-skills-chart-hidden");a.classList.remove("codersrank-skills-chart-hidden")}),100))}}},p.onMouseLeave=function(t){var e=this;"BUTTON"===t.target.tagName&&(this.highlightedDatasetTimeout=setTimeout((function(){if(e.widgetEl){var t=e.widgetEl.querySelectorAll("polygon");if(t)for(var n=0;n<t.length;n+=1)t[n].classList.remove("codersrank-skills-chart-hidden")}}),100))},p.calcLinesOffsets=function(){var t=this.widgetEl.querySelectorAll("line");this.linesOffsets=[];for(var e=0;e<t.length;e+=1)this.linesOffsets.push(t[e].getBoundingClientRect().left)},p.onSVGMouseEnter=function(){this.tooltip&&this.calcLinesOffsets()},p.onSVGMouseMove=function(t){if(this.tooltip){var e=t.pageX;void 0===e&&(e=0);var n=this.linesOffsets.map((function(t){return Math.abs(e-t)})),r=Math.min.apply(Math,n),a=n.indexOf(r);this.currentIndex=a,this.showTooltip()}},p.onSVGMouseLeave=function(){this.tooltip&&(this.currentIndex=null,this.hideTooltip())},p.attachSVGEvents=function(){if(this.widgetEl){var t=this.widgetEl.querySelector("svg");t&&(t.addEventListener("mouseenter",this.onSVGMouseEnter),t.addEventListener("mousemove",this.onSVGMouseMove),t.addEventListener("mouseleave",this.onSVGMouseLeave))}},p.detachSVGEvents=function(){if(this.widgetEl){var t=this.widgetEl.querySelector("svg");t&&(t.removeEventListener("mouseenter",this.onSVGMouseEnter),t.removeEventListener("mousemove",this.onSVGMouseMove),t.removeEventListener("mouseleave",this.onSVGMouseLeave))}},p.attributeChangedCallback=function(){this.mounted&&this.loadAndRender()},p.connectedCallback=function(){this.width=this.offsetWidth,this.mounted=!0,this.loadAndRender(),this.shadowEl.addEventListener("click",this.onClick,!0),this.shadowEl.addEventListener("mouseenter",this.onMouseEnter,!0),this.shadowEl.addEventListener("mouseleave",this.onMouseLeave,!0)},p.disconnectedCallback=function(){this.mounted=!1,this.shadowEl.removeEventListener("click",this.onClick),this.shadowEl.removeEventListener("mouseenter",this.onMouseEnter),this.shadowEl.removeEventListener("mouseleave",this.onMouseLeave),this.detachSVGEvents()},s=i,h=[{key:"observedAttributes",get:function(){return["username","id","max-labels","svg-width","svg-height","legend","labels","skills","active-skills","show-other-skills"]}}],(d=[{key:"visibleLabels",get:function(){if(!this.maxLabels||this.data.labels.length<=this.maxLabels)return this.data.labels;var t=Math.ceil(this.data.labels.length/this.maxLabels);return this.data.labels.filter((function(e,n){return n%t==0}))}},{key:"displaySkills",get:function(){var t=this.getAttribute("skills")||"";return"string"!=typeof t?[]:t.split(",").map((function(t){return t.trim()})).filter((function(t){return!!t}))}},{key:"skills",set:function(t){this.setAttribute("skills",t)}},{key:"activeSkills",get:function(){var t=this.getAttribute("active-skills")||"";return"string"!=typeof t?[]:t.split(",").map((function(t){return t.trim()})).filter((function(t){return!!t}))},set:function(t){this.setAttribute("active-skills",t)}},{key:"active-skills",set:function(t){this.setAttribute("active-skills",t)}},{key:"showOtherSkills",get:function(){var t=this.getAttribute("show-other-skills");return""===t||"true"===t},set:function(t){this.setAttribute("show-other-skills",t)}},{key:"show-other-skills",set:function(t){this.setAttribute("show-other-skills",t)}},{key:"tooltip",get:function(){var t=this.getAttribute("tooltip");return""===t||"true"===t},set:function(t){this.setAttribute("tooltip",t)}},{key:"username",get:function(){return this.getAttribute("username")},set:function(t){this.setAttribute("username",t)}},{key:"id",get:function(){return this.getAttribute("id")},set:function(t){this.setAttribute("id",t)}},{key:"maxLabels",get:function(){return parseInt(this.getAttribute("max-labels")||0,10)||8},set:function(t){this.setAttribute("max-labels",t)}},{key:"max-labels",set:function(t){this.setAttribute("max-labels",t)}},{key:"svgWidth",get:function(){return parseInt(this.getAttribute("svg-width")||0,10)||640},set:function(t){this.setAttribute("svg-width",t)}},{key:"svg-width",set:function(t){this.setAttribute("svg-width",t)}},{key:"svgHeight",get:function(){return parseInt(this.getAttribute("svg-height")||0,10)||320},set:function(t){this.setAttribute("svg-height",t)}},{key:"svg-height",set:function(t){this.setAttribute("svg-height",t)}},{key:"legend",get:function(){var t=this.getAttribute("legend");return""===t||"true"===t},set:function(t){this.setAttribute("legend",t)}},{key:"labels",get:function(){var t=this.getAttribute("labels");return""===t||"true"===t},set:function(t){this.setAttribute("labels",t)}},{key:"branding",get:function(){return"false"!==this.getAttribute("branding")},set:function(t){this.setAttribute("branding",t)}}])&&t(s.prototype,d),h&&t(s,h),i}(s(HTMLElement));window.customElements&&!window.customElements.get(p)&&window.customElements.define(p,g)}));
!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function i(t,e,n){return(i=a()?Reflect.construct:function(t,e,n){var a=[null];a.push.apply(a,e);var i=new(Function.bind.apply(t,a));return n&&r(i,n.prototype),i}).apply(null,arguments)}function s(t){var e="function"==typeof Map?new Map:void 0;return(s=function(t){if(null===t||(a=t,-1===Function.toString.call(a).indexOf("[native code]")))return t;var a;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,s)}function s(){return i(t,arguments,n(this).constructor)}return s.prototype=Object.create(t.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),r(s,t)})(t)}function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var l={},c=function(t){var e=void 0===t?{}:t,n=e.data,r=e.svgWidth,a=e.svgHeight,i=e.legend,s=e.labels,o=e.preloader,l=e.branding,c=e.hiddenDatasets,d=e.highlightedDatasetLabel,h=e.visibleLabels,u=e.currentIndex,f=e.formatLabel,p=n.datasets,g=n.labels,b=function(){var t=function(){var t=[];return p.filter((function(t){return!c.includes(t.label)})).forEach((function(e){e.values.forEach((function(e,n){t[n]||(t[n]=0),t[n]+=e}))})),t}(),e=[];if(!p.length)return e;var n=p[0].values.map((function(){return 0})),i=Math.max.apply(Math,t);return p.filter((function(t){return!c.includes(t.label)})).forEach((function(t){var s=t.label,o=t.values,l=t.color,c=o.map((function(t,e){n[e]+=t;var s=n[e];return e/(o.length-1)*r+" "+(a-s/i*a)}));c.push(r+" "+a+" 0 "+a),e.push({label:s,points:c.join(" "),color:l})})),e.reverse()}(),v=function(){var t=[];if(!p.length)return t;var e=p[0].values;return e.forEach((function(n,a){var i=a/(e.length-1)*r;t.push(i)})),t}();return'\n <div class="codersrank-skills-chart">\n <div class="codersrank-skills-chart-svg">\n <svg\n xmlns="http://www.w3.org/2000/svg"\n width="'+r+'"\n height="'+a+'"\n viewBox="0 0 '+r+" "+a+'"\n preserveAspectRatio="none"\n >\n '+b.map((function(t){return'\n <polygon\n fill="'+t.color+'"\n fillRule="evenodd"\n points="'+t.points+'"\n data-label="'+t.label+'"\n class="'+(d&&d!==t.label?"codersrank-skills-chart-hidden":"")+'"\n />\n '})).join("")+"\n "+v.map((function(t,e){return'\n <line\n data-index="'+e+'"\n fill="#000"\n x1="'+t+'"\n y1="0"\n x2="'+t+'"\n y2="'+a+'"\n class="'+(u===e?"codersrank-skills-chart-current-line":"")+'"\n />\n '})).join("")+"\n </svg>\n "+(o?'\n <div class="codersrank-skills-chart-preloader"></div>\n ':"")+"\n </div>\n "+(s?'\n <div class="codersrank-skills-chart-axis">\n '+g.map((function(t){return"\n <span>\n "+(h.includes(t)?"\n <span>"+f(t)+"</span>\n ":"")+"\n </span>\n "})).join("")+"\n </div>\n ":"")+"\n "+(i?'\n <div class="codersrank-skills-chart-legend">\n '+p.map((function(t){return'\n <button\n data-label="'+t.label+'"\n class="codersrank-skills-chart-legend-button '+(c.includes(t.label)?"codersrank-skills-chart-legend-button-hidden":"")+'"\n type="button"\n >\n <span style="background-color: '+t.color+'"></span>\n '+t.label+"\n </button>\n "})).join("")+"\n </div>\n ":"")+"\n "+(l?'\n <div class="codersrank-skills-chart-branding">\n <a href="https://codersrank.io" target="_blank" rel="noopener noreferrer">\n <span>Powered by </span>\n <svg xmlns="http://www.w3.org/2000/svg" width="258" height="39" viewBox="0 0 258 39"><path fill="#19223C" d="M71.358 27.687A8.076 8.076 0 0 1 69 21.999c0-2.122.846-4.162 2.358-5.687a8.022 8.022 0 0 1 2.664-1.688 8.175 8.175 0 0 1 3.126-.543 8.298 8.298 0 0 1 4.723 1.339 7.155 7.155 0 0 1 2.895 3.791H80.12a3 3 0 0 0-1.182-1.283 3.106 3.106 0 0 0-1.713-.427 4.128 4.128 0 0 0-1.694.264 4.046 4.046 0 0 0-1.43.926 5.197 5.197 0 0 0-1.133 3.234c0 1.17.399 2.309 1.134 3.234.403.405.89.72 1.43.926a4.128 4.128 0 0 0 1.693.264c.586.039 1.17-.087 1.684-.364a3.01 3.01 0 0 0 1.211-1.198h4.571a7.156 7.156 0 0 1-2.895 3.792 8.298 8.298 0 0 1-4.723 1.338 8.173 8.173 0 0 1-3.085-.557 8.02 8.02 0 0 1-2.629-1.673zM88.652 27.687a8.076 8.076 0 0 1-2.359-5.688c0-2.122.846-4.162 2.359-5.687a8.57 8.57 0 0 1 5.79-2.238c2.15 0 4.221.8 5.79 2.238a8.076 8.076 0 0 1 2.358 5.687 8.076 8.076 0 0 1-2.359 5.688 8.491 8.491 0 0 1-5.79 2.266 8.491 8.491 0 0 1-5.79-2.266zm8.837-2.454A5.197 5.197 0 0 0 98.623 22c0-1.17-.4-2.308-1.134-3.234a4.398 4.398 0 0 0-3.048-1.219c-1.14 0-2.234.438-3.047 1.22a5.197 5.197 0 0 0-1.134 3.233c0 1.171.399 2.309 1.134 3.234a4.398 4.398 0 0 0 3.047 1.219c1.14 0 2.235-.438 3.048-1.219zM110.592 14.304a9.126 9.126 0 0 1 6.247 2.156 7.73 7.73 0 0 1 1.8 2.546 7.573 7.573 0 0 1 0 6.06 7.73 7.73 0 0 1-1.8 2.546 9.049 9.049 0 0 1-6.247 2.156h-5.561V14.304h5.561zm-1.752 12.64h1.752a4.596 4.596 0 0 0 1.903-.295 4.504 4.504 0 0 0 1.602-1.044 4.909 4.909 0 0 0 1.295-3.569 4.909 4.909 0 0 0-1.295-3.568 4.504 4.504 0 0 0-1.602-1.044 4.595 4.595 0 0 0-1.903-.294h-1.752v9.813zM131.313 14.23v2.9h-5.714v3.345h5.104v2.9H125.6v3.568h5.714v2.9h-9.599V14.23zM138.55 23.746v6.022h-3.885V14.304h6.247a6.19 6.19 0 0 1 4.266 1.413c.486.418.874.933 1.137 1.51.263.578.395 1.204.387 1.836a4.752 4.752 0 0 1-.838 2.602 4.578 4.578 0 0 1-2.743 1.784l3.885 6.32h-4.418l-3.58-6.023h-.458zm0-6.616v3.717h2.362c.253.01.505-.03.742-.12.236-.09.45-.226.63-.4.175-.178.312-.388.404-.617.091-.23.135-.475.128-.722a1.819 1.819 0 0 0-.128-.721 1.854 1.854 0 0 0-.405-.617 1.833 1.833 0 0 0-.63-.4 1.87 1.87 0 0 0-.741-.12h-2.362zM155.158 17.055a1.86 1.86 0 0 0-1.22.372c-.159.138-.284.311-.363.505-.08.193-.111.402-.093.61a1.528 1.528 0 0 0 .457 1.115c.32.31.712.539 1.143.67l1.523.445 1.676.52 1.524.744c.487.317.881.753 1.143 1.264.31.6.466 1.262.457 1.933a4.227 4.227 0 0 1-.45 1.859 4.333 4.333 0 0 1-1.226 1.487 6.424 6.424 0 0 1-4.343 1.412 6.899 6.899 0 0 1-4.342-1.263 4.331 4.331 0 0 1-1.278-1.588 4.223 4.223 0 0 1-.398-1.981h4.114c-.012.253.032.507.128.742.097.236.244.449.431.625a1.87 1.87 0 0 0 1.421.492c.475.02.94-.14 1.296-.447a1.382 1.382 0 0 0 .457-1.115 1.455 1.455 0 0 0-.457-1.115 2.986 2.986 0 0 0-1.143-.669l-1.524-.446-1.676-.52-1.523-.744a3.148 3.148 0 0 1-1.143-1.264 4 4 0 0 1-.305-1.859 4.15 4.15 0 0 1 .407-1.944 4.258 4.258 0 0 1 1.27-1.55 6.582 6.582 0 0 1 4.19-1.338 6.982 6.982 0 0 1 4.113 1.115 4.33 4.33 0 0 1 1.278 1.588c.292.62.428 1.299.398 1.98h-4.19a2.056 2.056 0 0 0-.533-1.263 1.611 1.611 0 0 0-1.22-.372zM168.261 23.746v6.022h-3.885V14.304h6.247a6.19 6.19 0 0 1 4.266 1.413c.486.418.874.933 1.137 1.51.263.578.395 1.204.387 1.836a4.752 4.752 0 0 1-.838 2.602 4.578 4.578 0 0 1-2.743 1.784l3.885 6.32H172.3l-3.58-6.023h-.458zm0-6.616v3.717h2.362c.253.01.505-.03.742-.12.236-.09.45-.226.63-.4.175-.178.312-.388.404-.617.091-.23.135-.475.128-.722a1.819 1.819 0 0 0-.128-.721 1.854 1.854 0 0 0-.405-.617 1.833 1.833 0 0 0-.63-.4 1.87 1.87 0 0 0-.741-.12h-2.362zM189.592 29.768l-.914-2.602h-5.714l-.914 2.602h-4.114l5.485-15.538h4.723l5.485 15.538h-4.037zm-5.638-5.501h3.733l-1.828-5.428-1.905 5.428zM205.972 14.23h3.885v15.538h-3.885l-6.476-9.813v9.813h-3.885V14.23h3.885l6.476 9.814zM217.093 29.768h-3.885V14.304h3.885v6.766l5.257-6.766h5.104l-6.552 7.732 6.552 7.732h-4.952l-5.333-6.84zM232.863 27.761a1.98 1.98 0 0 1-.5 1.253 2.07 2.07 0 0 1-1.197.664 2.1 2.1 0 0 1-1.359-.222 2.024 2.024 0 0 1-.91-1.01 1.962 1.962 0 0 1-.054-1.342c.141-.44.433-.82.827-1.076a2.096 2.096 0 0 1 2.583.246c.201.194.359.426.464.682.105.256.154.53.146.805z"></path> <path fill="#67a4ac" d="M235.301 29.768V14.304h3.885v15.464zM244.062 27.687a8.076 8.076 0 0 1-2.358-5.688c0-2.122.846-4.162 2.358-5.687a8.57 8.57 0 0 1 5.79-2.238c2.151 0 4.222.8 5.79 2.238A8.076 8.076 0 0 1 258 21.999a8.076 8.076 0 0 1-2.358 5.688 8.491 8.491 0 0 1-5.79 2.266 8.491 8.491 0 0 1-5.79-2.266zm8.837-2.454A5.197 5.197 0 0 0 254.033 22c0-1.17-.399-2.308-1.134-3.234a4.398 4.398 0 0 0-3.047-1.219c-1.14 0-2.235.438-3.047 1.22a5.197 5.197 0 0 0-1.134 3.233c0 1.171.399 2.309 1.134 3.234a4.398 4.398 0 0 0 3.047 1.219c1.14 0 2.235-.438 3.047-1.219z"></path> <path d="M33.25.054L2.147 19.634C.682 20.52-.034 21.512.001 22.611v2.98c.035 1.1.768 2.075 2.2 2.926l15.393 8.885a.726.726 0 0 0 1.047-.373l3.456-8.352-7.33-4.15a1.317 1.317 0 0 1-.514-.477 1.346 1.346 0 0 1 .461-1.864l13.457-8.247L33.72.427a.324.324 0 0 0-.103-.36.31.31 0 0 0-.369-.013z" fill="#19223c"></path> <path d="M58.8 10.961L43.618 1.757a.726.726 0 0 0-1.047.32l-3.56 8.352 7.225 4.31c.208.113.381.282.502.488a1.347 1.347 0 0 1 0 1.363 1.318 1.318 0 0 1-.502.49l-13.561 7.98-5.76 13.407a.323.323 0 0 0 .026.452.312.312 0 0 0 .445-.026l9.949-6.012 3.927 5.64a.947.947 0 0 0 .785.425h9.425a.932.932 0 0 0 .832-.506.97.97 0 0 0-.047-.984l-6.388-9.79 12.933-7.82c1.466-.887 2.199-1.88 2.199-2.98V13.94c0-1.1-.733-2.092-2.2-2.979z" fill="#67a4ac"></path></svg>\n </a>\n </div>\n ':"")+"\n </div>\n "},d={"1C Enterprise":"#814CCC",ABAP:"#E8274B",ActionScript:"#882B0F",Ada:"#02f88c",Agda:"#315665","AGS Script":"#B9D9FF",Alloy:"#64C800",AMPL:"#E6EFBB",AngelScript:"#C7D7DC",ANTLR:"#9DC3FF","API Blueprint":"#2ACCA8",APL:"#5A8164",AppleScript:"#101F1F",Arc:"#aa2afe",ASP:"#6a40fd",AspectJ:"#a957b0",Assembly:"#6E4C13",Asymptote:"#4a0c0c",ATS:"#1ac620",AutoHotkey:"#6594b9",AutoIt:"#1C3552",Ballerina:"#FF5000",Batchfile:"#C1F12E",BlitzMax:"#cd6400",Boo:"#d4bec1",Brainfuck:"#2F2530",C:"#555555","C#":"#178600","C++":"#f34b7d",Ceylon:"#dfa535",Chapel:"#8dc63f",Cirru:"#ccccff",Clarion:"#db901e",Clean:"#3F85AF",Click:"#E4E6F3",Clojure:"#db5855",CoffeeScript:"#244776",ColdFusion:"#ed2cd6","Common Lisp":"#3fb68b","Common Workflow Language":"#B5314C","Component Pascal":"#B0CE4E",Crystal:"#000100",CSS:"#563d7c",Cuda:"#3A4E3A",D:"#ba595e",Dart:"#00B4AB",DataWeave:"#003a52",DM:"#447265",Dockerfile:"#384d54",Dogescript:"#cca760",Dylan:"#6c616e",E:"#ccce35",eC:"#913960",ECL:"#8a1267",Eiffel:"#946d57",Elixir:"#6e4a7e",Elm:"#60B5CC","Emacs Lisp":"#c065db",EmberScript:"#FFF4F3",EQ:"#a78649",Erlang:"#B83998","F#":"#b845fc","F*":"#572e30",Factor:"#636746",Fancy:"#7b9db4",Fantom:"#14253c",FLUX:"#88ccff",Forth:"#341708",Fortran:"#4d41b1",FreeMarker:"#0050b2",Frege:"#00cafe","Game Maker Language":"#71b417",GDScript:"#355570",Genie:"#fb855d",Gherkin:"#5B2063",Glyph:"#c1ac7f",Gnuplot:"#f0a9f0",Go:"#00ADD8",Golo:"#88562A",Gosu:"#82937f","Grammatical Framework":"#79aa7a",Groovy:"#e69f56",Hack:"#878787",Harbour:"#0e60e3",Haskell:"#5e5086",Haxe:"#df7900",HiveQL:"#dce200",HTML:"#e34c26",Hy:"#7790B2",IDL:"#a3522f",Idris:"#b30000",Io:"#a9188d",Ioke:"#078193",Isabelle:"#FEFE00",J:"#9EEDFF",Java:"#b07219",JavaScript:"#f1e05a",Jolie:"#843179",JSONiq:"#40d47e",Jsonnet:"#0064bd",Julia:"#a270ba","Jupyter Notebook":"#DA5B0B",Kotlin:"#F18E33",KRL:"#28430A",Lasso:"#999999",Lex:"#DBCA00",LFE:"#4C3023",LiveScript:"#499886",LLVM:"#185619",LOLCODE:"#cc9900",LookML:"#652B81",LSL:"#3d9970",Lua:"#000080",Makefile:"#427819",Mask:"#f97732",MATLAB:"#e16737",Max:"#c4a79c",MAXScript:"#00a6a6",mcfunction:"#E22837",Mercury:"#ff2b2b",Meson:"#007800",Metal:"#8f14e9",Mirah:"#c7a938","Modula-3":"#223388",MQL4:"#62A8D6",MQL5:"#4A76B8",MTML:"#b7e1f4",NCL:"#28431f",Nearley:"#990000",Nemerle:"#3d3c6e",nesC:"#94B0C7",NetLinx:"#0aa0ff","NetLinx+ERB":"#747faa",NetLogo:"#ff6375",NewLisp:"#87AED7",Nextflow:"#3ac486",Nim:"#37775b",Nit:"#009917",Nix:"#7e7eff",Nu:"#c9df40","Objective-C":"#438eff","Objective-C++":"#6866fb","Objective-J":"#ff0c5a",OCaml:"#3be133",Omgrofl:"#cabbff",ooc:"#b0b77e",Opal:"#f7ede0",Oxygene:"#cdd0e3",Oz:"#fab738",P4:"#7055b5",Pan:"#cc0000",Papyrus:"#6600cc",Parrot:"#f3ca0a",Pascal:"#E3F171",Pawn:"#dbb284",Pep8:"#C76F5B",Perl:"#0298c3","Perl 6":"#0000fb",PHP:"#4F5D95",PigLatin:"#fcd7de",Pike:"#005390",PLSQL:"#dad8d8",PogoScript:"#d80074",PostScript:"#da291c",PowerBuilder:"#8f0f8d",PowerShell:"#012456",Processing:"#0096D8",Prolog:"#74283c","Propeller Spin":"#7fa2a7",Puppet:"#302B6D",PureBasic:"#5a6986",PureScript:"#1D222D",Python:"#3572A5",q:"#0040cd",QML:"#44a51c",Quake:"#882233",R:"#198CE7",Racket:"#3c5caa",Ragel:"#9d5200",RAML:"#77d9fb",Rascal:"#fffaa0",Rebol:"#358a5b",Red:"#f50000","Ren'Py":"#ff7f7f",Ring:"#2D54CB",Roff:"#ecdebe",Rouge:"#cc0088",Ruby:"#701516",RUNOFF:"#665a4e",Rust:"#dea584",SaltStack:"#646464",SAS:"#B34936",Scala:"#c22d40",Scheme:"#1e4aec",sed:"#64b970",Self:"#0579aa",Shell:"#89e051",Shen:"#120F14",Slash:"#007eff",Slice:"#003fa2",Smalltalk:"#596706",Solidity:"#AA6746",SourcePawn:"#5c7611",SQF:"#3F3F3F",Squirrel:"#800000","SRecode Template":"#348a34",Stan:"#b2011d","Standard ML":"#dc566d",SuperCollider:"#46390b",Swift:"#ffac45",SystemVerilog:"#DAE1C2",Tcl:"#e4cc98",Terra:"#00004c",TeX:"#3D6117","TI Program":"#A0AA87",Turing:"#cf142b",TypeScript:"#2b7489",UnrealScript:"#a54c4d",Vala:"#fbe5cd",VCL:"#148AA8",Verilog:"#b2b7f8",VHDL:"#adb2cb","Vim script":"#199f4b","Visual Basic":"#945db7",Volt:"#1F1F1F",Vue:"#2c3e50",wdl:"#42f1f4",WebAssembly:"#04133b",wisp:"#7582D1",X10:"#4B6BEF",xBase:"#403a40",XC:"#99DA07",XQuery:"#5232e7",XSLT:"#EB8CEB",Yacc:"#4B6C4B",YARA:"#220000",YASnippet:"#32AB90",ZAP:"#0d665e",Zephir:"#118f9e",Zig:"#ec915c",ZIL:"#dc75e5",Other:"#bbb"},h={"#76CA61":"#fff","#24565A":"#fff","#FDD835":"#000","#50B0BA":"#fff","#FF5858":"#fff","#B0753F":"#fff","#25CDEB":"#000","#387EED":"#fff","#ED3DC6":"#fff","#512DA8":"#fff"};var u=function(t){return d[t]?d[t]:function(t,e){void 0===t&&(t=""),void 0===e&&(e=!0);var n,r,a=(n=function(t){for(var e=0,n=0;n<t.length;n+=1)e=t.charCodeAt(n)+((e<<5)-e);return e}(t),r=(16777215&n).toString(16).toUpperCase(),"00000".substring(0,6-r.length)+r);if(!e)return("#"+a).toLowerCase();var i=parseInt(a,16),s=Object.keys(h).map((function(t){return parseInt(t.replace("#",""),16)})).reduce((function(t,e){return Math.abs(e-i)<Math.abs(t-i)?e:t})).toString(16);return["#"+s,h["#"+s.toUpperCase()]]}(t,!1)},f=function(t){return Math.round(t)},p="codersrank-skills-chart",g=function(n){var r,a;function i(){var t;return(t=n.call(this)||this).tempDiv=document.createElement("div"),t.shadowEl=t.attachShadow({mode:"closed"}),t.stylesEl=document.createElement("style"),t.stylesEl.textContent=":host{--font-family:Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif;--svg-width:100%;--svg-height:auto;--axis-bg-color:rgba(0, 0, 0, 0.35);--hidden-area-color:#ddd;--label-text-color:inherit;--label-font-size:10px;--label-font-weight:500;--label-white-space:nowrap;--legend-text-color:inherit;--legend-disabled-text-color:#ccc;--legend-font-size:14px;--preloader-color:#72a0a8;--tooltip-font-size:12px;--tooltip-total-font-size:16px;--tooltip-total-font-weight:bold;--other-skills-area-color:#bbb;--chart-bg-color:transparent;--chart-border-radius:0px;--branding-text-color:inherit;width:100%;display:block;position:relative;box-sizing:border-box}.codersrank-skills-chart{font-family:var(--font-family);position:relative}.codersrank-skills-chart-preloader{position:absolute;left:50%;top:50%;width:32px;height:32px;margin:-16px 0 0 -16px;border:3px solid var(--preloader-color);border-left-color:transparent;border-bottom-color:transparent;border-radius:50%;box-sizing:border-box;-webkit-animation:preloader 1s infinite linear;animation:preloader 1s infinite linear}.codersrank-skills-chart-svg{position:relative}.codersrank-skills-chart svg{width:var(--svg-width);height:var(--svg-height);display:block;background-color:var(--chart-bg-color);border-radius:var(--chart-border-radius)}.codersrank-skills-chart polygon{transition-duration:150ms}.codersrank-skills-chart-current-line{stroke:rgba(0,0,0,.25);stroke-width:1px}.codersrank-skills-chart-hidden{fill:var(--hidden-area-color)!important}.codersrank-skills-chart-axis{margin-bottom:36px;height:1px;background:var(--axis-bg-color);color:inherit;display:flex;font-size:var(--label-font-size);font-weight:var(--label-font-weight);justify-content:space-between;line-height:1;color:var(--label-text-color)}.codersrank-skills-chart-axis>span{padding-top:10px;width:0;display:flex;align-items:flex-start;justify-content:center;white-space:var(--label-white-space)}.codersrank-skills-chart-axis>span:first-child{justify-content:flex-start}.codersrank-skills-chart-axis>span:last-child{justify-content:flex-end}.codersrank-skills-chart-tooltip{pointer-events:none;text-align:left;line-height:1.4;position:absolute;background:#000;border-radius:4px;color:#fff;font-family:var(--font-family);padding:8px;font-size:var(--tooltip-font-size);white-space:nowrap;pointer-events:none;top:50%;transform:translateX(-100%) translateY(-50%);margin-left:-10px}.codersrank-skills-chart-tooltip-right{margin-left:10px;transform:translateY(-50%)}.codersrank-skills-chart-tooltip-label{color:rgba(255,255,255,.75)}.codersrank-skills-chart-tooltip-total{font-size:var(--tooltip-total-font-size);font-weight:var(--tooltip-total-font-weight)}.codersrank-skills-chart-tooltip-list{list-style:none;margin:0;padding:0}.codersrank-skills-chart-tooltip-list span{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:4px}.codersrank-skills-chart-legend{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;font-size:var(--legend-font-size);width:100%;color:var(--legend-text-color);margin-top:36px}.codersrank-skills-chart-legend-button{color:inherit;width:auto;-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important;background-color:transparent;border-radius:0;border:none;outline:0!important;cursor:pointer;font-family:inherit;font-size:inherit;box-shadow:none!important;display:flex;align-items:center;font-weight:500;transition-duration:.2s;padding:4px 8px}.codersrank-skills-chart-legend-button span{transition-duration:.2s;width:14px;height:14px;margin-right:4px;border-radius:50%}.codersrank-skills-chart-legend-button-hidden{color:var(--legend-disabled-text-color)}.codersrank-skills-chart-legend-button-hidden span{background-color:var(--legend-disabled-text-color)!important}.codersrank-skills-chart-branding{font-size:12px;color:var(--branding-text-color);position:absolute;left:0;top:0}.codersrank-skills-chart-branding a{opacity:.5;display:flex;align-items:center;color:inherit;text-decoration:none;transition-duration:.2s;position:relative;z-index:1;transform:translate3d(0,0,0)}.codersrank-skills-chart-branding a:hover{opacity:1}.codersrank-skills-chart-branding span{margin-right:4px}.codersrank-skills-chart-branding svg{height:16px;width:auto}@-webkit-keyframes preloader{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes preloader{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}",t.shadowEl.appendChild(t.stylesEl),t.onMouseEnter=t.onMouseEnter.bind(o(t)),t.onMouseLeave=t.onMouseLeave.bind(o(t)),t.onClick=t.onClick.bind(o(t)),t.formatLabel=t.formatLabel.bind(o(t)),t.onSVGMouseEnter=t.onSVGMouseEnter.bind(o(t)),t.onSVGMouseMove=t.onSVGMouseMove.bind(o(t)),t.onSVGMouseLeave=t.onSVGMouseLeave.bind(o(t)),t.linesOffsets=[],t.currentIndex=null,t.activeSkillsSet=!1,t.hiddenDatasets=[],t.highlightedDatasetLabel=null,t.highlightedDatasetTimeout=null,t.mounted=!1,t.state=0,t.data={labels:[],datasets:[]},t}a=n,(r=i).prototype=Object.create(a.prototype),r.prototype.constructor=r,r.__proto__=a;var s,d,h,p=i.prototype;return p.getHighestScore=function(t){var e=0,n=null;return t.forEach((function(t){var r=0;t.languages.forEach((function(t){r+=t.score})),r>e&&(e=r,n=t.date)})),{score:e,date:n}},p.emitData=function(t){void 0===t&&(t={});var e=t.scores||{},n=new CustomEvent("data",{detail:{scores:e,highest:this.getHighestScore(e)}});this.dispatchEvent(n)},p.emitError=function(t){var e=new CustomEvent("error",{detail:t});this.dispatchEvent(e)},p.formatLabel=function(t){return t?Intl.DateTimeFormat("en",{year:"numeric",month:"short"}).format(new Date(t)):""},p.render=function(){var t=this.username,n=this.id,r=this.mounted,a=this.state,i=this.shadowEl,s=this.data,o=this.svgWidth,l=this.svgHeight,d=this.legend,h=this.labels,u=this.branding,f=this.hiddenDatasets,p=this.highlightedDatasetLabel,g=this.visibleLabels,b=this.currentIndex,v=this.formatLabel,k=this.tempDiv,m={data:s,svgWidth:o,svgHeight:l,legend:d,labels:h,branding:u,hiddenDatasets:f,highlightedDatasetLabel:p,visibleLabels:g,currentIndex:b,formatLabel:v};if(this.detachSVGEvents(),(t||n)&&r){3===a?k.innerHTML=c(m):2===a?k.innerHTML="":0!==a&&1!==a||(k.innerHTML=function(t){return c(e({},t,{preloader:!0,data:{labels:[],datasets:[]}}))}(m));var y=i.querySelector(".codersrank-skills-chart");y&&y.parentNode.removeChild(y),(y=k.querySelector(".codersrank-skills-chart"))&&(this.widgetEl=y,i.appendChild(y),this.attachSVGEvents())}},p.loadAndRender=function(){var t=this,e=this.username,n=this.id;this.state=1,this.render(),function(t,e){if(t&&l[t])return Promise.resolve(l[t]);if(e&&l[e])return Promise.resolve(l[e]);var n="https://api.codersrank.io/v2/users/"+(t||e)+"/tech_score_history";return e&&(n+="?get_by=id"),fetch(n,{method:"GET",headers:{"Content-Type":"application/json"}}).then((function(t){return t.json()})).then((function(n){return n&&400===n.code?Promise.reject(n):(e?l[e]=n:l[t]=n,n)})).catch((function(t){return Promise.reject(t)}))}(e,n).then((function(e){t.emitData(e),t.data=function(t,e,n){void 0===t&&(t=[]),void 0===e&&(e=[]),void 0===n&&(n=!1);var r=[].concat(t),a=[];r.forEach((function(t){t.languages.forEach((function(t){e.length>0&&!e.map((function(t){return t.toLowerCase()})).includes(t.language.toLowerCase())||a.includes(t.language)||a.push(t.language)}))}));var i,s=r.map((function(t){return t.date})),o=a.map((function(t){var e=[];return r.forEach((function(n){var r=n.languages.filter((function(e){return e.language===t}))[0];e.push(r?r.score:0)})),{label:t,color:u(t),values:e}}));if(n){var l=[];r.forEach((function(t){var e=0;t.languages.forEach((function(t){a.includes(t.language)||(e+=t.score)})),l.push(e)})),i={label:"Other",color:"var(--other-skills-area-color)",values:l}}return o.sort((function(t,e){return t.label>e.label?1:-1})),i&&o.push(i),{labels:s,datasets:o}}(e.scores,t.displaySkills,t.showOtherSkills),t.activeSkills&&t.activeSkills.length&&!t.activeSkillsSet&&(t.hiddenDatasets=t.data.datasets.map((function(t){return t.label})).filter((function(e){return t.activeSkills.indexOf(e)<0})),t.activeSkillsSet=!0),t.state=3,t.render()})).catch((function(e){t.emitError(e),t.state=2,t.render()}))},p.tooltipText=function(){var t=this,e=this.currentIndex,n=this.data,r=n.datasets,a=n.labels;if(null===e)return"";var i=0,s=r.filter((function(n){return!t.hiddenDatasets.includes(n.label)&&n.values[e]})).map((function(t){return{color:t.color,label:t.label,value:t.values[e]}}));return s.forEach((function(t){i+=t.value})),'\n <div class="codersrank-skills-chart-tooltip-label">'+this.formatLabel(a[e])+'</div>\n <div class="codersrank-skills-chart-tooltip-total">'+(f(i)+" exp. points")+"</div>\n "+(s.length>0?'\n <ul class="codersrank-skills-chart-tooltip-list">\n '+s.map((function(t){var e=t.label,n=t.color,r=t.value;return'\n <li><span style="background-color: '+n+';"></span>'+(e+": "+f(r))+"</li>\n "})).join("")+"\n </ul>":"")+"\n "},p.showTooltip=function(){var t=this;if(this.tooltip)if(this.data.datasets.filter((function(e){return!t.hiddenDatasets.includes(e.label)})).length){var e=this.shadowEl.querySelector(".codersrank-skills-chart-current-line");e&&e.classList.remove("codersrank-skills-chart-current-line");var n=this.shadowEl.querySelector('line[data-index="'+this.currentIndex+'"]');if(n){n.classList.add("codersrank-skills-chart-current-line");var r=this.widgetEl.querySelector(".codersrank-skills-chart-tooltip");r?r.innerHTML=this.tooltipText():(this.tempDiv.innerHTML='\n <div class="codersrank-skills-chart-tooltip">\n '+this.tooltipText()+"\n </div>\n ",r=this.tempDiv.querySelector(".codersrank-skills-chart-tooltip"),this.widgetEl.querySelector(".codersrank-skills-chart-svg").appendChild(r));var a=this.widgetEl.getBoundingClientRect(),i=n.getBoundingClientRect().left-a.left;i<180?r.classList.add("codersrank-skills-chart-tooltip-right"):r.classList.remove("codersrank-skills-chart-tooltip-right"),r.style.left=i+"px"}}else this.hideTooltip()},p.hideTooltip=function(){if(this.tooltip){var t=this.shadowEl.querySelector(".codersrank-skills-chart-current-line");t&&t.classList.remove("codersrank-skills-chart-current-line");var e=this.shadowEl.querySelector(".codersrank-skills-chart-tooltip");e&&this.widgetEl.querySelector(".codersrank-skills-chart-svg").removeChild(e)}},p.toggleDataset=function(t){this.highlightedDatasetLabel=null,this.hiddenDatasets.includes(t)?this.hiddenDatasets.splice(this.hiddenDatasets.indexOf(t),1):(this.hiddenDatasets.push(t),this.highlightedDatasetLabel=null),this.render()},p.onClick=function(t){var e;if("BUTTON"===t.target.tagName?e=t.target:t.target.parentNode&&"BUTTON"===t.target.parentNode.tagName&&(e=t.target.parentNode),e){var n=e.getAttribute("data-label");this.toggleDataset(n)}},p.onMouseEnter=function(t){var e,n=this;if(this.widgetEl&&("BUTTON"===t.target.tagName&&(e=t.target),e)){var r=e.getAttribute("data-label");if(r){var a=this.widgetEl.querySelector('polygon[data-label="'+r+'"]');a&&(clearTimeout(this.highlightedDatasetTimeout),this.highlightedDatasetTimeout=setTimeout((function(){n.highlightedDatasetLabel=r;for(var t=n.widgetEl.querySelectorAll("polygon"),e=0;e<t.length;e+=1)t[e].classList.add("codersrank-skills-chart-hidden");a.classList.remove("codersrank-skills-chart-hidden")}),100))}}},p.onMouseLeave=function(t){var e=this;"BUTTON"===t.target.tagName&&(this.highlightedDatasetTimeout=setTimeout((function(){if(e.widgetEl){var t=e.widgetEl.querySelectorAll("polygon");if(t)for(var n=0;n<t.length;n+=1)t[n].classList.remove("codersrank-skills-chart-hidden")}}),100))},p.calcLinesOffsets=function(){var t=this.widgetEl.querySelectorAll("line");this.linesOffsets=[];for(var e=0;e<t.length;e+=1)this.linesOffsets.push(t[e].getBoundingClientRect().left)},p.onSVGMouseEnter=function(){this.tooltip&&this.calcLinesOffsets()},p.onSVGMouseMove=function(t){if(this.tooltip){var e=t.pageX;void 0===e&&(e=0);var n=this.linesOffsets.map((function(t){return Math.abs(e-t)})),r=Math.min.apply(Math,n),a=n.indexOf(r);this.currentIndex=a,this.showTooltip()}},p.onSVGMouseLeave=function(){this.tooltip&&(this.currentIndex=null,this.hideTooltip())},p.attachSVGEvents=function(){if(this.widgetEl){var t=this.widgetEl.querySelector("svg");t&&(t.addEventListener("mouseenter",this.onSVGMouseEnter),t.addEventListener("mousemove",this.onSVGMouseMove),t.addEventListener("mouseleave",this.onSVGMouseLeave))}},p.detachSVGEvents=function(){if(this.widgetEl){var t=this.widgetEl.querySelector("svg");t&&(t.removeEventListener("mouseenter",this.onSVGMouseEnter),t.removeEventListener("mousemove",this.onSVGMouseMove),t.removeEventListener("mouseleave",this.onSVGMouseLeave))}},p.attributeChangedCallback=function(){this.mounted&&this.loadAndRender()},p.connectedCallback=function(){this.width=this.offsetWidth,this.mounted=!0,this.loadAndRender(),this.shadowEl.addEventListener("click",this.onClick,!0),this.shadowEl.addEventListener("mouseenter",this.onMouseEnter,!0),this.shadowEl.addEventListener("mouseleave",this.onMouseLeave,!0)},p.disconnectedCallback=function(){this.mounted=!1,this.shadowEl.removeEventListener("click",this.onClick),this.shadowEl.removeEventListener("mouseenter",this.onMouseEnter),this.shadowEl.removeEventListener("mouseleave",this.onMouseLeave),this.detachSVGEvents()},s=i,h=[{key:"observedAttributes",get:function(){return["username","id","max-labels","svg-width","svg-height","legend","labels","skills","active-skills","show-other-skills"]}}],(d=[{key:"visibleLabels",get:function(){if(!this.maxLabels||this.data.labels.length<=this.maxLabels)return this.data.labels;var t=Math.ceil(this.data.labels.length/this.maxLabels);return this.data.labels.filter((function(e,n){return n%t==0}))}},{key:"displaySkills",get:function(){var t=this.getAttribute("skills")||"";return"string"!=typeof t?[]:t.split(",").map((function(t){return t.trim()})).filter((function(t){return!!t}))}},{key:"skills",set:function(t){this.setAttribute("skills",t)}},{key:"activeSkills",get:function(){var t=this.getAttribute("active-skills")||"";return"string"!=typeof t?[]:t.split(",").map((function(t){return t.trim()})).filter((function(t){return!!t}))},set:function(t){this.setAttribute("active-skills",t)}},{key:"active-skills",set:function(t){this.setAttribute("active-skills",t)}},{key:"showOtherSkills",get:function(){var t=this.getAttribute("show-other-skills");return""===t||"true"===t},set:function(t){this.setAttribute("show-other-skills",t)}},{key:"show-other-skills",set:function(t){this.setAttribute("show-other-skills",t)}},{key:"tooltip",get:function(){var t=this.getAttribute("tooltip");return""===t||"true"===t},set:function(t){this.setAttribute("tooltip",t)}},{key:"username",get:function(){return this.getAttribute("username")},set:function(t){this.setAttribute("username",t)}},{key:"id",get:function(){return this.getAttribute("id")},set:function(t){this.setAttribute("id",t)}},{key:"maxLabels",get:function(){return parseInt(this.getAttribute("max-labels")||0,10)||8},set:function(t){this.setAttribute("max-labels",t)}},{key:"max-labels",set:function(t){this.setAttribute("max-labels",t)}},{key:"svgWidth",get:function(){return parseInt(this.getAttribute("svg-width")||0,10)||640},set:function(t){this.setAttribute("svg-width",t)}},{key:"svg-width",set:function(t){this.setAttribute("svg-width",t)}},{key:"svgHeight",get:function(){return parseInt(this.getAttribute("svg-height")||0,10)||320},set:function(t){this.setAttribute("svg-height",t)}},{key:"svg-height",set:function(t){this.setAttribute("svg-height",t)}},{key:"legend",get:function(){var t=this.getAttribute("legend");return""===t||"true"===t},set:function(t){this.setAttribute("legend",t)}},{key:"labels",get:function(){var t=this.getAttribute("labels");return""===t||"true"===t},set:function(t){this.setAttribute("labels",t)}},{key:"branding",get:function(){return"false"!==this.getAttribute("branding")},set:function(t){this.setAttribute("branding",t)}}])&&t(s.prototype,d),h&&t(s,h),i}(s(HTMLElement));window.customElements&&!window.customElements.get(p)&&window.customElements.define(p,g)}));
//# sourceMappingURL=codersrank-skills-chart.min.js.map

@@ -6,3 +6,3 @@ var cache = {};

var endpoint = "https://api.codersrank.io/v2/users/" + (username || id) + "/tech_score_history";
if (id) endpoint += '?id=true';
if (id) endpoint += '?get_by=id';
return fetch(endpoint, {

@@ -9,0 +9,0 @@ method: 'GET',

{
"name": "@codersrank/skills-chart",
"version": "0.9.18",
"version": "0.9.19",
"description": "CodersRank skills chart widget",

@@ -5,0 +5,0 @@ "main": "cjs/codersrank-skills-chart.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc